PageSourceSearch

https://alphio.ai/blog/_next/static/chunks/0xy8y~bq8s9.c.js

js alphio.ai collected 2026-10-03 21:13:12 UTC 1,194,041 bytes, 24 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,341091,(e,t,r)=>{!function(){var e={675:function(e,t){"use strict";t.byteLength=u,t.toByteArray=h,t.fromByteArray=p;for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o<a;++o)r[o]=s[o],n[s.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function u(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n}function c(e,t,r){return(t+r)*3/4-r}function h(e){var t,r,s=l(e),o=s[0],a=s[1],u=new i(c(e,o,a)),h=0,d=a>0?o-4:o;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[h++]=t>>16&255,u[h++]=t>>8&255,u[h++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[h++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[h++]=t>>8&255,u[h++]=255&t),u}function d(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function f(e,t,r){for(var n=[],i=t;i<r;i+=3)n.push(d((e[i]<<16&0xff0000)+(e[i+1]<<8&65280)+(255&e[i+2])));return n.join("")}function p(e){for(var t,n=e.length,i=n%3,s=[],o=16383,a=0,l=n-i;a<l;a+=o)s.push(f(e,a,a+o>l?l:a+o));return 1===i?s.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&s.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),s.join("")}n[45]=62,n[95]=63},72:function(e,t,r){"use strict";var n=r(675),i=r(783),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=b,t.INSPECT_MAX_BYTES=50;var o=0x7fffffff;function a(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}function l(e){if(e>o)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return p(e,t);if(ArrayBuffer.isView(e))return m(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return g(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);var i=v(e);if(i)return i;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function d(e,t,r){return(h(e),e<=0)?l(e):void 0!==t?"string"==typeof r?l(e).fill(t,r):l(e).fill(t):l(e)}function f(e){return h(e),l(e<0?0:0|y(e))}function p(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!u.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|w(e,t),n=l(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function m(e){for(var t=e.length<0?0:0|y(e.length),r=l(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function g(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),u.prototype),n}function v(e){if(u.isBuffer(e)){var t=0|y(e.length),r=l(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?l(0):m(e):"Buffer"===e.type&&Array.isArray(e.data)?m(e.data):void 0}function y(e){if(e>=o)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function b(e){return+e!=e&&(e=0),u.alloc(+e)}function w(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:K(e).length;t=(""+t).toLowerCase(),i=!0}}function x(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,r);case"utf8":case"utf-8":return N(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return D(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function S(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function _(e,t,r,n,i){if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),Q(r*=1)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:M(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return M(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function M(e,t,r,n,i){var s,o=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;o=2,a/=2,l/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(s=r;s<a;s++)if(u(e,s)===u(t,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===l)return c*o}else -1!==c&&(s-=s-c),c=-1}else for(r+l>a&&(r=a-l),s=r;s>=0;s--){for(var h=!0,d=0;d<l;d++)if(u(e,s+d)!==u(t,d)){h=!1;break}if(h)return s}return -1}function O(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(t.substr(2*o,2),16);if(Q(a))break;e[r+o]=a}return o}function E(e,t,r,n){return J(K(t,e.length-r),e,r,n)}function P(e,t,r,n){return J(Y(t),e,r,n)}function k(e,t,r,n){return P(e,t,r,n)}function A(e,t,r,n){return J(G(t),e,r,n)}function j(e,t,r,n){return J(q(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function N(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s,o,a,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=r)switch(h){case 1:u<128&&(c=u);break;case 2:(192&(s=e[i+1]))==128&&(l=(31&u)<<6|63&s)>127&&(c=l);break;case 3:s=e[i+1],o=e[i+2],(192&s)==128&&(192&o)==128&&(l=(15&u)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],(192&s)==128&&(192&o)==128&&(192&a)==128&&(l=(15&u)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return R(n)}t.kMaxLength=0x7fffffff,u.TYPED_ARRAY_SUPPORT=a(),!u.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return d(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(X(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),X(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(X(s,Uint8Array)&&(s=u.from(s)),!u.isBuffer(s))throw TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=w,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)S(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)S(this,t,t+3),S(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},u.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?N(this,0,e):x.apply(this,arguments)}
vendor: 9,796 bytes, line 1
1,u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(X(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,o=r-t,a=Math.min(s,o),l=this.slice(n,i),c=e.slice(t,r),h=0;h<a;++h)if(l[h]!==c[h]){s=l[h],o=c[h];break}return s<o?-1:+(o<s)},u.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return _(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return _(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return O(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return P(this,e,t,r);case"latin1":case"binary":return k(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,r);default:if(s)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function R(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=T));return r}function I(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function D(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function L(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=Z[e[s]];return i}function V(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function z(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function F(e,t,r,n,i,s){if(!u.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function B(e,t,r,n,i,s){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function $(e,t,r,n,s){return t*=1,r>>>=0,s||B(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,s){return t*=1,r>>>=0,s||B(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||z(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||z(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return e>>>=0,t||z(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||z(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||z(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||z(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||z(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||z(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return(e>>>=0,t||z(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||z(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||z(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||z(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||z(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||z(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||z(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;F(this,e,t,r,i,0)}var s=1,o=0;for(this[t]=255&e;++o<r&&(s*=256);)this[t+o]=e/s&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;F(this,e,t,r,i,0)}var s=r-1,o=1;for(this[t+s]=255&e;--s>=0&&(o*=256);)this[t+s]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||F(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||F(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||F(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);F(this,e,t,r,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<r&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);F(this,e,t,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||F(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||F(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,r){return $(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return $(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var s=i-1;s>=0;--s)e[s+t]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,s=e.charCodeAt(0);("utf8"===n&&s<128||"latin1"===n)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var o=u.isBuffer(e)?e:u.from(e,n),a=o.length;
1if(0===a)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};var W=/[^+/0-9A-Za-z-_]/g;function H(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function K(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319||o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function Y(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function q(e,t){for(var r,n,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i.push(r%256),i.push(n);return i}function G(e){return n.toByteArray(H(e))}function J(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}var Z=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},783:function(e,t){t.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,l=(1<<a)-1,u=l>>1,c=-7,h=r?i-1:0,d=r?-1:1,f=e[t+h];for(h+=d,s=f&(1<<-c)-1,f>>=-c,c+=a;c>0;s=256*s+e[t+h],h+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=n;c>0;o=256*o+e[t+h],h+=d,c-=8);if(0===s)s=1-u;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),s-=u}return(f?-1:1)*o*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var o,a,l,u=8*s-i-1,c=(1<<u)-1,h=c>>1,d=5960464477539062e-23*(23===i),f=n?0:s-1,p=n?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=c?(a=0,o=c):o+h>=1?(a=(t*l-1)*Math.pow(2,i),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+f]=255&a,f+=p,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;e[r+f]=255&o,f+=p,o/=256,u-=8);e[r+f-p]|=128*m}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var s=r[t]={exports:{}},o=!0;try{e[t](s,s.exports,n),o=!1}finally{o&&delete r[t]}return s.exports}n.ab="/ROOT/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/buffer/",t.exports=n(72)}()},585458,(e,t,r)=>{!function(e,r){t.exports=r()}(e.e,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",s="minute",o="hour",a="day",l="week",u="month",c="quarter",h="year",d="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},v=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},y={s:v,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+v(n,2,"0")+":"+v(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,u),s=r-i<0,o=t.clone().add(n+(s?-1:1),u);return+(-(n+(r-i)/(s?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return({M:u,y:h,w:l,d:a,D:d,h:o,m:s,s:i,ms:n,Q:c})[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=g;var x="$isDayjsObject",S=function(e){return e instanceof E||!(!e||!e[x])},_=function e(t,r,n){var i;if(!t)return b;if("string"==typeof t){var s=t.toLowerCase();w[s]&&(i=s),r&&(w[s]=r,i=s);var o=t.split("-");if(!i&&o.length>1)return e(o[0])}else{var a=t.name;w[a]=t,i=a}return!n&&i&&(b=i),i||!n&&b},M=function(e,t){if(S(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new E(r)},O=y;O.l=_,O.i=S,O.w=function(e,t){return M(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=_(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(O.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var i=n[2]-1||0,s=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return O},v.isValid=function(){return this.$d.toString()!==f},v.isSame=function(e,t){var r=M(e);return this.startOf(t)<=r&&r<=this.endOf(t)},v.isAfter=function(e,t){return M(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<M(e)},v.$g=function(e,t,r){return O.u(e)?this[t]:this.set(r,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var r=this,n=!!O.u(t)||t,c=O.p(e),f=function(e,t){var i=O.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?i:i.endOf(a)},p=function(e,t){return O.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,g=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case h:return n?f(1,0):f(31,11);case u:return n?f(1,g):f(0,g+1);case l:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return f(n?v-w:v+(6-w),g);case a:case d:return p(y+"Hours",0);case o:return p(y+"Minutes",1);case s:return p(y+"Seconds",2);case i:return p(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var r,l=O.p(e),c="set"+(this.$u?"UTC":""),f=((r={})[a]=c+"Date",r[d]=c+"Date",r[u]=c+"Month",r[h]=c+"FullYear",r[o]=c+"Hours",r[s]=c+"Minutes",r[i]=c+"Seconds",r[n]=c+"Milliseconds",r)[l],p=l===a?this.$D+(t-this.$W):t;if(l===u||l===h){var m=this.clone().set(d,1);
1m.$d[f](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[O.p(e)]()},v.add=function(n,c){var d,f=this;n=Number(n);var p=O.p(c),m=function(e){var t=M(f);return O.w(t.date(t.date()+Math.round(e*n)),f)};if(p===u)return this.set(u,this.$M+n);if(p===h)return this.set(h,this.$y+n);if(p===a)return m(1);if(p===l)return m(7);var g=((d={})[s]=t,d[o]=r,d[i]=e,d)[p]||1,v=this.$d.getTime()+n*g;return O.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||f;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,o=this.$m,a=this.$M,l=r.weekdays,u=r.months,c=r.meridiem,h=function(e,r,i,s){return e&&(e[r]||e(t,n))||i[r].slice(0,s)},d=function(e){return O.s(s%12||12,e,"0")},p=c||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(m,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return O.s(t.$y,4,"0");case"M":return a+1;case"MM":return O.s(a+1,2,"0");case"MMM":return h(r.monthsShort,a,u,3);case"MMMM":return h(u,a);case"D":return t.$D;case"DD":return O.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(r.weekdaysMin,t.$W,l,2);case"ddd":return h(r.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(s);case"HH":return O.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(s,o,!0);case"A":return p(s,o,!1);case"m":return String(o);case"mm":return O.s(o,2,"0");case"s":return String(t.$s);case"ss":return O.s(t.$s,2,"0");case"SSS":return O.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},v.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},v.diff=function(n,d,f){var p,m=this,g=O.p(d),v=M(n),y=(v.utcOffset()-this.utcOffset())*t,b=this-v,w=function(){return O.m(m,v)};switch(g){case h:p=w()/12;break;case u:p=w();break;case c:p=w()/3;break;case l:p=(b-y)/6048e5;break;case a:p=(b-y)/864e5;break;case o:p=b/r;break;case s:p=b/t;break;case i:p=b/e;break;default:p=b}return f?p:O.a(p)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return w[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=_(e,t,!0);return n&&(r.$L=n),r},v.clone=function(){return O.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),P=E.prototype;return M.prototype=P,[["$ms",n],["$s",i],["$m",s],["$H",o],["$W",a],["$M",u],["$y",h],["$D",d]].forEach(function(e){P[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),M.extend=function(e,t){return e.$i||(e(t,E,M),e.$i=!0),M},M.locale=_,M.isDayjs=S,M.unix=function(e){return M(1e3*e)},M.en=w[b],M.Ls=w,M.p={},M})},633669,(e,t,r)=>{!function(e,r){t.exports=r()}(e.e,function(){return function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}})},73920,(e,t,r)=>{!function(e,r){t.exports=r()}(e.e,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,i){var s,o=function(e,r,n){void 0===n&&(n={});var i=new Date(e);return(function(e,r){void 0===r&&(r={});var n=r.timeZoneName||"short",i=e+"|"+n,s=t[i];return s||(s=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:n}),t[i]=s),s})(r,n).formatToParts(i)},a=function(t,r){for(var n=o(t,r),s=[],a=0;a<n.length;a+=1){var l=n[a],u=l.type,c=l.value,h=e[u];h>=0&&(s[h]=parseInt(c,10))}var d=s[3],f=24===d?0:d,p=s[0]+"-"+s[1]+"-"+s[2]+" "+f+":"+s[4]+":"+s[5]+":000",m=+t;return(i.utc(p).valueOf()-(m-=m%1e3))/6e4},l=n.prototype;l.tz=function(e,t){void 0===e&&(e=s);var r,n=this.utcOffset(),o=this.toDate(),a=o.toLocaleString("en-US",{timeZone:e}),l=Math.round((o-new Date(a))/1e3/60),u=-(15*Math.round(o.getTimezoneOffset()/15))-l;if(Number(u)){if(r=i(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(u,!0),t){var c=r.utcOffset();r=r.add(n-c,"minute")}}else r=this.utcOffset(0,t);return r.$x.$timezone=e,r},l.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),r=o(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return r&&r.value};var u=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return u.call(this,e,t);var r=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(r,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,r){var n=r&&t,o=r||t||s,l=a(+i(),o);
1if("string"!=typeof e)return i(e).tz(o);var u=function(e,t,r){var n=e-60*t*1e3,i=a(n,r);if(t===i)return[n,t];var s=a(n-=60*(i-t)*1e3,r);return i===s?[n,i]:[e-60*Math.min(i,s)*1e3,Math.max(i,s)]}(i.utc(e,n).valueOf(),l,o),c=u[0],h=u[1],d=i(c).utcOffset(h);return d.$x.$timezone=o,d},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){s=e}}})},287200,(e,t,r)=>{!function(e,r){t.exports=r()}(e.e,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,i,s){var o=i.prototype;s.utc=function(e){var t={date:e,utc:!0,args:arguments};return new i(t)},o.utc=function(t){var r=s(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},o.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var a=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),a.call(this,e)};var l=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=o.utcOffset;o.utcOffset=function(n,i){var s=this.$utils().u;if(s(n))return this.$u?0:s(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var i=(""+n[0]).match(r)||["-",0,0],s=i[0],o=60*i[1]+ +i[2];return 0===o?0:"+"===s?o:-o}(n)))return this;var o=16>=Math.abs(n)?60*n:n;if(0===o)return this.utc(i);var a=this.clone();if(i)return a.$offset=o,a.$u=!1,a;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(a=this.local().add(o+l,e)).$offset=o,a.$x.$localOffset=l,a};var c=o.format;o.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var h=o.toDate;o.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var d=o.diff;o.diff=function(e,t,r){if(e&&this.$u===e.$u)return d.call(this,e,t,r);var n=this.local(),i=s(e).local();return d.call(n,i,t,r)}}})},592072,(e,t,r)=>{"use strict";t.exports=function e(e,t){for(var r=Array(arguments.length-1),n=0,i=2,s=!0;i<arguments.length;)r[n++]=arguments[i++];return new Promise(function(i,o){r[n]=function(e){if(s)if(s=!1,e)o(e);else{for(var t=Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];i.apply(null,t)}};try{e.apply(t||null,r)}catch(e){s&&(s=!1,o(e))}})}},831911,(e,t,r)=>{"use strict";var n=r;n.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var i=Array(64),s=Array(123),o=0;o<64;)s[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(e,t,r){for(var n,s=null,o=[],a=0,l=0;t<r;){var u=e[t++];switch(l){case 0:o[a++]=i[u>>2],n=(3&u)<<4,l=1;break;case 1:o[a++]=i[n|u>>4],n=(15&u)<<2,l=2;break;case 2:o[a++]=i[n|u>>6],o[a++]=i[63&u],l=0}a>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),a=0)}return(l&&(o[a++]=i[n],o[a++]=61,1===l&&(o[a++]=61)),s)?(a&&s.push(String.fromCharCode.apply(String,o.slice(0,a))),s.join("")):String.fromCharCode.apply(String,o.slice(0,a))};var a="invalid encoding";n.decode=function(e,t,r){for(var n,i=r,o=0,l=0;l<e.length;){var u=e.charCodeAt(l++);if(61===u&&o>1)break;if(void 0===(u=s[u]))throw Error(a);switch(o){case 0:n=u,o=1;break;case 1:t[r++]=n<<2|(48&u)>>4,n=u,o=2;break;case 2:t[r++]=(15&n)<<4|(60&u)>>2,n=u,o=3;break;case 3:t[r++]=(3&n)<<6|u,o=0}}if(1===o)throw Error(a);return r-i},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},900831,(e,t,r)=>{"use strict";function n(){this._listeners={}}t.exports=n,n.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},n.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},459391,(e,t,r)=>{"use strict";function n(e){return"u">typeof Float32Array?!function(){var t=new Float32Array([-0]),r=new 
1Uint8Array(t.buffer),n=128===r[3];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3]}function s(e,n,i){t[0]=e,n[i]=r[3],n[i+1]=r[2],n[i+2]=r[1],n[i+3]=r[0]}function o(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function a(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?i:s,e.writeFloatBE=n?s:i,e.readFloatLE=n?o:a,e.readFloatBE=n?a:o}():!function(){function t(e,t,r,n){var i=+(t<0);if(i&&(t=-t),0===t)e(1/t>0?0:0x80000000,r,n);else if(isNaN(t))e(0x7fc00000,r,n);else if(t>34028234663852886e22)e((i<<31|0x7f800000)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var s=Math.floor(Math.log(t)/Math.LN2),o=8388607&Math.round(t*Math.pow(2,-s)*8388608);e((i<<31|s+127<<23|o)>>>0,r,n)}}function r(e,t,r){var n=e(t,r),i=(n>>31)*2+1,s=n>>>23&255,o=8388607&n;return 255===s?o?NaN:1/0*i:0===s?1401298464324817e-60*i*o:i*Math.pow(2,s-150)*(o+8388608)}e.writeFloatLE=t.bind(null,i),e.writeFloatBE=t.bind(null,s),e.readFloatLE=r.bind(null,o),e.readFloatBE=r.bind(null,a)}(),"u">typeof Float64Array?!function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function s(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function o(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function a(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?i:s,e.writeDoubleBE=n?s:i,e.readDoubleLE=n?o:a,e.readDoubleBE=n?a:o}():!function(){function t(e,t,r,n,i,s){var o,a=+(n<0);if(a&&(n=-n),0===n)e(0,i,s+t),e(1/n>0?0:0x80000000,i,s+r);else if(isNaN(n))e(0,i,s+t),e(0x7ff80000,i,s+r);else if(n>17976931348623157e292)e(0,i,s+t),e((a<<31|0x7ff00000)>>>0,i,s+r);else if(n<22250738585072014e-324)e((o=n/5e-324)>>>0,i,s+t),e((a<<31|o/0x100000000)>>>0,i,s+r);else{var l=Math.floor(Math.log(n)/Math.LN2);1024===l&&(l=1023),e(0x10000000000000*(o=n*Math.pow(2,-l))>>>0,i,s+t),e((a<<31|l+1023<<20|1048576*o&1048575)>>>0,i,s+r)}}function r(e,t,r,n,i){var s=e(n,i+t),o=e(n,i+r),a=(o>>31)*2+1,l=o>>>20&2047,u=0x100000000*(1048575&o)+s;return 2047===l?u?NaN:1/0*a:0===l?5e-324*a*u:a*Math.pow(2,l-1075)*(u+0x10000000000000)}e.writeDoubleLE=t.bind(null,i,0,4),e.writeDoubleBE=t.bind(null,s,4,0),e.readDoubleLE=r.bind(null,o,0,4),e.readDoubleBE=r.bind(null,a,4,0)}(),e}function i(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function s(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function a(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}t.exports=n(n)},133226,(__turbopack_context__,module,exports)=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},634753,(e,t,r)=>{"use strict";var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:(64512&r)==55296&&(64512&e.charCodeAt(n+1))==56320?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){if(r-t<1)return"";for(var n,i=null,s=[],o=0;t<r;)(n=e[t++])<128?s[o++]=n:n>191&&n<224?s[o++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,s[o++]=55296+(n>>10),s[o++]=56320+(1023&n)):s[o++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],o>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),o=0);return i?(o&&i.push(String.fromCharCode.apply(String,s.slice(0,o))),i.join("")):String.fromCharCode.apply(String,s.slice(0,o))},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)(n=e.charCodeAt(o))<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:((64512&n)==55296&&(64512&(i=e.charCodeAt(o+1)))==56320?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128);return r-s}
1},627305,(e,t,r)=>{"use strict";t.exports=function e(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var a=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),a}}},606665,(e,t,r)=>{"use strict";t.exports=i;var n=e.r(130548);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var s=i.zero=new i(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var o=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/0x100000000>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>0xffffffff&&(r=0,++n>0xffffffff&&(n=0))),new i(r,n)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(n.isString(e))if(!n.Long)return i.fromNumber(parseInt(e,10));else e=n.Long.fromString(e);return e.low||e.high?new i(e.low>>>0,e.high>>>0):s},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+0x100000000*r)}return this.lo+0x100000000*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,!!e):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var a=String.prototype.charCodeAt;i.fromHash=function(e){return e===o?s:new i((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},130548,(e,t,r)=>{"use strict";var n=r;function i(e,t,r){for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}function s(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack||""}),r&&i(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}n.asPromise=e.r(592072),n.base64=e.r(831911),n.EventEmitter=e.r(900831),n.float=e.r(459391),n.inquire=e.r(133226),n.utf8=e.r(634753),n.pool=e.r(627305),n.LongBits=e.r(606665),n.isNode=!!(e.g&&e.g.process&&e.g.process.versions&&e.g.process.versions.node),n.global=n.isNode&&e.g||"u">typeof window&&window||"u">typeof self&&self||e.e,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!!(null!=r&&e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"u"<typeof Uint8Array?e:new Uint8Array(e)},n.Array="u">typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},n.merge=i,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=s,n.ProtocolError=s("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;if(!e){n._Buffer_from=n._Buffer_allocUnsafe=null;return}n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}}},875425,(e,t,r)=>{"use strict";
1t.exports={}},450317,(e,t,r)=>{"use strict";function n(e,t){"string"==typeof e&&(t=e,e=void 0);var r=[];function i(e){if("string"!=typeof e){var t=s();if(n.verbose&&console.log("codegen: "+t),t="return "+t,e){for(var o=Object.keys(e),a=Array(o.length+1),l=Array(o.length),u=0;u<o.length;)a[u]=o[u],l[u]=e[o[u++]];return a[u]=t,Function.apply(null,a).apply(null,l)}return Function(t)()}for(var c=Array(arguments.length-1),h=0;h<c.length;)c[h]=arguments[++h];if(h=0,e=e.replace(/%([%dfijs])/g,function(e,t){var r=c[h++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"}),h!==c.length)throw Error("parameter count mismatch");return r.push(e),i}function s(n){return"function "+(n||t||"")+"("+(e&&e.join(",")||"")+"){\n  "+r.join("\n  ")+"\n}"}return i.toString=s,i}t.exports=n,n.verbose=!1},695014,(e,t,r)=>{"use strict";t.exports=s;var n=e.r(592072),i=e.r(133226)("fs");function s(e,t,r){return("function"==typeof t?(r=t,t={}):t||(t={}),r)?!t.xhr&&i&&i.readFile?i.readFile(e,function(n,i){return n&&"u">typeof XMLHttpRequest?s.xhr(e,t,r):n?r(n):r(null,t.binary?i:i.toString("utf8"))}):s.xhr(e,t,r):n(s,this,e,t)}s.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var i=0;i<n.responseText.length;++i)e.push(255&n.responseText.charCodeAt(i))}return r(null,"u">typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},780799,(e,t,r)=>{"use strict";var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0&&".."!==t[s-1]?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return(r||(t=s(t)),i(t))?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?s(e+"/"+t):t)}},697287,(e,t,r)=>{"use strict";t.exports=h;var n,i,s,o=e.r(298399);((h.prototype=Object.create(o.prototype)).constructor=h).className="Namespace";var a=e.r(207931),l=e.r(804884),u=e.r(938051);function c(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function h(e,t){o.call(this,e,t),this.nested=void 0,this._nestedArray=null,this._lookupCache={},this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}function d(e){e._nestedArray=null,e._lookupCache={};for(var t=e;t=t.parent;)t._lookupCache={};return e}h.fromJSON=function(e,t){return new h(e,t.options).addJSON(t.nested)},h.arrayToJSON=c,h.isReservedId=function(e,t){if(e){for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0}return!1},h.isReservedName=function(e,t){if(e){for(var r=0;r<e.length;++r)if(e[r]===t)return!0}return!1},Object.defineProperty(h.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=l.toArray(this.nested))}}),h.prototype.toJSON=function(e){return l.toObject(["options",this.options,"nested",c(this.nestedArray,e)])},h.prototype.addJSON=function(e){var t=this;if(e)for(var r,o=Object.keys(e),l=0;l<o.length;++l)r=e[o[l]],t.add((void 0!==r.fields?n.fromJSON:void 0!==r.values?s.fromJSON:void 0!==r.methods?i.fromJSON:void 0!==r.id?a.fromJSON:h.fromJSON)(o[l],r));return this},h.prototype.get=function(e){return this.nested&&this.nested[e]||null},h.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},h.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof n||e instanceof u||e instanceof s||e instanceof i||e instanceof h))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t)if(t instanceof h&&e instanceof h&&!(t instanceof n||t instanceof i)){for(var r=t.nestedArray,o=0;o<r.length;++o)e.add(r[o]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}
1else throw Error("duplicate name '"+e.name+"' in "+this)}else this.nested={};this.nested[e.name]=e,this instanceof n||this instanceof i||this instanceof s||this instanceof a||e._edition||(e._edition=e._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var l=this;l=l.parent;)l._needsRecursiveFeatureResolution=!0,l._needsRecursiveResolve=!0;return e.onAdd(this),d(this)},h.prototype.remove=function(e){if(!(e instanceof o))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),d(this)},h.prototype.define=function(e,t){if(l.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof h))throw Error("path conflicts with non-namespace objects")}else r.add(r=new h(n))}return t&&r.addJSON(t),r},h.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var e=this.nestedArray,t=0;for(this.resolve();t<e.length;)e[t]instanceof h?e[t++].resolveAll():e[t++].resolve();return this._needsRecursiveResolve=!1,this},h.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution&&(this._needsRecursiveFeatureResolution=!1,e=this._edition||e,o.prototype._resolveFeaturesRecursive.call(this,e),this.nestedArray.forEach(t=>{t._resolveFeaturesRecursive(e)})),this},h.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),l.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;var n=e.join(".");if(""===e[0])return this.root.lookup(e.slice(1),t);var i=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+n];if(i&&(!t||t.indexOf(i.constructor)>-1)||(i=this._lookupImpl(e,n))&&(!t||t.indexOf(i.constructor)>-1))return i;if(r)return null;for(var s=this;s.parent;){if((i=s.parent._lookupImpl(e,n))&&(!t||t.indexOf(i.constructor)>-1))return i;s=s.parent}return null},h.prototype._lookupImpl=function(e,t){if(Object.prototype.hasOwnProperty.call(this._lookupCache,t))return this._lookupCache[t];var r=this.get(e[0]),n=null;if(r)1===e.length?n=r:r instanceof h&&(e=e.slice(1),n=r._lookupImpl(e,e.join(".")));else for(var i=0;i<this.nestedArray.length;++i)this._nestedArray[i]instanceof h&&(r=this._nestedArray[i]._lookupImpl(e,t))&&(n=r);return this._lookupCache[t]=n,n},h.prototype.lookupType=function(e){var t=this.lookup(e,[n]);if(!t)throw Error("no such type: "+e);return t},h.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},h.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[n,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},h.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},h._configure=function(e,t,r){n=e,i=t,s=r}},138983,(e,t,r)=>{"use strict";t.exports=o;var n=e.r(207931);((o.prototype=Object.create(n.prototype)).constructor=o).className="MapField";var i=e.r(23137),s=e.r(804884);function o(e,t,r,i,o,a){if(n.call(this,e,t,i,void 0,void 0,o,a),!s.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(e,t){return new o(e,t.id,t.keyType,t.type,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&!!e.keepComments;return s.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===i.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},o.d=function(e,t,r){return"function"==typeof r?r=s.decorateType(r).name:r&&"object"==typeof r&&(r=s.decorateEnum(r).name),function(n,i){s.decorateType(n.constructor).add(new o(i,e,t,r))}}},265942,(e,t,r)=>{"use strict";
1t.exports=s;var n=e.r(298399);((s.prototype=Object.create(n.prototype)).constructor=s).className="Method";var i=e.r(804884);function s(e,t,r,s,o,a,l,u,c){if(i.isObject(o)?(l=o,o=a=void 0):i.isObject(a)&&(l=a,a=void 0),!(void 0===t||i.isString(t)))throw TypeError("type must be a string");if(!i.isString(r))throw TypeError("requestType must be a string");if(!i.isString(s))throw TypeError("responseType must be a string");n.call(this,e,l),this.type=t||"rpc",this.requestType=r,this.requestStream=!!o||void 0,this.responseType=s,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=c}s.fromJSON=function(e,t){return new s(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},s.prototype.toJSON=function(e){var t=!!e&&!!e.keepComments;return i.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},s.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},2122,(e,t,r)=>{"use strict";t.exports=i;var n=e.r(130548);function i(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,s,o){if(!s)throw TypeError("request must be specified");var a=this;if(!o)return n.asPromise(e,a,t,r,i,s);if(!a.rpcImpl)return void setTimeout(function(){o(Error("already ended"))},0);try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(e,r){if(e)return a.emit("error",e,t),o(e);if(null===r)return void a.end(!0);if(!(r instanceof i))try{r=i[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),o(e)}return a.emit("data",r,t),o(null,r)})}catch(e){a.emit("error",e,t),setTimeout(function(){o(e)},0);return}},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},662405,(e,t,r)=>{"use strict";r.Service=e.r(2122)},3415,(e,t,r)=>{"use strict";t.exports=a;var n=e.r(697287);((a.prototype=Object.create(n.prototype)).constructor=a).className="Service";var i=e.r(265942),s=e.r(804884),o=e.r(662405);function a(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function l(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var r=new a(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),s=0;s<n.length;++s)r.add(i.fromJSON(n[s],t.methods[n[s]]));return t.nested&&r.addJSON(t.nested),t.edition&&(r._edition=t.edition),r.comment=t.comment,r._defaultEdition="proto3",r},a.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&!!e.keepComments;return s.toObject(["edition",this._editionToJSON(),"options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=s.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},a.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;n.prototype.resolve.call(this);for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return this},a.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution&&(e=this._edition||e,n.prototype._resolveFeaturesRecursive.call(this,e),this.methodsArray.forEach(t=>{t._resolveFeaturesRecursive(e)})),this},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof i?(this.methods[e.name]=e,e.parent=this,l(this)):n.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof i){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,l(this)}return n.prototype.remove.call(this,e)},a.prototype.create=function(e,t,r){for(var n,i=new o.Service(e,t,r),a=0;a<this.methodsArray.length;++a){var l=s.lcFirst((n=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");i[l]=s.codegen(["r","c"],s.isReserved(l)?l+"_":l)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return i}},153664,(e,t,r)=>{"use strict";
1t.exports=i;var n=e.r(130548);function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}i.create=function(e){return this.$type.create(e)},i.encode=function(e,t){return this.$type.encode(e,t)},i.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},i.decode=function(e){return this.$type.decode(e)},i.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},i.verify=function(e){return this.$type.verify(e)},i.fromObject=function(e){return this.$type.fromObject(e)},i.toObject=function(e,t){return this.$type.toObject(e,t)},i.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},514663,(e,t,r)=>{"use strict";t.exports=l;var n,i=e.r(130548),s=i.LongBits,o=i.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u="u">typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},c=function(){return i.Buffer?function(e){return(l.create=function(e){return i.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u};function h(){var e=new s(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function d(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new s(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}l.create=c(),l.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,l.prototype.uint32=function(){var e=0xffffffff;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return e}}(),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return d(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|d(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,r);if(t===r){var n=i.Buffer;return n?n.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,r)},l.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do if(this.pos>=this.len)throw a(this);while(128&this.buf[this.pos++])return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){n=e,l.create=c(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(l.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},872808,(e,t,r)=>{"use strict";
1t.exports=h;var n,i=e.r(130548),s=i.LongBits,o=i.base64,a=i.utf8;function l(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function u(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function h(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}var d=function(){return i.Buffer?function(){return(h.create=function(){return new n})()}:function(){return new h}};function f(e,t,r){t[r]=255&e}function p(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function m(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function v(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}h.create=d(),h.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(h.alloc=i.pool(h.alloc,i.Array.prototype.subarray)),h.prototype._push=function(e,t,r){return this.tail=this.tail.next=new l(e,t,r),this.len+=t,this},m.prototype=Object.create(l.prototype),m.prototype.fn=p,h.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new m((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<0x10000000?4:5,e)).len,this},h.prototype.int32=function(e){return e<0?this._push(g,10,s.fromNumber(e)):this.uint32(e)},h.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},h.prototype.uint64=function(e){var t=s.from(e);return this._push(g,t.length(),t)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(e){var t=s.from(e).zzEncode();return this._push(g,t.length(),t)},h.prototype.bool=function(e){return this._push(f,1,+!!e)},h.prototype.fixed32=function(e){return this._push(v,4,e>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(e){var t=s.from(e);return this._push(v,4,t.lo)._push(v,4,t.hi)},h.prototype.sfixed64=h.prototype.fixed64,h.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},h.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var y=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};h.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(i.isString(e)){var r=h.alloc(t=o.length(e));o.decode(e,r,0),e=r}return this.uint32(t)._push(y,t,e)},h.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,1,0)},h.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(u,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},h.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},h.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},h._configure=function(e){n=e,h.create=d(),n._configure()}},452048,(e,t,r)=>{"use strict";t.exports=a;var n=e.r(694428),i=e.r(23137),s=e.r(804884);function o(e){return"missing required '"+e.name+"'"}function a(e){for(var t=s.codegen(["r","l","e"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter(function(e){return e.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),r=0;r<e.fieldsArray.length;++r){var a=e._fieldsArray[r].resolve(),l=a.resolvedType instanceof n?"int32":a.type,u="m"+s.safeProp(a.name);t("case %i: {",a.id),a.map?(t("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==i.defaults[a.keyType]?t("k=%j",i.defaults[a.keyType]):t("k=null"),void 0!==i.defaults[l]?t("value=%j",i.defaults[l]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===i.basic[l]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",l),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==i.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',u):t("%s[k]=value",u)):a.repeated?(t("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==i.packed[l]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,l)("}else"),void 0===i.basic[l]?t(a.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4)))":"%s.push(types[%i].decode(r,r.uint32()))",u,r):t("%s.push(r.%s())",u,l)):void 0===i.basic[l]?t(a.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4))":"%s=types[%i].decode(r,r.uint32())",u,r):t("%s=r.%s()",u,l),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var c=e._fieldsArray[r];c.required&&t("if(!m.hasOwnProperty(%j))",c.name)("throw util.ProtocolError(%j,{instance:m})",o(c))}return t("return m")}},378183,(e,t,r)=>{"use strict";
1t.exports=l;var n=e.r(694428),i=e.r(804884);function s(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function o(e,t,r,i){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",i)("default:")("return%j",s(t,"enum value"));for(var o=Object.keys(t.resolvedType.values),a=0;a<o.length;++a)e("case %i:",t.resolvedType.values[o[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,i)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",s(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",s(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",s(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",s(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",s(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",s(t,"buffer"))}return e}function a(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",s(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",s(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",s(t,"boolean key"))}return e}function l(e){var t=i.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r=e.oneofsArray,n={};r.length&&t("var p={}");for(var l=0;l<e.fieldsArray.length;++l){var u=e._fieldsArray[l].resolve(),c="m"+i.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",c,u.name),u.map)t("if(!util.isObject(%s))",c)("return%j",s(u,"object"))("var k=Object.keys(%s)",c)("for(var i=0;i<k.length;++i){"),a(t,u,"k[i]"),o(t,u,l,c+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",c)("return%j",s(u,"array"))("for(var i=0;i<%s.length;++i){",c),o(t,u,l,c+"[i]")("}");else{if(u.partOf){var h=i.safeProp(u.partOf.name);1===n[u.partOf.name]&&t("if(p%s===1)",h)("return%j",u.partOf.name+": multiple values"),n[u.partOf.name]=1,t("p%s=1",h)}o(t,u,l,c)}u.optional&&t("}")}return t("return null")}},122275,(e,t,r)=>{"use strict";var n=r,i=e.r(694428),s=e.r(804884);function o(e,t,r,n){var s=!1;if(t.resolvedType)if(t.resolvedType instanceof i){e("switch(d%s){",n);for(var o=t.resolvedType.values,a=Object.keys(o),l=0;l<a.length;++l)o[a[l]]!==t.typeDefault||s||(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',n,n,n),t.repeated||e("break"),s=!0),e("case%j:",a[l])("case %i:",o[a[l]])("m%s=%j",n,o[a[l]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var u=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,u)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,u?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function a(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof i?e("d%s=o.enums===String?(types[%i].values[m
1%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,r,n,n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var s=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":s=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,s?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,r=s.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n<t.length;++n){var a=t[n].resolve(),l=s.safeProp(a.name);a.map?(r("if(d%s){",l)('if(typeof d%s!=="object")',l)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",l)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",l),o(r,a,n,l+"[ks[i]]")("}")("}")):a.repeated?(r("if(d%s){",l)("if(!Array.isArray(d%s))",l)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",l)("for(var i=0;i<d%s.length;++i){",l),o(r,a,n,l+"[i]")("}")("}")):(a.resolvedType instanceof i||r("if(d%s!=null){",l),o(r,a,n,l),a.resolvedType instanceof i||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(s.compareFieldsById);if(!t.length)return s.codegen()("return {}");for(var r=s.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],o=[],l=[],u=0;u<t.length;++u)t[u].partOf||(t[u].resolve().repeated?n:t[u].map?o:l).push(t[u]);if(n.length){for(r("if(o.arrays||o.defaults){"),u=0;u<n.length;++u)r("d%s=[]",s.safeProp(n[u].name));r("}")}if(o.length){for(r("if(o.objects||o.defaults){"),u=0;u<o.length;++u)r("d%s={}",s.safeProp(o[u].name));r("}")}if(l.length){for(r("if(o.defaults){"),u=0;u<l.length;++u){var c=l[u],h=s.safeProp(c.name);if(c.resolvedType instanceof i)r("d%s=o.enums===String?%j:%j",h,c.resolvedType.valuesById[c.typeDefault],c.typeDefault);else if(c.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",c.typeDefault.low,c.typeDefault.high,c.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",h)("}else")("d%s=o.longs===String?%j:%i",h,c.typeDefault.toString(),c.typeDefault.toNumber());else if(c.bytes){var d="["+Array.prototype.slice.call(c.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",h,String.fromCharCode.apply(String,c.typeDefault))("else{")("d%s=%s",h,d)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",h,h)("}")}else r("d%s=%j",h,c.typeDefault)}r("}")}var f=!1;for(u=0;u<t.length;++u){var c=t[u],p=e._fieldsArray.indexOf(c),h=s.safeProp(c.name);c.map?(f||(f=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",h,h)("d%s={}",h)("for(var j=0;j<ks2.length;++j){"),a(r,c,p,h+"[ks2[j]]")("}")):c.repeated?(r("if(m%s&&m%s.length){",h,h)("d%s=[]",h)("for(var j=0;j<m%s.length;++j){",h),a(r,c,p,h+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",h,c.name),a(r,c,p,h),c.partOf&&r("if(o.oneofs)")("d%s=%j",s.safeProp(c.partOf.name),c.name)),r("}")}return r("return d")}},66175,(e,t,r)=>{"use strict";var n=r,i=e.r(153664);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return -1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="type.googleapis.com/",n="",s="";if(t&&t.json&&e.type_url&&e.value){s=e.type_url.substring(e.type_url.lastIndexOf("/")+1),n=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var o=this.lookup(s);o&&(e=o.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof i){var a=e.$type.toObject(e,t),l="."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName;return""===n&&(n=r),s=n+l,a["@type"]=s,a}return this.toObject(e,t)}}},565618,(e,t,r)=>{"use strict";
1t.exports=y;var n=e.r(697287);((y.prototype=Object.create(n.prototype)).constructor=y).className="Type";var i=e.r(694428),s=e.r(938051),o=e.r(207931),a=e.r(138983),l=e.r(3415),u=e.r(153664),c=e.r(514663),h=e.r(872808),d=e.r(804884),f=e.r(981654),p=e.r(452048),m=e.r(378183),g=e.r(122275),v=e.r(66175);function y(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function b(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(y.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=d.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=d.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=y.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof u||((e.prototype=new u).constructor=e,d.merge(e.prototype,t)),e.$type=e.prototype.$type=this,d.merge(e,u,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:d.oneOfGetter(this._oneofsArray[r].oneof),set:d.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),y.generateConstructor=function(e){for(var t,r=d.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",d.safeProp(t.name)):t.repeated&&r("this%s=[]",d.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},y.fromJSON=function(e,t){var r=new y(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var u=Object.keys(t.fields),c=0;c<u.length;++c)r.add((void 0!==t.fields[u[c]].keyType?a.fromJSON:o.fromJSON)(u[c],t.fields[u[c]]));if(t.oneofs)for(u=Object.keys(t.oneofs),c=0;c<u.length;++c)r.add(s.fromJSON(u[c],t.oneofs[u[c]]));if(t.nested)for(u=Object.keys(t.nested),c=0;c<u.length;++c){var h=t.nested[u[c]];r.add((void 0!==h.id?o.fromJSON:void 0!==h.fields?y.fromJSON:void 0!==h.values?i.fromJSON:void 0!==h.methods?l.fromJSON:n.fromJSON)(u[c],h))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},y.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&!!e.keepComments;return d.toObject(["edition",this._editionToJSON(),"options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},y.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;n.prototype.resolveAll.call(this);var e=this.oneofsArray;for(r=0;r<e.length;)e[r++].resolve();for(var t=this.fieldsArray,r=0;r<t.length;)t[r++].resolve();return this},y.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution&&(e=this._edition||e,n.prototype._resolveFeaturesRecursive.call(this,e),this.oneofsArray.forEach(t=>{t._resolveFeatures(e)}),this.fieldsArray.forEach(t=>{t._resolveFeatures(e)})),this},y.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},y.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof o&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);
1if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),b(this)}return e instanceof s?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),b(this)):n.prototype.add.call(this,e)},y.prototype.remove=function(e){if(e instanceof o&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),b(this)}if(e instanceof s){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),b(this)}return n.prototype.remove.call(this,e)},y.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},y.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},y.prototype.create=function(e){return new this.ctor(e)},y.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=f(this)({Writer:h,types:t,util:d}),this.decode=p(this)({Reader:c,types:t,util:d}),this.verify=m(this)({types:t,util:d}),this.fromObject=g.fromObject(this)({types:t,util:d}),this.toObject=g.toObject(this)({types:t,util:d});var n=v[e];if(n){var i=Object.create(this);i.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(i),i.toObject=this.toObject,this.toObject=n.toObject.bind(i)}return this},y.prototype.encode=function(e,t){return this.setup().encode(e,t)},y.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},y.prototype.decode=function(e,t){return this.setup().decode(e,t)},y.prototype.decodeDelimited=function(e){return e instanceof c||(e=c.create(e)),this.decode(e,e.uint32())},y.prototype.verify=function(e){return this.setup().verify(e)},y.prototype.fromObject=function(e){return this.setup().fromObject(e)},y.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},y.d=function(e){return function(t){d.decorateType(t,e)}}},337391,(e,t,r)=>{"use strict";t.exports=h;var n,i,s,o=e.r(697287);((h.prototype=Object.create(o.prototype)).constructor=h).className="Root";var a=e.r(207931),l=e.r(694428),u=e.r(938051),c=e.r(804884);function h(e){o.call(this,"",e),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}function d(){}
1h.fromJSON=function(e,t){return t||(t=new h),e.options&&t.setOptions(e.options),t.addJSON(e.nested).resolveAll()},h.prototype.resolvePath=c.path.resolve,h.prototype.fetch=c.fetch,h.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var o=this;if(!n)return c.asPromise(e,o,t,r);var a=n===d;function l(e,t){if(n){if(a)throw e;t&&t.resolveAll();var r=n;n=null,r(e,t)}}function u(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in s)return r}return null}function h(e,t){try{if(c.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),c.isString(t)){i.filename=e;var n,s=i(t,o,r),h=0;if(s.imports)for(;h<s.imports.length;++h)(n=u(s.imports[h])||o.resolvePath(e,s.imports[h]))&&f(n);if(s.weakImports)for(h=0;h<s.weakImports.length;++h)(n=u(s.weakImports[h])||o.resolvePath(e,s.weakImports[h]))&&f(n,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){l(e)}a||p||l(null,o)}function f(e,t){if(e=u(e)||e,!(o.files.indexOf(e)>-1)){if(o.files.push(e),e in s)return void(a?h(e,s[e]):(++p,setTimeout(function(){--p,h(e,s[e])})));if(a){var r;try{r=c.fs.readFileSync(e).toString("utf8")}catch(e){t||l(e);return}h(e,r)}else++p,o.fetch(e,function(r,i){if(--p,n){if(r)return void(t?p||l(null,o):l(r));h(e,i)}})}}var p=0;c.isString(t)&&(t=[t]);for(var m,g=0;g<t.length;++g)(m=o.resolvePath("",t[g]))&&f(m);return a?o.resolveAll():p||l(null,o),o},h.prototype.loadSync=function(e,t){if(!c.isNode)throw Error("not supported");return this.load(e,t,d)},h.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function p(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return!!r.get(n.name)||(n.declaringField=t,t.extensionField=n,r.add(n),!0)}return!1}h.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||p(this,e)||this.deferred.push(e);else if(e instanceof l)f.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof u)){if(e instanceof n)for(var t=0;t<this.deferred.length;)p(this,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);f.test(e.name)&&(e.parent[e.name]=e)}(e instanceof n||e instanceof l||e instanceof a)&&(this._fullyQualifiedObjects[e.fullName]=e)},h.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof l)f.test(e.name)&&delete e.parent[e.name];else if(e instanceof o){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);f.test(e.name)&&delete e.parent[e.name]}delete this._fullyQualifiedObjects[e.fullName]},h._configure=function(e,t,r){n=e,i=t,s=r}},804884,(e,t,r)=>{"use strict";var n,i,s=t.exports=e.r(130548),o=e.r(875425);s.codegen=e.r(450317),s.fetch=e.r(695014),s.path=e.r(780799),s.fs=s.inquire("fs"),s.toArray=function(e){if(e){for(var t=Object.keys(e),r=Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},s.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],i=e[r++];void 0!==i&&(t[n]=i)}return t};var a=/\\/g,l=/"/g;s.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},s.safeProp=function(e){return!/^[$\w_]+$/.test(e)||s.isReserved(e)?'["'+e.replace(a,"\\\\").replace(l,'\\"')+'"]':"."+e},s.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var u=/_([a-z])/g;s.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(u,function(e,t){return t.toUpperCase()})},s.compareFieldsById=function(e,t){return e.id-t.id},s.decorateType=function(t,r){if(t.$type)return r&&t.$type.name!==r&&(s.decorateRoot.remove(t.$type),t.$type.name=r,s.decorateRoot.add(t.$type)),t.$type;n||(n=e.r(565618));var i=new n(r||t.name);return s.decorateRoot.add(i),i.ctor=t,Object.defineProperty(t,"$type",{value:i,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:i,enumerable:!1}),i};var c=0;s.decorateEnum=function(t){if(t.$type)return t.$type;i||(i=e.r(694428));var r=new i("Enum"+c++,t);return s.decorateRoot.add(r),Object.defineProperty(t,"$type",{value:r,enumerable:!1}),r},s.setProperty=function(e,t,r,n){function i(e,t,r){var s=t.shift();if("__proto__"===s||"prototype"===s)return e;if(t.length>0)e[s]=i(e[s]||{},t,r);else{var o=e[s];if(o&&n)return e;o&&(r=[].concat(o).concat(r)),e[s]=r}return e}if("object"!=typeof e)throw TypeError("dst must be an object");
1if(!t)throw TypeError("path must be specified");return i(e,t=t.split("."),r)},Object.defineProperty(s,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(e.r(337391)))}})},23137,(e,t,r)=>{"use strict";var n=r,i=e.r(804884),s=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(e,t){var r=0,n={};for(t|=0;r<e.length;)n[s[r+t]]=e[r++];return n}n.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",i.emptyArray,null]),n.long=o([0,0,0,1,1],7),n.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},207931,(e,t,r)=>{"use strict";t.exports=u;var n,i=e.r(298399);((u.prototype=Object.create(i.prototype)).constructor=u).className="Field";var s=e.r(694428),o=e.r(23137),a=e.r(804884),l=/^required|optional|repeated$/;function u(e,t,r,n,s,u,c){if(a.isObject(n)?(c=s,u=n,n=s=void 0):a.isObject(s)&&(c=u,u=s,s=void 0),i.call(this,e,u),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(r))throw TypeError("type must be a string");if(void 0!==n&&!l.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==s&&!a.isString(s))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=r,this.id=t,this.extend=s||void 0,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==o.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=c}u.fromJSON=function(e,t){var r=new u(e,t.id,t.type,t.rule,t.extend,t.options,t.comment);return t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},Object.defineProperty(u.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this._features.field_presence}}),Object.defineProperty(u.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(u.prototype,"delimited",{get:function(){return this.resolvedType instanceof n&&"DELIMITED"===this._features.message_encoding}}),Object.defineProperty(u.prototype,"packed",{get:function(){return"PACKED"===this._features.repeated_field_encoding}}),Object.defineProperty(u.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this._features.field_presence)}}),u.prototype.setOption=function(e,t,r){return i.prototype.setOption.call(this,e,t,r)},u.prototype.toJSON=function(e){var t=!!e&&!!e.keepComments;return a.toObject(["edition",this._editionToJSON(),"rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof s&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof s||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),i.prototype.resolve.call(this)},u.prototype._inferLegacyProtoFeatures=function(e){if("proto2"!==e&&"proto3"!==e)return{};var t={};if("required"===this.rule&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&void 0===o.defaults[this.type]){var r=this.parent.get(this.type.split(".").pop());r&&r instanceof n&&r.group&&(t.message_encoding="DELIMITED")}return!0===this.getOption("packed")?t.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(t.repeated_field_encoding="EXPANDED"),t},u.prototype._resolveFeatures=function(e){return i.prototype._resolveFeatures.call(this,this._edition||e)},u.d=function(e,t,r,n){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(i,s){a.decorateType(i.constructor).add(new u(s,e,t,r,{default:n}))}},u._configure=function(e){n=e}},938051,(e,t,r)=>{"use strict";
1t.exports=o;var n=e.r(298399);((o.prototype=Object.create(n.prototype)).constructor=o).className="OneOf";var i=e.r(207931),s=e.r(804884);function o(e,t,r,i){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),!(void 0===t||Array.isArray(t)))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=i}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}o.fromJSON=function(e,t){return new o(e,t.oneof,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&!!e.keepComments;return s.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},o.prototype.add=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},o.prototype.remove=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},o.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=this,r=0;r<this.oneof.length;++r){var i=e.get(this.oneof[r]);i&&!i.partOf&&(i.partOf=t,t.fieldsArray.push(i))}a(this)},o.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},Object.defineProperty(o.prototype,"isProto3Optional",{get:function(){if(null==this.fieldsArray||1!==this.fieldsArray.length)return!1;var e=this.fieldsArray[0];return null!=e.options&&!0===e.options.proto3_optional}}),o.d=function(){for(var e=Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){s.decorateType(t.constructor).add(new o(r,e)),Object.defineProperty(t,r,{get:s.oneOfGetter(e),set:s.oneOfSetter(e)})}}},298399,(e,t,r)=>{"use strict";t.exports=c,c.className="ReflectionObject";let n=e.r(938051);var i,s=e.r(804884),o={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE2024",default_symbol_visibility:"EXPORT_TOP_LEVEL"},a={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},l={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},u={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"};function c(e,t){if(!s.isString(e))throw TypeError("name must be a string");if(t&&!s.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(c.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),c.prototype.toJSON=function(){throw Error()},c.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof i&&t._handleAdd(this)},c.prototype.onRemove=function(e){var t=e.root;t instanceof i&&t._handleRemove(this),this.parent=null,this.resolved=!1},c.prototype.resolve=function(){return this.resolved||this.root instanceof i&&(this.resolved=!0),this},c.prototype._resolveFeaturesRecursive=function(e){return this._resolveFeatures(this._edition||e)},c.prototype._resolveFeatures=function(e){if(!this._featuresResolved){var t={};if(!e)throw Error("Unknown edition for "+this.fullName);var r=Object.assign(this.options?Object.assign({},this.options.features):{},this._inferLegacyProtoFeatures(e));if(this._edition){if("proto2"===e)t=Object.assign({},l);else if("proto3"===e)t=Object.assign({},u);else if("2023"===e)t=Object.assign({},a);else if("2024"===e)t=Object.assign({},o);else throw Error("Unknown edition: "+e);this._features=Object.assign(t,r||{}),this._featuresResolved=!0;return}if(this.partOf instanceof n){var i=Object.assign({},this.partOf._features);this._features=Object.assign(i,r||{})}else if(this.declaringField);else if(this.parent){var s=Object.assign({},this.parent._features);this._features=Object.assign(s,r||{})}else throw Error("Unable to find a parent for "+this.fullName);this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},c.prototype._inferLegacyProtoFeatures=function(){return{}},c.prototype.getOption=function(e){if(this.options)return this.options[e]},c.prototype.setOption=function(e,t,r){return this.options||(this.options={}),/^features\./.test(e)?s.setProperty(this.options,e,t,r):r&&void 0!==this.options[e]||(this.getOption(e)!==t&&(this.resolved=!1),this.options[e]=t),this},c.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var i=n.find(function(t){return Object.prototype.hasOwnProperty.call(t,e)});if(i){var o=i[e];s.setProperty(o,r,t)}else(i={})[e]=s.setProperty({},r,t),n.push(i)}else{var a={};a[e]=t,n.push(a)}return this},c.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},c.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},c.prototype._editionToJSON=function(){if(this._edition&&"proto3"!==this._edition)return this._edition},c._configure=function(e){i=e}},694428,(e,t,r)=>{"use strict";
1t.exports=o;var n=e.r(298399);((o.prototype=Object.create(n.prototype)).constructor=o).className="Enum";var i=e.r(697287),s=e.r(804884);function o(e,t,r,i,s,o){if(n.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=i,this.comments=s||{},this.valuesOptions=o,this._valuesFeatures={},this.reserved=void 0,t)for(var a=Object.keys(t),l=0;l<a.length;++l)"number"==typeof t[a[l]]&&(this.valuesById[this.values[a[l]]=t[a[l]]]=a[l])}o.prototype._resolveFeatures=function(e){return e=this._edition||e,n.prototype._resolveFeatures.call(this,e),Object.keys(this.values).forEach(e=>{var t=Object.assign({},this._features);this._valuesFeatures[e]=Object.assign(t,this.valuesOptions&&this.valuesOptions[e]&&this.valuesOptions[e].features)}),this},o.fromJSON=function(e,t){var r=new o(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},o.prototype.toJSON=function(e){var t=!!e&&!!e.keepComments;return s.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},o.prototype.add=function(e,t,r,n){if(!s.isString(e))throw TypeError("name must be a string");if(!s.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=r||null,this},o.prototype.remove=function(e){if(!s.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this},o.prototype.isReservedId=function(e){return i.isReservedId(this.reserved,e)},o.prototype.isReservedName=function(e){return i.isReservedName(this.reserved,e)}},981654,(e,t,r)=>{"use strict";t.exports=a;var n=e.r(694428),i=e.r(23137),s=e.r(804884);function o(e,t,r,n){return t.delimited?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function a(e){for(var t,r,a=s.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),l=e.fieldsArray.slice().sort(s.compareFieldsById),t=0;t<l.length;++t){var u=l[t].resolve(),c=e._fieldsArray.indexOf(u),h=u.resolvedType instanceof n?"int32":u.type,d=i.basic[h];r="m"+s.safeProp(u.name),u.map?(a("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",r,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",r)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|i.mapKey[u.keyType],u.keyType),void 0===d?a("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",c,r):a(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|d,h,r),a("}")("}")):u.repeated?(a("if(%s!=null&&%s.length){",r,r),u.packed&&void 0!==i.packed[h]?a("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",r)("w.%s(%s[i])",h,r)("w.ldelim()"):(a("for(var i=0;i<%s.length;++i)",r),void 0===d?o(a,u,c,r+"[i]"):a("w.uint32(%i).%s(%s[i])",(u.id<<3|d)>>>0,h,r)),a("}")):(u.optional&&a("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",r,u.name),void 0===d?o(a,u,c,r):a("w.uint32(%i).%s(%s)",(u.id<<3|d)>>>0,h,r))}return a("return w")}},200540,(e,t,r)=>{"use strict";t.exports=s;var n=e.r(872808);(s.prototype=Object.create(n.prototype)).constructor=s;var i=e.r(130548);function s(){n.call(this)}function o(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}
1s._configure=function(){s.alloc=i._Buffer_allocUnsafe,s.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},s.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(s.writeBytesBuffer,t,e),this},s.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(o,t,e),this},s._configure()},300704,(e,t,r)=>{"use strict";t.exports=s;var n=e.r(514663);(s.prototype=Object.create(n.prototype)).constructor=s;var i=e.r(130548);function s(e){n.call(this,e)}s._configure=function(){i.Buffer&&(s.prototype._slice=i.Buffer.prototype.slice)},s.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},s._configure()},938454,(e,t,r)=>{"use strict";var n=r;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=e.r(872808),n.BufferWriter=e.r(200540),n.Reader=e.r(514663),n.BufferReader=e.r(300704),n.util=e.r(130548),n.rpc=e.r(662405),n.roots=e.r(875425),n.configure=i,i()},20067,(e,t,r)=>{"use strict";var n=t.exports=e.r(938454);function i(e,t,r){return"function"==typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)}function s(e,t){return t||(t=new n.Root),t.loadSync(e)}n.build="light",n.load=i,n.loadSync=s,n.encoder=e.r(981654),n.decoder=e.r(452048),n.verifier=e.r(378183),n.converter=e.r(122275),n.ReflectionObject=e.r(298399),n.Namespace=e.r(697287),n.Root=e.r(337391),n.Enum=e.r(694428),n.Type=e.r(565618),n.Field=e.r(207931),n.OneOf=e.r(938051),n.MapField=e.r(138983),n.Service=e.r(3415),n.Method=e.r(265942),n.Message=e.r(153664),n.wrappers=e.r(66175),n.types=e.r(23137),n.util=e.r(804884),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},970127,(e,t,r)=>{"use strict";t.exports=f;var n=/[\s{}=;:[\],'"()<>]/g,i=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,s=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,o=/^ *[*/]+ */,a=/^\s*\*?\/*/,l=/\n/g,u=/\s/,c=/\\(.?)/g,h={0:"\0",r:"\r",n:"\n",t:"	"};function d(e){return e.replace(c,function(e,t){switch(t){case"\\":case"":return t;default:return h[t]||""}})}function f(e,t){e=e.toString();var r=0,c=e.length,h=1,f=0,p={},m=[],g=null;function v(e){return Error("illegal "+e+" (line "+h+")")}function y(){var t="'"===g?s:i;t.lastIndex=r-1;var n=t.exec(e);if(!n)throw v("string");return r=t.lastIndex,M(g),g=null,d(n[1])}function b(t){return e.charAt(t)}function w(r,n,i){var s,u={type:e.charAt(r++),lineEmpty:!1,leading:i},c=r-(t?2:3);do if(--c<0||"\n"===(s=e.charAt(c))){u.lineEmpty=!0;break}while(" "===s||"	"===s)for(var d=e.substring(r,n).split(l),m=0;m<d.length;++m)d[m]=d[m].replace(t?a:o,"").trim();u.text=d.join("\n").trim(),p[h]=u,f=h}function x(t){var r=S(t),n=e.substring(t,r);return/^\s*\/\//.test(n)}function S(e){for(var t=e;t<c&&"\n"!==b(t);)t++;return t}function _(){if(m.length>0)return m.shift();if(g)return y();var i,s,o,a,l,d=0===r;do{if(r===c)return null;for(i=!1;u.test(o=b(r));)if("\n"===o&&(d=!0,++h),++r===c)return null;if("/"===b(r)){if(++r===c)throw v("comment");
1if("/"===b(r))if(t){if(a=r,l=!1,x(r-1)){l=!0;do if((r=S(r))===c||(r++,!d))break;while(x(r))}else r=Math.min(c,S(r)+1);l&&(w(a,r,d),d=!0),h++,i=!0}else{for(l="/"===b(a=r+1);"\n"!==b(++r);)if(r===c)return null;++r,l&&(w(a,r-1,d),d=!0),++h,i=!0}else{if("*"!==(o=b(r)))return"/";a=r+1,l=t||"*"===b(a);do{if("\n"===o&&++h,++r===c)throw v("comment");s=o,o=b(r)}while("*"!==s||"/"!==o)++r,l&&(w(a,r-2,d),d=!0),i=!0}}}while(i)var f=r;if(n.lastIndex=0,!n.test(b(f++)))for(;f<c&&!n.test(b(f));)++f;var p=e.substring(r,r=f);return('"'===p||"'"===p)&&(g=p),p}function M(e){m.push(e)}function O(){if(!m.length){var e=_();if(null===e)return null;M(e)}return m[0]}function E(e,t){var r=O();if(r===e)return _(),!0;if(!t)throw v("token '"+r+"', '"+e+"' expected");return!1}function P(e){var r,n=null;return void 0===e?(r=p[h-1],delete p[h-1],r&&(t||"*"===r.type||r.lineEmpty)&&(n=r.leading?r.text:null)):(f<e&&O(),r=p[e],delete p[e],r&&!r.lineEmpty&&(t||"/"===r.type)&&(n=r.leading?null:r.text)),n}return Object.defineProperty({next:_,peek:O,push:M,skip:E,cmnt:P},"line",{get:function(){return h}})}f.unescape=d},984301,(e,t,r)=>{"use strict";t.exports=M,M.filename=null,M.defaults={keepCase:!1};var n=e.r(970127),i=e.r(337391),s=e.r(565618),o=e.r(207931),a=e.r(138983),l=e.r(938051),u=e.r(694428),c=e.r(3415),h=e.r(265942),d=e.r(298399),f=e.r(23137),p=e.r(804884),m=/^[1-9][0-9]*$/,g=/^-?[1-9][0-9]*$/,v=/^0[x][0-9a-fA-F]+$/,y=/^-?0[x][0-9a-fA-F]+$/,b=/^0[0-7]+$/,w=/^-?0[0-7]+$/,x=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,S=/^[a-zA-Z_][a-zA-Z_0-9]*$/,_=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;function M(e,t,r){t instanceof i||(r=t,t=new i),r||(r=M.defaults);var O,E,P,k,A=r.preferTrailingComment||!1,j=n(e,r.alternateCommentMode||!1),C=j.next,N=j.push,T=j.peek,R=j.skip,I=j.cmnt,D=!0,L="proto2",V=t,z=[],F={},B=r.keepCase?function(e){return e}:p.camelCase;function $(){z.forEach(e=>{e._edition=L,Object.keys(F).forEach(t=>{void 0===e.getOption(t)&&e.setOption(t,F[t],!0)})})}function U(e,t,r){var n=M.filename;return r||(M.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+j.line+")")}function W(){var e,t=[];do{if('"'!==(e=C())&&"'"!==e)throw U(e);t.push(C()),R(e),e=T()}while('"'===e||"'"===e)return t.join("")}function H(e){var t=C();switch(t){case"'":case'"':return N(t),W();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return Y(t,!0)}catch(r){if(e&&_.test(t))return t;throw U(t,"value")}}function K(e,t){do if(t&&('"'===(r=T())||"'"===r)){var r,n,i=W();if(e.push(i),L>=2023)throw U(i,"id")}else try{e.push([n=q(C()),R("to",!0)?q(C()):n])}catch(n){if(t&&_.test(r)&&L>=2023)e.push(r);else throw n}while(R(",",!0))var s={options:void 0};s.setOption=function(e,t){void 0===this.options&&(this.options={}),this.options[e]=t},ee(s,function(e){if("option"===e)el(s,e),R(";");else throw U(e)},function(){ed(s)})}function Y(e,t){var r=1;switch("-"===e.charAt(0)&&(r=-1,e=e.substring(1)),e){case"inf":case"INF":case"Inf":return 1/0*r;case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(m.test(e))return r*parseInt(e,10);if(v.test(e))return r*parseInt(e,16);if(b.test(e))return r*parseInt(e,8);if(x.test(e))return r*parseFloat(e);throw U(e,"number",t)}function q(e,t){switch(e){case"max":case"MAX":case"Max":return 0x1fffffff;case"0":return 0}if(!t&&"-"===e.charAt(0))throw U(e,"id");if(g.test(e))return parseInt(e,10);if(y.test(e))return parseInt(e,16);if(w.test(e))return parseInt(e,8);throw U(e,"id")}function G(){if(void 0!==E)throw U("package");if(E=C(),!_.test(E))throw U(E,"name");V=V.define(E),R(";")}function J(){var e,t=T();switch(t){case"option":if(L<"2024")throw U("option");C(),W(),R(";");return;case"weak":e=k||(k=[]),C();break;case"public":C();default:e=P||(P=[])}t=W(),R(";"),e.push(t)}function X(){if(R("="),(L=W())<2023)throw U(L,"syntax");R(";")}function Q(){if(R("="),!["2023","2024"].includes(L=W()))throw U(L,"edition");R(";")}function Z(e,t){switch(t){case"option":return el(e,t),R(";"),!0;case"message":return et(e,t),!0;case"enum":return eo(e,t),!0;case"export":case"local":if(L<"2024"||"export"===(t=C())||"local"===t||"message"!==t&&"enum"!==t)break;return Z(e,t);
1case"service":return ef(e,t),!0;case"extend":return em(e,t),!0}return!1}function ee(e,t,r){var n,i=j.line;if(e&&("string"!=typeof e.comment&&(e.comment=I()),e.filename=M.filename),R("{",!0)){for(;"}"!==(n=C());)t(n);R(";",!0)}else r&&r(),R(";"),e&&("string"!=typeof e.comment||A)&&(e.comment=I(i)||e.comment)}function et(e,t){if(!S.test(t=C()))throw U(t,"type name");var r=new s(t);ee(r,function(e){if(!Z(r,e))switch(e){case"map":ei(r,e);break;case"required":if("proto2"!==L)throw U(e);case"repeated":er(r,e);break;case"optional":if("proto3"===L)er(r,"proto3_optional");else if("proto2"!==L)throw U(e);else er(r,"optional");break;case"oneof":es(r,e);break;case"extensions":K(r.extensions||(r.extensions=[]));break;case"reserved":K(r.reserved||(r.reserved=[]),!0);break;default:if("proto2"===L||!_.test(e))throw U(e);N(e),er(r,"optional")}}),e.add(r),e===V&&z.push(r)}function er(e,t,r){var n=C();if("group"===n)return void en(e,t);for(;n.endsWith(".")||T().startsWith(".");)n+=C();if(!_.test(n))throw U(n,"type");var i=C();if(!S.test(i))throw U(i,"name");i=B(i),R("=");var s=new o(i,q(C()),n,t,r);if(ee(s,function(e){if("option"===e)el(s,e),R(";");else throw U(e)},function(){ed(s)}),"proto3_optional"===t){var a=new l("_"+i);s.setOption("proto3_optional",!0),a.add(s),e.add(a)}else e.add(s);e===V&&z.push(s)}function en(e,t){if(L>=2023)throw U("group");var r=C();if(!S.test(r))throw U(r,"name");var n=p.lcFirst(r);r===n&&(r=p.ucFirst(r)),R("=");var i=q(C()),a=new s(r);a.group=!0;var l=new o(n,i,r,t);l.filename=M.filename,ee(a,function(e){switch(e){case"option":el(a,e),R(";");break;case"required":case"repeated":er(a,e);break;case"optional":"proto3"===L?er(a,"proto3_optional"):er(a,"optional");break;case"message":et(a,e);break;case"enum":eo(a,e);break;case"reserved":K(a.reserved||(a.reserved=[]),!0);break;case"export":case"local":if(L<"2024")throw U(e);switch(e=C()){case"message":case"enum":et(a,e);break;default:throw U(e)}break;default:throw U(e)}}),e.add(a).add(l)}function ei(e){R("<");var t=C();if(void 0===f.mapKey[t])throw U(t,"type");R(",");var r=C();if(!_.test(r))throw U(r,"type");R(">");var n=C();if(!S.test(n))throw U(n,"name");R("=");var i=new a(B(n),q(C()),t,r);ee(i,function(e){if("option"===e)el(i,e),R(";");else throw U(e)},function(){ed(i)}),e.add(i)}function es(e,t){if(!S.test(t=C()))throw U(t,"name");var r=new l(B(t));ee(r,function(e){"option"===e?(el(r,e),R(";")):(N(e),er(r,"optional"))}),e.add(r)}function eo(e,t){if(!S.test(t=C()))throw U(t,"name");var r=new u(t);ee(r,function(e){switch(e){case"option":el(r,e),R(";");break;case"reserved":K(r.reserved||(r.reserved=[]),!0),void 0===r.reserved&&(r.reserved=[]);break;default:ea(r,e)}}),e.add(r),e===V&&z.push(r)}function ea(e,t){if(!S.test(t))throw U(t,"name");R("=");var r=q(C(),!0),n={options:void 0};n.getOption=function(e){return this.options[e]},n.setOption=function(e,t){d.prototype.setOption.call(n,e,t)},n.setParsedOption=function(){},ee(n,function(e){if("option"===e)el(n,e),R(";");else throw U(e)},function(){ed(n)}),e.add(t,r,n.comment,n.parsedOptions||n.options)}function el(e,t){var r,n,i=!0;for("option"===t&&(t=C());"="!==t;){if("("===t){var s=C();R(")"),t="("+s+")"}if(i){if(i=!1,t.includes(".")&&!t.includes("(")){var o=t.split(".");r=o[0]+".",t=o[1];continue}r=t}else n=n?n+=t:t;t=C()}var a=eu(e,n?r.concat(n):r);n=n&&"."===n[0]?n.slice(1):n,eh(e,r=r&&"."===r[r.length-1]?r.slice(0,-1):r,a,n)}function eu(e,t){if(R("{",!0)){for(var r={};!R("}",!0);){if(!S.test(O=C()))throw U(O,"name");if(null===O)throw U(O,"end of input");var n,i,s=O;if(R(":",!0),"{"===T())n=eu(e,t+"."+O);else if("["===T()){if(n=[],R("[",!0)){do i=H(!0),n.push(i);while(R(",",!0))R("]"),void 0!==i&&ec(e,t+"."+O,i)}}else n=H(!0),ec(e,t+"."+O,n);var o=r[s];o&&(n=[].concat(o).concat(n)),r[s]=n,R(",",!0),R(";",!0)}return r}var a=H(!0);return ec(e,t,a),a}function ec(e,t,r){if(V===e&&/^features\./.test(t)){F[t]=r;return}e.setOption&&e.setOption(t,r)}function eh(e,t,r,n){e.setParsedOption&&e.setParsedOption(t,r,n)}function ed(e){if(R("[",!0)){do el(e,"option");while(R(",",!0))R("]")}return e}function ef(e,t){if(!S.test(t=C()))throw U(t,"service name");var r=new c(t);ee(r,function(e){if(!Z(r,e))if("rpc"===e)ep(r,e);else throw U(e)}),e.add(r),e===V&&z.push(r)}function ep(e,t){var r=I(),n=t;if(!S.test(t=C()))throw U(t,"name");var i,s,o,a,l=t;if(R("("),R("stream",!0)&&(s=!0),!_.test(t=C())||(i=t,R(")"),R("returns"),R("("),R("stream",!0)&&(a=!0),!_.test(t=C())))throw U(t);o=t,R(")");var u=new h(l,n,i,o,s,a);u.comment=r,ee(u,function(e){if("option"===e)el(u,e),R(";");else throw U(e)}),e.add(u)}function em(e,t){if(!_.test(t=C()))throw U(t,"reference");var r=t;ee(null,function(t){switch(t){case"required":case"repeated":er(e,t,r);break;case"optional":"proto3"===L?er(e,"proto3_optional",r):er(e,"optional",r);break;default:if("proto2"===L||!_.test(t))throw U(t);N(t),er(e,"optional",r)}})}for(;null!==(O=C());)switch(O){case"package":if(!D)throw U(O);G();break;case"import":if(!D)throw U(O);J();break;case"syntax":if(!D)throw U(O);X();break;case"edition":if(!D)throw U(O);Q();break;case"option":el(V,O),R(";",!0);break;default:if(Z(V,O)){D=!1;continue}throw U(O)}return $(),M.filename=null,{package:E,imports:P,weakImports:k,root:t}}},912342,(e,t,r)=>{"use strict";
1t.exports=s;var n,i=/\/|\./;function s(e,t){i.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),s[e]=t}s("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),s("duration",{Duration:n={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),s("timestamp",{Timestamp:n}),s("empty",{Empty:{fields:{}}}),s("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),s("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),s("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),s.get=function(e){return s[e]||null}},439499,(e,t,r)=>{"use strict";var n=t.exports=e.r(20067);n.build="full",n.tokenize=e.r(970127),n.parse=e.r(984301),n.common=e.r(912342),n.Root._configure(n.Type,n.parse,n.common)},19809,(e,t,r)=>{"use strict";t.exports=e.r(439499)},23616,(e,t,r)=>{!function(r){"use strict";function n(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t){return e<<t|e>>>32-t}function s(e,t,r,s,o,a){return n(i(n(n(t,e),n(s,a)),o),r)}function o(e,t,r,n,i,o,a){return s(t&r|~t&n,e,t,i,o,a)}function a(e,t,r,n,i,o,a){return s(t&n|r&~n,e,t,i,o,a)}function l(e,t,r,n,i,o,a){return s(t^r^n,e,t,i,o,a)}function u(e,t,r,n,i,o,a){return s(r^(t|~n),e,t,i,o,a)}function c(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;var r,i,s,c,h,d=0x67452301,f=-0x10325477,p=-0x67452302,m=0x10325476;for(r=0;r<e.length;r+=16)i=d,s=f,c=p,h=m,d=o(d,f,p,m,e[r],7,-0x28955b88),m=o(m,d,f,p,e[r+1],12,-0x173848aa),p=o(p,m,d,f,e[r+2],17,0x242070db),f=o(f,p,m,d,e[r+3],22,-0x3e423112),d=o(d,f,p,m,e[r+4],7,-0xa83f051),m=o(m,d,f,p,e[r+5],12,0x4787c62a),p=o(p,m,d,f,e[r+6],17,-0x57cfb9ed),f=o(f,p,m,d,e[r+7],22,-0x2b96aff),d=o(d,f,p,m,e[r+8],7,0x698098d8),m=o(m,d,f,p,e[r+9],12,-0x74bb0851),p=o(p,m,d,f,e[r+10],17,-42063),f=o(f,p,m,d,e[r+11],22,-0x76a32842),d=o(d,f,p,m,e[r+12],7,0x6b901122),m=o(m,d,f,p,e[r+13],12,-0x2678e6d),p=o(p,m,d,f,e[r+14],17,-0x5986bc72),f=o(f,p,m,d,e[r+15],22,0x49b40821),d=a(d,f,p,m,e[r+1],5,-0x9e1da9e),m=a(m,d,f,p,e[r+6],9,-0x3fbf4cc0),p=a(p,m,d,f,e[r+11],14,0x265e5a51),f=a(f,p,m,d,e[r],20,-0x16493856),d=a(d,f,p,m,e[r+5],5,-0x29d0efa3),m=a(m,d,f,p,e[r+10],9,0x2441453),p=a(p,m,d,f,e[r+15],14,-0x275e197f),f=a(f,p,m,d,e[r+4],20,-0x182c0438),d=a(d,f,p,m,e[r+9],5,0x21e1cde6),m=a(m,d,f,p,e[r+14],9,-0x3cc8f82a),p=a(p,m,d,f,e[r+3],14,-0xb2af279),f=a(f,p,m,d,e[r+8],20,0x455a14ed),d=a(d,f,p,m,e[r+13],5,-0x561c16fb),m=a(m,d,f,p,e[r+2],9,-0x3105c08),p=a(p,m,d,f,e[r+7],14,0x676f02d9),f=a(f,p,m,d,e[r+12],20,-0x72d5b376),d=l(d,f,p,m,e[r+5],4,-378558),m=l(m,d,f,p,e[r+8],11,-0x788e097f),p=l(p,m,d,f,e[r+11],16,0x6d9d6122),f=l(f,p,m,d,e[r+14],23,-0x21ac7f4),d=l(d,f,p,m,e[r+1],4,-0x5b4115bc),m=l(m,d,f,p,e[r+4],11,0x4bdecfa9),p=l(p,m,d,f,e[r+7],16,-0x944b4a0),f=l(f,p,m,d,e[r+10],23,-0x41404390),d=l(d,f,p,m,e[r+13],4,0x289b7ec6),m=l(m,d,f,p,e[r],11,-0x155ed806),p=l(p,m,d,f,e[r+3],16,-0x2b10cf7b),f=l(f,p,m,d,e[r+6],23,0x4881d05),d=l(d,f,p,m,e[r+9],4,-0x262b2fc7),m=l(m,d,f,p,e[r+12],11,-0x1924661b),p=l(p,m,d,f,e[r+15],16,0x1fa27cf8),f=l(f,p,m,d,e[r+2],23,-0x3b53a99b),d=u(d,f,p,m,e[r],6,-0xbd6ddbc),m=u(m,d,f,p,e[r+7],10,0x432aff97),p=u(p,m,d,f,e[r+14],15,-0x546bdc59),f=u(f,p,m,d,e[r+5],21,-0x36c5fc7),d=u(d,f,p,m,e[r+12],6,0x655b59c3),m=u(m,d,f,p,e[r+3],10,-0x70f3336e),p=u(p,m,d,f,e[r+10],15,-1051523),f=u(f,p,m,d,e[r+1],21,-0x7a7ba22f),d=u(d,f,p,m,e[r+8],6,0x6fa87e4f),m=u(m,d,f,p,e[r+15],10,-0x1d31920),p=u(p,m,d,f,e[r+6],15,-0x5cfebcec),f=u(f,p,m,d,e[r+13],21,0x4e0811a1),d=u(d,f,p,m,e[r+4],6,-0x8ac817e),m=u(m,d,f,p,e[r+11],10,-0x42c50dcb),p=u(p,m,d,f,e[r+2],15,0x2ad7d2bb),f=u(f,p,m,d,e[r+9],21,-0x14792c6f),d=n(d,i),f=n(f,s),p=n(p,c),m=n(m,h);return[d,f,p,m]}function h(e){var t,r="",n=32*e.length;for(t=0;t<n;t+=8)r+=String.fromCharCode(e[t>>5]>>>t%32&255);return r}function d(e){var t,r=[];for(t=0,r[(e.length>>2)-1]=void 0;t<r.length;t+=1)r[t]=0;var n=8*e.length;for(t=0;t<n;t+=8)r[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return r}function f(e){return h(c(d(e),8*e.length))}function p(e,t){var r,n,i=d(e),s=[],o=[];for(s[15]=o[15]=void 0,i.length>16&&(i=c(i,8*e.length)),r=0;r<16;r+=1)s[r]=0x36363636^i[r],o[r]=0x5c5c5c5c^i[r];return n=c(s.concat(d(t)),512+8*t.length),h(c(o.concat(n),640))}function m(e){var t,r,n="0123456789abcdef",i="";for(r=0;r<e.length;r+=1)i+=n.charAt((t=e.charCodeAt(r))>>>4&15)+n.charAt(15&t);return i}function g(e){return unescape(encodeURIComponent(e))}function v(e){return f(g(e))}function y(e){return m(v(e))}function b(e,t){return p(g(e),g(t))}function w(e,t){return m(b(e,t))}function x(e,t,r){return t?r?b(t,e):w(t,e):r?v(e):y(e)}if("function"==typeof define&&define.amd){let t;e.r,void 0!==(t=x)&&e.v(t)}
1else t.exports?t.exports=x:r.md5=x}(e.e)},927840,(e,t,r)=>{!function(e,r){t.exports=r()}(e.e,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,o={},a=function(e){return(e*=1)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e||"Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),r=60*t[1]+(+t[2]||0);return 0===r?0:"+"===t[0]?-r:r}(e)}],c=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},h=function(e,t){var r,n=o.meridiem;if(n){for(var i=1;i<=24;i+=1)if(e.indexOf(n(i,0,t))>-1){r=i>12;break}}else r=e===(t?"pm":"PM");return r},d={A:[s,function(e){this.afternoon=h(e,!1)}],a:[s,function(e){this.afternoon=h(e,!0)}],Q:[r,function(e){this.month=3*(e-1)+1}],S:[r,function(e){this.milliseconds=100*e}],SS:[n,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[n,l("day")],Do:[s,function(e){var t=o.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],w:[i,l("week")],ww:[n,l("week")],M:[i,l("month")],MM:[n,l("month")],MMM:[s,function(e){var t=c("months"),r=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(r<1)throw Error();this.month=r%12||r}],MMMM:[s,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(e){this.year=a(e)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function f(r){var n,i;n=r,i=o&&o.formats;for(var s=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,r,n){var s=n&&n.toUpperCase();return r||i[n]||e[n]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})})).match(t),a=s.length,l=0;l<a;l+=1){var u=s[l],c=d[u],h=c&&c[0],f=c&&c[1];s[l]=f?{regex:h,parser:f}:u.replace(/^\[|\]$/g,"")}return function(e){for(var t={},r=0,n=0;r<a;r+=1){var i=s[r];if("string"==typeof i)n+=i.length;else{var o=i.regex,l=i.parser,u=e.slice(n),c=o.exec(u)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var r=e.hours;t?r<12&&(e.hours+=12):12===r&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,r){r.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var n=t.prototype,i=n.parse;n.parse=function(e){var t=e.date,n=e.utc,s=e.args;this.$u=n;var a=s[1];if("string"==typeof a){var l=!0===s[2],u=!0===s[3],c=l||u,h=s[2];u&&(h=s[2]),o=this.$locale(),!l&&h&&(o=r.Ls[h]),this.$d=function(e,t,r,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=f(t)(e),s=i.year,o=i.month,a=i.day,l=i.hours,u=i.minutes,c=i.seconds,h=i.milliseconds,d=i.zone,p=i.week,m=new Date,g=a||(s||o?1:m.getDate()),v=s||m.getFullYear(),y=0;s&&!o||(y=o>0?o-1:m.getMonth());var b,w=l||0,x=u||0,S=c||0,_=h||0;return d?new Date(Date.UTC(v,y,g,w,x,S,_+60*d.offset*1e3)):r?new Date(Date.UTC(v,y,g,w,x,S,_)):(b=new Date(v,y,g,w,x,S,_),p&&(b=n(b).week(p).toDate()),b)}catch(e){return new Date("")}}(t,a,n,r),this.init(),h&&!0!==h&&(this.$L=this.locale(h).$L),c&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var d=a.length,p=1;p<=d;p+=1){s[1]=a[p-1];var m=r.apply(this,s);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}p===d&&(this.$d=new Date(""))}else i.call(this,e)}}})},125955,(e,t,r)=>{!function(e,r){t.exports=r()}(e.e,function(){"use strict";var e="month",t="quarter";return function(r,n){var i=n.prototype;i.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var s=i.add;i.add=function(r,n){return r=Number(r),this.$utils().p(n)===t?this.add(3*r,e):s.bind(this)(r,n)};var o=i.startOf;i.startOf=function(r,n){var i=this.$utils(),s=!!i.u(n)||n;if(i.p(r)===t){var a=this.quarter()-1;return s?this.month(3*a).startOf(e).startOf("day"):this.month(3*a+2).endOf(e).endOf("day")}return o.bind(this)(r,n)}}})},153413,(e,t,r)=>{"use strict";var n=Object.prototype.hasOwnProperty,i="~";function s(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,r,n,s){if("function"!=typeof r)throw TypeError("The listener must be a function");
1var a=new o(r,n||e,s),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new s:delete e._events[t]}function u(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(i=!1)),u.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},u.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,s=r.length,o=Array(s);n<s;n++)o[n]=r[n].fn;return o},u.prototype.listenerCount=function(e){var t=i?i+e:e,r=this._events[t];return r?r.fn?1:r.length:0},u.prototype.emit=function(e,t,r,n,s,o){var a=i?i+e:e;if(!this._events[a])return!1;var l,u,c=this._events[a],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,n),!0;case 5:return c.fn.call(c.context,t,r,n,s),!0;case 6:return c.fn.call(c.context,t,r,n,s,o),!0}for(u=1,l=Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,n);break;default:if(!l)for(d=1,l=Array(h-1);d<h;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},u.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},u.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},u.prototype.removeListener=function(e,t,r,n){var s=i?i+e:e;if(!this._events[s])return this;if(!t)return l(this,s),this;var o=this._events[s];if(o.fn)o.fn!==t||n&&!o.once||r&&o.context!==r||l(this,s);else{for(var a=0,u=[],c=o.length;a<c;a++)(o[a].fn!==t||n&&!o[a].once||r&&o[a].context!==r)&&u.push(o[a]);u.length?this._events[s]=1===u.length?u[0]:u:l(this,s)}return this},u.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&l(this,t)):(this._events=new s,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=i,u.EventEmitter=u,t.exports=u},146631,(e,t,r)=>{"use strict";class n{constructor(e,t,r,n,i){this.open=e,this.high=t,this.low=r,this.close=n,this.volume=i}}function i(e){let{period:t,values:r}=e;if(t<=0||t>r.length)return[];let n=[];for(let e=t-1;e<r.length;e++){let i=0;for(let n=e-t+1;n<=e;n++)i+=r[n];n.push(i/t)}return n}class s{constructor(e){this.values=[],this.sum=0,this.period=e.period,e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),this.sum+=e,this.values.length>this.period&&(this.sum-=this.values.shift()),this.values.length===this.period)return this.sum/this.period}getResult(){return this.values.length<this.period?[]:[this.sum/this.period]}}function o(e){let{period:t,values:r}=e;if(t<=0||r.length<t)return[];let n=[],s=2/(t+1),o=i({period:t,values:r.slice(0,t)})[0];n.push(o);for(let e=t;e<r.length;e++){let t=(r[e]-o)*s+o;n.push(t),o=t}return n}s.calculate=i;class a{constructor(e){this.values=[],this.initialized=!1,this.period=e.period,this.multiplier=2/(e.period+1),e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),!this.initialized){if(this.values.length===this.period){let e=this.values.reduce((e,t)=>e+t,0);return this.previousEMA=e/this.period,this.initialized=!0,this.previousEMA}return}let t=(e-this.previousEMA)*this.multiplier+this.previousEMA;return this.previousEMA=t,t}getResult(){return this.initialized&&this.previousEMA?[this.previousEMA]:[]}}function l(e){let{period:t,values:r}=e;if(t<=0||t>r.length)return[];let n=[];for(let e=t-1;e<r.length;e++){let i=0,s=0;for(let n=0;n<t;n++){let o=n+1;i+=r[e-t+1+n]*o,s+=o}n.push(i/s)}return n}a.calculate=o;class u{constructor(e){this.values=[],this.period=e.period,e.values?.length&&e.values.forEac
1h(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),this.values.length>this.period&&this.values.shift(),this.values.length===this.period){let e=0,t=0;for(let r=0;r<this.period;r++){let n=r+1;e+=this.values[r]*n,t+=n}return e/t}}getResult(){if(this.values.length<this.period)return[];let e=0,t=0;for(let r=0;r<this.period;r++){let n=r+1;e+=this.values[r]*n,t+=n}return[e/t]}}function c(e){let{period:t,values:r}=e;if(t<=0||r.length<t)return[];let n=[],i=1/t,s=0;for(let e=0;e<t;e++)s+=r[e];let o=s/t;n.push(o);for(let e=t;e<r.length;e++){let t=i*r[e]+(1-i)*o;n.push(t),o=t}return n}u.calculate=l;class h{constructor(e){this.values=[],this.initialized=!1,this.period=e.period,this.alpha=1/e.period,e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),!this.initialized){if(this.values.length===this.period){let e=this.values.reduce((e,t)=>e+t,0);return this.previousWEMA=e/this.period,this.initialized=!0,this.previousWEMA}return}let t=this.alpha*e+(1-this.alpha)*this.previousWEMA;return this.previousWEMA=t,t}getResult(){return this.initialized&&this.previousWEMA?[this.previousWEMA]:[]}}function d(e){let{values:t=[],fastPeriod:r=12,slowPeriod:n=26,signalPeriod:s=9,SimpleMAOscillator:a=!1,SimpleMASignal:l=!1}=e;if(t.length<n)return[];let u=[],c=a?i({period:r,values:t}):o({period:r,values:t}),h=a?i({period:n,values:t}):o({period:n,values:t}),d=[],f=n-r;for(let e=0;e<h.length;e++)d.push(c[e+f]-h[e]);let p=l?i({period:s,values:d}):o({period:s,values:d});for(let e=0;e<d.length;e++){let t=d[e],r=e>=s-1?p[e-s+1]:void 0,n=void 0!==r?t-r:void 0;u.push({MACD:t,signal:r,histogram:n})}return u}h.calculate=c;class f{constructor(e){this.macdHistory=[],this.initialized=!1,this.count=0,this.fastPeriod=e.fastPeriod||12,this.slowPeriod=e.slowPeriod||26,this.signalPeriod=e.signalPeriod||9;const t=e.SimpleMAOscillator?s:a,r=e.SimpleMASignal?s:a;this.fastEMA=new t({period:this.fastPeriod,values:[]}),this.slowEMA=new t({period:this.slowPeriod,values:[]}),this.signalEMA=new r({period:this.signalPeriod,values:[]}),e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){this.count++;let t=this.fastEMA.nextValue(e),r=this.slowEMA.nextValue(e);if(void 0===t||void 0===r)return;let n=t-r;this.macdHistory.push(n);let i=this.signalEMA.nextValue(n),s=void 0!==i?n-i:void 0;return{MACD:n,signal:i,histogram:s}}getResult(){if(0===this.macdHistory.length)return[];let e=this.macdHistory[this.macdHistory.length-1],t=this.signalEMA.getResult(),r=t.length>0?t[0]:void 0,n=void 0!==r?e-r:void 0;return[{MACD:e,signal:r,histogram:n}]}}function p(e){let{period:t=14,values:r}=e;if(t<=0||r.length<=t)return[];let n=[],i=[],s=[];for(let e=1;e<r.length;e++){let t=r[e]-r[e-1];i.push(t>0?t:0),s.push(t<0?Math.abs(t):0)}let o=i.slice(0,t).reduce((e,t)=>e+t,0)/t,a=s.slice(0,t).reduce((e,t)=>e+t,0)/t,l=0===a?100:o/a;n.push(parseFloat((100-100/(1+l)).toFixed(2)));for(let e=t;e<i.length;e++)o=(o*(t-1)+i[e])/t,n.push(parseFloat((100-100/(1+(l=0==(a=(a*(t-1)+s[e])/t)?100:o/a))).toFixed(2)));return n}f.calculate=d;class m{constructor(e){this.values=[],this.gains=[],this.losses=[],this.avgGain=0,this.avgLoss=0,this.initialized=!1,this.count=0,this.period=e.period||14,e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),this.count++,1===this.values.length)return;let t=e-this.values[this.values.length-2],r=t>0?t:0,n=t<0?Math.abs(t):0;return(this.gains.push(r),this.losses.push(n),this.initialized)?(this.avgGain=(this.avgGain*(this.period-1)+r)/this.period,this.avgLoss=(this.avgLoss*(this.period-1)+n)/this.period,parseFloat((100-100/(1+(0===this.avgLoss?100:this.avgGain/this.avgLoss))).toFixed(2))):this.gains.length===this.period?(this.avgGain=this.gains.reduce((e,t)=>e+t,0)/this.period,this.avgLoss=this.losses.reduce((e,t)=>e+t,0)/this.period,this.initialized=!0,parseFloat((100-100/(1+(0===this.avgLoss?100:this.avgGain/this.avgLoss))).toFixed(2))):void 0}getResult(){return this.initialized?[parseFloat((100-100/(1+(0===this.avgLoss?100:this.avgGain/this.avgLoss))).toFixed(2))]:[]}}function g(e){let{period:t=20,high:r,low:n,close:i}=e;if(r.length!==n.length||n.length!==i.length||i.length<t)return[];let s=[];for(let e=t-1;e<i.length;e++){let o,a=[];for(let s=e-t+1;s<=e;s++)a.push((r[s]+n[s]+i[s])/3);let l=a.reduce((e,t)=>
1e+t,0)/t,u=a.reduce((e,t)=>e+Math.abs(t-l),0)/t,c=(r[e]+n[e]+i[e])/3;o=0===u?0:(c-l)/(.015*u),s.push(o)}return s}m.calculate=p;class v{constructor(e){this.highValues=[],this.lowValues=[],this.closeValues=[],this.period=e.period||20}nextValue(e,t,r){if(this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r),this.highValues.length>this.period&&(this.highValues.shift(),this.lowValues.shift(),this.closeValues.shift()),this.highValues.length===this.period){let n=[];for(let e=0;e<this.period;e++)n.push((this.highValues[e]+this.lowValues[e]+this.closeValues[e])/3);let i=n.reduce((e,t)=>e+t,0)/this.period,s=n.reduce((e,t)=>e+Math.abs(t-i),0)/this.period,o=(e+t+r)/3;return 0===s?0:(o-i)/(.015*s)}}getResult(){if(this.highValues.length<this.period)return[];let e=[];for(let t=0;t<this.period;t++)e.push((this.highValues[t]+this.lowValues[t]+this.closeValues[t])/3);let t=e.reduce((e,t)=>e+t,0)/this.period,r=e.reduce((e,r)=>e+Math.abs(r-t),0)/this.period,n=e[e.length-1];return 0===r?[0]:[(n-t)/(.015*r)]}}function y(e){let{high:t,low:r,fastPeriod:n=5,slowPeriod:s=34}=e;if(t.length!==r.length||t.length<s)return[];let o=[];for(let e=0;e<t.length;e++)o.push((t[e]+r[e])/2);let a=i({period:n,values:o}),l=i({period:s,values:o}),u=[],c=s-n;for(let e=0;e<l.length;e++){let t=a[e+c]-l[e];u.push(t)}return u}v.calculate=g;class b{constructor(e){this.highValues=[],this.lowValues=[],this.midpoints=[],this.fastPeriod=e.fastPeriod||5,this.slowPeriod=e.slowPeriod||34,this.fastSMACalculator={values:[],period:this.fastPeriod,sum:0,nextValue:function(e){if(this.values.push(e),this.sum+=e,this.values.length>this.period&&(this.sum-=this.values.shift()),this.values.length===this.period)return this.sum/this.period}},this.slowSMACalculator={values:[],period:this.slowPeriod,sum:0,nextValue:function(e){if(this.values.push(e),this.sum+=e,this.values.length>this.period&&(this.sum-=this.values.shift()),this.values.length===this.period)return this.sum/this.period}}}nextValue(e,t){this.highValues.push(e),this.lowValues.push(t);let r=(e+t)/2;this.midpoints.push(r);let n=this.fastSMACalculator.nextValue(r),i=this.slowSMACalculator.nextValue(r);if(void 0!==n&&void 0!==i)return n-i}getResult(){if(0===this.midpoints.length)return[];this.midpoints[this.midpoints.length-1];let e=this.fastSMACalculator.values.length===this.fastPeriod?this.fastSMACalculator.sum/this.fastPeriod:void 0,t=this.slowSMACalculator.values.length===this.slowPeriod?this.slowSMACalculator.sum/this.slowPeriod:void 0;return void 0!==e&&void 0!==t?[e-t]:[]}}function w(e){let{period:t,values:r}=e;if(t<=0||r.length<=t)return[];let n=[];for(let e=t;e<r.length;e++){let i=r[e],s=r[e-t];if(0===s)n.push(0);else{let e=(i-s)/s*100;n.push(e)}}return n}b.calculate=y;class x{constructor(e){this.values=[],this.period=e.period,e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),this.values.length>this.period+1&&this.values.shift(),this.values.length===this.period+1){let e=this.values[this.values.length-1],t=this.values[0];return 0===t?0:(e-t)/t*100}}getResult(){if(this.values.length<this.period+1)return[];let e=this.values[this.values.length-1],t=this.values[0];return 0===t?[0]:[(e-t)/t*100]}}function S(e){let{period:t=14,signalPeriod:r=3,high:n,low:s,close:o}=e;if(n.length!==s.length||s.length!==o.length||o.length<t)return[];let a=[],l=[];for(let e=t-1;e<o.length;e++){let r,i=Math.max(...n.slice(e-t+1,e+1)),a=Math.min(...s.slice(e-t+1,e+1));r=i===a?50:(o[e]-a)/(i-a)*100,l.push(r)}let u=i({period:r,values:l});for(let e=0;e<l.length;e++){let t=e>=r-1?u[e-r+1]:void 0;a.push({k:l[e],d:t})}return a}x.calculate=w;class _{constructor(e){this.highValues=[],this.lowValues=[],this.closeValues=[],this.kValues=[],this.period=e.period||14,this.signalPeriod=e.signalPeriod||3,this.dCalculator={values:[],period:this.signalPeriod,nextValue:e=>{if(this.dCalculator.values.push(e),this.dCalculator.values.length>this.dCalculator.period&&this.dCalculator.values.shift(),this.dCalculator.values.length===this.dCalculator.period)return this.dCalculator.values.reduce((e,t)=>e+t,0)/this.dCalculator.period}}}nextValue(e,t,r){if(this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r),this.highValues.length>this.period&&(this.highValues.shift(),this.lowValues.shift(),this.closeValues.shift()),this.highValues.length===this.period){let e,t=Math.max(...this.highValues),n=Math.min(...this.lowValues),i=r;e=t===n?50:(i-n)/(t-n)*100,this.kValues.push(e);let s=this.dCalculator.nextValue(e);return{k:e,d:s}}}getResult(){return 0===this.kValues.length?[]:[{k:this.kValues[this.kValues.length-1],d:this.dCalculator.values.length===this.signalPeriod?this.dCalculator.values.reduce((e,t)=>
1e+t,0)/this.signalPeriod:void 0}]}}function M(e){let{period:t=14,high:r,low:n,close:i}=e;if(r.length!==n.length||n.length!==i.length||i.length<t)return[];let s=[];for(let e=t-1;e<i.length;e++){let o,a=Math.max(...r.slice(e-t+1,e+1)),l=Math.min(...n.slice(e-t+1,e+1));o=a===l?-50:-((a-i[e])/(a-l)*100),s.push(o)}return s}_.calculate=S;class O{constructor(e){this.highValues=[],this.lowValues=[],this.closeValues=[],this.period=e.period||14}nextValue(e,t,r){if(this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r),this.highValues.length>this.period&&(this.highValues.shift(),this.lowValues.shift(),this.closeValues.shift()),this.highValues.length===this.period){let e=Math.max(...this.highValues),t=Math.min(...this.lowValues),n=r;return e===t?-50:-((e-n)/(e-t)*100)}}getResult(){if(this.highValues.length<this.period)return[];let e=Math.max(...this.highValues),t=Math.min(...this.lowValues),r=this.closeValues[this.closeValues.length-1];return e===t?[-50]:[-((e-r)/(e-t)*100)]}}function E(e){let{period:t=14,values:r}=e;if(r.length<3*t)return[];let n=o({period:t,values:r}),i=o({period:t,values:n}),s=o({period:t,values:i}),a=[];for(let e=1;e<s.length;e++){let t=s[e],r=s[e-1];if(0===r)a.push(0);else{let e=(t-r)/r*100;a.push(e)}}return a}O.calculate=M;class P{constructor(e){this.initialized=!1,this.period=e.period||14,this.ema1Calculator=this.createEMACalculator(this.period),this.ema2Calculator=this.createEMACalculator(this.period),this.ema3Calculator=this.createEMACalculator(this.period),e.values?.length&&e.values.forEach(e=>this.nextValue(e))}createEMACalculator(e){let t=2/(e+1);return{values:[],period:e,multiplier:t,previousEMA:void 0,initialized:!1,nextValue:function(e){if(this.values.push(e),!this.initialized){if(this.values.length===this.period){let e=this.values.reduce((e,t)=>e+t,0);return this.previousEMA=e/this.period,this.initialized=!0,this.previousEMA}return}let t=(e-this.previousEMA)*this.multiplier+this.previousEMA;return this.previousEMA=t,t}}}nextValue(e){let t,r=this.ema1Calculator.nextValue(e);if(void 0===r)return;let n=this.ema2Calculator.nextValue(r);if(void 0===n)return;let i=this.ema3Calculator.nextValue(n);if(void 0===i)return;if(!this.initialized){this.previousTripleEMA=i,this.initialized=!0;return}let s=i;return t=0===this.previousTripleEMA?0:(s-this.previousTripleEMA)/this.previousTripleEMA*100,this.previousTripleEMA=s,t}getResult(){let e;if(!this.initialized||void 0===this.previousTripleEMA)return[];let t=this.ema3Calculator.previousEMA;return void 0===t?[]:[e=0===this.previousTripleEMA?0:(t-this.previousTripleEMA)/this.previousTripleEMA*100]}}function k(e){let{rsiPeriod:t=14,stochasticPeriod:r=14,kPeriod:n=3,dPeriod:s=3,values:o}=e,a=t+r+n+s-1;if(o.length<a)return[];let l=p({period:t,values:o});if(l.length<r)return[];let u=[],c=[];for(let e=r-1;e<l.length;e++){let t,n=l.slice(e-r+1,e+1),i=Math.max(...n),s=Math.min(...n);t=i===s?0:(l[e]-s)/(i-s)*100,c.push(t)}let h=i({period:n,values:c}),d=i({period:s,values:h}),f=n+s-2;for(let e=f;e<c.length;e++){let t=e-n+1,r=e-n-s+2;u.push({stochRSI:c[e],k:h[t],d:d[r]})}return u}P.calculate=E;class A{constructor(e){this.values=[],this.rsiValues=[],this.stochRSIValues=[],this.rsiPeriod=e.rsiPeriod||14,this.stochasticPeriod=e.stochasticPeriod||14,this.kPeriod=e.kPeriod||3,this.dPeriod=e.dPeriod||3,this.rsiCalculator=this.createRSICalculator(this.rsiPeriod),this.kCalculator=this.createSMACalculator(this.kPeriod),this.dCalculator=this.createSMACalculator(this.dPeriod),e.values?.length&&e.values.forEach(e=>this.nextValue(e))}createRSICalculator(e){return{values:[],gains:[],losses:[],avgGain:0,avgLoss:0,initialized:!1,period:e,nextValue:function(e){if(this.values.push(e),1===this.values.length)return;let t=e-this.values[this.values.length-2],r=t>0?t:0,n=t<0?Math.abs(t):0;return(this.gains.push(r),this.losses.push(n),this.initialized)?(this.avgGain=(this.avgGain*(this.period-1)+r)/this.period,this.avgLoss=(this.avgLoss*(this.period-1)+n)/this.period,parseFloat((100-100/(1+(0===this.avgLoss?100:this.avgGain/this.avgLoss))).toFixed(2))):this.gains.length===this.period?(this.avgGain=this.gains.reduce((e,t)=>
1e+t,0)/this.period,this.avgLoss=this.losses.reduce((e,t)=>e+t,0)/this.period,this.initialized=!0,parseFloat((100-100/(1+(0===this.avgLoss?100:this.avgGain/this.avgLoss))).toFixed(2))):void 0}}}createSMACalculator(e){return{values:[],period:e,nextValue:function(e){if(this.values.push(e),this.values.length>this.period&&this.values.shift(),this.values.length===this.period)return this.values.reduce((e,t)=>e+t,0)/this.period}}}nextValue(e){let t;this.values.push(e);let r=this.rsiCalculator.nextValue(e);if(void 0===r||(this.rsiValues.push(r),this.rsiValues.length>this.stochasticPeriod&&this.rsiValues.shift(),this.rsiValues.length<this.stochasticPeriod))return;let n=Math.max(...this.rsiValues),i=Math.min(...this.rsiValues);t=n===i?0:(r-i)/(n-i)*100,this.stochRSIValues.push(t);let s=this.kCalculator.nextValue(t),o=void 0!==s?this.dCalculator.nextValue(s):void 0;if(void 0!==o)return{stochRSI:t,k:s,d:o}}getResult(){return 0===this.stochRSIValues.length?[]:[{stochRSI:this.stochRSIValues[this.stochRSIValues.length-1],k:this.kCalculator.values.length===this.kPeriod?this.kCalculator.values.reduce((e,t)=>e+t,0)/this.kPeriod:void 0,d:this.dCalculator.values.length===this.dPeriod?this.dCalculator.values.reduce((e,t)=>e+t,0)/this.dPeriod:void 0}]}}function j(e){let t,r,n,i,s,{high:o,low:a,step:l=.02,max:u=.2}=e;if(o.length!==a.length||o.length<1)return[];let c=[],h=!0,d=l;for(let e=0;e<o.length;e++)t={high:o[e],low:a[e]},s&&t&&void 0!==n&&void 0!==r&&void 0!==i?(n+=d*(r-n),h?(n=Math.min(n,i.low,s.low),t.high>r&&(r=t.high,d=Math.min(d+l,u))):(n=Math.max(n,i.high,s.high),t.low<r&&(r=t.low,d=Math.min(d+l,u))),(h&&t.low<n||!h&&t.high>n)&&(d=l,n=r,r=(h=!h)?t.high:t.low)):(n=t.low,r=t.high),i=s||t,t&&(s=t),c.push(n);return c}A.calculate=k;class C{constructor(e){this.up=!0,this.results=[],this.step=e.step||.02,this.max=e.max||.2,this.accel=this.step}nextValue(e,t){return this.curr={high:e,low:t},this.prev?this.prev&&this.curr&&(this.sar=this.sar+this.accel*(this.extreme-this.sar),this.up?(this.sar=Math.min(this.sar,this.furthest.low,this.prev.low),this.curr.high>this.extreme&&(this.extreme=this.curr.high,this.accel=Math.min(this.accel+this.step,this.max))):(this.sar=Math.max(this.sar,this.furthest.high,this.prev.high),this.curr.low<this.extreme&&(this.extreme=this.curr.low,this.accel=Math.min(this.accel+this.step,this.max))),(this.up&&this.curr.low<this.sar||!this.up&&this.curr.high>this.sar)&&(this.accel=this.step,this.sar=this.extreme,this.up=!this.up,this.extreme=this.up?this.curr.high:this.curr.low)):(this.sar=this.curr.low,this.extreme=this.curr.high),this.furthest=this.prev||this.curr,this.curr&&(this.prev=this.curr),this.results.push(this.sar),this.sar}getResult(){return this.results}}function N(e){let{values:t,ROCPer1:r=10,ROCPer2:n=15,ROCPer3:i=20,ROCPer4:s=30,SMAROCPer1:o=10,SMAROCPer2:a=10,SMAROCPer3:l=10,SMAROCPer4:u=15,signalPeriod:c=9}=e;if(!t||0===t.length)return[];let h=[],d=Math.max(r+o,n+a,i+l,s+u);if(t.length<d)return[];let f=[],p=[],m=[],g=[],v=[];for(let e=0;e<t.length;e++){let y,b,w,x,S,_,M,O;if(e>=r&&(y=(t[e]-t[e-r])/t[e-r]*100,f.push(y)),e>=n&&(b=(t[e]-t[e-n])/t[e-n]*100,p.push(b)),e>=i&&(w=(t[e]-t[e-i])/t[e-i]*100,m.push(w)),e>=s&&(x=(t[e]-t[e-s])/t[e-s]*100,g.push(x)),f.length>=o&&(S=f.slice(-o).reduce((e,t)=>e+t,0)/o),p.length>=a&&(_=p.slice(-a).reduce((e,t)=>e+t,0)/a),m.length>=l&&(M=m.slice(-l).reduce((e,t)=>e+t,0)/l),g.length>=u&&(O=g.slice(-u).reduce((e,t)=>e+t,0)/u),e>=d-1&&void 0!==S&&void 0!==_&&void 0!==M&&void 0!==O){let e,t=+S+2*_+3*M+4*O;v.push(t),v.length>=c&&(e=v.slice(-c).reduce((e,t)=>e+t,0)/c),h.push({kst:t,signal:e})}}return h}C.calculate=j;class T{constructor(e){this.values=[],this.roc1Values=[],this.roc2Values=[],this.roc3Values=[],this.roc4Values=[],this.kstValues=[],this.results=[],this.ROCPer1=e.ROCPer1||10,this.ROCPer2=e.ROCPer2||15,this.ROCPer3=e.ROCPer3||20,this.ROCPer4=e.ROCPer4||30,this.SMAROCPer1=e.SMAROCPer1||10,this.SMAROCPer2=e.SMAROCPer2||10,this.SMAROCPer3=e.SMAROCPer3||10,this.SMAROCPer4=e.SMAROCPer4||15,this.signalPeriod=e.signalPeriod||9,this.firstResult=Math.max(this.ROCPer1+this.SMAROCPer1,this.ROCPer2+this.SMAROCPer2,this.ROCPer3+this.SMAROCPer3,this.ROCPer4+this.SMAROCPer4),e.values&&e.values.length&&e.values.forEac
1h(e=>this.nextValue(e))}nextValue(e){let t,r,n,i;this.values.push(e);let s=this.values.length-1;if(s>=this.ROCPer1){let t=(e-this.values[s-this.ROCPer1])/this.values[s-this.ROCPer1]*100;this.roc1Values.push(t)}if(s>=this.ROCPer2){let t=(e-this.values[s-this.ROCPer2])/this.values[s-this.ROCPer2]*100;this.roc2Values.push(t)}if(s>=this.ROCPer3){let t=(e-this.values[s-this.ROCPer3])/this.values[s-this.ROCPer3]*100;this.roc3Values.push(t)}if(s>=this.ROCPer4){let t=(e-this.values[s-this.ROCPer4])/this.values[s-this.ROCPer4]*100;this.roc4Values.push(t)}if(this.roc1Values.length>=this.SMAROCPer1&&(t=this.roc1Values.slice(-this.SMAROCPer1).reduce((e,t)=>e+t,0)/this.SMAROCPer1),this.roc2Values.length>=this.SMAROCPer2&&(r=this.roc2Values.slice(-this.SMAROCPer2).reduce((e,t)=>e+t,0)/this.SMAROCPer2),this.roc3Values.length>=this.SMAROCPer3&&(n=this.roc3Values.slice(-this.SMAROCPer3).reduce((e,t)=>e+t,0)/this.SMAROCPer3),this.roc4Values.length>=this.SMAROCPer4&&(i=this.roc4Values.slice(-this.SMAROCPer4).reduce((e,t)=>e+t,0)/this.SMAROCPer4),s>=this.firstResult-1&&void 0!==t&&void 0!==r&&void 0!==n&&void 0!==i){let e,s=+t+2*r+3*n+4*i;this.kstValues.push(s),this.kstValues.length>=this.signalPeriod&&(e=this.kstValues.slice(-this.signalPeriod).reduce((e,t)=>e+t,0)/this.signalPeriod);let o={kst:s,signal:e};return this.results.push(o),o}}getResult(){return this.results}}function R(e,t,r){return Math.max(e-t,Math.abs(e-r),Math.abs(t-r))}function I(e,t,r){return r-Math.min(t,r)}function D(e,t,r){let n=0;for(let i=Math.max(0,r-t+1);i<=r;i++)n+=e[i];return n}function L(e){let{high:t,low:r,close:n,period1:i=7,period2:s=14,period3:o=28}=e;if(t.length!==r.length||r.length!==n.length||n.length<o+1)return[];let a=[],l=[],u=[];for(let e=1;e<n.length;e++){let i=R(t[e],r[e],n[e-1]),s=I(t[e],r[e],n[e]);l.push(i),u.push(s)}for(let e=o-1;e<l.length;e++){let t=100*(4*(D(u,i,e)/D(l,i,e))+2*(D(u,s,e)/D(l,s,e))+D(u,o,e)/D(l,o,e))/7;a.push(t)}return a}T.calculate=N;class V{constructor(e){this.highValues=[],this.lowValues=[],this.closeValues=[],this.trueRanges=[],this.buyingPressures=[],this.period1=e.period1||7,this.period2=e.period2||14,this.period3=e.period3||28}nextValue(e,t,r){if(this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r),this.closeValues.length<2)return;let n=R(e,t,this.closeValues[this.closeValues.length-2]),i=I(e,t,r);if(this.trueRanges.push(n),this.buyingPressures.push(i),this.trueRanges.length<this.period3)return;let s=Math.max(this.period1,this.period2,this.period3);this.trueRanges.length>s&&(this.trueRanges.shift(),this.buyingPressures.shift(),this.highValues.shift(),this.lowValues.shift(),this.closeValues.shift());let o=this.trueRanges.length-1;return 100*(4*(D(this.buyingPressures,this.period1,o)/D(this.trueRanges,this.period1,o))+2*(D(this.buyingPressures,this.period2,o)/D(this.trueRanges,this.period2,o))+D(this.buyingPressures,this.period3,o)/D(this.trueRanges,this.period3,o))/7}getResult(){if(this.trueRanges.length<this.period3)return[];let e=this.nextValue(this.highValues[this.highValues.length-1],this.lowValues[this.lowValues.length-1],this.closeValues[this.closeValues.length-1]);return void 0!==e?[e]:[]}}function z(e,t,r){if(r<t-1)return 0;let n=0;for(let i=r-t+1;i<=r;i++)n+=e[i];return n/t}function F(e){let{period:t=21,values:r}=e;if(r.length<t)return[];let n=[],i=Math.floor(t/2)+1;for(let e=t-1;e<r.length;e++){let s=e-i;if(s>=t-1){let i=z(r,t,s),o=r[e]-i;n.push(o)}}return n}V.calculate=L;class B{constructor(e){this.values=[],this.period=e.period||21,this.lookback=Math.floor(this.period/2)+1}nextValue(e){this.values.push(e);let t=this.period+this.lookback-1;if(this.values.length<t)return;let r=this.period+this.lookback;this.values.length>r&&this.values.shift();let n=this.values.length-1,i=n-this.lookback;if(i>=this.period-1){let e=z(this.values,this.period,i);return this.values[n]-e}}getResult(){let e=this.period+this.lookback-1;if(this.values.length<e)return[];let t=this.nextValue(this.values[this.values.length-1]);return void 0!==t?[t]:[]}}function $(e,t){if(e.length<t)return[];let r=[];for(let n=t-1;n<e.length;n++){let i=e.slice(n-t+1,n+1).reduce((e,t)=>
1e+t,0);r.push(i/t)}return r}function U(e,t){if(e.length<t)return[];let r=[],n=2/(t+1),i=e.slice(0,t).reduce((e,t)=>e+t,0)/t;r.push(i);for(let s=t;s<e.length;s++)r.push(i=(e[s]-i)*n+i);return r}function W(e){let{fastPeriod:t=12,slowPeriod:r=26,values:n,maType:i="ema"}=e;if(n.length<r)return[];let s="ema"===i?U(n,t):$(n,t),o="ema"===i?U(n,r):$(n,r),a=[],l=r-t;for(let e=0;e<o.length;e++){let t=s[e+l]-o[e];a.push(t)}return a}B.calculate=F;class H{constructor(e){this.values=[],this.fastPeriod=e.fastPeriod||12,this.slowPeriod=e.slowPeriod||26,this.maType=e.maType||"ema",this.fastMultiplier=2/(this.fastPeriod+1),this.slowMultiplier=2/(this.slowPeriod+1)}nextValue(e){if(this.values.push(e),"sma"===this.maType){if(this.values.length<this.slowPeriod)return;this.values.length>this.slowPeriod&&this.values.shift();let e=this.values.slice(-this.fastPeriod).reduce((e,t)=>e+t,0),t=this.values.reduce((e,t)=>e+t,0);return e/this.fastPeriod-t/this.slowPeriod}if(!(this.values.length<this.slowPeriod)){if(void 0!==this.fastEMA&&void 0!==this.slowEMA)return this.fastEMA=(e-this.fastEMA)*this.fastMultiplier+this.fastEMA,this.slowEMA=(e-this.slowEMA)*this.slowMultiplier+this.slowEMA,this.fastEMA-this.slowEMA;{let e=this.values.slice(-this.fastPeriod).reduce((e,t)=>e+t,0),t=this.values.slice(-this.slowPeriod).reduce((e,t)=>e+t,0);return this.fastEMA=e/this.fastPeriod,this.slowEMA=t/this.slowPeriod,this.fastEMA-this.slowEMA}}}getResult(){if(this.values.length<this.slowPeriod)return[];let e=this.nextValue(this.values[this.values.length-1]);return void 0!==e?[e]:[]}}function K(e,t){if(e.length<t)return[];let r=[],n=2/(t+1),i=e.slice(0,t).reduce((e,t)=>e+t,0)/t;r.push(i);for(let s=t;s<e.length;s++)r.push(i=(e[s]-i)*n+i);return r}function Y(e){let{fastPeriod:t=12,slowPeriod:r=26,signalPeriod:n=9,values:i}=e;if(i.length<r)return[];let s=K(i,t),o=K(i,r),a=[],l=r-t;for(let e=0;e<o.length;e++){let t=s[e+l],r=o[e],n=(t-r)/r*100;a.push(n)}let u=K(a,n),c=[],h=n-1;for(let e=0;e<u.length;e++){let t=a[e+h],r=u[e],n=t-r;c.push({ppo:t,signal:r,histogram:n})}return c}H.calculate=W;class q{constructor(e){this.values=[],this.ppoValues=[],this.fastPeriod=e.fastPeriod||12,this.slowPeriod=e.slowPeriod||26,this.signalPeriod=e.signalPeriod||9,this.fastMultiplier=2/(this.fastPeriod+1),this.slowMultiplier=2/(this.slowPeriod+1),this.signalMultiplier=2/(this.signalPeriod+1)}nextValue(e){if(this.values.push(e),this.values.length<this.slowPeriod)return;if(void 0===this.fastEMA||void 0===this.slowEMA){let e=this.values.slice(-this.fastPeriod).reduce((e,t)=>e+t,0),t=this.values.slice(-this.slowPeriod).reduce((e,t)=>e+t,0);this.fastEMA=e/this.fastPeriod,this.slowEMA=t/this.slowPeriod}else this.fastEMA=(e-this.fastEMA)*this.fastMultiplier+this.fastEMA,this.slowEMA=(e-this.slowEMA)*this.slowMultiplier+this.slowEMA;let t=(this.fastEMA-this.slowEMA)/this.slowEMA*100;if(this.ppoValues.push(t),this.ppoValues.length<this.signalPeriod)return{ppo:t,signal:void 0,histogram:void 0};if(void 0===this.signalEMA){let e=this.ppoValues.slice(-this.signalPeriod).reduce((e,t)=>e+t,0);this.signalEMA=e/this.signalPeriod}else this.signalEMA=(t-this.signalEMA)*this.signalMultiplier+this.signalEMA;let r=t-this.signalEMA;return this.ppoValues.length>2*this.signalPeriod&&this.ppoValues.shift(),{ppo:t,signal:this.signalEMA,histogram:r}}getResult(){if(this.values.length<this.slowPeriod)return[];let e=this.nextValue(this.values[this.values.length-1]);return e?[e]:[]}}function G(e){let{close:t,volume:r}=e;if(t.length!==r.length||t.length<2)return[];let n=[],i=0;for(let e=1;e<t.length;e++)t[e]>t[e-1]?i+=r[e]:t[e]<t[e-1]&&(i-=r[e]),n.push(i);return n}q.calculate=Y;class J{constructor(e){if(this.closeValues=[],this.volumeValues=[],this.cumulativeVolume=0,this.initialized=!1,e?.close?.length&&e?.volume?.length)for(let t=0;t<Math.min(e.close.length,e.volume.length);t++)this.nextValue(e.close[t],e.volume[t])}nextValue(e,t){if(this.closeValues.push(e),this.volumeValues.push(t),!this.initialized){this.cumulativeVolume=0,this.initialized=!0;return}let r=this.closeValues[this.closeValues.length-2];return e>r?this.cumulativeVolume+=t:e<r&&(this.cumulativeVolume-=t),this.cumulativeVolume}getResult(){return this.initialized?[this.cumulativeVolume]:[]}}function X(e){let{high:t,low:r,close:n,volume:i}=e;if(t.length!==r.length||r.length!==n.length||n.length!==i.length)return[];let s=[],o=0;for(let e=0;e<n.length;e++){let a=t[e],l=r[e],u=n[e],c=i[e],h=(u-l-(a-u))/(a-l);o+=(h=isNaN(h)?1:h)*c,s.push(Math.round(o))}return s}J.calculate=G;class Q{constructor(e){if(this.cumulativeADL=0,e?.high?.length){const{high:t,low:r,close:n,volume:i}=e;for(let e=0;e<Math.min(t.length,r.length,n.length,i.length);e++)this.nextValue(t[e],r[e],n[e],i[e])}}nextValue(e,t,r,n){let i=(r-t-(e-r))/(e-t),s=(i=isNaN(i)?1:i)*n;return this.cumulativeADL+=s,Math.round(this.cumulativeADL)}getResult(){return[Math.round(this.cumulativeADL)]}}function Z(e){let{high:t,low:r,close:n,volume:i}=e;if(t.length!==r.length||r.length!==n.length||n.length!==i.length)return[];let s=[],o=0,a=0;for(let e=0;e<n.length;e++){o+=(t[e]+r[e]+n[e])/3*i[e];let l=0===(a+=i[e])?0:o/a;s.push(l)}return s}Q.calculate=X;class ee{constructor(e){if(this.cumulativePV=0,this.cumulativeVolume=0,e?.high?.length){const{high:t,low:r,close:n,volume:i}=e;for(let e=0;e<Math.min(t.length,r.length,n.length,i.length);e++)this.nextValue(t[e],r[e],n[e],i[e])}}nextValue(e,t,r,n){let i=(e+t+r)/3*n;return this.cumulativePV+=i,this.cumulativeVolume+=n,0===this.cumulativeVolume?0:this.cumulativePV/this.cumulativeVolume}getResult(){return[0===this.cumulativeVolume?0:this.cumulativePV/this.cumulativeVolume]}}function et(e){let{period:t=13,close:r,volume:n}=e;if(r.length!==n.length||r.length<2)return[];let i=[];for(let e=1;e<r.length;e++){let t=(r[e]-r[e-1])*n[e];i.push(t)}return 1===t?i:o({period:t,values:i})}ee.calculate=Z;class er{constructor(e){if(this.closeValues=[],this.volumeValues=[],this.initialized=!1,this.period=e.period||13,1===this.period)return;const t=2/(this.period+1);
1this.emaCalculator={values:[],period:this.period,multiplier:t,previousEMA:void 0,initialized:!1,nextValue:function(e){if(this.values.push(e),!this.initialized){if(this.values.length===this.period){let e=this.values.reduce((e,t)=>e+t,0);return this.previousEMA=e/this.period,this.initialized=!0,this.previousEMA}return}let t=(e-this.previousEMA)*this.multiplier+this.previousEMA;return this.previousEMA=t,t}}}nextValue(e,t){if(this.closeValues.push(e),this.volumeValues.push(t),this.closeValues.length<2)return;let r=(e-this.closeValues[this.closeValues.length-2])*t;return 1===this.period?r:this.emaCalculator.nextValue(r)}getResult(){if(this.closeValues.length<2)return[];let e=(this.closeValues[this.closeValues.length-1]-this.closeValues[this.closeValues.length-2])*this.volumeValues[this.volumeValues.length-1];return 1===this.period?[e]:void 0!==this.emaCalculator.previousEMA?[this.emaCalculator.previousEMA]:[]}}function en(e){let{period:t=14,high:r,low:n,close:i,volume:s}=e;if(r.length!==n.length||n.length!==i.length||i.length!==s.length||0===r.length)return[];let o=[],a=[],l=[],u=0,c=null,h=null,d=!0;for(let e=0;e<r.length;e++){if(d){c=(r[e]+n[e]+i[e])/3,d=!1;continue}let f={high:r[e],low:n[e],close:i[e],volume:s[e]},p=0,m=0,g=(h=(f.high+f.low+f.close)/3)*f.volume;if(null!=h&&null!=c){h>c?p=g:m=g,a.push(p),l.push(m),u++,a.length>t&&(a.shift(),l.shift());let e=a.reduce((e,t)=>e+t,0),r=l.reduce((e,t)=>e+t,0);if(u>t){let t=100-100/(1+e/r);o.push(parseFloat(t.toFixed(2)))}}c=h}return o}er.calculate=et;class ei{constructor(e){this.positiveFlows=[],this.negativeFlows=[],this.prevTypicalPrice=null,this.results=[],this.totalPushed=0,this.period=e.period||14}nextValue(e,t,r,n){let i=0,s=0,o=(e+t+r)/3,a=o*n;if(null!=o&&null!=this.prevTypicalPrice){o>this.prevTypicalPrice?i=a:s=a,this.positiveFlows.push(i),this.negativeFlows.push(s),this.totalPushed++,this.positiveFlows.length>this.period&&(this.positiveFlows.shift(),this.negativeFlows.shift());let e=this.positiveFlows.reduce((e,t)=>e+t,0),t=this.negativeFlows.reduce((e,t)=>e+t,0);if(this.totalPushed>this.period){let r=parseFloat((100-100/(1+e/t)).toFixed(2));return this.results.push(r),this.prevTypicalPrice=o,r}}this.prevTypicalPrice=o}getResult(){return this.results}}function es(e,t,r,n){return e<=r&&t>=r||r<=e&&n>=e}function eo(e){let{open:t,high:r,low:n,close:i,volume:s,noOfBars:o=14}=e;if(!t||!r||!n||!i||!s||t.length!==r.length||r.length!==n.length||n.length!==i.length||i.length!==s.length||0===i.length)return[];let a=[],l=Math.max(...r,...n,...i,...t),u=Math.min(...r,...n,...i,...t),c=(l-u)/o,h=u;for(let e=0;e<o;e++){let e=h,o=e+c;h=o;let l=0,u=0,d=0;for(let a=0;a<r.length;a++){let c=n[a],h=r[a],f=t[a],p=i[a],m=s[a];es(e,o,c,h)&&(d+=m,f>p?u+=m:l+=m)}a.push({rangeStart:e,rangeEnd:o,bullishVolume:l,bearishVolume:u,totalVolume:d})}return a}ei.calculate=en;class ea{constructor(e){if(this.openValues=[],this.highValues=[],this.lowValues=[],this.closeValues=[],this.volumeValues=[],this.noOfBars=e.noOfBars||14,e.open?.length&&e.high?.length&&e.low?.length&&e.close?.length&&e.volume?.length){const t=Math.min(e.open.length,e.high.length,e.low.length,e.close.length,e.volume.length);for(let r=0;r<t;r++)this.nextValue(e.open[r],e.high[r],e.low[r],e.close[r],e.volume[r])}}nextValue(e,t,r,n,i){this.openValues.push(e),this.highValues.push(t),this.lowValues.push(r),this.closeValues.push(n),this.volumeValues.push(i)}getResult(){return eo({open:this.openValues,high:this.highValues,low:this.lowValues,close:this.closeValues,volume:this.volumeValues,noOfBars:this.noOfBars})}}function el(e,t){return Math.sqrt(e.map(e=>Math.pow(e-t,2)).reduce((e,t)=>e+t,0)/e.length)}function eu(e){let{period:t=20,values:r=[],stdDev:n=2}=e;if(t<=0||r.length<t)return[];let s=[],o=i({period:t,values:r});for(let e=0;e<o.length;e++){let i=e,a=e+t,l=r.slice(i,a),u=o[e],c=el(l,u),h=u+n*c,d=u-n*c,f=(r[a-1]-d)/(h-d),p=(h-d)/u;s.push({upper:h,middle:u,lower:d,pb:f,width:p})}return s}ea.calculate=eo;class ec{constructor(e){this.values=[],this.period=e.period||20,this.stdDev=e.stdDev||2,e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),this.values.length>this.period&&this.values.shift(),this.values.length===this.period){let t=this.values.reduce((e,t)=>
1e+t,0)/this.period,r=el(this.values,t),n=t+this.stdDev*r,i=t-this.stdDev*r,s=(e-i)/(n-i),o=(n-i)/t;return{upper:n,middle:t,lower:i,pb:s,width:o}}}getResult(){if(this.values.length<this.period)return[];let e=this.values.reduce((e,t)=>e+t,0)/this.period,t=el(this.values,e),r=e+this.stdDev*t,n=e-this.stdDev*t,i=(this.values[this.values.length-1]-n)/(r-n),s=(r-n)/e;return[{upper:r,middle:e,lower:n,pb:i,width:s}]}}function eh(e,t,r){return Math.max(e-t,Math.abs(e-r),Math.abs(t-r))}function ed(e){let{period:t=14,high:r,low:n,close:i}=e;if(r.length!==n.length||n.length!==i.length||i.length<t+1)return[];let s=[],o=[];for(let e=1;e<i.length;e++){let t=eh(r[e],n[e],i[e-1]);o.push(t)}let a=0;for(let e=0;e<t;e++)a+=o[e];let l=a/t;s.push(l);for(let e=t;e<o.length;e++)s.push(l=(l*(t-1)+o[e])/t);return s}ec.calculate=eu;class ef{constructor(e){this.highValues=[],this.lowValues=[],this.closeValues=[],this.trueRanges=[],this.initialized=!1,this.period=e.period||14}nextValue(e,t,r){if(this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r),this.closeValues.length<2)return;let n=eh(e,t,this.closeValues[this.closeValues.length-2]);if(this.trueRanges.push(n),!this.initialized){if(this.trueRanges.length===this.period){let e=this.trueRanges.reduce((e,t)=>e+t,0);return this.currentATR=e/this.period,this.initialized=!0,this.currentATR}return}return this.currentATR=(this.currentATR*(this.period-1)+n)/this.period,this.currentATR}getResult(){return this.initialized&&void 0!==this.currentATR?[this.currentATR]:[]}}function ep(e){let{high:t,low:r,close:n,period:i=20,multiplier:s=2}=e;if(!t||!r||!n||t.length!==r.length||r.length!==n.length||0===t.length)return[];let a=o({period:i,values:n}),l=ed({high:t,low:r,close:n,period:i}),u=[];for(let e=0;e<Math.min(a.length,l.length);e++){let t=a[e],r=l[e];u.push({middle:t,upper:t+s*r,lower:t-s*r})}return u}ef.calculate=ed;class em{constructor(e){if(this.highValues=[],this.lowValues=[],this.closeValues=[],this.period=e.period||20,this.multiplier=e.multiplier||2,e.high&&e.low&&e.close&&e.high.length===e.low.length&&e.low.length===e.close.length)for(let t=0;t<e.high.length;t++)this.nextValue(e.high[t],e.low[t],e.close[t])}nextValue(e,t,r){this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r);let n=ep({high:this.highValues,low:this.lowValues,close:this.closeValues,period:this.period,multiplier:this.multiplier});if(n.length>0)return n[n.length-1]}getResult(){return ep({high:this.highValues,low:this.lowValues,close:this.closeValues,period:this.period,multiplier:this.multiplier})}}function eg(e){let{period:t,values:r}=e;if(t<=0||r.length<t)return[];let n=[];for(let e=t-1;e<r.length;e++){let i=r[e-t+1];for(let n=e-t+2;n<=e;n++)r[n]>i&&(i=r[n]);n.push(i)}return n}function ev(e){let{period:t,values:r}=e;if(t<=0||r.length<t)return[];let n=[];for(let e=t-1;e<r.length;e++){let i=r[e-t+1];for(let n=e-t+2;n<=e;n++)r[n]<i&&(i=r[n]);n.push(i)}return n}function ey(e){let{period:t,values:r}=e;if(t<=0||r.length<t)return[];let n=[];for(let e=t-1;e<r.length;e++){let i=r.slice(e-t+1,e+1),s=i.reduce((e,t)=>e+t,0)/t,o=i.map(e=>Math.pow(e-s,2)).reduce((e,t)=>e+t,0)/t;n.push(Math.sqrt(o))}return n}function eb(e){let{period:t,values:r}=e;if(t<=0||r.length<t)return[];let n=[];for(let e=t-1;e<r.length;e++){let i=0;for(let n=e-t+1;n<=e;n++)i+=r[n];n.push(i)}return n}function ew(e){let{period:t,values:r}=e;if(r.length<=t)return[];let n=[];for(let e=1;e<r.length;e++){let t=r[e]-r[e-1];n.push(t>0?t:0)}let i=[];for(let e=t-1;e<n.length;e++){let r=n.slice(e-t+1,e+1).reduce((e,t)=>e+t,0)/t;i.push(r)}return i}function ex(e){let{period:t,values:r}=e;if(r.length<=t)return[];let n=[];for(let e=1;e<r.length;e++){let t=r[e]-r[e-1];n.push(t<0?Math.abs(t):0)}let i=[];for(let e=t-1;e<n.length;e++){let r=n.slice(e-t+1,e+1).reduce((e,t)=>e+t,0)/t;i.push(r)}return i}function eS(e){let{lineA:t,lineB:r}=e,n=[];if(t.length!==r.length||t.length<2)return n;n.push(!1);for(let e=1;e<t.length;e++){let i=t[e-1]<=r[e-1]&&t[e]>r[e];n.push(i)}return n}function e_(e){let{lineA:t,lineB:r}=e,n=[];if(t.length!==r.length||t.length<2)return n;n.push(!1);for(let e=1;e<t.length;e++){let i=t[e-1]>=r[e-1]&&t[e]<r[e];n.push(i)}return n}em.calculate=ep;class eM{constructor(e){this.values=[],this.period=e.period,e.values?.length&&e.values.forEac
1h(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),this.values.length>this.period&&this.values.shift(),this.values.length===this.period)return Math.max(...this.values)}}eM.calculate=eg;class eO{constructor(e){this.values=[],this.period=e.period,e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),this.values.length>this.period&&this.values.shift(),this.values.length===this.period)return Math.min(...this.values)}}function eE(e){let{high:t,low:r,close:n,period:i=22,multiplier:s=3}=e;if(!t||!r||!n||t.length!==r.length||r.length!==n.length||0===t.length)return[];let o=ed({high:t,low:r,close:n,period:i}),a=[],l=i-1;for(let e=l;e<t.length;e++){let n={},u=e-l;if(u<o.length){let a=o[u],l=eg({values:t.slice(e-i+1,e+1),period:i})[0],c=ev({values:r.slice(e-i+1,e+1),period:i})[0];n.exitLong=l-s*a,n.exitShort=c+s*a}a.push(n)}return a}eO.calculate=ev;class eP{constructor(e){if(this.highValues=[],this.lowValues=[],this.closeValues=[],this.period=e.period||22,this.multiplier=e.multiplier||3,e.high&&e.low&&e.close&&e.high.length===e.low.length&&e.low.length===e.close.length)for(let t=0;t<e.high.length;t++)this.nextValue(e.high[t],e.low[t],e.close[t])}nextValue(e,t,r){this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r);let n=eE({high:this.highValues,low:this.lowValues,close:this.closeValues,period:this.period,multiplier:this.multiplier});if(n.length>0)return n[n.length-1]}getResult(){return eE({high:this.highValues,low:this.lowValues,close:this.closeValues,period:this.period,multiplier:this.multiplier})}}function ek(e){let{period:t=20,high:r,low:n}=e;if(r.length!==n.length||r.length<t)return[];let i=[];for(let e=t-1;e<r.length;e++){let s=r.slice(e-t+1,e+1),o=n.slice(e-t+1,e+1),a=Math.max(...s),l=Math.min(...o),u=(a+l)/2,c=a-l;i.push({upper:a,middle:u,lower:l,width:c})}return i}eP.calculate=eE;class eA{constructor(e){this.highValues=[],this.lowValues=[],this.period=e.period||20}nextValue(e,t){if(this.highValues.push(e),this.lowValues.push(t),this.highValues.length<this.period)return;this.highValues.length>this.period&&(this.highValues.shift(),this.lowValues.shift());let r=Math.max(...this.highValues),n=Math.min(...this.lowValues),i=(r+n)/2,s=r-n;return{upper:r,middle:i,lower:n,width:s}}getResult(){if(this.highValues.length<this.period)return[];let e=this.nextValue(this.highValues[this.highValues.length-1],this.lowValues[this.lowValues.length-1]);return e?[e]:[]}}function ej(e,t){return Math.sqrt(e.map(e=>Math.pow(e-t,2)).reduce((e,t)=>e+t,0)/e.length)}function eC(e){let{period:t=30,values:r}=e;if(r.length<t+1)return[];let n=[];for(let e=t;e<r.length;e++){let i=[];for(let n=e-t+1;n<=e;n++){let e=(r[n]-r[n-1])/r[n-1];i.push(e)}let s=i.reduce((e,t)=>e+t,0)/i.length,o=ej(i,s)*Math.sqrt(t)*100;n.push(o)}return n}eA.calculate=ek;class eN{constructor(e){this.values=[],this.period=e.period||30}nextValue(e){if(this.values.push(e),this.values.length<this.period+1)return;this.values.length>this.period+1&&this.values.shift();let t=[];for(let e=1;e<this.values.length;e++){let r=(this.values[e]-this.values[e-1])/this.values[e-1];t.push(r)}let r=t.reduce((e,t)=>e+t,0)/t.length;return ej(t,r)*Math.sqrt(this.period)*100}getResult(){if(this.values.length<this.period+1)return[];let e=this.nextValue(this.values[this.values.length-1]);return void 0!==e?[e]:[]}}function eT(e){let{high:t,low:r,close:n}=e;if(t.length!==r.length||r.length!==n.length||n.length<2)return[];let i=[];for(let e=1;e<n.length;e++){let s=Math.max(t[e]-r[e],Math.abs(t[e]-n[e-1]),Math.abs(r[e]-n[e-1]));i.push(s)}return i}eN.calculate=eC;class eR{constructor(e){if(this.highValues=[],this.lowValues=[],this.closeValues=[],e?.high?.length){const{high:t,low:r,close:n}=e;for(let e=0;e<Math.min(t.length,r.length,n.length);e++)this.nextValue(t[e],r[e],n[e])}}nextValue(e,t,r){if(this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r),this.closeValues.length<2)return;let n=e,i=t,s=this.closeValues[this.closeValues.length-2];return Math.max(n-i,Math.abs(n-s),Math.abs(i-s))}getResult(){if(this.closeValues.length<2)return[];let e=this.highValues[this.highValues.length-1],t=this.lowValues[this.lowValues.length-1],r=this.closeValues[this.closeValues.length-2];return[Math.max(e-t,Math.abs(e-r),Math.abs(t-r))]}}function eI(e,t){let r=[],n=0;for(let i=0;i<e.length;i++)if(i<t-1)n+=e[i];else if(i===t-1)n+=e[i],r.push(n);else{let n=r[r.length-1],s=n-n/t+e[i];
1r.push(s)}return r}function eD(e){let t,{period:r=14,smoothingPeriod:n=r,high:i,low:s,close:o}=e;if(i.length!==s.length||s.length!==o.length)return[];let a=[],l=[],u=[],c=[];for(let e=1;e<o.length;e++){let t=i[e]-i[e-1],r=s[e-1]-s[e],n=t>r&&t>0?t:0;l.push(n);let a=r>t&&r>0?r:0;u.push(a);let h=i[e]-s[e],d=Math.abs(i[e]-o[e-1]),f=Math.abs(s[e]-o[e-1]);c.push(Math.max(h,d,f))}let h=eI(l,r),d=eI(u,r),f=eI(c,r),p=[];for(let e=0;e<h.length;e++){let t=100*h[e]/f[e],r=100*d[e]/f[e],n=Math.abs(t-r),i=t+r,s=0!==i?n/i*100:0;p.push(s)}let m=1/n,g=0,v=0;for(let e=0;e<p.length;e++){let r=p[e],i=100*h[e]/f[e],s=100*d[e]/f[e];void 0===t?(g+=r,++v===n&&(t=g/n,a.push({adx:t,pdi:i,mdi:s}))):(t=(r-t)*m+t,a.push({adx:t,pdi:i,mdi:s}))}return a}eR.calculate=eT;class eL{constructor(e){this.highValues=[],this.lowValues=[],this.closeValues=[],this.plusDMValues=[],this.minusDMValues=[],this.trValues=[],this.smaSum=0,this.smaCount=0,this.results=[],this.period=e.period||14,this.smoothingPeriod=e.smoothingPeriod||this.period,this.exponent=1/this.smoothingPeriod}nextValue(e,t,r){let n;if(this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r),this.highValues.length<2)return;let i=this.highValues[this.highValues.length-2],s=this.lowValues[this.lowValues.length-2],o=this.closeValues[this.closeValues.length-2],a=e-i,l=s-t,u=a>l&&a>0?a:0,c=l>a&&l>0?l:0,h=Math.max(e-t,Math.abs(e-o),Math.abs(t-o));if(this.plusDMValues.push(u),this.minusDMValues.push(c),this.trValues.push(h),void 0===this.smoothedPlusDM){if(this.plusDMValues.length<this.period)return;this.smoothedPlusDM=this.plusDMValues.slice(0,this.period).reduce((e,t)=>e+t,0),this.smoothedMinusDM=this.minusDMValues.slice(0,this.period).reduce((e,t)=>e+t,0),this.smoothedTR=this.trValues.slice(0,this.period).reduce((e,t)=>e+t,0)}else this.smoothedPlusDM=this.smoothedPlusDM-this.smoothedPlusDM/this.period+u,this.smoothedMinusDM=this.smoothedMinusDM-this.smoothedMinusDM/this.period+c,this.smoothedTR=this.smoothedTR-this.smoothedTR/this.period+h;let d=100*this.smoothedPlusDM/this.smoothedTR,f=100*this.smoothedMinusDM/this.smoothedTR,p=Math.abs(d-f),m=d+f,g=0!==m?p/m*100:0;return void 0===this.adxEMA?(this.smaSum+=g,this.smaCount++,this.smaCount===this.smoothingPeriod&&(this.adxEMA=this.smaSum/this.smoothingPeriod,n={adx:this.adxEMA,pdi:d,mdi:f})):(this.adxEMA=(g-this.adxEMA)*this.exponent+this.adxEMA,n={adx:this.adxEMA,pdi:d,mdi:f}),n&&this.results.push(n),n}getResult(){return this.results}}function eV(e,t){let r=[];for(let n=0;n<e.length;n++)if(n<t){let t=e.slice(0,n+1).reduce((e,t)=>e+t,0);r.push(t/(n+1))}else{let i=(r[n-1]*(t-1)+e[n])/t;r.push(i)}return r}function ez(e){let{period:t=14,adxSmoothing:r=14,high:n,low:i,close:s}=e;if(n.length!==i.length||i.length!==s.length)return[];let o=[],a=[],l=[],u=[];for(let e=1;e<s.length;e++){let t=n[e]-n[e-1],r=i[e-1]-i[e],o=t>r&&t>0?t:0;a.push(o);let c=r>t&&r>0?r:0;l.push(c);let h=n[e]-i[e],d=Math.abs(n[e]-s[e-1]),f=Math.abs(i[e]-s[e-1]);u.push(Math.max(h,d,f))}let c=eV(a,t),h=eV(l,t),d=eV(u,t),f=[];for(let e=0;e<c.length;e++){let t=0!==d[e]?100*c[e]/d[e]:0,r=0!==d[e]?100*h[e]/d[e]:0,n=Math.abs(t-r),i=t+r,s=0!==i?n/i*100:0;f.push(s)}let p=eV(f,r);for(let e=0;e<p.length;e++){let t=0!==d[e]?100*c[e]/d[e]:0,r=0!==d[e]?100*h[e]/d[e]:0;o.push({pdi:t,mdi:r,adx:p[e]})}return o}eL.calculate=eD;class eF{constructor(e){this.highValues=[],this.lowValues=[],this.closeValues=[],this.plusDMValues=[],this.minusDMValues=[],this.trValues=[],this.dxValues=[],this.results=[],this.period=e.period||14,this.adxSmoothing=e.adxSmoothing||14}nextValue(e,t,r){if(this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r),this.highValues.length<2)return;let n=this.highValues[this.highValues.length-2],i=this.lowValues[this.lowValues.length-2],s=this.closeValues[this.closeValues.length-2],o=e-n,a=i-t,l=o>a&&o>0?o:0,u=a>o&&a>0?a:0,c=Math.max(e-t,Math.abs(e-s),Math.abs(t-s));if(this.plusDMValues.push(l),this.minusDMValues.push(u),this.trValues.push(c),this.plusDMValues.length<this.period)return;if(this.plusDMValues.length===this.period){let e=this.plusDMValues.reduce((e,t)=>
1e+t,0),t=this.minusDMValues.reduce((e,t)=>e+t,0),r=this.trValues.reduce((e,t)=>e+t,0);this.smoothedPlusDM=e/this.period,this.smoothedMinusDM=t/this.period,this.smoothedTR=r/this.period}else this.smoothedPlusDM=(this.smoothedPlusDM*(this.period-1)+l)/this.period,this.smoothedMinusDM=(this.smoothedMinusDM*(this.period-1)+u)/this.period,this.smoothedTR=(this.smoothedTR*(this.period-1)+c)/this.period;let h=0!==this.smoothedTR?100*this.smoothedPlusDM/this.smoothedTR:0,d=0!==this.smoothedTR?100*this.smoothedMinusDM/this.smoothedTR:0,f=Math.abs(h-d),p=h+d,m=0!==p?f/p*100:0;if(this.dxValues.push(m),this.dxValues.length<this.adxSmoothing){let e={pdi:h,mdi:d,adx:0};return this.results.push(e),e}if(this.dxValues.length===this.adxSmoothing){let e=this.dxValues.reduce((e,t)=>e+t,0);this.smoothedDX=e/this.adxSmoothing}else this.smoothedDX=(this.smoothedDX*(this.adxSmoothing-1)+m)/this.adxSmoothing;let g={pdi:h,mdi:d,adx:this.smoothedDX||0};return this.results.push(g),g}getResult(){return this.results}}function eB(e){let{high:t,low:r,period:n=14}=e;if(!t||!r||t.length!==r.length||t.length<2)return[];let i=[];for(let e=1;e<t.length;e++){let n=t[e]-t[e-1],s=r[e-1]-r[e],o=0;n>s&&n>0&&(o=n),i.push(o)}if(i.length<n)return[];let s=[],o=i.slice(0,n).reduce((e,t)=>e+t,0);s.push(o);for(let e=n;e<i.length;e++)s.push(o=(o*(n-1)+i[e])/n);return s}eF.calculate=ez;class e${constructor(e){if(this.highValues=[],this.lowValues=[],this.period=e.period||14,e.high&&e.low&&e.high.length===e.low.length)for(let t=0;t<e.high.length;t++)this.nextValue(e.high[t],e.low[t])}nextValue(e,t){this.highValues.push(e),this.lowValues.push(t);let r=eB({high:this.highValues,low:this.lowValues,period:this.period});if(r.length>0)return r[r.length-1]}getResult(){return eB({high:this.highValues,low:this.lowValues,period:this.period})}}function eU(e){let{high:t,low:r,period:n=14}=e;if(!t||!r||t.length!==r.length||t.length<2)return[];let i=[];for(let e=1;e<t.length;e++){let n=t[e]-t[e-1],s=r[e-1]-r[e],o=0;s>n&&s>0&&(o=s),i.push(o)}if(i.length<n)return[];let s=[],o=i.slice(0,n).reduce((e,t)=>e+t,0);s.push(o);for(let e=n;e<i.length;e++)s.push(o=(o*(n-1)+i[e])/n);return s}e$.calculate=eB;class eW{constructor(e){if(this.highValues=[],this.lowValues=[],this.period=e.period||14,e.high&&e.low&&e.high.length===e.low.length)for(let t=0;t<e.high.length;t++)this.nextValue(e.high[t],e.low[t])}nextValue(e,t){this.highValues.push(e),this.lowValues.push(t);let r=eU({high:this.highValues,low:this.lowValues,period:this.period});if(r.length>0)return r[r.length-1]}getResult(){return eU({high:this.highValues,low:this.lowValues,period:this.period})}}function eH(e){let{high:t,low:r,conversionPeriod:n=9,basePeriod:i=26,spanPeriod:s=52,displacement:o=26}=e;if(!t||!r||t.length!==r.length||0===t.length)return[];let a=[],l=Math.max(n,i,s,o);for(let e=l-1;e<t.length;e++){let o=(eg({values:t.slice(e-n+1,e+1),period:n})[0]+ev({values:r.slice(e-n+1,e+1),period:n})[0])/2,l=(eg({values:t.slice(e-i+1,e+1),period:i})[0]+ev({values:r.slice(e-i+1,e+1),period:i})[0])/2,u=(o+l)/2,c={conversion:o,base:l,spanA:u,spanB:(eg({values:t.slice(e-s+1,e+1),period:s})[0]+ev({values:r.slice(e-s+1,e+1),period:s})[0])/2};a.push(c)}return a}eW.calculate=eU;class eK{constructor(e){this.highValues=[],this.lowValues=[],this.result=[],this.conversionPeriod=e.conversionPeriod||9,this.basePeriod=e.basePeriod||26,this.spanPeriod=e.spanPeriod||52,this.displacement=e.displacement||26,this.period=Math.max(this.conversionPeriod,this.basePeriod,this.spanPeriod,this.displacement),e.high&&e.low&&e.high.length===e.low.length&&(this.highValues=[...e.high],this.lowValues=[...e.low],this.result=eH({high:this.highValues,low:this.lowValues,conversionPeriod:this.conversionPeriod,basePeriod:this.basePeriod,spanPeriod:this.spanPeriod,displacement:this.displacement}))}nextValue(e,t){if(this.highValues.push(e),this.lowValues.push(t),this.highValues.length>=this.period){let e=this.highValues.length-1,t=(eg({values:this.highValues.slice(e-this.conversionPeriod+1,e+1),period:this.conversionPeriod})[0]+ev({values:this.lowValues.slice(e-this.conversionPeriod+1,e+1),period:this.conversionPeriod})[0])/2,r=(eg({values:this.highValues.slice(e-this.basePeriod+1,e+1),period:this.basePeriod})[0]+ev({values:this.lowValues.slice(e-this.basePeriod+1,e+1),period:this.basePeriod})[0])/2,n=(t+r)/2,i={conversion:t,base:r,spanA:n,spanB:(eg({values:this.highValues.slice(e-this.spanPeriod+1,e+1),period:this.spanPeriod})[0]+ev({values:this.lowValues.slice(e-this.spanPeriod+1,e+1),period:this.spanPeriod})[0])/2};return this.result.push(i),i}}getResult(){return eH({high:this.highValues,low:this.lowValues,conversionPeriod:this.conversionPeriod,basePeriod:this.basePeriod,spanPeriod:this.spanPeriod,displacement:this.displacement})}}eK.calculate=eH;let eY=eK;function eq(e,t,r){return Math.max(e-t,Math.abs(e-r),Math.abs(t-r))}function eG(e,t,r,n){if(e.length!==t.length||t.length!==r.length||r.length<n+1)return[];let i=[],s=[];for(let n=1;n<r.length;n++){let i=eq(e[n],t[n],r[n-1]);s.push(i)}let o=0;for(let e=0;e<n;e++)o+=s[e];let a=o/n;i.push(a);for(let e=n;e<s.length;e++)i.push(a=(a*(n-1)+s[e])/n);return i}function eJ(e){let t,r,n,{period:i=10,multiplier:s=3,high:o,low:a,close:l}=e;if(o.length!==a.length||a.length!==l.length||l.length<i+1)return[];let u=eG(o,a,l,i),c=[];for(let e=0;e<u.length;e++){let h,d,f,p,m=e+i,g=(o[m]+a[m])/2,v=u[e],y=g+s*v,b=g-s*v;if(0===e)h=y,d=b;else{let e=l[m-1];h=y<t||e>t?y:t,d=b>r||e<r?b:r}0===e?l[m]<=d?(f=-1,p=h):(f=1,p=d):1===n&&l[m]<=d?(f=-1,p=h):-1===n&&l[m]>=h?(f=1,p=d):p=1===(f=n)?d:h,t=h,r=d,n=f,c.push({supertrend:p,direction:f})}return c}class eX{constructor(e){this.highValues=[],this.lowValues=[],this.closeValues=[],this.trueRanges=[],this.initialized=!1,this.period=e.period||10,this.multiplier=e.multiplier||3}nextValue(e,t,r){let n,i;if(this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r),this.closeValues.length<2)return;let s=eq(e,t,this.closeValues[this.closeValues.length-2]);if(this.trueRanges.push(s),this.initialized)this.currentATR=(this.currentATR*(this.period-1)+s)/this.period;else{if(this.trueRanges.length!==this.period)return;let e=this.trueRanges.reduce((e,t)=>
1e+t,0);this.currentATR=e/this.period,this.initialized=!0}let o=(e+t)/2,a=o+this.multiplier*this.currentATR,l=o-this.multiplier*this.currentATR;if(void 0===this.previousFinalUpperBand||void 0===this.previousFinalLowerBand)n=a,i=l;else{let e=this.closeValues[this.closeValues.length-2];n=a<this.previousFinalUpperBand||e>this.previousFinalUpperBand?a:this.previousFinalUpperBand,i=l>this.previousFinalLowerBand||e<this.previousFinalLowerBand?l:this.previousFinalLowerBand}return void 0===this.previousDirection?r<=i?(this.direction=-1,this.supertrendValue=n):(this.direction=1,this.supertrendValue=i):1===this.previousDirection&&r<=i?(this.direction=-1,this.supertrendValue=n):-1===this.previousDirection&&r>=n?(this.direction=1,this.supertrendValue=i):(this.direction=this.previousDirection,this.supertrendValue=1===this.direction?i:n),this.previousFinalUpperBand=n,this.previousFinalLowerBand=i,this.previousDirection=this.direction,{supertrend:this.supertrendValue,direction:this.direction}}getResult(){return void 0===this.supertrendValue||void 0===this.direction?[]:[{supertrend:this.supertrendValue,direction:this.direction}]}}function eQ(e){let{period:t=14,high:r,low:n}=e;if(r.length!==n.length||r.length<t)return[];let i=[];for(let e=t-1;e<r.length;e++){let s=r.slice(e-t+1,e+1),o=n.slice(e-t+1,e+1),a=0,l=0;for(let e=1;e<s.length;e++)s[e]>s[a]&&(a=e),o[e]<o[l]&&(l=e);let u=t-1-a,c=t-1-l,h=(t-u)/t*100,d=(t-c)/t*100,f=h-d;i.push({aroonUp:h,aroonDown:d,aroonOscillator:f})}return i}eX.calculate=eJ;class eZ{constructor(e){this.highValues=[],this.lowValues=[],this.period=e.period||14}nextValue(e,t){if(this.highValues.push(e),this.lowValues.push(t),this.highValues.length<this.period)return;this.highValues.length>this.period&&(this.highValues.shift(),this.lowValues.shift());let r=0,n=0;for(let e=1;e<this.highValues.length;e++)this.highValues[e]>this.highValues[r]&&(r=e),this.lowValues[e]<this.lowValues[n]&&(n=e);let i=this.period-1-r,s=this.period-1-n,o=(this.period-i)/this.period*100,a=(this.period-s)/this.period*100,l=o-a;return{aroonUp:o,aroonDown:a,aroonOscillator:l}}getResult(){if(this.highValues.length<this.period)return[];let e=this.nextValue(this.highValues[this.highValues.length-1],this.lowValues[this.lowValues.length-1]);return e?[e]:[]}}function e0(e){let{period:t=14,high:r,low:n}=e;if(r.length!==n.length||r.length<t)return[];let i=[];for(let e=t-1;e<r.length;e++){let s=r.slice(e-t+1,e+1),o=n.slice(e-t+1,e+1),a=0,l=0;for(let e=1;e<s.length;e++)s[e]>s[a]&&(a=e),o[e]<o[l]&&(l=e);let u=t-1-a,c=t-1-l,h=(t-u)/t*100-(t-c)/t*100;i.push(h)}return i}eZ.calculate=eQ;class e1{constructor(e){this.highValues=[],this.lowValues=[],this.period=e.period||14}nextValue(e,t){if(this.highValues.push(e),this.lowValues.push(t),this.highValues.length<this.period)return;this.highValues.length>this.period&&(this.highValues.shift(),this.lowValues.shift());let r=0,n=0;for(let e=1;e<this.highValues.length;e++)this.highValues[e]>this.highValues[r]&&(r=e),this.lowValues[e]<this.lowValues[n]&&(n=e);let i=this.period-1-r,s=this.period-1-n;return(this.period-i)/this.period*100-(this.period-s)/this.period*100}getResult(){if(this.highValues.length<this.period)return[];let e=this.nextValue(this.highValues[this.highValues.length-1],this.lowValues[this.lowValues.length-1]);return void 0!==e?[e]:[]}}function e2(e,t){if(e.length<t)return{};let r=e.slice(-t),n=r.length,i=n*(n-1)/2,s=n*(n-1)*(2*n-1)/6,o=r.reduce((e,t)=>e+t,0),a=0;for(let e=0;e<n;e++)a+=e*r[e];let l=(n*a-i*o)/(n*s-i*i),u=(o-l*i)/n,c=l*n+u,h=o/n,d=0,f=0;for(let e=0;e<n;e++){let t=l*e+u;d+=Math.pow(r[e]-h,2),f+=Math.pow(r[e]-t,2)}return{slope:l,intercept:u,forecast:c,rSquared:1-f/d}}function e3(e){let{period:t=14,values:r}=e;if(r.length<t)return[];let n=[];for(let e=t-1;e<r.length;e++){let i=e2(r.slice(e-t+1,e+1),t);n.push(i)}return n}e1.calculate=e0;class e5{constructor(e){this.values=[],this.period=e.period||14}nextValue(e){if(this.values.push(e),!(this.values.length<this.period))return this.values.length>this.period&&this.values.shift(),e2(this.values,this.period)}getResult(){return this.values.length<this.period?[]:[e2(this.values,this.period)]}}function e4(e,t){if(e.length<t)return[];let r=[];for(let n=t-1;n<e.length;n++){let i=e.slice(n-t+1,n+1).reduce((e,t)=>
1e+t,0);r.push(i/t)}return r}function e8(e,t){if(e.length<t)return[];let r=[],n=2/(t+1),i=e.slice(0,t).reduce((e,t)=>e+t,0)/t;r.push(i);for(let s=t;s<e.length;s++)r.push(i=(e[s]-i)*n+i);return r}function e6(e){let{period:t=20,percentage:r=2.5,values:n,maType:i="sma"}=e;if(n.length<t)return[];let s="ema"===i?e8(n,t):e4(n,t),o=[];for(let e=0;e<s.length;e++){let t=s[e],n=r/100*t;o.push({upper:t+n,middle:t,lower:t-n})}return o}e5.calculate=e3;class e7{constructor(e){this.values=[],this.period=e.period||20,this.percentage=e.percentage||2.5,this.maType=e.maType||"sma",this.multiplier=2/(this.period+1)}nextValue(e){let t;if(this.values.push(e),"sma"===this.maType){if(this.values.length<this.period)return;this.values.length>this.period&&this.values.shift(),t=this.values.reduce((e,t)=>e+t,0)/this.period}else{if(this.values.length<this.period)return;if(void 0===this.currentEMA){let e=this.values.slice(-this.period).reduce((e,t)=>e+t,0);this.currentEMA=e/this.period,t=this.currentEMA}else this.currentEMA=(e-this.currentEMA)*this.multiplier+this.currentEMA,t=this.currentEMA}let r=t*(this.percentage/100);return{upper:t+r,middle:t,lower:t-r}}getResult(){if(this.values.length<this.period)return[];let e=this.nextValue(this.values[this.values.length-1]);return e?[e]:[]}}function e9(e,t,r,n){let i,s,o,a,l,u,c,h,d=(e+t+r)/3;switch(n){case"fibonacci":i=d+.382*(e-t),s=d+.618*(e-t),o=d+ +(e-t),l=d-.382*(e-t),u=d-.618*(e-t),c=d-(e-t);break;case"camarilla":i=r+(e-t)*1.1/12,s=r+(e-t)*1.1/6,o=r+(e-t)*1.1/4,a=r+(e-t)*1.1/2,l=r-(e-t)*1.1/12,u=r-(e-t)*1.1/6,c=r-(e-t)*1.1/4,h=r-(e-t)*1.1/2;break;case"woodie":let f=(e+t+2*r)/4;return i=2*f-t,s=f+(e-t),o=e+2*(f-t),l=2*f-e,u=f-(e-t),c=t-2*(e-f),{pivot:f,r1:i,r2:s,r3:o,s1:l,s2:u,s3:c};default:i=2*d-t,s=d+(e-t),o=e+2*(d-t),l=2*d-e,u=d-(e-t),c=t-2*(e-d)}return{pivot:d,r1:i,r2:s,r3:o,r4:a,s1:l,s2:u,s3:c,s4:h}}function te(e){let{high:t,low:r,close:n,type:i="standard"}=e;if(t.length!==r.length||r.length!==n.length||0===t.length)return[];let s=[];s.push({});for(let e=1;e<t.length;e++){let o=e9(t[e-1],r[e-1],n[e-1],i);s.push(o)}return s}e7.calculate=e6;class tt{constructor(e){this.results=[],this.type=e.type||"standard"}nextValue(e,t,r){let n;return n=void 0!==this.previousHigh&&void 0!==this.previousLow&&void 0!==this.previousClose?e9(this.previousHigh,this.previousLow,this.previousClose,this.type):{},this.results.push(n),this.previousHigh=e,this.previousLow=t,this.previousClose=r,n}getResult(){return this.results}}function tr(e){let{candles:t}=e,r=[];for(let e of t){let{open:t,high:n,low:i,close:s}=e,o=n-i,a=Math.abs(s-t)<=.001*o&&o>0;r.push(a)}return r}tt.calculate=te;class tn{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let{open:t,high:r,low:n,close:i}=e,s=r-n;return Math.abs(i-t)<=.001*s&&s>0}getResult(){if(0===this.candles.length)return[];let{open:e,high:t,low:r,close:n}=this.candles[this.candles.length-1],i=t-r;return[Math.abs(n-e)<=.001*i&&i>0]}}function ti(e){let{candles:t}=e,r=[];if(t.length<2)return t.map(()=>!1);r.push(!1);for(let e=1;e<t.length;e++){let n=t[e-1],i=t[e],s=n.close<n.open,o=i.close>i.open,a=i.open<n.close&&i.close>n.open,l=s&&o&&a;r.push(l)}return r}function ts(e){let{candles:t}=e,r=[];if(t.length<2)return t.map(()=>!1);r.push(!1);for(let e=1;e<t.length;e++){let n=t[e-1],i=t[e],s=n.close>n.open,o=i.close<i.open,a=i.open>n.close&&i.close<n.open,l=s&&o&&a;r.push(l)}return r}tn.calculate=tr;class to{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){if(this.candles.push(e),this.candles.length<2)return!1;let t=this.candles[this.candles.length-2],r=e,n=t.close<t.open,i=r.close>r.open,s=r.open<t.close&&r.close>t.open;return n&&i&&s}}to.calculate=ti;class ta{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){if(this.candles.push(e),this.candles.length<2)return!1;let t=this.candles[this.candles.length-2],r=e,n=t.close>t.open,i=r.close<r.open,s=r.open>t.close&&r.close<t.open;return n&&i&&s}}function tl(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=c>0&&a<c/3&&u>=2*a&&l<=a&&Math.min(n,o)-s>=.6*c;r.push(h)}return r}ta.calculate=ts;class tu{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),tl({candles:[e]})[0]||!1}getResult(){return tl({candles:this.candles})}}function tc(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=c>0&&a<c/3&&u>=2*a&&l<=a&&Math.min(n,o)-s>=.6*c;r.push(h)}return r}tu.calculate=tl;class th{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),tc({candles:[e]})[0]||!1}getResult(){return tc({candles:this.candles})}}function td(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=c>0&&a<c/3&&l>=2*a&&u<=a&&i-Math.max(n,o)>=.6*c;r.push(h)}return r}th.calculate=tc;class tf{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),td({candles:[e]})[0]||!1}getResult(){return td({candles:this.candles})}}function tp(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=c>0&&a<c/3&&l>=a&&u>=a&&a>0;r.push(h)}return r}tf.calculate=td;class tm{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),tp({candles:[e]})[0]||!1}getResult(){return tp({candles:this.candles})}}function tg(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=.05*c,d=c>0&&a>=.9*c&&l<=h&&u<=h;r.push(d)}return r}tm.calculate=tp;class tv{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),tg({candles:[e]})[0]||!1}getResult(){return tg({candles:this.candles})}}function ty(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=.05*c,d=.05*c,f=c>0&&a<=h&&l<=d&&u>=.6*c&&Math.max(n,o)>=i-d;r.push(f)}return r}tv.calculate=tg;class tb{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),ty({candles:[e]})[0]||!1}getResult(){return ty({candles:this.candles})}}function tw(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=.05*c,d=.05*c,f=c>0&&a<=h&&u<=d&&l>=.6*c&&Math.min(n,o)<=s+d;
1r.push(f)}return r}tb.calculate=ty;class tx{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),tw({candles:[e]})[0]||!1}getResult(){return tw({candles:this.candles})}}function tS(e){let{candles:t}=e;if(!t||t.length<3)return Array(t?.length||0).fill(!1);let r=[];r.push(!1,!1);for(let e=2;e<t.length;e++){let n=t[e-2],i=t[e-1],s=t[e],o=n.close>n.open,a=i.close>i.open,l=s.close>s.open,u=i.close>n.close&&s.close>i.close,c=i.open>=n.open&&i.open<=n.close&&s.open>=i.open&&s.open<=i.close,h=Math.abs(n.close-n.open),d=n.high-n.low,f=Math.abs(i.close-i.open),p=i.high-i.low,m=Math.abs(s.close-s.open),g=s.high-s.low,v=d>0&&p>0&&g>0&&h>=.6*d&&f>=.6*p&&m>=.6*g,y=o&&a&&l&&u&&c&&v;r.push(y)}return r}tx.calculate=tw;class t_{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=tS({candles:this.candles});return t[t.length-1]||!1}getResult(){return tS({candles:this.candles})}}function tM(e){let{candles:t}=e;if(!t||t.length<3)return Array(t?.length||0).fill(!1);let r=[];r.push(!1,!1);for(let e=2;e<t.length;e++){let n=t[e-2],i=t[e-1],s=t[e],o=n.close<n.open,a=i.close<i.open,l=s.close<s.open,u=i.close<n.close&&s.close<i.close,c=i.open<=n.open&&i.open>=n.close&&s.open<=i.open&&s.open>=i.close,h=Math.abs(n.close-n.open),d=n.high-n.low,f=Math.abs(i.close-i.open),p=i.high-i.low,m=Math.abs(s.close-s.open),g=s.high-s.low,v=d>0&&p>0&&g>0&&h>=.6*d&&f>=.6*p&&m>=.6*g,y=o&&a&&l&&u&&c&&v;r.push(y)}return r}t_.calculate=tS;class tO{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=tM({candles:this.candles});return t[t.length-1]||!1}getResult(){return tM({candles:this.candles})}}function tE(e){let{candles:t}=e;if(!t||t.length<2)return Array(t?.length||0).fill(!1);let r=[];r.push(!1);for(let e=1;e<t.length;e++){let n=t[e-1],i=t[e],s=n.close<n.open,o=i.close>i.open,a=Math.max(n.open,n.close),l=Math.min(n.open,n.close),u=Math.max(i.open,i.close),c=Math.min(i.open,i.close),h=u<a&&c>l,d=Math.abs(n.close-n.open),f=n.high-n.low,p=f>0&&d>=.6*f,m=s&&o&&h&&p;r.push(m)}return r}tO.calculate=tM;class tP{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=tE({candles:this.candles});return t[t.length-1]||!1}getResult(){return tE({candles:this.candles})}}function tk(e){let{candles:t}=e;if(!t||t.length<2)return Array(t?.length||0).fill(!1);let r=[];r.push(!1);for(let e=1;e<t.length;e++){let n=t[e-1],i=t[e],s=n.close>n.open,o=i.close<i.open,a=Math.max(n.open,n.close),l=Math.min(n.open,n.close),u=Math.max(i.open,i.close),c=Math.min(i.open,i.close),h=u<a&&c>l,d=Math.abs(n.close-n.open),f=n.high-n.low,p=f>0&&d>=.6*f,m=s&&o&&h&&p;r.push(m)}return r}tP.calculate=tE;class tA{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=tk({candles:this.candles});return t[t.length-1]||!1}getResult(){return tk({candles:this.candles})}}function tj(e){let{candles:t}=e;if(!t||t.length<2)return Array(t?.length||0).fill(!1);let r=[];r.push(!1);for(let e=1;e<t.length;e++){let n=t[e-1],i=t[e],s=n.close<n.open,o=i.close>i.open,a=i.open<n.low,l=(n.open+n.close)/2,u=i.close>l,c=Math.abs(n.close-n.open),h=n.high-n.low,d=Math.abs(i.close-i.open),f=i.high-i.low,p=h>0&&c>=.6*h,m=f>0&&d>=.6*f,g=s&&o&&a&&u&&p&&m;r.push(g)}return r}tA.calculate=tk;class tC{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=tj({candles:this.candles});return t[t.length-1]||!1}getResult(){return tj({candles:this.candles})}}function tN(e){let{candles:t}=e;if(!t||t.length<2)return Array(t?.length||0).fill(!1);let r=[];r.push(!1);for(let e=1;e<t.length;e++){let n=t[e-1],i=t[e],s=n.close>n.open,o=i.close<i.open,a=i.open>n.high,l=(n.open+n.close)/2,u=i.close<l,c=Math.abs(n.close-n.open),h=n.high-n.low,d=Math.abs(i.close-i.open),f=i.high-i.low,p=h>0&&c>=.6*h,m=f>0&&d>=.6*f,g=s&&o&&a&&u&&p&&m;r.push(g)}return r}tC.calculate=tj;class tT{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=tN({candles:this.candles});return t[t.length-1]||!1}getResult(){return tN({candles:this.candles})}}function tR(e){let{candles:t}=e;if(!t||t.length<3)return Array(t?.length||0).fill(!1);let r=[];r.push(!1,!1);for(let e=2;e<t.length;e++){let n=t[e-2],i=t[e-1],s=t[e],o=n.close<n.open,a=s.close>s.open,l=Math.abs(n.close-n.open),u=n.high-n.low,c=u>0&&l>=.6*u,h=Math.abs(i.close-i.open),d=i.high-i.low,f=d>0&&h<=.3*d,p=i.high<n.low,m=(n.open+n.close)/2,g=s.close>m,v=Math.abs(s.close-s.open),y=s.high-s.low,b=y>0&&v>=.4*y,w=o&&c&&f&&p&&a&&b&&g;r.push(w)}return r}tT.calculate=tN;class tI{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=tR({candles:this.candles});return t[t.length-1]||!1}getResult(){return tR({candles:this.candles})}}function tD(e){let{candles:t}=e;if(!t||t.length<3)return Array(t?.length||0).fill(!1);let r=[];r.push(!1,!1);for(let e=2;e<t.length;e++){let n=t[e-2],i=t[e-1],s=t[e],o=n.close>n.open,a=s.close<s.open,l=Math.abs(n.close-n.open),u=n.high-n.low,c=u>0&&l>=.6*u,h=Math.abs(i.close-i.open),d=i.high-i.low,f=d>0&&h<=.3*d,p=i.low>n.high,m=(n.open+n.close)/2,g=s.close<m,v=Math.abs(s.close-s.open),y=s.high-s.low,b=y>0&&v>=.4*y,w=o&&c&&f&&p&&a&&b&&g;r.push(w)}return r}tI.calculate=tR;class tL{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=tD({candles:this.candles});return t[t.length-1]||!1}getResult(){return tD({candles:this.candles})}}function tV(e){let{candles:t}=e;if(!t||t.length<2)return Array(t?.length||0).fill(!1);let r=[];r.push(!1);for(let e=1;e<t.length;e++){let n=t[e-1],i=t[e],s=n.close<n.open,o=i.close>i.open,a=.001*((n.low+i.low)/2),l=Math.abs(n.low-i.low)<=a,u=Math.abs(n.close-n.open),c=n.high-n.low,h=Math.abs(i.close-i.open),d=i.high-i.low,f=c>0&&u>=.3*c,p=d>0&&h>=.3*d,m=n.low<=Math.min(n.open,n.close),g=i.low<=Math.min(i.open,i.close),v=l&&s&&o&&f&&p&&m&&g;r.push(v)}return r}tL.calculate=tD;class tz{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=tV({candles:this.candles});return t[t.length-1]||!1}getResult(){return tV({candles:this.candles})}}function tF(e){let{candles:t}=e;if(!t||t.length<2)return Array(t?.length||0).fill(!1);let r=[];r.push(!1);for(let e=1;e<t.length;e++){let n=t[e-1],i=t[e],s=n.close>n.open,o=i.close<i.open,a=.001*((n.high+i.high)/2),l=Math.abs(n.high-i.high)<=a,u=Math.abs(n.close-n.open),c=n.high-n.low,h=Math.abs(i.close-i.open),d=i.high-i.low,f=c>0&&u>=.3*c,p=d>0&&h>=.3*d,m=n.high>=Math.max(n.open,n.close),g=i.high>=Math.max(i.open,i.close),v=l&&s&&o&&f&&p&&m&&g;r.push(v)}return r}tz.calculate=tV;class tB{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=tF({candles:this.candles});return t[t.length-1]||!1}getResult(){return tF({candles:this.candles})}}function t$(e){let{candles:t}=e;if(!t||t.length<3)return Array(t?.length||0).fill(!1);let r=[];r.push(!1,!1);for(let e=2;e<t.length;e++){let n=t[e-2],i=t[e-1],s=t[e],o=Math.abs(i.close-i.open),a=i.high-i.low,l=a>0&&o<=.1*a,u=i.high<n.low,c=i.low>n.high,h=i.high<s.low,d=i.low>s.high,f=(u||c)&&(h||d),p=n.close<n.open,m=n.close>n.open,g=s.close<s.open,v=s.close>s.open,y=p&&v||m&&g,b=Math.abs(n.close-n.open),w=n.high-n.low,x=Math.abs(s.close-s.open),S=s.high-s.low,_=w>0&&b>=.5*w,M=S>0&&x>=.5*S,O=l&&f&&y&&_&&M;r.push(O)}return r}tB.calculate=tF;class tU{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=t$({candles:this.candles});return t[t.length-1]||!1}getResult(){return t$({candles:this.candles})}}function tW(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=o>n,l=Math.abs(o-n),u=i-Math.max(n,o),c=Math.min(n,o)-s,h=i-s,d=.02*h,f=h>0&&a&&l>=.95*h&&u<=d&&c<=d&&Math.abs(n-s)<=d&&Math.abs(o-i)<=d;r.push(f)}return r}tU.calculate=t$;class tH{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),tW({candles:[e]})[0]||!1}getResult(){return tW({candles:this.candles})}}function tK(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=o<n,l=Math.abs(o-n),u=i-Math.max(n,o),c=Math.min(n,o)-s,h=i-s,d=.02*h,f=h>0&&a&&l>=.95*h&&u<=d&&c<=d&&Math.abs(n-i)<=d&&Math.abs(o-s)<=d;r.push(f)}return r}tH.calculate=tW;class tY{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),tK({candles:[e]})[0]||!1}getResult(){return tK({candles:this.candles})}}function tq(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=c>0&&a<c/3&&l>=2*a&&u<=.5*a&&Math.min(n,o)-s<=.3*c;r.push(h)}return r}tY.calculate=tK;class tG{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),tq({candles:[e]})[0]||!1}getResult(){return tq({candles:this.candles})}}function tJ(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=c>0&&a<c/3&&l>=2*a&&u<=.5*a&&Math.min(n,o)-s<=.3*c;r.push(h)}return r}tG.calculate=tq;class tX{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),tJ({candles:[e]})[0]||!1}getResult(){return tJ({candles:this.candles})}}function tQ(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=o>n,l=Math.abs(o-n),u=i-Math.max(n,o),c=Math.min(n,o)-s,h=i-s,d=h>0&&a&&l<h/3&&u>=2*l&&c<=.5*l&&Math.min(n,o)-s<=.3*h;r.push(d)}return r}tX.calculate=tJ;class tZ{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),tQ({candles:[e]})[0]||!1}getResult(){return tQ({candles:this.candles})}}function t0(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=o<n,l=Math.abs(o-n),u=i-Math.max(n,o),c=Math.min(n,o)-s,h=i-s,d=h>0&&a&&l<h/3&&u>=2*l&&c<=.5*l&&Math.min(n,o)-s<=.3*h;r.push(d)}return r}tZ.calculate=tQ;class t1{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),t0({candles:[e]})[0]||!1}getResult(){return t0({candles:this.candles})}}function t2(e){let{candles:t}=e;if(!t||t.length<3)return Array(t?.length||0).fill(!1);let r=[];r.push(!1,!1);for(let e=2;e<t.length;e++){let n=t[e-2],i=t[e-1],s=t[e],o=n.close<n.open,a=s.close>s.open,l=Math.abs(n.close-n.open),u=n.high-n.low,c=u>0&&l>=.6*u,h=Math.abs(i.close-i.open),d=i.high-i.low,f=d>0&&h<=.1*d,p=i.high<n.low,m=(n.open+n.close)/2,g=s.close>m,v=Math.abs(s.close-s.open),y=s.high-s.low,b=y>0&&v>=.4*y,w=o&&c&&f&&p&&a&&b&&g;r.push(w)}return r}t1.calculate=t0;class t3{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=t2({candles:this.candles});return t[t.length-1]||!1}getResult(){return t2({candles:this.candles})}}function t5(e){let{candles:t}=e;if(!t||t.length<3)return Array(t?.length||0).fill(!1);let r=[];r.push(!1,!1);for(let e=2;e<t.length;e++){let n=t[e-2],i=t[e-1],s=t[e],o=n.close>n.open,a=s.close<s.open,l=Math.abs(n.close-n.open),u=n.high-n.low,c=u>0&&l>=.6*u,h=Math.abs(i.close-i.open),d=i.high-i.low,f=d>0&&h<=.1*d,p=i.low>n.high,m=(n.open+n.close)/2,g=s.close<m,v=Math.abs(s.close-s.open),y=s.high-s.low,b=y>0&&v>=.4*y,w=o&&c&&f&&p&&a&&b&&g;r.push(w)}return r}t3.calculate=t2;class t4{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=t5({candles:this.candles});return t[t.length-1]||!1}getResult(){return t5({candles:this.candles})}}function t8(e){let{candles:t}=e;if(!t||t.length<3)return Array(t?.length||0).fill(!1);let r=[];r.push(!1,!1);for(let e=2;e<t.length;e++){let n=t[e-2],i=t[e-1],s=t[e],o=n.close<n.open,a=i.close<i.open,l=s.close>s.open,u=i.high<n.low,c=s.open>=i.low&&s.open<=i.high,h=s.close>i.high&&s.close<n.low,d=Math.abs(n.close-n.open),f=n.high-n.low,p=Math.abs(i.close-i.open),m=i.high-i.low,g=Math.abs(s.close-s.open),v=s.high-s.low,y=f>0&&d>=.5*f,b=m>0&&p>=.5*m,w=v>0&&g>=.5*v,x=o&&a&&l&&u&&c&&h&&y&&b&&w;r.push(x)}return r}t4.calculate=t5;class t6{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=t8({candles:this.candles});return t[t.length-1]||!1}getResult(){return t8({candles:this.candles})}}function t7(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=o>n,l=Math.abs(o-n),u=i-Math.max(n,o),c=Math.min(n,o)-s,h=i-s,d=h>0&&a&&l<h/3&&u>=l&&c>=l&&l>0;r.push(d)}return r}t6.calculate=t8;class t9{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),t7({candles:[e]})[0]||!1}getResult(){return t7({candles:this.candles})}}function re(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=o<n,l=Math.abs(o-n),u=i-Math.max(n,o),c=Math.min(n,o)-s,h=i-s,d=h>0&&a&&l<h/3&&u>=l&&c>=l&&l>0;r.push(d)}return r}t9.calculate=t7;class rt{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),re({candles:[e]})[0]||!1}getResult(){return re({candles:this.candles})}}function rr(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,close:i}=t[e],s=i>n;r.push(s)}return r}rt.calculate=re;class rn{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),e.close>e.open}getResult(){return rr({candles:this.candles})}}function ri(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,close:i}=t[e],s=i<n;r.push(s)}return r}rn.calculate=rr;class rs{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),e.close<e.open}getResult(){return ri({candles:this.candles})}}function ro(e){let{candles:t}=e;if(!t||t.length<2)return Array(t?.length||0).fill(!1);let r=[];r.push(!1);for(let e=1;e<t.length;e++){let n=t[e-1],i=t[e],s=n.close<n.open,o=Math.abs(i.close-i.open),a=i.high-i.low,l=a>0&&o<=.1*a,u=Math.max(n.open,n.close),c=Math.min(n.open,n.close),h=i.high,d=i.low,f=h<u&&d>c,p=Math.abs(n.close-n.open),m=n.high-n.low,g=m>0&&p>=.6*m,v=s&&l&&f&&g;r.push(v)}return r}rs.calculate=ri;class ra{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=ro({candles:this.candles});return t[t.length-1]||!1}getResult(){return ro({candles:this.candles})}}function rl(e){let{candles:t}=e;if(!t||t.length<2)return Array(t?.length||0).fill(!1);let r=[];r.push(!1);for(let e=1;e<t.length;e++){let n=t[e-1],i=t[e],s=n.close>n.open,o=Math.abs(i.close-i.open),a=i.high-i.low,l=a>0&&o<=.1*a,u=Math.max(n.open,n.close),c=Math.min(n.open,n.close),h=i.high,d=i.low,f=h<u&&d>c,p=Math.abs(n.close-n.open),m=n.high-n.low,g=m>0&&p>=.6*m,v=s&&l&&f&&g;r.push(v)}return r}ra.calculate=ro;class ru{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){this.candles.push(e);let t=rl({candles:this.candles});return t[t.length-1]||!1}getResult(){return rl({candles:this.candles})}}function rc(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=c>0&&a<c/2&&u>=1.5*a&&l<=1.2*a&&Math.min(n,o)-s>=.5*c;r.push(h)}return r}ru.calculate=rl;class rh{constructor(e){this.candles=[],e?.candles?.length&&(this.
1candles=[...e.candles])}nextValue(e){return this.candles.push(e),rc({candles:[e]})[0]||!1}getResult(){return rc({candles:this.candles})}}function rd(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=c>0&&a<c/2&&u>=1.5*a&&l<=1.2*a&&Math.min(n,o)-s>=.5*c;r.push(h)}return r}rh.calculate=rc;class rf{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),rd({candles:[e]})[0]||!1}getResult(){return rd({candles:this.candles})}}function rp(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=Math.abs(o-n),l=i-Math.max(n,o),u=Math.min(n,o)-s,c=i-s,h=c>0&&a<c/2&&l>=1.5*a&&u<=1.2*a&&i-Math.max(n,o)>=.5*c;r.push(h)}return r}rf.calculate=rd;class rm{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),rp({candles:[e]})[0]||!1}getResult(){return rp({candles:this.candles})}}function rg(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=o>n,l=Math.abs(o-n),u=i-Math.max(n,o),c=Math.min(n,o)-s,h=i-s,d=h>0&&a&&l<h/3&&c>=2*l&&u<=l&&Math.min(n,o)-s>=.6*h;r.push(d)}return r}rm.calculate=rp;class rv{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),rg({candles:[e]})[0]||!1}getResult(){return rg({candles:this.candles})}}function ry(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[];for(let e=0;e<t.length;e++){let{open:n,high:i,low:s,close:o}=t[e],a=o<n,l=Math.abs(o-n),u=i-Math.max(n,o),c=Math.min(n,o)-s,h=i-s,d=h>0&&a&&l<h/3&&c>=2*l&&u<=l&&Math.min(n,o)-s>=.6*h;r.push(d)}return r}rv.calculate=rg;class rb{constructor(e){this.candles=[],e?.candles?.length&&(this.candles=[...e.candles])}nextValue(e){return this.candles.push(e),ry({candles:[e]})[0]||!1}getResult(){return ry({candles:this.candles})}}function rw(e){let{values:t,period:r}=e;if(!t||t.length<r||r<=0)return[];let n=[],i=t.slice(0,r).reduce((e,t)=>e+t,0)/r;n.push(i);for(let e=r;e<t.length;e++)n.push(i=(i*(r-1)+t[e])/r);return n}rb.calculate=ry;class rx{constructor(e){this.values=[],this.initialized=!1,this.period=e.period,e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),!(this.values.length<this.period))return this.initialized?this.smoothedValue=(this.smoothedValue*(this.period-1)+e)/this.period:(this.smoothedValue=this.values.slice(-this.period).reduce((e,t)=>e+t,0)/this.period,this.initialized=!0),this.smoothedValue}getResult(){return rw({values:this.values,period:this.period})}}rx.calculate=rw;class rS{constructor(e=2){this.precision=e}format(e){return"number"==typeof e&&isFinite(e)?parseFloat(e.toFixed(this.precision)):e}static format(e,t=2){return"number"==typeof e&&isFinite(e)?parseFloat(e.toFixed(t)):e}static formatArray(e,t=2){return e.map(e=>rS.format(e,t))}setPrecision(e){this.precision=e}getPrecision(){return this.precision}}function r_(e,t=2){return rS.format(e,t)}function rM(e,t=2){return rS.formatArray(e,t)}class rO{constructor(e){this.values=[],this.gains=[],this.avgGain=0,this.initialized=!1,this.period=e.period,e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),this.values.length<2)return;let t=e-this.values[this.values.length-2],r=t>0?t:0;return(this.gains.push(r),this.initialized)?(this.avgGain=(this.avgGain*(this.period-1)+r)/this.period,this.avgGain):this.gains.length===this.period?(this.avgGain=this.gains.reduce((e,t)=>e+t,0)/this.period,this.initialized=!0,this.avgGain):void 0}getResult(){return this.initialized?[this.avgGain]:[]}}rO.calculate=ew;class rE{constructor(e){this.values=[],this.losses=[],this.avgLoss=0,this.initialized=!1,this.period=e.period,e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),this.values.length<2)return;
1let t=e-this.values[this.values.length-2],r=t<0?Math.abs(t):0;return(this.losses.push(r),this.initialized)?(this.avgLoss=(this.avgLoss*(this.period-1)+r)/this.period,this.avgLoss):this.losses.length===this.period?(this.avgLoss=this.losses.reduce((e,t)=>e+t,0)/this.period,this.initialized=!0,this.avgLoss):void 0}getResult(){return this.initialized?[this.avgLoss]:[]}}rE.calculate=ex;class rP{constructor(e){this.values=[],this.period=e.period,e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),this.values.length>this.period&&this.values.shift(),this.values.length===this.period){let e=this.values.reduce((e,t)=>e+t,0)/this.period;return Math.sqrt(this.values.map(t=>Math.pow(t-e,2)).reduce((e,t)=>e+t,0)/this.period)}}getResult(){if(this.values.length<this.period)return[];let e=this.values.reduce((e,t)=>e+t,0)/this.period;return[Math.sqrt(this.values.map(t=>Math.pow(t-e,2)).reduce((e,t)=>e+t,0)/this.period)]}}rP.calculate=ey;class rk{constructor(e){this.data=[],this.maxSize=e}push(e){this.data.length>=this.maxSize&&this.data.shift(),this.data.push(e)}get(e){return this.data[e]}toArray(){return[...this.data]}get length(){return this.data.length}shift(){return this.data.shift()}pop(){return this.data.pop()}isFull(){return this.data.length>=this.maxSize}clear(){this.data=[]}getLast(e=1){return this.data.slice(-e)}getFirst(e=1){return this.data.slice(0,e)}}class rA{constructor(e){this.candles=[],e&&(this.candles=[...e])}add(e){this.candles.push(e)}get(e){return this.candles[e]}getCandles(){return[...this.candles]}get length(){return this.candles.length}slice(e,t){return this.candles.slice(e,t)}getLast(e=1){return this.candles.slice(-e)}getHigh(){return this.candles.map(e=>e.high)}getLow(){return this.candles.map(e=>e.low)}getOpen(){return this.candles.map(e=>e.open)}getClose(){return this.candles.map(e=>e.close)}getVolume(){return this.candles.map(e=>e.volume||0)}}class rj{constructor(e){this.values=[],this.period=e.period,e.values?.length&&e.values.forEach(e=>this.nextValue(e))}nextValue(e){if(this.values.push(e),this.values.length>this.period&&this.values.shift(),this.values.length===this.period)return this.values.reduce((e,t)=>e+t,0)}getResult(){return this.values.length<this.period?[]:[this.values.reduce((e,t)=>e+t,0)]}}rj.calculate=eb;class rC{constructor(){this.lineA=[],this.lineB=[]}nextValue(e,t){if(this.lineA.push(e),this.lineB.push(t),this.lineA.length<2)return!1;let r=this.lineA[this.lineA.length-2],n=this.lineB[this.lineB.length-2],i=e,s=t;return r<=n&&i>s}}rC.calculate=eS;class rN{constructor(){this.lineA=[],this.lineB=[]}nextValue(e,t){if(this.lineA.push(e),this.lineB.push(t),this.lineA.length<2)return!1;let r=this.lineA[this.lineA.length-2],n=this.lineB[this.lineB.length-2],i=e,s=t;return r>=n&&i<s}}function rT(e){let{candles:t}=e;if(!t||0===t.length)return[];let r=[],n=null;for(let e=0;e<t.length;e++){let i,s,o,a,{open:l,high:u,low:c,close:h}=t[e];s=(l+u+c+h)/4,o=Math.max(u,i=null===n?(l+h)/2:(n.open+n.close)/2,s),a=Math.min(c,i,s);let d={open:i,high:o,low:a,close:s};r.push(d),n=d}return r}rN.calculate=e_;class rR{constructor(e){this.candles=[],this.previousHA=null,e?.candles?.length&&e.candles.forEach(e=>this.nextValue(e))}nextValue(e){let t,r,n,i;this.candles.push(e);let{open:s,high:o,low:a,close:l}=e;r=(s+o+a+l)/4,n=Math.max(o,t=null===this.previousHA?(s+l)/2:(this.previousHA.open+this.previousHA.close)/2,r),i=Math.min(a,t,r);let u={open:t,high:n,low:i,close:r};return this.previousHA=u,u}getResult(){return rT({candles:this.candles})}}function rI(e){let{candles:t,brickSize:r}=e;if(!t||0===t.length||r<=0)return[];let n=[],i=null;for(let e=0;e<t.length;e++){let s,o,a,l=t[e].close;if(null===i){i={open:l,close:l+r,high:l+r,low:l,trend:1},n.push({...i});continue}if(1===i.trend)if(l>=i.close+r)o=Math.floor((s=l-i.close)/r),a=1;else{if(!(l<=i.open-r))continue;o=Math.floor((s=i.open-l)/r),a=-1}else if(l<=i.close-r)o=Math.floor((s=i.close-l)/r),a=-1;else{if(!(l>=i.open+r))continue;o=Math.floor((s=l-i.open)/r),a=1}for(let e=0;e<o;e++){let t,s;s=1===a?(t=-1===i.trend&&0===e?i.open:i.close)+r:(t=1===i.trend&&0===e?i.open:i.close)-r,
1i={open:t,close:s,high:Math.max(t,s),low:Math.min(t,s),trend:a},n.push({...i})}}return n}rR.calculate=rT;class rD{constructor(e){this.candles=[],this.brickSize=e.brickSize,e.candles?.length&&e.candles.forEach(e=>this.nextValue(e))}nextValue(e){return this.candles.push(e),rI({candles:this.candles,brickSize:this.brickSize})}getResult(){return rI({candles:this.candles,brickSize:this.brickSize})}}function rL(e){let{high:t,low:r,close:n}=e;if(!t||!r||!n||t.length!==r.length||r.length!==n.length||0===t.length)return[];let i=[];for(let e=0;e<t.length;e++){let s=(t[e]+r[e]+n[e])/3;i.push(s)}return i}rD.calculate=rI;class rV{constructor(e){if(this.highValues=[],this.lowValues=[],this.closeValues=[],e?.high&&e.low&&e.close&&e.high.length===e.low.length&&e.low.length===e.close.length)for(let t=0;t<e.high.length;t++)this.nextValue(e.high[t],e.low[t],e.close[t])}nextValue(e,t,r){return this.highValues.push(e),this.lowValues.push(t),this.closeValues.push(r),(e+t+r)/3}getResult(){return rL({high:this.highValues,low:this.lowValues,close:this.closeValues})}}rV.calculate=rL;let rz=[0,.236,.382,.5,.618,.786,1],rF=[1.272,1.414,1.618,2,2.618];function rB(e){let{high:t,low:r,trend:n="down"}=e;if(t<=r)throw Error("High must be greater than low");let i=t-r,s=[];for(let e of rz){let o;o="down"===n?r+i*e:t-i*e,s.push({level:e,value:o,percentage:`${(100*e).toFixed(1)}%`})}return s}function r$(e){let{high:t,low:r,trend:n="down"}=e;if(t<=r)throw Error("High must be greater than low");let i=t-r,s=[];for(let e of rF){let o;o="down"===n?r-i*(e-1):t+i*(e-1),s.push({level:e,value:o,percentage:`${(100*e).toFixed(1)}%`})}return s}function rU(e){let{prices:t,swingPoints:r}=e;if(r.length<3)throw Error("At least 3 swing points are required for projection");let[n,i,s]=r,o=Math.abs(t[i]-t[n]);t[s],t[i];let a=[.618,.786,1,1.272,1.414,1.618],l=[],u=t[s]>t[n];for(let e of a){let r,n=o*e;r=u?t[s]+n:t[s]-n,l.push({level:e,value:r,percentage:`${(100*e).toFixed(1)}%`})}return l}class rW{constructor(e){this.high=e.high,this.low=e.low,this.trend=e.trend||"down"}getRetracements(){return rB({high:this.high,low:this.low,trend:this.trend})}getExtensions(){return r$({high:this.high,low:this.low,trend:this.trend})}updateLevels(e,t,r){this.high=e,this.low=t,r&&(this.trend=r)}}rW.calculate=rB,rW.extensions=r$,rW.projection=rU;class rH{constructor(e){this.data=[],e&&this.loadData(e)}loadData(e){let{open:t,high:r,low:n,close:i,volume:s,timestamp:o}=e;if(t.length!==r.length||r.length!==n.length||n.length!==i.length)throw Error("OHLC arrays must have the same length");if(s&&s.length!==i.length)throw Error("Volume array length must match OHLC arrays");if(o&&o.length!==i.length)throw Error("Timestamp array length must match OHLC arrays");this.data=[];for(let e=0;e<t.length;e++){let a={open:t[e],high:r[e],low:n[e],close:i[e]};s&&(a.volume=s[e]),o&&(a.timestamp=o[e]),this.data.push(a)}}addDataPoint(e){this.data.push(e)}getCandles(){return this.data.map(e=>({open:e.open,high:e.high,low:e.low,close:e.close}))}getOpen(){return this.data.map(e=>e.open)}getHigh(){return this.data.map(e=>e.high)}getLow(){return this.data.map(e=>e.low)}getClose(){return this.data.map(e=>e.close)}getVolume(){return this.data.map(e=>e.volume||0)}getTimestamp(){return this.data.map(e=>e.timestamp||"")}getDataPoints(){return[...this.data]}getLastDataPoint(){return this.data[this.data.length-1]}getDataPoint(e){return this.data[e]}length(){return this.data.length}slice(e,t){let r=this.data.slice(e,t),n=new rH;return n.data=r,n}reverse(){let e=[...this.data].reverse(),t=new rH;return t.data=e,t}static fromArray(e){let t=new rH;return t.data=e.map(e=>({open:e.open,high:e.high,low:e.low,close:e.close})),t}static fromOHLC(e,t,r,n){return new rH({open:e,high:t,low:r,close:n})}isValid(){return this.data.every(e=>e.high>=Math.max(e.open,e.close)&&e.low<=Math.min(e.open,e.close)&&e.high>=e.low)}validateData(){let e=[];return this.data.forEach((t,r)=>{t.high<Math.max(t.open,t.close)&&e.push(`Data point ${r}: High (${t.high}) is less than max of open/close`),t.low>Math.min(t.open,t.close)&&e.push(`Data point ${r}: Low (${t.low}) is greater than min of open/close`),t.high<t.low&&e.push(`Data point ${r}: High (${t.high}) is less than low (${t.low})`)}),e}}let rK={precision:2,epsilon:1e-4};function rY(e){rK={...rK,...e}}function rq(){return{...rK}}function rG(){return rK.precision||2}function rJ(){return rK.epsilon||1e-4}function rX(e){let t=rG();return parseFloat(e.toFixed(t))}function rQ(e,t){return Math.abs(e-t)<rJ()}function rZ(){return["sma","ema","wma","wema","macd","rsi","cci","awesomeoscillator","roc","stoch
1astic","williamsr","trix","stochasticrsi","psar","kst","ultimateoscillator","dpo","priceoscillator","ppo","obv","adl","vwap","forceindex","mfi","volumeprofile","bollingerbands","atr","keltnerchannels","chandelierexit","donchianchannels","volatilityindex","truerange","adx","plusdm","minusdm","ichimokucloud","supertrend","aroon","aroonoscillator","linearregression","maenvelope","pivotpoints","doji","bullishengulfingpattern","bearishengulfingpattern","hammer","hangingman","shootingstar","spinningtop","marubozu","dragonflydoji","gravestonedoji","threewhitesoldiers","threeblackcrows","bullishharami","bearishharami","piercingline","darkcloudcover","morningstar","eveningstar","tweezerbottom","tweezertop","abandonedbaby","bullishmarubozu","bearishmarubozu","bullishinvertedhammer","bearishinvertedhammer","morningdojistar","eveningdojistar","downsidetasukigap","bullishspinningtop","bearishspinningtop","bullish","bearish","bullishharamicross","bearishharamicross","hammerpatternunconfirmed","hangingmanunconfirmed","shootingstarunconfirmed","bullishhammerstick","bearishhammerstick","heikinashi","renko","typicalprice","fibonacciretracement","fibonacci","fibonacciExtensions","fibonacciProjection","highest","lowest","sum","averagegain","averageloss","crossup","crossdown","sd"]}let r0={getAll:rZ};r.ADL=Q,r.ADX=eL,r.ATR=ef,r.AbandonedBaby=tU,r.Aroon=eZ,r.AroonOscillator=e1,r.AvailableIndicators=r0,r.AverageGain=rO,r.AverageLoss=rE,r.AwesomeOscillator=b,r.Bearish=rs,r.BearishEngulfingPattern=ta,r.BearishHammerStick=rb,r.BearishHarami=tA,r.BearishHaramiCross=ru,r.BearishInvertedHammer=tX,r.BearishInvertedHammerStick=t1,r.BearishMarubozu=tY,r.BearishSpinningTop=rt,r.BollingerBands=ec,r.Bullish=rn,r.BullishEngulfingPattern=to,r.BullishHammerStick=rv,r.BullishHarami=tP,r.BullishHaramiCross=ra,r.BullishInvertedHammer=tG,r.BullishInvertedHammerStick=tZ,r.BullishMarubozu=tH,r.BullishSpinningTop=t9,r.CCI=v,r.CandleData=n,r.CandleList=rA,r.ChandelierExit=eP,r.CrossDown=rN,r.CrossUp=rC,r.DMI=eF,r.DPO=B,r.DarkCloudCover=tT,r.DojiPattern=tn,r.DonchianChannels=eA,r.DownsideTasukiGap=t6,r.DragonflyDojiPattern=tb,r.EMA=a,r.EveningDojiStar=t4,r.EveningStar=tL,r.Fibonacci=rW,r.FixedSizeLinkedList=rk,r.ForceIndex=er,r.GravestoneDojiPattern=tx,r.HammerPattern=tu,r.HammerPatternUnconfirmed=rh,r.HangingManPattern=th,r.HangingManUnconfirmed=rf,r.HeikinAshi=rR,r.Highest=eM,r.IchimokuCloud=eY,r.IchimokuKinkouhyou=eK,r.KST=T,r.KeltnerChannels=em,r.LinearRegression=e5,r.Lowest=eO,r.MACD=f,r.MAEnvelope=e7,r.MFI=ei,r.MarubozuPattern=tv,r.MinusDM=eW,r.MorningDojiStar=t3,r.MorningStar=tI,r.NumberFormatter=rS,r.OBV=J,r.PPO=q,r.PSAR=C,r.PiercingLine=tC,r.PivotPoints=tt,r.PlusDM=e$,r.PriceOscillator=H,r.ROC=x,r.RSI=m,r.Renko=rD,r.SD=rP,r.SMA=s,r.ShootingStarPattern=tf,r.ShootingStarUnconfirmed=rm,r.SpinningTopPattern=tm,r.Stochastic=_,r.StochasticRSI=A,r.StockData=rH,r.Sum=rj,r.SuperTrend=eX,r.TRIX=P,r.ThreeBlackCrowsPattern=tO,r.ThreeWhiteSoldiersPattern=t_,r.TrueRange=eR,r.TweezerBottom=tz,r.TweezerTop=tB,r.TypicalPrice=rV,r.UltimateOscillator=V,r.VWAP=ee,r.VolatilityIndex=eN,r.VolumeProfile=ea,r.WEMA=h,r.WMA=u,r.WilderSmoothing=rx,r.WilliamsR=O,r.abandonedbaby=t$,r.adl=X,r.adx=eD,r.aroon=eQ,r.aroonoscillator=e0,r.atr=ed,r.averageGain=ew,r.averageLoss=ex,r.averagegain=ew,r.averageloss=ex,r.awesomeoscillator=y,r.bearish=ri,r.bearishengulfingpattern=ts,r.bearishhammerstick=ry,r.bearishharami=tk,r.bearishharamicross=rl,r.bearishinvertedhammer=tJ,r.bearishinvertedhammerstick=t0,r.bearishmarubozu=tK,r.bearishspinningtop=re,r.bollingerbands=eu,r.bullish=rr,r.bullishengulfingpattern=ti,r.bullishhammerstick=rg,r.bullishharami=tE,r.bullishharamicross=ro,r.bullishinvertedhammer=tq,r.bullishinvertedhammerstick=tQ,r.bullishmarubozu=tW,r.bullishspinningtop=t7,r.cci=g,r.chandelierexit=eE,r.crossDown=e_,r.crossUp=eS,r.darkcloudcover=tN,r.dmi=ez,r.doji=tr,r.donchianchannels=ek,r.downsidetasukigap=t8,r.dpo=F,r.dragonflydoji=ty,r.ema=o,r.eveningdojistar=t5,r.eveningstar=tD,r.fibonacci=rB,r.fibonacciExtensions=r$,r.fibonacciProjection=rU,r.fibonacciretracement=rB,r.forceindex=et,r.formatNumber=r_,r.formatNumbers=rM,r.formatValue=rX,r.getAvailableIndicators=rZ,r.getConfig=rq,r.getEpsilon=rJ,r.getPrecision=rG,r.gravestonedoji=tw,r.hammer=tl,r.hammerpatternunconfirmed=rc,r.hangingman=tc,r.hangingmanunconfirmed=rd,r.heikinashi=rT,r.highest=eg,r.ichimokucloud=eH,r.ichimokukinkouhyou=eH,r.isEqual=rQ,r.keltnerchannel=ep,r.keltnerchannels=ep,r.kst=N,r.linearregression=e3,r.lowest=ev,r.macd=d,r.maenvelope=e6,r.marubozu=tg,r.mfi=en,r.minusdm=eU,r.morningdojistar=t2,r.morningstar=tR,r.obv=G,r.piercingline=tj,r.pivotpoints=te,r.plusdm=eB,r.ppo=Y,r.priceoscillator=W,r.psar=j,r.renko=rI,r.roc=w,r.rsi=p,r.sd=ey,r.setConfig=rY,r.sho
1otingstar=td,r.shootingstarunconfirmed=rp,r.sma=i,r.spinningtop=tp,r.stochastic=S,r.stochasticrsi=k,r.sum=eb,r.supertrend=eJ,r.threeblackcrows=tM,r.threewhitesoldiers=tS,r.trix=E,r.truerange=eT,r.tweezerbottom=tV,r.tweezertop=tF,r.typicalprice=rL,r.ultimateoscillator=L,r.volatilityindex=eC,r.volumeprofile=eo,r.vwap=Z,r.wema=c,r.wildersmoothing=rw,r.williamsr=M,r.wma=l},732464,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isUnsafeProperty=function(e){return"__proto__"===e}},388280,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isDeepKey=function(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}},325535,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.toKey=function(e){return"string"==typeof e||"symbol"==typeof e?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}},956713,(e,t,r)=>{"use strict";function n(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(n).join(",");let t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.toString=n},283463,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(956713),i=e.r(325535);r.toPath=function(e){if(Array.isArray(e))return e.map(i.toKey);if("symbol"==typeof e)return[e];e=n.toString(e);let t=[],r=e.length;if(0===r)return t;let s=0,o="",a="",l=!1;for(46===e.charCodeAt(0)&&(t.push(""),s++);s<r;){let n=e[s];a?"\\"===n&&s+1<r?o+=e[++s]:n===a?a="":o+=n:l?'"'===n||"'"===n?a=n:"]"===n?(l=!1,t.push(o),o=""):o+=n:"["===n?(l=!0,o&&(t.push(o),o="")):"."===n?o&&(t.push(o),o=""):o+=n,s++}return o&&t.push(o),t}},142381,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(732464),i=e.r(388280),s=e.r(325535),o=e.r(283463);function a(e,t,r){if(null==e)return r;switch(typeof t){case"string":{if(n.isUnsafeProperty(t))return r;let s=e[t];if(void 0===s)if(i.isDeepKey(t))return a(e,o.toPath(t),r);else return r;return s}case"number":case"symbol":{"number"==typeof t&&(t=s.toKey(t));let n=e[t];if(void 0===n)return r;return n}default:{if(Array.isArray(t))return l(e,t,r);if(t=Object.is(t?.valueOf(),-0)?"-0":String(t),n.isUnsafeProperty(t))return r;let i=e[t];if(void 0===i)return r;return i}}}function l(e,t,r){if(0===t.length)return r;let i=e;for(let e=0;e<t.length;e++){if(null==i||n.isUnsafeProperty(t[e]))return r;i=i[t[e]]}return void 0===i?r:i}r.get=a},117877,(e,t,r)=>{t.exports=e.r(142381).get},750198,(e,t,r)=>{"use strict";function n(e){return"symbol"==typeof e?1:null===e?2:void 0===e?3:4*(e!=e)}Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.compareValues=(e,t,r)=>{if(e!==t){let i=n(e),s=n(t);if(i===s&&0===i){if(e<t)return"desc"===r?1:-1;if(e>t)return"desc"===r?-1:1}return"desc"===r?s-i:i-s}return 0}},414176,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}},43819,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(414176),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;r.isKey=function(e,t){return!Array.isArray(e)&&(!!("number"==typeof e||"boolean"==typeof e||null==e||n.isSymbol(e))||"string"==typeof e&&(s.test(e)||!i.test(e))||null!=t&&Object.hasOwn(t,e))}},58293,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(750198),i=e.r(43819),s=e.r(283463);r.orderBy=function(e,t,r,o){if(null==e)return[];r=o?void 0:r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=null==t?[null]:[t]),0===t.length&&(t=[null]),Array.isArray(r)||(r=null==r?[]:[r]),r=r.map(e=>String(e));let a=(e,t)=>{let r=e;for(let e=0;e<t.length&&null!=r;++e)r=r[t[e]];return r},l=(e,t)=>null==t||null==e?t:"object"==typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:a(t,e.path):"function"==typeof e?e(t):Array.isArray(e)?a(t,e):"object"==typeof t?t[e]:t,u=t.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||i.isKey(e))?e:{key:e,path:s.toPath(e)});return e.map(e=>({original:e,criteria:u.map(t=>l(t,e))})).slice().sort((e,t)=>
1{for(let i=0;i<u.length;i++){let s=n.compareValues(e.criteria[i],t.criteria[i],r[i]);if(0!==s)return s}return 0}).map(e=>e.original)}},71223,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.flatten=function(e,t=1){let r=[],n=Math.floor(t),i=(e,t)=>{for(let s=0;s<e.length;s++){let o=e[s];Array.isArray(o)&&t<n?i(o,t+1):r.push(o)}};return i(e,0),r}},675520,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=/^(?:0|[1-9]\d*)$/;r.isIndex=function(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return n.test(e)}}},736306,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}},12108,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(736306);r.isArrayLike=function(e){return null!=e&&"function"!=typeof e&&n.isLength(e.length)}},717052,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}},570844,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isEqualsSameValueZero=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}},631359,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(675520),i=e.r(12108),s=e.r(717052),o=e.r(570844);r.isIterateeCall=function(e,t,r){return!!s.isObject(r)&&(!!("number"==typeof t&&i.isArrayLike(r)&&n.isIndex(t))&&t<r.length||"string"==typeof t&&t in r)&&o.isEqualsSameValueZero(r[t],e)}},460526,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(58293),i=e.r(71223),s=e.r(631359);r.sortBy=function(e,...t){let r=t.length;return r>1&&s.isIterateeCall(e,t[0],t[1])?t=[]:r>2&&s.isIterateeCall(t[0],t[1],t[2])&&(t=[t[0]]),n.orderBy(e,i.flatten(t),["asc"])}},959445,(e,t,r)=>{t.exports=e.r(460526).sortBy},325661,(e,t,r)=>{"use strict";var n=e.r(78141);function i(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var s="function"==typeof Object.is?Object.is:i,o=n.useState,a=n.useEffect,l=n.useLayoutEffect,u=n.useDebugValue;function c(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return l(function(){i.value=r,i.getSnapshot=t,h(i)&&s({inst:i})},[e,r,t]),a(function(){return h(i)&&s({inst:i}),e(function(){h(i)&&s({inst:i})})},[e]),u(r),r}function h(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!s(e,r)}catch(e){return!0}}function d(e,t){return t()}var f="u"<typeof window||void 0===window.document||void 0===window.document.createElement?d:c;r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:f},56032,(e,t,r)=>{"use strict";t.exports=e.r(325661)},220206,(e,t,r)=>{"use strict";var n=e.r(78141),i=e.r(56032);function s(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var o="function"==typeof Object.is?Object.is:s,a=i.useSyncExternalStore,l=n.useRef,u=n.useEffect,c=n.useMemo,h=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var s=l(null);if(null===s.current){var d={hasValue:!1,value:null};s.current=d}else d=s.current;var f=a(e,(s=c(function(){function e(e){if(!l){if(l=!0,s=e,e=n(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var r=n(e);return void 0!==i&&i(t,r)?(s=e,t):(s=e,a=r)}var s,a,l=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,i]))[0],s[1]);return u(function(){d.hasValue=!0,d.value=f},[f]),h(f),f}},596482,(e,t,r)=>{"use strict";t.exports=e.r(220206)},701847,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.debounce=function(e,t,{signal:r,edges:n}={}){let i,s=null,o=null!=n&&n.includes("leading"),a=null==n||n.includes("trailing"),l=()=>{null!==s&&(e.apply(i,s),i=void 0,s=null)},u=()=>{a&&l(),f()},c=null,h=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,u()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null)},f=()=>{d(),i=void 0,s=null},p=()=>{l()},m=function(...e){if(r?.aborted)return;i=this,s=e;let t=null==c;h(),o&&t&&l()};return m.schedule=h,m.cancel=f,m.flush=p,r?.addEventListener("abort",f,{once:!0}),m}},140277,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(701847);r.debounce=function(e,t=0,r={}){let i;"object"!=typeof r&&(r={});let{leading:s=!1,trailing:o=!0,maxWait:a}=r,l=[,,];
1s&&(l[0]="leading"),o&&(l[1]="trailing");let u=null,c=n.debounce(function(...t){i=e.apply(this,t),u=null},t,{edges:l}),h=function(...t){return null!=a&&(null===u&&(u=Date.now()),Date.now()-u>=a)?(i=e.apply(this,t),u=Date.now(),c.cancel(),c.schedule(),i):(c.apply(this,t),i)},d=()=>(c.flush(),i);return h.cancel=c.cancel,h.flush=d,h}},41757,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(140277);r.throttle=function(e,t=0,r={}){let{leading:i=!0,trailing:s=!0}=r;return n.debounce(e,t,{leading:i,maxWait:t,trailing:s})}},358369,(e,t,r)=>{t.exports=e.r(41757).throttle},203859,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(414176);r.toNumber=function(e){return n.isSymbol(e)?NaN:Number(e)}},470449,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(203859);r.toFinite=function(e){return e?(e=n.toNumber(e))===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e==e?e:0:0===e?e:0}},227006,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(631359),i=e.r(470449);r.range=function(e,t,r){r&&"number"!=typeof r&&n.isIterateeCall(e,t,r)&&(t=r=void 0),e=i.toFinite(e),void 0===t?(t=e,e=0):t=i.toFinite(t),r=void 0===r?e<t?1:-1:i.toFinite(r);let s=Math.max(Math.ceil((t-e)/(r||1)),0),o=Array(s);for(let t=0;t<s;t++)o[t]=e,e+=r;return o}},820785,(e,t,r)=>{t.exports=e.r(227006).range},560600,(e,t,r)=>{!function(r){"use strict";var n,i=1e9,s={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},o=!0,a="[DecimalError] ",l=a+"Invalid argument: ",u=a+"Exponent out of range: ",c=Math.floor,h=Math.pow,d=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,f=1e7,p=7,m=0x1fffffffffffff,g=c(1286742750677284.5),v={};function y(e,t){var r,n,i,s,a,l,u,c,h=e.constructor,d=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),o?k(t,d):t;if(u=e.d,c=t.d,a=e.e,i=t.e,u=u.slice(),s=a-i){for(s<0?(n=u,s=-s,l=c.length):(n=c,i=a,l=u.length),s>(l=(a=Math.ceil(d/p))>l?a+1:l+1)&&(s=l,n.length=1),n.reverse();s--;)n.push(0);n.reverse()}for((l=u.length)-(s=c.length)<0&&(s=l,n=c,c=u,u=n),r=0;s;)r=(u[--s]=u[s]+c[s]+r)/f|0,u[s]%=f;for(r&&(u.unshift(r),++i),l=u.length;0==u[--l];)u.pop();return t.d=u,t.e=i,o?k(t,d):t}function b(e,t,r){if(e!==~~e||e<t||e>r)throw Error(l+e)}function w(e){var t,r,n,i=e.length-1,s="",o=e[0];if(i>0){for(s+=o,t=1;t<i;t++)(r=p-(n=e[t]+"").length)&&(s+=O(r)),s+=n;(r=p-(n=(o=e[t])+"").length)&&(s+=O(r))}else if(0===o)return"0";for(;o%10==0;)o/=10;return s+o}v.absoluteValue=v.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},v.comparedTo=v.cmp=function(e){var t,r,n,i,s=this;if(e=new s.constructor(e),s.s!==e.s)return s.s||-e.s;if(s.e!==e.e)return s.e>e.e^s.s<0?1:-1;for(t=0,r=(n=s.d.length)<(i=e.d.length)?n:i;t<r;++t)if(s.d[t]!==e.d[t])return s.d[t]>e.d[t]^s.s<0?1:-1;return n===i?0:n>i^s.s<0?1:-1},v.decimalPlaces=v.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*p;if(t=e.d[t])for(;t%10==0;t/=10)r--;return r<0?0:r},v.dividedBy=v.div=function(e){return x(this,new this.constructor(e))},v.dividedToIntegerBy=v.idiv=function(e){var t=this,r=t.constructor;return k(x(t,new r(e),0,1),r.precision)},v.equals=v.eq=function(e){return!this.cmp(e)},v.exponent=function(){return _(this)},v.greaterThan=v.gt=function(e){return this.cmp(e)>0},v.greaterThanOrEqualTo=v.gte=function(e){return this.cmp(e)>=0},v.isInteger=v.isint=function(){return this.e>this.d.length-2},v.isNegative=v.isneg=function(){return this.s<0},v.isPositive=v.ispos=function(){return this.s>0},v.isZero=function(){return 0===this.s},v.lessThan=v.lt=function(e){return 0>this.cmp(e)},v.lessThanOrEqualTo=v.lte=function(e){return 1>this.cmp(e)},v.logarithm=v.log=function(e){var t,r=this,i=r.constructor,s=i.precision,l=s+5;if(void 0===e)e=new i(10);else if((e=new i(e)).s<1||e.eq(n))throw Error(a+"NaN");if(r.s<1)throw Error(a+(r.s?"NaN":"-Infinity"));return r.eq(n)?new i(0):(o=!1,t=x(E(r,l),E(e,l),l),o=!0,k(t,s))},v.minus=v.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?A(t,e):y(t,(e.s=-e.s,e))},v.modulo=v.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(!(e=new n(e)).s)throw Error(a+"NaN");return r.s?(o=!1,t=x(r,e,0,1).times(e),o=!0,r.minus(t)):k(new n(r),i)},v.naturalExponential=v.exp=function(){return S(this)},v.naturalLogarithm=v.ln=function(){return E(this)},v.negated=v.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},v.plus=v.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?y(t,e):A(t,(e.s=-e.s,e))},v.precision=v.sd=function(e){var t,r,n,i=this;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(l+e);if(t=_(i)+1,r=(n=i.d.length-1)*p+1,n=i.d[n]){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;
vendor: 1,083 bytes, line 1
1n/=10)r++}return e&&t>r?t:r},v.squareRoot=v.sqrt=function(){var e,t,r,n,i,s,l,u=this,h=u.constructor;if(u.s<1){if(!u.s)return new h(0);throw Error(a+"NaN")}for(e=_(u),o=!1,0==(i=Math.sqrt(+u))||i==1/0?(((t=w(u.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),n=new h(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):n=new h(i.toString()),i=l=(r=h.precision)+3;;)if(n=(s=n).plus(x(u,s,l+2)).times(.5),w(s.d).slice(0,l)===(t=w(n.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&"4999"==t){if(k(s,r+1,0),s.times(s).eq(u)){n=s;break}}else if("9999"!=t)break;l+=4}return o=!0,k(n,r)},v.times=v.mul=function(e){var t,r,n,i,s,a,l,u,c,h=this,d=h.constructor,p=h.d,m=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,r=h.e+e.e,(u=p.length)<(c=m.length)&&(s=p,p=m,m=s,a=u,u=c,c=a),s=[],n=a=u+c;n--;)s.push(0);for(n=c;--n>=0;){for(t=0,i=u+n;i>n;)l=s[i]+m[n]*p[i-n-1]+t,s[i--]=l%f|0,t=l/f|0;s[i]=(s[i]+t)%f|0}for(;!s[--a];)s.pop();return t?++r:s.shift(),e.d=s,e.e=r,o?k(e,d.precision):e},v.toDecimalPlaces=v.todp=function(e,t){var r=this,n=r.constructor;
1return(r=new n(r),void 0===e)?r:(b(e,0,i),void 0===t?t=n.rounding:b(t,0,8),k(r,e+_(r)+1,t))},v.toExponential=function(e,t){var r,n=this,s=n.constructor;return void 0===e?r=j(n,!0):(b(e,0,i),void 0===t?t=s.rounding:b(t,0,8),r=j(n=k(new s(n),e+1,t),!0,e+1)),r},v.toFixed=function(e,t){var r,n,s=this,o=s.constructor;return void 0===e?j(s):(b(e,0,i),void 0===t?t=o.rounding:b(t,0,8),r=j((n=k(new o(s),e+_(s)+1,t)).abs(),!1,e+_(n)+1),s.isneg()&&!s.isZero()?"-"+r:r)},v.toInteger=v.toint=function(){var e=this,t=e.constructor;return k(new t(e),_(e)+1,t.rounding)},v.toNumber=function(){return+this},v.toPower=v.pow=function(e){var t,r,i,s,l,u,h=this,d=h.constructor,f=12,g=+(e=new d(e));if(!e.s)return new d(n);if(!(h=new d(h)).s){if(e.s<1)throw Error(a+"Infinity");return h}if(h.eq(n))return h;if(i=d.precision,e.eq(n))return k(h,i);if(u=(t=e.e)>=(r=e.d.length-1),l=h.s,u){if((r=g<0?-g:g)<=m){for(s=new d(n),t=Math.ceil(i/p+4),o=!1;r%2&&C((s=s.times(h)).d,t),0!==(r=c(r/2));)C((h=h.times(h)).d,t);return o=!0,e.s<0?new d(n).div(s):k(s,i)}}else if(l<0)throw Error(a+"NaN");return l=l<0&&1&e.d[Math.max(t,r)]?-1:1,h.s=1,o=!1,s=e.times(E(h,i+f)),o=!0,(s=S(s)).s=l,s},v.toPrecision=function(e,t){var r,n,s=this,o=s.constructor;return void 0===e?(r=_(s),n=j(s,r<=o.toExpNeg||r>=o.toExpPos)):(b(e,1,i),void 0===t?t=o.rounding:b(t,0,8),r=_(s=k(new o(s),e,t)),n=j(s,e<=r||r<=o.toExpNeg,e)),n},v.toSignificantDigits=v.tosd=function(e,t){var r=this,n=r.constructor;return void 0===e?(e=n.precision,t=n.rounding):(b(e,1,i),void 0===t?t=n.rounding:b(t,0,8)),k(new n(r),e,t)},v.toString=v.valueOf=v.val=v.toJSON=function(){var e=this,t=_(e),r=e.constructor;return j(e,t<=r.toExpNeg||t>=r.toExpPos)};var x=function(){function e(e,t){var r,n=0,i=e.length;for(e=e.slice();i--;)r=e[i]*t+n,e[i]=r%f|0,n=r/f|0;return n&&e.unshift(n),e}function t(e,t,r,n){var i,s;if(r!=n)s=r>n?1:-1;else for(i=s=0;i<r;i++)if(e[i]!=t[i]){s=e[i]>t[i]?1:-1;break}return s}function r(e,t,r){for(var n=0;r--;)e[r]-=n,n=+(e[r]<t[r]),e[r]=n*f+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,s,o){var l,u,c,h,d,m,g,v,y,b,w,x,S,M,O,E,P,A,j=n.constructor,C=n.s==i.s?1:-1,N=n.d,T=i.d;if(!n.s)return new j(n);if(!i.s)throw Error(a+"Division by zero");for(c=0,u=n.e-i.e,P=T.length,O=N.length,v=(g=new j(C)).d=[];T[c]==(N[c]||0);)++c;if(T[c]>(N[c]||0)&&--u,(x=null==s?s=j.precision:o?s+(_(n)-_(i))+1:s)<0)return new j(0);if(x=x/p+2|0,c=0,1==P)for(h=0,T=T[0],x++;(c<O||h)&&x--;c++)S=h*f+(N[c]||0),v[c]=S/T|0,h=S%T|0;else{for((h=f/(T[0]+1)|0)>1&&(T=e(T,h),N=e(N,h),P=T.length,O=N.length),M=P,b=(y=N.slice(0,P)).length;b<P;)y[b++]=0;(A=T.slice()).unshift(0),E=T[0],T[1]>=f/2&&++E;do h=0,(l=t(T,y,P,b))<0?(w=y[0],P!=b&&(w=w*f+(y[1]||0)),(h=w/E|0)>1?(h>=f&&(h=f-1),m=(d=e(T,h)).length,b=y.length,1==(l=t(d,y,m,b))&&(h--,r(d,P<m?A:T,m))):(0==h&&(l=h=1),d=T.slice()),(m=d.length)<b&&d.unshift(0),r(y,d,b),-1==l&&(b=y.length,(l=t(T,y,P,b))<1&&(h++,r(y,P<b?A:T,b))),b=y.length):0===l&&(h++,y=[0]),v[c++]=h,l&&y[0]?y[b++]=N[M]||0:(y=[N[M]],b=1);while((M++<O||void 0!==y[0])&&x--)}return v[0]||v.shift(),g.e=u,k(g,o?s+_(g)+1:s)}}();function S(e,t){var r,i,s,a,l,c=0,d=0,f=e.constructor,p=f.precision;if(_(e)>16)throw Error(u+_(e));if(!e.s)return new f(n);for(null==t?(o=!1,l=p):l=t,a=new f(.03125);e.abs().gte(.1);)e=e.times(a),d+=5;for(l+=Math.log(h(2,d))/Math.LN10*2+5|0,r=i=s=new f(n),f.precision=l;;){if(i=k(i.times(e),l),r=r.times(++c),w((a=s.plus(x(i,r,l))).d).slice(0,l)===w(s.d).slice(0,l)){for(;d--;)s=k(s.times(s),l);return f.precision=p,null==t?(o=!0,k(s,p)):s}s=a}}function _(e){for(var t=e.e*p,r=e.d[0];r>=10;r/=10)t++;return t}function M(e,t,r){if(t>e.LN10.sd())throw o=!0,r&&(e.precision=r),Error(a+"LN10 precision limit exceeded");return k(new e(e.LN10),t)}function O(e){for(var t="";e--;)t+="0";return t}function E(e,t){var r,i,s,l,u,c,h,d,f,p=1,m=10,g=e,v=g.d,y=g.constructor,b=y.precision;if(g.s<1)throw Error(a+(g.s?"NaN":"-Infinity"));if(g.eq(n))return new y(0);if(null==t?(o=!1,d=b):d=t,g.eq(10))return null==t&&(o=!0),M(y,d);if(y.precision=d+=m,i=(r=w(v)).charAt(0),!(15e14>Math.abs(l=_(g))))return h=M(y,d+2,b).times(l+""),g=E(new y(i+"."+r.slice(1)),d-m).plus(h),y.precision=b,null==t?(o=!0,k(g,b)):g;for(;i<7&&1!=i||1==i&&r.charAt(1)>3;)i=(r=w((g=g.times(e)).d)).charAt(0),p++;for(l=_(g),i>1?(g=new y("0."+r),l++):g=new y(i+"."+r.slice(1)),c=u=g=x(g.minus(n),g.plus(n),d),f=k(g.times(g),d),s=3;;){if(u=k(u.times(f),d),w((h=c.plus(x(u,new y(s),d))).d).slice(0,d)===w(c.d).slice(0,d))return c=c.times(2),0!==l&&(c=c.plus(M(y,d+2,b).times(l+""))),c=x(c,new y(p),d),y.precision=b,null==t?(o=!0,k(c,b)):c;c=h,s+=2}}function P(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);)++n;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(n,i)){if(i-=n,e.e=c((r=r-n-1)/p),e.d=[],n=(r+1)%p,r<0&&(n+=p),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=p;n<i;)e.d.push(+t.slice(n,n+=p));n=p-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),o&&(e.e>g||e.e<-g))throw Error(u+r)}else e.s=0,e.e=0,e.d=[0];return e}function k(e,t,r){var n,i,s,a,l,d,m,v,y=e.d;for(a=1,s=y[0];s>=10;s/=10)a++;if((n=t-a)<0)n+=p,i=t,m=y[v=0];else{if((v=Math.ceil((n+1)/p))>=(s=y.length))return e;for(a=1,m=s=y[v];s>=10;s/=10)a++;n%=p,i=n-p+a}if(void 0!==r&&(l=m/(s=h(10,a-i-1))%10|0,d=t<0||void 0!==y[v+1]||m%s,d=r<4?(l||d)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||d||6==r&&(n>0?i>0?m/h(10,a-i):0:y[v-1])%10&1||r==(e.s<0?8:7))),t<1||!y[0])return d?(s=_(e),y.length=1,t=t-s-1,y[0]=h(10,(p-t%p)%p),e.e=c(-t/p)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(0==n?(y.length=v,s=1,v--):(y.length=v+1,s=h(10,p-n),y[v]=i>0?(m/h(10,a-i)%h(10,i)|0)*s:0),d)for(;;)if(0==v){(y[0]+=s)==f&&(y[0]=1,++e.e);break}else{if(y[v]+=s,y[v]!=f)break;y[v--]=0,s=1}for(n=y.length;0===y[--n];)y.pop();if(o&&(e.e>g||e.e<-g))throw Error(u+_(e));return e}function A(e,t){var r,n,i,s,a,l,u,c,h,d,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),o?k(t,g):t;if(u=e.d,d=t.d,n=t.e,c=e.e,u=u.slice(),a=c-n){for((h=a<0)?(r=u,a=-a,l=d.length):(r=d,n=c,l=u.length),a>(i=Math.max(Math.ceil(g/p),l)+2)&&(a=i,r.length=1),r.reverse(),i=a;i--;)r.push(0);r.reverse()}else{for((h=(i=u.length)<(l=d.length))&&(l=i),i=0;i<l;i++)if(u[i]!=d[i]){h=u[i]<d[i];break}a=0}for(h&&(r=u,u=d,d=r,t.s=-t.s),l=u.length,i=d.length-l;i>0;--i)u[l++]=0;for(i=d.length;i>a;){if(u[--i]<d[i]){for(s=i;s&&0===u[--s];)u[s]=f-1;--u[s],u[i]+=f}u[i]-=d[i]}for(;0===u[--l];)u.pop();for(;0===u[0];u.shift())--n;return u[0]?(t.d=u,t.e=n,o?k(t,g):t):new m(0)}function j(e,t,r){var n,i=_(e),s=w(e.d),o=s.length;return t?(r&&(n=r-o)>0?s=s.charAt(0)+"."+s.slice(1)+O(n):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(i<0?"e":"e+")+i):i<0?(s="0."+O(-i-1)+s,r&&(n=r-o)>0&&(s+=O(n))):i>=o?(s+=O(i+1-o),r&&(n=r-i-1)>0&&(s=s+"."+O(n))):((n=i+1)<o&&(s=s.slice(0,n)+"."+s.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(s+="."),s+=O(n))),e.s<0?"-"+s:s}function C(e,t){if(e.length>t)return e.length=t,!0}function N(e){var t,r,n;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if("number"==typeof e){if(0*e!=0)throw Error(l+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return P(t,e.toString())}if("string"!=typeof e)throw Error(l+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,d.test(e))P(t,e);else throw Error(l+e)}if(i.prototype=v,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=N,i.config=i.set=T,void 0===e&&(e={}),e)for(t=0,n=["precision","rounding","toExpNeg","toExpPos","LN10"];t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}
1function T(e){if(!e||"object"!=typeof e)throw Error(a+"Object expected");var t,r,n,s=["precision",1,i,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<s.length;t+=3)if(void 0!==(n=e[r=s[t]]))if(c(n)===n&&n>=s[t+1]&&n<=s[t+2])this[r]=n;else throw Error(l+r+": "+n);if(void 0!==(n=e[r="LN10"]))if(n==Math.LN10)this[r]=new this(n);else throw Error(l+r+": "+n);return this}if((s=N(s)).default=s.Decimal=s,n=new s(1),"function"==typeof define&&define.amd){let t;e.r,void 0!==(t=s)&&e.v(t)}else t.exports?t.exports=s:(r||(r="u">typeof self&&self&&self.self==self?self:Function("return this")()),r.Decimal=s)}(e.e)},366631,(e,t,r)=>{"use strict";var n=e.r(78141);function i(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var s="function"==typeof Object.is?Object.is:i,o=n.useSyncExternalStore,a=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var h=a(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;var f=o(e,(h=u(function(){function e(e){if(!l){if(l=!0,o=e,e=n(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return a=t}return a=e}if(t=a,s(o,e))return t;var r=n(e);return void 0!==i&&i(t,r)?(o=e,t):(o=e,a=r)}var o,a,l=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,i]))[0],h[1]);return l(function(){d.hasValue=!0,d.value=f},[f]),c(f),f}},264675,(e,t,r)=>{"use strict";t.exports=e.r(366631)},571650,(e,t,r)=>{"use strict";var n=Object.prototype.hasOwnProperty,i="~";function s(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,r,n,s){if("function"!=typeof r)throw TypeError("The listener must be a function");var a=new o(r,n||e,s),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new s:delete e._events[t]}function u(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(i=!1)),u.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},u.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,s=r.length,o=Array(s);n<s;n++)o[n]=r[n].fn;return o},u.prototype.listenerCount=function(e){var t=i?i+e:e,r=this._events[t];return r?r.fn?1:r.length:0},u.prototype.emit=function(e,t,r,n,s,o){var a=i?i+e:e;if(!this._events[a])return!1;var l,u,c=this._events[a],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,n),!0;case 5:return c.fn.call(c.context,t,r,n,s),!0;case 6:return c.fn.call(c.context,t,r,n,s,o),!0}for(u=1,l=Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,n);break;default:if(!l)for(d=1,l=Array(h-1);d<h;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},u.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},u.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},u.prototype.removeListener=function(e,t,r,n){var s=i?i+e:e;if(!this._events[s])return this;if(!t)return l(this,s),this;var o=this._events[s];if(o.fn)o.fn!==t||n&&!o.once||r&&o.context!==r||l(this,s);else{for(var a=0,u=[],c=o.length;a<c;a++)(o[a].fn!==t||n&&!o[a].once||r&&o[a].context!==r)&&u.push(o[a]);u.length?this._events[s]=1===u.length?u[0]:u:l(this,s)}return this},u.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&l(this,t)):(this._events=new s,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=i,u.EventEmitter=u,t.exports=u},612828,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.last=function(e){return e[e.length-1]}},277136,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.toArray=function(e){return Array.isArray(e)?e:Array.from(e)}},247518,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(612828),i=e.r(277136),s=e.r(12108);r.last=function(e){if(s.isArrayLike(e))return n.last(i.toArray(e))}},750171,(e,t,r)=>{t.exports=e.r(247518).last},15467,(e,t,r)=>{"use strict";var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case s:case a:case o:case h:case d:case m:return e;default:switch(e=e&&e.$$typeof){case u:case c:case p:case f:case l:return e;default:return t}}case i:return t}}}r.ContextConsumer=l,r.ContextProvider=u,r.Element=n,r.ForwardRef=c,r.Fragment=s,r.Lazy=p,r.Memo=f,r.Portal=i,r.Profiler=a,r.StrictMode=o,r.
1Suspense=h,r.SuspenseList=d,r.isContextConsumer=function(e){return v(e)===l},r.isContextProvider=function(e){return v(e)===u},r.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},r.isForwardRef=function(e){return v(e)===c},r.isFragment=function(e){return v(e)===s},r.isLazy=function(e){return v(e)===p},r.isMemo=function(e){return v(e)===f},r.isPortal=function(e){return v(e)===i},r.isProfiler=function(e){return v(e)===a},r.isStrictMode=function(e){return v(e)===o},r.isSuspense=function(e){return v(e)===h},r.isSuspenseList=function(e){return v(e)===d},r.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===a||e===o||e===h||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===u||e.$$typeof===l||e.$$typeof===c||e.$$typeof===g||void 0!==e.getModuleId)||!1},r.typeOf=v},247707,(e,t,r)=>{"use strict";t.exports=e.r(15467)},566161,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isPlainObject=function(e){if("object"!=typeof e||null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){let t=e[Symbol.toStringTag];return null!=t&&!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}},815090,(e,t,r)=>{t.exports=e.r(566161).isPlainObject},313416,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.uniqBy=function(e,t){let r=new Map;for(let n=0;n<e.length;n++){let i=e[n],s=t(i,n,e);r.has(s)||r.set(s,i)}return Array.from(r.values())}},516487,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.ary=function(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}},501931,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.identity=function(e){return e}},918598,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isObjectLike=function(e){return"object"==typeof e&&null!==e}},364539,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(12108),i=e.r(918598);r.isArrayLikeObject=function(e){return i.isObjectLike(e)&&n.isArrayLike(e)}},141620,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(142381);r.property=function(e){return function(t){return n.get(t,e)}}},72398,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}},878785,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(717052),i=e.r(72398),s=e.r(570844);function o(e,t,r){return"function"!=typeof r?o(e,t,()=>void 0):a(e,t,function e(t,n,i,s,o,l){let u=r(t,n,i,s,o,l);return void 0!==u?!!u:a(t,n,e,l)},new Map)}function a(e,t,r,i){if(t===e)return!0;switch(typeof t){case"object":return l(e,t,r,i);case"function":if(Object.keys(t).length>0)return a(e,{...t},r,i);return s.isEqualsSameValueZero(e,t);default:if(!n.isObject(e))return s.isEqualsSameValueZero(e,t);if("string"==typeof t)return""===t;return!0}}function l(e,t,r,n){if(null==t)return!0;if(Array.isArray(t))return c(e,t,r,n);if(t instanceof Map)return u(e,t,r,n);if(t instanceof Set)return h(e,t,r,n);let s=Object.keys(t);if(null==e||i.isPrimitive(e))return 0===s.length;if(0===s.length)return!0;if(n?.has(t))return n.get(t)===e;n?.set(t,e);try{for(let o=0;o<s.length;o++){let a=s[o];if(!i.isPrimitive(e)&&!(a in e)||void 0===t[a]&&void 0!==e[a]||null===t[a]&&null!==e[a]||!r(e[a],t[a],a,e,t,n))return!1}return!0}finally{n?.delete(t)}}function u(e,t,r,n){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(let[i,s]of t.entries())if(!1===r(e.get(i),s,i,e,t,n))return!1;return!0}function c(e,t,r,n){if(0===t.length)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let s=0;s<t.length;s++){let o=t[s],a=!1;for(let l=0;l<e.length;l++){if(i.has(l))continue;let u=e[l],c=!1;if(r(u,o,s,e,t,n)&&(c=!0),c){i.add(l),a=!0;break}}if(!a)return!1}return!0}function h(e,t,r,n){return 0===t.size||e instanceof Set&&c([...e],[...t],r,n)}r.isMatchWith=o,r.isSetMatch=h},268372,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(878785);r.isMatch=function(e,t){return n.isMatchWith(e,t,()=>void 0)}},956184,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}},28445,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}
1),r.getTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}},703522,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n="[object RegExp]",i="[object String]",s="[object Number]",o="[object Boolean]",a="[object Symbol]",l="[object Date]",u="[object Map]",c="[object Set]",h="[object Array]",d="[object Function]",f="[object ArrayBuffer]",p="[object Object]",m="[object Error]",g="[object DataView]",v="[object Uint8Array]",y="[object Uint8ClampedArray]",b="[object Uint16Array]",w="[object Uint32Array]",x="[object BigUint64Array]",S="[object Int8Array]",_="[object Int16Array]",M="[object Int32Array]",O="[object BigInt64Array]",E="[object Float32Array]",P="[object Float64Array]";r.argumentsTag="[object Arguments]",r.arrayBufferTag=f,r.arrayTag=h,r.bigInt64ArrayTag=O,r.bigUint64ArrayTag=x,r.booleanTag=o,r.dataViewTag=g,r.dateTag=l,r.errorTag=m,r.float32ArrayTag=E,r.float64ArrayTag=P,r.functionTag=d,r.int16ArrayTag=_,r.int32ArrayTag=M,r.int8ArrayTag=S,r.mapTag=u,r.numberTag=s,r.objectTag=p,r.regexpTag=n,r.setTag=c,r.stringTag=i,r.symbolTag=a,r.uint16ArrayTag=b,r.uint32ArrayTag=w,r.uint8ArrayTag=v,r.uint8ClampedArrayTag=y},866689,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}},309053,(e,t,r)=>{"use strict";var n=e.i(341091);Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let i=e.r(956184),s=e.r(28445),o=e.r(703522),a=e.r(72398),l=e.r(866689);function u(e,t,r,i=new Map,s){let o=s?.(e,t,r,i);if(void 0!==o)return o;if(a.isPrimitive(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){let t=Array(e.length);i.set(e,t);for(let n=0;n<e.length;n++)t[n]=u(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;for(let[n,o]of(i.set(e,t),e))t.set(n,u(o,n,r,i,s));return t}if(e instanceof Set){let t=new Set;for(let n of(i.set(e,t),e))t.add(u(n,void 0,r,i,s));return t}if(void 0!==n.Buffer&&n.Buffer.isBuffer(e))return e.subarray();if(l.isTypedArray(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,t);for(let n=0;n<e.length;n++)t[n]=u(e[n],n,r,i,s);return t}if(e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,t),c(t,e,r,i,s),t}if("u">typeof File&&e instanceof File){let t=new File([e],e.name,{type:e.type});return i.set(e,t),c(t,e,r,i,s),t}if("u">typeof Blob&&e instanceof Blob){let t=new Blob([e],{type:e.type});return i.set(e,t),c(t,e,r,i,s),t}if(e instanceof Error){let t=structuredClone(e);return i.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,c(t,e,r,i,s),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return i.set(e,t),c(t,e,r,i,s),t}if(e instanceof Number){let t=new Number(e.valueOf());return i.set(e,t),c(t,e,r,i,s),t}if(e instanceof String){let t=new String(e.valueOf());return i.set(e,t),c(t,e,r,i,s),t}if("object"==typeof e&&h(e)){let t=Object.create(Object.getPrototypeOf(e));return i.set(e,t),c(t,e,r,i,s),t}return e}function c(e,t,r=e,n,s){let o=[...Object.keys(t),...i.getSymbols(t)];for(let i=0;i<o.length;i++){let a=o[i],l=Object.getOwnPropertyDescriptor(e,a);(null==l||l.writable)&&(e[a]=u(t[a],a,r,n,s))}}function h(e){switch(s.getTag(e)){case o.argumentsTag:case o.arrayTag:case o.arrayBufferTag:case o.dataViewTag:case o.booleanTag:case o.dateTag:case o.float32ArrayTag:case o.float64ArrayTag:case o.int8ArrayTag:case o.int16ArrayTag:case o.int32ArrayTag:case o.mapTag:case o.numberTag:case o.objectTag:case o.regexpTag:case o.setTag:case o.stringTag:case o.symbolTag:case o.uint8ArrayTag:case o.uint8ClampedArrayTag:case o.uint16ArrayTag:case o.uint32ArrayTag:return!0;default:return!1}}r.cloneDeepWith=function(e,t){return u(e,void 0,e,new Map,t)},r.cloneDeepWithImpl=u,r.copyProperties=c},19270,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(309053);r.cloneDeep=function(e){return n.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}},13618,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(268372),i=e.r(19270);r.matches=function(e){return e=i.cloneDeep(e),t=>n.isMatch(t,e)}},208884,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(309053),i=e.r(28445),s=e.r(703522);r.cloneDeepWith=function(e,t){return n.cloneDeepWith(e,(r,o,a,l)=>{let u=t?.(r,o,a,l);if(void 0!==u)return u;if("object"==typeof e){if(i.getTag(e)===s.objectTag&&"function"!=typeof e.constructor){let t={};return l.set(e,t),n.copyProperties(t,e,a,l),t}switch(Object.prototype.toString.call(e)){case s.numberTag:case s.stringTag:case s.booleanTag:{let t=new e.constructor(e?.valueOf());return n.copyProperties(t,e),t}case s.argumentsTag:{let t={};return n.copyProperties(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}},5299,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(208884);r.cloneDeep=function(e){return n.cloneDeepWith(e)}},553568,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(28445);r.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===n.getTag(e)}},477548,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(388280),i=e.r(675520),s=e.r(553568),o=e.r(283463);r.has=function(e,t){let r;if(0===(r=Array.isArray(t)?t:"string"==typeof t&&n.isDeepKey(t)&&e?.[t]==null?o.toPath(t):[t]).length)return!1;let a=e;for(let e=0;e<r.length;e++){let t=r[e];if((null==a||!Object.hasOwn(a,t))&&!((Array.isArray(a)||s.isArguments(a))&&i.isIndex(t)&&t<a.length))return!1;a=a[t]}return!0}},215853,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(268372),i=e.r(325535),s=e.r(5299),o=e.r(142381),a=e.r(477548);r.matchesProperty=function(e,t){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=i.toKey(e)}return t=s.cloneDeep(t),function(r){let i=o.get(r,e);return void 0===i?a.has(r,e):void 0===t?void 0===i:n.isMatch(i,t)}}},889921,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(501931),i=e.r(141620),s=e.r(13618),o=e.r(215853);r.iteratee=function(e){if(null==e)return n.identity;switch(typeof e){case"function":return e;case"object":if(Array.isArray(e)&&2===e.length)return o.matchesProperty(e[0],e[1]);return s.matches(e);case"string":case"symbol":case"number":return i.property(e)}}},720981,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(313416),i=e.r(516487),s=e.r(501931),o=e.r(364539),a=e.r(889921);r.uniqBy=function(e,t=s.identity){return o.isArrayLikeObject(e)?n.uniqBy(Array.from(e),i.ary(a.iteratee(t),1)):[]}},884195,(e,t,r)=>{t.exports=e.r(720981).uniqBy},520811,e=>{"use strict";let t,r,n,i,s,o,a,l,u,c,h,d,f,p;var m,g,v,y,b,w,x,S,_,M,O,E,P,k,A,j,C,N,T,R,I,D,L,V,z,F,B,$,U,W,H,K,Y,q,G,J,X,Q,Z,ee,et,er,en,ei,es,eo,ea,el,eu,ec,eh,ed=e.i(847915),ef=e.i(753132);let ep="/v1/finance/indicators",em="/v1/finance/analysis/ticker",eg="/v1/finance/company-valuation-v2",ev=(e,t)=>
1(0,ef.get)(ep,e,{},t),ey=(e,t)=>(0,ef.get)(em,e,{},t),eb=(e,t)=>(0,ef.post)(eg,e,!0,{},t);var ew=ed;e.i(814872);var ex=e.i(78141),eS=e.i(130281);let e_={get url(){return`file://${e.P("packages/shared/src/auth/authChannel.ts")}`}}.hot;function eM(e){return"unifiedAccount"===e||"portfolioMargin"===e}e_&&e_.decline();var eO=ef;let eE="/v1/crypto/account/status",eP="/v1/crypto/account/portfolio",ek=(e,t)=>{let r=e?{wallet_address:e}:{};return(0,eO.get)(eE,r,{},t)},eA=(e,t)=>{let r=e?{wallet_address:e}:{};return(0,eO.get)(eP,r,{},t)};var ej,eC,eN=9e15,eT=1e9,eR="0123456789abcdef",eI="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",eD="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",eL={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},eV=!0,ez="[DecimalError] ",eF=ez+"Invalid argument: ",eB=ez+"Precision limit exceeded",e$=ez+"crypto unavailable",eU="[object Decimal]",eW=Math.floor,eH=Math.pow,eK=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,eY=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,eq=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,eG=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,eJ=1e7,eX=7,eQ=0x1fffffffffffff,eZ=eI.length-1,e0=eD.length-1,e1={toStringTag:eU};function e2(e){var t,r,n,i=e.length-1,s="",o=e[0];if(i>0){for(s+=o,t=1;t<i;t++)(r=eX-(n=e[t]+"").length)&&(s+=ti(r)),s+=n;(r=eX-(n=(o=e[t])+"").length)&&(s+=ti(r))}else if(0===o)return"0";for(;o%10==0;)o/=10;return s+o}function e3(e,t,r){if(e!==~~e||e<t||e>r)throw Error(eF+e)}function e5(e,t,r,n){var i,s,o,a;for(s=e[0];s>=10;s/=10)--t;return--t<0?(t+=eX,i=0):(i=Math.ceil((t+1)/eX),t%=eX),s=eH(10,eX-t),a=e[i]%s|0,null==n?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),o=r<4&&99999==a||r>3&&49999==a||5e4==a||0==a):o=(r<4&&a+1==s||r>3&&a+1==s/2)&&(e[i+1]/s/100|0)==eH(10,t-2)-1||(a==s/2||0==a)&&(e[i+1]/s/100|0)==0:t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),o=(n||r<4)&&9999==a||!n&&r>3&&4999==a):o=((n||r<4)&&a+1==s||!n&&r>3&&a+1==s/2)&&(e[i+1]/s/1e3|0)==eH(10,t-3)-1,o}function e4(e,t,r){for(var n,i,s=[0],o=0,a=e.length;o<a;){for(i=s.length;i--;)s[i]*=t;for(s[0]+=eR.indexOf(e.charAt(o++)),n=0;n<s.length;n++)s[n]>r-1&&(void 0===s[n+1]&&(s[n+1]=0),s[n+1]+=s[n]/r|0,s[n]%=r)}return s.reverse()}function e8(e,t){var r,n,i;if(t.isZero())return t;(n=t.d.length)<32?i=(1/tm(4,r=Math.ceil(n/3))).toString():(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tp(e,1,t.times(i),new e(1));for(var s=r;s--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=r,t}e1.absoluteValue=e1.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),e7(e)},e1.ceil=function(){return e7(new this.constructor(this),this.e+1,2)},e1.clampedTo=e1.clamp=function(e,t){var r=this,n=r.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(eF+t);return 0>r.cmp(e)?e:r.cmp(t)>0?t:new n(r)},e1.comparedTo=e1.cmp=function(e){var t,r,n,i,s=this,o=s.d,a=(e=new s.constructor(e)).d,l=s.s,u=e.s;if(!o||!a)return l&&u?l!==u?l:o===a?0:!o^l<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?l:a[0]?-u:0;if(l!==u)return l;if(s.e!==e.e)return s.e>e.e^l<0?1:-1;for(t=0,r=(n=o.length)<(i=a.length)?n:i;t<r;++t)if(o[t]!==a[t])return o[t]>a[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1},e1.cosine=e1.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+eX,n.rounding=1,r=e8(n,tg(n,r)),n.precision=e,n.rounding=t,e7(2==eC||3==eC?r.neg():r,e,t,!0)):new n(1):new n(NaN)},e1.cubeRoot=e1.cbrt=function(){var e,t,r,n,i,s,o,a,l,u,c=this,h=c.constructor;if(!c.isFinite()||c.isZero())return new h(c);for(eV=!1,(s=c.s*eH(c.s*c,1/3))&&Math.abs(s)!=1/0?n=new h(s.toString()):(r=e2(c.d),(s=((e=c.e)-r.length+1)%3)&&(r+=1==s||-2==s?"0":"00"),s=eH(r,1/3),e=eW((e+1)/3)-(e%3==(e<0?-1:2)),(n=new h(r=s==1/0?"5e"+e:(r=s.toExponential()).slice(0,r.indexOf("e")+1)+e)).s=c.s),o=(e=h.precision)+3;;
vendor: 5,001 bytes, line 1
1)if(n=e6((u=(l=(a=n).times(a).times(a)).plus(c)).plus(c).times(a),u.plus(l),o+2,1),e2(a.d).slice(0,o)===(r=e2(n.d)).slice(0,o)){if("9999"!=(r=r.slice(o-3,o+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(e7(n,e+1,1),t=!n.times(n).times(n).eq(c));break}if(!i&&(e7(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}o+=4,i=1}return eV=!0,e7(n,e,h.rounding,t)},e1.decimalPlaces=e1.dp=function(){var e,t=this.d,r=NaN;if(t){if(r=((e=t.length-1)-eW(this.e/eX))*eX,e=t[e])for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},e1.dividedBy=e1.div=function(e){return e6(this,new this.constructor(e))},e1.dividedToIntegerBy=e1.divToInt=function(e){var t=this,r=t.constructor;return e7(e6(t,new r(e),0,1,1),r.precision,r.rounding)},e1.equals=e1.eq=function(e){return 0===this.cmp(e)},e1.floor=function(){return e7(new this.constructor(this),this.e+1,3)},e1.greaterThan=e1.gt=function(e){return this.cmp(e)>0},e1.greaterThanOrEqualTo=e1.gte=function(e){var t=this.cmp(e);return 1==t||0===t},e1.hyperbolicCosine=e1.cosh=function(){var e,t,r,n,i,s=this,o=s.constructor,a=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return a;r=o.precision,n=o.rounding,o.precision=r+Math.max(s.e,s.sd())+4,o.rounding=1,(i=s.d.length)<32?t=(1/tm(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),s=tp(o,1,s.times(t),new o(1),!0);for(var l,u=e,c=new o(8);u--;)l=s.times(s),s=a.minus(l.times(c.minus(l.times(c))));return e7(s,o.precision=r,o.rounding=n,!0)},e1.hyperbolicSine=e1.sinh=function(){var e,t,r,n,i=this,s=i.constructor;if(!i.isFinite()||i.isZero())return new s(i);if(t=s.precision,r=s.rounding,s.precision=t+Math.max(i.e,i.sd())+4,s.rounding=1,(n=i.d.length)<3)i=tp(s,2,i,i,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,i=tp(s,2,i=i.times(1/tm(5,e)),i,!0);for(var o,a=new s(5),l=new s(16),u=new s(20);e--;)o=i.times(i),i=i.times(a.plus(o.times(l.times(o).plus(u))))}return s.precision=t,s.rounding=r,e7(i,t,r,!0)},e1.hyperbolicTangent=e1.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,e6(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)},e1.inverseCosine=e1.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return -1!==r?0===r?e.isNeg()?tr(t,n,i):new t(0):new t(NaN):e.isZero()?tr(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))},e1.inverseHyperbolicCosine=e1.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,eV=!1,r=r.times(r).minus(1).sqrt().plus(r),eV=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},e1.inverseHyperbolicSine=e1.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,eV=!1,r=r.times(r).plus(1).sqrt().plus(r),eV=!0,n.precision=e,n.rounding=t,r.ln())},e1.inverseHyperbolicTangent=e1.atanh=function(){var e,t,r,n,i=this,s=i.constructor;return i.isFinite()?i.e>=0?new s(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=s.precision,t=s.rounding,Math.max(n=i.sd(),e)<-(2*i.e)-1)?e7(new s(i),e,t,!0):(s.precision=r=n-i.e,i=e6(i.plus(1),new s(1).minus(i),r+e,1),s.precision=e+4,s.rounding=1,i=i.ln(),s.precision=e,s.rounding=t,i.times(.5)):new s(NaN)},e1.inverseSine=e1.asin=function(){var e,t,r,n,i=this,s=i.constructor;return i.isZero()?new s(i):(t=i.abs().cmp(1),r=s.precision,n=s.rounding,-1!==t)?0===t?((e=tr(s,r+4,n).times(.5)).s=i.s,e):new s(NaN):(s.precision=r+6,s.rounding=1,i=i.div(new s(1).minus(i.times(i)).sqrt().plus(1)).atan(),s.precision=r,s.rounding=n,i.times(2))},e1.inverseTangent=e1.atan=function(){var e,t,r,n,i,s,o,a,l,u=this,c=u.constructor,h=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);else if(u.abs().eq(1)&&h+4<=e0)return(o=tr(c,h+4,d).times(.25)).s=u.s,o}else{if(!u.s)return new c(NaN);if(h+4<=e0)return(o=tr(c,h+4,d).times(.5)).s=u.s,o}for(c.precision=a=h+10,c.rounding=1,e=r=Math.min(28,a/eX+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(eV=!1,t=Math.ceil(a/eX),n=1,l=u.times(u),o=new c(u),i=u;-1!==e;)if(i=i.times(l),s=o.minus(i.div(n+=2)),i=i.times(l),void 0!==(o=s.plus(i.div(n+=2))).d[t])for(e=t;o.d[e]===s.d[e]&&e--;);return r&&(o=o.times(2<<r-1)),eV=!0,e7(o,c.precision=h,c.rounding=d,!0)},e1.isFinite=function(){return!!this.d},e1.isInteger=e1.isInt=function(){return!!this.d&&eW(this.e/eX)>this.d.length-2},e1.isNaN=function(){return!this.s},e1.isNegative=e1.isNeg=function(){return this.s<0},e1.isPositive=e1.isPos=function(){return this.s>0},e1.isZero=function(){return!!this.d&&0===this.d[0]},e1.lessThan=e1.lt=function(e){return 0>this.cmp(e)},e1.lessThanOrEqualTo=e1.lte=function(e){return 1>this.cmp(e)},e1.logarithm=e1.log=function(e){var t,r,n,i,s,o,a,l,u=this,c=u.constructor,h=c.precision,d=c.rounding,f
1=5;if(null==e)e=new c(10),t=!0;else{if(r=(e=new c(e)).d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:1!=u.s?NaN:r?0:1/0);if(t)if(r.length>1)s=!0;else{for(i=r[0];i%10==0;)i/=10;s=1!==i}if(eV=!1,e5((l=e6(o=tu(u,a=h+f),n=t?tt(c,a+10):tu(e,a),a,1)).d,i=h,d))do if(a+=10,l=e6(o=tu(u,a),n=t?tt(c,a+10):tu(e,a),a,1),!s){+e2(l.d).slice(i+1,i+15)+1==1e14&&(l=e7(l,h+1,0));break}while(e5(l.d,i+=10,d))return eV=!0,e7(l,h,d)},e1.minus=e1.sub=function(e){var t,r,n,i,s,o,a,l,u,c,h,d,f=this,p=f.constructor;if(e=new p(e),!f.d||!e.d)return f.s&&e.s?f.d?e.s=-e.s:e=new p(e.d||f.s!==e.s?f:NaN):e=new p(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=p.precision,l=p.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!u[0])return new p(3===l?-0:0);e=new p(f)}return eV?e7(e,a,l):e}if(r=eW(e.e/eX),c=eW(f.e/eX),u=u.slice(),s=c-r){for((h=s<0)?(t=u,s=-s,o=d.length):(t=d,r=c,o=u.length),s>(n=Math.max(Math.ceil(a/eX),o)+2)&&(s=n,t.length=1),t.reverse(),n=s;n--;)t.push(0);t.reverse()}else{for((h=(n=u.length)<(o=d.length))&&(o=n),n=0;n<o;n++)if(u[n]!=d[n]){h=u[n]<d[n];break}s=0}for(h&&(t=u,u=d,d=t,e.s=-e.s),o=u.length,n=d.length-o;n>0;--n)u[o++]=0;for(n=d.length;n>s;){if(u[--n]<d[n]){for(i=n;i&&0===u[--i];)u[i]=eJ-1;--u[i],u[n]+=eJ}u[n]-=d[n]}for(;0===u[--o];)u.pop();for(;0===u[0];u.shift())--r;return u[0]?(e.d=u,e.e=te(u,r),eV?e7(e,a,l):e):new p(3===l?-0:0)},e1.modulo=e1.mod=function(e){var t,r=this,n=r.constructor;return(e=new n(e),r.d&&e.s&&(!e.d||e.d[0]))?e.d&&(!r.d||r.d[0])?(eV=!1,9==n.modulo?(t=e6(r,e.abs(),0,3,1),t.s*=e.s):t=e6(r,e,0,n.modulo,1),t=t.times(e),eV=!0,r.minus(t)):e7(new n(r),n.precision,n.rounding):new n(NaN)},e1.naturalExponential=e1.exp=function(){return tl(this)},e1.naturalLogarithm=e1.ln=function(){return tu(this)},e1.negated=e1.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e7(e)},e1.plus=e1.add=function(e){var t,r,n,i,s,o,a,l,u,c,h=this,d=h.constructor;if(e=new d(e),!h.d||!e.d)return h.s&&e.s?h.d||(e=new d(e.d||h.s===e.s?h:NaN)):e=new d(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.minus(e);if(u=h.d,c=e.d,a=d.precision,l=d.rounding,!u[0]||!c[0])return c[0]||(e=new d(h)),eV?e7(e,a,l):e;if(s=eW(h.e/eX),n=eW(e.e/eX),u=u.slice(),i=s-n){for(i<0?(r=u,i=-i,o=c.length):(r=c,n=s,o=u.length),i>(o=(s=Math.ceil(a/eX))>o?s+1:o+1)&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((o=u.length)-(i=c.length)<0&&(i=o,r=c,c=u,u=r),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/eJ|0,u[i]%=eJ;for(t&&(u.unshift(t),++n),o=u.length;0==u[--o];)u.pop();return e.d=u,e.e=te(u,n),eV?e7(e,a,l):e},e1.precision=e1.sd=function(e){var t,r=this;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(eF+e);return r.d?(t=tn(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},e1.round=function(){var e=this,t=e.constructor;return e7(new t(e),e.e+1,t.rounding)},e1.sine=e1.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+eX,n.rounding=1,r=tf(n,tg(n,r)),n.precision=e,n.rounding=t,e7(eC>2?r.neg():r,e,t,!0)):new n(NaN)},e1.squareRoot=e1.sqrt=function(){var e,t,r,n,i,s,o=this,a=o.d,l=o.e,u=o.s,c=o.constructor;if(1!==u||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?o:1/0);for(eV=!1,0==(u=Math.sqrt(+o))||u==1/0?(((t=e2(a)).length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=eW((l+1)/2)-(l<0||l%2),n=new c(t=u==1/0?"5e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(n=(s=n).plus(e6(o,s,r+2,1)).times(.5),e2(s.d).slice(0,r)===(t=e2(n.d)).slice(0,r)){if("9999"!=(t=t.slice(r-3,r+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(e7(n,l+1,1),e=!n.times(n).eq(o));break}if(!i&&(e7(s,l+1,0),s.times(s).eq(o))){n=s;break}r+=4,i=1}return eV=!0,e7(n,l,c.rounding,e)},e1.tangent=e1.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,(r=r.sin()).s=1,r=e6(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,e7(2==eC||4==eC?r.neg():r,e,t,!0)):new n(NaN)},e1.times=e1.mul=function(e){var t,r,n,i,s,o,a,l,u,c=this,h=c.constructor,d=c.d,f=(e=new h(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new h(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:0*e.s);
1for(r=eW(c.e/eX)+eW(e.e/eX),(l=d.length)<(u=f.length)&&(s=d,d=f,f=s,o=l,l=u,u=o),s=[],n=o=l+u;n--;)s.push(0);for(n=u;--n>=0;){for(t=0,i=l+n;i>n;)a=s[i]+f[n]*d[i-n-1]+t,s[i--]=a%eJ|0,t=a/eJ|0;s[i]=(s[i]+t)%eJ|0}for(;!s[--o];)s.pop();return t?++r:s.shift(),e.d=s,e.e=te(s,r),eV?e7(e,h.precision,h.rounding):e},e1.toBinary=function(e,t){return tv(this,2,e,t)},e1.toDecimalPlaces=e1.toDP=function(e,t){var r=this,n=r.constructor;return(r=new n(r),void 0===e)?r:(e3(e,0,eT),void 0===t?t=n.rounding:e3(t,0,8),e7(r,e+r.e+1,t))},e1.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=e9(n,!0):(e3(e,0,eT),void 0===t?t=i.rounding:e3(t,0,8),r=e9(n=e7(new i(n),e+1,t),!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r},e1.toFixed=function(e,t){var r,n,i=this,s=i.constructor;return void 0===e?r=e9(i):(e3(e,0,eT),void 0===t?t=s.rounding:e3(t,0,8),r=e9(n=e7(new s(i),e+i.e+1,t),!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r},e1.toFraction=function(e){var t,r,n,i,s,o,a,l,u,c,h,d,f=this,p=f.d,m=f.constructor;if(!p)return new m(f);if(u=r=new m(1),n=l=new m(0),o=(s=(t=new m(n)).e=tn(p)-f.e-1)%eX,t.d[0]=eH(10,o<0?eX+o:o),null==e)e=s>0?t:u;else{if(!(a=new m(e)).isInt()||a.lt(u))throw Error(eF+a);e=a.gt(t)?s>0?t:u:a}for(eV=!1,a=new m(e2(p)),c=m.precision,m.precision=s=p.length*eX*2;h=e6(a,t,0,1,1),1!=(i=r.plus(h.times(n))).cmp(e);)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=e6(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=f.s,d=1>e6(u,n,s,1).minus(f).abs().cmp(e6(l,r,s,1).minus(f).abs())?[u,n]:[l,r],m.precision=c,eV=!0,d},e1.toHexadecimal=e1.toHex=function(e,t){return tv(this,16,e,t)},e1.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:e3(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(eV=!1,r=e6(r,e,0,t,1).times(e),eV=!0,e7(r)):(e.s=r.s,r=e),r},e1.toNumber=function(){return+this},e1.toOctal=function(e,t){return tv(this,8,e,t)},e1.toPower=e1.pow=function(e){var t,r,n,i,s,o,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(eH(+a,u));if((a=new l(a)).eq(1))return a;if(n=l.precision,s=l.rounding,e.eq(1))return e7(a,n,s);if((t=eW(e.e/eX))>=e.d.length-1&&(r=u<0?-u:u)<=eQ)return i=ts(l,a,r,n),e.s<0?new l(1).div(i):e7(i,n,s);if((o=a.s)<0){if(t<e.d.length-1)return new l(NaN);if((1&e.d[t])==0&&(o=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=o,a}return(t=0!=(r=eH(+a,u))&&isFinite(r)?new l(r+"").e:eW(u*(Math.log("0."+e2(a.d))/Math.LN10+a.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?o/0:0):(eV=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),(i=tl(e.times(tu(a,n+r)),n)).d&&e5((i=e7(i,n+5,1)).d,n,s)&&(t=n+10,+e2((i=e7(tl(e.times(tu(a,t+r)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=e7(i,n+1,0))),i.s=o,eV=!0,l.rounding=s,e7(i,n,s))},e1.toPrecision=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=e9(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(e3(e,1,eT),void 0===t?t=i.rounding:e3(t,0,8),r=e9(n=e7(new i(n),e,t),e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},e1.toSignificantDigits=e1.toSD=function(e,t){var r=this,n=r.constructor;return void 0===e?(e=n.precision,t=n.rounding):(e3(e,1,eT),void 0===t?t=n.rounding:e3(t,0,8)),e7(new n(r),e,t)},e1.toString=function(){var e=this,t=e.constructor,r=e9(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},e1.truncated=e1.trunc=function(){return e7(new this.constructor(this),this.e+1,1)},e1.valueOf=e1.toJSON=function(){var e=this,t=e.constructor,r=e9(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};var e6=function(){function e(e,t,r){var n,i=0,s=e.length;for(e=e.slice();s--;)n=e[s]*t+i,e[s]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,s;if(r!=n)s=r>n?1:-1;else for(i=s=0;i<r;i++)if(e[i]!=t[i]){s=e[i]>t[i]?1:-1;break}return s}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=+(e[r]<t[r]),e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,s,o,a,l){var u,c,h,d,f,p,m,g,v,y,b,w,x,S,_,M,O,E,P,k,A=n.constructor,j=n.s==i.s?1:-1,C=n.d,N=i.d;if(!C||!C[0]||!N||!N[0])return new A(!n.s||!i.s||(C?N&&C[0]==N[0]:!N)?NaN:C&&0==C[0]||!N?0*j:j/0);for(l?(f=1,c=n.e-i.e):(l=eJ,f=eX,c=eW(n.e/f)-eW(i.e/f)),P=N.length,O=C.length,y=(v=new A(j)).d=[],h=0;N[h]==(C[h]||0);h++);if(N[h]>(C[h]||0)&&c--,null==s?(S=s=A.precision,o=A.rounding):S=a?s+(n.e-i.e)+1:s,S<0)y.push(1),p=!0;else{if(S=S/f+2|0,h=0,1==P){for(d=0,N=N[0],S++;(h<O||d)&&S--;h++)_=d*l+(C[h]||0),y[h]=_/N|0,d=_%N|0;p=d||h<O}else{for((d=l/(N[0]+1)|0)>1&&(N=e(N,d,l),C=e(C,d,l),P=N.length,O=C.length),M=P,w=(b=C.slice(0,P)).length;w<P;)b[w++]=0;(k=N.slice()).unshift(0),E=N[0],N[1]>=l/2&&++E;do d=0,(u=t(N,b,P,w))<0?(x=b[0],P!=w&&(x=x*l+(b[1]||0)),(d=x/E|0)>1?(d>=l&&(d=l-1),g=(m=e(N,d,l)).length,w=b.length,1==(u=t(m,b,g,w))&&(d--,r(m,P<g?k:N,g,l))):(0==d&&(u=d=1),m=N.slice()),(g=m.length)<w&&m.unshift(0),r(b,m,w,l),-1==u&&(w=b.length,(u=t(N,b,P,w))<1&&(
vendor: 6,502 bytes, line 1
1d++,r(b,P<w?k:N,w,l))),w=b.length):0===u&&(d++,b=[0]),y[h++]=d,u&&b[0]?b[w++]=C[M]||0:(b=[C[M]],w=1);while((M++<O||void 0!==b[0])&&S--)p=void 0!==b[0]}y[0]||y.shift()}if(1==f)v.e=c,ej=p;else{for(h=1,d=y[0];d>=10;d/=10)h++;v.e=h+c*f-1,e7(v,a?s+v.e+1:s,o,p)}return v}}();function e7(e,t,r,n){var i,s,o,a,l,u,c,h,d,f=e.constructor;e:if(null!=t){if(!(h=e.d))return e;for(i=1,a=h[0];a>=10;a/=10)i++;if((s=t-i)<0)s+=eX,o=t,l=(c=h[d=0])/eH(10,i-o-1)%10|0;else if((d=Math.ceil((s+1)/eX))>=(a=h.length))if(n){for(;a++<=d;)h.push(0);c=l=0,i=1,s%=eX,o=s-eX+1}else break e;else{for(i=1,c=a=h[d];a>=10;a/=10)i++;s%=eX,l=(o=s-eX+i)<0?0:c/eH(10,i-o-1)%10|0}if(n=n||t<0||void 0!==h[d+1]||(o<0?c:c%eH(10,i-o-1)),u=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(s>0?o>0?c/eH(10,i-o):0:h[d-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=eH(10,(eX-t%eX)%eX),e.e=-t||0):h[0]=e.e=0,e;if(0==s?(h.length=d,a=1,d--):(h.length=d+1,a=eH(10,eX-s),h[d]=o>0?(c/eH(10,i-o)%eH(10,o)|0)*a:0),u)for(;;)if(0==d){for(s=1,o=h[0];o>=10;o/=10)s++;for(o=h[0]+=a,a=1;o>=10;o/=10)a++;s!=a&&(e.e++,h[0]==eJ&&(h[0]=1));break}else{if(h[d]+=a,h[d]!=eJ)break;h[d--]=0,a=1}for(s=h.length;0===h[--s];)h.pop()}return eV&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e<f.minE&&(e.e=0,e.d=[0])),e}function e9(e,t,r){if(!e.isFinite())return tc(e);var n,i=e.e,s=e2(e.d),o=s.length;return t?(r&&(n=r-o)>0?s=s.charAt(0)+"."+s.slice(1)+ti(n):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):i<0?(s="0."+ti(-i-1)+s,r&&(n=r-o)>0&&(s+=ti(n))):i>=o?(s+=ti(i+1-o),r&&(n=r-i-1)>0&&(s=s+"."+ti(n))):((n=i+1)<o&&(s=s.slice(0,n)+"."+s.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(s+="."),s+=ti(n))),s}function te(e,t){var r=e[0];for(t*=eX;r>=10;r/=10)t++;return t}function tt(e,t,r){if(t>eZ)throw eV=!0,r&&(e.precision=r),Error(eB);return e7(new e(eI),t,1,!0)}function tr(e,t,r){if(t>e0)throw Error(eB);return e7(new e(eD),t,r,!0)}function tn(e){var t=e.length-1,r=t*eX+1;if(t=e[t]){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ti(e){for(var t="";e--;)t+="0";return t}function ts(e,t,r,n){var i,s=new e(1),o=Math.ceil(n/eX+4);for(eV=!1;;){if(r%2&&ty((s=s.times(t)).d,o)&&(i=!0),0===(r=eW(r/2))){r=s.d.length-1,i&&0===s.d[r]&&++s.d[r];break}ty((t=t.times(t)).d,o)}return eV=!0,s}function to(e){return 1&e.d[e.d.length-1]}function ta(e,t,r){for(var n,i,s=new e(t[0]),o=0;++o<t.length;){if(!(i=new e(t[o])).s){s=i;break}((n=s.cmp(i))===r||0===n&&s.s===r)&&(s=i)}return s}function tl(e,t){var r,n,i,s,o,a,l,u=0,c=0,h=0,d=e.constructor,f=d.rounding,p=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?!e.d[0]?1:e.s<0?0:1/0:e.s?e.s<0?0:e:0/0);for(null==t?(eV=!1,l=p):l=t,a=new d(.03125);e.e>-2;)e=e.times(a),h+=5;for(l+=n=Math.log(eH(2,h))/Math.LN10*2+5|0,r=s=o=new d(1),d.precision=l;;){if(s=e7(s.times(e),l,1),r=r.times(++c),e2((a=o.plus(e6(s,r,l,1))).d).slice(0,l)===e2(o.d).slice(0,l)){for(i=h;i--;)o=e7(o.times(o),l,1);if(null!=t)return d.precision=p,o;if(!(u<3&&e5(o.d,l-n,f,u)))return e7(o,d.precision=p,f,eV=!0);d.precision=l+=10,r=s=a=new d(1),c=0,u++}o=a}}function tu(e,t){var r,n,i,s,o,a,l,u,c,h,d,f=1,p=10,m=e,g=m.d,v=m.constructor,y=v.rounding,b=v.precision;if(m.s<0||!g||!g[0]||!m.e&&1==g[0]&&1==g.length)return new v(g&&!g[0]?-1/0:1!=m.s?NaN:g?0:m);if(null==t?(eV=!1,c=b):c=t,v.precision=c+=p,n=(r=e2(g)).charAt(0),!(15e14>Math.abs(s=m.e)))return u=tt(v,c+2,b).times(s+""),m=tu(new v(n+"."+r.slice(1)),c-p).plus(u),v.precision=b,null==t?e7(m,b,y,eV=!0):m;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=e2((m=m.times(e)).d)).charAt(0),f++;for(s=m.e,n>1?(m=new v("0."+r),s++):m=new v(n+"."+r.slice(1)),h=m,l=o=m=e6(m.minus(1),m.plus(1),c,1),d=e7(m.times(m),c,1),i=3;;){if(o=e7(o.times(d),c,1),e2((u=l.plus(e6(o,new v(i),c,1))).d).slice(0,c)===e2(l.d).slice(0,c)){if(l=l.times(2),0!==s&&(l=l.plus(tt(v,c+2,b).times(s+""))),l=e6(l,new v(f),c,1),null!=t)return v.precision=b,l;if(!e5(l.d,c-p,y,a))return e7(l,v.precision=b,y,eV=!0);v.precision=c+=p,u=o=m=e6(h.minus(1),h.plus(1),c,1),d=e7(m.times(m),c,1),i=a=1}l=u,i+=2}}function tc(e){return String(e.s*e.s/0)}function th(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);n++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(n,i)){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%eX,r<0&&(n+=eX),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=eX;n<i;)e.d.push(+t.slice(n,n+=eX));n=eX-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";e.d.push(+t),eV&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function td(e,t){var r,n,i,s,o,a,l,u,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),eG.test(t))return th(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(eY.test(t))r=16,t=t.toLowerCase();else if(eK.test(t))r=2;else if(eq.test(t))r=8;else throw Error(eF+t);for((s=t.search(/p/i))>0?(l=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),o=(s=t.indexOf("."))>=0,n=e.constructor,o&&(s=(a=(t=t.replace(".","")).length)-s,i=ts(n,new n(r),s,2*s)),s=c=(u=e4(t,r,eJ)).length-1;0===u[s];--s)u.pop();return s<0?new n(0*e.s):(e.e=te(u,c),e.d=u,eV=!1,o&&(e=e6(e,i,4*a)),l&&(e=e.times(54>Math.abs(l)?eH(2,l):t8.pow(2,l))),eV=!0,e)}function tf(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tp(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=tp(e,2,t=t.times(1/tm(5,r)),t);for(var i,s=new e(5),o=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(s.plus(i.times(o.times(i).minus(a))));return t}function tp(e,t,r,n,i){var s,o,a,l,u=e.precision,c=Math.ceil(u/eX);for(eV=!1,l=r.times(r),a=new e(n);;){if(o=e6(a.times(l),new e(t++*t++),u,1),a=i?n.plus(o):n.minus(o),n=e6(o.times(l),new e(t++*t++),u,1),void 0!==(o=a.plus(n)).d[c]){for(s=c;o.d[s]===a.d[s]&&s--;);if(-1==s)break}s=a,a=n,n=o,o=s}return eV=!0,o.d.length=c+1,o}function tm(e,t){for(var r=e;--t;)r*=e;return r}function tg(e,t){var r,n=t.s<0,i=tr(e,e.precision,1),s=i.times(.5);if((t=t.abs()).lte(s))return eC=n?4:1,t;if((r=t.divToInt(i)).isZero())eC=n?3:2;else{if((t=t.minus(r.times(i))).lte(s))return eC=to(r)?n?2:3:n?4:1,t;eC=to(r)?n?1:4:n?3:2}return t.minus(i).abs()}function tv(e,t,r,n){var i,s,o,a,l,u,c,h,d,f=e.constructor,p=void 0!==r;if(p?(e3(r,1,eT),void 0===n?n=f.rounding:e3(n,0,8)):(r=f.precision,n=f.rounding),e.isFinite()){for(o=(c=e9(e)).indexOf("."),p?(i=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):i=t,o>=0&&(c=c.replace(".",""),(d=new f(1)).e=c.length-o,d.d=e4(e9(d),10,i),d.e=d.d.length),s=l=(
1h=e4(c,10,i)).length;0==h[--l];)h.pop();if(h[0]){if(o<0?s--:((e=new f(e)).d=h,e.e=s,h=(e=e6(e,d,r,n,0,i)).d,s=e.e,u=ej),o=h[r],a=i/2,u=u||void 0!==h[r+1],u=n<4?(void 0!==o||u)&&(0===n||n===(e.s<0?3:2)):o>a||o===a&&(4===n||u||6===n&&1&h[r-1]||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++s,h.unshift(1));for(l=h.length;!h[l-1];--l);for(o=0,c="";o<l;o++)c+=eR.charAt(h[o]);if(p){if(l>1)if(16==t||8==t){for(o=16==t?4:3,--l;l%o;l++)c+="0";for(l=(h=e4(c,i,t)).length;!h[l-1];--l);for(o=1,c="1.";o<l;o++)c+=eR.charAt(h[o])}else c=c.charAt(0)+"."+c.slice(1);c=c+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)c="0"+c;c="0."+c}else if(++s>l)for(s-=l;s--;)c+="0";else s<l&&(c=c.slice(0,s)+"."+c.slice(s))}else c=p?"0p+0":"0";c=(16==t?"0x":2==t?"0b":8==t?"0o":"")+c}else c=tc(e);return e.s<0?"-"+c:c}function ty(e,t){if(e.length>t)return e.length=t,!0}function tb(e){return new this(e).abs()}function tw(e){return new this(e).acos()}function tx(e){return new this(e).acosh()}function tS(e,t){return new this(e).plus(t)}function t_(e){return new this(e).asin()}function tM(e){return new this(e).asinh()}function tO(e){return new this(e).atan()}function tE(e){return new this(e).atanh()}function tP(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,s=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(r=t.s<0?tr(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=tr(this,s,1).times(.5)).s=e.s:t.s<0?(this.precision=s,this.rounding=1,r=this.atan(e6(e,t,s,1)),t=tr(this,s,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(e6(e,t,s,1)):(r=tr(this,s,1).times(t.s>0?.25:.75)).s=e.s:r=new this(NaN),r}function tk(e){return new this(e).cbrt()}function tA(e){return e7(e=new this(e),e.e+1,2)}function tj(e,t,r){return new this(e).clamp(t,r)}function tC(e){if(!e||"object"!=typeof e)throw Error(ez+"Object expected");var t,r,n,i=!0===e.defaults,s=["precision",1,eT,"rounding",0,8,"toExpNeg",-eN,0,"toExpPos",0,eN,"maxE",0,eN,"minE",-eN,0,"modulo",0,9];for(t=0;t<s.length;t+=3)if(r=s[t],i&&(this[r]=eL[r]),void 0!==(n=e[r]))if(eW(n)===n&&n>=s[t+1]&&n<=s[t+2])this[r]=n;else throw Error(eF+r+": "+n);if(r="crypto",i&&(this[r]=eL[r]),void 0!==(n=e[r]))if(!0===n||!1===n||0===n||1===n)if(n)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(e$);else this[r]=!1;else throw Error(eF+r+": "+n);return this}function tN(e){return new this(e).cos()}function tT(e){return new this(e).cosh()}function tR(e){var t,r,n;function i(e){var t,r,n,s=this;if(!(s instanceof i))return new i(e);if(s.constructor=i,tz(e)){s.s=e.s,eV?!e.d||e.e>i.maxE?(s.e=NaN,s.d=null):e.e<i.minE?(s.e=0,s.d=[0]):(s.e=e.e,s.d=e.d.slice()):(s.e=e.e,s.d=e.d?e.d.slice():e.d);return}if("number"==(n=typeof e)){if(0===e){s.s=1/e<0?-1:1,s.e=0,s.d=[0];return}if(e<0?(e=-e,s.s=-1):s.s=1,e===~~e&&e<1e7){for(t=0,r=e;r>=10;r/=10)t++;eV?t>i.maxE?(s.e=NaN,s.d=null):t<i.minE?(s.e=0,s.d=[0]):(s.e=t,s.d=[e]):(s.e=t,s.d=[e]);return}if(0*e!=0){e||(s.s=NaN),s.e=NaN,s.d=null;return}return th(s,e.toString())}if("string"===n)return 45===(r=e.charCodeAt(0))?(e=e.slice(1),s.s=-1):(43===r&&(e=e.slice(1)),s.s=1),eG.test(e)?th(s,e):td(s,e);if("bigint"===n)return e<0?(e=-e,s.s=-1):s.s=1,th(s,e.toString());throw Error(eF+e)}if(i.prototype=e1,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=tC,i.clone=tR,i.isDecimal=tz,i.abs=tb,i.acos=tw,i.acosh=tx,i.add=tS,i.asin=t_,i.asinh=tM,i.atan=tO,i.atanh=tE,i.atan2=tP,i.cbrt=tk,i.ceil=tA,i.clamp=tj,i.cos=tN,i.cosh=tT,i.div=tI,i.exp=tD,i.floor=tL,i.hypot=tV,i.ln=tF,i.log=tB,i.log10=tU,i.log2=t$,i.max=tW,i.min=tH,i.mod=tK,i.mul=tY,i.pow=tq,i.random=tG,i.round=tJ,i.sign=tX,i.sin=tQ,i.sinh=tZ,i.sqrt=t0,i.sub=t1,i.sum=t2,i.tan=t3,i.tanh=t5,i.trunc=t4,void 0===e&&(e={}),e&&!0!==e.defaults)for(t=0,n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"];t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function tI(e,t){return new this(e).div(t)}function tD(e){return new this(e).exp()}function tL(e){return e7(e=new this(e),e.e+1,3)}function tV(){var e,t,r=new this(0);for(e=0,eV=!1;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return eV=!0,new this(1/0);r=t}return eV=!0,r.sqrt()}function tz(e){return e instanceof t8||e&&e.toStringTag===eU||!1}function tF(e){return new this(e).ln()}function tB(e,t){return new this(e).log(t)}function t$(e){return new this(e).log(2)}function tU(e){return new this(e).log(10)}function tW(){return ta(this,arguments,-1)}
1function tH(){return ta(this,arguments,1)}function tK(e,t){return new this(e).mod(t)}function tY(e,t){return new this(e).mul(t)}function tq(e,t){return new this(e).pow(t)}function tG(e){var t,r,n,i,s=0,o=new this(1),a=[];if(void 0===e?e=this.precision:e3(e,1,eT),n=Math.ceil(e/eX),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));s<n;)(i=t[s])>=429e7?t[s]=crypto.getRandomValues(new Uint32Array(1))[0]:a[s++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);s<n;)(i=t[s]+(t[s+1]<<8)+(t[s+2]<<16)+((127&t[s+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,s):(a.push(i%1e7),s+=4);s=n/4}else throw Error(e$);else for(;s<n;)a[s++]=1e7*Math.random()|0;for(n=a[--s],e%=eX,n&&e&&(i=eH(10,eX-e),a[s]=(n/i|0)*i);0===a[s];s--)a.pop();if(s<0)r=0,a=[0];else{for(r=-1;0===a[0];r-=eX)a.shift();for(n=1,i=a[0];i>=10;i/=10)n++;n<eX&&(r-=eX-n)}return o.e=r,o.d=a,o}function tJ(e){return e7(e=new this(e),e.e+1,this.rounding)}function tX(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function tQ(e){return new this(e).sin()}function tZ(e){return new this(e).sinh()}function t0(e){return new this(e).sqrt()}function t1(e,t){return new this(e).sub(t)}function t2(){var e=0,t=arguments,r=new this(t[0]);for(eV=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return eV=!0,e7(r,this.precision,this.rounding)}function t3(e){return new this(e).tan()}function t5(e){return new this(e).tanh()}function t4(e){return e7(e=new this(e),e.e+1,1)}e1[Symbol.for("nodejs.util.inspect.custom")]=e1.toString,e1[Symbol.toStringTag]="Decimal";var t8=e1.constructor=tR(eL);eI=new t8(eI),eD=new t8(eD);let t6=t8;function t7(e,t,r=2){function n(e,t){let r=e.toString().replace(/(\.\d*?)0+\b/g,"$1").replace(/\.$/,"");return Number.isFinite(+r)?(+r)?.toFixed(t):r}if(isNaN(e))return String(e);let i=0;for(;Math.abs(e)>1e3&&i<4;)e/=1e3,i+=1;let s={0:"",1:"K",2:"M",3:"B",4:"T"};if("$"===t){let t=rn(e),o="string"==typeof t?parseFloat(t.replace(/,/g,"")):Number(t);return Number.isNaN(o)?`$${t+s[i]}`:o<0?`$${Math.abs(o).toFixed(2)+s[i]}`:`$${n(o,r)+s[i]}`}{let t=rn(e),o="string"==typeof t?parseFloat(t.replace(/,/g,"")):Number(t);return Number.isNaN(o)?t+s[i]:n(o,r)+s[i]}}function t9(e=0){let t=e.toString();if(!t.includes("e"))return t;let[r,n]=t.split("e"),i=parseInt(n),[s,o=""]=r.split(".");if(i>=0)return(parseFloat(r)*10**i).toString();{let e="0.",t=Math.abs(i)-1;return e+="0".repeat(t),e+=s+(o||""),(e=e.replace(/0+$/,"")).endsWith(".")&&(e+="0"),e}}function re(e){if(!e||0===e.length)return e;let t=(e=String(e)).startsWith("-"),r=(t?e.substring(1):e).split("."),n=r[0],i=r.length>1?`.${r[1]}`:"",s=n.split("").reverse(),o=[];for(let e=0;e<s.length;e++)e>0&&e%3==0&&o.push(","),o.push(s[e]);let a=o.reverse().join("")+i;return t?`-${a}`:a}function rt(e){let t=e.indexOf(".");return -1===t?0:e.length-t-1}function rr(e){return e.replace(/\.?0+$/,"")||"0"}function rn(e,t={}){let r,{showThousands:n=!0,fixed:i=!1}=t,s="string"==typeof e?parseFloat(e):e;if(isNaN(s))return e.toString();if(1e-10>Math.abs(s))return"0";if(Math.abs(s)>=1)r=s.toFixed(3);else{let e=s.toString();if(0===s)r="0.000";else{let t=rt(e);if(e.includes("e")){let t,n=e.split("e"),i=parseFloat(n[0]),s=parseInt(n[1]),o=i.toString().split(".");if(t=(t=o.length>1?o[0]+o[1]:o[0]).length>3?t.substring(0,3):t,s<0){let e=-s;r=rr(r=(i<0?"-":"")+`0.${"0".repeat(e-1)}`+t.replace("-",""))}else r=e}else if(t<=3)r=s.toFixed(3);else{let t=e.match(/-?0\.0*[1-9]/);if(t){let n=e.substring(0,t.index+t[0].length-1),s=e.substring(t.index+t[0].length-1),o=i?s:s.length>3?s.substring(0,3):s;r=rr(r=`${n}${o}`)}else r=e}}}return n?re(r):r}function ri(e,t="value"){return 0===e.length?null:e.reduce((e,r)=>r[t]<e[t]?r:e)}function rs(e){if(!e)return 0;let t=String(e)?.split(".");return t.length<=1?0:t[1].replace(/0+$/,"").length}function ro(e,t=""){let r,n=2,i=.01;if("FOREX"===t)return{precision:n=5,minMove:i=1e-5,base:r};if("us"===t.toLowerCase()||"hk"===t.toLowerCase())return{precision:n=3,minMove:i=.001,base:r};try{let t=ri(e)?.value;if(t&&"number"==typeof t&&!isNaN(t)&&isFinite(t)){let e,r=new t6(t),s=t.toString();if(s.includes("e")||s.includes("E")){if((e=t9(t)).includes("e")||e.includes("E")){let[t,n]=s.toLowerCase().split("e"),i=parseInt(n);if(i<0){let n=t.split(".")[1]?.length||0,s=Math.abs(i)+n;e=r.toFixed(Math.min(s,20))}else e=r.toFixed(20)}}else e=r.toFixed(20);let o=rs(e);if(t>1&&o>2)n=Math.min(o,18),i=10**-n;else if(o>2){n=Math.min(o,18);let e="1";for(let t=1;t<=n;t++)e=`0${e}`;i=new t6(`0.${e}`).toNumber(),(!isFinite(i)||i<=0)&&(n=5,i=1e-5)}}}catch(e){console.warn("Error calculating precision:",e),n=5,i=1e-5}(!isFinite(n)||n<0||n>18)&&(n=5),(!isFinite(i)||i<=0)&&(i=1e-5);let s=i.toString();return(s.includes("e")||s.includes("E")||i<1e-10)&&(!isFinite(r=new t6(1).div(i).toNumber())||r<=0)&&(r=void 0,i=1e-5,n=5),{precision:n,minMove:i,base:r}}var ra=e.i(397546),rl=ef;let ru="/v1/tradeagent/account/info",rc=(e="pc",t)=>(0,rl.post)(ru,{platform:e},!0,{},t),rh="/v1/dashboard/app/onboarding/profile";function rd(e){if(!e||"object"!=typeof e)return null;let t=e;if("number"==typeof t.ret&&0!==t.ret)return null;let r=Array.isArray(t.widget_ids)?t.widget_ids.filter(e=>"string"==typeof e):[],n=Array.isArray(t.focal_steps)?t.focal_steps.filter(e=>!!e&&"object"==typeof e).map(e=>({widget:"string"==typeof e.widget?e.widget:"",guidance:"string"==typeof e.guidance?e.guidance:""})).filter(e=>e.widget):[];return{personalized:!0===t.personalized,widgetIds:r,focalSteps:n,placeholder:"string"==typeof t.placeholder?t.placeholder:"",interaction:"string"==typeof t.interaction?t.interaction:"",dimPct:"number"==typeof t.dim_pct?t.dim_pct:0,demoTask:!0===t.demo_task}}let rf=async(e,t,r,n)=>{try{let i=await (0,rl.post)(rh,{experience:e,assets:t,intents:r},!0,{},n);return rd(i)}catch{return null}};
1!function(e){e[e.VipTypeUnknown=0]="VipTypeUnknown",e[e.VipTypePerson=1]="VipTypePerson",e[e.VipTypeMember=2]="VipTypeMember",e[e.VipTypeBusiness=3]="VipTypeBusiness"}({});var rp=function(e){return e[e.Normal=0]="Normal",e[e.Internal=2]="Internal",e[e.Beta=8]="Beta",e[e.Admin=9]="Admin",e[e.Investor=11]="Investor",e[e.Kol=12]="Kol",e}({});!function(e){e[e.ReferUserStatusUnknown=0]="ReferUserStatusUnknown",e[e.ReferUserStatusJoined=1]="ReferUserStatusJoined",e[e.ReferUserStatusPending=2]="ReferUserStatusPending",e[e.ReferUserStatusClaimed=3]="ReferUserStatusClaimed",e[e.ReferUserStatusRefuned=4]="ReferUserStatusRefuned",e[e.ReferUserStatusReady=5]="ReferUserStatusReady",e[e.ReferUserExpired=6]="ReferUserExpired"}({});let rm={userId:null,nickname:"",level:"",head_url:"",email:"",job:"",companyName:"",userType:rp.Normal,userInfoLoaded:!1,tradeAgentAccountInfo:null,tradeAgentAccountInfoLoading:!1,dexPortfolio:null,dexPortfolioLoading:!1},rg=null,rv=null,ry=3e4,rb=0,rw=0,rx=(0,ra.create)(e=>({...rm,setUser:t=>e(e=>({...e,...t})),fetchPerformanceSummary:async(t,r)=>{if(rg)return rg;if(!r?.force&&Date.now()-rb<ry)return;e({tradeAgentAccountInfoLoading:!0});let n=(async()=>{try{let r=await rc(t);0===r.ret&&r.data&&(e({tradeAgentAccountInfo:r.data}),rb=Date.now())}catch{}finally{e({tradeAgentAccountInfoLoading:!1})}})();return rg=n,n.finally(()=>{rg===n&&(rg=null)}),n},fetchDexPortfolio:async r=>{if(rv)return rv;let n=r?.walletAddress!==t;if(!r?.force&&!n&&Date.now()-rw<ry)return;e({dexPortfolioLoading:!0});let i=(async()=>{try{let n=await eA(r?.walletAddress);0===n.ret&&n.data&&(e({dexPortfolio:n.data}),rw=Date.now(),t=r?.walletAddress)}catch{}finally{e({dexPortfolioLoading:!1})}})();return rv=i,i.finally(()=>{rv===i&&(rv=null)}),i},clearUser:()=>{rb=0,rw=0,t=void 0,e(rm)}}));function rS(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let i=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),s=null!=(n=r.getItem(e))?n:null;return s instanceof Promise?s.then(i):i(s)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}let r_=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>r_(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>r_(t)(e)}}},rM=(e,t)=>(r,n,i)=>{let s,o={storage:rS(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},a=!1,l=0,u=new Set,c=new Set,h=o.storage;if(!h)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...e)},n,i);let d=()=>{let e=o.partialize({...n()});return h.setItem(o.name,{state:e,version:o.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(r(...e),d()),n,i);i.getInitialState=()=>p;let m=()=>{var e,t;if(!h)return;let i=++l;a=!1,u.forEach(e=>{var t;return e(null!=(t=n())?t:p)});let f=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,null!=(e=n())?e:p))||void 0;return r_(h.getItem.bind(h))(o.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===o.version)return[!1,e.state];else{if(o.migrate){let t=o.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;if(i!==l)return;let[a,u]=e;if(r(s=o.merge(u,null!=(t=n())?t:p),!0),a)return d()}).then(()=>{i===l&&(null==f||f(s,void 0),s=n(),a=!0,c.forEach(e=>e(s)))}).catch(e=>{i===l&&(null==f||f(void 0,e))})};return i.persist={setOptions:e=>{o={...o,...e},e.storage&&(h=e.storage)},clearStorage:()=>{null==h||h.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},o.skipHydration||m(),s||p};(0,ra.create)()(rM(e=>({activeWalletAddress:null,setActive:t=>e({activeWalletAddress:t.toLowerCase()}),clear:()=>e({activeWalletAddress:null})}),{name:"alphio-active-wallet",version:1}));let rO={items:[],unreadCount:0};(0,ra.create)(e=>({...rO,setItems:t=>e({items:t}),setUnreadCount:t=>e({unreadCount:t}),clear:()=>e(rO)})),e.i(365520);var rE=ra,rP=ef;let rk=(e,t)=>(0,rP.post)("/v1/push/companion/scene/evaluate",{surface_key:e,...t?{context:t}:{}}),rA=e=>(0,rP.post)("/v1/push/companion/state/patch",{patch_json:e});var rj=ef;let rC="/v1/push/alphio/notifications/list",rN="/v1/push/alphio/notifications/unread-count",rT="/v1/push/alphio/notifications/mark-read",rR="/v1/push/alphio/notifications/mark-all-read",rI="/v1/push/alphio/notification-configs/list",rD="/v1/push/alphio/notification-configs/update",rL=(e={},t)=>(0,rj.post)(rC,e,!0,{},t),rV=(e={},t)=>(0,rj.post)(rN,e,!0,{},t),rz=(e,t)=>(0,rj.post)(rT,e,!0,{},t),rF=(e={},t)=>(0,rj.post)(rR,e,!0,{},t),rB=e=>(0,rj.post)(rI,{},!0,{},e),r$=(e,t)=>(0,rj.post)(rD,e,!0,{},t),rU="companion_cooldown",rW=new Set(["home_entry"]),rH={market_open_soon:0,market_closed_view:1,market_closed:2,task_execute_start:3,task_execute_success:4,task_execute_partial:5,task_blocked_by_risk:6,task_execute_fail_network:6,task_execute_fail_permission:6,edit_risk_during_loss:7,home_entry:8,ai_trade_entry:9,task_created:9,too_many_tasks:10,conflicting_tasks:11,timezone_mismatch:12,notification_disabled:13,repeated_refresh:14,fast_exit:15,search_no_result:16,idle:17,empty_state_seen:18,data_timestamp_viewed:19,task_create_abandon:20,quote_stale:21};function rK(){try{let e=localStorage.getItem(rU);return e?JSON.parse(e):{}}catch{return{}}}function rY(e){try{localStorage.setItem(rU,JSON.stringify(e))}catch{}}let rq=(0,rE.create)((e,t)=>({bubble:null,bubbleSurfaceKey:null,queue:[],cooldownMap:rK(),pendingKeys:new Set,presentationBlocked:!1,setPresentationBlocked:t=>e({presentationBlocked:t}),clearPresentation:()=>e({bubble:null,bubbleSurfaceKey:null,queue:[]}),evaluate:async(r,n)=>{if(t().presentationBlocked)return!1;let i=rH[t().bubbleSurfaceKey??"idle"]??99,s=rH[r]??99;if(null!==t().bubble&&s>=i)return!1;let{cooldownMap:o}=t();if((o[r]??0)>Date.now()||t().pendingKeys.has(r))return!1;e(e=>({pendingKeys:new Set(e.pendingKeys).add(r)}));try{let i=await rk(r,n);if(i?.ret!==0||!i.data?.should_show)return!1;let o=i.data;if(o.cooldown_seconds&&o.cooldown_seconds>0&&!rW.has(r)){let n={...t().cooldownMap,[r]:Date.now()+1e3*o.cooldown_seconds};rY(n),e({cooldownMap:n})}let a=rH[t().bubbleSurfaceKey??"idle"]??99;if(null!==t().bubble&&s>=a)return!1;return e({bubble:o,bubbleSurfaceKey:r}),!0}catch{return!1}finally{e(e=>{let t=new Set(e.pendingKeys);return t.delete(r),{pendingKeys:t}})}},setFromPush(r,n){if(!t().presentationBlocked){if(r.cooldown_seconds&&r.cooldown_seconds>0&&n&&!rW.has(n)){let i={...t().cooldownMap,[n]:Date.now()+1e3*r.cooldown_seconds};rY(i),e({cooldownMap:i})}if(null!==t().bubble){let i=n??"idle";e({queue:[...t().queue,{surfaceKey:i,data:r}].sort((e,t)=>
1(rH[e.surfaceKey]??99)-(rH[t.surfaceKey]??99))});return}e({bubble:r})}},dismiss:()=>{let{queue:r}=t();if(r.length>0){let[t,...n]=r;e({bubble:t.data,bubbleSurfaceKey:t.surfaceKey,queue:n})}else e({bubble:null,bubbleSurfaceKey:null})},mute:async()=>{e({bubble:null,bubbleSurfaceKey:null,queue:[]});try{await r$({category:"COMPANION",enabled:!1,sub_config_json:"",channels_set:!1})}catch{try{await rA('{"companion_muted":true}')}catch{}}},resetCooldowns:()=>{rY({}),e({cooldownMap:{},bubble:null,bubbleSurfaceKey:null,queue:[],presentationBlocked:!1})}}));var rG=ra,rJ=e.i(780075);function rX(e,...t){return e.reduce((e,r,n)=>e+r+(n<t.length?String(t[n]):""),"")}var rQ=ef;class rZ extends Error{ret;constructor(e,t){super(t),this.name="ApiListError",this.ret=e}}let r0="dex",r1="hyperliquid",r2="/v1/trade/brokers",r3="/v1/trade/extra_brokers",r5="/v1/trade/unified-brokers",r4="/v1/trade/connection-status",r8="/v1/trade/connections",r6="/v1/trade/accounts",r7="/v1/trade/account-balance",r9="/v1/trade/account-positions",ne="/v1/trade/recent-24-hour-orders",nt="/v1/trade/account-orders",nr="/v1/trade/cancel-order",nn="/v1/trade/copytrader/list",ni=async(e,t)=>(0,rQ.post)(nn,e,!0,{},t),ns=async e=>(0,rQ.post)(r2,{},!0,{},e),no=async e=>(0,rQ.post)(r3,{},!0,{},e),na=async e=>(0,rQ.post)(r5,{},!0,{},e),nl=async(e,t,r)=>{let n={status:t,authorization_id:e};await (0,rQ.post)(r4,n,!0,{},r)};function nu(e){return!!e?.isCancelled()}let nc=async e=>{let t=await (0,rQ.post)(r8,{},!0,{},e);if(0===t.ret&&t.data)return t.data.list;if(nu(e))return[];throw new rZ(t.ret,t.msg||rJ.i18n._(rX`Failed to load connections`))},nh=async e=>{let t=await (0,rQ.post)(r6,{},!0,{},e);if(0===t.ret&&t.data)return t.data.list;if(nu(e))return[];throw new rZ(t.ret,t.msg||rJ.i18n._(rX`Failed to load accounts`))},nd=async(e,t)=>{let r={account_id:e},n=await (0,rQ.post)(r7,r,!0,{},t);if(0===n.ret&&n.data)return n.data.list;if(nu(t))return[];throw new rZ(n.ret,n.msg||rJ.i18n._(rX`Failed to load balance`))},nf=async(e,t)=>{let r={account_id:e},n=await (0,rQ.post)(r9,r,!0,{},t);return 0===n.ret&&n.data?n.data.list:[]},np=async(e,t)=>{let r={account_id:e},n=await (0,rQ.post)(ne,r,!0,{},t);return 0===n.ret&&n.data?n.data.list:[]},nm=async(e,t,r,n,i)=>{let s={account_id:e,page:t,page_size:r,last_id:n},o=await (0,rQ.post)(nt,s,!0,{},i);return 0===o.ret&&o.data?[o.data.list,o.data.total]:[[],0]},ng=async(e,t,r)=>{let n={account_id:e,brokerage_order_id:t};await (0,rQ.post)(nr,n,!0,{},r)};var nv=eS;let ny={accountData:[],selectedAccount:null,currentCopytrader:null,tradeSignalType:0,copytraderListHistory:[],copytradersLoaded:!1,copytradersLoadFailed:!1,tradeAccountLoadFailed:!1};(0,rG.create)((e,t)=>({...ny,setTradeSignalType:t=>e({tradeSignalType:t}),setSelectedAccount:t=>e({selectedAccount:t}),setCurrentCopytrader:t=>e({currentCopytrader:t}),fetchTradeAccount:async t=>{try{let r=await nh(t);e({accountData:r,tradeAccountLoadFailed:!1})}catch(r){if((0,nv.isRequestAborted)(t,r))return;console.error("Failed to fetch trade account:",r),e({tradeAccountLoadFailed:!0})}},fetchCopytradersHistory:async t=>{try{let r=await ni({cursor:0,limit:20,closed:!1},t);if(0===r.ret&&r.data)return void e({copytraderListHistory:r.data.data||[],copytradersLoaded:!0,copytradersLoadFailed:!1});if(t?.isCancelled())return;e({copytradersLoadFailed:!0})}catch(r){if((0,nv.isRequestAborted)(t,r))return;console.error("Failed to fetch copytraders history:",r),e({copytradersLoadFailed:!0})}},ensureCopytradersLoaded:async e=>{let{copytradersLoaded:r,copytradersLoadFailed:n}=t();r||n||await t().fetchCopytradersHistory(e)},retryCopytraders:async r=>{e({copytradersLoadFailed:!1}),await t().fetchCopytradersHistory(r)},clear:()=>e(ny)}));var nb=ef;function nw(e){return e.trim().toLowerCase()}(0,ra.create)((e,t)=>({flags:{},loaded:!1,fetchFlags:async()=>{try{let t=await (0,nb.get)("/v1/dashboard/app/startup");0===t.ret&&t.data?.feature_flags?e({flags:t.data.feature_flags,loaded:!0}):e({loaded:!0})}catch{e({loaded:!0})}},isEnabled:e=>t().flags[e]??!1,clear:()=>e({flags:{},loaded:!1})})),(0,ra.create)((e,t)=>({byWallet:{},failedWallets:{},inflight:{},setStatus:(t,r)=>{let n=nw(t);e(e=>{let t={...e.byWallet};return null===r?delete t[n]:t[n]=r,{byWallet:t}})},getStatus:e=>e?t().byWallet[nw(e)]??null:null,isFailed:e=>!!e&&!!t().failedWallets[nw(e)],refreshStatus:async r=>{let n=nw(r);if(!n)return;let i=t().inflight[n];if(i)return i;e(e=>{let t={...e.failedWallets};return delete t[n],{failedWallets:t}});let s=(async()=>{try{let t=await ek(r);0===t.ret&&t.data?e(e=>({byWallet:{...e.byWallet,[n]:t.data}})):e(e=>({failedWallets:{...e.failedWallets,[n]:!0}}))}catch(t){console.warn("[hyperliquid status] refresh failed:",t),e(e=>({failedWallets:{...e.failedWallets,[n]:!0}}))}finally{e(e=>{let t={...e.inflight};return delete t[n],{inflight:t}})}})();return e(e=>({inflight:{...e.inflight,[n]:s}})),s},clear:()=>e({byWallet:{},failedWallets:{},inflight:{}})}));var nx=ra;!function(e){e[e.ProTraderPlays=1]="ProTraderPlays",e[e.ContrarianPlays=2]="ContrarianPlays",e[e.NearCertainPlays=3]="NearCertainPlays",e[e.HighRiskRewardPlays=4]="HighRiskRewardPlays"}({}),function(e){e[e.AllEvents=1]="AllEvents",e[e.ProTraderPlays=2]="ProTraderPlays",e[e.ContrarianPlays=3]="ContrarianPlays"}({}),function(e){e[e.Volume=1]="Volume",e[e.Newest=2]="Newest",e[e.EndingSoon=3]="EndingSoon",e[e.ProTrader=4]="ProTrader"}({}),function(e){e[e.Weekly=1]="Weekly",e[e.Monthly=2]="Monthly",e[e.All=3]="All"}({});var nS=function(e){return e[e.All=0]="All",e[e.Politics=1]="Politics",e[e.Sports=2]="Sports",e[e.Crypto=3]="Crypto",e[e.Finance=4]="Finance",e[e.Culture=5]="Culture",e[e.Mentions=6]="Mentions",e[e.Weather=7]="Weather",e[e.Economics=8]="Economics",e[e.Tech=9]="Tech",e}({});!function(e){e[e.Unknown=0]="Unknown",e[e.Rank=1]="Rank",e[e.Volume=2]="Volume",e[e.Pnl=3]="Pnl",e[e.WinRate=4]="WinRate",e[e.RecentActivity=5]="RecentActivity"}({}),function(e){e[e.Desc=0]="Desc",e[e.Asc=1]="Asc"}({}),function(e){e[e.Unknown=0]="Unknown",e[e.Volume=1]="Volume",e[e.Newest=2]="Newest",e[e.EndingSoon=3]="EndingSoon",e[e.ProTrader=4]="ProTrader"}({}),function(e){e[e.Daily=1]="Daily",e[e.Weekly=2]="Weekly",e[e.Monthly=3]="Monthly",e[e.All=4]="All",e[e.Hourly=5]="Hourly",e[e.Annual=6]="Annual",e[e.FiveMinutes=7]="FiveMinutes",e[e.FifteenMinutes=8]="FifteenMinutes"}({}),function(e){e[e.Unknown=0]="Unknown",e[e.ReturnRate=1]="ReturnRate",e[e.BetAmount=2]="BetAmount",e[e.PnlAmount=3]="PnlAmount"}({}),function(e){e.Light="light",e.Dark="dark",e.System="system"}({});var n_=function(e){return e.En="en",e.Zh="zh",e.ZhTW="zh-TW",e.Es="es",e.Ja="ja",e.De="de",e}({});!function(e){e.Cyber="cyber",e.Forest="forest",e.Mint="mint",e.Ocean="ocean",e.Sunset="sunset",e.Violet="violet",e.Slate="slate"}({});var nM=function(e){return e.US="us",e.HK="hk",e.Forex="forex",e.Metals="metals",e}({}),nO=function(e){return e[e.NULL=-1]="NULL",e[e.Stock=0]="Stock",e[e.ETF=1]="ETF",e[e.Crypto=2]="Crypto",e[e.Metals=3]="Metals",e[e.Forex=4]="Forex",e[e.Hyperliquid=5]="Hyperliquid",e}({}),nE=function(e){return e.US="us",e.HK="hk",e.Forex="forex",e.Metals="metal",e}({}),nP=function(e){return e.Pre="pre",e.Intraday="intraday",e.After="after",e.Holiday="holiday",e}({});!function(e){e[e.FREE=0]="FREE",e[e.PRO=1]="PRO",e[e.MAX=2]="MAX",e[e.BASIC=3]="BASIC",e[e.EXPERT=4]="EXPERT"}({}),function(e){e[e.OPEN=1]="OPEN",e[e.CLOSE=2]="CLOSE",e[e.TODAY=3]="TODAY"}({}),function(e){e[e.Triangle=1]="Triangle",e[e.Rectangle=2]="Rectangle",e[e.ChannelUp=3]="ChannelUp",e[e.ChannelDown=4]="ChannelDown",e[e.DoubleTop=5]="DoubleTop",e[e.DoubleBottom=6]="DoubleBottom",e[e.VShaped=7]="VShaped",e[e.UShaped=8]="USh
1aped"}({});var nk=function(e){return e[e.FREE=2]="FREE",e[e.EXPERT_MONTH=6]="EXPERT_MONTH",e[e.EXPERT_YEAR=21]="EXPERT_YEAR",e[e.PRO_MONTH=3]="PRO_MONTH",e[e.PRO_YEAR=20]="PRO_YEAR",e[e.BASIC_MONTH=24]="BASIC_MONTH",e[e.BASIC_YEAR=25]="BASIC_YEAR",e[e.MAX_MONTH=26]="MAX_MONTH",e[e.MAX_YEAR=27]="MAX_YEAR",e[e.EXPERT_QUARTER=31]="EXPERT_QUARTER",e[e.QUANT_AI=1001]="QUANT_AI",e[e.SWINGMAX_PORTFOLIO=1007]="SWINGMAX_PORTFOLIO",e[e.QUANT_AI_QUARTERLY=3001]="QUANT_AI_QUARTERLY",e[e.QUANT_AI_YEARLY=3501]="QUANT_AI_YEARLY",e[e.SWINGMAX_PORTFOLIO_QUARTERLY=3003]="SWINGMAX_PORTFOLIO_QUARTERLY",e[e.SWINGMAX_PORTFOLIO_YEARLY=3503]="SWINGMAX_PORTFOLIO_YEARLY",e[e.TRADE=1002]="TRADE",e[e.WHALES_SEMI_ANNUALLY=1003]="WHALES_SEMI_ANNUALLY",e[e.WHALES_YEARLY=1004]="WHALES_YEARLY",e[e.BACKTESTING_MONTH=1005]="BACKTESTING_MONTH",e[e.BACKTESTING_YEAR=1006]="BACKTESTING_YEAR",e[e.BACKTESTING_RECHARGE_25=11001]="BACKTESTING_RECHARGE_25",e[e.BACKTESTING_RECHARGE_75=11002]="BACKTESTING_RECHARGE_75",e[e.BACKTESTING_RECHARGE_100=11003]="BACKTESTING_RECHARGE_100",e[e.STOCK_SIGNAL=1008]="STOCK_SIGNAL",e[e.CRYPTO_SIGNAL=1009]="CRYPTO_SIGNAL",e}({});!function(e){e.PADDLE_PAY="paddle_intellectia",e.STRIPE_PAY="stripe_intellectia"}({}),function(e){e.The15M="15m",e.The1D="1D",e.The1H="1h",e.The1M="1M",e.The1W="1W",e.The2H="2h",e.The30M="30m",e.The4H="4h"}({});var nA=e.i(341091);function nj(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function nC(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function nN(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let nT="[object RegExp]",nR="[object String]",nI="[object Number]",nD="[object Boolean]",nL="[object Arguments]",nV="[object Symbol]",nz="[object Date]",nF="[object Map]",nB="[object Set]",n$="[object Array]",nU="[object Function]",nW="[object ArrayBuffer]",nH="[object Object]",nK="[object Error]",nY="[object DataView]",nq="[object Uint8Array]",nG="[object Uint8ClampedArray]",nJ="[object Uint16Array]",nX="[object Uint32Array]",nQ="[object BigUint64Array]",nZ="[object Int8Array]",n0="[object Int16Array]",n1="[object Int32Array]",n2="[object BigInt64Array]",n3="[object Float32Array]",n5="[object Float64Array]";function n4(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function n8(e,t,r){return n6(e,t,void 0,void 0,void 0,void 0,r)}function n6(e,t,r,n,i,s,o){let a=o(e,t,r,n,i,s);if(void 0!==a)return a;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return e===t;case"number":return e===t||Object.is(e,t)}return n7(e,t,s,o)}function n7(e,t,r,n){if(Object.is(e,t))return!0;let i=nN(e),s=nN(t);if(i===nL&&(i=nH),s===nL&&(s=nH),i!==s)return!1;switch(i){case nR:return e.toString()===t.toString();case nI:return n4(e.valueOf(),t.valueOf());case nD:case nz:case nV:return Object.is(e.valueOf(),t.valueOf());case nT:return e.source===t.source&&e.flags===t.flags;case nU:return e===t}let o=(r=r??new Map).get(e),a=r.get(t);if(null!=o&&null!=a)return o===t;r.set(e,t),r.set(t,e);try{switch(i){case nF:if(e.size!==t.size)return!1;for(let[i,s]of e.entries())if(!t.has(i)||!n6(s,t.get(i),i,e,t,r,n))return!1;return!0;case nB:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),s=Array.from(t.values());for(let o=0;o<i.length;o++){let a=i[o],l=s.findIndex(i=>n6(a,i,void 0,e,t,r,n));if(-1===l)return!1;s.splice(l,1)}return!0}case n$:case nq:case nG:case nJ:case nX:case nQ:case nZ:case n0:case n1:case n2:case n3:case n5:if(void 0!==nA.Buffer&&nA.Buffer.isBuffer(e)!==nA.Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!n6(e[i],t[i],i,e,t,r,n))return!1;return!0;case nW:if(e.byteLength!==t.byteLength)return!1;return n7(new Uint8Array(e),new Uint8Array(t),r,n);case nY:if(e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset)return!1;return n7(new Uint8Array(e),new Uint8Array(t),r,n);case nK:return e.name===t.name&&e.message===t.message;case nH:{if(!(n7(e.constructor,t.constructor,r,n)||nj(e)&&nj(t)))return!1;let i=[...Object.keys(e),...nC(e)],s=[...Object.keys(t),...nC(t)];if(i.length!==s.length)return!1;for(let s=0;s<i.length;s++){let o=i[s],a=e[o];if(!Object.hasOwn(t,o))return!1;let l=t[o];if(!n6(a,l,o,e,t,r,n))return!1}return!0}default:return!1}}finally{r.delete(e),r.delete(t)}}function n9(){}function ie(e,t){return n8(e,t,n9)}var it=ra,ir=ef;let ii="/v1/stock/new-simple-query",is="/v1/stock/kline",io="/v1/search/symbol",ia="/v1/stock/config",il=(e,t)=>(0,ir.get)(ii,e,{}
1,t),iu=({code:e,symbol:t,...r})=>({...r,code:e?.trim()||t?.trim()||void 0}),ic=(e,t)=>(0,ir.get)(is,iu(e),{},t),ih=(e,t)=>(0,ir.get)(io,e,{},t),id=(e={},t)=>{let{locale:r="ALL"}=e;return(0,ir.get)(ia,{locale:r},{},t)};var ip=e.i(585458),im=e.i(633669),ig=e.i(73920),iv=e.i(287200);function iy(e,t,r,n){let i=(0,ip.default)().tz(e),s=i.format("YYYY-MM-DD"),o=parseInt(i.format("HH:mm:ss").replace(/:/g,""),10),a=t.find(e=>e.date===s);if(a){if("closed"===a.status)return{status:nP.After,dateStatus:"holiday",close:0,open:0,tz:e};else if("early-close"===a.status){let t=parseInt(a.open?.slice(10).replace(/:/g,"")??"0",10),r=parseInt(a.close?.slice(10).replace(/:/g,"")??"0",10);return o>=t&&o<r?{status:nP.Intraday,dateStatus:"holiday",close:ip.default.tz(a.close,e).unix(),open:ip.default.tz(a.open,e).unix(),tz:e}:t>o&&o>0?{status:nP.Pre,dateStatus:"holiday",close:ip.default.tz(a.close,e).unix(),open:ip.default.tz(a.open,e).unix(),tz:e}:{status:nP.After,dateStatus:"holiday",close:ip.default.tz(a.close,e).unix(),open:ip.default.tz(a.open,e).unix(),tz:e}}}let l=i.day();if(0===l||6===l)return{status:nP.After,dateStatus:"holiday",close:0,open:0,tz:e};let u=ip.default.tz(`${(0,ip.default)().tz(e).format("YYYY-MM-DD")} ${r.start}`,e).unix(),c=ip.default.tz(`${(0,ip.default)().tz(e).format("YYYY-MM-DD")} ${r.end}`,e).unix();if(n===nE.US){let t=parseInt(r.start.replace(/:/g,""),10),n=parseInt(r.end.replace(/:/g,""),10);return o<t&&o>parseInt("04:00:00".replace(/:/g,""),10)?{status:nP.Pre,dateStatus:"normal",close:c,open:u,tz:e}:o>=t&&o<n?{status:nP.Intraday,dateStatus:"normal",close:c,open:u,tz:e}:{status:nP.After,dateStatus:"normal",close:c,open:u,tz:e}}if(n===nE.HK){let t=parseInt(r.morning_open?.replace(/:/g,"")??"0",10),n=parseInt(r.morning_close?.replace(/:/g,"")??"0",10),i=parseInt(r.afternoon_open?.replace(/:/g,"")??"0",10),s=parseInt(r.afternoon_close?.replace(/:/g,"")??"0",10),a=ip.default.tz(`${(0,ip.default)().tz(e).format("YYYY-MM-DD")} ${r.morning_open}`,e).unix(),l=ip.default.tz(`${(0,ip.default)().tz(e).format("YYYY-MM-DD")} ${r.afternoon_close}`,e).unix();return o>=t&&o<n?{status:nP.Intraday,dateStatus:"normal",close:l,open:a,tz:e}:o>=n&&o<i?{status:nP.Intraday,dateStatus:"normal",close:l,open:a,tz:e}:o>=i&&o<s?{status:nP.Intraday,dateStatus:"normal",close:l,open:a,tz:e}:{status:nP.After,dateStatus:"normal",close:l,open:a,tz:e}}if(n===nE.Forex){let t=(0,ip.default)().tz(e).day(),n=ip.default.tz(`${(0,ip.default)().tz(e).format("YYYY-MM-DD")} ${r.start}`,e).unix(),i=ip.default.tz(`${(0,ip.default)().tz(e).format("YYYY-MM-DD")} ${r.end}`,e).unix();return 5!==t||o>=n?{status:nP.Intraday,dateStatus:"normal",close:i,open:n,tz:e}:{status:nP.After,dateStatus:"normal",close:i,open:n,tz:e}}return{status:nP.After,dateStatus:"normal",close:0,open:0,tz:e}}function ib(e,t,r){let n=e.timezone||"America/New_York",i=e.market_holidays||[],s=(0,ip.default)().tz(n),o=parseInt(s.format("HH:mm:ss").replace(/:/g,""),10),a=s.format("YYYY-MM-DD"),l=i.find(e=>e.date===a),u=r??window.location.pathname.split("/").pop()??"",c=e.sessions?.[u];if(!c)return{status:nP.After,dateStatus:"normal",close:0,open:0,tz:n,timePeriod:t};let h=l?.tickers||[];if(h.length&&h.includes(u.toUpperCase()))return{status:nP.After,dateStatus:"normal",close:0,open:0,tz:n,timePeriod:t};let d=e.templates?.[c];if(!d)return{status:nP.After,dateStatus:"normal",close:0,open:0,tz:n,timePeriod:t};let f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Fridays","Saturday"][s.day()],p=d.weekly_pairs?.[f];if(!p||!Array.isArray(p.list))return{status:nP.After,dateStatus:"normal",close:0,open:0,tz:n,timePeriod:t};if(0===p.list.length)return{status:nP.After,dateStatus:"holiday",close:0,open:0,tz:n,timePeriod:t};for(let e of p.list){if(!e.open||!e.close)continue;let r=parseInt(e.open.replace(/:/g,""),10),i=parseInt(e.close.replace(/:/g,""),10),s=ip.default.tz(`${(0,ip.default)().tz(n).format("YYYY-MM-DD")} ${e.open}`,n).unix(),a=ip.default.tz(`${(0,ip.default)().tz(n).format("YYYY-MM-DD")} ${e.close}`,n).unix();if(o>=r&&o<i)return{status:nP.Intraday,dateStatus:"normal",close:a,open:s,tz:n,timePeriod:t}}return{status:nP.After,dateStatus:"normal",close:0,open:0,tz:n,timePeriod:t}}function iw(e,t){let r=e?.templates||{},n=e?.sessions||{},i=t?.()??window.location.pathname.split("/").pop()??"",s=n?.[i],o=r?.[s??""],a=o?.id?.match(/\d+/);return a?parseInt(a[0],10):void 0}ip.default.extend(im.default),ip.default.extend(iv.default),ip.default.extend(ig.default);let ix={status:nP.After,dateStatus:"normal",close:0,open:0,tz:""},iS=(0,it.create)(e=>({hk:{...ix,tz:"Asia/Hong_Kong"}
1,us:ix,forex:{...ix,tz:"America/New_York"},metals:ix,usMarketHolidays:[],configLoaded:!1,configLoadFailed:!1,updateMarketConfig:async t=>{try{let{ret:c,list:h}=await id({locale:"ALL"});if(clearInterval(r),clearInterval(n),clearInterval(i),clearInterval(s),0!==c||!h?.length){console.error("updateMarketConfig: bad response",{ret:c,size:h?.length}),e({configLoadFailed:!0});return}e({configLoaded:!0,configLoadFailed:!1});let d=h.find(e=>"HK"===e.locale),f=h.find(e=>"US"===e.locale),p=h.find(e=>e.asset_type===nO.Forex),m=h.find(e=>e.asset_type===nO.Metals),g=(c,h,d)=>{let f=()=>{let r=h===nE.Metals?ib(c,d,t?.()):iy(c.timezone,c.market_holidays,c.market_dates,h),n=h===nE.US?o:h===nE.HK?a:h===nE.Forex?l:u;if(n&&ie(n,r))return;let i={};h===nE.US?(o=r,i.us=r):h===nE.HK?(a=r,i.hk=r):h===nE.Forex?(l=r,i.forex=r):h===nE.Metals&&(u=r,i.metals=r),e(i)};h===nE.US?r=setInterval(f,1e3):h===nE.HK?n=setInterval(f,1e3):h===nE.Forex?i=setInterval(f,1e3):h===nE.Metals&&(s=setInterval(f,1e3))};if(d?.locale==="HK"){let t=iy(d.timezone,d.market_holidays,d.market_dates,nE.HK);a=t,e({hk:t}),g(d,nE.HK)}if(f?.locale==="US"){let t=iy(f.timezone,f.market_holidays,f.market_dates,nE.US);o=t,e({us:t,usMarketHolidays:f.market_holidays||[]}),g(f,nE.US)}if(p?.asset_type===nO.Forex){let t=iy(p.timezone,p.market_holidays,p.market_dates,nE.Forex);l=t,e({forex:t}),g(p,nE.Forex)}if(m?.asset_type===nO.Metals){let r=iw(m,t)??0,n=ib(m,r,t?.());u=n,e({metals:n}),g(m,nE.Metals,r)}}catch(t){console.error("updateMarketConfig",t),e({configLoadFailed:!0})}}}));function i_(e){let t=e.toLowerCase();return iS.getState()[t]?.status===nP.Intraday}let iM={isOpen:!1,marketLocale:"us"},iO=(0,nx.create)((e,t)=>({...iM,setMarket:r=>{e(e=>({...e,...r})),e({isOpen:i_(t().marketLocale)})},clearMarket:()=>e(iM)}));iS.subscribe(e=>{let{marketLocale:t}=iO.getState(),r=t.toLowerCase(),n=e[r]?.status;iO.setState({isOpen:n===nP.Intraday})});var iE=ra;let iP=["AI_TRADE","AI_ALERT","AI_TASK","NEWSWIRE","PROMO","COMPANION"],ik=iP.filter(e=>"COMPANION"!==e),iA=e=>({ALL:e,AI_TRADE:e,AI_ALERT:e,AI_TASK:e,NEWSWIRE:e,PROMO:e,COMPANION:e}),ij=()=>({AI_TRADE:0,AI_ALERT:0,AI_TASK:0,NEWSWIRE:0,PROMO:0,COMPANION:0}),iC={itemsByCategory:iA([]),unreadByCategory:ij(),totalUnread:0,cursorByCategory:iA(0),configs:[],activeCategory:"AI_TRADE",drawerOpen:!1,loading:!1};(0,iE.create)((e,t)=>({...iC,setActiveCategory:t=>e({activeCategory:t}),setDrawerOpen:t=>e({drawerOpen:t}),fetchUnread:async()=>{try{let t=await rV({});if(0!==t.ret)return;let r=ij();iP.forEach(e=>{r[e]=t.data.by_category[e]??0});let n=ik.reduce((e,t)=>e+(r[t]??0),0);e({unreadByCategory:r,totalUnread:n})}catch(e){console.warn("[notification] fetchUnread failed",e)}},fetchPage:async(t,r)=>{e({loading:!0});try{let n=await rL({category:"ALL"===t?"":t,limit:20,before_created:r});if(0!==n.ret)return;e(e=>{let i,s=e.itemsByCategory[t];if(0===r)i=n.data.items;else{let e=new Set(s.map(e=>e.id)),t=n.data.items.filter(t=>!e.has(t.id));i=[...s,...t]}return{itemsByCategory:{...e.itemsByCategory,[t]:i},cursorByCategory:{...e.cursorByCategory,[t]:n.data.next_cursor}}})}finally{e({loading:!1})}},appendItems:(t,r)=>e(e=>({itemsByCategory:{...e.itemsByCategory,[t]:[...e.itemsByCategory[t],...r]}})),mergeNew:t=>e(e=>{let r=e.itemsByCategory.ALL,n=t.category,i=e.itemsByCategory[n],s=r.some(e=>e.id===t.id),o=i.some(e=>e.id===t.id);return s&&o?e:{itemsByCategory:{...e.itemsByCategory,ALL:s?r:[t,...r],[n]:o?i:[t,...i]}}}),markRead:async r=>{let n=t().itemsByCategory,i=t().unreadByCategory,s=t().totalUnread,o=n.ALL.find(e=>e.id===r)??n.AI_TRADE.find(e=>e.id===r)??n.AI_ALERT.find(e=>e.id===r)??n.AI_TASK.find(e=>e.id===r)??n.NEWSWIRE.find(e=>e.id===r)??n.PROMO.find(e=>e.id===r);if(!o||0!==Number(o.opened_at))return;let a=Math.floor(Date.now()/1e3),l=e=>e.map(e=>e.id===r?{...e,opened_at:a}:e);e(e=>({itemsByCategory:{ALL:l(e.itemsByCategory.ALL),AI_TRADE:l(e.itemsByCategory.AI_TRADE),AI_ALERT:l(e.itemsByCategory.AI_ALERT),AI_TASK:l(e.itemsByCategory.AI_TASK),NEWSWIRE:l(e.itemsByCategory.NEWSWIRE),PROMO:l(e.itemsByCategory.PROMO),COMPANION:l(e.itemsByCategory.COMPANION)},unreadByCategory:{...e.unreadByCategory,[o.category]:Math.max(0,e.unreadByCategory[o.category]-1)},totalUnread:Math.max(0,e.totalUnread-1)}));try{let e=await rz({notification_id:r});if(0!==e.ret)throw Error(e.msg);await t().fetchUnread()}catch(t){throw console.warn("[notification] markRead failed, rollback",t),e({itemsByCategory:n,unreadByCategory:i,totalUnread:s}),t}}
1,markAll:async r=>{let n=t().itemsByCategory,i=t().unreadByCategory,s=t().totalUnread,o=Math.floor(Date.now()/1e3),a=e=>e.map(e=>0===e.opened_at?{...e,opened_at:o}:e),l=(e,t)=>e.map(e=>e.category===t&&0===e.opened_at?{...e,opened_at:o}:e);"ALL"===r?e(e=>({itemsByCategory:{ALL:a(e.itemsByCategory.ALL),AI_TRADE:a(e.itemsByCategory.AI_TRADE),AI_ALERT:a(e.itemsByCategory.AI_ALERT),AI_TASK:a(e.itemsByCategory.AI_TASK),NEWSWIRE:a(e.itemsByCategory.NEWSWIRE),PROMO:a(e.itemsByCategory.PROMO),COMPANION:a(e.itemsByCategory.COMPANION)},unreadByCategory:ij(),totalUnread:0})):e(e=>{let t=e.unreadByCategory[r];return{itemsByCategory:{...e.itemsByCategory,[r]:a(e.itemsByCategory[r]),ALL:l(e.itemsByCategory.ALL,r)},unreadByCategory:{...e.unreadByCategory,[r]:0},totalUnread:Math.max(0,e.totalUnread-t)}});try{let e=await rF({category:"ALL"===r?"":r});if(0!==e.ret)throw Error(e.msg);await t().fetchUnread()}catch(t){throw console.warn("[notification] markAll failed, rollback",t),e({itemsByCategory:n,unreadByCategory:i,totalUnread:s}),t}},fetchConfigs:async()=>{let t=await rB();if(0!==t.ret)throw Error(t.msg);e({configs:t.data.configs})},updateConfig:async r=>{let n=t().configs;e(e=>({configs:e.configs.map(e=>e.category===r.category?{...e,enabled:r.enabled,sub_config_json:r.sub_config_json??e.sub_config_json,channels:r.channels_set?r.channels??{}:e.channels}:e)}));try{let e=await r$(r);if(0!==e.ret)throw Error(e.msg)}catch(t){throw console.warn("[notification] updateConfig failed, rollback",t),e({configs:n}),t}},clear:()=>e(iC)}));var iN=ra,iT=e.i(488754);let iR="alphio_pending_checkout_ref",iI="alphio_pending_checkout_ts",iD=18e5;function iL(){try{if(!window.sessionStorage.getItem(iR))return!1;let e=Number(window.sessionStorage.getItem(iI));if(!Number.isFinite(e)||e<=0)return!1;return Date.now()-e<=iD}catch{return!1}}var iV=ef;let iz="/v2/user/profile/kv",iF=(e,t)=>{let r=e&&e.length>0?{keys:e.join(",")}:{};return(0,iV.get)(iz,r,{},t)},iB=(e,t)=>(0,iV.post)(iz,{items:e},!0,{},t),i$="agent-web-onboarding-new-user";function iU(e){return`${i$}_${e}`}function iW(e){if(!e)return!1;try{return"1"===localStorage.getItem(iU(e))}catch{return!1}}function iH(e){if(e)try{localStorage.removeItem(iU(e))}catch{}}let iK="onboarding_completed_at",iY="onboarding_paywall_shown",iq="onboarding_experience_count",iG="onboarding_hard_paywall_seen",iJ="onboarding_nudge_fallback_armed",iX=3e5;function iQ(e,t){return`${e}_${t}`}function iZ(e){let t=localStorage.getItem(e),r=t?Number(t):0;return Number.isFinite(r)&&r>0?r:0}let i0="alphio:onboarding-nudge-changed";function i1(){window.dispatchEvent(new CustomEvent(i0))}function i2(e,t=Date.now()){e&&(localStorage.setItem(iQ(iK,e),String(t)),localStorage.removeItem(iQ(iq,e)),localStorage.removeItem(iQ(iG,e)),localStorage.setItem(iQ(iJ,e),"true"),i1())}function i3(e){return e?iZ(iQ(iK,e)):0}function i5(e,t=Date.now()){if(!e)return;let r=i3(e);if(r<=0)return;let n=t-r;if(n<0||n>iX||i8(e))return;let i=i4(e)+1;localStorage.setItem(iQ(iq,e),String(i)),i1()}function i4(e){return e?iZ(iQ(iq,e)):0}function i8(e){return!!e&&"true"===localStorage.getItem(iQ(iY,e))}let i6=(0,ra.create)(e=>({nonce:0,silentNonce:0,bump:()=>e(e=>({nonce:e.nonce+1})),bumpSilent:()=>e(e=>({silentNonce:e.silentNonce+1}))})),i7={get url(){return`file://${e.P("packages/shared/src/stores/useOnboardingStore.ts")}`}};function i9(e){let t=rq.getState();t.setPresentationBlocked(e),e&&t.clearPresentation()}let se={stock:4,crypto:2},st=3;function sr(e){return se[e]}let sn="agent-web-onboarding-completed",si="agent-web-onboarding-quiz-submitted",ss="agent-web-onboarding-debug";function so(){let e=i7.env.VITE_ONBOARDING_DEBUG;if("true"===e||"1"===e||"1"===sessionStorage.getItem(ss))return!0;let t=new URLSearchParams(window.location.search).get("onboarding_debug");return("1"===t||"true"===t)&&(sessionStorage.setItem(ss,"1"),!0)}function sa(e){return`${sn}_${e}`}function sl(e){e&&(localStorage.setItem(sa(e),"true"),i2(e)),iH(e),iB({onboarding_completed:"true"}).catch(()=>{})}function su(){i6.getState().bump()}function sc(e){return`${si}_${e}`}function sh(){let e=rx.getState().userId;if(e)try{localStorage.setItem(sc(e),"true")}catch{}}function sd(e){return"true"===localStorage.getItem(sc(e))}function sf(e){if(e)try{localStorage.removeItem(sc(e))}catch{}}function sp(e){return!!e&&"true"===localStorage.getItem(sa(e))}let sm=3e3,sg=new Map;function sv(e){if(!e||so()||sp(e)||iW(e))return null;let t=sg.get(e);if(t)return t;sS.setState({resolving:!0});let r=Promise.race([iF(["onboarding_completed"]).then(t=>{let r=0===t.ret&&t.data?.onboarding_completed==="true";return r&&localStorage.setItem(sa(e),"true"),r}).catch(()=>!1),new Promise(e=>setTimeout(()=>e(!1),sm))]);return sg.set(e,r),r}let sy={visible:!1,resolving:!1,resumePhase:null,step:0,totalSteps:0,skipAllowed:!0,loading:!1,shouldShowConnect:!1,skipPricing:!1,platform:"pc",assetClass:"stock",trackingSnapshot:null};
1function sb(e,t){return"h5"===e?st:sr(t)}function sw(e,t,r){return e>=sb(t,r)?iT.ONBOARDING_PRICING_STEP_KEY:iT.ONBOARDING_STEP_KEYS[e]??iT.ONBOARDING_STEP_KEYS[0]}function sx(e,t){let r=e.trackingSnapshot;return{platform:e.platform,exit:t,phase:r?.phase??"intro",step_index:r?.step_index??0,step_key:r?.step_key??iT.ONBOARDING_STEP_KEYS[0],feature_index:r?.feature_index,feature_key:r?.feature_key}}let sS=(0,iN.create)((e,t)=>({...sy,setTrackingSnapshot:t=>e({trackingSnapshot:t}),setAssetClass:r=>{let{platform:n,skipPricing:i}=t(),s=sb(n,r);e({assetClass:r,totalSteps:i?s:s+1})},syncSkipPricing:()=>{let{visible:r,platform:n,assetClass:i,skipPricing:s}=t();if(!r||so())return;let o=rx.getState().userType===rp.Beta;if(o===s)return;let a=sb(n,i);e({skipPricing:o,totalSteps:o?a:a+1})},open:()=>{i9(!0);let{platform:r,skipPricing:n}=t(),i=sb(r,"stock");e({visible:!0,step:0,assetClass:"stock",totalSteps:n?i:i+1})},close:()=>{e({visible:!1,resolving:!1}),i9(!1)},dismissShowConnect:()=>e({shouldShowConnect:!1}),dismissResumePhase:()=>e({resumePhase:null}),clear:()=>{i9(!1),e(sy)},nextStep:()=>{let{step:r,totalSteps:n,platform:i,assetClass:s}=t(),o=sb(i,s),a=Math.min(r+1,n-1);(0,iT.trackOnboardingStepNext)({platform:i,phase:a>=o?"pricing":"intro",from_step_index:r,to_step_index:a,from_step_key:sw(r,i,s),to_step_key:sw(a,i,s)}),e({step:a})},prevStep:()=>{let{step:r,platform:n,assetClass:i}=t(),s=sb(n,i),o=Math.max(r-1,0);(0,iT.trackOnboardingStepPrev)({platform:n,phase:r>=s?"pricing":"intro",from_step_index:r,to_step_index:o,from_step_key:sw(r,n,i),to_step_key:sw(o,n,i)}),e({step:o})},complete:(r,n="get_started")=>{(0,iT.trackOnboardingComplete)(sx(t(),n)),so()||sl(r),su(),sf(r),e({visible:!1,resolving:!1,resumePhase:null,step:0,shouldShowConnect:!1,trackingSnapshot:null}),i9(!1)},skip:r=>{let{trackingSnapshot:n,platform:i,step:s,assetClass:o}=t(),a=sb(i,o);(0,iT.trackOnboardingSkip)({platform:i,phase:n?.phase??(s>=a?"pricing":"intro"),step_index:n?.step_index??s,step_key:n?.step_key??sw(s,i,o),feature_index:n?.feature_index,feature_key:n?.feature_key}),so()||sl(r),su(),sf(r),e({visible:!1,resolving:!1,resumePhase:null,step:0,shouldShowConnect:!1,trackingSnapshot:null}),i9(!1)},init:async(t,r="pc")=>{if(!t)return;let n="h5"===r?"h5":"pc",i=so();if(!i&&sp(t)||(!i&&iW(t)&&e({resolving:!0}),!i&&await (sv(t)??Promise.resolve(!1))))return void e({resolving:!1});if(!i&&sd(t)){let t=iL()?"pricing":"configuring";i9(!0),e({visible:!0,resolving:!1,resumePhase:t,platform:n}),(0,iT.trackOnboardingShow)({platform:n,total_steps:1,has_pricing:!1,skip_pricing:!0});return}let s=rx.getState().userType===rp.Beta,o=!i&&s,a=sb(n,"stock"),l=o?a:a+1;i9(!0),e({visible:!0,resolving:!1,step:0,totalSteps:l,skipAllowed:!0,loading:!1,skipPricing:o,platform:n,assetClass:"stock",trackingSnapshot:null}),(0,iT.trackOnboardingShow)({platform:n,total_steps:l,has_pricing:!o,skip_pricing:o})}}));var s_=ef;let sM="/v1/checkout/plans",sO="/v1/rbac/user-points/balance";function sE(e){return(0,s_.get)(sM,{},{},e)}function sP(e){return(0,s_.get)(sO,{},{},e)}let sk="PlanTypeStandard",sA="PlanTypeSignal",sj="PlanTypeStrategy",sC="PlanTypeTrialSetupFee";async function sN(){try{let e=await sE();if(e?.ret===0&&e.data?.plan_list)return{plans:e.data.plan_list.filter(e=>e.plan_type!==sC),canTrial:e.data.can_trial??!1}}catch{}return{plans:[],canTrial:!1}}let sT={loaded:!1,loading:!1,plans:[],canTrial:!1};(0,ra.create)((e,t)=>({...sT,init:async()=>{if(t().loaded||t().loading)return;e({loading:!0});let{plans:r,canTrial:n}=await sN();e({plans:r,canTrial:n,loaded:!0,loading:!1})},refresh:async()=>{e({loading:!0});let{plans:t,canTrial:r}=await sN();e({plans:t,canTrial:r,loaded:!0,loading:!1})},reset:()=>e(sT),getPlanById:e=>t().plans.find(t=>t.plan_id===e),getPlansByGroup:e=>t().plans.filter(t=>t.group_id===e),getPlansByType:e=>t().plans.filter(t=>t.plan_type===e),getPlansByPeriod:e=>t().plans.filter(t=>t.period===e),getStandardPlans:()=>t().plans.filter(e=>e.plan_type===sk),getSignalPlans:()=>t().plans.filter(e=>e.plan_type===sA),getStrategyPlans:()=>t().plans.filter(e=>e.plan_type===sj)}));var sR=ef;function sI(){return(0,sR.get)("/v1/reward/quest/status")}function sD(){return(0,sR.post)("/v1/reward/quest/claim-pro",{})}function sL(e,t){let r=new Set(sV),n=new Set(e);for(let e of t)r.has(e)&&n.add(e);return[...n]}let sV=["create-general-task","link-trade-hyperliquid","create-trading-task","follow-alphio-x","follow-alphio-tg","follow-alphio-discord","share-on-x"],sz=[{stepNo:1,questIds:["create-general-task"]},{stepNo:2,questIds:["link-trade-hyperliquid"]},{stepNo:3,questIds:["create-trading-task"]},{stepNo:4,questIds:["follow-alphio-x","follow-alphio-tg","follow-alphio-discord"]},{stepNo:5,questIds:["share-on-x"]}];function sF(e){let t=new Set(sV),r=e.completed.filter(e=>t.has(e)),n={};for(let t of r){let r=e.completedAt?.[t];"number"==typeof r&&(n[t]=r)}return{completed:r,claimed:!0===e.claimed,completedAt:n}}let sB={completed:[],claimed:!1,completedAt:{}},s$="agent-web-quest-progress",sU="quest_progress_json";function sW(e){return`${s$}_${e}`}function sH(e){if(!e)return null;try{let t=localStorage.getItem(sW(e));if(!t)return null;return sF(JSON.parse(t))}catch{return null}}function sK(e,t){if(e)try{localStorage.setItem(sW(e),JSON.stringify(t))}catch{}}function sY(e){iB({[sU]:JSON.stringify({completed:e.completed,claimed:e.claimed})}).catch(()=>{})}function sq(e,t){return t.questIds.every(t=>e.completed.includes(t))}function sG(e){return sz.filter(t=>sq(e,t)).length}function sJ(e){return!e.claimed&&sG(e)>=sz.length}(0,ra.create)((e,t)=>({progress:sB,centerOpen:!1,tutorialQuestId:null,initialized:!1,tourTrigger:0,init:async t=>{if(!t)return void e({initialized:!0});let r=sH(t);r&&e({progress:r,initialized:!0});
1try{let[n,i]=await Promise.allSettled([iF([sU]),sI()]),s="fulfilled"===n.status&&"string"==typeof n.value?.data?.[sU]?sF(JSON.parse(n.value.data[sU])).completed:r?.completed??[],o="fulfilled"===i.status&&i.value?.ret===0?i.value.data?.completed_quests??[]:[],a="fulfilled"===i.status&&i.value?.ret===0&&(i.value.data?.claimed??!1),l="fulfilled"===n.status&&"string"==typeof n.value?.data?.[sU]?sF(JSON.parse(n.value.data[sU])).claimed:r?.claimed??!1,u={completed:sL(s,o),claimed:l||a,completedAt:r?.completedAt??{}};sK(t,u),sY(u),e({progress:u,initialized:!0})}catch{e({initialized:!0})}},openCenter:()=>e({centerOpen:!0}),closeCenter:()=>e({centerOpen:!1}),openTutorial:t=>e({tutorialQuestId:t}),closeTutorial:()=>e({tutorialQuestId:null}),triggerTour:()=>e(e=>({tourTrigger:e.tourTrigger+1})),markDone:(r,n)=>{let{progress:i}=t();if(i.completed.includes(r))return;let s={...i,completed:[...i.completed,r],completedAt:{...i.completedAt,[r]:Math.floor(Date.now()/1e3)}};sK(n,s),sY(s),e({progress:s})},claim:async r=>{let{progress:n}=t();if(!sJ(n))return n.claimed;try{let t=await sD();if(t?.ret!==0)return!1;let i={...n,claimed:!0};return sK(r,i),sY(i),e({progress:i}),!0}catch{return!1}},reset:()=>e({progress:sB,centerOpen:!1,tutorialQuestId:null,initialized:!1,tourTrigger:0})}));var sX=ef;let sQ="/v2/user/alphio/review-earn/eligibility";function sZ(e){return(0,sX.get)(sQ,{},{},e)}let s0={loaded:!1,loading:!1,failed:!1,eligibility:null,ratingModalOpen:!1,ratingModalDismissed:!1};async function s1(){try{let e=await sZ();if(e?.ret===0&&e.data)return{eligibility:e.data,failed:!1}}catch{}return{eligibility:null,failed:!0}}(0,ra.create)((e,t)=>({...s0,init:async()=>{if(t().loaded||t().loading)return;e({loading:!0,failed:!1});let{eligibility:r,failed:n}=await s1();e({eligibility:r,failed:n,loaded:!n,loading:!1})},refresh:async()=>{e({loading:!0,failed:!1});let{eligibility:t,failed:r}=await s1();r?e({failed:!0,loading:!1}):e({eligibility:t,failed:!1,loaded:!0,loading:!1})},openRatingModal:()=>e({ratingModalOpen:!0}),closeRatingModal:()=>e({ratingModalOpen:!1,ratingModalDismissed:!0}),reset:()=>e(s0)}));var s2=ra,s3=eS;let s5=null,s4=new Map,s8=new Map;function s6(e){let t={};for(let r of e){let e=r.broker.id;t[e]||(t[e]=[]),t[e].push(r)}return Object.entries(t).map(([e,t])=>({brokerId:e,brokerName:t[0].broker.display_name,data:t}))}let s7={hasValid:!1,hasEnabledConnection:!1,loading:!1,validId:"",connectData:[],connectionsLoadFailed:!1,brokerData:[],brokersLoadFailed:!1,extraBrokers:[],extraBrokersLoadFailed:!1,unifiedBrokers:[],unifiedSource:"none",showConnectPage:!1,activeTab:"autoTracker",ticker:null,symbolType:null,locale:null,accountData:[],accountList:[],currentAccount:null,accountsLoading:!1,accountsFetchedOnce:!1,accountsLoadFailed:!1,balanceData:[],total:0,cash:0,currency:"",balanceLoadFailed:!1,positionData:[],orderData:[],historyOrderData:[]};(0,s2.create)((e,t)=>({...s7,fetchBrokers:async r=>{let{brokersLoadFailed:n}=t();if(!n)try{let t=await ns(r);if(0===t.ret&&t.data)return void e({brokerData:t.data});if(r?.isCancelled())return;e({brokersLoadFailed:!0})}catch(t){if((0,s3.isRequestAborted)(r,t))return;console.error("Failed to fetch brokers:",t),e({brokersLoadFailed:!0})}},fetchExtraBrokers:async r=>{let{extraBrokersLoadFailed:n}=t();if(!n)try{let t=await no(r);if(0===t.ret&&t.data)return void e({extraBrokers:t.data.list??[]});if(r?.isCancelled())return;e({extraBrokersLoadFailed:!0})}catch(t){if((0,s3.isRequestAborted)(r,t))return;console.error("Failed to fetch extra brokers:",t),e({extraBrokersLoadFailed:!0})}},retryBrokers:async r=>{e({brokersLoadFailed:!1}),await t().fetchBrokers(r)},fetchUnifiedBrokers:async t=>{try{let r=await na(t);if(0===r.ret&&r.data)return void e({unifiedBrokers:r.data,unifiedSource:"unified"})}catch(e){console.warn("unified brokers failed, falling back to legacy:",e)}if(!t?.isCancelled())try{let[r,n]=await Promise.all([ns(t),no(t)]);if(t?.isCancelled())return;if(0!==r.ret&&0!==n.ret){console.error("legacy brokers fallback failed:",r.msg,n.msg),e({unifiedSource:"failed"});return}let i=0===n.ret?n.data?.list??[]:[],s=0===r.ret?r.data??[]:[],o={id:r1,name:"Hyperliquid",slug:"HYPERLIQUID",display_name:"Hyperliquid",description:"",logo:"",square_logo:"",url:"",broker_type:r0,asset_kind:"crypto",exchange_kind:"dex"};e({unifiedBrokers:[...i,o,...s],unifiedSource:"legacy"})}catch(r){if((0,s3.isRequestAborted)(t,r))return;console.error("legacy brokers fallback failed:",r),e({unifiedSource:"failed"})}},retryUnifiedBrokers:async r=>{e({unifiedSource:"none"}),await t().fetchUnifiedBrokers(r)},fetchConnections:async(r,n=!1,i=!1)=>{let{connectionsLoadFailed:s}=t();if(!s||i){i&&e({connectionsLoadFailed:!1}),e({loading:!0});try{let i=await nc(r);if(!i||0===i.length)return void e({hasValid:!1,hasEnabledConnection:!1,validId:"",connectData:[],connectionsLoadFailed:!0});let s=i.find(e=>!e.disabled),o=s??i[0];e({connectData:i,hasValid:!0,hasEnabledConnection:!!s,validId:o.id}),n||await t().fetchAccounts(r)}catch(t){if((0,s3.isRequestAborted)(r,t))return;console.error("Failed to fetch connections:",t),e({connectionsLoadFailed:!0,hasValid:!1,hasEnabledConnection:!1,validId:""})}finally{e({loading:!1})}}},fetchAccounts:async r=>{if(s5)return s5;e({accountsLoading:!0});let n=(async()=>{try{let n=await nh(r),{validId:i}=t();e({accountData:n,accountsFetchedOnce:!0,accountsLoadFailed:!1});let s=n.find(e=>e.connection_id===i)??n[0];s&&(e({currentAccount:s,total:s.balance?.total?.amount??0}),await t().fetchBalance(r)),e({accountList:s6(n)})}catch(t){if((0,s3.isRequestAborted)(r,t))return;console.error("Failed to fetch accounts:",t),e({accountsLoadFailed:!0})}finally{e({accountsLoading:!1})}})();return s5=n,n.finally(()=>{s5===n&&(s5=null)}),n},fetchBalance:async r=>{let{currentAccount:n}=t();if(!n)return;let i=n.account_id,s=s4.get(i);if(s)return s;t().balanceLoadFailed&&e({balanceLoadFailed:!1});let o=(async()=>{try{let n=await nd(i,r);if(t().currentAccount?.account_id!==i)return;e({balanceData:n,balanceLoadFailed:!1}),n.length>0&&e({cash:n[0].cash??0,currency:n[0].currency?.code??""})}catch(n){if((0,s3.isRequestAborted)(r,n)||t().currentAccount?.account_id!==i)return;console.error("Failed to fetch balance:",n),e({balanceData:[],cash:0,currency:"",balanceLoadFailed:!0})}})();return s4.set(i,o),o.finally(()=>{s4.get(i)===o&&s4.delete(i)}),o},fetchPositions:async r=>{let{currentAccount:n}=t();if(!n)return;let i=n.account_id,s=s8.get(i);if(s)return s;let o=(async()=>{try{let n=await nf(i,r);if(t().currentAccount?.account_id!==i)return;e({positionData:n})}catch(n){if((0,s3.isRequestAborted)(r,n)||t().currentAccount?.account_id!==i)return;console.error("Failed to fetch positions:",n),e({positionData:[]})}})();return s8.set(i,o),o.finally(()=>{s8.get(i)===o&&s8.delete(i)}),o},fetch24HourOrders:async r=>{let{currentAccount:n}=t();if(n)try{let t=await np(n.account_id,r);e({orderData:t})}catch(t){console.error("Failed to fetch 24 hour orders:",t),e({orderData:[]})}},fetchHistoryOrders:async(r=1,n=20,i=0,s)=>{let{currentAccount:o}=t();if(o)try{let[t]=await nm(o.account_id,r,n,i,s);1===r?e({historyOrderData:t}):e(e=>({historyOrderData:[...e.historyOrderData,...t]}))}catch(t){console.error("Failed to fetch history orders:",t),1===r&&e({historyOrderData:[]})}},changeAccount:r=>{e({currentAccount:r,total:r.balance?.total?.amount??0}),t().fetchBalance(),t().fetchPositions(),t().fetch24HourOrders()},updateConnectionStatus:async(e,r,n)=>{try{await nl(e,r,n),await t().fetchConnections(n)}catch(e){console.error("Failed to update connection status:",e)}}
1,cancelOrder:async(e,r,n)=>{try{await ng(e,r,n),await t().fetch24HourOrders(n)}catch(e){throw console.error("Failed to cancel order:",e),e}},showConnectPageAction:()=>e({showConnectPage:!0}),hideConnectPage:()=>e({showConnectPage:!1}),removeAccount:(r,n,i)=>{let{accountList:s,accountData:o,currentAccount:a}=t(),l=s[r],u=s;if(l){let t=l.data.filter((e,t)=>t!==n);e({accountList:u=0===t.length?s.filter((e,t)=>t!==r):s.map((e,n)=>n===r?{...e,data:t}:e)})}let c=o.filter(e=>e.account_id!==i);if(e({accountData:c}),0===c.length)return void e({hasValid:!1,hasEnabledConnection:!1,validId:"",connectData:[],accountData:[],accountList:[],currentAccount:null,balanceData:[],total:0,cash:0,currency:"",positionData:[],orderData:[],historyOrderData:[]});if(!c.find(e=>e.account_id===a?.account_id)){let r=c[0];e({currentAccount:r,total:r.balance?.total?.amount??0}),t().fetchBalance()}},setTicker:t=>e({ticker:t}),setTradeInfo:(t,r=null,n=null)=>e({ticker:t,symbolType:r,locale:n}),setActiveTab:t=>e({activeTab:t}),getAccountId:()=>{let{currentAccount:e}=t();if(!e?.account_id)return"";let r=e.account_id.split("-");return r[r.length-1]??e.account_id},isCurrentConnectionDisabled:()=>{let{currentAccount:e,connectData:r}=t();if(!e)return!1;let n=r.find(t=>t.id===e.connection_id);return n?.disabled??!1},getCurrentConnection:()=>{let{currentAccount:e,connectData:r}=t();return e?r.find(t=>t.id===e.connection_id)??null:null},clearSnapTrade:()=>{s4.clear(),s8.clear(),e(s7)}}));var s9=ef;let oe="/v1/crypto/strategy-copy/strategies",ot="/v1/crypto/strategy-copy/list",or=e=>(0,s9.get)(oe,{},{},e),on=e=>(0,s9.get)(ot,{},{},e);var oi=eS;let os={strategies:[],strategiesLoaded:!1,strategiesLoadFailed:!1,items:[],loaded:!1,loadFailed:!1,planUpgradeRequired:!1};(0,ra.create)((e,t)=>({...os,fetchStrategies:async t=>{try{let r=await or(t);if(0===r.ret&&r.data)return void e({strategies:r.data.items??[],strategiesLoaded:!0,strategiesLoadFailed:!1});if(t?.isCancelled())return;e({strategiesLoadFailed:!0})}catch(r){if((0,oi.isRequestAborted)(t,r))return;console.error("Failed to fetch copyable strategies:",r),e({strategiesLoadFailed:!0})}},ensureStrategiesLoaded:async e=>{let{strategiesLoaded:r,strategiesLoadFailed:n}=t();r||n||await t().fetchStrategies(e)},fetchList:async t=>{try{let r=await on(t);if(0===r.ret&&r.data)return void e({items:r.data.items??[],loaded:!0,loadFailed:!1});if(t?.isCancelled())return;e({loadFailed:!0})}catch(r){if((0,oi.isRequestAborted)(t,r))return;console.error("Failed to fetch strategy copy list:",r),e({loadFailed:!0})}},ensureLoaded:async e=>{let{loaded:r,loadFailed:n}=t();r||n||await t().fetchList(e)},retry:async r=>{e({loadFailed:!1}),await t().fetchList(r)},upsertItem:r=>{let{items:n}=t(),i=n.findIndex(e=>e.follower_id===r.follower_id);if(-1===i)return void e({items:[...n,r],loaded:!0,loadFailed:!1});let s=n.slice();s[i]=r,e({items:s,loaded:!0,loadFailed:!1})},setPlanUpgradeRequired:t=>e({planUpgradeRequired:t}),clear:()=>e(os)}));var oo=ra,oa=e.i(509121);function ol(e,t,r){let n={task_id:String(e),task_type:t};if(r)for(let[e,t]of Object.entries(r))void 0!==t&&"task_type"!==e&&(n[e]=t);return n}var ou=ef;let oc="/v1/tradeagent/tasks/stats",oh=async(e={},t)=>(0,ou.post)(oc,e,!0,{},t);var od=ef;let of="/v1/task/list",op="/v1/task/oper",om="/v1/task/pannel",og=(e,t)=>
1(0,od.get)(of,e,{},t),ov=(e,t)=>(0,od.post)(op,e,!0,{},t),oy=e=>(0,od.get)(om,{},{},e),ob=1,ow=2,ox=3,oS=4,o_={tasks:[],tasksTotal:0,tasksLoading:!1,tasksStype:0,tasksPage:1,tasksSize:20,pannelTasks:[],pannelStat:null,pannelLoading:!1,tradeAgentTasksStats:null},oM=3e4,oO=0,oE=null;(0,oo.create)((e,t)=>({...o_,fetchTaskList:async(r,n)=>{let i=r?.stype??t().tasksStype,s=r?.page??t().tasksPage,o=r?.size??t().tasksSize;e({tasksLoading:!0,tasksStype:i,tasksPage:s,tasksSize:o});try{let t=await og({stype:i,page:s,size:o},n);0===t.ret&&t.data&&e({tasks:t.data.list??[],tasksTotal:t.data.total??0})}catch{}finally{e({tasksLoading:!1})}},fetchTaskPannel:async(t,r)=>{if(oE)return oE;if(!r?.force&&Date.now()-oO<oM)return;e({pannelLoading:!0});let n=(async()=>{try{let[r,n]=await Promise.allSettled([oy(t),oh({},t)]),i=!1;if("fulfilled"===r.status){let t=r.value;0===t.ret&&t.data&&(e({pannelTasks:t.data.list??[],pannelStat:t.data.stat_info??null}),i=!0)}if("fulfilled"===n.status){let t=n.value;0===t.ret&&t.data?(e({tradeAgentTasksStats:t.data}),i=!0):e({tradeAgentTasksStats:null})}else e({tradeAgentTasksStats:null});i&&(oO=Date.now())}catch{}finally{e({pannelLoading:!1})}})();return oE=n,n.finally(()=>{oE===n&&(oE=null)}),n},createTask:async(e,t)=>{try{let r=await ov({stype:ob,task_info:e},t);if(0!==r.ret){if(t?.isCancelled())return{taskId:null,reason:""};return{taskId:null,reason:(r.msg??"").trim()}}if(r.data){oa.analytics.track("agentic.task_create",ol(r.data.task_id,"general",{pattern:e.schedule_pattern,session_id:e.session_id}));let t=rx.getState().userId;return t&&i5(t),{taskId:r.data.task_id,reason:""}}return{taskId:null,reason:""}}catch{return{taskId:null,reason:""}}},modifyTask:async(e,t)=>{try{let r=await ov({stype:ow,task_info:e},t);return 0===r.ret&&e.task_id&&oa.analytics.track("agentic.task_modify",ol(e.task_id,"general")),0===r.ret}catch{return!1}},toggleTaskActive:async(r,n,i)=>{let s=t().tasks;e({tasks:s.map(e=>e.task_id===r?{...e,active:n}:e),pannelTasks:t().pannelTasks.map(e=>e.task_id===r?{...e,active:n}:e)});try{let o=await ov({stype:ox,task_info:{task_id:r,active:n}},i);if(0!==o.ret)return e({tasks:s,pannelTasks:t().pannelTasks}),!1;return oa.analytics.track(n?"agentic.task_resume":"agentic.task_pause",ol(r,"general")),!0}catch{return e({tasks:s}),!1}},deleteTask:async(r,n)=>{try{let i=await ov({stype:oS,task_info:{task_id:r}},n);if(0===i.ret)return e({tasks:t().tasks.filter(e=>e.task_id!==r),pannelTasks:t().pannelTasks.filter(e=>e.task_id!==r)}),oa.analytics.track("agentic.task_delete",ol(r,"general")),!0;return!1}catch{return!1}},clearTasks:()=>{oO=0,e(o_)}}));var oP=ef;let ok="/v1/push/alphio/telegram/bind/code",oA="/v1/push/alphio/telegram/is-bound",oj="/v1/push/alphio/telegram/unbind",oC=(e="",t="",r)=>(0,oP.post)(ok,{preferred_bot_id:e,session_id:t},!0,{},r),oN=e=>(0,oP.get)(oA,{},{},e),oT=e=>(0,oP.post)(oj,{},!0,{},e),oR="alphio_telegram_already_bound",oI={state:"unbound",binding:null,pendingCode:null,loading:!1,error:null};function oD(e){return e.alreadyReconciled||!e.serverAddress?{action:"none",markReconciled:!1}:e.local&&e.local.toLowerCase()!==e.serverAddress.toLowerCase()?{action:"adopt-server",address:e.serverAddress.toLowerCase(),markReconciled:!0}:{action:"none",markReconciled:!0}}(0,ra.create)((e,t)=>({...oI,refreshStatus:async()=>{if(!t().loading){e({loading:!0,error:null});try{let r=await oN();if(0!==r.ret)return void e({loading:!1,error:r.msg});if(r.data?.is_bound)return void e({state:"bound",binding:r.data.binding??null,pendingCode:null,loading:!1});let n=t().state;"waiting"===n||"expired"===n?e({binding:null,loading:!1}):e({state:"unbound",binding:null,loading:!1})}catch(t){e({loading:!1,error:t instanceof Error?t.message:"unknown"})}}},generateCode:async(r,n)=>{if(t().loading)return null;e({loading:!0,error:null});try{let i="string"==typeof r?r:"",s="string"==typeof n?n:"",o=await oC(s,i);if(0!==o.ret){if(o.msg===oR)return e({loading:!1}),await t().refreshStatus(),null;return e({loading:!1,error:o.msg}),null}return e({state:"waiting",pendingCode:o.data,loading:!1}),o.data?.deep_link??null}catch(t){return e({loading:!1,error:t instanceof Error?t.message:"unknown"}),null}},cancelPending:()=>{e({state:"unbound",pendingCode:null,error:null})},unbind:async()=>
1{if(!t().loading){e({loading:!0,error:null});try{let t=await oT();if(0!==t.ret)return void e({loading:!1,error:t.msg});e({state:"unbound",binding:null,pendingCode:null,loading:!1,error:null})}catch(t){e({loading:!1,error:t instanceof Error?t.message:"unknown"})}}},markExpired:()=>{e({state:"expired",pendingCode:null})},clear:()=>e(oI)})),(0,ra.create)()(rM((e,t)=>({byVenue:{},reconciledVenues:{},setTradeAccount:(t,r)=>e(e=>({byVenue:{...e.byVenue,[t]:r.toLowerCase()}})),clearVenue:t=>e(e=>{let r={...e.byVenue};return delete r[t],{byVenue:r}}),reconcileWithServer:(r,n)=>{let i=t(),s=oD({local:i.byVenue[r]??null,serverAddress:n,alreadyReconciled:!!i.reconciledVenues[r]});("none"!==s.action||s.markReconciled)&&e({...s.markReconciled?{reconciledVenues:{...i.reconciledVenues,[r]:!0}}:{},..."adopt-server"===s.action?{byVenue:{...i.byVenue,[r]:s.address}}:{}})},clear:()=>e({byVenue:{},reconciledVenues:{}})}),{name:"alphio-trade-account",partialize:e=>({byVenue:e.byVenue})}));let oL=5e7;(0,ra.create)(e=>({availableMicropoints:0,credits:0,raw:null,loaded:!1,loading:!1,refresh:async()=>{e({loading:!0});try{let t=await sP();if(t?.ret!==0||!t.data)return null;let r=Number(t.data.available_points_micropoints)||0;return e({availableMicropoints:r,credits:Math.floor(r/oL),raw:t.data,loaded:!0}),r}catch{return null}finally{e({loading:!1})}},clear:()=>e({availableMicropoints:0,credits:0,raw:null,loaded:!1,loading:!1})}));let oV=(0,ra.create)(e=>({active:!1,activate:()=>e(e=>e.active?e:{...e,active:!0}),reset:()=>e(e=>e.active?{...e,active:!1}:e)}));function oz(){oV.getState().activate()}var oF=rJ,oB=ra,o$=ef;let oU="/v1/stock/watchlistsv3",oW="/v1/stock/watchlists/create",oH="/v1/stock/watchlists/update",oK="/v1/stock/watchlists/del",oY=(e,t)=>(0,o$.get)(oU,e,{},t),oq=(e,t)=>{let r={name:e};return(0,o$.post)(oW,r,!0,{},t)},oG=(e,t,r)=>{let n={name:e,id:t};return(0,o$.post)(oH,n,!0,{},r)},oJ=(e,t)=>{let r={id:e};return(0,o$.post)(oK,r,!0,{},t)},oX="/v2/stock/watchlist/query",oQ="/v2/stock/watchlist/add",oZ=e=>(0,o$.post)(oX,{},!0,{},e),o0=(e,t,r)=>{let n={refs:e};return t&&(n.allow_partial=!0),(0,o$.post)(oQ,n,!0,{},r)};var o1=function(e,t){return(o1=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o2(e,t){function r(){this.constructor=e}o1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function o3(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function o5(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function o4(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o5(arguments[t]));return e}var o8=function(){return function(e,t){this.target=t,this.type=e}}(),o6=function(e){function t(t,r){var n=e.call(this,"error",r)||this;return n.message=t.message,n.error=t,n}return o2(t,e),t}(o8),o7=function(e){function t(t,r,n){void 0===t&&(t=1e3),void 0===r&&(r="");var i=e.call(this,"close",n)||this;return i.wasClean=!0,i.code=t,i.reason=r,i}return o2(t,e),t}(o8),o9=function(){if("u">typeof WebSocket)return WebSocket},ae=function(e){return void 0!==e&&!!e&&2===e.CLOSING},at={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+4e3*Math.random(),minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0};!function(){function e(e,t,r){var n=this;void 0===r&&(r={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(e){n._debug("open event");var t=n._options.minUptime,r=void 0===t?at.minUptime:t;clearTimeout(n._connectTimeout),n._uptimeTimeout=setTimeout(function(){return n._acceptOpen()},r),n._ws.binaryType=n._binaryType,n._messageQueue.forEach(function(e){return n._ws.send(e)}),n._messageQueue=[],n.onopen&&n.onopen(e),n._listeners.open.forEac
1h(function(t){return n._callEventListener(e,t)})},this._handleMessage=function(e){n._debug("message event"),n.onmessage&&n.onmessage(e),n._listeners.message.forEach(function(t){return n._callEventListener(e,t)})},this._handleError=function(e){n._debug("error event",e.message),n._disconnect(void 0,"TIMEOUT"===e.message?"timeout":void 0),n.onerror&&n.onerror(e),n._debug("exec error listeners"),n._listeners.error.forEach(function(t){return n._callEventListener(e,t)}),n._connect()},this._handleClose=function(e){n._debug("close event"),n._clearTimeouts(),n._shouldReconnect&&n._connect(),n.onclose&&n.onclose(e),n._listeners.close.forEach(function(t){return n._callEventListener(e,t)})},this._url=e,this._protocols=t,this._options=r,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}Object.defineProperty(e,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CONNECTING",{get:function(){return e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OPEN",{get:function(){return e.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSING",{get:function(){return e.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSED",{get:function(){return e.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferedAmount",{get:function(){return this._messageQueue.reduce(function(e,t){return"string"==typeof t?e+=t.length:t instanceof Blob?e+=t.size:e+=t.byteLength,e},0)+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),e.prototype.close=function(e,t){(void 0===e&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),this._ws)?this._ws.readyState===this.CLOSED?this._debug("close: already closed"):this._ws.close(e,t):this._debug("close enqueued: no ws instance")},e.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,this._ws&&this._ws.readyState!==this.CLOSED&&this._disconnect(e,t),this._connect()},e.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,r=void 0===t?at.maxEnqueuedMessages:t;this._messageQueue.length<r&&(this._debug("enqueue",e),this._messageQueue.push(e))}},e.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},e.prototype.dispatchEvent=function(e){var t,r,n=this._listeners[e.type];if(n)try{for(var i=o3(n),s=i.next();!s.done;s=i.next()){var o=s.value;this._callEventListener(e,o)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0},e.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(function(e){return e!==t}))},e.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,o4(["RWS>"],e))},e.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,r=void 0===t?at.reconnectionDelayGrowFactor:t,n=e.minReconnectionDelay,i=void 0===n?at.minReconnectionDelay:n,s=e.maxReconnectionDelay,o=void 0===s?at.maxReconnectionDelay:s,a=0;return this._retryCount>0&&(a=i*Math.pow(r,this._retryCount-1))>o&&(a=o),this._debug("next delay",a),a},e.prototype._wait=function(){var e=this;return new Promise(function(t){setTimeout(t,e._getNextDelay())})},e.prototype._getNextUrl=function(e){if("string"==typeof e)return Promise.resolve(e);if("function"==typeof e){var t=e();if("string"==typeof t)return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},e.prototype._connect=function(){var e=this;if(!this._connectLock&&this._shouldReconnect){this._connectLock=!0;var t=this._options,r=t.maxRetries,n=void 0===r?at.maxRetries:r,i=t.connectionTimeout,s=void 0===i?at.connectionTimeout:i,o=t.WebSocket,a=void 0===o?o9():o;if(this._retryCount>=n)return void this._debug("max retries reached",this._retryCount,">=",n);if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!ae(a))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(t){e._closeCalled||(e._debug("connect",{url:t,protocols:e._protocols}),e._ws=e._protocols?new a(t,e._protocols):new a(t),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},s))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new o6(Error("TIMEOUT"),this))},e.prototype._disconnect=function(e,t){if(void 0===e&&(e=1e3),this._clearTimeouts(),this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new o7(e,t,this))}catch(e){}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},e.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},e.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},e.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}}(),e.i(880162);let ar=[],an=!1;
1function ai(e){let t=e.trim(),r=t.indexOf(":");return r<0?t.toUpperCase():`${t.slice(0,r).toLowerCase()}:${t.slice(r+1).toUpperCase()}`}(function e(){an||(an=!0,window.addEventListener("eip6963:announceProvider",e=>{let t=e.detail;t?.provider&&t?.info?.uuid&&(ar.some(e=>e.info.uuid===t.info.uuid)||ar.push(t))}),window.dispatchEvent(new Event("eip6963:requestProvider")))})();let as="xyz";function ao(e){let t=e.indexOf(":");return t<0||e.slice(0,t).trim().toLowerCase()!==as?null:e.slice(t+1).trim().toUpperCase()||null}class aa{subscribers=[];get hasSubscribers(){return this.subscribers.length>0}subscribe(e){let t=`whale_flow_${Date.now()}_${Math.random()}`;return this.subscribers.push({id:t,callback:e}),t}unsubscribe(e){let t=this.subscribers.findIndex(t=>t.id===e);return -1!==t&&(this.subscribers.splice(t,1),!0)}emit(e){for(let{callback:t}of this.subscribers)try{t(e)}catch(e){console.error("Whale flow WS emit error:",e)}}}new aa,e.i(19809);let al=7,au=8;class ac{subscribers=new Map;subscribe(e,t){let r=`${e}_${Date.now()}_${Math.random()}`;return this.subscribers.has(e)||this.subscribers.set(e,[]),this.subscribers.get(e).push({id:r,callback:t}),r}unsubscribe(e){for(let[t,r]of this.subscribers.entries()){let n=r.findIndex(t=>t.id===e);if(n>-1){r.splice(n,1),0===r.length&&this.subscribers.delete(t);break}}}emit(e,t,r){let n=this.subscribers.get(e);if(n)for(let{callback:i}of n)try{i({symbol:t,data:r})}catch(t){console.error(`Market WS emit error for ${e}:`,t)}}clear(){this.subscribers.clear()}}let ah=new ac;class ad{subscribers=new Map;subscribe(e,t){let r=`sports_${e}_${Date.now()}_${Math.random()}`;return this.subscribers.has(e)||this.subscribers.set(e,[]),this.subscribers.get(e).push({id:r,callback:t}),r}unsubscribe(e){for(let[t,r]of this.subscribers.entries()){let n=r.findIndex(t=>t.id===e);if(n>-1){r.splice(n,1),0===r.length&&this.subscribers.delete(t);break}}}emit(e,t){let r=this.subscribers.get(e);if(r)for(let{callback:n}of r)try{n(t)}catch(t){console.error(`Sports WS emit error for event ${e}:`,t)}}clear(){this.subscribers.clear()}}new ad;let af=null,ap=[],am={};function ag(e){let t=e.exchange?.trim().toLowerCase()??"",r=e.symbol?.trim().toUpperCase()??"",n=e.instrument_type?.trim().toLowerCase()??"";return t&&r&&n?`${t}:${r}:${n}`:""}function av(e){if(e.length)if(af&&(af.readyState===WebSocket.OPEN||af.readyState===WebSocket.CONNECTING)){let t=JSON.stringify({topics:e});for(let r of(af.send(JSON.stringify({msg_type:1,l2_type:al,event_payload:t})),e))am[r]=(am[r]||0)+1}else ap.push({action:"subscribe",topics:e})}function ay(e){if(e.length)if(af&&(af.readyState===WebSocket.OPEN||af.readyState===WebSocket.CONNECTING)){let t=[];for(let r of e)1>=(am[r]||0)?(t.push(r),delete am[r]):am[r]-=1;if(t.length){let e=JSON.stringify({topics:t});af.send(JSON.stringify({msg_type:1,l2_type:au,event_payload:e}))}}else ap.push({action:"unsubscribe",topics:e})}function ab(e,t){return ah.subscribe(ag(e),t)}function aw(e){ah.unsubscribe(e)}function ax(e,t="US"){av(e.map(e=>`stock_${e}_${t}`))}function aS(e,t="US"){ay(e.map(e=>`stock_${e}_${t}`))}function a_(e,t){return ah.subscribe(`stock_${e}`,t)}function aM(e){ah.unsubscribe(e)}function aO(e,t){return ah.subscribe(`etf_${e}`,t)}function aE(e){ah.unsubscribe(e)}function aP(e){av(e.map(e=>`crypto_${e}USDT_-`))}function ak(e){ay(e.map(e=>`crypto_${e}USDT_-`))}function aA(e,t){return ah.subscribe(`crypto_${e}USDT`,t)}function aj(e){ah.unsubscribe(e)}function aC(e){av(e.map(e=>`perp_${ai(e)}_HYPERLIQUID`))}function aN(e){ay(e.map(e=>`perp_${ai(e)}_HYPERLIQUID`))}function aT(e,t){return ah.subscribe(`perp_${ai(e)}`,t)}function aR(e){ah.unsubscribe(e)}let aI="watchlist_selected_id";function aD(){try{return localStorage.getItem(aI)}catch{return null}}function aL(e){try{e?localStorage.setItem(aI,e):localStorage.removeItem(aI)}catch{}}let aV=new Map,az=new Map,aF=null,aB=new Map,a$=(e,t)=>{aH.getState().toastSuccess?.(e,t)},aU=(e,t)=>{aH.getState().toastError?.(e,t)};function aW(e){let t=aV.get(e);if(t){t.forEach(e=>{aM(e.subscriptionId)});let r=new Map;for(let e of t){let t=e.locale||"US";r.has(t)||r.set(t,[]),r.get(t).push(e.symbol)}for(let[e,t]of r)aS(t,e);aV.delete(e)}let r=az.get(e);
1if(r){r.forEach(e=>{aj(e.subscriptionId)});let t=r.map(e=>e.symbol);t.length>0&&ak(t),az.delete(e)}}let aH=(0,oB.create)((e,t)=>({watchlists:[],loading:!1,selectedWatchlistId:null,lastMarketDataAt:null,setSelectedWatchlistId:t=>{e({selectedWatchlistId:t}),aL(t)},setToast:t=>{e({toastSuccess:t.success,toastError:t.error})},clear:()=>{for(let[,e]of aV)for(let t of e)t.isCrypto?aj(t.subscriptionId):aM(t.subscriptionId);for(let[,e]of az)for(let t of e)aj(t.subscriptionId);aV.clear(),az.clear(),aB.clear(),aF=null,aL(null),e({watchlists:[],selectedWatchlistId:null,loading:!1})},fetchUserWatchlists:async()=>aF||(aF=(async()=>{try{e({loading:!0});let r=await oY({});if(0===r.ret){let n=r.list??[];e({watchlists:n});let{selectedWatchlistId:i}=t();if(!i&&n.length>0){let t=aD(),r=t&&n.some(e=>e.id===t)?t:n[0].id;e({selectedWatchlistId:r}),aL(r)}return r}return console.error("Failed to fetch user watchlists:",r.msg),null}catch(e){return console.error("Error fetching user watchlists:",e),null}finally{e({loading:!1}),aF=null}})()),createWatchlistGroup:async e=>{try{let r=await oq(e);if(0===r.ret)return await t().fetchUserWatchlists(),a$(oF.i18n._(rX`Watchlist created successfully`),{duration:2e3}),!0;return aU(r.msg||oF.i18n._(rX`Failed to create watchlist`),{duration:2e3}),!1}catch(e){return console.error("Error creating watchlist:",e),aU(oF.i18n._(rX`Failed to create watchlist`),{duration:2e3}),!1}},updateWatchlistGroup:async(t,r)=>{try{let n=await oG(r,t);if(0===n.ret)return e(e=>({watchlists:e.watchlists.map(e=>e.id===t?{...e,name:r}:e)})),a$(oF.i18n._(rX`Watchlist updated successfully`),{duration:2e3}),!0;return aU(n.msg||oF.i18n._(rX`Failed to update watchlist`),{duration:2e3}),!1}catch(e){return console.error("Error updating watchlist:",e),aU(oF.i18n._(rX`Failed to update watchlist`),{duration:2e3}),!1}},deleteWatchlistGroup:async t=>{try{let r=await oJ(t);if(0===r.ret)return aW(t),e(e=>{let r=e.watchlists.filter(e=>e.id!==t),n=e.selectedWatchlistId===t?r.length>0?r[0].id:null:e.selectedWatchlistId;return aL(n),{watchlists:r,selectedWatchlistId:n}}),a$(oF.i18n._(rX`Watchlist deleted successfully`)),!0;return aU(r.msg||oF.i18n._(rX`Failed to delete watchlist`)),!1}catch(e){return console.error("Error deleting watchlist:",e),aU(oF.i18n._(rX`Failed to delete watchlist`)),!1}}}));var aK=ef;let aY="/v1/search/instruments/resolve",aq=(e,t)=>(0,aK.post)(aY,e,!0,{},t);function aG(e,t){return e.exchange.toLowerCase()===t.exchange.toLowerCase()&&e.symbol.toUpperCase()===t.symbol.toUpperCase()&&e.instrument_type.toLowerCase()===t.instrument_type.toLowerCase()}let aJ=null,aX=[],aQ=[],aZ=[],a0=[],a1=[],a2=[],a3=[];function a5(){for(let e of aX)aM(e);for(let e of(aX=[],aQ.length>0&&(aS(aQ,"US"),aQ=[]),aZ.length>0&&(aS(aZ,"HK"),aZ=[]),a0))aj(e);for(let e of(a0=[],a1.length>0&&(ak(a1),a1=[]),a2))aR(e);a2=[],a3.length>0&&(aN(a3),a3=[])}function a4(){a5();let e=a8.getState().items,t=[],r=[],n=[],i=[];for(let s of e){let e=(s.ref?.instrument_type??"").toLowerCase(),o=(s.ref?.exchange??"").toLowerCase(),a=(s.ref?.symbol??"").toUpperCase();a&&("spot"===e?n.push(a7(a,"spot")):"perp"===e?i.push(a):"hkex"===o?r.push(a):t.push(a))}let s=(e,t,r,n)=>{let i=Number(r);if(!Number.isFinite(i)||i<=0)return;let s=Number(n);a8.getState().applyQuoteTick(e,{close:i,prevClose:Number.isFinite(s)&&s>0?s:void 0,kind:t})};t.length>0&&(aQ=t,ax(t,"US"),aX=t.map(e=>a_(e,t=>s(e,"stock",t.data.close,t.data.prev_close)))),r.length>0&&(aZ=r,ax(r,"HK"),aX=aX.concat(r.map(e=>a_(e,t=>s(e,"stock",t.data.close,t.data.prev_close))))),n.length>0&&(a1=n,aP(n),a0=n.map(e=>aA(e,t=>s(e,"crypto",t.data.close,t.data.prev_close)))),i.length>0&&(a3=i,aC(i),a2=i.map(e=>aT(e,t=>s(e,"perp",t.data.close,t.data.prev_close))))}let a8=(0,ra.create)((e,t)=>({items:[],loaded:!1,fetchWatchlistV2:async(r=!1)=>!r&&t().loaded?(a4(),t().items):aJ||(aJ=(async()=>{try{let t=await oZ();if(0!==t.ret)return null;let r=t.data?.list??[];return e({items:r,loaded:!0}),a4(),r}catch(e){return console.error("[useWatchlistV2Store] fetch failed:",e),null}finally{aJ=null}})()),isWatched:e=>t().items.some(t=>aG(t.ref,e)),applyQuoteTick:(t,r)=>{let n=t.toUpperCase(),i=String(r.close),s=r.prevClose&&0!==r.prevClose?String((r.close-r.prevClose)/r.prevClose*100):void 0;e(e=>{let t=!1,o=e.items.map(e=>{let o=(e.ref?.instrument_type??"").toLowerCase(),a=(e.ref?.symbol??"").toUpperCase();if(!("crypto"===r.kind?"spot"===o&&(a7(a,"spot")===n||a===n):"perp"===r.kind?"perp"===o&&a===n:"spot"!==o&&"perp"!==o&&a===n))return e;let l=s??e.change_ratio;return e.close===i&&e.last_trade===i&&e.change_ratio===l?e:(t=!0,{...e,close:i,last_trade:i,change_ratio:l})});return t?{items:o}:e})},clear:()=>{aJ=null,a5(),e({items:[],loaded:!1})}})),a6=["USDT","USDC","FDUSD","BUSD","TUSD","USD"];function a7(e,t){let r=e.trim().toUpperCase();if("perp"===t.toLowerCase())return r;let n=r.replace(/[-_/]/g,"");for(let e of a6)if(n.endsWith(e)&&n.length>e.length)return n.slice(0,-e.length);return r}var a9=ef;let le=1,lt=2,lr=3,ln=4;function li(e){switch(e){case le:return"privy";case lt:return"metamask";case lr:return"walletconnect";
1case ln:return"external";default:return"unknown"}}function ls(e){if("number"==typeof e)return li(e);if("string"==typeof e)switch(e.replace(/^WalletSource/,"").toLowerCase()){case"privy":return"privy";case"metamask":return"metamask";case"walletconnect":return"walletconnect";case"external":return"external"}return"unknown"}function lo(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e&&""!==e){let t=Number(e);if(Number.isFinite(t))return t}return 0}function la(e){if(!e)return null;let t=e.wallet_address??e.walletAddress;return"string"!=typeof t||""===t?null:{walletAddress:t.toLowerCase(),label:e.label??"",source:ls(e.source),walletIndex:lo(e.wallet_index??e.walletIndex),isDefault:!!(e.is_default??e.isDefault),createdAt:lo(e.created_at??e.createdAt),metadata:e.metadata}}async function ll(){let e=await (0,a9.post)("/v1/crypto/wallets/list",{});return(e?.wallets??e?.data?.wallets??[]).flatMap(e=>{let t=la(e);return t?[t]:[]})}async function lu(){let e=await (0,a9.post)("/v1/crypto/trading-wallets/list",{});if(e?.ret===0)return e.wallets??e.data?.wallets??[];throw new rZ(e?.ret??-1,e?.msg||`Failed to load trading wallets (ret=${e?.ret})`)}let lc=3e4;(0,ra.create)((e,t)=>({data:[],isLoading:!0,error:null,_inflight:null,_wasAuthed:!1,_lastFetchedAt:0,fetch:async(r,n)=>{if(!r)return void e({data:[],error:null,isLoading:!1,_wasAuthed:!1,_lastFetchedAt:0});let i=t();if(!n?.force&&i._wasAuthed&&Date.now()-i._lastFetchedAt<lc)return;let s=i._inflight;if(s)return s;let o=0===i._lastFetchedAt,a=(async()=>{o&&e({isLoading:!0});try{let t=await lu();e({data:t,error:null,_wasAuthed:!0,_lastFetchedAt:Date.now()})}catch(t){console.warn("[useTradingWallets] refresh failed:",t),e({error:t})}finally{e({isLoading:!1,_inflight:null})}})();return e({_inflight:a}),a},reset:()=>{e({data:[],isLoading:!0,error:null,_inflight:null,_wasAuthed:!1,_lastFetchedAt:0})}}));let lh=3e4;(0,ra.create)((e,t)=>({data:[],isLoading:!0,error:null,_inflight:null,_wasAuthed:!1,_lastFetchedAt:0,fetch:async(r,n)=>{if(!r)return void e({data:[],error:null,isLoading:!1,_wasAuthed:!1,_lastFetchedAt:0});let i=t();if(!n?.force&&i._wasAuthed&&Date.now()-i._lastFetchedAt<lh)return;let s=i._inflight;if(s)return s;let o=0===i._lastFetchedAt,a=(async()=>{o&&e({isLoading:!0});try{let t=await ll();e({data:t,error:null,_wasAuthed:!0,_lastFetchedAt:Date.now()})}catch(t){e({error:t})}finally{e({isLoading:!1,_inflight:null})}})();return e({_inflight:a}),a},reset:()=>{e({data:[],isLoading:!0,error:null,_inflight:null,_wasAuthed:!1,_lastFetchedAt:0})}}));let ld={get url(){return`file://${e.P("packages/shared/src/auth/AuthProvider.tsx")}`}}.hot;ld&&ld.decline(),e.i(23616),e.i(111631),e.i(803424),e.i(404062),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.NORMAL=1]="NORMAL",e[e.NEED_EMAIL_VERIFY=2]="NEED_EMAIL_VERIFY"}({}),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.NORMAL=1]="NORMAL",e[e.NEED_BIND_EMAIL=2]="NEED_BIND_EMAIL"}({}),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.GOOGLE=1]="GOOGLE",e[e.APPLE=2]="APPLE",e[e.MICROSOFT=3]="MICROSOFT",e[e.FACEBOOK=4]="FACEBOOK"}({}),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.REGISTER=1]="REGISTER",e[e.FORGET_PASSWORD=2]="FORGET_PASSWORD",e[e.EXPORT_PRIVATE_KEY=3]="EXPORT_PRIVATE_KEY",e[e.REMOVE_WALLET=4]="REMOVE_WALLET"}({});!function(e){e.Unknown="EDeploymentStatus_Unknown",e.Pending="EDeploymentStatus_Pending",e.Active="EDeploymentStatus_Active",e.Paused="EDeploymentStatus_Paused",e.Reducing="EDeploymentStatus_Reducing",e.Liquidating="EDeploymentStatus_Liquidating",e.Stopped="EDeploymentStatus_Stopped"}({});rX`1-Day`,rX`1-Week`,rX`4-Hour`,rX`2-Hour`,rX`1-Hour`,rX`30-Min`,rX`15-Min`,rX`At Mkt Open`,rX`At Mkt Close`,rX`Top Market Cap`,rX`Bottom Market Cap`,rX`Top Price Change%`,rX`Bottom Price Change%`,rX`Top Trading Volume`,rX`Bottom Trading Volume`,rX`Top Price Change%`,rX`Bottom Price Change%`,rX`Top Trading Amount`,rX`Bottom Trading Amount`,rX`Hyperliquid`,rX`Binance`,rX`Kucoin`,rX`Perps`,rX`Spot`,rX`S&P 500`,rX`NASDAQ 100`,rX`DOW 30`,rX`Watchlist`,rX`Single Ticker`,rX`Hyper20`,rX`Hyper50`,rX`Hyper100`,rX`All Cryptos`,rX`Watchlist`,rX`Single Ticker`,rX`Top 20`,rX`Top 50`,rX`Top 100`,rX`All Cryptos`,rX`Watchlist`,rX`Single Ticker`,rX`Started Time`,rX`Return`,rX`Annualized Return`,rX`Sharpe Ratio`,rX`Max Drawdown`,rX`Win Rate`,rX`Runtime`;var lf=ef;let lp="hyperliquid",lm="/v1/crypto/account/bind",lg="/v1/crypto/order/place",lv="/v1/crypto/order/cancel-all",ly="/v1/crypto/order/open",lb="/v1/crypto/positions",lw="/v1/crypto/balance",lx="/v1/crypto/wallets/wallet-balance",lS="/v1/crypto/leverage",l_="/v1/crypto/wallets/prepare-deposit-to-hl",lM="/v1/crypto/wallets/prepare-spot-send",lO="/v1/crypto/wallets/prepare-withdraw",lE="/v1/crypto/wallets/finalize-withdraw",lP="/v1/crypto/wallets/prepare-deposit-v2",lk="/v1/crypto/wallets/finalize-deposit",lA="/v1/crypto/wallets/spot-account-balance",lj="/v1/crypto/wallets/prepare-transfer",lC="/v1/crypto/wallets/finalize-transfer",lN="/v1/crypto/wallets/portfolio",lT="/v1/crypto/wallets/prepare-spot-withdraw",lR="/v1/crypto/wallets/finalize-spot-withdraw",lI="/v1/crypto/wallets/spot-balances",lD="/v1/crypto/wallets/positions",lL="/v1/crypto/wallets/open-orders",lV="/v1/crypto/wallets/user-fills",lz="/v1/crypto/wallets/twap-history",lF="/v1/crypto/wallets/funding-history",lB="/v1/crypto/wallets/order-history",l$="/v1/crypto/wallets/transactions";
1function lU(e,t){if(!e)throw Error(`Hyperliquid ${t}: empty response`);if(0!==e.ret)throw Error(`Hyperliquid ${t}: ${e.msg??`ret=${e.ret}`}`);if(void 0===e.data)throw Error(`Hyperliquid ${t}: missing data`);return e.data}function lW(e,t){if(!e)throw Error(`Hyperliquid ${t}: empty response`);if(0!==e.ret)throw Error(`Hyperliquid ${t}: ${e.msg??`ret=${e.ret}`}`)}function lH(e,t){let r,n,i,s=lU(e,t);try{r=JSON.parse(s.domain),n=JSON.parse(s.types),i=JSON.parse(s.message)}catch(e){throw Error(`Hyperliquid ${t}: backend returned malformed EIP-712 JSON: ${e instanceof Error?e.message:String(e)}`)}return{domain:r,types:n,primaryType:s.primary_type,message:i,__hlRaw:{domain:s.domain,types:s.types,primaryType:s.primary_type,message:s.message,nonce:s.nonce??"",deadline_ms:s.deadline_ms??"",fee_usdc:s.fee_usdc??""}}}function lK(e,t){let r=e.payload.__hlRaw;if(!r)throw Error(`Hyperliquid ${t}: signed.payload must come from the matching prepare call (missing __hlRaw fields)`);return r}class lY{dexId=lp;displayName="Hyperliquid";supportedChains=[42161];async prepareApproveAgent(e){throw Error("not yet implemented (Phase 5+)")}async finalizeApproveAgent(e,t){lW(await (0,lf.post)(lm,{dex_id:this.dexId,wallet_address:e}),"finalizeApproveAgent")}async getAccountBalance(e){let t=lU(await (0,lf.post)(lw,{dex_id:this.dexId,wallet_address:e}),"getAccountBalance"),r=t.balances?.[0];if(!r)return null;let n=eM(t.account_mode),i=t.margin_summary?.account_value,s=n||void 0===i?r.balance:i;return{...r,balance:s,account_mode:t.account_mode??""}}async getWalletUsdcBalance(e){let t=lU(await (0,lf.post)(lx,{dex_id:this.dexId,wallet_address:e.toLowerCase()}),"getWalletUsdcBalance");return t?.balance?{balance:t.balance,available:t.available_balance??t.balance}:null}async getSpotAccountBalance(e){let t=await (0,lf.post)(lA,{dex_id:this.dexId,wallet_address:e.toLowerCase()});return t&&0===t.ret&&t.data?t.data:null}async getPositions(e){return lU(await (0,lf.post)(lb,{dex_id:this.dexId,wallet_address:e}),"getPositions").positions??[]}async getOpenOrders(e){return lU(await (0,lf.get)(ly,{dex_id:this.dexId,wallet_address:e}),"getOpenOrders").orders??[]}async placeOrder(e,t){return lU(await (0,lf.post)(lg,{dex_id:this.dexId,wallet_address:e,...t}),"placeOrder")}async cancelOrder(e,t){throw Error("HyperliquidAdapter.cancelOrder not yet implemented — DexAdapter interface drops req.symbol; use cancelDexOrder() helper directly")}async cancelAllOrders(e){lW(await (0,lf.post)(lv,{dex_id:this.dexId,wallet_address:e}),"cancelAllOrders")}async setLeverage(e,t){lW(await (0,lf.post)(lS,{dex_id:this.dexId,wallet_address:e,...t}),"setLeverage")}async prepareDeposit(e,t){let r=lU(await (0,lf.post)(l_,{dex_id:this.dexId,wallet_address:e.toLowerCase(),amount:t}),"prepareDeposit");return{to:r.to,data:r.data,chainId:r.chain_id,estimatedNetworkFeeUsdc:r.estimated_network_fee_usdc,netAmountUsdc:r.net_amount_to_hl}}async prepareSpotSend(e,t,r){let n=lU(await (0,lf.post)(lM,{dex_id:this.dexId,wallet_address:e.toLowerCase(),amount:t,destination:r.toLowerCase()}),"prepareSpotSend");return{to:n.to,data:n.data,chainId:n.chain_id,estimatedNetworkFeeUsdc:n.estimated_network_fee_usdc,netAmountUsdc:n.net_amount_to_destination}}async prepareDepositV2(e,t){return lH(await (0,lf.post)(lP,{dex_id:this.dexId,wallet_address:e.toLowerCase(),amount:t}),"prepareDepositV2")}async finalizeDeposit(e,t,r){let n=lK(t,"finalizeDeposit");return{txHash:lU(await (0,lf.post)(lk,{dex_id:this.dexId,wallet_address:e.toLowerCase(),signature:t.signature,domain:n.domain,types:n.types,primary_type:n.primaryType,message:n.message,nonce:n.nonce,deadline_ms:n.deadline_ms,amount:r}),"finalizeDeposit").tx_hash}}async prepareWithdraw(e,t,r){return lH(await (0,lf.post)(lO,{dex_id:this.dexId,wallet_address:e.toLowerCase(),amount:t,destination:r.toLowerCase()}),"prepareWithdraw")}async finalizeWithdraw(e,t){let r=lK(t,"finalizeWithdraw");lW(await (0,lf.post)(lE,{dex_id:this.dexId,wallet_address:e.toLowerCase(),signature:t.signature,domain:r.domain,types:r.types,primary_type:r.primaryType,message:r.message,nonce:r.nonce}),"finalizeWithdraw")}async prepareTransfer(e,t,r){return lH(await (0,lf.post)(lj,{dex_id:this.dexId,wallet_address:e.toLowerCase(),from_account:t,amount:r}),"prepareTransfer")}async finalizeTransfer(e,t){let r=lK(t,"finalizeTransfer");return lU(await (0,lf.post)(lC,{dex_id:this.dexId,wallet_address:e.toLowerCase(),signature:t.signature,domain:r.domain,types:r.types,primary_type:r.primaryType,message:r.message,nonce:r.nonce}),"finalizeTransfer").tx_hash??""}async getPortfolio(e,t){return lU(await (0,lf.post)(lN,{dex_id:this.dexId,wallet_address:e.toLowerCase(),timeframe:t}),"getPortfolio")}async prepareSpotWithdraw(e,t,r){return lH(await (0,lf.post)(lT,{dex_id:this.dexId,wallet_address:e.toLowerCase(),destination:r.toLowerCase(),amount:t}),"prepareSpotWithdraw")}async finalizeSpotWithdraw(e,t){let r=lK(t,"finalizeSpotWithdraw");lW(await (0,lf.post)(lR,{dex_id:this.dexId,wallet_address:e.toLowerCase(),signature:t.signature,domain:r.domain,types:r.types,primary_type:r.primaryType,message:r.message,nonce:r.nonce}),"finalizeSpotWithdraw")}async getSpotBalances(e){let t=await (0,lf.post)(lI,{dex_id:this.dexId,wallet_address:e.toLowerCase()});return t&&0===t.ret&&t.data?t.data.balances??[]:[]}async getWalletPositions(e){let t=await (0,lf.post)(lD,{dex_id:this.dexId,wallet_address:e.toLowerCase()});return t&&0===t.ret&&t.data?t.data.positions??[]:[]}async getWalletOpenOrders(e){let t=await (0,lf.post)(lL,{dex_id:this.dexId,wallet_address:e.toLowerCase()});return t&&0===t.ret&&t.data?t.data.orders??[]:[]}async getUserFills(e,t){let r=await (0,lf.post)(lV,{dex_id:this.dexId,wallet_address:e.toLowerCase(),limit:t});return r&&0===r.ret&&r.data?r.data.fills??[]:[]}async getTwapHistory(e){let t=await (0,lf.post)(lz,{dex_id:this.dexId,wallet_address:e.toLowerCase()});return t&&0===t.ret&&t.data?{orders:t.data.orders??[]}:null}async getFundingHistory(e,t,r){let n=await (0,lf.post)(lF,{dex_id:this.dexId,wallet_address:e.toLowerCase(),start_time_ms:t&&""!==t?t:"0",end_time_ms:r&&""!==r?r:"0"});return n&&0===n.ret&&n.data?{entries:n.data.entries??[]}:null}async getOrderHistory(e,t){let r=await (0,lf.post)(lB,{dex_id:this.dexId,wallet_address:e.toLowerCase(),limit:t??100});return r&&0===r.ret&&r.data?{orders:r.data.orders??[]}:null}async getWalletTransactions(e,t,r){let n=await (0,lf.post)(l$,{dex_id:this.dexId,wallet_address:e.toLowerCase(),limit:t??50,
1cursor:r??0});return n&&0===n.ret&&n.data?{entries:n.data.entries??[],nextCursor:n.data.next_cursor??0}:null}}new lY;var lq=e.i(741393);(0,ra.create)(e=>({open:!1,mode:"chat",prompt:null,promptVersion:0,focusSymbol:"",openTask:t=>e({open:!0,mode:"task",prompt:null,focusSymbol:t}),openChat:(t,r)=>e(e=>({open:!0,mode:"chat",prompt:t??null,promptVersion:e.promptVersion+1,focusSymbol:r})),setMode:(t,r)=>e(e=>({mode:t,prompt:void 0!==r?r:e.prompt,promptVersion:"chat"===t?e.promptVersion+1:e.promptVersion})),close:()=>e({open:!1,mode:"chat",prompt:null,focusSymbol:""})})),(0,ra.create)(e=>({draft:null,draftVersion:0,requestPrefill:t=>e(e=>({draft:t,draftVersion:e.draftVersion+1})),clearDraft:()=>e({draft:null})})),(0,ra.create)(e=>({open:!1,setOpen:t=>e({open:t})})),(0,ra.create)(e=>({open:!1,redirectLink:null,connectingBrokerId:null,callbacks:null,openModal:(t,r,n)=>e({open:!0,redirectLink:t,connectingBrokerId:r,callbacks:n??null}),closeModal:()=>e({open:!1,redirectLink:null,connectingBrokerId:null,callbacks:null})})),window.SpeechRecognition??window.webkitSpeechRecognition,e.i(909378);var lG=ef;let lJ="/v1/crypto/query",lX="/v2/crypto/kline/query",lQ=(e={},t)=>{let{symbol:r="",multiplier:n=1,timespan:i=4,start_time:s=0,end_time:o=0,type:a=3,limit:l=0,locale:u=""}=e,c={multiplier:n,timespan:i,symbol:r,start_time:s,end_time:o,type:a,locale:u};return l>0&&(c.limit=l),(0,lG.post)(lJ,c,!0,{},t)},lZ=(e,t)=>(0,lG.post)(lX,e,!0,{},t);!function(e){e[e.All=0]="All",e[e.EventSignal=1]="EventSignal",e[e.Daytrading=2]="Daytrading",e[e.SwingMax=3]="SwingMax",e[e.AiStockPicker=4]="AiStockPicker",e[e.CryptoRadar=5]="CryptoRadar",e[e.CoinSwing=6]="CoinSwing"}({}),function(e){e[e.Unspecified=0]="Unspecified",e[e.Older=1]="Older",e[e.Newer=2]="Newer"}({}),function(e){e[e.All=0]="All",e[e.Open=1]="Open",e[e.Closed=2]="Closed"}({}),function(e){e[e.HighestReturn=0]="HighestReturn",e[e.Latest=1]="Latest",e[e.LastUpdated=2]="LastUpdated"}({});var l0=ef;let l1="/v1/reward/leaderboard",l2="/v1/reward/leaderboard/claim",l3=(e,t)=>(0,l0.get)(l1,e,{},t),l5=(e,t)=>(0,l0.post)(l2,e,!0,{},t);var l4=ef;let l8="/v1/stock/screener-favorite/list",l6=(e,t)=>(0,l4.get)(l8,e,{},t);var l7=ip,l9=e.i(927840),ue=e.i(125955),ut=ig,ur=iv;function un(e,t="America/New_York"){return new Date(new Date(1e3*e).toLocaleString("en-US",{timeZone:t})).getTime()/1e3}function ui(e=5,t="YYYY-MM-DD"){return{start:(0,l7.default)().subtract(e,"year").format(t),end:(0,l7.default)().format(t)}}function us(e,t=2){let[r,n]=e.split("/Q").map(Number),i=[];for(let e=0;e<t;e++)(n+=1)>4&&(n=1,r+=1),i.push(`${r}/Q${n}`);return i}l7.default.extend(l9.default),l7.default.extend(ur.default),l7.default.extend(ut.default),l7.default.extend(ue.default),n_.Ja,n_.De,n_.De,n_.De,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.Es,n_.ZhTW,n_.ZhTW,n_.ZhTW,nS.Sports,nS.Politics,nS.Crypto,nS.Finance,nS.Culture,nS.Mentions,nS.Weather,nS.Economics,nS.Tech,n_.Zh,n_.ZhTW,n_.Zh,n_.ZhTW,n_.En,n_.Es,n_.Ja,n_.De,n_.Zh,n_.ZhTW;var uo=function(e){return e.Free="free",e.Base="base",e.Pro="pro",e.Elite="elite",e}({}),ua=function(e){return e.QuantAI="quant_ai",e.SwingmaxPortfolio="swingmax_portfolio",e.Whales="whales",e}({}),ul=function(e){return e.StockSignal="stock_signal",e.CryptoSignal="crypto_signal",e}({});let uu={0:{level:0,interval:"month"},101:{level:1,interval:"month"},102:{level:2,interval:"month"},103:{level:3,interval:"month"},201:{level:1,interval:"year"},202:{level:2,interval:"year"},203:{level:3,interval:"year"},901:{level:4,interval:"year"}};function uc(e){return null==e||e<=0?uo.Free:1===e?uo.Base:2===e?uo.Pro:uo.Elite}let uh={[nk.QUANT_AI]:ua.QuantAI,[nk.QUANT_AI_QUARTERLY]:ua.QuantAI,[nk.QUANT_AI_YEARLY]:ua.QuantAI,[nk.SWINGMAX_PORTFOLIO]:ua.SwingmaxPortfolio,[nk.SWINGMAX_PORTFOLIO_QUARTERLY]:ua.SwingmaxPortfolio,[nk.SWINGMAX_PORTFOLIO_YEARLY]:ua.SwingmaxPortfolio,[nk.WHALES_SEMI_ANNUALLY]:ua.Whales,[nk.WHALES_YEARLY]:ua.Whales},ud={[nk.STOCK_SIGNAL]:ul.StockSignal,[nk.CRYPTO_SIGNAL]:ul.CryptoSignal},uf={[uo.Free]:{daily:0,monthly:0},[uo.Base]:{daily:100,monthly:2e3},[uo.Pro]:{daily:500,monthly:6e3},[uo.Elite]:{daily:1e3,monthly:15e3}};function up(e){let t=e.subscriptionInfo,r=e.addonList??[],n=t?.plan_id??0,i=t?.next_plan_id??0,s=uc(t?.level??uu[n]?.level),o=i&&i!==n?uu[i]:void 0,a=o?uc(o.level):null,l=uu[n]?.interval??"month",u=s!==uo.Free,c=uf[s],h={daily:c.daily,monthly:c.monthly,dailyUsed:0,monthlyUsed:0,extra:0,extraUsed:0},d={},f=new Set,p={},m=new Set,g={};for(let e of r){if(!e||"number"!=typeof e.item_id)continue;d[e.item_id]=e;let t=uh[e.item_id];t&&(f.add(t),p[e.item_id]=e.end_time);let r=ud[e.item_id];r&&(m.add(r),g[e.item_id]=e.end_time)}return{base:{tier:s,interval:l,isSubscribed:u,endTime:t?.end_time??null,nextBillingTime:t?.next_billing_time??null,nextTier:a,credit:h},copytrade:{packages:Array.from(f),endTimes:p},signals:{packages:Array.from(m),endTimes:g},addonsByPlanId:d,raw:{subscriptionInfo:t??null,addonList:r}}}let um="asset_preference";function ug(e){return"stock"===e||"crypto"===e||"mixed"===e?e:"unset"}(0,ra.create)(e=>({preference:"unset",loaded:!1,init:async()=>{try{let t=await iF([um]);0===t.ret&&e({preference:ug(t.data?.[um]),loaded:!0})}catch{}},setAssetPreference:async t=>{try{let r=await iB({[um]:t});if(0===r.ret)return e({preference:t,loaded:!0}),!0;return!1}catch{return!1}},clear:()=>e({preference:"unset",loaded:!1})}));var uv=ra,uy=ef;function ub(e){return(0,uy.post)("/v1/prediction/trade/builder-code",{},!0,{},e)}let uw={get url(){return`file://${e.P("packages/shared/src/wallet/polymarketLog.ts")}`}},ux="production"!==(uw.env?.VITE_MODE??"development");function uS(e,t,r,n){if(!ux&&"info"===e)return;let i=`[Polymarket:${t}]`,s="error"===e?console.error:"warn"===e?console.warn:console.log;void 0===n?s(i,r):s(i,r,n)}function u_(e){return{info:(t,r)=>uS("info",e,t,r),warn:(t,r)=>uS("warn",e,t,r),error:(t,r)=>uS("error",e,t,r)}}let uM={auth:u_("Auth"),order:u_("Order"),ws:u_("WS"),geo:u_("Geo"),builder:u_("Builder"),deposit:u_("Deposit"),recovery:u_("Recovery"),safe:u_("Safe"),store:u_("Store"),bootstrap:u_("Bootstrap")},uO="0x0000000000000000000000000000000000000000000000000000000000000000";(0,uv.create)((e,t)=>({builderCode:"",builderMakerFeeBps:0,builderTakerFeeBps:0,fetched:!1,failed:!1,async fetch(){if(t().fetched)return void uM.builder.info("skip refetch (already fetched)",{code:t().builderCode||"<empty>",makerBps:t().builderMakerFeeBps,takerBps:t().builderTakerFeeBps});uM.builder.info("POST /v1/prediction/trade/builder-code");try{let t=await ub();if(t?.ret!==0||!t?.data){uM.builder.warn("builder code fetch failed (ret!==0 或 data 缺失;不写 fetched 以便重试)",{ret:t?.ret,msg:t?.msg}),e({failed:!0});return}let r=t.data.builder_code?.trim()??"",n=t.data.maker_fee_bps??0,i=t.data.taker_fee_bps??0;r?uM.builder.info("builder code + fees loaded",{code:r,makerBps:n,takerBps:i}):uM.builder.warn("builder code empty (PM_BUILDER_CODE not set on backend)"),e({builderCode:r,builderMakerFeeBps:n,builderTakerFeeBps:i,fetched:!0,failed:!1})}catch(t){uM.builder.error("builder code fetch threw (不写 fetched 以便重试)",t),e({failed:!0})}},getBuilderBytes32(){let e=t().builderCode;return e&&""!==e?e:uO}}));var uE=ra;let uP=()=>({base:{tier:uo.Free,interval:"month",isSubscribed:!1,endTime:null,nextBillingTime:null,nextTier:null,credit:{daily:0,monthly:0,dailyUsed:0,monthlyUsed:0,extra:0,extraUsed:0}},copytrade:{packages:[],endTimes:{}},signals:{packages:[],endTimes:{}},addonsByPlanId:{},raw:{subscriptionInfo:null,addonList:[]}}),uk={...uP(),loaded:!1,setFromQuota:()=>{},clear:()=>{}};(0,uE.create)(e=>({...uk,setFromQuota:t=>e(e=>({...e,...up(t),loaded:!0})),clear:()=>e({...uP(),loaded:!1})}));let uA={experience:"beginner",assets:[],intents:[],layout:null,submitting:!1,inFlight:null};(0,ra.create)((e,t)=>({...uA,setExperience:t=>e({experience:t}),toggleAsset:t=>e(e=>({assets:e.assets.includes(t)?e.assets.filter(e=>e!==t):[...e.assets,t]})),toggleIntent:t=>e(e=>({intents:e.intents.includes(t)?e.intents.filter(e=>e!==t):[...e.intents,t]})),canSubmit:()=>{let e=t();return""!==e.experience&&e.assets.length>0&&e.intents.length>0},submit:()=>{let{experience:r,assets:n,intents:i,inFlight:s}=t();if(s)return s;if(!t().canSubmit())return Promise.resolve(null);e({submitting:!0});let o=rf(r,n,i).then(t=>(e({layout:t,submitting:!1}),t&&sh(),t)).finally(()=>e({inFlight:null}));return e({inFlight:o}),o},reset:()=>e({...uA})}));let uj="portfolio-source:";
1function uC(e){return e?uj+e:null}function uN(e){let t=uC(e);if(!t)return null;try{let e=window.localStorage.getItem(t);if(!e)return null;let r=JSON.parse(e),n=["snaptrade","hyperliquid","polymarket","kucoin","kraken"];if(!r?.type||!n.includes(r.type)||"string"!=typeof r.id||0===r.id.length)return null;return{type:r.type,id:r.id}}catch{return null}}function uT(e,t){let r=uC(e);if(r)try{null==t?window.localStorage.removeItem(r):window.localStorage.setItem(r,JSON.stringify(t))}catch{}}(0,ra.create)(e=>({selected:null,setSelected:t=>{uT(rx.getState().userId,t),e({selected:t})},hydrateFromStorage:t=>{let r=rx.getState().userId,n=uN(r);return!!n&&(t&&!t(n)?(uT(r,null),!1):(e({selected:n}),!0))},clear:()=>e({selected:null})})),(0,ra.create)(e=>({open:!1,openSheet:()=>e({open:!0}),closeSheet:()=>e({open:!1})}));let uR={open:!1,initialPending:null};(0,ra.create)(e=>({...uR,openDialog:t=>{oz(),e({open:!0,initialPending:t?.initialPending??null})},closeDialog:()=>e({...uR})})),(0,ra.create)(e=>({open:!1,openDialog:()=>{oz(),e({open:!0})},closeDialog:()=>e({open:!1})}));let uI={open:!1};(0,ra.create)(e=>({...uI,openDialog:()=>{oz(),e({open:!0})},closeDialog:()=>e({...uI})}));let uD={open:!1,mode:"transfer-from-funding",initialStep:null,onClose:null,receiveWalletAddress:null};(0,ra.create)((e,t)=>({...uD,openDialog:t=>{(oz(),"number"==typeof t)?1===t?e({...uD,open:!0,mode:"external-receive"}):e({...uD,open:!0,mode:"transfer-from-funding",initialStep:t}):e({open:!0,mode:t?.mode??"transfer-from-funding",initialStep:t?.initialStep??null,onClose:t?.onClose??null,receiveWalletAddress:t?.receiveWalletAddress??null})},closeDialog:()=>{let r=t().onClose;e({...uD}),r?.()}})),(0,ra.create)(e=>({extraHeight:0,setExtraHeight:t=>e(e=>e.extraHeight===t?e:{extraHeight:t})}));let uL={addWalletOpen:!1,addWalletMode:null,depositOpen:!1,depositStep:null};(0,ra.create)(e=>({...uL,setAddWalletOpen:t=>e({addWalletOpen:t}),setAddWalletMode:t=>e({addWalletMode:t}),setDepositOpen:t=>e({depositOpen:t}),setDepositStep:t=>e({depositStep:t}),reset:()=>e({...uL})})),(0,ra.create)()(rM(e=>({sidebarOpen:!0,selectedMenuKey:"/",setSidebarOpen:t=>e({sidebarOpen:t}),toggleSidebar:()=>e(e=>({sidebarOpen:!e.sidebarOpen})),setSelectedMenuKey:t=>e({selectedMenuKey:t})}),{name:"agent-web-layout",partialize:e=>({sidebarOpen:e.sidebarOpen})}));let uV={liveSeason:null,liveEntries:[],liveMyStatus:null,liveLoading:!1,lastWeekSeason:null,lastWeekEntries:[],lastWeekMyStatus:null,lastWeekLoading:!1,rewardTiers:[]};function uz(e){if(!e)return null;try{let t=JSON.parse(e);if(t&&1===t.v&&"string"==typeof t.screen_id&&t.screener_type)return t;return null}catch{return null}}function uF(e){return e.session_id&&e.message_id?`${e.session_id}#${e.message_id}`:e.screen_id}(0,ra.create)((e,t)=>({...uV,fetchLive:async r=>{e({liveLoading:!0});try{let n=await l3({type:"live"},r);0===n.ret&&n.data&&e({liveSeason:n.data.season??null,liveEntries:n.data.entries??[],liveMyStatus:n.data.my_status??null,rewardTiers:n.data.reward_tiers??t().rewardTiers})}catch{}finally{e({liveLoading:!1})}},fetchLastWeek:async r=>{e({lastWeekLoading:!0});try{let n=await l3({type:"last_week"},r);0===n.ret&&n.data&&e({lastWeekSeason:n.data.season??null,lastWeekEntries:n.data.entries??[],lastWeekMyStatus:n.data.my_status??null,rewardTiers:n.data.reward_tiers??t().rewardTiers})}catch{}finally{e({lastWeekLoading:!1})}},claimReward:async(r,n)=>{try{let i=await l5({season_id:r},n);if(0===i.ret){let r=t().lastWeekMyStatus;return r&&e({lastWeekMyStatus:{...r,claimed:!0}}),!0}return!1}catch{return!1}}})),(0,ra.create)(e=>({open:!1,openDialog:()=>{oz(),e({open:!0})},closeDialog:()=>e({open:!1})})),(0,ra.create)(e=>({selectedTokenId:"",side:"BUY",drawerOpen:!1,trigger({tokenId:t,side:r}){uM.store.info("trigger trade entry",{tokenId:t,side:r}),e({selectedTokenId:t,side:r,drawerOpen:!0})},setSelectedTokenId(t){e({selectedTokenId:t})},setSide(t){e({side:t})},closeDrawer(){uM.store.info("drawer close"),e({drawerOpen:!1})},bookPrefill:{price:"",size:"",nonce:0},prefillFromBook({price:t,size:r,side:n,tokenId:i}){uM.store.info("prefillFromBook",{price:t,size:r,side:n,tokenId:i}),e(e=>({selectedTokenId:i,side:n,bookPrefill:{price:t,size:r,nonce:e.bookPrefill.nonce+1}}))},resetBookPrefill(){uM.store.info("resetBookPrefill"),e({bookPrefill:{price:"",size:"",nonce:0}})},prefillFromWhale({tokenId:t,side:r,price:n}){uM.store.info("prefillFromWhale",{tokenId:t,side:r,price:n}),e(e=>({selectedTokenId:t,side:r,bookPrefill:{price:n,size:"",nonce:e.bookPrefill.nonce+1}}))}}));let uB=200,u$=null;(0,ra.create)((e,t)=>({items:[],loaded:!1,favIdByScreenId:{},favIdByRefKey:{},fetch:async(r=!1)=>!r&&t().loaded?t().items:u$||(u$=(async()=>{try{let t=await l6({page:1,page_size:uB});if(0!==t.ret)return null;let r=t.data?.list??[],n={};for(let e of r){let t=uz(e.content);t&&(n[uF(t)]=String(e.id))}return e({items:r,loaded:!0,favIdByRefKey:n}),r}catch(e){return console.error("[useScreenerFavoriteStore] fetch failed:",e),null}finally{u$=null}})()),isFavorited:e=>
1e in t().favIdByScreenId,findFavoriteId:e=>t().favIdByRefKey[e],clear:()=>{u$=null,e({items:[],loaded:!1,favIdByScreenId:{},favIdByRefKey:{}})}}));let uU=15e3;(0,ra.create)(e=>({cooldownUntil:null,activeQuestId:null,startCooldown:t=>e({cooldownUntil:Date.now()+uU,activeQuestId:t})}));let uW={isSubscribed:!1,planId:null,expiresAt:null};(0,ra.create)(e=>({...uW,setSubscription:t=>e(e=>({...e,...t})),clearSubscription:()=>e(uW)}));let uH={isStreaming:!1,latestAssistantMessageId:null};(0,ra.create)(e=>({...uH,setIsStreaming:t=>e({isStreaming:t}),setLatestAssistantMessageId:t=>e({latestAssistantMessageId:t}),reset:()=>e({...uH})})),(0,ra.create)(e=>({selectedRow:null,rightView:"entry",chatPrompt:null,chatPromptVersion:0,kind:"trading",initialDetailTab:null,reviewTargetChatId:null,reviewTargetText:null,setInitialDetailTab:t=>e({initialDetailTab:t}),setReviewTargetChatId:t=>e({reviewTargetChatId:t}),selectRow:t=>e({selectedRow:t,rightView:t?"detail":"entry",reviewTargetChatId:null,reviewTargetText:null}),openChat:t=>e(e=>({rightView:"chat",chatPrompt:t??null,chatPromptVersion:e.chatPromptVersion+1,reviewTargetChatId:null,reviewTargetText:null})),openChatForReview:(t,r)=>e(e=>({rightView:"chat",chatPrompt:null,chatPromptVersion:e.chatPromptVersion+1,reviewTargetChatId:t,reviewTargetText:r??null})),backToDetail:()=>e({rightView:"detail",chatPrompt:null,reviewTargetChatId:null,reviewTargetText:null}),backToEntry:()=>e({rightView:"entry",selectedRow:null,chatPrompt:null,reviewTargetChatId:null,reviewTargetText:null}),setKind:t=>e({kind:t}),reset:()=>e({selectedRow:null,rightView:"entry",chatPrompt:null,chatPromptVersion:0,kind:"trading",initialDetailTab:null,reviewTargetChatId:null,reviewTargetText:null})})),(0,ra.create)(e=>({open:!1,ticker:null,symbolType:null,locale:null,openTradeModal:(t,r,n)=>e({open:!0,ticker:t,symbolType:r??null,locale:n??null}),closeTradeModal:()=>e({open:!1,ticker:null,symbolType:null,locale:null})})),(0,ra.create)()(rM(e=>({venue:"hyperliquid",setVenue:t=>e({venue:t})}),{name:"alphio-trading-venue",version:1})),(0,ra.create)()(rM(e=>({accountId:null,setAccountId:t=>e({accountId:t})}),{name:"alphio-view-account",version:1}));var uK=ra,uY=ef;let uq="/v1/finbot/extract-instrument-tokens",uG=(e,t)=>(0,uY.post)(uq,{images:e},!0,{},t);var uJ=eS,uX=function(e){return e[e.Resolved=0]="Resolved",e[e.Ambiguous=1]="Ambiguous",e[e.NotFound=2]="NotFound",e[e.Unavailable=3]="Unavailable",e}({});let uQ=50,uZ=50;function u0(e,t){if(0===e.length)return[];if(t<=0)return[e];let r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function u1(e,t=uQ){return u0(e,t)}function u2(e,t=uZ){return u0(e,t)}function u3(e,t){return Math.max(0,t-e)}function u5(e,t,r){return Object.values(e).filter(e=>!t.some(t=>aG(t,e))&&!r.some(t=>aG(t,e)))}function u4(e,t){let r=[],n=[],i=[],s=[],o=[];for(let a of e)switch(a.status){case uX.Resolved:{let e=a.candidates?.[0]?.ref;e&&t.some(t=>aG(t,e))?o.push(a):r.push(a);break}case uX.Ambiguous:n.push(a);break;case uX.Unavailable:s.push(a);break;default:i.push(a)}return{ready:r,ambiguous:n,unknown:i,unavailable:s,alreadyIn:o}}let u8=null;function u6(){u8?.cancel();let e=(0,uJ.createCancelToken)();return u8=e,e}function u7(e){u8===e&&(u8=null)}function u9(e){return null!==u8&&u8!==e}let ce={step:"input",input:{method:"paste",pasteText:"",csvFileName:null,csvTokens:[],images:[]},results:[],ready:[],ambiguous:[],unknown:[],unavailable:[],alreadyIn:[],resolveFailure:null,selections:{},maxItems:100,submitting:!1,submitFailed:!1,submitErrorMsg:"",quotaBlocked:!1,invalidRefs:[],addedRefs:[],addedCount:0};(0,uK.create)((e,t)=>{let r=async(e,r,n)=>{try{let i=await a8.getState().fetchWatchlistV2();if(r.isCancelled())return void n({step:"input"});if(null===i)return void n({step:"input",resolveFailure:{stage:"watchlist",msg:""}});let s=i.map(e=>e.ref),o=[];for(let t of u2(e)){let e=await aq({tokens:t},r);if(0===e.ret){o.push(...e.data?.results??[]);continue}if(r.isCancelled())return void n({step:"input"});n({step:"input",resolveFailure:{stage:"resolve",msg:e.msg??""}});return}let a=u4(o,s),l=u3(s.length,t().maxItems),u={};for(let e of a.ready){if(Object.keys(u).length>=l)break;let t=e.candidates?.[0]?.ref;t&&(u[e.raw]=t)}n({step:"confirm",results:o,...a,selections:u,resolveFailure:null})}catch(e){if((0,uJ.isRequestAborted)(r,e))return void n({step:"input"});console.error("[useWatchlistImportStore] resolve failed:",e),n({step:"input",resolveFailure:{stage:"resolve",msg:""}})}finally{u7(r)}},n=t=>r=>{u9(t)||e(r)};return{...ce,setInput:t=>{e(e=>({input:{...e.input,...t}}))},resolve:async t=>{let i=u6(),s=n(i);e({step:"resolving",resolveFailure:null}),await r(t,i,s)},resolveFromImages:async t=>{let i,s=u6(),o=n(s);e({step:"resolving",resolveFailure:null});try{let e=t.map(e=>({name:e.name,file_type:e.fileType,data:e.base64})),r=await uG(e,s);if(s.isCancelled()){o({step:"input"}),u7(s);return}if(0!==r.ret){o({step:"input",resolveFailure:{stage:"extract",msg:r.msg??""}}),u7(s);return}i=(r.data?.tokens??[]).map(e=>({raw:(e.raw??"").trim(),hint_exchange:e.hint_exchange})).filter(e=>""!==e.raw)}catch(e){(0,uJ.isRequestAborted)(s,e)?o({step:"input"}):(console.error("[useWatchlistImportStore] extractInstrumentTokens failed:",e),o({step:"input",resolveFailure:{stage:"extract",msg:""}})),u7(s);return}if(0===i.length){o({step:"input",resolveFailure:{stage:"extract-empty",msg:""}}),u7(s);return}await r(i,s,o)},selectCandidate:(t,r)=>
1{e(e=>({selections:{...e.selections,[t]:r},quotaBlocked:!1}))},deselect:t=>{e(e=>{let r={...e.selections};return delete r[t],{selections:r,quotaBlocked:!1}})},submit:async()=>{let{selections:r,addedRefs:n,invalidRefs:i,maxItems:s}=t(),o=u5(r,n,i);if(0===o.length)return;let a=u3(a8.getState().items.length,s);if(o.length>a)return void e({quotaBlocked:!0,submitting:!1});let l=u6(),u=t=>{u9(l)||e(t)};e({step:"submitting",submitting:!0,submitFailed:!1,submitErrorMsg:"",quotaBlocked:!1});let c=u1(o),h=[...n],d=[...i],f=t().addedCount,p=0,m=!1,g="",v=!1;for(let e of c)try{let t=await o0(e,!0,l);if(0===t.ret){let r=t.data?.invalid_refs??[],n=t.data?.added_refs?.length?t.data.added_refs:e.filter(e=>!r.some(t=>aG(t,e)));h.push(...n),d.push(...r),f+=n.length,p+=n.length;continue}if(l.isCancelled()){v=!0;break}m=!0,g=t.msg??"";break}catch(e){if((0,uJ.isRequestAborted)(l,e)){v=!0;break}console.error("[useWatchlistImportStore] submit batch failed:",e),m=!0;break}u((p>0&&await a8.getState().fetchWatchlistV2(!0),u7(l),v)?{submitting:!1,step:"confirm",addedRefs:h,invalidRefs:d,addedCount:f}:{step:"done",submitting:!1,submitFailed:m,submitErrorMsg:g,invalidRefs:d,addedRefs:h,addedCount:f})},cancelPending:()=>{u8?.cancel(),u8=null},reset:()=>{u8?.cancel(),u8=null,e(ce)}}}),function(e){e[e.All=0]="All",e[e.Level1=1]="Level1",e[e.Level2=2]="Level2",e[e.Level3=3]="Level3"}({}),(({get url(){return`file://${e.P("packages/shared/src/wallet/polymarketOnramp.ts")}`}}).env??{}).VITE_POLYMARKET_CHAIN_ID;let ct={get url(){return`file://${e.P("packages/shared/src/wallet/useDepositWalletBootstrap.ts")}`}};function cr(e){if("u"<typeof window)return;let t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}function cn(){let e=new Set,t=[],r=()=>cr(r=>{t.some(({info:e})=>e.uuid===r.info.uuid)||(t=[...t,r],e.forEach(e=>e(t,{added:[r]})))}),n=r();return{_listeners:()=>e,clear(){e.forEach(e=>e([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),n?.()},findProvider:({rdns:e})=>t.find(t=>t.info.rdns===e),getProviders:()=>t,reset(){this.clear(),n?.(),n=r()},subscribe:(r,{emitImmediately:n}={})=>(e.add(r),n&&r(t,{added:t}),()=>e.delete(r))}}function ci(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}ct.env?.VITE_POLYMARKET_CHAIN_ID;let cs=256,co=256;function ca(e=11){if(!c||co+e>2*cs){c="",co=0;for(let e=0;e<cs;e++)c+=(256+256*Math.random()|0).toString(16).substring(1)}return c.substring(co,co+++e)}function cl(e){let{batch:t,chain:r,ccipRead:n,dataSuffix:i,key:s="base",name:o="Base Client",type:a="base"}=e,l=e.experimental_blockTag??("number"==typeof r?.experimental_preconfirmationTime?"pending":void 0),u=Math.min(Math.max(Math.floor((r?.blockTime??12e3)/2),500),4e3),c=e.pollingInterval??u,h=e.cacheTime??c,d=e.account?ci(e.account):void 0,{config:f,request:p,value:m}=e.transport({account:d,chain:r,pollingInterval:c}),g={account:d,batch:t,cacheTime:h,ccipRead:n,chain:r,dataSuffix:i,key:s,name:o,pollingInterval:c,request:p,transport:{...f,...m},type:a,uid:ca(),...l?{experimental_blockTag:l}:{}};function v(e){return t=>{let r=t(e);for(let e in g)delete r[e];let n={...e,...r};return Object.assign(n,{extend:v(n)})}}return Object.assign(g,{extend:v(g)})}let cu=e=>(t,r,n)=>{let i=n.subscribe;return n.subscribe=(e,t,r)=>{let s=e;if(t){let i=(null==r?void 0:r.equalityFn)||Object.is,o=e(n.getState());s=r=>{let n=e(r);if(!i(o,n)){let e=o;t(o=n,e)}},(null==r?void 0:r.fireImmediately)&&t(o,o)}return i(s)},e(t,r,n)};function cc(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let i=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),s=null!=(n=r.getItem(e))?n:null;return s instanceof Promise?s.then(i):i(s)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}let ch=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>ch(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>ch(t)(e)}}},cd=(e,t)=>(r,n,i)=>{let s,o={storage:cc(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>
1({...t,...e}),...t},a=!1,l=new Set,u=new Set,c=o.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...e)},n,i);let h=()=>{let e=o.partialize({...n()});return c.setItem(o.name,{state:e,version:o.version})},d=i.setState;i.setState=(e,t)=>{d(e,t),h()};let f=e((...e)=>{r(...e),h()},n,i);i.getInitialState=()=>f;let p=()=>{var e,t;if(!c)return;a=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:f)});let i=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,null!=(e=n())?e:f))||void 0;return ch(c.getItem.bind(c))(o.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===o.version)return[!1,e.state];else{if(o.migrate)return[!0,o.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[i,a]=e;if(r(s=o.merge(a,null!=(t=n())?t:f),!0),i)return h()}).then(()=>{null==i||i(s,void 0),s=n(),a=!0,u.forEach(e=>e(s))}).catch(e=>{null==i||i(void 0,e)})};return i.persist={setOptions:e=>{o={...o,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>p(),hasHydrated:()=>a,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},o.skipHydration||p(),s||f},cf=e=>{let t,r=new Set,n=(e,n)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=n?n:"object"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,s={setState:n,getState:i,getInitialState:()=>o,subscribe:e=>(r.add(e),()=>r.delete(e))},o=t=e(n,i,s);return s},cp=e=>e?cf(e):cf,cm="2.47.4",cg={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${cm}`};class cv extends Error{constructor(e,t={}){const r=t.cause instanceof cv?t.cause.details:t.cause?.message?t.cause.message:t.details,n=t.cause instanceof cv&&t.cause.docsPath||t.docsPath,i=cg.getDocsUrl?.({...t,docsPath:n});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...r?[`Details: ${r}`]:[],...cg.version?[`Version: ${cg.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=n,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=cm}walk(e){return cy(this,e)}}function cy(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e&&void 0!==e.cause?cy(e.cause,t):t?null:e}class cb extends cv{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}function cw(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}class cx extends cv{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function cS(e,{dir:t,size:r=32}={}){return"string"==typeof e?c_(e,{dir:t,size:r}):cM(e,{dir:t,size:r})}function c_(e,{dir:t,size:r=32}={}){if(null===r)return e;let n=e.replace("0x","");if(n.length>2*r)throw new cx({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n["right"===t?"padEnd":"padStart"](2*r,"0")}`}function cM(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new cx({size:e.length,targetSize:r,type:"bytes"});let n=new Uint8Array(r);for(let i=0;i<r;i++){let s="right"===t;n[s?i:r-i-1]=e[s?i:e.length-i-1]}return n}class cO extends cv{constructor({max:e,min:t,signed:r,size:n,value:i}
1){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class cE extends cv{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function cP(e){return cw(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function ck(e,{size:t}){if(cP(e)>t)throw new cE({givenSize:cP(e),maxSize:t})}let cA=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function cj(e,t={}){return"number"==typeof e||"bigint"==typeof e?cT(e,t):"string"==typeof e?cI(e,t):"boolean"==typeof e?cC(e,t):cN(e,t)}function cC(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?(ck(r,{size:t.size}),cS(r,{size:t.size})):r}function cN(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=cA[e[t]];let n=`0x${r}`;return"number"==typeof t.size?(ck(n,{size:t.size}),cS(n,{dir:"right",size:t.size})):n}function cT(e,t={}){let r,{signed:n,size:i}=t,s=BigInt(e);i?r=n?(1n<<8n*BigInt(i)-1n)-1n:2n**(8n*BigInt(i))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let o="bigint"==typeof r&&n?-r-1n:0;if(r&&s>r||s<o){let t="bigint"==typeof e?"n":"";throw new cO({max:r?`${r}${t}`:void 0,min:`${o}${t}`,signed:n,size:i,value:`${e}${t}`})}let a=`0x${(n&&s<0?(1n<<BigInt(8*i))+BigInt(s):s).toString(16)}`;return i?cS(a,{size:i}):a}let cR=new TextEncoder;function cI(e,t={}){return cN(cR.encode(e),t)}let cD=new TextEncoder;function cL(e,t={}){return"number"==typeof e||"bigint"==typeof e?cY(e,t):"boolean"==typeof e?cV(e,t):cw(e)?cK(e,t):cq(e,t)}function cV(e,t={}){let r=new Uint8Array(1);return(r[0]=Number(e),"number"==typeof t.size)?(ck(r,{size:t.size}),cS(r,{size:t.size})):r}let cz=48,cF=57,cB=65,c$=70,cU=97,cW=102;function cH(e){return e>=cz&&e<=cF?e-cz:e>=cB&&e<=c$?e-(cB-10):e>=cU&&e<=cW?e-(cU-10):void 0}function cK(e,t={}){let r=e;t.size&&(ck(r,{size:t.size}),r=cS(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);let i=n.length/2,s=new Uint8Array(i);for(let e=0,t=0;e<i;e++){let r=cH(n.charCodeAt(t++)),i=cH(n.charCodeAt(t++));if(void 0===r||void 0===i)throw new cv(`Invalid byte sequence ("${n[t-2]}${n[t-1]}" in "${n}").`);s[e]=16*r+i}return s}function cY(e,t){return cK(cT(e,t))}function cq(e,t={}){let r=cD.encode(e);return"number"==typeof t.size?(ck(r,{size:t.size}),cS(r,{dir:"right",size:t.size})):r}let cG=BigInt(0x100000000-1),cJ=BigInt(32);function cX(e,t=!1){return t?{h:Number(e&cG),l:Number(e>>cJ&cG)}:{h:0|Number(e>>cJ&cG),l:0|Number(e&cG)}}function cQ(e,t=!1){let r=e.length,n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){let{h:r,l:o}=cX(e[s],t);[n[s],i[s]]=[r,o]}return[n,i]}let cZ=(e,t,r)=>e<<r|t>>>32-r,c0=(e,t,r)=>t<<r|e>>>32-r,c1=(e,t,r)=>t<<r-32|e>>>64-r,c2=(e,t,r)=>e<<r-32|t>>>64-r;function c3(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function c5(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function c4(e,...t){if(!c3(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function c8(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function c6(e,t){c4(e);let r=t.outputLen;if(e.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}function c7(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function c9(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function he(e){return e<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255}function ht(e){for(let t=0;t<e.length;t++)e[t]=he(e[t]);return e}let hr=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0]?e=>e:ht;function hn(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function hi(e){return"string"==typeof e&&(e=hn(e)),c4(e),e}class hs{}function ho(e){let t=t=>e().update(hi(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}let ha=BigInt(0),hl=BigInt(1),hu=BigInt(2),hc=BigInt(7),hh=BigInt(256),hd=BigInt(113),hf=[],hp=[],hm=[];for(let e=0,t=hl,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],hf.push(2*(5*n+r)),hp.push((e+1)*(e+2)/2%64);let i=ha;for(let e=0;e<7;e++)(t=(t<<hl^(t>>hc)*hd)%hh)&hu&&(i^=hl<<(hl<<BigInt(e))-hl);hm.push(i)}let hg=cQ(hm,!0),hv=hg[0],hy=hg[1],hb=(e,t,r)=>r>32?c1(e,t,r):cZ(e,t,r),hw=(e,t,r)=>r>32?c2(e,t,r):c0(e,t,r);function hx(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,s=r[i],o=r[i+1],a=hb(s,o,1)^r[n],l=hw(s,o,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=l}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=hp[r],s=hb(t,i,n),o=hw(t,i,n),a=hf[r];t=e[a],i=e[a+1],e[a]=s,e[a+1]=o}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=hv[n],e[1]^=hy[n]}c9(r)}class hS extends hs{constructor(e,t,r,n=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=i,c5(r),!(0<e&&e<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=c7(this.state)}clone(){return this._cloneInto()}keccak(){hr(this.state32),hx(this.state32,this.rounds),hr(this.state32),this.posOut=0,this.pos=0}update(e){c8(this),c4(e=hi(e));let{blockLen:t,state:r}=this,n=e.length;for(let i=0;i<n;){let s=Math.min(t-this.pos,n-i);for(let t=0;t<s;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){c8(this,!1),c4(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let s=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return c5(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(c6(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,c9(this.state)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:s}=this;return e||(e=new hS(t,r,n,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}let h_=((e,t,r)=>ho(()=>new hS(t,e,r)))(1,136,32);function hM(e,t){let r=t||"hex",n=h_(cw(e,{strict:!1})?cL(e):e);return"bytes"===r?n:cj(n)}class hO extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}let hE=/^0x[a-fA-F0-9]{40}$/,hP=new hO(8192);function hk(e,t){let{strict:r=!0}=t??{},n=`${e}.${r}`;if(hP.has(n))return hP.get(n);let i=!!hE.test(e)&&(e.toLowerCase()===e||!r||hj(e)===e);return hP.set(n,i),i}let hA=new hO(8192);function hj(e,t){if(hA.has(`${e}.${t}`))return hA.get(`${e}.${t}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=hM(cq(r),"bytes"),i=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(15&n[e>>1])>
1=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());let s=`0x${i.join("")}`;return hA.set(`${e}.${t}`,s),s}function hC(e,t){if(!hk(e,{strict:!1}))throw new cb({address:e});return hj(e,t)}let hN=(e,t,r)=>JSON.stringify(e,(e,r)=>{let n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n},r),hT=e=>e;class hR extends cv{constructor({body:e,cause:t,details:r,headers:n,status:i,url:s}){super("HTTP request failed.",{cause:t,details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${hT(s)}`,e&&`Request body: ${hN(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=i,this.url=s}}class hI extends cv{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${hT(r)}`,`Request body: ${hN(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.data=t.data,this.url=r}}class hD extends cv{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${hT(t)}`,`Request body: ${hN(e)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=t}}let hL=-1;class hV extends cv{constructor(e,{code:t,docsPath:r,metaMessages:n,name:i,shortMessage:s}){super(s,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages,name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i||e.name,this.code=e instanceof hI?e.code:t??hL}}class hz extends hV{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class hF extends hV{constructor(e){super(e,{code:hF.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(hF,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class hB extends hV{constructor(e){super(e,{code:hB.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(hB,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class h$ extends hV{constructor(e,{method:t}={}){super(e,{code:h$.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}Object.defineProperty(h$,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class hU extends hV{constructor(e){super(e,{code:hU.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(hU,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class hW extends hV{constructor(e){super(e,{code:hW.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(hW,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class hH extends hV{constructor(e){super(e,{code:hH.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(hH,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class hK extends hV{constructor(e){super(e,{code:hK.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(hK,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class hY extends hV{constructor(e){super(e,{code:hY.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(hY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class hq extends hV{constructor(e){super(e,{code:hq.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(hq,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class hG extends hV{constructor(e,{method:t}={}){super(e,{code:hG.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not supported.`})}}Object.defineProperty(hG,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class hJ extends hV{constructor(e){super(e,{code:hJ.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(hJ,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class hX extends hV{constructor(e){super(e,{code:hX.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(hX,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class hQ extends hz{constructor(e){super(e,{code:hQ.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(hQ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class hZ extends hz{constructor(e){super(e,{code:hZ.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(hZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class h0 extends hz{constructor(e,{method:t}={}){super(e,{code:h0.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}Object.defineProperty(h0,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class h1 extends hz{constructor(e){super(e,{code:h1.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(h1,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class h2 extends hz{constructor(e){super(e,{code:h2.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(h2,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class h3 extends hz{constructor(e){super(e,{code:h3.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(h3,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class h5 extends hz{constructor(e){super(e,{code:h5.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(h5,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class h4 extends hz{constructor(e){super(e,{code:h4.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(h4,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class h8 extends hz{constructor(e){super(e,{code:h8.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(h8,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});
1class h6 extends hz{constructor(e){super(e,{code:h6.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(h6,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class h7 extends hz{constructor(e){super(e,{code:h7.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(h7,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class h9 extends hz{constructor(e){super(e,{code:h9.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(h9,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class de extends hz{constructor(e){super(e,{code:de.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(de,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class dt extends hz{constructor(e){super(e,{code:dt.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}Object.defineProperty(dt,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});class dr extends hV{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}async function dn(e){return new Promise(t=>setTimeout(t,e))}function di(e,{delay:t=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((i,s)=>{let o=async({count:a=0}={})=>{let l=async({error:e})=>{let r="function"==typeof t?t({count:a,error:e}):t;r&&await dn(r),o({count:a+1})};try{let t=await e();i(t)}catch(e){if(a<r&&await n({count:a,error:e}))return l({error:e});s(e)}};o()})}function ds(e,{errorInstance:t=Error("timed out"),timeout:r,signal:n}){return new Promise((i,s)=>{(async()=>{let o;try{let a=new AbortController;r>0&&(o=setTimeout(()=>{n?a.abort():s(t)},r)),i(await e({signal:a?.signal||null}))}catch(e){e?.name==="AbortError"&&s(t),s(e)}finally{clearTimeout(o)}})()})}let da="2.22.1",dl=()=>`@wagmi/core@${da}`;var du=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class dc extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return dl()}constructor(e,t={}){super(),m.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const r=t.cause instanceof dc?t.cause.details:t.cause?.message?t.cause.message:t.details,n=t.cause instanceof dc&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...n?[`Docs: ${this.docsBaseUrl}${n}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=n,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return du(this,m,"m",g).call(this,this,e)}}m=new WeakSet,g=function e(t,r){return r?.(t)?t:t.cause?du(this,m,"m",e).call(this,t.cause,r):t};class dh extends dc{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class dd extends dc{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}function df(e){return e}function dp(e={}){let t,r,n,i,{shimDisconnect:s=!0,unstable_shimAsyncInject:o}=e;function a(){let t=e.target;if("function"==typeof t){let e=t();if(e)return e}return"object"==typeof t?t:"string"==typeof t?{...dm[t]??{id:t,name:`${t[0].toUpperCase()}${t.slice(1)}`,provider:`is${t[0].toUpperCase()}${t.slice(1)}`}}:{id:"injected",name:"Injected",provider:e=>e?.ethereum}}return df(l=>({get icon(){return a().icon},get id(){return a().id},get name(){return a().name},get supportsSimulation(){return!0},type:dp.type,async setup(){let r=await this.getProvider();r?.on&&e.target&&(n||(n=this.onConnect.bind(this),r.on("connect",n)),t||(t=this.onAccountsChanged.bind(this),r.on("accountsChanged",t)))},async connect({chainId:o,isReconnecting:a,withCapabilities:u}={}){let c=await this.getProvider();if(!c)throw new dd;let h=[];if(a)h=await this.getAccounts().catch(()=>[]);else if(s)try{let e=await c.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]});(h=e[0]?.caveats?.[0]?.value?.map(e=>hC(e))).length>0&&(h=await this.getAccounts())}catch(t){let e=t;if(e.code===hQ.code)throw new hQ(e);if(e.code===hY.code)throw e}try{h?.length||a||(h=(await c.request({method:"eth_requestAccounts"})).map(e=>hC(e))),n&&(c.removeListener("connect",n),n=void 0),t||(t=this.onAccountsChanged.bind(this),c.on("accountsChanged",t)),r||(r=this.onChainChanged.bind(this),c.on("chainChanged",r)),i||(i=this.onDisconnect.bind(this),c.on("disconnect",i));let d=await this.getChainId();if(o&&d!==o){let e=await this.switchChain({chainId:o}).catch(e=>{if(e.code===hQ.code)throw e;return{id:d}});d=e?.id??d}return s&&await l.storage?.removeItem(`${this.id}.disconnected`),e.target||await l.storage?.setItem("injected.connected",!0),{accounts:u?h.map(e=>({address:e,capabilities:{}})):h,chainId:d}}catch(t){let e=t;if(e.code===hQ.code)throw new hQ(e);if(e.code===hY.code)throw new hY(e);throw e}},async disconnect(){let t=await this.getProvider();if(!t)throw new dd;r&&(t.removeListener("chainChanged",r),r=void 0),i&&(t.removeListener("disconnect",i),i=void 0),n||(n=this.onConnect.bind(this),t.on("connect",n));try{await ds(()=>t.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}s&&await l.storage?.setItem(`${this.id}.disconnected`,!0),e.target||await l.storage?.removeItem("injected.connected")},async getAccounts(){let e=await this.getProvider();if(!e)throw new dd;return(await e.request({method:"eth_accounts"})).map(e=>hC(e))},async getChainId(){let e=await this.getProvider();if(!e)throw new dd;return Number(await e.request({method:"eth_chainId"}))},async getProvider(){let e;if("u"<typeof window)return;let t=a();return(e="function"==typeof t.provider?t.provider(window):"string"==typeof t.provider?dg(window,t.provider):t.provider)&&!e.removeListener&&("off"in e&&"function"==typeof e.off?e.removeListener=e.off:e.removeListener=()=>{}),e}
1,async isAuthorized(){try{if(s&&await l.storage?.getItem(`${this.id}.disconnected`)||!e.target&&!await l.storage?.getItem("injected.connected"))return!1;if(!await this.getProvider()){if(void 0!==o&&!1!==o){let e=async()=>("u">typeof window&&window.removeEventListener("ethereum#initialized",e),!!await this.getProvider()),t="number"==typeof o?o:1e3;if(await Promise.race([..."u">typeof window?[new Promise(t=>window.addEventListener("ethereum#initialized",()=>t(e()),{once:!0}))]:[],new Promise(r=>setTimeout(()=>r(e()),t))]))return!0}throw new dd}return!!(await di(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let r=await this.getProvider();if(!r)throw new dd;let n=l.chains.find(e=>e.id===t);if(!n)throw new h3(new dh);let i=new Promise(e=>{let r=n=>{"chainId"in n&&n.chainId===t&&(l.emitter.off("change",r),e())};l.emitter.on("change",r)});try{return await Promise.all([r.request({method:"wallet_switchEthereumChain",params:[{chainId:cT(t)}]}).then(async()=>{await this.getChainId()===t&&l.emitter.emit("change",{chainId:t})}),i]),n}catch(o){let s=o;if(4902===s.code||s?.data?.originalError?.code===4902)try{let s,o,{default:a,...u}=n.blockExplorers??{};e?.blockExplorerUrls?s=e.blockExplorerUrls:a&&(s=[a.url,...Object.values(u).map(e=>e.url)]),o=e?.rpcUrls?.length?e.rpcUrls:[n.rpcUrls.default?.http[0]??""];let c={blockExplorerUrls:s,chainId:cT(t),chainName:e?.chainName??n.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??n.nativeCurrency,rpcUrls:o};return await Promise.all([r.request({method:"wallet_addEthereumChain",params:[c]}).then(async()=>{if(await this.getChainId()===t)l.emitter.emit("change",{chainId:t});else throw new hQ(Error("User rejected switch after adding network."))}),i]),n}catch(e){throw new hQ(e)}if(s.code===hQ.code)throw new hQ(s);throw new h3(s)}},async onAccountsChanged(e){if(0===e.length)this.onDisconnect();else if(l.emitter.listenerCount("connect")){let e=(await this.getChainId()).toString();this.onConnect({chainId:e}),s&&await l.storage?.removeItem(`${this.id}.disconnected`)}else l.emitter.emit("change",{accounts:e.map(e=>hC(e))})},onChainChanged(e){let t=Number(e);l.emitter.emit("change",{chainId:t})},async onConnect(e){let s=await this.getAccounts();if(0===s.length)return;let o=Number(e.chainId);l.emitter.emit("connect",{accounts:s,chainId:o});let a=await this.getProvider();a&&(n&&(a.removeListener("connect",n),n=void 0),t||(t=this.onAccountsChanged.bind(this),a.on("accountsChanged",t)),r||(r=this.onChainChanged.bind(this),a.on("chainChanged",r)),i||(i=this.onDisconnect.bind(this),a.on("disconnect",i)))},async onDisconnect(e){let t=await this.getProvider();e&&1013===e.code&&t&&(await this.getAccounts()).length||(l.emitter.emit("disconnect"),t&&(r&&(t.removeListener("chainChanged",r),r=void 0),i&&(t.removeListener("disconnect",i),i=void 0),n||(n=this.onConnect.bind(this),t.on("connect",n))))}}))}dp.type="injected";let dm={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider:e=>e?.coinbaseWalletExtension?e.coinbaseWalletExtension:dg(e,"isCoinbaseWallet")},metaMask:{id:"metaMask",name:"MetaMask",provider:e=>dg(e,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;for(let t of["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"])if(e[t])return!1;return!0})},phantom:{id:"phantom",name:"Phantom",provider:e=>e?.phantom?.ethereum?e.phantom?.ethereum:dg(e,"isPhantom")}};function dg(e,t){function r(e){return"function"==typeof t?t(e):"string"!=typeof t||e[t]}let n=e.ethereum;return n?.providers?n.providers.find(e=>r(e)):n&&r(n)?n:void 0}var dv=e.i(153413);dv.default;var dy=dv;class db{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new dy.default})}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,...t){let r=t[0];this._emitter.emit(e,{uid:this.uid,...r})}listenerCount(e){return this._emitter.listenerCount(e)}}function dw(e){return new db(e)}function dx(e,t){return JSON.parse(e,(e,r)=>{let n=r;return n?.__type==="bigint"&&(n=BigInt(n.value)),n?.__type==="Map"&&(n=new Map(n.value)),t?.(e,n)??n})}function dS(e,t){return e.slice(0,t).join(".")||"."}function d_(e,t){let{length:r}=e;for(let n=0;n<r;++n)if(e[n]===t)return n+1;return 0}function dM(e,t){let r="function"==typeof e,n="function"==typeof t,i=[],s=[];return function(o,a){if("object"==typeof a)if(i.length){let e=d_(i,this);0===e?i[i.length]=this:(i.splice(e),s.splice(e)),s[s.length]=o;let r=d_(i,a);if(0!==r)return n?t.call(this,o,a,dS(s,r)):`[ref=${dS(s,r)}]`}else i[0]=a,s[0]=o;return r?e.call(this,o,a):a}}function dO(e,t,r,n){return JSON.stringify(e,dM((e,r)=>{let n=r;return"bigint"==typeof n&&(n={__type:"bigint",value:r.toString()}),n instanceof Map&&(n={__type:"Map",value:Array.from(r.entries())}),t?.(e,n)??n},n),r??void 0)}function dE(e){let{deserialize:t=dx,key:r="wagmi",serialize:n=dO,storage:i=dP}=e;function s(e){return e instanceof Promise?e.then(e=>e).catch(()=>null):e}return{...i,key:r,async getItem(e,n){let o=i.getItem(`${r}.${e}`),a=await s(o);return a?t(a)??null:n??null},async setItem(e,t){let o=`${r}.${e}`;null===t?await s(i.removeItem(o)):await s(i.setItem(o,n(t)))},async removeItem(e){await s(i.removeItem(`${r}.${e}`))}}}let dP={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function dk(){let e="u">typeof window&&window.localStorage?window.localStorage:dP;return{getItem:t=>e.getItem(t),removeItem(t){e.removeItem(t)},setItem(t,r){try{e.setItem(t,r)}catch{}}}}let dA=256,dj=256;function dC(e=11){if(!h||dj+e>2*dA){h="",dj=0;for(let e=0;e<dA;e++)h+=(256+256*Math.random()|0).toString(16).substring(1)}return h.substring(dj,dj+++e)}function dN(e){let t,{multiInjectedProviderDiscovery:r=!0,storage:n=dE({storage:dk()}),syncConnectedChain:i=!0,ssr:s=!1,...o}=e,a="u">typeof window&&r?cn():void 0,l=cp(()=>o.chains),u=cp(()=>{let e=[],t=new Set;for(let r of o.connectors??[]){let n=c(r);if(e.push(n),!s&&n.rdns)for(let e of"string"==typeof n.rdns?[n.rdns]:n.rdns)t.add(e)}if(!s&&a)for(let r of a.getProviders())t.has(r.info.rdns)||e.push(c(h(r)));return e});function c(e){let t=dw(dC()),r={...e({emitter:t,chains:l.getState(),storage:n,transports:o.transports}),emitter:t,uid:t.uid};return t.on("connect",b),r.setup?.(),r}function h(e){let{info:t}=e,r=e.provider;return dp({target:{...t,id:t.rdns,provider:r}})}let d=new Map;function f(e={}){let t,r=e.chainId??g.getState().chainId,n=l.getState().find(e=>e.id===r);if(e.chainId&&!n)throw new dh;{let e=d.get(g.getState().chainId);if(e&&!n)return e;if(!n)throw new dh}{let e=d.get(r);if(e)return e}if(o.client)t=o.client({chain:n});else{let e=n.id,r=l.getState().map(e=>e.id),i={};for(let[t,n]of Object.entries(o))if("chains"!==t&&"client"!==t&&"connectors"!==t&&"transports"!==t)if("object"==typeof n)if(e in n)i[t]=n[e];else{if(r.some(e=>e in n))continue;i[t]=n}else i[t]=n;t=cl({...i,chain:n,batch:i.batch??{multicall:!0},transport:t=>o.transports[e]({...t,connectors:u})})}return d.set(r,t),t}function p(){return{chainId:l.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let m="0.0.0-canary-";t=da.startsWith(m)?Number.parseInt(da.replace(m,""),10):Number.parseInt(da.split(".")[0]??"0",10);let g=cp(cu(n?cd(p,{migrate(e,r){if(r===t)return e;let n=p(),i=v(e,n.chainId);return{...n,chainId:i}},name:"store",partialize:e=>({connections:{__type:"Map",value:Array.from(e.connections.entries()).map(([e,t])=>{let{id:r,name:n,type:i,uid:s}=t.connector,o={id:r,name:n,type:i,uid:s};return[e,{...t,connector:o}]})},chainId:e.chainId,current:e.current}),merge(e,t){"object"==typeof e&&e&&"status"in e&&delete e.status;let r=v(e,t.chainId);return{...t,...e,chainId:r}},skipHydration:s,storage:n,version:t}):p));function v(e,t){return e&&"object"==typeof e&&"chainId"in e&&"number"==typeof e.chainId&&l.getState().some(t=>t.id===e.chainId)?e.chainId:t}function y(e){g.setState(t=>{let r=t.connections.get(e.uid);return r?{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts??r.accounts,chainId:e.chainId??r.chainId,connector:r.connector})}:t})}function b(e){"connecting"!==g.getState().status&&"reconnecting"!==g.getState().status&&g.setState(t=>{let r=u.getState().find(t=>t.uid===e.uid);return r?(r.emitter.listenerCount("connect")&&r.emitter.off("connect",y),r.emitter.listenerCount("change")||r.emitter.on("change",y),r.emitter.listenerCount("disconnect")||r.emitter.on("disconnect",w),{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts,chainId:e.chainId,connector:r}),current:e.uid,status:"connected"}):t})}function w(e){g.setState(t=>{let r=t.connections.get(e.uid);if(r){let e=r.connector;e.emitter.listenerCount("change")&&r.connector.emitter.off("change",y),e.emitter.listenerCount("disconnect")&&r.connector.emitter.off("disconnect",w),e.emitter.listenerCount("connect")||r.connector.emitter.on("connect",b)}if(t.connections.delete(e.uid),0===t.connections.size)return{...t,connections:new Map,current:null,status:"disconnected"};let n=t.connections.values().next().value;return{...t,connections:new Map(t.connections),current:n.connector.uid}})}return g.setState(p()),i&&g.subscribe(({connections:e,current:t})=>t?e.get(t)?.chainId:void 0,e=>{if(l.getState().some(t=>t.id===e))return g.setState(t=>({...t,chainId:e??t.chainId}))}),a?.subscribe(e=>{let t=new Set,r=new Set;for(let e of u.getState())if(t.add(e.id),e.rdns)for(let t of"string"==typeof e.rdns?[e.rdns]:e.rdns)r.add(t);let i=[];for(let n of e){if(r.has(n.info.rdns))continue;let e=c(h(n));t.has(e.id)||i.push(e)}(!n||g.persist.hasHydrated())&&u.setState(e=>[...e,...i],!0)}),{get chains(){return l.getState()},get connectors(){return u.getState()},storage:n,getClient:f,get state(){return g.getState()},setState(e){let t;t="function"==typeof e?e(g.getState()):e;let r=p();"object"!=typeof t&&(t=r),Object.keys(r).some(e=>!(e in t))&&(t=r),g.setState(t,!0)},subscribe:(e,t,r)=>g.subscribe(e,t,r?{...r,fireImmediately:r.emitImmediately}:void 0),_internal:{mipd:a,async revalidate(){let e=g.getState(),t=e.connections,r=e.current;for(let[,e]of t){let n=e.connector;n.isAuthorized&&await n.isAuthorized()||(t.delete(n.uid),r===n.uid&&(r=null))}g.setState(e=>({...e,connections:t,current:r}))},store:g,ssr:!!s,syncConnectedChain:i,transports:o.transports,chains:{setState(e){let t="function"==typeof e?e(l.getState()):e;if(0!==t.length)return l.setState(t,!0)},subscribe:e=>l.subscribe(e)}
1,connectors:{providerDetailToConnector:h,setup:c,setState:e=>u.setState("function"==typeof e?e(u.getState()):e,!0),subscribe:e=>u.subscribe(e)},events:{change:y,connect:b,disconnect:w}}}}class dT extends cv{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function dR(){let e=()=>void 0,t=()=>void 0;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}let dI=new Map;function dD({fn:e,id:t,shouldSplitBatch:r,wait:n=0,sort:i}){let s=async()=>{let t=l();o();let r=t.map(({args:e})=>e);0!==r.length&&e(r).then(e=>{i&&Array.isArray(e)&&e.sort(i);for(let r=0;r<t.length;r++){let{resolve:n}=t[r];n?.([e[r],e])}}).catch(e=>{for(let r=0;r<t.length;r++){let{reject:n}=t[r];n?.(e)}})},o=()=>dI.delete(t),a=()=>l().map(({args:e})=>e),l=()=>dI.get(t)||[],u=e=>dI.set(t,[...l(),e]);return{flush:o,async schedule(e){let{promise:t,resolve:i,reject:o}=dR();return(r?.([...a(),e])&&s(),l().length>0)?u({args:e,resolve:i,reject:o}):(u({args:e,resolve:i,reject:o}),setTimeout(s,n)),t}}}let dL=function(){return{current:0,take(){return this.current++},reset(){this.current=0}}}();function dV(e,t={}){let{url:r,headers:n}=dz(e);return{async request(e){let{body:i,fetchFn:s=t.fetchFn??fetch,onRequest:o=t.onRequest,onResponse:a=t.onResponse,timeout:l=t.timeout??1e4}=e,u={...t.fetchOptions??{},...e.fetchOptions??{}},{headers:c,method:h,signal:d}=u;try{let e,t=await ds(async({signal:e})=>{let t={...u,body:Array.isArray(i)?hN(i.map(e=>({jsonrpc:"2.0",id:e.id??dL.take(),...e}))):hN({jsonrpc:"2.0",id:i.id??dL.take(),...i}),headers:{...n,"Content-Type":"application/json",...c},method:h||"POST",signal:d||(l>0?e:null)},a=new Request(r,t),f=await o?.(a,t)??{...t,url:r};return await s(f.url??r,f)},{errorInstance:new hD({body:i,url:r}),timeout:l,signal:!0});if(a&&await a(t),t.headers.get("Content-Type")?.startsWith("application/json"))e=await t.json();else{e=await t.text();try{e=JSON.parse(e||"{}")}catch(r){if(t.ok)throw r;e={error:e}}}if(!t.ok)throw new hR({body:i,details:hN(e.error)||t.statusText,headers:t.headers,status:t.status,url:r});return e}catch(e){if(e instanceof hR||e instanceof hD)throw e;throw new hR({body:i,cause:e,url:r})}}}}function dz(e){try{let t=new URL(e),r=(()=>{if(t.username){let e=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(e)}`}}}})();return{url:t.toString(),...r}}catch{return{url:e}}}let dF=new hO(8192);function dB(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(dF.get(r))return dF.get(r);let n=e().finally(()=>dF.delete(r));return dF.set(r,n),n}function d$(e,t={}){return async(r,n={})=>{let{dedupe:i=!1,methods:s,retryDelay:o=150,retryCount:a=3,uid:l}={...t,...n},{method:u}=r;if(s?.exclude?.includes(u)||s?.include&&!s.include.includes(u))throw new hG(Error("method not supported"),{method:u});let c=i?cI(`${l}.${hN(r)}`):void 0;return dB(()=>di(async()=>{try{return await e(r)}catch(t){let e=t;switch(e.code){case hF.code:throw new hF(e);case hB.code:throw new hB(e);case h$.code:throw new h$(e,{method:r.method});case hU.code:throw new hU(e);case hW.code:throw new hW(e);case hH.code:throw new hH(e);case hK.code:throw new hK(e);case hY.code:throw new hY(e);case hq.code:throw new hq(e);case hG.code:throw new hG(e,{method:r.method});case hJ.code:throw new hJ(e);case hX.code:throw new hX(e);case hQ.code:throw new hQ(e);case hZ.code:throw new hZ(e);case h0.code:throw new h0(e);case h1.code:throw new h1(e);case h2.code:throw new h2(e);case h3.code:throw new h3(e);case h5.code:throw new h5(e);case h4.code:throw new h4(e);case h8.code:throw new h8(e);case h6.code:throw new h6(e);case h7.code:throw new h7(e);case h9.code:throw new h9(e);case de.code:throw new de(e);case 5e3:throw new hQ(e);case dt.code:throw new dt(e);default:if(t instanceof cv)throw t;throw new dr(e)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof hR){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e,10)}return~~(1<<e)*o},retryCount:a,shouldRetry:({error:e})=>dU(e)}),{enabled:i,id:c})}}function dU(e){return"code"in e&&"number"==typeof e.code?-1===e.code||e.code===hJ.code||e.code===hW.code:!(e instanceof hR)||!e.status||403===e.status||408===e.status||413===e.status||429===e.status||500===e.status||502===e.status||503===e.status||504===e.status||!1}function dW({key:e,methods:t,name:r,request:n,retryCount:i=3,retryDelay:s=150,timeout:o,type:a},l){return{config:{key:e,methods:t,name:r,request:n,retryCount:i,retryDelay:s,timeout:o,type:a},request:d$(n,{methods:t,retryCount:i,retryDelay:s,uid:ca()}),value:l}}function dH(e,t={}){let{batch:r,fetchFn:n,fetchOptions:i,key:s="http",methods:o,name:a="HTTP JSON-RPC",onFetchRequest:l,onFetchResponse:u,retryDelay:c,raw:h}=t;return({chain:d,retryCount:f,timeout:p})=>{let{batchSize:m=1e3,wait:g=0}="object"==typeof r?r:{},v=t.retryCount??f,y=p??t.timeout??1e4,b=e||d?.rpcUrls.default.http[0];if(!b)throw new dT;let w=dV(b,{fetchFn:n,fetchOptions:i,onRequest:l,onResponse:u,timeout:y});return dW({key:s,methods:o,name:a,async request({method:e,params:t}){let n={method:e,params:t},{schedule:i}=dD({id:b,wait:g,shouldSplitBatch:e=>e.length>m,fn:e=>w.request({body:e}),sort:(e,t)=>e.id-t.id}),s=async e=>r?i(e):[await w.request({body:e})],[{error:o,result:a}]=await s(n);if(h)return{error:o,result:a};if(o)throw new hI({body:n,error:o,url:b});return a},retryCount:v,retryDelay:c,timeout:y,type:"http"},{fetchOptions:i,url:b})}}let dK=function(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};function r(e){return t=>{let n="function"==typeof t?t(e):t,i={...e,...n};return Object.assign(i,{extend:r(i)})}}return Object.assign(t,{extend:r(t)})}({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon.drpc.org"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x18938b0}}});dN({chains:[dK],transports:{[dK.id]:dH()},connectors:[],multiInjectedProviderDiscovery:!1});var dY=ed,dq=e.i(12129),dG=rJ,dJ=ex;let dX="https://intellectia-public-documents.s3.amazonaws.com",dQ="https://d159e3ysga2l0q.cloudfront.net",dZ="https://d5bp8bijhhba2.cloudfront.net",d0="https://d5bp8bijhhba2.cloudfront.net",d1="https://prod-intellectia-open-documents.s3.us-east-1.amazonaws.com";
1function d2(e){return e.naturalWidth>0&&e.naturalHeight>0&&e.complete&&e.naturalWidth<5e4&&e.naturalHeight<5e4&&e.naturalWidth/e.naturalHeight<100&&e.naturalHeight/e.naturalWidth<100}function d3({code:e,type:t="0",rounded:r=!0,className:n,logo:i,locale:s="US",name:o}){let[a,l]=(0,dJ.useState)(!0),[u,c]=(0,dJ.useState)(!1),h=(0,dJ.useRef)(null),d=(0,dJ.useRef)(""),f=(0,dJ.useRef)(""),p=(0,dJ.useRef)(null),m=(0,dJ.useMemo)(()=>{if(!e){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZ";return e[Math.floor(Math.random()*e.length)]}return null},[e]),g="2"===String(t)||"crypto"===t,v="1"===String(t)||"etf"===t,y=s?.toUpperCase()==="HK",b=t===nM.Forex||"forex"===t,w=e?.indexOf(".")>-1?e.slice(0,e.indexOf(".")):e,x=ao(e),S=x??w,_=`${dX}/image/icon/${S}_icon.jpeg`,M=`${dZ}/image/icon/${S}_icon.jpeg`,O=`${d1}/crypto/logos/${S}.png`,E=`${d0}/image/icon/${S}_icon.jpeg`,P=`${dQ}/image/letter-new/${m??o?.trim()?.slice(0,1)?.toUpperCase()??(x??e)?.slice(0,1)?.toUpperCase()??"A"}.png`,k=x?_:i?.trim()||(g?O:b?P:v?E:y?M:_),A=k?.trim()||P,j=e=>{e.currentTarget===h.current&&l(!1)},C=e=>{let t=e.currentTarget;t.src===d.current&&(f.current=t.src,l(d2(t)))};(0,dJ.useEffect)(()=>{c(!0)},[]),(0,dJ.useEffect)(()=>(l(!0),d.current=A,f.current!==A&&(f.current=""),p.current&&clearTimeout(p.current),u&&(p.current=setTimeout(()=>{let e=h.current;e&&e.src===d.current&&e.complete&&l(d2(e))},100)),()=>{p.current&&clearTimeout(p.current)}),[A,u]);let N=(0,dq.cn)("overflow-hidden",n??"w-8 h-8"),T=(0,dq.cn)("w-full h-full object-cover",r?"rounded-full":"rounded");return e?(0,dY.jsx)("div",{className:N,children:a?(0,dY.jsx)("img",{ref:h,className:T,src:A,onError:j,onLoad:C,alt:dG.i18n._(rX`${e} logo`)}):(0,dY.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,dY.jsx)("img",{className:T,src:P,alt:dG.i18n._(rX`${e} logo`)})})}):(0,dY.jsx)("div",{className:N,children:(0,dY.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,dY.jsx)("img",{className:T,src:P,alt:""})})})}var d5=rJ;function d4(e){var t=e.width,r=e.height;if(t<0)throw Error("Negative width is not allowed for Size");if(r<0)throw Error("Negative height is not allowed for Size");return{width:t,height:r}}function d8(e,t){return e.width===t.width&&e.height===t.height}var d6=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,r={next:e};return this._observers.push(r),{unsubscribe:function(){t._observers=t._observers.filter(function(e){return e!==r})}}},e.prototype._installResolutionListener=function(){if(null!==this._resolutionMediaQueryList)throw Error("Resolution listener is already installed");var e=this._window.devicePixelRatio;this._resolutionMediaQueryList=this._window.matchMedia("all and (resolution: ".concat(e,"dppx)")),this._resolutionMediaQueryList.addListener(this._resolutionListener)},e.prototype._uninstallResolutionListener=function(){null!==this._resolutionMediaQueryList&&(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 d7(e){return new d6(e)}var d9=function(){function e(e,t,r){var n;this._canvasElement=null,this._bitmapSizeChangedListeners=[],this._suggestedBitmapSize=null,this._suggestedBitmapSizeChangedListeners=[],this._devicePixelRatioObservable=null,this._canvasElementResizeObserver=null,this._canvasElement=e,this._canvasElementClientSize=d4({width:this._canvasElement.clientWidth,height:this._canvasElement.clientHeight}),this._transformBitmapSize=null!=t?t:function(e){return e},this._allowResizeObserver=null==(n=null==r?void 0:r.allowResizeObserver)||n,this._chooseAndInitObserver()}return e.prototype.dispose=function(){var e,t;if(null===this._canvasElement)throw Error("Object is disposed");null==(e=this._canvasElementResizeObserver)||e.disconnect(),this._canvasElementResizeObserver=null,null==(t=this._devicePixelRatioObservable)||t.dispose(),this._devicePixelRatioObservable=null,this._suggestedBitmapSizeChangedListeners.length=0,this._bitmapSizeChangedListeners.length=0,this._canvasElement=null},Object.defineProperty(e.prototype,"canvasElement",{get:function(){if(null===this._canvasElement)throw Error("Object is disposed");return this._canvasElement}
1,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 d4({width:this.canvasElement.width,height:this.canvasElement.height})},enumerable:!1,configurable:!0}),e.prototype.resizeCanvasElement=function(e){this._canvasElementClientSize=d4(e),this.canvasElement.style.width="".concat(this._canvasElementClientSize.width,"px"),this.canvasElement.style.height="".concat(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(null!==this._suggestedBitmapSize){var e=this._suggestedBitmapSize;this._suggestedBitmapSize=null,this._resizeBitmap(e),this._emitSuggestedBitmapSizeChanged(e,this._suggestedBitmapSize)}},e.prototype._resizeBitmap=function(e){var t=this.bitmapSize;d8(t,e)||(this.canvasElement.width=e.width,this.canvasElement.height=e.height,this._emitBitmapSizeChanged(t,e))},e.prototype._emitBitmapSizeChanged=function(e,t){var r=this;this._bitmapSizeChangedListeners.forEach(function(n){return n.call(r,e,t)})},e.prototype._suggestNewBitmapSize=function(e){var t=this._suggestedBitmapSize,r=d4(this._transformBitmapSize(e,this._canvasElementClientSize)),n=d8(this.bitmapSize,r)?null:r;null===t&&null===n||null!==t&&null!==n&&d8(t,n)||(this._suggestedBitmapSize=n,this._emitSuggestedBitmapSizeChanged(t,n))},e.prototype._emitSuggestedBitmapSizeChanged=function(e,t){var r=this;this._suggestedBitmapSizeChangedListeners.forEach(function(n){return n.call(r,e,t)})},e.prototype._chooseAndInitObserver=function(){var e=this;this._allowResizeObserver?fr().then(function(t){return t?e._initResizeObserver():e._initDevicePixelRatioObservable()}):this._initDevicePixelRatioObservable()},e.prototype._initDevicePixelRatioObservable=function(){var e=this;if(null!==this._canvasElement){var t=ft(this._canvasElement);if(null===t)throw Error("No window is associated with the canvas");this._devicePixelRatioObservable=d7(t),this._devicePixelRatioObservable.subscribe(function(){return e._invalidateBitmapSize()}),this._invalidateBitmapSize()}},e.prototype._invalidateBitmapSize=function(){if(null!==this._canvasElement){var e,t,r=ft(this._canvasElement);if(null!==r){var n=null!=(t=null==(e=this._devicePixelRatioObservable)?void 0:e.value)?t:r.devicePixelRatio,i=this._canvasElement.getClientRects(),s=void 0!==i[0]?fn(i[0],n):d4({width:this._canvasElementClientSize.width*n,height:this._canvasElementClientSize.height*n});this._suggestNewBitmapSize(s)}}},e.prototype._initResizeObserver=function(){var e=this;null!==this._canvasElement&&(this._canvasElementResizeObserver=new ResizeObserver(function(t){var r=t.find(function(t){return t.target===e._canvasElement});if(r&&r.devicePixelContentBoxSize&&r.devicePixelContentBoxSize[0]){var n=r.devicePixelContentBoxSize[0],i=d4({width:n.inlineSize,height:n.blockSize});e._suggestNewBitmapSize(i)}}),this._canvasElementResizeObserver.observe(this._canvasElement,{box:"device-pixel-content-box"}))},e}();function fe(e,t){if("device-pixel-content-box"===t.type)return new d9(e,t.transform,t.options);throw Error("Unsupported binding target")}function ft(e){return e.ownerDocument.defaultView}function fr(){return new Promise(function(e){var t=new ResizeObserver(function(r){e(r.every(function(e){return"devicePixelContentBoxSize"in e})),t.disconnect()});t.observe(document.body,{box:"device-pixel-content-box"})}).catch(function(){return!1})}function fn(e,t){return d4({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 fi=function(){function e(e,t,r){if(0===t.width||0===t.height)throw TypeError("Rendering target could only be created on a media with positive width and height");if(this._mediaSize=t,0===r.width||0===r.height)throw TypeError("Rendering target could only be created using a bitmap with positive integer width and height");this._bitmapSize=r,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})}
1finally{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 fs(e,t){var r=e.canvasElementClientSize;if(0===r.width||0===r.height)return null;var n=e.bitmapSize;if(0===n.width||0===n.height)return null;var i=e.canvasElement.getContext("2d",t);return null===i?null:new fi(i,r,n)}let fo={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}};function fa(e,t){let r={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(r)}function fl(e,t,r,n){e.beginPath();let i=e.lineWidth%2?.5:0;e.moveTo(r,t+i),e.lineTo(n,t+i),e.stroke()}function fu(e,t){if(!e)throw Error("Assertion failed"+(t?": "+t:""))}function fc(e){if(void 0===e)throw Error("Value is undefined");return e}function fh(e){if(null===e)throw Error("Value is null");return e}function fd(e){return fh(fc(e))}!function(e){e[e.Simple=0]="Simple",e[e.WithSteps=1]="WithSteps",e[e.Curved=2]="Curved"}(v||(v={})),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"}(y||(y={}));class ff{constructor(){this.t=[]}i(e,t,r){let n={h:e,l:t,o:!0===r};this.t.push(n)}_(e){let t=this.t.findIndex(t=>e===t.h);t>-1&&this.t.splice(t,1)}u(e){this.t=this.t.filter(t=>t.l!==e)}p(e,t,r){let n=[...this.t];this.t=this.t.filter(e=>
1!e.o),n.forEach(n=>n.h(e,t,r))}v(){return this.t.length>0}m(){this.t=[]}}function fp(e,...t){for(let r of t)for(let t in r)void 0!==r[t]&&Object.prototype.hasOwnProperty.call(r,t)&&!["__proto__","constructor","prototype"].includes(t)&&("object"!=typeof r[t]||void 0===e[t]||Array.isArray(r[t])?e[t]=r[t]:fp(e[t],r[t]));return e}function fm(e){return"number"==typeof e&&isFinite(e)}function fg(e){return"number"==typeof e&&e%1==0}function fv(e){return"string"==typeof e}function fy(e){return"boolean"==typeof e}function fb(e){let t,r,n,i=e;if(!i||"object"!=typeof i)return i;for(r in t=Array.isArray(i)?[]:{},i)i.hasOwnProperty(r)&&(n=i[r],t[r]=n&&"object"==typeof n?fb(n):n);return t}function fw(e){return null!==e}function fx(e){return null===e?void 0:e}let fS="-apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif";function f_(e,t,r){return void 0===t&&(t=fS),`${r=void 0!==r?`${r} `:""}${e}px ${t}`}class fM{constructor(e){this.M={S:1,C:5,k:NaN,P:"",T:"",R:"",D:"",I:0,V:0,B:0,A:0,L:0},this.O=e}N(){let e=this.M,t=this.F(),r=this.W();return e.k===t&&e.T===r||(e.k=t,e.T=r,e.P=f_(t,r),e.A=2.5/12*t,e.I=e.A,e.V=t/12*e.C,e.B=t/12*e.C,e.L=0),e.R=this.H(),e.D=this.U(),this.M}H(){return this.O.N().layout.textColor}U(){return this.O.$()}F(){return this.O.N().layout.fontSize}W(){return this.O.N().layout.fontFamily}}function fO(e){return e<0?0:e>255?255:Math.round(e)||0}function fE(e){return .199*e[0]+.687*e[1]+.114*e[2]}class fP{constructor(e,t){this.q=new Map,this.j=e,t&&(this.q=t)}Y(e,t){if("transparent"===e)return e;let r=this.K(e),n=r[3];return`rgba(${r[0]}, ${r[1]}, ${r[2]}, ${t*n})`}Z(e){let t=this.K(e);return{G:`rgb(${t[0]}, ${t[1]}, ${t[2]})`,X:fE(t)>160?"black":"white"}}J(e){return fE(this.K(e))}tt(e,t,r){var n;let[i,s,o,a]=this.K(e),[l,u,c,h]=this.K(t),d=[fO(i+r*(l-i)),fO(s+r*(u-s)),fO(o+r*(c-o)),(n=a+r*(h-a))<=0||n>1?Math.min(Math.max(n,0),1):Math.round(1e4*n)/1e4];return`rgba(${d[0]}, ${d[1]}, ${d[2]}, ${d[3]})`}K(e){let t=this.q.get(e);if(t)return t;let r=(function(e){let t=document.createElement("div");t.style.display="none",document.body.appendChild(t),t.style.color=e;let r=window.getComputedStyle(t).color;return document.body.removeChild(t),r})(e).match(/^rgba?\s*\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)$/);if(!r){if(this.j.length)for(let t of this.j){let r=t(e);if(r)return this.q.set(e,r),r}throw Error(`Failed to parse color: ${e}`)}let n=[parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),r[4]?parseFloat(r[4]):1];return this.q.set(e,n),n}}class fk{constructor(){this.it=[]}st(e){this.it=e}nt(e,t,r){this.it.forEach(n=>{n.nt(e,t,r)})}}class fA{nt(e,t,r){e.useBitmapCoordinateSpace(e=>this.et(e,t,r))}}class fj extends fA{constructor(){super(...arguments),this.rt=null}ht(e){this.rt=e}et({context:e,horizontalPixelRatio:t,verticalPixelRatio:r}){if(null===this.rt||null===this.rt.lt)return;let n=this.rt.lt,i=this.rt,s=Math.max(1,Math.floor(t))%2/2,o=o=>{e.beginPath();for(let a=n.to-1;a>=n.from;--a){let n=i.ot[a],l=Math.round(n._t*t)+s,u=n.ut*r,c=o*r+s;e.moveTo(l,u),e.arc(l,u,c,0,2*Math.PI)}e.fill()};i.ct>0&&(e.fillStyle=i.dt,o(i.ft+i.ct)),e.fillStyle=i.vt,o(i.ft)}}function fC(){return{ot:[{_t:0,ut:0,wt:0,gt:0}],vt:"",dt:"",ft:0,ct:0,lt:null}}let fN={from:0,to:1};class fT{constructor(e,t,r){this.Mt=new fk,this.bt=[],this.St=[],this.xt=!0,this.O=e,this.Ct=t,this.yt=r,this.Mt.st(this.bt)}kt(e){this.Pt(),this.xt=!0}Tt(){return this.xt&&(this.Rt(),this.xt=!1),this.Mt}Pt(){let e=this.yt.Dt();e.length!==this.bt.length&&(this.St=e.map(fC),this.bt=this.St.map(e=>{let t=new fj;return t.ht(e),t}),this.Mt.st(this.bt))}Rt(){let e=2===this.Ct.N().mode||!this.Ct.It(),t=this.yt.Vt(),r=this.Ct.Bt(),n=this.O.Et();this.Pt(),t.forEach((t,i)=>{let s=this.St[i],o=t.At(r),a=t.Lt();!e&&null!==o&&t.It()&&null!==a?(s.vt=o.zt,s.ft=o.ft,s.ct=o.Ot,s.ot[0].gt=o.gt,s.ot[0].ut=t.Ft().Nt(o.gt,a.Wt),s.dt=o.Ht??this.O.Ut(s.ot[0].ut/t.Ft().$t()),s.ot[0].wt=r,s.ot[0]._t=n.qt(r),s.lt=fN):s.lt=null})}}class fR extends fA{constructor(e){super(),this.jt=e}et({context:e,bitmapSize:t,horizontalPixelRatio:r,verticalPixelRatio:n}){if(null===this.jt)return;let i=this.jt.Yt.It,s=this.jt.Kt.It;if(!i&&!s)return;let o=Math.round(this.jt._t*r),a=Math.round(this.jt.ut*n);e.lineCap="butt",i&&o>=0&&(e.lineWidth=Math.floor(this.jt.Yt.ct*r),e.strokeStyle=this.jt.Yt.R,e.fillStyle=this.jt.Yt.R,fa(e,this.jt.Yt.Zt),function(e,t,r){e.beginPath();let n=e.lineWidth%2?.5:0;e.moveTo(t+n,0),e.lineTo(t+n,r),e.stroke()}(e,o,t.height)),s&&a>=0&&(e.lineWidth=Math.floor(this.jt.Kt.ct*n),e.strokeStyle=this.jt.Kt.R,e.fillStyle=this.jt.Kt.R,fa(e,this.jt.Kt.Zt),fl(e,a,0,t.width))}}class fI{constructor(e,t){this.xt=!0,this.Gt={Yt:{ct:1,Zt:0,R:"",It:!1},Kt:{ct:1,Zt:0,R:"",It:!1},_t:0,ut:0},this.Xt=new fR(this.Gt),this.Jt=e,this.yt=t}kt(){this.xt=!0}Tt(e){return this.xt&&(this.Rt(),this.xt=!1),this.Xt}Rt(){let e=this.Jt.It(),t=this.yt.Qt().N().crosshair,r=this.Gt;2===t.mode?(r.Kt.It=!1,r.Yt.It=!1):(r.Kt.It=e&&this.Jt.ti(this.yt),r.Yt.It=e&&this.Jt.ii(),r.Kt.ct=t.horzLine.width,r.Kt.Zt=t.horzLine.style,r.Kt.R=t.horzLine.color,r.Yt.ct=t.vertLine.width,r.Yt.Zt=t.vertLine.style,r.Yt.R=t.vertLine.color,r._t=this.Jt.si(),r.ut=this.Jt.ni())}}function fD(e,t,r,n,i,s){e.fillRect(t+s,r,n-2*s,s),e.fillRect(t+s,r+i-s,n-2*s,s),e.fillRect(t,r,s,i),e.fillRect(t+n-s,r,s,i)}function fL(e,t,r,n,i,s){e.save(),e.globalCompositeOperation="copy",e.fillStyle=s,e.fillRect(t,r,n,i),e.restore(
1)}function fV(e,t,r,n,i,s){e.beginPath(),e.roundRect?e.roundRect(t,r,n,i,s):(e.lineTo(t+n-s[1],r),0!==s[1]&&e.arcTo(t+n,r,t+n,r+s[1],s[1]),e.lineTo(t+n,r+i-s[2]),0!==s[2]&&e.arcTo(t+n,r+i,t+n-s[2],r+i,s[2]),e.lineTo(t+s[3],r+i),0!==s[3]&&e.arcTo(t,r+i,t,r+i-s[3],s[3]),e.lineTo(t,r+s[0]),0!==s[0]&&e.arcTo(t,r,t+s[0],r,s[0]))}function fz(e,t,r,n,i,s,o=0,a=[0,0,0,0],l=""){var u;if(e.save(),!o||!l||l===s)return fV(e,t,r,n,i,a),e.fillStyle=s,e.fill(),void e.restore();let c=o/2;fV(e,t+c,r+c,n-o,i-o,(u=-c,a.map(e=>0===e?e:e+u))),"transparent"!==s&&(e.fillStyle=s,e.fill()),"transparent"!==l&&(e.lineWidth=o,e.strokeStyle=l,e.closePath(),e.stroke()),e.restore()}function fF(e,t,r,n,i,s,o){e.save(),e.globalCompositeOperation="copy";let a=e.createLinearGradient(0,0,0,i);a.addColorStop(0,s),a.addColorStop(1,o),e.fillStyle=a,e.fillRect(t,r,n,i),e.restore()}class fB{constructor(e,t){this.ht(e,t)}ht(e,t){this.jt=e,this.ei=t}$t(e,t){return this.jt.It?e.k+e.A+e.I:0}nt(e,t,r,n){if(!this.jt.It||0===this.jt.ri.length)return;let i=this.jt.R,s=this.ei.G,o=e.useBitmapCoordinateSpace(e=>{let o=e.context;o.font=t.P;let a=this.hi(e,t,r,n),l=a.ai;return a.li?fz(o,l.oi,l._i,l.ui,l.ci,s,l.di,[l.ft,0,0,l.ft],s):fz(o,l.fi,l._i,l.ui,l.ci,s,l.di,[0,l.ft,l.ft,0],s),this.jt.pi&&(o.fillStyle=i,o.fillRect(l.fi,l.mi,l.wi-l.fi,l.gi)),this.jt.Mi&&(o.fillStyle=t.D,o.fillRect(a.li?l.bi-l.di:0,l._i,l.di,l.Si-l._i)),a});e.useMediaCoordinateSpace(({context:e})=>{let r=o.xi;e.font=t.P,e.textAlign=o.li?"right":"left",e.textBaseline="middle",e.fillStyle=i,e.fillText(this.jt.ri,r.Ci,(r._i+r.Si)/2+r.yi)})}hi(e,t,r,n){let i,s,o,{context:a,bitmapSize:l,mediaSize:u,horizontalPixelRatio:c,verticalPixelRatio:h}=e,d=this.jt.pi||!this.jt.ki?t.C:0,f=this.jt.Pi?t.S:0,p=t.A+this.ei.Ti,m=t.I+this.ei.Ri,g=t.V,v=t.B,y=this.jt.ri,b=t.k,w=r.Di(a,y),x=Math.ceil(r.Ii(a,y)),S=b+p+m,_=t.S+g+v+x+d,M=Math.max(1,Math.floor(h)),O=Math.round(S*h);O%2!=M%2&&(O+=1);let E=f>0?Math.max(1,Math.floor(f*c)):0,P=Math.round(_*c),k=Math.round(d*c),A=Math.round((this.ei.Vi??this.ei.Bi??this.ei.Ei)*h)-Math.floor(.5*h),j=Math.floor(A+M/2-O/2),C=j+O,N="right"===n,T=N?u.width-f:f,R=N?l.width-E:E;return N?(i=R-P,s=R-k,o=T-d-g-f):(i=R+P,s=R+k,o=T+d+g),{li:N,ai:{_i:j,mi:A,Si:C,ui:P,ci:O,ft:2*c,di:E,oi:i,fi:R,wi:s,gi:M,bi:l.width},xi:{_i:j/h,Si:C/h,Ci:o,yi:w}}}}class f${constructor(e){this.Ai={Ei:0,G:"#000",Ri:0,Ti:0},this.Li={ri:"",It:!1,pi:!0,ki:!1,Ht:"",R:"#FFF",Mi:!1,Pi:!1},this.zi={ri:"",It:!1,pi:!1,ki:!0,Ht:"",R:"#FFF",Mi:!0,Pi:!0},this.xt=!0,this.Oi=new(e||fB)(this.Li,this.Ai),this.Ni=new(e||fB)(this.zi,this.Ai)}ri(){return this.Fi(),this.Li.ri}Ei(){return this.Fi(),this.Ai.Ei}kt(){this.xt=!0}$t(e,t=!1){return Math.max(this.Oi.$t(e,t),this.Ni.$t(e,t))}Wi(){return this.Ai.Vi??null}Hi(){return this.Ai.Vi??this.Ai.Bi??this.Ei()}Ui(e){this.Ai.Bi=e??void 0}$i(){return this.Fi(),this.Li.It||this.zi.It}qi(){return this.Fi(),this.Li.It}Tt(e){return this.Fi(),this.Li.pi=this.Li.pi&&e.N().ticksVisible,this.zi.pi=this.zi.pi&&e.N().ticksVisible,this.Oi.ht(this.Li,this.Ai),this.Ni.ht(this.zi,this.Ai),this.Oi}ji(){return this.Fi(),this.Oi.ht(this.Li,this.Ai),this.Ni.ht(this.zi,this.Ai),this.Ni}Fi(){this.xt&&(this.Li.pi=!0,this.zi.pi=!1,this.Yi(this.Li,this.zi,this.Ai))}}class fU extends f${constructor(e,t,r){super(),this.Jt=e,this.Ki=t,this.Zi=r}Yi(e,t,r){if(e.It=!1,2===this.Jt.N().mode)return;let n=this.Jt.N().horzLine;if(!n.labelVisible)return;let i=this.Ki.Lt();if(!this.Jt.It()||this.Ki.Gi()||null===i)return;let s=this.Ki.Xi().Z(n.labelBackgroundColor);r.G=s.G,e.R=s.X;let o=2/12*this.Ki.k();r.Ti=o,r.Ri=o;let a=this.Zi(this.Ki);r.Ei=a.Ei,e.ri=this.Ki.Ji(a.gt,i),e.It=!0}}let fW=/[1-9]/g;class fH{constructor(){this.jt=null}ht(e){this.jt=e}nt(e,t){if(null===this.jt||!1===this.jt.It||0===this.jt.ri.length)return;let r=e.useMediaCoordinateSpace(({context:e})=>(e.font=t.P,Math.round(t.Qi.Ii(e,fh(this.jt).ri,fW))));if(r<=0)return;let n=t.ts,i=r+2*n,s=i/2,o=this.jt.ss,a=this.jt.Ei,l=Math.floor(a-s)+.5;l<0?(a+=Math.abs(0-l),l=Math.floor(a-s)+.5):l+i>o&&(a-=Math.abs(o-(l+i)),l=Math.floor(a-s)+.5);let u=l+i,c=Math.ceil(0+t.S+t.C+t.A+t.k+t.I);e.useBitmapCoordinateSpace(({context:e,horizontalPixelRatio:r,verticalPixelRatio:n})=>{let i=fh(this.jt);e.fillStyle=i.G;let s=Math.round(l*r),o=Math.round(0*n),a=Math.round(u*r),h=Math.round(c*n),d=Math.round(2*r);if(e.beginPath(),e.moveTo(s,o),e.lineTo(s,h-d),e.arcTo(s,h,s+d,h,d),e.lineTo(a-d,h),e.arcTo(a,h,a,h-d,d),e.lineTo(a,o),e.fill(),i.pi){let s=Math.round(i.Ei*r),a=o,l=Math.round((a+t.C)*n);e.fillStyle=i.R;let u=Math.max(1,Math.floor(r)),c=Math.floor(.5*r);e.fillRect(s-c,a,u,l-a)}}),e.useMediaCoordinateSpace(({context:e})=>{let r=fh(this.jt),i=0+t.S+t.C+t.A+t.k/2;e.font=t.P,e.textAlign="left",e.textBaseline="middle",e.fillStyle=r.R;let s=t.Qi.Di(e,"Apr0");e.translate(l+n,i+s),e.fillText(r.ri,0,0)})}}class fK{constructor(e,t,r){this.xt=!0,this.Xt=new fH,this.Gt={It:!1,G:"#4c525e",R:"white",ri:"",ss:0,Ei:NaN,pi:!0},this.Ct=e,this.ns=t,this.Zi=r}kt(){this.xt=!0}Tt(){return this.xt&&(this.Rt(),this.xt=!1),this.Xt.ht(this.Gt),this.Xt}Rt(){let e=this.Gt;if(e.It=!1,2===this.Ct.N().mode)return;let t=this.Ct.N().vertLine;if(!t.labelVisible)return;let r=this.ns.Et();if(r.Gi())return;e.ss=r.ss();let n=this.Zi();if(null===n)return;e.Ei=n.Ei;let i=r.es(this.Ct.Bt());e.ri=r.rs(fh(i)),e.It=!0;
1let s=this.ns.Xi().Z(t.labelBackgroundColor);e.G=s.G,e.R=s.X,e.pi=r.N().ticksVisible}}class fY{constructor(){this.hs=null,this.ls=0}_s(){return this.ls}us(e){this.ls=e}Ft(){return this.hs}cs(e){this.hs=e}ds(e){return[]}fs(){return[]}It(){return!0}}!function(e){e[e.Normal=0]="Normal",e[e.Magnet=1]="Magnet",e[e.Hidden=2]="Hidden",e[e.MagnetOHLC=3]="MagnetOHLC"}(b||(b={}));class fq extends fY{constructor(e,t){let r,n,i,s;super(),this.yt=null,this.ps=NaN,this.vs=0,this.ws=!1,this.gs=new Map,this.Ms=!1,this.bs=new WeakMap,this.Ss=new WeakMap,this.xs=NaN,this.Cs=NaN,this.ys=NaN,this.ks=NaN,this.ns=e,this.Ps=t,this.Ts=(r=()=>this.ps,n=()=>this.Cs,e=>{let t=n(),i=r();if(e===fh(this.yt).Rs())return{gt:i,Ei:t};{let r=fh(e.Lt());return{gt:e.Ds(t,r),Ei:t}}});const o=(i=()=>this.vs,s=()=>this.si(),()=>{let e=this.ns.Et().Is(i()),t=s();return e&&Number.isFinite(t)?{wt:e,Ei:t}:null});this.Vs=new fK(this,e,o)}N(){return this.Ps}Bs(e,t){this.ys=e,this.ks=t}Es(){this.ys=NaN,this.ks=NaN}As(){return this.ys}Ls(){return this.ks}zs(e,t,r){this.Ms||(this.Ms=!0),this.ws=!0,this.Os(e,t,r)}Bt(){return this.vs}si(){return this.xs}ni(){return this.Cs}It(){return this.ws}Ns(){this.ws=!1,this.Fs(),this.ps=NaN,this.xs=NaN,this.Cs=NaN,this.yt=null,this.Es(),this.Ws()}Hs(e){if(!this.Ps.doNotSnapToHiddenSeriesIndices)return e;let t=this.ns,r=t.Et(),n=null,i=null;for(let r of t.Us()){let t=r.qs().$s(e,-1);if(t){if(t.js===e)return e;(null===n||t.js>n)&&(n=t.js)}let s=r.qs().$s(e,1);if(s){if(s.js===e)return e;(null===i||s.js<i)&&(i=s.js)}}let s=[n,i].filter(fw);if(0===s.length)return e;let o=r.qt(e),a=s.map(e=>Math.abs(o-r.qt(e)));return s[a.indexOf(Math.min(...a))]}Ys(e){let t=this.bs.get(e);t||(t=new fI(this,e),this.bs.set(e,t));let r=this.Ss.get(e);return r||(r=new fT(this.ns,this,e),this.Ss.set(e,r)),[t,r]}ti(e){return e===this.yt&&this.Ps.horzLine.visible}ii(){return this.Ps.vertLine.visible}Ks(e,t){this.ws&&this.yt===e||this.gs.clear();let r=[];return this.yt===e&&r.push(this.Zs(this.gs,t,this.Ts)),r}fs(){return this.ws?[this.Vs]:[]}Gs(){return this.yt}Ws(){this.ns.Xs().forEach(e=>{this.bs.get(e)?.kt(),this.Ss.get(e)?.kt()}),this.gs.forEach(e=>e.kt()),this.Vs.kt()}Js(e){return e&&!e.Rs().Gi()?e.Rs():null}Os(e,t,r){this.Qs(e,t,r)&&this.Ws()}Qs(e,t,r){let n=this.xs,i=this.Cs,s=this.ps,o=this.vs,a=this.yt,l=this.Js(r);this.vs=e,this.xs=isNaN(e)?NaN:this.ns.Et().qt(e),this.yt=r;let u=null!==l?l.Lt():null;return null!==l&&null!==u?(this.ps=t,this.Cs=l.Nt(t,u)):(this.ps=NaN,this.Cs=NaN),n!==this.xs||i!==this.Cs||o!==this.vs||s!==this.ps||a!==this.yt}Fs(){let e=this.ns.tn().map(e=>e.qs().sn()).filter(fw),t=0===e.length?null:Math.max(...e);this.vs=null!==t?t:NaN}Zs(e,t,r){let n=e.get(t);return void 0===n&&(n=new fU(this,t,r),e.set(t,n)),n}}function fG(e){return"left"===e||"right"===e}class fJ{constructor(e){this.nn=new Map,this.en=[],this.rn=e}hn(e,t){let r=function(e,t){return void 0===e?t:{an:Math.max(e.an,t.an),ln:e.ln||t.ln}}(this.nn.get(e),t);this.nn.set(e,r)}_n(){return this.rn}un(e){let t=this.nn.get(e);return void 0===t?{an:this.rn}:{an:Math.max(this.rn,t.an),ln:t.ln}}cn(){this.dn(),this.en=[{fn:0}]}pn(e){this.dn(),this.en=[{fn:1,Wt:e}]}vn(e){this.mn(),this.en.push({fn:5,Wt:e})}dn(){this.mn(),this.en.push({fn:6})}wn(){this.dn(),this.en=[{fn:4}]}gn(e){this.dn(),this.en.push({fn:2,Wt:e})}Mn(e){this.dn(),this.en.push({fn:3,Wt:e})}bn(){return this.en}Sn(e){for(let t of e.en)this.xn(t);this.rn=Math.max(this.rn,e.rn),e.nn.forEach((e,t)=>{this.hn(t,e)})}static Cn(){return new fJ(2)}static yn(){return new fJ(3)}xn(e){switch(e.fn){case 0:this.cn();break;case 1:this.pn(e.Wt);break;case 2:this.gn(e.Wt);break;case 3:this.Mn(e.Wt);break;case 4:this.wn();break;case 5:this.vn(e.Wt);break;case 6:this.mn()}}mn(){let e=this.en.findIndex(e=>5===e.fn);-1!==e&&this.en.splice(e,1)}}class fX{formatTickmarks(e){return e.map(e=>this.format(e))}}let fQ=".";function fZ(e,t){if(!fm(e))return"n/a";if(!fg(t)||t<0||t>16)throw TypeError("invalid length");return 0===t?e.toString():("0000000000000000"+e.toString()).slice(-t)}class f0 extends fX{constructor(e,t){if(super(),t||(t=1),fm(e)&&fg(e)||(e=100),e<0)throw TypeError("invalid base");this.Ki=e,this.kn=t,this.Pn()}format(e){let t=e<0?"−":"";return e=Math.abs(e),t+this.Tn(e)}Pn(){if(this.Rn=0,this.Ki>0&&this.kn>0){let e=this.Ki;for(;e>1;)e/=10,this.Rn++}}Tn(e){let t=this.Ki/this.kn,r=Math.floor(e),n="",i=void 0!==this.Rn?this.Rn:NaN;if(t>1){let s=+(Math.round(e*t)-r*t).toFixed(this.Rn);s>=t&&(s-=t,r+=1),n=fQ+fZ(s.toFixed(this.Rn)*this.kn,i)}else r=Math.round(r*t)/t,i>0&&(n=fQ+fZ(0,i));return r.toFixed(0)+n}}class f1 extends f0{constructor(e=100){super(e)}format(e){return`${super.format(e)}%`}}class f2 extends fX{constructor(e){super(),this.Dn=e}format(e){let t="";return e<0&&(t="-",e=-e),e<995?t+this.In(e):e<999995?t+this.In(e/1e3)+"K":e<0x3b9ac9fb?(e=1e3*Math.round(e/1e3),t+this.In(e/1e6)+"M"):(e=1e6*Math.round(e/1e6),t+this.In(e/1e9)+"B")}In(e){let t=Math.pow(10,this.Dn);return((e=Math.round(e*t)/t)>=1e-15&&e<1?e.toFixed(this.Dn).replace(/\.?0+$/,""):String(e)).replace(/(\.[1-9]*)0+$/,(e,t)=>t)}}let f3=/[2-9]/g;class f5{constructor(e=50){this.Vn=0,this.Bn=1,this.En=1,this.An={},this.Ln=new Map,this.zn=e}On(){this.Vn=0,this.Ln.clear(),this.Bn=1,this.En=1,this.An={}}Ii(e,t,r){return this.Nn(e,t,r).width}Di(e,t,r){let n=this.Nn(e,t,r);return((n.actualBoundingBoxAscent||0)-(n.actualBoundingBoxDescent||0))/2}Nn(e,t,r){let n=r||f3,i=String(t).replace(n,"0");if(this.Ln.has(i))return fc(this.Ln.get(i)).Fn;if(this.Vn===this.zn){let e=this.An[this.En];delete this.An[this.En],this.Ln.delete(e),this.En++,this.Vn--}e.save(),e.textBaseline="middle";let s=e.measureText(i);
1return e.restore(),0===s.width&&t.length||(this.Ln.set(i,{Fn:s,Wn:this.Bn}),this.An[this.Bn]=i,this.Vn++,this.Bn++),s}}class f4{constructor(e){this.Hn=null,this.M=null,this.Un="right",this.$n=e}qn(e,t,r){this.Hn=e,this.M=t,this.Un=r}nt(e){null!==this.M&&null!==this.Hn&&this.Hn.nt(e,this.M,this.$n,this.Un)}}class f8{constructor(e,t,r){this.jn=e,this.$n=new f5(50),this.Yn=t,this.O=r,this.F=-1,this.Xt=new f4(this.$n)}Tt(){let e=this.O.Kn(this.Yn);if(null===e)return null;let t=e.Zn(this.Yn)?e.Gn():this.Yn.Ft();if(null===t)return null;let r=e.Xn(t);if("overlay"===r)return null;let n=this.O.Jn();return n.k!==this.F&&(this.F=n.k,this.$n.On()),this.Xt.qn(this.jn.ji(),n,r),this.Xt}}class f6 extends fA{constructor(){super(...arguments),this.jt=null}ht(e){this.jt=e}Qn(e,t){if(!this.jt?.It)return null;let{ut:r,ct:n,te:i}=this.jt;return t>=r-n-7&&t<=r+n+7?{ie:this.jt,te:i}:null}et({context:e,bitmapSize:t,horizontalPixelRatio:r,verticalPixelRatio:n}){if(null===this.jt||!1===this.jt.It)return;let i=Math.round(this.jt.ut*n);i<0||i>t.height||(e.lineCap="butt",e.strokeStyle=this.jt.R,e.lineWidth=Math.floor(this.jt.ct*r),fa(e,this.jt.Zt),fl(e,i,0,t.width))}}class f7{constructor(e){this.se={ut:0,R:"rgba(0, 0, 0, 0)",ct:1,Zt:0,It:!1},this.ne=new f6,this.xt=!0,this.ee=e,this.re=e.Qt(),this.ne.ht(this.se)}kt(){this.xt=!0}Tt(){return this.ee.It()?(this.xt&&(this.he(),this.xt=!1),this.ne):null}}class f9 extends f7{constructor(e){super(e)}he(){this.se.It=!1;let e=this.ee.Ft(),t=e.ae().ae;if(2!==t&&3!==t)return;let r=this.ee.N();if(!r.baseLineVisible||!this.ee.It())return;let n=this.ee.Lt();null!==n&&(this.se.It=!0,this.se.ut=e.Nt(n.Wt,n.Wt),this.se.R=r.baseLineColor,this.se.ct=r.baseLineWidth,this.se.Zt=r.baseLineStyle)}}class pe extends fA{constructor(){super(...arguments),this.jt=null}ht(e){this.jt=e}le(){return this.jt}et({context:e,horizontalPixelRatio:t,verticalPixelRatio:r}){let n=this.jt;if(null===n)return;let i=Math.max(1,Math.floor(t)),s=i%2/2,o=Math.round(n.oe.x*t)+s,a=n.oe.y*r;e.fillStyle=n._e,e.beginPath();let l=Math.max(2,1.5*n.ue)*t;e.arc(o,a,l,0,2*Math.PI,!1),e.fill(),e.fillStyle=n.ce,e.beginPath(),e.arc(o,a,n.ft*t,0,2*Math.PI,!1),e.fill(),e.lineWidth=i,e.strokeStyle=n.de,e.beginPath(),e.arc(o,a,n.ft*t+i/2,0,2*Math.PI,!1),e.stroke()}}let pt=[{fe:0,pe:.25,ve:4,me:10,we:.25,ge:0,Me:.4,be:.8},{fe:.25,pe:.525,ve:10,me:14,we:0,ge:0,Me:.8,be:0},{fe:.525,pe:1,ve:14,me:14,we:0,ge:0,Me:0,be:0}];class pr{constructor(e){this.Xt=new pe,this.xt=!0,this.Se=!0,this.xe=performance.now(),this.Ce=this.xe-1,this.ye=e}ke(){this.Ce=this.xe-1,this.kt()}Pe(){if(this.kt(),2===this.ye.N().lastPriceAnimation){let e=performance.now(),t=this.Ce-e;if(t>0)return void(t<650&&(this.Ce+=2600));this.xe=e,this.Ce=e+2600}}kt(){this.xt=!0}Te(){this.Se=!0}It(){return 0!==this.ye.N().lastPriceAnimation}Re(){switch(this.ye.N().lastPriceAnimation){case 0:return!1;case 1:return!0;case 2:return performance.now()<=this.Ce}}Tt(){return this.xt?(this.Rt(),this.xt=!1,this.Se=!1):this.Se&&(this.De(),this.Se=!1),this.Xt}Rt(){this.Xt.ht(null);let e=this.ye.Qt().Et(),t=e.Ie(),r=this.ye.Lt();if(null===t||null===r)return;let n=this.ye.Ve(!0);if(n.Be||!t.Ee(n.js))return;let i={x:e.qt(n.js),y:this.ye.Ft().Nt(n.gt,r.Wt)},s=n.R,o=this.ye.N().lineWidth,a=this.Ae(this.Le(),s);this.Xt.ht({_e:s,ue:o,ce:a.ce,de:a.de,ft:a.ft,oe:i})}De(){let e=this.Xt.le();if(null!==e){let t=this.Ae(this.Le(),e._e);e.ce=t.ce,e.de=t.de,e.ft=t.ft}}Le(){return this.Re()?performance.now()-this.xe:2599}ze(e,t,r,n){let i=r+(n-r)*t;return this.ye.Qt().Xi().Y(e,i)}Ae(e,t){var r,n;let i,s=e%2600/2600;for(let e of pt)if(s>=e.fe&&s<=e.pe){i=e;break}fu(void 0!==i,"Last price animation internal logic error");let o=(s-i.fe)/(i.pe-i.fe);return{ce:this.ze(t,o,i.we,i.ge),de:this.ze(t,o,i.Me,i.be),ft:(r=o,(n=i.ve)+(i.me-n)*r)}}}class pn extends f7{constructor(e){super(e)}he(){let e=this.se;e.It=!1;let t=this.ee.N();if(!t.priceLineVisible||!this.ee.It())return;let r=this.ee.Ve(0===t.priceLineSource);r.Be||(e.It=!0,e.ut=r.Ei,e.R=this.ee.Oe(r.R),e.ct=t.priceLineWidth,e.Zt=t.priceLineStyle)}}class pi extends f${constructor(e){super(),this.Jt=e}Yi(e,t,r){e.It=!1,t.It=!1;let n=this.Jt;if(!n.It())return;let i=n.N(),s=i.lastValueVisible,o=""!==n.Ne(),a=0===i.seriesLastValueMode,l=n.Ve(!1);if(l.Be)return;s&&(e.ri=this.Fe(l,s,a),e.It=0!==e.ri.length),(o||a)&&(t.ri=this.We(l,s,o,a),t.It=t.ri.length>0);let u=n.Oe(l.R),c=this.Jt.Qt().Xi().Z(u);r.G=c.G,r.Ei=l.Ei,t.Ht=n.Qt().Ut(l.Ei/n.Ft().$t()),e.Ht=u,e.R=c.X,t.R=c.X}We(e,t,r,n){let i="",s=this.Jt.Ne();return r&&0!==s.length&&(i+=`${s} `),t&&n&&(i+=this.Jt.Ft().He()?e.Ue:e.$e),i.trim()}Fe(e,t,r){return t?r?this.Jt.Ft().He()?e.$e:e.Ue:e.ri:""}}function ps(e,t,r,n){let i=Number.isFinite(t),s=Number.isFinite(r);return i&&s?e(t,r):i||s?i?t:r:n}class po{constructor(e,t){this.qe=e,this.je=t}Ye(e){return null!==e&&this.qe===e.qe&&this.je===e.je}Ke(){return new po(this.qe,this.je)}Ze(){return this.qe}Ge(){return this.je}Xe(){return this.je-this.qe}Gi(){return this.je===this.qe||Number.isNaN(this.je)||Number.isNaN(this.qe)}Sn(e){return null===e?this:new po(ps(Math.min,this.Ze(),e.Ze(),-1/0),ps(Math.max,this.Ge(),e.Ge(),1/0))}Je(e){if(!fm(e)||0==this.je-this.qe)return;let t=.5*(this.je+this.qe),r=this.je-t,n=this.qe-t;r*=e,n*=e,this.je=t+r,this.qe=t+n}Qe(e){fm(e)&&(this.je+=e,this.qe+=e)}tr(){return{minValue:this.qe,maxValue:this.je}}static ir(e){return null===e?null:new po(e.minValue,e.maxValue)}}class pa{constructor(e,t){this.sr=e,this.nr=t||null}er(){return this.sr}rr(){return this.nr}tr(){return{priceRange:null===this.sr?null:this.sr.tr(),margins:this.nr||void 0}}static ir(e){return null===e?null:new pa(po.ir(e.priceRange),e.margins)}}let pl=[2,4,8,16,32,64,128,256,512],pu="Custom series with conflation reducer must have a priceValueBuilder method";class pc extends f7{constructor(e,t){super(e),this.hr=t}
1he(){let e=this.se;e.It=!1;let t=this.hr.N();if(!this.ee.It()||!t.lineVisible)return;let r=this.hr.ar();null!==r&&(e.It=!0,e.ut=r,e.R=t.color,e.ct=t.lineWidth,e.Zt=t.lineStyle,e.te=this.hr.N().id)}}class ph extends f${constructor(e,t){super(),this.ye=e,this.hr=t}Yi(e,t,r){e.It=!1,t.It=!1;let n=this.hr.N(),i=n.axisLabelVisible,s=""!==n.title,o=this.ye;if(!i||!o.It())return;let a=this.hr.ar();if(null===a)return;s&&(t.ri=n.title,t.It=!0),t.Ht=o.Qt().Ut(a/o.Ft().$t()),e.ri=this.lr(n.price),e.It=!0;let l=this.ye.Qt().Xi().Z(n.axisLabelColor||n.color);r.G=l.G;let u=n.axisLabelTextColor||l.X;e.R=u,t.R=u,r.Ei=a}lr(e){let t=this.ye.Lt();return null===t?"":this.ye.Ft().Ji(e,t.Wt)}}class pd{constructor(e,t){this.ye=e,this.Ps=t,this._r=new pc(e,this),this.jn=new ph(e,this),this.ur=new f8(this.jn,e,e.Qt())}cr(e){fp(this.Ps,e),this.kt(),this.ye.Qt().dr()}N(){return this.Ps}pr(){return this._r}vr(){return this.ur}mr(){return this.jn}kt(){this._r.kt(),this.jn.kt()}ar(){let e=this.ye,t=e.Ft();if(e.Qt().Et().Gi()||t.Gi())return null;let r=e.Lt();return null===r?null:t.Nt(this.Ps.price,r.Wt)}}class pf{constructor(){this.wr=new WeakMap}gr(e,t,r){let n=1/t*r;return e>=n?1:Math.min(Math.pow(2,Math.floor(Math.log2(n/e))),512)}Mr(e,t,r,n=!1,i){if(0===e.length||t<=1)return e;let s=this.br(t);if(s<=1)return e;let o=this.Sr(e),a=o.Cr.get(s);return void 0!==a||(a=this.yr(e,s,r,n,i,o.Cr),o.Cr.set(s,a)),a}kr(e,t,r,n,i=!1,s){if(r<1||0===e.length)return e;let o=this.Sr(e),a=o.Cr.get(r);if(!a)return this.Mr(e,r,n,i,s);let l=this.Pr(e,t,r,a,i,n,s);return o.Cr.set(r,l),l}br(e){if(e<=2)return 2;for(let t of pl)if(e<=t)return t;return 512}Tr(e){if(0===e.length)return 0;let t=e[0],r=e[e.length-1];return 31*e.length+17*t.js+13*r.js}yr(e,t,r,n=!1,i,s=new Map){if(2===t)return this.Rr(e,2,r,n,i);let o=t/2,a=s.get(o);return a||(a=this.yr(e,o,r,n,i,s),s.set(o,a)),this.Dr(a,r,n,i)}Rr(e,t,r,n=!1,i){let s=this.Ir(e,t,r,n,i);return this.Vr(s,n)}Dr(e,t,r=!1,n){let i=this.Ir(e,2,t,r,n);return this.Vr(i,r)}Ir(e,t,r,n=!1,i){let s=[];for(let o=0;o<e.length;o+=t)if(e.length-o>=t){let t=this.Br(e[o],e[o+1],r,n,i);t.Er=!1,s.push(t)}else if(0===s.length)s.push(this.Ar(e[o],!0));else{let t=s[s.length-1];s[s.length-1]=this.Lr(t,e[o],r,n,i)}return s}zr(e,t){return(e??1)+(t??1)}Br(e,t,r,n=!1,i){if(!n||!r||!i){let r=e.Wt[1]>t.Wt[1]?e.Wt[1]:t.Wt[1],n=e.Wt[2]<t.Wt[2]?e.Wt[2]:t.Wt[2];return{Or:e.js,Nr:t.js,Fr:e.wt,Wr:t.wt,Hr:e.Wt[0],Ur:r,$r:n,qr:t.Wt[3],jr:this.zr(e.jr,t.jr),Yr:void 0,Er:!1}}let s=r(this.Kr(e,i),this.Kr(t,i)),o=i(s),a=o.length?o[o.length-1]:0;return{Or:e.js,Nr:t.js,Fr:e.wt,Wr:t.wt,Hr:e.Wt[0],Ur:Math.max(e.Wt[1],a),$r:Math.min(e.Wt[2],a),qr:a,jr:this.zr(e.jr,t.jr),Yr:s,Er:!1}}Lr(e,t,r,n=!1,i){if(!n||!r||!i)return{Or:e.Or,Nr:t.js,Fr:e.Fr,Wr:t.wt,Hr:e.Hr,Ur:e.Ur>t.Wt[1]?e.Ur:t.Wt[1],$r:e.$r<t.Wt[2]?e.$r:t.Wt[2],qr:t.Wt[3],jr:e.jr+(t.jr??1),Yr:e.Yr,Er:!1};let s=e.Yr,o=this.Kr(t,i),a=s?{data:s,index:e.Or,originalTime:e.Fr,time:e.Fr,priceValues:i(s)}:null,l=a?r(a,o):o.data,u=a?i(l):o.priceValues,c=u.length?u[u.length-1]:0;return{Or:e.Or,Nr:t.js,Fr:e.Fr,Wr:t.wt,Hr:e.Hr,Ur:Math.max(e.Ur,c),$r:Math.min(e.$r,c),qr:c,jr:e.jr+(t.jr??1),Yr:l,Er:!1}}Zr(e,t,r,n,i,s,o=!1,a){let l=t===n?i:e[t];if(r-t==1)return this.Ar(l,!0);let u=t+1===n?i:e[t+1],c=this.Br(l,u,s,o,a);for(let l=t+2;l<r;l++){let t=l===n?i:e[l];c=this.Lr(c,t,s,o,a)}return c}Kr(e,t){let r=e.le??{};return{data:e.le,index:e.js,originalTime:e.Gr,time:e.wt,priceValues:t(r)}}Xr(e,t=!1){let r=!0===t,n=!!e.Yr;return{...{js:e.Or,wt:e.Fr,Gr:e.Fr,Wt:[r?e.qr:e.Hr,e.Ur,e.$r,e.qr],jr:e.jr},le:r?n?e.Yr:{wt:e.Fr}:void 0}}Vr(e,t=!1){return e.map(e=>this.Xr(e,t))}Pr(e,t,r,n,i=!1,s,o){if(0===n.length)return n;let a=e.length-1,l=Math.floor(a/r)*r;if(Math.min(l+r,e.length)-l<r&&e.length>r){let n=e.slice();return n[n.length-1]=t,this.Mr(n,r,s,i,o)}if(Math.floor((a-1)/r)===Math.floor(a/r)||1===n.length){let u=Math.min(l+r,e.length),c=u-l;if(c<=0)return n;let h=1===c?this.Ar(l===a?t:e[l],!0):this.Zr(e,l,u,a,t,s,i,o);return n[n.length-1]=this.Xr(h,i),n}{let n=e.slice();return n[n.length-1]=t,this.Mr(n,r,s,i,o)}}Ar(e,t=!1){return{Or:e.js,Nr:e.js,Fr:e.wt,Wr:e.wt,Hr:e.Wt[0],Ur:e.Wt[1],$r:e.Wt[2],qr:e.Wt[3],jr:e.jr??1,Yr:e.le,Er:t}}Sr(e){let t=this.Jr(e),r=this.Tr(e);return t.Qr!==r&&(t.Cr.clear(),t.Qr=r),t}Jr(e){let t=this.wr.get(e);return void 0===t&&(t={Qr:this.Tr(e),Cr:new Map},this.wr.set(e,t)),t}}class pp extends fY{constructor(e){super(),this.ns=e}Qt(){return this.ns}}let pm={Bar:(e,t,r,n)=>{let i=t.upColor,s=t.downColor,o=fh(e(r,n)),a=fd(o.Wt[0])<=fd(o.Wt[3]);return{th:o.R??(a?i:s)}},Candlestick:(e,t,r,n)=>{let i=t.upColor,s=t.downColor,o=t.borderUpColor,a=t.borderDownColor,l=t.wickUpColor,u=t.wickDownColor,c=fh(e(r,n)),h=fd(c.Wt[0])<=fd(c.Wt[3]);return{th:c.R??(h?i:s),ih:c.Ht??(h?o:a),sh:c.nh??(h?l:u)}},Custom:(e,t,r,n)=>({th:fh(e(r,n)).R??t.color}),Area:(e,t,r,n)=>{let i=fh(e(r,n));return{th:i.vt??t.lineColor,vt:i.vt??t.lineColor,eh:i.eh??t.topColor,rh:i.rh??t.bottomColor}},Baseline:(e,t,r,n)=>{let i=fh(e(r,n));return{th:i.Wt[3]>=t.baseValue.price?t.topLineColor:t.bottomLineColor,hh:i.hh??t.topLineColor,ah:i.ah??t.bottomLineColor,oh:i.oh??t.topFillColor1,_h:i._h??t.topFillColor2,uh:i.uh??t.bottomFillColor1,dh:i.dh??t.bottomFillColor2}},Line:(e,t,r,n)=>{let i=fh(e(r,n));return{th:i.R??t.color,vt:i.R??t.color}},Histogram:(e,t,r,n)=>({th:fh(e(r,n)).R??t.color})};class pg{constructor(e){this.fh=(e,t)=>
1void 0!==t?t.Wt:this.ye.qs().ph(e),this.ye=e,this.mh=pm[e.wh()]}gh(e,t){return this.mh(this.fh,this.ye.N(),e,t)}}function pv(e,t,r,n,i=0,s=t.length){let o=s-i;for(;0<o;){let s=o>>1,a=i+s;n(t[a],r)===e?(i=a+1,o-=s+1):o=s}return i}let py=pv.bind(null,!0),pb=pv.bind(null,!1);!function(e){e[e.NearestLeft=-1]="NearestLeft",e[e.None=0]="None",e[e.NearestRight=1]="NearestRight"}(w||(w={}));let pw=30;class px{constructor(){this.Mh=[],this.bh=new Map,this.Sh=new Map,this.xh=[]}Ch(){return this.yh()>0?this.Mh[this.Mh.length-1]:null}kh(){return this.yh()>0?this.Ph(0):null}sn(){return this.yh()>0?this.Ph(this.Mh.length-1):null}yh(){return this.Mh.length}Gi(){return 0===this.yh()}Ee(e){return null!==this.Th(e,0)}ph(e){return this.$s(e)}$s(e,t=0){let r=this.Th(e,t);return null===r?null:{...this.Rh(r),js:this.Ph(r)}}Dh(){return this.Mh}Ih(e,t,r){if(this.Gi())return null;let n=null;for(let i of r)n=pS(n,this.Vh(e,t,i));return n}ht(e){this.Sh.clear(),this.bh.clear(),this.Mh=e,this.xh=e.map(e=>e.js)}Bh(){return this.xh}Ph(e){return this.Mh[e].js}Rh(e){return this.Mh[e]}Th(e,t){let r=this.Eh(e);if(null===r&&0!==t)switch(t){case -1:return this.Ah(e);case 1:return this.Lh(e);default:throw TypeError("Unknown search mode")}return r}Ah(e){let t=this.zh(e);return t>0&&(t-=1),t!==this.Mh.length&&this.Ph(t)<e?t:null}Lh(e){let t=this.Oh(e);return t!==this.Mh.length&&e<this.Ph(t)?t:null}Eh(e){let t=this.zh(e);return t===this.Mh.length||e<this.Mh[t].js?null:t}zh(e){return py(this.Mh,e,(e,t)=>e.js<t)}Oh(e){return pb(this.Mh,e,(e,t)=>e.js>t)}Nh(e,t,r){let n=null;for(let i=e;i<t;i++){let e=this.Mh[i].Wt[r];Number.isNaN(e)||(null===n?n={Fh:e,Wh:e}:(e<n.Fh&&(n.Fh=e),e>n.Wh&&(n.Wh=e)))}return n}Vh(e,t,r){if(this.Gi())return null;let n=null,i=fh(this.kh()),s=fh(this.sn()),o=Math.max(e,i),a=Math.min(t,s),l=Math.ceil(o/pw)*pw,u=Math.max(l,Math.floor(a/pw)*pw);{let e=this.zh(o),i=this.Oh(Math.min(a,l,t));n=pS(n,this.Nh(e,i,r))}let c=this.bh.get(r);void 0===c&&(c=new Map,this.bh.set(r,c));for(let e=Math.max(l+1,o);e<u;e+=pw){let t=Math.floor(e/pw),i=c.get(t);if(void 0===i){let e=this.zh(t*pw),n=this.Oh((t+1)*pw-1);i=this.Nh(e,n,r),c.set(t,i)}n=pS(n,i)}{let e=this.zh(u),t=this.Oh(a);n=pS(n,this.Nh(e,t,r))}return n}}function pS(e,t){return null===e?t:null===t?e:{Fh:Math.min(e.Fh,t.Fh),Wh:Math.max(e.Wh,t.Wh)}}function p_(){return new px}let pM={setLineStyle:fa};class pO{constructor(e){this.Hh=e}nt(e,t,r){this.Hh.draw(e,pM)}Uh(e,t,r){this.Hh.drawBackground?.(e,pM)}}class pE{constructor(e){this.Ln=null,this.$h=e}Tt(){let e=this.$h.renderer();if(null===e)return null;if(this.Ln?.qh===e)return this.Ln.jh;let t=new pO(e);return this.Ln={qh:e,jh:t},t}Yh(){return this.$h.zOrder?.()??"normal"}}class pP{constructor(e){this.Kh=null,this.Zh=e}Gh(){return this.Zh}Ws(){this.Zh.updateAllViews?.()}Ys(){let e=this.Zh.paneViews?.()??[];if(this.Kh?.qh===e)return this.Kh.jh;let t=e.map(e=>new pE(e));return this.Kh={qh:e,jh:t},t}Qn(e,t){return this.Zh.hitTest?.(e,t)??null}}let pk=class extends pP{ds(){return[]}};class pA{constructor(e){this.Hh=e}nt(e,t,r){this.Hh.draw(e,pM)}Uh(e,t,r){this.Hh.drawBackground?.(e,pM)}}class pj{constructor(e){this.Ln=null,this.$h=e}Tt(){let e=this.$h.renderer();if(null===e)return null;if(this.Ln?.qh===e)return this.Ln.jh;let t=new pA(e);return this.Ln={qh:e,jh:t},t}Yh(){return this.$h.zOrder?.()??"normal"}}function pC(e){return{ri:e.text(),Ei:e.coordinate(),Vi:e.fixedCoordinate?.(),R:e.textColor(),G:e.backColor(),It:e.visible?.()??!0,pi:e.tickVisible?.()??!0}}class pN{constructor(e,t){this.Xt=new fH,this.Xh=e,this.Jh=t}Tt(){return this.Xt.ht({ss:this.Jh.ss(),...pC(this.Xh)}),this.Xt}}class pT extends f${constructor(e,t){super(),this.Xh=e,this.Ki=t}Yi(e,t,r){let n=pC(this.Xh);r.G=n.G,e.R=n.R;let i=2/12*this.Ki.k();r.Ti=i,r.Ri=i,r.Ei=n.Ei,r.Vi=n.Vi,e.ri=n.ri,e.It=n.It,e.pi=n.pi}}class pR extends pP{constructor(e,t){super(e),this.Qh=null,this.ta=null,this.ia=null,this.sa=null,this.ye=t}fs(){let e=this.Zh.timeAxisViews?.()??[];if(this.Qh?.qh===e)return this.Qh.jh;let t=this.ye.Qt().Et(),r=e.map(e=>new pN(e,t));return this.Qh={qh:e,jh:r},r}Ks(){let e=this.Zh.priceAxisViews?.()??[];if(this.ta?.qh===e)return this.ta.jh;let t=this.ye.Ft(),r=e.map(e=>new pT(e,t));return this.ta={qh:e,jh:r},r}na(){let e=this.Zh.priceAxisPaneViews?.()??[];if(this.ia?.qh===e)return this.ia.jh;let t=e.map(e=>new pj(e));return this.ia={qh:e,jh:t},t}ea(){let e=this.Zh.timeAxisPaneViews?.()??[];if(this.sa?.qh===e)return this.sa.jh;let t=e.map(e=>new pj(e));return this.sa={qh:e,jh:t},t}ra(e,t){return this.Zh.autoscaleInfo?.(e,t)??null}}
1function pI(e,t,r,n){e.forEach(e=>{t(e).forEach(e=>{e.Yh()===r&&n.push(e)})})}function pD(e){return e.Ys()}function pL(e){return e.na()}function pV(e){return e.ea()}let pz=["Area","Line","Baseline"];class pF extends pp{constructor(e,t,r,n,i){super(e),this.jt=p_(),this._r=new pn(this),this.ha=[],this.aa=new f9(this),this.la=null,this.oa=null,this._a=null,this.ua=[],this.ca=new pf,this.da=new Map,this.fa=null,this.Ps=r,this.pa=t;const s=new pi(this);if(this.gs=[s],this.ur=new f8(s,this,e),pz.includes(this.pa)&&(this.la=new pr(this)),this.va(),this.$h=n(this,this.Qt(),i),"Custom"===this.pa){const e=this.$h;e.ma&&this.wa(e.ma)}}m(){null!==this._a&&clearTimeout(this._a)}Oe(e){return this.Ps.priceLineColor||e}Ve(e){let t,r,n={Be:!0},i=this.Ft();if(this.Qt().Et().Gi()||i.Gi()||this.jt.Gi())return n;let s=this.Qt().Et().Ie(),o=this.Lt();if(null===s||null===o)return n;if(e){let e=this.jt.Ch();if(null===e)return n;t=e,r=e.js}else{let e=this.jt.$s(s.bi(),-1);if(null===e||null===(t=this.jt.ph(e.js)))return n;r=e.js}let a=t.Wt[3],l=this.ga().gh(r,{Wt:t}),u=i.Nt(a,o.Wt);return{Be:!1,gt:a,ri:i.Ji(a,o.Wt),Ue:i.Ma(a),$e:i.ba(a,o.Wt),R:l.th,Ei:u,js:r}}ga(){return null!==this.oa||(this.oa=new pg(this)),this.oa}N(){return this.Ps}cr(e){let t=this.Qt(),{priceScaleId:r,visible:n,priceFormat:i}=e;void 0!==r&&r!==this.Ps.priceScaleId&&t.Sa(this,r),void 0!==n&&n!==this.Ps.visible&&t.xa();let s=void 0!==e.conflationThresholdFactor;fp(this.Ps,e),s&&(this.da.clear(),this.Qt().dr()),void 0!==i&&(this.va(),t.Ca()),t.ya(this),t.ka(),this.$h.kt("options")}ht(e,t){this.jt.ht(e),this.da.clear();let r=this.Qt().Et().N();r.enableConflation&&r.precomputeConflationOnInit&&this.Pa(r.precomputeConflationPriority),this.$h.kt("data"),null!==this.la&&(t&&t.Ta?this.la.Pe():0===e.length&&this.la.ke());let n=this.Qt().Kn(this);this.Qt().Ra(n),this.Qt().ya(this),this.Qt().ka(),this.Qt().dr()}Da(e){let t=new pd(this,e);return this.ha.push(t),this.Qt().ya(this),t}Ia(e){let t=this.ha.indexOf(e);-1!==t&&this.ha.splice(t,1),this.Qt().ya(this)}Va(){return this.ha}wh(){return this.pa}Lt(){let e=this.Ba();return null===e?null:{Wt:e.Wt[3],Ea:e.wt}}Ba(){let e=this.Qt().Et().Ie();if(null===e)return null;let t=e.Aa();return this.jt.$s(t,1)}qs(){return this.jt}wa(e){this.fa=e,this.da.clear()}La(){return!!this.Qt().Et().N().enableConflation&&this.za()>1}kr(e){if(!this.La())return;let t=this.za();if(!this.da.has(t))return;let r="Custom"===this.pa,n=r&&this.fa||void 0,i=r&&this.$h.Oa?e=>{let t=e,r=this.$h.Oa(t);return Array.isArray(r)?r:["number"==typeof r?r:0]}:void 0,s=this.ca.kr(this.jt.Dh(),e,t,n,r,i),o=p_();o.ht(s),this.da.set(t,o)}Na(){let e=this.Qt().Et().N().enableConflation;if("Custom"===this.pa&&null===this.fa||!e)return this.jt;let t=this.za(),r=this.da.get(t);return r||(this.Fa(t),this.da.get(t)??this.jt)}Wa(e){let t=this.jt.ph(e);return null===t?null:"Bar"===this.pa||"Candlestick"===this.pa||"Custom"===this.pa?{Hr:t.Wt[0],Ur:t.Wt[1],$r:t.Wt[2],qr:t.Wt[3]}:t.Wt[3]}Ha(e){let t=[];pI(this.ua,pD,"top",t);let r=this.la;return null!==r&&r.It()&&(null===this._a&&r.Re()&&(this._a=setTimeout(()=>{this._a=null,this.Qt().Ua()},0)),r.Te(),t.unshift(r)),t}Ys(){let e=[];this.$a()||e.push(this.aa),e.push(this.$h,this._r);let t=this.ha.map(e=>e.pr());return e.push(...t),pI(this.ua,pD,"normal",e),e}qa(){return this.ja(pD,"bottom")}Ya(e){return this.ja(pL,e)}Ka(e){return this.ja(pV,e)}Za(e,t){return this.ua.map(r=>r.Qn(e,t)).filter(e=>null!==e)}ds(){return[this.ur,...this.ha.map(e=>e.vr())]}Ks(e,t){if(t!==this.hs&&!this.$a())return[];let r=[...this.gs];for(let e of this.ha)r.push(e.mr());return this.ua.forEach(e=>{r.push(...e.Ks())}),r}fs(){let e=[];return this.ua.forEach(t=>{e.push(...t.fs())}),e}ra(e,t){if(void 0!==this.Ps.autoscaleInfoProvider){let r=this.Ps.autoscaleInfoProvider(()=>{let r=this.Ga(e,t);return null===r?null:r.tr()});return pa.ir(r)}return this.Ga(e,t)}qh(){let e=this.Ps.priceFormat;return e.base??1/e.minMove}Xa(){return this.Ja}Ws(){for(let e of(this.$h.kt(),this.gs))e.kt();for(let e of this.ha)e.kt();this._r.kt(),this.aa.kt(),this.la?.kt(),this.ua.forEach(e=>e.Ws())}Ft(){return fh(super.Ft())}At(e){if(!(("Line"===this.pa||"Area"===this.pa||"Baseline"===this.pa)&&this.Ps.crosshairMarkerVisible))return null;let t=this.jt.ph(e);return null===t?null:{gt:t.Wt[3],ft:this.Qa(),Ht:this.tl(),Ot:this.il(),zt:this.sl(e)}}Ne(){return this.Ps.title}It(){return this.Ps.visible}nl(e){this.ua.push(new pR(e,this))}el(e){this.ua=this.ua.filter(t=>t.Gh()!==e)}rl(){if("Custom"===this.pa)return e=>this.$h.Oa(e)}
1hl(){if("Custom"===this.pa)return e=>this.$h.al(e)}ll(){return this.jt.Bh()}$a(){return!fG(this.Ft().ol())}Ga(e,t){if(!fg(e)||!fg(t)||this.jt.Gi())return null;let r="Line"===this.pa||"Area"===this.pa||"Baseline"===this.pa||"Histogram"===this.pa?[3]:[2,1],n=this.jt.Ih(e,t,r),i=null!==n?new po(n.Fh,n.Wh):null,s=null;if("Histogram"===this.wh()){let e=this.Ps.base,t=new po(e,e);i=null!==i?i.Sn(t):t}return this.ua.forEach(r=>{let n=r.ra(e,t);if(n?.priceRange){let e=new po(n.priceRange.minValue,n.priceRange.maxValue);i=null!==i?i.Sn(e):e}n?.margins&&(s=n.margins)}),new pa(i,s)}Qa(){switch(this.pa){case"Line":case"Area":case"Baseline":return this.Ps.crosshairMarkerRadius}return 0}tl(){switch(this.pa){case"Line":case"Area":case"Baseline":{let e=this.Ps.crosshairMarkerBorderColor;if(0!==e.length)return e}}return null}il(){switch(this.pa){case"Line":case"Area":case"Baseline":return this.Ps.crosshairMarkerBorderWidth}return 0}sl(e){switch(this.pa){case"Line":case"Area":case"Baseline":{let e=this.Ps.crosshairMarkerBackgroundColor;if(0!==e.length)return e}}return this.ga().gh(e).th}va(){switch(this.Ps.priceFormat.type){case"custom":{let e=this.Ps.priceFormat.formatter;this.Ja={format:e,formatTickmarks:this.Ps.priceFormat.tickmarksFormatter??(t=>t.map(e))};break}case"volume":this.Ja=new f2(this.Ps.priceFormat.precision);break;case"percent":this.Ja=new f1(this.Ps.priceFormat.precision);break;default:{let e=Math.pow(10,this.Ps.priceFormat.precision);this.Ja=new f0(e,this.Ps.priceFormat.minMove*e)}}null!==this.hs&&this.hs._l()}ja(e,t){let r=[];return pI(this.ua,e,t,r),r}za(){let{ul:e,cl:t,dl:r}=this.fl();return this.ca.gr(e,t,r)}fl(){let e=this.Qt().Et(),t=e.ul(),r=window.devicePixelRatio||1,n=e.N().conflationThresholdFactor;return{ul:t,cl:r,dl:this.Ps.conflationThresholdFactor??n??1}}pl(e){let t,r=this.jt.Dh();if("Custom"===this.pa&&null!==this.fa){let n=this.rl();if(!n)throw Error(pu);t=this.ca.Mr(r,e,this.fa,!0,e=>n(e))}else t=this.ca.Mr(r,e);let n=p_();return n.ht(t),n}Fa(e){let t=this.pl(e);this.da.set(e,t)}Pa(e){if("Custom"!==this.pa||null!==this.fa&&this.rl())for(let t of(this.da.clear(),this.Qt().Et().vl())){let r=()=>{this.ml(t)},n="object"==typeof window&&window||"object"==typeof self&&self;n?.gl?.wl?n.gl.wl(()=>{r()},{Ml:e}):Promise.resolve().then(()=>r())}}ml(e){if(this.da.has(e)||0===this.jt.Dh().length)return;let t=this.pl(e);this.da.set(e,t)}}let pB=[3],p$=[0,1,2,3];class pU{constructor(e){this.Ps=e}bl(e,t,r){let n=e;if(0===this.Ps.mode)return n;let i=r.Rs(),s=i.Lt();if(null===s)return n;let o=i.Nt(e,s),a=r.Sl().filter(e=>e instanceof pF).reduce((e,n)=>{if(r.Zn(n)||!n.It())return e;let i=n.Ft(),s=n.qs();if(i.Gi()||!s.Ee(t))return e;let o=s.ph(t);if(null===o)return e;let a=fd(n.Lt()),l=3===this.Ps.mode?p$:pB;return e.concat(l.map(e=>i.Nt(o.Wt[e],a.Wt)))},[]);if(0===a.length)return n;a.sort((e,t)=>Math.abs(e-o)-Math.abs(t-o));let l=a[0];return i.Ds(l,s)}}function pW(e,t,r){return Math.min(Math.max(e,t),r)}function pH(e,t,r){return t-e<=r}class pK extends fA{constructor(){super(...arguments),this.jt=null}ht(e){this.jt=e}et({context:e,bitmapSize:t,horizontalPixelRatio:r,verticalPixelRatio:n}){if(null===this.jt)return;let i=Math.max(1,Math.floor(r));e.lineWidth=i,function(e,t){e.save(),e.lineWidth%2&&e.translate(.5,.5),t(),e.restore()}(e,()=>{let s=fh(this.jt);if(s.xl){for(let n of(e.strokeStyle=s.Cl,fa(e,s.yl),e.beginPath(),s.kl)){let s=Math.round(n.Pl*r);e.moveTo(s,-i),e.lineTo(s,t.height+i)}e.stroke()}if(s.Tl){for(let r of(e.strokeStyle=s.Rl,fa(e,s.Dl),e.beginPath(),s.Il)){let s=Math.round(r.Pl*n);e.moveTo(-i,s),e.lineTo(t.width+i,s)}e.stroke()}})}}class pY{constructor(e){this.Xt=new pK,this.xt=!0,this.yt=e}kt(){this.xt=!0}Tt(){if(this.xt){let e=this.yt.Qt().N().grid,t={Tl:e.horzLines.visible,xl:e.vertLines.visible,Rl:e.horzLines.color,Cl:e.vertLines.color,Dl:e.horzLines.style,yl:e.vertLines.style,Il:this.yt.Rs().Vl(),kl:(this.yt.Qt().Et().Vl()||[]).map(e=>({Pl:e.coord}))};this.Xt.ht(t),this.xt=!1}return this.Xt}}class pq{constructor(e){this.$h=new pY(e)}pr(){return this.$h}}let pG={Bl:4,El:1e-4};function pJ(e,t){let r=100*(e-t)/t;return t<0?-r:r}function pX(e,t){return new po(pJ(e.Ze(),t),pJ(e.Ge(),t))}function pQ(e,t){let r=100*(e-t)/t+100;return t<0?-r:r}function pZ(e,t){return new po(pQ(e.Ze(),t),pQ(e.Ge(),t))}function p0(e,t){let r=Math.abs(e);if(r<1e-15)return 0;let n=Math.log10(r+t.El)+t.Bl;return e<0?-n:n}function p1(e,t){let r=Math.abs(e);if(r<1e-15)return 0;let n=Math.pow(10,r-t.Bl)-t.El;return e<0?-n:n}function p2(e,t){return null===e?null:new po(p0(e.Ze(),t),p0(e.Ge(),t))}function p3(e,t){return null===e?null:new po(p1(e.Ze(),t),p1(e.Ge(),t))}function p5(e){if(null===e)return pG;let t=Math.abs(e.Ge()-e.Ze());if(t>=1||t<1e-15)return pG;let r=Math.ceil(Math.abs(Math.log10(t))),n=pG.Bl+r;return{Bl:n,El:1/Math.pow(10,n)}}class p4{constructor(e,t){if(this.Al=e,this.Ll=t,function(e){if(e<0)return!1;if(e>1e18)return!0;for(let t=e;t>1;t/=10)if(t%10!=0)return!1;return!0}(this.Al))this.zl=[2,2.5,2];else{this.zl=[];for(let e=this.Al;1!==e;){if(e%2==0)this.zl.push(2),e/=2;else{if(e%5!=0)throw Error("unexpected base");this.zl.push(2,2.5),e/=5}if(this.zl.length>100)throw Error("something wrong with base")}}}Ol(e,t,r){let n=0===this.Al?0:1/this.Al,i=Math.pow(10,Math.max(0,Math.ceil(Math.log10(e-t)))),s=0,o=this.Ll[0];for(;;){let e=pH(i,n,1e-14)&&i>n+1e-14,t=pH(i,r*o,1e-14),a=pH(i,1,1e-14);if(!(e&&t&&a))break;i/=o,o=this.Ll[++s%this.Ll.length]}if(i<=n+1e-14&&(i=n),i=Math.max(1,i),this.zl.length>0&&1e-14>Math.abs(i-1))for(s=0,o=this.zl[0];pH(i,r*o,1e-14)&&i>n+1e-14;)i/=o,o=this.zl[++s%this.zl.length];return i}}class p8{constructor(e,t,r,n){this.Nl=[],this.Ki=e,this.Al=t,this.Fl=r,this.Wl=n}Ol(e,t){if(e<t)throw Error("high < low");let r=this.Ki.$t(),n=(e-t)*this.Hl()/r,i=new p4(this.Al,[2,2.5,2]),s=new p4(this.Al,[2,2,2.5]),o=new p4(this.Al,[2.5,2,2]),a=[];return a.push(i.Ol(e,t,n),s.Ol(e,t,n),o.Ol(e,t,n)),function(e){if(e.length<1)throw Error("array is empty");let t=e[0];for(let r=1;r<e.length;++r)e[r]<t&&(t=e[r]);return t}(a)}Ul(){let e=this.Ki,t=e.Lt();if(null===t)return void(this.Nl=[]);let r=e.$t(),n=this.Fl(r-1,t),i=this.Fl(0,t),s=this.Ki.N().entireTextOnly?this.$l()/2:0,o=s,a=r-1-s,l=Math.max(n,i),u=Math.min(n,i);if(l===u)return void(this.Nl=[]);let c=this.Ol(l,u);if(this.ql(t,c,l,u,o,a),e.jl()&&this.Yl(c,u,l)){let e=this.Ki.Kl();this.Zl(t,c,o,a,e,2*e)}let h=this.Nl.map(e=>e.Gl),d=this.Ki.Xl(h);for(let e=0;e<this.Nl.length;e++)this.Nl[e].Jl=d[e]}Vl(){return this.Nl}$l(){return this.Ki.k()}Hl(){return Math.ceil(2.5*this.$l())}ql(e,t,r,n,i,s){let o=this.Nl,a=this.Ki,l=r%t;l+=l<0?t:0;let u=r>=n?1:-1,c=null,h=0;for(let d=r-l;d>n;d-=t){let r=this.Wl(d,e,!0);null!==c&&Math.abs(r-c)<this.Hl()||r<i||r>s||(h<o.length?(o[h].Pl=r,o[h].Jl=a.Ql(d),o[h].Gl=d):o.push({Pl:r,Jl:a.Ql(d),Gl:d}),h++,c=r,a.io()&&(t=this.Ol(d*u,n)))}o.length=h}Zl(e,t,r,n,i,s){let o=this.Nl,a=this.so(e,r,i,s),l=this.so(e,n,-s,-i),u=this.Wl(0,e,!0)-this.Wl(t,e,!0);o.length>0&&o[0].Pl-a.Pl<u/2&&o.shift(),o.length>0&&l.Pl-o[o.length-1].Pl<u/2&&o.pop(),o.unshift(a),o.push(l)}so(e,t,r,n){let i=(r+n)/2,s=this.Fl(t+r,e),o=this.Fl(t+n,e),a=Math.min(s,o),l=Math.max(s,o),u=Math.max(.1,this.Ol(l,a)),c=this.Fl(t+i,e),h=c-c%u,d=this.Wl(h,e,!0);return{Jl:this.Ki.Ql(h),Pl:d,Gl:h}}Yl(e,t,r){let n=fd(this.Ki.er());return this.Ki.io()&&(n=p3(n,this.Ki.no())),n.Ze()-t<e&&r-n.Ge()<e}}function p6(e){return e.slice().sort((e,t)=>
1fh(e._s())-fh(t._s()))}!function(e){e[e.Normal=0]="Normal",e[e.Logarithmic=1]="Logarithmic",e[e.Percentage=2]="Percentage",e[e.IndexedTo100=3]="IndexedTo100"}(x||(x={}));let p7=new f1,p9=new f0(100,1);class me{constructor(e,t,r,n,i){this.eo=0,this.ro=null,this.sr=null,this.ho=null,this.ao={lo:!1,oo:null},this._o=!1,this.uo=0,this.co=0,this.do=new ff,this.fo=new ff,this.po=[],this.vo=null,this.mo=null,this.wo=null,this.Mo=null,this.bo=null,this.Ja=p9,this.So=p5(null),this.xo=e,this.Ps=t,this.Co=r,this.yo=n,this.ko=i,this.Po=new p8(this,100,this.To.bind(this),this.Ro.bind(this))}ol(){return this.xo}N(){return this.Ps}cr(e){if(fp(this.Ps,e),this._l(),void 0!==e.mode&&this.Do({ae:e.mode}),void 0!==e.scaleMargins){let t=fc(e.scaleMargins.top),r=fc(e.scaleMargins.bottom);if(t<0||t>1)throw Error(`Invalid top margin - expect value between 0 and 1, given=${t}`);if(r<0||r>1)throw Error(`Invalid bottom margin - expect value between 0 and 1, given=${r}`);if(t+r>1)throw Error(`Invalid margins - sum of margins must be less than 1, given=${t+r}`);this.Io(),this.wo=null}}Vo(){return this.Ps.autoScale}Bo(){return this._o}io(){return 1===this.Ps.mode}He(){return 2===this.Ps.mode}Eo(){return 3===this.Ps.mode}no(){return this.So}ae(){return{ln:this.Ps.autoScale,Ao:this.Ps.invertScale,ae:this.Ps.mode}}Do(e){let t=this.ae(),r=null;void 0!==e.ln&&(this.Ps.autoScale=e.ln),void 0!==e.ae&&(this.Ps.mode=e.ae,2!==e.ae&&3!==e.ae||(this.Ps.autoScale=!0),this.ao.lo=!1),1===t.ae&&e.ae!==t.ae&&(function(e,t){if(null===e)return!1;let r=p1(e.Ze(),t),n=p1(e.Ge(),t);return isFinite(r)&&isFinite(n)}(this.sr,this.So)?null!==(r=p3(this.sr,this.So))&&this.Lo(r):this.Ps.autoScale=!0),1===e.ae&&e.ae!==t.ae&&null!==(r=p2(this.sr,this.So))&&this.Lo(r);let n=t.ae!==this.Ps.mode;n&&(2===t.ae||this.He())&&this._l(),n&&(3===t.ae||this.Eo())&&this._l(),void 0!==e.Ao&&t.Ao!==e.Ao&&(this.Ps.invertScale=e.Ao,this.zo()),this.fo.p(t,this.ae())}Oo(){return this.fo}k(){return this.Co.fontSize}$t(){return this.eo}No(e){this.eo!==e&&(this.eo=e,this.Io(),this.wo=null)}Fo(){if(this.ro)return this.ro;let e=this.$t()-this.Wo()-this.Ho();return this.ro=e,e}er(){return this.Uo(),this.sr}Lo(e,t){let r=this.sr;(t||null===r&&null!==e||null!==r&&!r.Ye(e))&&(this.wo=null,this.sr=e)}$o(e){this.Lo(e),this.qo(null!==e)}Gi(){return this.Uo(),0===this.eo||!this.sr||this.sr.Gi()}jo(e){return this.Ao()?e:this.$t()-1-e}Nt(e,t){return this.He()?e=pJ(e,t):this.Eo()&&(e=pQ(e,t)),this.Ro(e,t)}Yo(e,t,r){this.Uo();let n=this.Ho(),i=fh(this.er()),s=i.Ze(),o=i.Ge(),a=this.Fo()-1,l=this.Ao(),u=a/(o-s),c=void 0===r?0:r.from,h=void 0===r?e.length:r.to,d=this.Ko();for(let r=c;r<h;r++){let i=e[r],o=i.gt;if(isNaN(o))continue;let a=o;null!==d&&(a=d(i.gt,t));let c=n+u*(a-s);i.ut=l?c:this.eo-1-c}}Zo(e,t,r){this.Uo();let n=this.Ho(),i=fh(this.er()),s=i.Ze(),o=i.Ge(),a=this.Fo()-1,l=this.Ao(),u=a/(o-s),c=void 0===r?0:r.from,h=void 0===r?e.length:r.to,d=this.Ko();for(let r=c;r<h;r++){let i=e[r],o=i.Hr,a=i.Ur,c=i.$r,h=i.qr;null!==d&&(o=d(i.Hr,t),a=d(i.Ur,t),c=d(i.$r,t),h=d(i.qr,t));let f=n+u*(o-s),p=l?f:this.eo-1-f;i.Go=p,f=n+u*(a-s),i.Xo=p=l?f:this.eo-1-f,f=n+u*(c-s),i.Jo=p=l?f:this.eo-1-f,f=n+u*(h-s),i.Qo=p=l?f:this.eo-1-f}}Ds(e,t){let r=this.To(e,t);return this.t_(r,t)}t_(e,t){let r=e;return this.He()?r=function(e,t){return t<0&&(e=-e),e/100*t+t}(r,t):this.Eo()&&(r=function(e,t){return e-=100,t<0&&(e=-e),e/100*t+t}(r,t)),r}Sl(){return this.po}Dt(){return this.mo||(this.mo=p6(this.po)),this.mo}i_(e){-1===this.po.indexOf(e)&&(this.po.push(e),this._l(),this.s_())}n_(e){let t=this.po.indexOf(e);if(-1===t)throw Error("source is not attached to scale");this.po.splice(t,1),0===this.po.length&&(this.Do({ln:!0}),this.Lo(null)),this._l(),this.s_()}Lt(){let e=null;for(let t of this.po){let r=t.Lt();null!==r&&(null===e||r.Ea<e.Ea)&&(e=r)}return null===e?null:e.Wt}Ao(){return this.Ps.invertScale}Vl(){let e=null===this.Lt();if(null!==this.wo&&(e||this.wo.e_===e))return this.wo.Vl;this.Po.Ul();let t=this.Po.Vl();return this.wo={Vl:t,e_:e},this.do.p(),t}r_(){return this.do}h_(e){this.He()||this.Eo()||null===this.Mo&&null===this.ho&&(this.Gi()||(this.Mo=this.eo-e,this.ho=fh(this.er()).Ke()))}a_(e){if(this.He()||this.Eo()||null===this.Mo)return;this.Do({ln:!1}),(e=this.eo-e)<0&&(e=0);let t=(this.Mo+.2*(this.eo-1))/(e+.2*(this.eo-1)),r=fh(this.ho).Ke();
1t=Math.max(t,.1),r.Je(t),this.Lo(r)}l_(){this.He()||this.Eo()||(this.Mo=null,this.ho=null)}o_(e){this.Vo()||null===this.bo&&null===this.ho&&(this.Gi()||(this.bo=e,this.ho=fh(this.er()).Ke()))}__(e){if(this.Vo()||null===this.bo)return;let t=fh(this.er()).Xe()/(this.Fo()-1),r=e-this.bo;this.Ao()&&(r*=-1);let n=r*t,i=fh(this.ho).Ke();i.Qe(n),this.Lo(i,!0),this.wo=null}u_(){this.Vo()||null!==this.bo&&(this.bo=null,this.ho=null)}Xa(){return this.Ja||this._l(),this.Ja}Ji(e,t){switch(this.Ps.mode){case 2:return this.c_(pJ(e,t));case 3:return this.Xa().format(pQ(e,t));default:return this.lr(e)}}Ql(e){switch(this.Ps.mode){case 2:return this.c_(e);case 3:return this.Xa().format(e);default:return this.lr(e)}}Xl(e){switch(this.Ps.mode){case 2:return this.d_(e);case 3:return this.Xa().formatTickmarks(e);default:return this.f_(e)}}Ma(e){return this.lr(e,fh(this.vo).Xa())}ba(e,t){return e=pJ(e,t),this.c_(e,p7)}p_(){return this.po}v_(e){this.ao={oo:e,lo:!1}}Ws(){this.po.forEach(e=>e.Ws())}jl(){return this.Ps.ensureEdgeTickMarksVisible&&this.Vo()}Kl(){return this.k()/2}_l(){this.wo=null;let e=1/0;for(let t of(this.vo=null,this.po))t._s()<e&&(e=t._s(),this.vo=t);let t=100;null!==this.vo&&(t=Math.round(this.vo.qh())),this.Ja=p9,this.He()?(this.Ja=p7,t=100):this.Eo()?(this.Ja=new f0(100,1),t=100):null!==this.vo&&(this.Ja=this.vo.Xa()),this.Po=new p8(this,t,this.To.bind(this),this.Ro.bind(this)),this.Po.Ul()}s_(){this.mo=null}m_(){return null===this.vo||this.He()||this.Eo()?1:1/this.vo.qh()}Xi(){return this.ko}qo(e){this._o=e}Wo(){return this.Ao()?this.Ps.scaleMargins.bottom*this.$t()+this.co:this.Ps.scaleMargins.top*this.$t()+this.uo}Ho(){return this.Ao()?this.Ps.scaleMargins.top*this.$t()+this.uo:this.Ps.scaleMargins.bottom*this.$t()+this.co}Uo(){this.ao.lo||(this.ao.lo=!0,this.w_())}Io(){this.ro=null}Ro(e,t){if(this.Uo(),this.Gi())return 0;e=this.io()&&e?p0(e,this.So):e;let r=fh(this.er()),n=this.Ho()+(this.Fo()-1)*(e-r.Ze())/r.Xe();return this.jo(n)}To(e,t){if(this.Uo(),this.Gi())return 0;let r=this.jo(e),n=fh(this.er()),i=n.Ze()+n.Xe()*((r-this.Ho())/(this.Fo()-1));return this.io()?p1(i,this.So):i}zo(){this.wo=null,this.Po.Ul()}w_(){var e,t;if(this.Bo()&&!this.Vo())return;let r=this.ao.oo;if(null===r)return;let n=null,i=this.p_(),s=0,o=0;for(let e of i){if(!e.It())continue;let t=e.Lt();if(null===t)continue;let i=e.ra(r.Aa(),r.bi()),a=i&&i.er();if(null!==a){switch(this.Ps.mode){case 1:a=p2(a,this.So);break;case 2:a=pX(a,t.Wt);break;case 3:a=pZ(a,t.Wt)}if(n=null===n?a:n.Sn(fh(a)),null!==i){let e=i.rr();null!==e&&(s=Math.max(s,e.above),o=Math.max(o,e.below))}}}if(this.jl()&&(s=Math.max(s,this.Kl()),o=Math.max(o,this.Kl())),s===this.uo&&o===this.co||(this.uo=s,this.co=o,this.wo=null,this.Io()),null!==n){if(n.Ze()===n.Ge()){let e=5*this.m_();this.io()&&(n=p3(n,this.So)),n=new po(n.Ze()-e,n.Ge()+e),this.io()&&(n=p2(n,this.So))}if(this.io()){let r=p3(n,this.So),i=p5(r);if(e=i,t=this.So,e.Bl!==t.Bl||e.El!==t.El){let e=null!==this.ho?p3(this.ho,this.So):null;this.So=i,n=p2(r,i),null!==e&&(this.ho=p2(e,i))}}this.Lo(n)}else null===this.sr&&(this.Lo(new po(-.5,.5)),this.So=p5(null))}Ko(){return this.He()?pJ:this.Eo()?pQ:this.io()?e=>p0(e,this.So):null}g_(e,t,r){return void 0===t?(void 0===r&&(r=this.Xa()),r.format(e)):t(e)}M_(e,t,r){return void 0===t?(void 0===r&&(r=this.Xa()),r.formatTickmarks(e)):t(e)}lr(e,t){return this.g_(e,this.yo.priceFormatter,t)}f_(e,t){let r=this.yo.priceFormatter;return this.M_(e,this.yo.tickmarksPriceFormatter??(r?e=>e.map(r):void 0),t)}c_(e,t){return this.g_(e,this.yo.percentageFormatter,t)}d_(e,t){let r=this.yo.percentageFormatter;return this.M_(e,this.yo.tickmarksPercentageFormatter??(r?e=>e.map(r):void 0),t)}}function mt(e){return e instanceof pF}class mr{constructor(e,t){this.po=[],this.b_=new Map,this.eo=0,this.S_=0,this.x_=1,this.mo=null,this.C_=!1,this.y_=new ff,this.ua=[],this.Jh=e,this.ns=t,this.k_=new pq(this);const r=t.N();this.P_=this.T_("left",r.leftPriceScale),this.R_=this.T_("right",r.rightPriceScale),this.P_.Oo().i(this.D_.bind(this,this.P_),this),this.R_.Oo().i(this.D_.bind(this,this.R_),this),this.I_(r)}I_(e){if(e.leftPriceScale&&this.P_.cr(e.leftPriceScale),e.rightPriceScale&&this.R_.cr(e.rightPriceScale),e.localization&&(this.P_._l(),this.R_._l()),e.overlayPriceScales)for(let t of Array.from(this.b_.values())
1){let r=fh(t[0].Ft());r.cr(e.overlayPriceScales),e.localization&&r._l()}}V_(e){switch(e){case"left":return this.P_;case"right":return this.R_}return this.b_.has(e)?fc(this.b_.get(e))[0].Ft():null}m(){this.Qt().B_().u(this),this.P_.Oo().u(this),this.R_.Oo().u(this),this.po.forEach(e=>{e.m&&e.m()}),this.ua=this.ua.filter(e=>{let t=e.Gh();return t.detached&&t.detached(),!1}),this.y_.p()}E_(){return this.x_}A_(e){this.x_=e}Qt(){return this.ns}ss(){return this.S_}$t(){return this.eo}L_(e){this.S_=e,this.z_()}No(e){this.eo=e,this.P_.No(e),this.R_.No(e),this.po.forEach(t=>{if(this.Zn(t)){let r=t.Ft();null!==r&&r.No(e)}}),this.z_()}O_(e){this.C_=e}N_(){return this.C_}F_(){return this.po.filter(mt)}Sl(){return this.po}Zn(e){let t=e.Ft();return null===t||this.P_!==t&&this.R_!==t}i_(e,t,r){this.W_(e,t,r?e._s():this.po.length)}n_(e,t){let r=this.po.indexOf(e);fu(-1!==r,"removeDataSource: invalid data source"),this.po.splice(r,1),t||this.po.forEach((e,t)=>e.us(t));let n=fh(e.Ft()).ol();if(this.b_.has(n)){let t=fc(this.b_.get(n)),r=t.indexOf(e);-1!==r&&(t.splice(r,1),0===t.length&&this.b_.delete(n))}let i=e.Ft();i&&i.Sl().indexOf(e)>=0&&(i.n_(e),this.H_(i)),this.mo=null}Xn(e){return e===this.P_?"left":e===this.R_?"right":"overlay"}U_(){return this.P_}q_(){return this.R_}j_(e,t){e.h_(t)}Y_(e,t){e.a_(t),this.z_()}K_(e){e.l_()}Z_(e,t){e.o_(t)}G_(e,t){e.__(t),this.z_()}X_(e){e.u_()}z_(){this.po.forEach(e=>{e.Ws()})}Rs(){let e=null;return this.ns.N().rightPriceScale.visible&&0!==this.R_.Sl().length?e=this.R_:this.ns.N().leftPriceScale.visible&&0!==this.P_.Sl().length?e=this.P_:0!==this.po.length&&(e=this.po[0].Ft()),null===e&&(e=this.R_),e}Gn(){let e=null;return this.ns.N().rightPriceScale.visible?e=this.R_:this.ns.N().leftPriceScale.visible&&(e=this.P_),e}H_(e){null!==e&&e.Vo()&&this.J_(e)}Q_(e){let t=this.Jh.Ie();e.Do({ln:!0}),null!==t&&e.v_(t),this.z_()}tu(){this.J_(this.P_),this.J_(this.R_)}iu(){this.H_(this.P_),this.H_(this.R_),this.po.forEach(e=>{this.Zn(e)&&this.H_(e.Ft())}),this.z_(),this.ns.dr()}Dt(){return null===this.mo&&(this.mo=p6(this.po)),this.mo}su(e,t){t=pW(t,0,this.po.length-1);let r=this.po.indexOf(e);for(let n of(fu(-1!==r,"setSeriesOrder: invalid data source"),this.po.splice(r,1),this.po.splice(t,0,e),this.po.forEach((e,t)=>e.us(t)),this.mo=null,[this.P_,this.R_]))n.s_(),n._l();this.ns.dr()}Vt(){return this.Dt().filter(mt)}nu(){return this.y_}eu(){return this.k_}nl(e){this.ua.push(new pk(e))}el(e){this.ua=this.ua.filter(t=>t.Gh()!==e),e.detached&&e.detached(),this.ns.dr()}ru(){return this.ua}Za(e,t){return this.ua.map(r=>r.Qn(e,t)).filter(e=>null!==e)}J_(e){let t=e.p_();if(t&&t.length>0&&!this.Jh.Gi()){let t=this.Jh.Ie();null!==t&&e.v_(t)}e.Ws()}W_(e,t,r){let n=this.V_(t);if(null===n&&(n=this.T_(t,this.ns.N().overlayPriceScales)),this.po.splice(r,0,e),!fG(t)){let r=this.b_.get(t)||[];r.push(e),this.b_.set(t,r)}e.us(r),n.i_(e),e.cs(n),this.H_(n),this.mo=null}D_(e,t,r){t.ae!==r.ae&&this.J_(e)}T_(e,t){let r=new me(e,{visible:!0,autoScale:!0,...fb(t)},this.ns.N().layout,this.ns.N().localization,this.ns.Xi());return r.No(this.$t()),r}}function mn(e){return{hu:e.hu,au:{te:e.lu.externalId},ou:e.lu.cursorStyle}}function mi(e,t,r,n){for(let i of e){let e=i.Tt(n);if(null!==e&&e.Qn){let n=e.Qn(t,r);if(null!==n)return{_u:i,au:n}}}return null}function ms(e){return void 0!==e.Ys}function mo(e,t,r){let n=[e,...e.Dt()],i=function(e,t,r){var n,i;let s,o;for(let a of e)for(let e of a.Za?.(t,r)??[])n=e.zOrder,(i=s?.zOrder)&&("top"!==n||"top"===i)&&("normal"!==n||"bottom"!==i)||(s=e,o=a);return s&&o?{lu:s,hu:o}:null}(n,t,r);if("top"===i?.lu.zOrder)return mn(i);for(let s of n){if(i&&i.hu===s&&"bottom"!==i.lu.zOrder&&!i.lu.isBackground)return mn(i);if(ms(s)){let n=mi(s.Ys(e),t,r,e);if(null!==n)return{hu:s,_u:n._u,au:n.au}}if(i&&i.hu===s&&"bottom"!==i.lu.zOrder&&i.lu.isBackground)return mn(i)}return i?.lu?mn(i):null}class ma{constructor(e,t,r=50){this.Vn=0,this.Bn=1,this.En=1,this.Ln=new Map,this.An=new Map,this.uu=e,this.cu=t,this.zn=r}du(e){let t=e.time,r=this.cu.cacheKey(t),n=this.Ln.get(r);if(void 0!==n)return n.fu;if(this.Vn===this.zn){let e=this.An.get(this.En);this.An.delete(this.En),this.Ln.delete(fc(e)),this.En++,this.Vn--}let i=this.uu(e);return this.Ln.set(r,{fu:i,Wn:this.Bn}),this.An.set(this.Bn,r),this.Vn++,this.Bn++,i}}class ml{constructor(e,t){fu(e<=t,"right should be >= left"),this.pu=e,this.vu=t}Aa(){return this.pu}bi(){return this.vu}mu(){return this.vu-this.pu+1}Ee(e){return this.pu<=e&&e<=this.vu}Ye(e){return this.pu===e.Aa()&&this.vu===e.bi()}}function mu(e,t){return null===e||null===t?e===t:e.Ye(t)}class mc{constructor(){this.wu=new Map,this.Ln=null,this.gu=!1}Mu(e){this.gu=e,this.Ln=null}bu(e,t){this.Su(t),this.Ln=null;for(let r=t;r<e.length;++r){let t=e[r],n=this.wu.get(t.timeWeight);
1void 0===n&&(n=[],this.wu.set(t.timeWeight,n)),n.push({index:r,time:t.time,weight:t.timeWeight,originalTime:t.originalTime})}}xu(e,t,r,n,i){let s=Math.ceil(t/e);return null!==this.Ln&&this.Ln.Cu===s&&i===this.Ln.yu&&r===this.Ln.ku||(this.Ln={yu:i,ku:r,Vl:this.Pu(s,r,n),Cu:s}),this.Ln.Vl}Su(e){if(0===e)return void this.wu.clear();let t=[];for(let r of(this.wu.forEach((r,n)=>{e<=r[0].index?t.push(n):r.splice(py(r,e,t=>t.index<e),1/0)}),t))this.wu.delete(r)}Pu(e,t,r){let n=[],i=e=>!t||r.has(e.index);for(let t of Array.from(this.wu.keys()).sort((e,t)=>t-e)){if(!this.wu.get(t))continue;let r=n;n=[];let s=r.length,o=0,a=fc(this.wu.get(t)),l=a.length,u=1/0,c=-1/0;for(let t=0;t<l;t++){let l=a[t],h=l.index;for(;o<s;){let e=r[o],t=e.index;if(!(t<h&&i(e))){u=t;break}o++,n.push(e),c=t,u=1/0}if(u-h>=e&&h-c>=e&&i(l))n.push(l),c=h;else if(this.gu)return r}for(;o<s;o++)i(r[o])&&n.push(r[o])}return n}}class mh{constructor(e){this.Tu=e}Ru(){return null===this.Tu?null:new ml(Math.floor(this.Tu.Aa()),Math.ceil(this.Tu.bi()))}Du(){return this.Tu}static Iu(){return new mh(null)}}function md(e,t){return e.weight>t.weight?e:t}class mf{constructor(e,t,r,n){this.S_=0,this.Vu=null,this.Bu=[],this.bo=null,this.Mo=null,this.Eu=new mc,this.Au=new Map,this.Lu=mh.Iu(),this.zu=!0,this.Ou=new ff,this.Nu=new ff,this.Fu=new ff,this.Wu=null,this.Hu=null,this.Uu=new Map,this.$u=-1,this.qu=[],this.ju=1,this.Ps=t,this.yo=r,this.Yu=t.rightOffset,this.Ku=t.barSpacing,this.ns=e,this.Zu(t),this.cu=n,this.Gu(),this.Eu.Mu(t.uniformDistribution),this.Xu(),this.Ju()}N(){return this.Ps}Qu(e){fp(this.yo,e),this.tc(),this.Gu()}cr(e,t){fp(this.Ps,e),this.Ps.fixLeftEdge&&this.sc(),this.Ps.fixRightEdge&&this.nc(),void 0!==e.barSpacing&&this.ns.gn(e.barSpacing),void 0!==e.rightOffset&&this.ns.Mn(e.rightOffset),this.Zu(e),void 0===e.minBarSpacing&&void 0===e.maxBarSpacing||this.ns.gn(e.barSpacing??this.Ku),void 0!==e.ignoreWhitespaceIndices&&e.ignoreWhitespaceIndices!==this.Ps.ignoreWhitespaceIndices&&this.Ju(),this.tc(),this.Gu(),void 0===e.enableConflation&&void 0===e.conflationThresholdFactor||this.Xu(),this.Fu.p()}Is(e){return this.Bu[e]?.time??null}es(e){return this.Bu[e]??null}ec(e,t){if(this.Bu.length<1)return null;if(this.cu.key(e)>this.cu.key(this.Bu[this.Bu.length-1].time))return t?this.Bu.length-1:null;let r=py(this.Bu,this.cu.key(e),(e,t)=>this.cu.key(e.time)<t);return this.cu.key(e)<this.cu.key(this.Bu[r].time)?t?r:null:r}Gi(){return 0===this.S_||0===this.Bu.length||null===this.Vu}rc(){return this.Bu.length>0}Ie(){return this.hc(),this.Lu.Ru()}ac(){return this.hc(),this.Lu.Du()}lc(){let e=this.Ie();if(null===e)return null;let t={from:e.Aa(),to:e.bi()};return this.oc(t)}oc(e){let t=Math.round(e.from),r=Math.round(e.to),n=fh(this._c()),i=fh(this.uc());return{from:fh(this.es(Math.max(n,t))),to:fh(this.es(Math.min(i,r)))}}cc(e){return{from:fh(this.ec(e.from,!0)),to:fh(this.ec(e.to,!0))}}ss(){return this.S_}L_(e){if(!isFinite(e)||e<=0||this.S_===e)return;let t=this.ac(),r=this.S_;if(this.S_=e,this.zu=!0,this.Ps.lockVisibleTimeRangeOnResize&&0!==r){let t=this.Ku*e/r;this.Ku=t}if(this.Ps.fixLeftEdge&&null!==t&&0>=t.Aa()){let t=r-e;this.Yu-=Math.round(t/this.Ku)+1,this.zu=!0}this.dc(),this.fc()}qt(e){if(this.Gi()||!fg(e))return 0;let t=this.vc()+this.Yu-e;return this.S_-(t+.5)*this.Ku-1}mc(e,t){let r=this.vc(),n=void 0===t?0:t.from,i=void 0===t?e.length:t.to;for(let t=n;t<i;t++){let n=e[t].wt,i=r+this.Yu-n,s=this.S_-(i+.5)*this.Ku-1;e[t]._t=s}}wc(e,t){let r=Math.ceil(this.gc(e));return t&&this.Ps.ignoreWhitespaceIndices&&!this.Mc(r)?this.bc(r):r}Mn(e){this.zu=!0,this.Yu=e,this.fc(),this.ns.Sc(),this.ns.dr()}ul(){return this.Ku}gn(e){let t=this.Ku;if(this.xc(e),void 0!==this.Ps.rightOffsetPixels&&0!==t){let e=this.Yu*t/this.Ku;this.Yu=e}this.fc(),this.ns.Sc(),this.ns.dr()}Cc(){return this.Yu}Vl(){if(this.Gi())return null;if(null!==this.Hu)return this.Hu;let e=this.Ku,t=5*(this.ns.N().layout.fontSize+4)/8*(this.Ps.tickMarkMaxCharacterLength||8),r=Math.round(t/e),n=fh(this.Ie()),i=Math.max(n.Aa(),n.Aa()-r),s=Math.max(n.bi(),n.bi()-r),o=this.Eu.xu(e,t,this.Ps.ignoreWhitespaceIndices,this.Uu,this.$u),a=this._c()+r,l=this.uc()-r,u=this.yc(),c=this.Ps.fixLeftEdge||u,h=this.Ps.fixRightEdge||u,d=0;for(let e of o){let r;i<=e.index&&e.index<=s&&(d<this.qu.length?((r=this.qu[d]).coord=this.qt(e.index),r.label=this.kc(e),r.weight=e.weight):(r={needAlignCoordinate:!1,coord:this.qt(e.index),label:this.kc(e),weight:e.weight},this.qu.push(r)),this.Ku>
1t/2&&!u?r.needAlignCoordinate=!1:r.needAlignCoordinate=c&&e.index<=a||h&&e.index>=l,d++)}return this.qu.length=d,this.Hu=this.qu,this.qu}Pc(){let e;this.zu=!0,this.gn(this.Ps.barSpacing),e=void 0!==this.Ps.rightOffsetPixels?this.Ps.rightOffsetPixels/this.ul():this.Ps.rightOffset,this.Mn(e)}Tc(e){this.zu=!0,this.Vu=e,this.fc(),this.sc()}Rc(e,t){let r=this.gc(e),n=this.ul(),i=n+n/10*t;this.gn(i),this.Ps.rightBarStaysOnScroll||this.Mn(this.Cc()+(r-this.gc(e)))}h_(e){this.bo&&this.u_(),null===this.Mo&&null===this.Wu&&(this.Gi()||(this.Mo=e,this.Dc()))}a_(e){if(null===this.Wu)return;let t=pW(this.S_-e,0,this.S_),r=pW(this.S_-fh(this.Mo),0,this.S_);0!==t&&0!==r&&this.gn(this.Wu.ul*t/r)}l_(){null!==this.Mo&&(this.Mo=null,this.Ic())}o_(e){null===this.bo&&null===this.Wu&&(this.Gi()||(this.bo=e,this.Dc()))}__(e){if(null===this.bo)return;let t=(this.bo-e)/this.ul();this.Yu=fh(this.Wu).Cc+t,this.zu=!0,this.fc()}u_(){null!==this.bo&&(this.bo=null,this.Ic())}Vc(){this.Bc(this.Ps.rightOffset)}Bc(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 r=this.Yu,n=performance.now();this.ns.vn({Ec:e=>(e-n)/t>=1,Ac:i=>{let s=(i-n)/t;return s>=1?e:r+(e-r)*s}})}kt(e,t){this.zu=!0,this.Bu=e,this.Eu.bu(e,t),this.fc()}Lc(){return this.Ou}zc(){return this.Nu}Oc(){return this.Fu}vc(){return this.Vu||0}Nc(e,t){let r=e.mu(),n=t&&this.Ps.rightOffsetPixels||0;this.xc((this.S_-n)/r),this.Yu=e.bi()-this.vc(),t&&(this.Yu=n?n/this.ul():this.Ps.rightOffset),this.fc(),this.zu=!0,this.ns.Sc(),this.ns.dr()}Fc(){let e=this._c(),t=this.uc();if(null===e||null===t)return;let r=!this.Ps.rightOffsetPixels&&this.Ps.rightOffset||0;this.Nc(new ml(e,t+r),!0)}Wc(e){let t=new ml(e.from,e.to);this.Nc(t)}rs(e){return void 0!==this.yo.timeFormatter?this.yo.timeFormatter(e.originalTime):this.cu.formatHorzItem(e.time)}Ju(){if(this.Ps.ignoreWhitespaceIndices){for(let e of(this.Uu.clear(),this.ns.tn()))for(let t of e.ll())this.Uu.set(t,!0);this.$u++}}Hc(){return this.ju}vl(){let e=1/(window.devicePixelRatio||1),t=this.Ps.minBarSpacing;if(t>=e)return[1];let r=[1],n=2;for(;n<=512;)t<e/n&&r.push(n),n*=2;return r}yc(){let e=this.ns.N().handleScroll,t=this.ns.N().handleScale;return!(e.horzTouchDrag||e.mouseWheel||e.pressedMouseMove||e.vertTouchDrag||t.axisDoubleClickReset.time||t.axisPressedMouseMove.time||t.mouseWheel||t.pinch)}_c(){return 0===this.Bu.length?null:0}uc(){return 0===this.Bu.length?null:this.Bu.length-1}Uc(e){return(this.S_-1-e)/this.Ku}gc(e){let t=this.Uc(e);return Math.round(1e6*(this.vc()+this.Yu-t))/1e6}xc(e){let t=this.Ku;this.Ku=e,this.dc(),t!==this.Ku&&(this.zu=!0,this.$c(),this.Xu())}hc(){if(!this.zu)return;if(this.zu=!1,this.Gi())return void this.qc(mh.Iu());let e=this.vc(),t=this.S_/this.Ku,r=this.Yu+e,n=new ml(r-t+1,r);this.qc(new mh(n))}dc(){let e=pW(this.Ku,this.jc(),this.Yc());this.Ku!==e&&(this.Ku=e,this.zu=!0)}Yc(){return this.Ps.maxBarSpacing>0?this.Ps.maxBarSpacing:.5*this.S_}jc(){return this.Ps.fixLeftEdge&&this.Ps.fixRightEdge&&0!==this.Bu.length?this.S_/this.Bu.length:this.Ps.minBarSpacing}Xu(){if(!this.Ps.enableConflation)return void(this.ju=1);let e=1/(window.devicePixelRatio||1)*(this.Ps.conflationThresholdFactor??1);if(this.Ku>=e)return void(this.ju=1);let t=Math.pow(2,Math.floor(Math.log2(e/this.Ku)));this.ju=Math.min(t,512)}fc(){let e=this.Kc();null!==e&&this.Yu<e&&(this.Yu=e,this.zu=!0);let t=this.Zc();this.Yu>t&&(this.Yu=t,this.zu=!0)}Kc(){let e=this._c(),t=this.Vu;return null===e||null===t?null:e-t-1+(this.Ps.fixLeftEdge?this.S_/this.Ku:Math.min(2,this.Bu.length))}Zc(){return this.Ps.fixRightEdge?0:this.S_/this.Ku-Math.min(2,this.Bu.length)}Dc(){this.Wu={ul:this.ul(),Cc:this.Cc()}}Ic(){this.Wu=null}kc(e){let t=this.Au.get(e.weight);return void 0===t&&(t=new ma(e=>this.Gc(e),this.cu),this.Au.set(e.weight,t)),t.du(e)}Gc(e){return this.cu.formatTickmark(e,this.yo)}qc(e){let t=this.Lu;this.Lu=e,mu(t.Ru(),this.Lu.Ru())||this.Ou.p(),mu(t.Du(),this.Lu.Du())||this.Nu.p(),this.$c()}$c(){this.Hu=null}tc(){this.$c(),this.Au.clear()}Gu(){this.cu.updateFormatter(this.yo)}sc(){if(!this.Ps.fixLeftEdge)return;let e=this._c();if(null===e)return;let t=this.Ie();if(null===t)return;let r=t.Aa()-e;if(r<0){let e=this.Yu-r-1;this.Mn(e)}this.dc()}nc(){this.fc(),this.dc()}Mc(e){return!this.Ps.ignoreWhitespaceIndices||this.Uu.get(e)||!1}bc(e){let t=function*(e){let t=Math.round(e),r=t<e,n=1;for(;;)r?(yield t+n,yield t-n):(yield t-n,yield t+n),n++}(e),r=this.uc();for(;r;){let e=t.next().value;if(this.Uu.get(e))return e;if(e<0||e>r)break}return e}Zu(e){if(void 0!==e.rightOffsetPixels){let t=e.rightOffsetPixels/(e.barSpacing||this.Ku);this.ns.Mn(t)}}}!function(e){e[e.OnTouchEnd=0]="OnTouchEnd",e[e.OnNextTap=1]="OnNextTap"}(S||(S={}));class mp{constructor(e,t,r){this.Xc=[],this.Jc=[],this.Qc=null,this.S_=0,this.td=null,this.sd=new ff,this.nd=new ff,this.ed=null,this.rd=e,this.Ps=t,this.cu=r,this.ko=new fP(this.Ps.layout.colorParsers),this.hd=new fM(this),this.Jh=new mf(this,t.timeScale,this.Ps.localization,r),this.Ct=new fq(this,t.crosshair),this.ad=new pU(t.crosshair),t.addDefaultPane&&(this.ld(0),this.Xc[0].A_(2)),this.od=this._d(0),this.ud=this._d(1)}Ca(){this.dd(fJ.yn())}dr(){this.dd(fJ.Cn())}Ua(){this.dd(new fJ(1))}ya(e){let t=this.fd(e);this.dd(t)}pd(){return this.td}vd(e){if(this.td?.hu===e?.hu&&this.td?.au?.te===e?.au?.te)return;let t=this.td;this.td=e,null!==t&&this.ya(t.hu),null!==e&&e.hu!==t?.hu&&this.ya(e.hu)}N(){return this.Ps}cr(e){fp(this.Ps,e),this.Xc.forEach(t=>t.I_(e)),void 0!==e.timeScale&&this.Jh.cr(e.timeScale),void 0!==e.localization&&this.Jh.Qu(e.localization),(e.leftPriceScale||e.rightPriceScale)&&this.sd.p(),this.od=this._d(0),this.ud=this._d(1),this.Ca()}md(e,t,r=0){let n=this.Xc[r];if(void 0===n)return;if("left"===e)return fp(this.Ps,{leftPriceScale:t}),n.I_({leftPriceScale:t}),this.sd.p(),void this.Ca();if("right"===e)return fp(this.Ps,{rightPriceScale:t}),n.I_({rightPriceScale:t}),this.sd.p(),void this.Ca();let i=this.wd(e,r);null!==i&&(i.Ft.cr(t),this.sd.p())}wd(e,t){let r=this.Xc[t];if(void 0===r)return null;let n=r.V_(e);return null!==n?{Gs:r,Ft:n}:null}Et(){return this.Jh}Xs(){return this.Xc}gd(){return this.Ct}Md(){return this.nd}bd(e,t){e.No(t),this.Sc()}L_(e){this.S_=e,this.Jh.L_(this.S_),this.Xc.forEach(t=>t.L_(e)),this.Sc()}Sd(e){1!==this.Xc.length&&(fu(e>=0&&e<this.Xc.length,"Invalid pane index"),this.Xc.splice(e,1),this.Ca())}xd(e,t){if(this.Xc.length<2)return;fu(e>=0&&e<this.Xc.length,"Invalid pane index");let r=this.Xc[e],n=this.Xc.reduce((e,t)=>
1e+t.E_(),0),i=this.Xc.reduce((e,t)=>e+t.$t(),0),s=i-30*(this.Xc.length-1);t=Math.min(s,Math.max(30,t));let o=n/i,a=r.$t();r.A_(t*o);let l=t-a,u=this.Xc.length-1;for(let e of this.Xc)if(e!==r){let t=Math.min(s,Math.max(30,e.$t()-l/u));l-=e.$t()-t,u-=1;let r=t*o;e.A_(r)}this.Ca()}Cd(e,t){fu(e>=0&&e<this.Xc.length&&t>=0&&t<this.Xc.length,"Invalid pane index");let r=this.Xc[e],n=this.Xc[t];this.Xc[e]=n,this.Xc[t]=r,this.Ca()}yd(e,t){if(fu(e>=0&&e<this.Xc.length&&t>=0&&t<this.Xc.length,"Invalid pane index"),e===t)return;let[r]=this.Xc.splice(e,1);this.Xc.splice(t,0,r),this.Ca()}j_(e,t,r){e.j_(t,r)}Y_(e,t,r){e.Y_(t,r),this.ka(),this.dd(this.kd(e,2))}K_(e,t){e.K_(t),this.dd(this.kd(e,2))}Z_(e,t,r){t.Vo()||e.Z_(t,r)}G_(e,t,r){t.Vo()||(e.G_(t,r),this.ka(),this.dd(this.kd(e,2)))}X_(e,t){t.Vo()||(e.X_(t),this.dd(this.kd(e,2)))}Q_(e,t){e.Q_(t),this.dd(this.kd(e,2))}Pd(e){this.Jh.h_(e)}Td(e,t){let r=this.Et();if(r.Gi()||0===t)return;let n=r.ss();e=Math.max(1,Math.min(e,n)),r.Rc(e,t),this.Sc()}Rd(e){this.Dd(0),this.Id(e),this.Vd()}Bd(e){this.Jh.a_(e),this.Sc()}Ed(){this.Jh.l_(),this.dr()}Dd(e){this.Jh.o_(e)}Id(e){this.Jh.__(e),this.Sc()}Vd(){this.Jh.u_(),this.dr()}tn(){return this.Jc}Us(){return null===this.Qc&&(this.Qc=this.Jc.filter(e=>e.It())),this.Qc}xa(){this.Qc=null}Ad(e,t,r,n,i){this.Ct.Bs(e,t);let s=NaN,o=this.Jh.wc(e,!0),a=this.Jh.Ie();null!==a&&(o=Math.min(Math.max(a.Aa(),o),a.bi())),o=this.Ct.Hs(o);let l=n.Rs(),u=l.Lt();if(null!==u&&(s=l.Ds(t,u)),s=this.ad.bl(s,o,n),this.Ct.zs(o,s,n),this.Ua(),!i){let i=mo(n,e,t);this.vd(i&&{hu:i.hu,au:i.au,ou:i.ou||null}),this.nd.p(this.Ct.Bt(),{x:e,y:t},r)}}Ld(e,t,r){let n=r.Rs(),i=n.Lt(),s=n.Nt(e,fh(i)),o=this.Jh.ec(t,!0),a=this.Jh.qt(fh(o));this.Ad(a,s,null,r,!0)}zd(e){this.gd().Ns(),this.Ua(),e||this.nd.p(null,null,null)}ka(){let e=this.Ct.Gs();if(null!==e){let t=this.Ct.As(),r=this.Ct.Ls();this.Ad(t,r,null,e)}this.Ct.Ws()}Od(e,t,r){let n=this.Jh.Is(0);void 0!==t&&void 0!==r&&this.Jh.kt(t,r);let i=this.Jh.Is(0),s=this.Jh.vc(),o=this.Jh.Ie();if(null!==o&&null!==n&&null!==i){let t=o.Ee(s),a=this.cu.key(n)>this.cu.key(i),l=null!==e&&e>s&&!a,u=this.Jh.N().allowShiftVisibleRangeOnWhitespaceReplacement,c=t&&(void 0!==r||u)&&this.Jh.N().shiftVisibleRangeOnNewBar;if(l&&!c){let t=e-s;this.Jh.Mn(this.Jh.Cc()-t)}}this.Jh.Tc(e)}Ra(e){null!==e&&e.iu()}Kn(e){if(e instanceof mr)return e;let t=this.Xc.find(t=>t.Dt().includes(e));return void 0===t?null:t}Sc(){this.Xc.forEach(e=>e.iu()),this.ka()}m(){this.Xc.forEach(e=>e.m()),this.Xc.length=0,this.Ps.localization.priceFormatter=void 0,this.Ps.localization.percentageFormatter=void 0,this.Ps.localization.timeFormatter=void 0}Nd(){return this.hd}Jn(){return this.hd.N()}B_(){return this.sd}Fd(e,t){let r=this.ld(t);this.Wd(e,r),this.Jc.push(e),this.xa(),1===this.Jc.length?this.Ca():this.dr()}Hd(e){let t=this.Kn(e),r=this.Jc.indexOf(e);fu(-1!==r,"Series not found");let n=fh(t);this.Jc.splice(r,1),n.n_(e),e.m&&e.m(),this.xa(),this.Jh.Ju(),this.Ud(n)}Sa(e,t){let r=fh(this.Kn(e));r.n_(e,!0),r.i_(e,t,!0)}Fc(){let e=fJ.Cn();e.cn(),this.dd(e)}$d(e){let t=fJ.Cn();t.pn(e),this.dd(t)}wn(){let e=fJ.Cn();e.wn(),this.dd(e)}gn(e){let t=fJ.Cn();t.gn(e),this.dd(t)}Mn(e){let t=fJ.Cn();t.Mn(e),this.dd(t)}vn(e){let t=fJ.Cn();t.vn(e),this.dd(t)}dn(){let e=fJ.Cn();e.dn(),this.dd(e)}qd(){return this.Ps.rightPriceScale.visible?"right":"left"}jd(e,t){if(fu(t>=0,"Index should be greater or equal to 0"),t===this.Yd(e))return;let r=fh(this.Kn(e));r.n_(e);let n=this.ld(t);this.Wd(e,n),0===r.Sl().length&&this.Ud(r),this.Ca()}Kd(){return this.ud}$(){return this.od}Ut(e){let t=this.ud,r=this.od;if(t===r)return t;if(e=Math.max(0,Math.min(100,Math.round(100*e))),null===this.ed||this.ed.eh!==r||this.ed.rh!==t)this.ed={eh:r,rh:t,Zd:new Map};else{let t=this.ed.Zd.get(e);if(void 0!==t)return t}let n=this.ko.tt(r,t,e/100);return this.ed.Zd.set(e,n),n}Gd(e){return this.Xc.indexOf(e)}Xi(){return this.ko}Xd(){return this.Jd()}Jd(e){let t=new mr(this.Jh,this);this.Xc.push(t);let r=e??this.Xc.length-1,n=fJ.yn();return n.hn(r,{an:0,ln:!0}),this.dd(n),t}ld(e){return fu(e>=0,"Index should be greater or equal to 0"),(e=Math.min(this.Xc.length,e))<this.Xc.length?this.Xc[e]:this.Jd(e)}Yd(e){return this.Xc.findIndex(t=>t.F_().includes(e))}kd(e,t){let r=new fJ(t);if(null!==e){let n=this.Xc.indexOf(e);r.hn(n,{an:t})}return r}fd(e,t){return void 0===t&&(t=2),this.kd(this.Kn(e),t)}
1dd(e){this.rd&&this.rd(e),this.Xc.forEach(e=>e.eu().pr().kt())}Wd(e,t){let r=e.N().priceScaleId,n=void 0!==r?r:this.qd();t.i_(e,n),fG(n)||e.cr(e.N())}_d(e){let t=this.Ps.layout;return"gradient"===t.background.type?0===e?t.background.topColor:t.background.bottomColor:t.background.color}Ud(e){!e.N_()&&0===e.Sl().length&&this.Xc.length>1&&this.Xc.splice(this.Gd(e),1)}}function mm(e){if(e>=1)return 0;let t=0;for(;t<8&&!(1e-8>Math.abs(Math.round(e)-e));t++)e*=10;return t}function mg(e){return!fm(e)&&!fv(e)}function mv(e){return fm(e)}!function(e){e[e.Disabled=0]="Disabled",e[e.Continuous=1]="Continuous",e[e.OnDataUpdate=2]="OnDataUpdate"}(_||(_={})),function(e){e[e.LastBar=0]="LastBar",e[e.LastVisible=1]="LastVisible"}(M||(M={})),function(e){e.Solid="solid",e.VerticalGradient="gradient"}(O||(O={})),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"}(E||(E={}));let my=e=>e.getUTCFullYear();function mb(e,t,r){let n,i,s,o;return t.replace(/yyyy/g,fZ(my(e),4)).replace(/yy/g,fZ(my(e)%100,2)).replace(/MMMM/g,(n=e,i=r,new Date(n.getUTCFullYear(),n.getUTCMonth(),1).toLocaleString(i,{month:"long"}))).replace(/MMM/g,(s=e,o=r,new Date(s.getUTCFullYear(),s.getUTCMonth(),1).toLocaleString(o,{month:"short"}))).replace(/MM/g,fZ(e.getUTCMonth()+1,2)).replace(/dd/g,fZ(e.getUTCDate(),2))}class mw{constructor(e="yyyy-MM-dd",t="default"){this.Qd=e,this.tf=t}du(e){return mb(e,this.Qd,this.tf)}}class mx{constructor(e){this.if=e||"%h:%m:%s"}du(e){return this.if.replace("%h",fZ(e.getUTCHours(),2)).replace("%m",fZ(e.getUTCMinutes(),2)).replace("%s",fZ(e.getUTCSeconds(),2))}}let mS={sf:"yyyy-MM-dd",nf:"%h:%m:%s",ef:" ",rf:"default"};class m_{constructor(e={}){const t={...mS,...e};this.hf=new mw(t.sf,t.rf),this.af=new mx(t.nf),this.lf=t.ef}du(e){return`${this.hf.du(e)}${this.lf}${this.af.du(e)}`}}function mM(e){return 60*e*6e4}function mO(e){return 60*e*1e3}let mE=[{_f:1e3,uf:10},{_f:mO(1),uf:20},{_f:mO(5),uf:21},{_f:mO(30),uf:22},{_f:mM(1),uf:30},{_f:mM(3),uf:31},{_f:mM(6),uf:32},{_f:mM(12),uf:33}];function mP(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 r=mE.length-1;r>=0;--r)if(Math.floor(t.getTime()/mE[r]._f)!==Math.floor(e.getTime()/mE[r]._f))return mE[r].uf;return 0}function mk(e){let t=e;if(fv(e)&&(t=mj(e)),!mg(t))throw Error("time must be of type BusinessDay");return{cf:Math.round(new Date(Date.UTC(t.year,t.month-1,t.day,0,0,0,0)).getTime()/1e3),df:t}}function mA(e){if(!mv(e))throw Error("time must be of type isUTCTimestamp");return{cf:e}}function mj(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 mC(e){fv(e.time)&&(e.time=mj(e.time))}class mN{options(){return this.Ps}setOptions(e){this.Ps=e,this.updateFormatter(e.localization)}preprocessData(e){Array.isArray(e)?function(e){e.forEach(mC)}(e):mC(e)}createConverterToInternalObj(e){return fh(function(e){return 0===e.length?null:mg(e[0].time)||fv(e[0].time)?mk:mA}(e))}key(e){return"object"==typeof e&&"cf"in e?e.cf:this.key(this.convertHorzItemToInternal(e))}cacheKey(e){let t=e;return void 0===t.df?new Date(1e3*t.cf).getTime():new Date(Date.UTC(t.df.year,t.df.month-1,t.df.day)).getTime()}convertHorzItemToInternal(e){var t;return mv(t=e)?mA(t):mg(t)?mk(t):mk(mj(t))}updateFormatter(e){if(!this.Ps)return;let t=e.dateFormat;this.Ps.timeScale.timeVisible?this.ff=new m_({sf:t,nf:this.Ps.timeScale.secondsVisible?"%h:%m:%s":"%h:%m",ef:"   ",rf:e.locale}):this.ff=new mw(t,e.locale)}formatHorzItem(e){let t=e;return this.ff.du(new Date(1e3*t.cf))}formatTickmark(e,t){let r=function(e,t,r){switch(e){case 0:case 10:return t?r?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.Ps.timeScale.timeVisible,this.Ps.timeScale.secondsVisible),n=this.Ps.timeScale;if(void 0!==n.tickMarkFormatter){let i=n.tickMarkFormatter(e.originalTime,r,t.locale);if(null!==i)return i}return function(e,t,r){let n={};switch(t){case 0:n.year="numeric";break;case 1:n.month="short";break;case 2:n.day="numeric";break;case 3:n.hour12=!1,n.hour="2-digit",n.minute="2-digit";break;case 4:n.hour12=!1,n.hour="2-digit",n.minute="2-digit",n.second="2-digit"}let i=new Date(void 0===e.df?1e3*e.cf:Date.UTC(e.df.year,e.df.month-1,e.df.day));return new Date(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()).toLocaleStr
1ing(r,n)}(e.time,r,t.locale)}maxTickMarkWeight(e){let t=e.reduce(md,e[0]).weight;return t>30&&t<50&&(t=30),t}fillWeightsForPoints(e,t){!function(e,t=0){if(0===e.length)return;let r=0===t?null:e[t-1].time.cf,n=null!==r?new Date(1e3*r):null,i=0;for(let s=t;s<e.length;++s){let t=e[s],o=new Date(1e3*t.time.cf);null!==n&&(t.timeWeight=mP(o,n)),i+=t.time.cf-(r||t.time.cf),r=t.time.cf,n=o}if(0===t&&e.length>1){let t=Math.ceil(i/(e.length-1)),r=new Date(1e3*(e[0].time.cf-t));e[0].timeWeight=mP(new Date(1e3*e[0].time.cf),r)}}(e,t)}static pf(e){return fp({localization:{dateFormat:"dd MMM 'yy"}},e??{})}}let mT="u">typeof window;function mR(){return!!mT&&window.navigator.userAgent.toLowerCase().indexOf("firefox")>-1}function mI(){return!!mT&&/iPhone|iPad|iPod/.test(window.navigator.platform)}function mD(e){return e+e%2}function mL(e){mT&&void 0!==window.chrome&&e.addEventListener("mousedown",e=>{if(1===e.button)return e.preventDefault(),!1})}class mV{constructor(e,t,r){this.vf=0,this.mf=null,this.wf={_t:-1/0,ut:1/0},this.gf=0,this.Mf=null,this.bf={_t:-1/0,ut:1/0},this.Sf=null,this.xf=!1,this.Cf=null,this.yf=null,this.kf=!1,this.Pf=!1,this.Tf=!1,this.Rf=null,this.Df=null,this.If=null,this.Vf=null,this.Bf=null,this.Ef=null,this.Af=null,this.Lf=0,this.zf=!1,this.Of=!1,this.Nf=!1,this.Ff=0,this.Wf=null,this.Hf=!mI(),this.Uf=e=>{this.$f(e)},this.qf=e=>{if(this.jf(e)){let t=this.Yf(e);if(++this.gf,this.Mf&&this.gf>1){let{Kf:r}=this.Zf(mB(e),this.bf);r<30&&!this.Tf&&this.Gf(t,this.Jf.Xf),this.Qf()}}else{let t=this.Yf(e);if(++this.vf,this.mf&&this.vf>1){let{Kf:r}=this.Zf(mB(e),this.wf);r<5&&!this.Pf&&this.tp(t,this.Jf.ip),this.sp()}}},this.np=e,this.Jf=t,this.Ps=r,this.ep()}m(){null!==this.Rf&&(this.Rf(),this.Rf=null),null!==this.Df&&(this.Df(),this.Df=null),null!==this.Vf&&(this.Vf(),this.Vf=null),null!==this.Bf&&(this.Bf(),this.Bf=null),null!==this.Ef&&(this.Ef(),this.Ef=null),null!==this.If&&(this.If(),this.If=null),this.rp(),this.sp()}hp(e){this.Vf&&this.Vf();let t=this.ap.bind(this);if(this.Vf=()=>{this.np.removeEventListener("mousemove",t)},this.np.addEventListener("mousemove",t),this.jf(e))return;let r=this.Yf(e);this.tp(r,this.Jf.lp),this.Hf=!0}sp(){null!==this.mf&&clearTimeout(this.mf),this.vf=0,this.mf=null,this.wf={_t:-1/0,ut:1/0}}Qf(){null!==this.Mf&&clearTimeout(this.Mf),this.gf=0,this.Mf=null,this.bf={_t:-1/0,ut:1/0}}ap(e){if(this.Nf||null!==this.yf||this.jf(e))return;let t=this.Yf(e);this.tp(t,this.Jf.op),this.Hf=!0}_p(e){let t=mU(e.changedTouches,fh(this.Wf));if(null===t||(this.Ff=m$(e),null!==this.Af)||this.Of)return;this.zf=!0;let{up:r,cp:n,Kf:i}=this.Zf(mB(t),fh(this.yf));if(this.kf||!(i<5)){if(!this.kf){let e=.5*r,t=n>=e&&!this.Ps.dp(),i=e>n&&!this.Ps.fp();t||i||(this.Of=!0),this.kf=!0,this.Tf=!0,this.rp(),this.Qf()}if(!this.Of){let r=this.Yf(e,t);this.Gf(r,this.Jf.pp),mF(e)}}}vp(e){if(0!==e.button)return;let{Kf:t}=this.Zf(mB(e),fh(this.Cf));if(t>=5&&(this.Pf=!0,this.sp()),this.Pf){let t=this.Yf(e);this.tp(t,this.Jf.mp)}}Zf(e,t){let r=Math.abs(t._t-e._t),n=Math.abs(t.ut-e.ut);return{up:r,cp:n,Kf:r+n}}wp(e){let t=mU(e.changedTouches,fh(this.Wf));if(null===t&&0===e.touches.length&&(t=e.changedTouches[0]),null===t)return;this.Wf=null,this.Ff=m$(e),this.rp(),this.yf=null,this.Ef&&(this.Ef(),this.Ef=null);let r=this.Yf(e,t);if(this.Gf(r,this.Jf.gp),++this.gf,this.Mf&&this.gf>1){let{Kf:e}=this.Zf(mB(t),this.bf);e<30&&!this.Tf&&this.Gf(r,this.Jf.Xf),this.Qf()}else this.Tf||(this.Gf(r,this.Jf.Mp),this.Jf.Mp&&mF(e));0===this.gf&&mF(e),0===e.touches.length&&this.xf&&(this.xf=!1,mF(e))}$f(e){if(0!==e.button)return;let t=this.Yf(e);if(this.Cf=null,this.Nf=!1,this.Bf&&(this.Bf(),this.Bf=null),mR()&&this.np.ownerDocument.documentElement.removeEventListener("mouseleave",this.Uf),!this.jf(e))if(this.tp(t,this.Jf.bp),++this.vf,this.mf&&this.vf>1){let{Kf:r}=this.Zf(mB(e),this.wf);r<5&&!this.Pf&&this.tp(t,this.Jf.ip),this.sp()}else this.Pf||this.tp(t,this.Jf.Sp)}rp(){null!==this.Sf&&(clearTimeout(this.Sf),this.Sf=null)}xp(e){if(null!==this.Wf)return;let t=e.changedTouches[0];this.Wf=t.identifier,this.Ff=m$(e);let r=this.np.ownerDocument.documentElement;this.Tf=!1,this.kf=!1,this.Of=!1,this.yf=mB(t),this.Ef&&(this.Ef(),this.Ef=null);{let t=this._p.bind(this),n=this.wp.bind(this);this.Ef=()=>{r.removeEventListener("touchmove",t),r.removeEventListener("touchend",n)},r.addEventListener("touchmove",t,{passive:!1}),r.addEventListener("touchend",n,{passive:!1}),this.rp(),this.Sf=setTimeout(this.Cp.bind(this,e),240)}let n=this.Yf(e,t);this.Gf(n,this.Jf.yp),this.Mf||(this.gf=0,this.Mf=setTimeout(this.Qf.bind(this),500),this.bf=mB(t))}kp(e){if(0!==e.button)return;let t=this.np.ownerDocument.documentElement;mR()&&t.addEventListener("mouseleave",this.Uf),this.Pf=!1,this.Cf=mB(e),this.Bf&&(this.Bf(),this.Bf=null);{let e=this.vp.bind(this),r=this.$f.bind(this);this.Bf=()=>{t.removeEventListener("mousemove",e),t.removeEventListener("mouseup",r)},t.addEventListener("mousemove",e),t.addEventListener("mouseup",r)}if(this.Nf=!0,this.jf(e))return;let r=this.Yf(e);this.tp(r,this.Jf.Pp),this.mf||(this.vf=0,this.mf=setTimeout(this.sp.bind(this),500),this.wf=mB(e))}ep(){this.np.addEventListener("mouseenter",this.hp.bind(this)),this.np.addEventListener("touchcancel",this.rp.bind(this));{let e=this.np.ownerDocument,t=e=>{this.Jf.Tp&&(e.composed&&this.np.contains(e.composedPath()[0])||e.target&&this.np.contains(e.target)||this.Jf.Tp())};this.Df=()=>{e.removeEventListener("touchstart",t)},this.Rf=()=>{e.removeEventListener("mousedown",t)},e.addEventListener("mousedown",t),e.addEventListener("touchstart",t,{passive:!0})}mI()&&(this.If=()=>{this.np.removeEventListener("dblclick",this.qf)},this.np.addEventListener("dblclick",this.qf)),this.np.addEventListener("mouseleave",this.Rp.bind(this)),this.np.addEventListener("touchstart",this.xp.bind(this),{passive:!0}),mL(this.np),this.np.addEventListener("mousedown",this.kp.bind(this)),this.Dp(),this.np.addEventListener("touchmove",()=>{},{passive:!1})}Dp(){void 0===this.Jf.Ip&&void 0===this.Jf.Vp&&void 0===this.Jf.Bp||(this.np.addEventListener("touchstart",e=>this.Ep(e.touches),{passive:!0}),this.np.addEventListener("touchmove",e=>{if(2===e.touches.length&&null!==this.Af&&void 0!==this.Jf.Vp){let t=mz(e.touches[0],e.touches[1])/this.Lf;this.Jf.Vp(this.Af,t),mF(e)}},{passive:!1}),this.np.addEventListener("touchend",e=>{this.Ep(e.touches)}))}Ep(e){1===e.length&&(this.zf=!1),2!==e.length||this.zf||this.xf?this.Ap():this.Lp(e)}Lp(e){let t=this.np.getBoundingClientRect()||{left:0,top:0};this.Af={_t:(e[0].clientX-t.left+(e[1].clientX-t.left))/2,ut:(e[0].clientY-t.top+(e[1].clientY-t.top))/2},this.Lf=mz(e[0],e[1]),void 0!==this.Jf.Ip&&this.Jf.Ip(),this.rp()}Ap(){null!==this.Af&&(this.Af=null,void 0!==this.Jf.Bp&&this.Jf.Bp())}Rp(e){if(this.Vf&&this.Vf(),this.jf(e)||!this.Hf)return;let t=this.Yf(e);this.tp(t,this.Jf.zp),this.Hf=!mI()}Cp(e){let t=mU(e.touches,fh(this.Wf));if(null===t)return;let r=this.Yf(e,t);this.Gf(r,this.Jf.Op),this.Tf=!0,this.xf=!0}jf(e){return e.sourceCapabilities&&void 0!==e.sourceCapabilities.firesTouchEvents?e.sourceCapabilities.firesTouchEvents:m$(e)<this.Ff+500}Gf(e,t){t&&t.call(this.Jf,e)}tp(e,t){t&&t.call(this.Jf,e)}Yf(e,t){let r=t||e,n=this.np.getBoundingClientRect()||{left:0,top:0};return{clientX:r.clientX,clientY:r.clientY,pageX:r.pageX,pageY:r.pageY,screenX:r.screenX,screenY:r.screenY,localX:r.clientX-n.left,localY:r.clientY-n.top,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,Np:!e.type.startsWith("mouse")&&"contextmenu"!==e.type&&"click"!==e.type,Fp:e.type,Wp:r.target,_u:e.view,Hp:()=>{"touchstart"!==e.type&&mF(e)}}}}function mz(e,t){let r=e.clientX-t.clientX,n=e.clientY-t.clientY;return Math.sqrt(r*r+n*n)}function mF(e){e.cancelable&&e.preventDefault()}function mB(e){return{_t:e.pageX,ut:e.pageY}}function m$(e){return e.timeStamp||performance.now()}function mU(e,t){for(let r=0;r<e.length;++r)if(e[r].identifier===t)return e[r];return null}class mW{constructor(e,t,r){this.Up=null,this.$p=null,this.qp=!0,this.jp=null,this.Yp=e,this.Kp=e.Zp()[t],this.Gp=e.Zp()[r],this.Xp=document.createElement("tr"),this.Xp.style.height="1px",this.Jp=document.createElement("td"),this.Jp.style.position="relative",this.Jp.style.padding="0",this.Jp.style.margin="0",this.Jp.setAttribute("colspan","3"),this.Qp(),this.Xp.appendChild(this.Jp),this.qp=this.Yp.N().layout.panes.enableResize,this.qp?this.tv():(this.Up=null,this.$p=null)}m(){null!==this.$p&&this.$p.m()}iv(){return this.Xp}sv(){return d4({width:this.Kp.sv().width,height:1})}nv(){return d4({width:this.Kp.nv().width,height:+window.devicePixelRatio})}ev(e,t,r){let n=this.nv();e.fillStyle=this.Yp.N().layout.panes.separatorColor,e.fillRect(t,r,n.width,n.height)}kt(){this.Qp(),this.Yp.N().layout.panes.enableResize!==this.qp&&(this.qp=this.Yp.N().layout.panes.enableResize,this.qp?this.tv():(null!==this.Up&&(this.Jp.removeChild(this.Up.rv),this.Jp.removeChild(this.Up.hv),this.Up=null),null!==this.$p&&(this.$p.m(),this.$p=null)))}tv(){let e=document.createElement("div"),t=e.style;t.position="fixed",t.display="none",t.zIndex="49",t.top="0",t.left="0",t.width="100%",t.height="100%",t.cursor="row-resize",this.Jp.appendChild(e);let r=document.createElement("div"),n=r.style;
1n.position="absolute",n.zIndex="50",n.top="-4px",n.height="9px",n.width="100%",n.backgroundColor="",n.cursor="row-resize",this.Jp.appendChild(r);let i={lp:this.av.bind(this),zp:this.lv.bind(this),Pp:this.ov.bind(this),yp:this.ov.bind(this),mp:this._v.bind(this),pp:this._v.bind(this),bp:this.uv.bind(this),gp:this.uv.bind(this)};this.$p=new mV(r,i,{dp:()=>!1,fp:()=>!0}),this.Up={hv:r,rv:e}}Qp(){this.Jp.style.background=this.Yp.N().layout.panes.separatorColor}av(e){null!==this.Up&&(this.Up.hv.style.backgroundColor=this.Yp.N().layout.panes.separatorHoverColor)}lv(e){null!==this.Up&&null===this.jp&&(this.Up.hv.style.backgroundColor="")}ov(e){if(null===this.Up)return;let t=this.Kp.cv().E_()+this.Gp.cv().E_(),r=t/(this.Kp.sv().height+this.Gp.sv().height),n=30*r;t<=2*n||(this.jp={dv:e.pageY,fv:this.Kp.cv().E_(),pv:t-n,vv:t,mv:r,wv:n},this.Up.rv.style.display="block")}_v(e){let t=this.jp;if(null===t)return;let r=(e.pageY-t.dv)*t.mv,n=pW(t.fv+r,t.wv,t.pv);this.Kp.cv().A_(n),this.Gp.cv().A_(t.vv-n),this.Yp.Qt().Ca()}uv(e){null!==this.jp&&null!==this.Up&&(this.jp=null,this.Up.rv.style.display="none")}}function mH(e,t){return e.gv-t.gv}function mK(e,t,r){let n=(e.gv-t.gv)/(e.wt-t.wt);return Math.sign(n)*Math.min(Math.abs(n),r)}class mY{constructor(e,t,r,n){this.Mv=null,this.bv=null,this.Sv=null,this.xv=null,this.Cv=null,this.yv=0,this.kv=0,this.Pv=e,this.Tv=t,this.Rv=r,this.kn=n}Dv(e,t){if(null!==this.Mv){if(this.Mv.wt===t)return void(this.Mv.gv=e);if(Math.abs(this.Mv.gv-e)<this.kn)return}this.xv=this.Sv,this.Sv=this.bv,this.bv=this.Mv,this.Mv={wt:t,gv:e}}fe(e,t){if(null===this.Mv||null===this.bv||t-this.Mv.wt>50)return;let r=0,n=mK(this.Mv,this.bv,this.Tv),i=mH(this.Mv,this.bv),s=[n],o=[i];if(r+=i,null!==this.Sv){let e=mK(this.bv,this.Sv,this.Tv);if(Math.sign(e)===Math.sign(n)){let t=mH(this.bv,this.Sv);if(s.push(e),o.push(t),r+=t,null!==this.xv){let e=mK(this.Sv,this.xv,this.Tv);if(Math.sign(e)===Math.sign(n)){let t=mH(this.Sv,this.xv);s.push(e),o.push(t),r+=t}}}}let a=0;for(let e=0;e<s.length;++e)a+=o[e]/r*s[e];Math.abs(a)<this.Pv||(this.Cv={gv:e,wt:t},this.kv=a,this.yv=function(e,t){let r=Math.log(t);return Math.log(-(r/e))/r}(Math.abs(a),this.Rv))}Ac(e){let t=fh(this.Cv),r=e-t.wt;return t.gv+this.kv*(Math.pow(this.Rv,r)-1)/Math.log(this.Rv)}Ec(e){return null===this.Cv||this.Iv(e)===this.yv}Iv(e){return Math.min(e-fh(this.Cv).wt,this.yv)}}class mq{constructor(e,t){this.Vv=void 0,this.Bv=void 0,this.Ev=void 0,this.ws=!1,this.Av=e,this.Lv=t,this.zv()}kt(){this.zv()}Ov(){this.Vv&&this.Av.removeChild(this.Vv),this.Bv&&this.Av.removeChild(this.Bv),this.Vv=void 0,this.Bv=void 0}Nv(){return this.ws!==this.Fv()||this.Ev!==this.Wv()}Wv(){return this.Lv.Qt().Xi().J(this.Lv.N().layout.textColor)>160?"dark":"light"}Fv(){return this.Lv.N().layout.attributionLogo}Hv(){let e=new URL(location.href);return e.hostname?"&utm_source="+e.hostname+e.pathname:""}zv(){this.Nv()&&(this.Ov(),this.ws=this.Fv(),this.ws&&(this.Ev=this.Wv(),this.Bv=document.createElement("style"),this.Bv.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.Vv=document.createElement("a"),this.Vv.href=`https://www.tradingview.com/?utm_medium=lwc-link&utm_campaign=lwc-chart${this.Hv()}`,this.Vv.title="Charting by TradingView",this.Vv.id="tv-attr-logo",this.Vv.target="_blank",this.Vv.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" 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.Vv.toggleAttribute("data-dark","dark"===this.Ev),this.Av.appendChild(this.Bv),this.Av.appendChild(this.Vv)))}}function mG(e,t){let r=fh(e.ownerDocument).createElement("canvas");e.appendChild(r);let n=fe(r,{type:"device-pixel-content-box",options:{allowResizeObserver:!0},transform:(e,t)=>
1({width:Math.max(e.width,t.width),height:Math.max(e.height,t.height)})});return n.resizeCanvasElement(t),n}function mJ(e){e.width=1,e.height=1,e.getContext("2d")?.clearRect(0,0,1,1)}function mX(e,t,r,n){e.Uh&&e.Uh(t,r,n)}function mQ(e,t,r,n){e.nt(t,r,n)}function mZ(e,t,r,n){for(let i of e(r,n)){let e=i.Tt(n);null!==e&&t(e)}}function m0(e,t){return r=>!function(e){return void 0!==e.Ft}(r)||(r.Ft()?.ol()??"")!==t?[]:r.Ya?.(e)??[]}function m1(e,t,r,n){if(!e.length)return;let i=0,s=e[0].$t(n,!0),o=1===t?r/2-(e[0].Hi()-s/2):e[0].Hi()-s/2-r/2;o=Math.max(0,o);for(let s=1;s<e.length;s++){let a=e[s],l=e[s-1],u=l.$t(n,!1),c=a.Hi(),h=l.Hi();if(1===t?c>h-u:c<h+u){let n=h-u*t;a.Ui(n);let s=n-t*u/2;if((1===t?s<0:s>r)&&o>0){let n=Math.min(1===t?-1-s:s-r,o);for(let r=i;r<e.length;r++)e[r].Ui(e[r].Hi()+t*n);o-=n}}else i=s,o=1===t?h-u-c:c-(h+u)}}class m2{constructor(e,t,r,n){this.Ki=null,this.Uv=null,this.$v=!1,this.qv=new f5(200),this.jv=null,this.Yv=0,this.Kv=!1,this.Zv=()=>{this.Kv||this.yt.Gv().Qt().dr()},this.Xv=()=>{this.Kv||this.yt.Gv().Qt().dr()},this.yt=e,this.Ps=t,this.Co=t.layout,this.hd=r,this.Jv="left"===n,this.Qv=m0("normal",n),this.tm=m0("top",n),this.im=m0("bottom",n),this.Jp=document.createElement("div"),this.Jp.style.height="100%",this.Jp.style.overflow="hidden",this.Jp.style.width="25px",this.Jp.style.left="0",this.Jp.style.position="relative",this.sm=mG(this.Jp,d4({width:16,height:16})),this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv);const i=this.sm.canvasElement;i.style.position="absolute",i.style.zIndex="1",i.style.left="0",i.style.top="0",this.nm=mG(this.Jp,d4({width:16,height:16})),this.nm.subscribeSuggestedBitmapSizeChanged(this.Xv);const s=this.nm.canvasElement;s.style.position="absolute",s.style.zIndex="2",s.style.left="0",s.style.top="0";const o={Pp:this.ov.bind(this),yp:this.ov.bind(this),mp:this._v.bind(this),pp:this._v.bind(this),Tp:this.rm.bind(this),bp:this.uv.bind(this),gp:this.uv.bind(this),ip:this.hm.bind(this),Xf:this.hm.bind(this),lp:this.am.bind(this),zp:this.lv.bind(this)};this.$p=new mV(this.nm.canvasElement,o,{dp:()=>!this.Ps.handleScroll.vertTouchDrag,fp:()=>!0})}m(){this.$p.m(),this.nm.unsubscribeSuggestedBitmapSizeChanged(this.Xv),mJ(this.nm.canvasElement),this.nm.dispose(),this.sm.unsubscribeSuggestedBitmapSizeChanged(this.Zv),mJ(this.sm.canvasElement),this.sm.dispose(),null!==this.Ki&&this.Ki.r_().u(this),this.Ki=null}iv(){return this.Jp}k(){return this.Co.fontSize}lm(){let e=this.hd.N();return this.jv!==e.P&&(this.qv.On(),this.jv=e.P),e}om(){var e;if(null===this.Ki)return 0;let t=0,r=this.lm(),n=fh(this.sm.canvasElement.getContext("2d",{colorSpace:this.yt.Gv().N().layout.colorSpace}));n.save();let i=this.Ki.Vl();n.font=this._m(),i.length>0&&(t=Math.max(this.qv.Ii(n,i[0].Jl),this.qv.Ii(n,i[i.length-1].Jl)));let s=this.um();for(let e=s.length;e--;){let r=this.qv.Ii(n,s[e].ri());r>t&&(t=r)}let o=this.Ki.Lt();if(null!==o&&null!==this.Uv&&2!==(e=this.Ps.crosshair).mode&&e.horzLine.visible&&e.horzLine.labelVisible){let e=this.Ki.Ds(1,o),r=this.Ki.Ds(this.Uv.height-2,o);t=Math.max(t,this.qv.Ii(n,this.Ki.Ji(Math.floor(Math.min(e,r))+.11111111111111,o)),this.qv.Ii(n,this.Ki.Ji(Math.ceil(Math.max(e,r))-.11111111111111,o)))}n.restore();let a=t||34;return mD(Math.ceil(r.S+r.C+r.V+r.B+5+a))}dm(e){null!==this.Uv&&d8(this.Uv,e)||(this.Uv=e,this.Kv=!0,this.sm.resizeCanvasElement(e),this.nm.resizeCanvasElement(e),this.Kv=!1,this.Jp.style.width=`${e.width}px`,this.Jp.style.height=`${e.height}px`)}fm(){return fh(this.Uv).width}cs(e){this.Ki!==e&&(null!==this.Ki&&this.Ki.r_().u(this),this.Ki=e,e.r_().i(this.do.bind(this),this))}Ft(){return this.Ki}On(){let e=this.yt.cv();this.yt.Gv().Qt().Q_(e,fh(this.Ft()))}pm(e){if(null===this.Uv)return;let t={colorSpace:this.yt.Gv().N().layout.colorSpace};if(1!==e){this.vm(),this.sm.applySuggestedBitmapSize();let e=fs(this.sm,t);null!==e&&(e.useBitmapCoordinateSpace(e=>{this.wm(e),this.gm(e)}),this.yt.Mm(e,this.im),this.bm(e),this.yt.Mm(e,this.Qv),this.Sm(e))}this.nm.applySuggestedBitmapSize();let r=fs(this.nm,t);null!==r&&(r.useBitmapCoordinateSpace(({context:e,bitmapSize:t})=>{e.clearRect(0,0,t.width,t.height)}),this.xm(r),this.yt.Mm(r,this.tm))}nv(){return this.sm.bitmapSize}ev(e,t,r,n){let i=this.nv();if(i.width>0&&i.height>0&&(e.drawImage(this.sm.canvasElement,t,r),n)){let n=this.nm.canvasElement;e.drawImage(n,t,r)}}kt(){this.Ki?.Vl()}ov(e){if(null===this.Ki||this.Ki.Gi()||!this.Ps.handleScale.axisPressedMouseMove.price)return;let t=this.yt.Gv().Qt(),r=this.yt.cv();this.$v=!0,t.j_(r,this.Ki,e.localY)}_v(e){if(null===this.Ki||!this.Ps.handleScale.axisPressedMouseMove.price)return;let t=this.yt.Gv().Qt(),r=this.yt.cv(),n=this.Ki;t.Y_(r,n,e.localY)}rm(){if(null===this.Ki||!this.Ps.handleScale.axisPressedMouseMove.price)return;let e=this.yt.Gv().Qt(),t=this.yt.cv(),r=this.Ki;this.$v&&(this.$v=!1,e.K_(t,r))}uv(e){if(null===this.Ki||!this.Ps.handleScale.axisPressedMouseMove.price)return;let t=this.yt.Gv().Qt(),r=this.yt.cv();this.$v=!1,t.K_(r,this.Ki)}hm(e){this.Ps.handleScale.axisDoubleClickReset.price&&this.On()}am(e){null!==this.Ki&&(!this.yt.Gv().Qt().N().handleScale.axisPressedMouseMove.price||this.Ki.He()||this.Ki.Eo()||this.Cm(1))}lv(e){this.Cm(0)}um(){let e=[],t=null===this.Ki?void 0:this.Ki;return(r=>{for(let n=0;n<r.length;++n){let i=r[n].Ks(this.yt.cv(),t);for(let t=0;t<i.length;t++)e.push(i[t])}})(this.yt.cv().Dt()),e}wm({context:e,bitmapSize:t}){let{width:r,height:n}=t,i=this.yt.cv().Qt(),s=i.$(),o=i.Kd();s===o?fL(e,0,0,r,n,s):fF(e,0,0,r,n,s,o)}gm({context:e,bitmapSize:t,horizontalPixelRatio:r}){let n;if(null===this.Uv||null===this.Ki||!this.Ki.N().borderVisible)return;e.fillStyle=this.Ki.N().borderColor;let i=Math.max(1,Math.floor(this.lm().S*r));n=this.Jv?t.width-i:0,e.fillRect(n,0,i,t.height)}bm(e){if(null===this.Uv||null===this.Ki)return;let t=this.Ki.Vl(),r=this.Ki.N(),n=this.lm(),i=this.Jv?this.Uv.width-n.C:0;r.borderVisible&&r.ticksVisible&&e.useBitmapCoordinateSpace(({context:e,horizontalPixelRatio:s,verticalPixelRatio:o})=>{e.fillStyle=r.borderColor;let a=Math.max(1,Math.floor(o)),l=Math.floor(.5*o),u=Math.round(n.C*s);for(let r of(e.beginPath(),t))e.rect(Math.floor(i*s),Math.round(r.Pl*o)-l,u,a);e.fill()}),e.useMediaCoordinateSpace(({context:e})=>{e.font=this._m(),e.fillStyle=r.textColor??this.Co.textColor,e.textAlign=this.Jv?"right":"left",e.textBaseline="middle";let s=this.Jv?Math.round(i-n.V):Math.round(i+n.C+n.V),o=t.map(t=>this.qv.Di(e,t.Jl));for(let r=t.length;r--;){let n=t[r];e.fillText(n.Jl,s,n.Pl+o[r])}})}vm(){if(null===this.Uv||null===this.Ki)return;let e=this.Uv.height/2,t=[],r=this.Ki.Dt().slice(),n=this.yt.cv(),i=this.lm();
1this.Ki===n.Gn()&&this.yt.cv().Dt().forEach(e=>{n.Zn(e)&&r.push(e)});let s=this.Ki.Sl()[0],o=this.Ki;r.forEach(r=>{let i=r.Ks(n,o);i.forEach(e=>{e.$i()&&null===e.Wi()&&(e.Ui(null),t.push(e))}),s===r&&i.length>0&&(e=i[0].Ei())}),this.Ki.N().alignLabels&&this.ym(t,i,e)}ym(e,t,r){if(null===this.Uv)return;let n=e.filter(e=>e.Ei()<=r),i=e.filter(e=>e.Ei()>r);for(let r of(n.sort((e,t)=>t.Ei()-e.Ei()),n.length&&i.length&&i.push(n[0]),i.sort((e,t)=>e.Ei()-t.Ei()),e)){let e=Math.floor(r.$t(t)/2),n=r.Ei();n>-e&&n<e&&r.Ui(e),n>this.Uv.height-e&&n<this.Uv.height+e&&r.Ui(this.Uv.height-e)}m1(n,1,this.Uv.height,t),m1(i,-1,this.Uv.height,t)}Sm(e){if(null===this.Uv)return;let t=this.um(),r=this.lm(),n=this.Jv?"right":"left";t.forEach(t=>{t.qi()&&t.Tt(fh(this.Ki)).nt(e,r,this.qv,n)})}xm(e){if(null===this.Uv||null===this.Ki)return;let t=this.yt.Gv().Qt(),r=[],n=this.yt.cv(),i=t.gd().Ks(n,this.Ki);i.length&&r.push(i);let s=this.lm(),o=this.Jv?"right":"left";r.forEach(t=>{t.forEach(t=>{t.Tt(fh(this.Ki)).nt(e,s,this.qv,o)})})}Cm(e){this.Jp.style.cursor=1===e?"ns-resize":"default"}do(){let e=this.om();this.Yv<e&&this.yt.Gv().Qt().Ca(),this.Yv=e}_m(){return f_(this.Co.fontSize,this.Co.fontFamily)}}function m3(e,t){return e.qa?.(t)??[]}function m5(e,t){return e.Ys?.(t)??[]}function m4(e,t){return e.ds?.(t)??[]}function m8(e,t){return e.Ha?.(t)??[]}class m6{constructor(e,t){this.Uv=d4({width:0,height:0}),this.km=null,this.Pm=null,this.Tm=null,this.Rm=null,this.Dm=!1,this.Im=new ff,this.Vm=new ff,this.Bm=0,this.Em=!1,this.Am=null,this.Lm=!1,this.zm=null,this.Om=null,this.Kv=!1,this.Zv=()=>{this.Kv||null===this.Nm||this.ns().dr()},this.Xv=()=>{this.Kv||null===this.Nm||this.ns().dr()},this.Lv=e,this.Nm=t,this.Nm.nu().i(this.Fm.bind(this),this,!0),this.Wm=document.createElement("td"),this.Wm.style.padding="0",this.Wm.style.position="relative";const r=document.createElement("div");r.style.width="100%",r.style.height="100%",r.style.position="relative",r.style.overflow="hidden",this.Hm=document.createElement("td"),this.Hm.style.padding="0",this.Um=document.createElement("td"),this.Um.style.padding="0",this.Wm.appendChild(r),this.sm=mG(r,d4({width:16,height:16})),this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv);const n=this.sm.canvasElement;n.style.position="absolute",n.style.zIndex="1",n.style.left="0",n.style.top="0",this.nm=mG(r,d4({width:16,height:16})),this.nm.subscribeSuggestedBitmapSizeChanged(this.Xv);const i=this.nm.canvasElement;i.style.position="absolute",i.style.zIndex="2",i.style.left="0",i.style.top="0",this.Xp=document.createElement("tr"),this.Xp.appendChild(this.Hm),this.Xp.appendChild(this.Wm),this.Xp.appendChild(this.Um),this.$m(),this.$p=new mV(this.nm.canvasElement,this,{dp:()=>null===this.Am&&!this.Lv.N().handleScroll.vertTouchDrag,fp:()=>null===this.Am&&!this.Lv.N().handleScroll.horzTouchDrag})}m(){null!==this.km&&this.km.m(),null!==this.Pm&&this.Pm.m(),this.Tm=null,this.nm.unsubscribeSuggestedBitmapSizeChanged(this.Xv),mJ(this.nm.canvasElement),this.nm.dispose(),this.sm.unsubscribeSuggestedBitmapSizeChanged(this.Zv),mJ(this.sm.canvasElement),this.sm.dispose(),null!==this.Nm&&(this.Nm.nu().u(this),this.Nm.m()),this.$p.m()}cv(){return fh(this.Nm)}qm(e){null!==this.Nm&&this.Nm.nu().u(this),this.Nm=e,null!==this.Nm&&this.Nm.nu().i(m6.prototype.Fm.bind(this),this,!0),this.$m(),this.Lv.Zp().indexOf(this)===this.Lv.Zp().length-1?(this.Tm=this.Tm??new mq(this.Wm,this.Lv),this.Tm.kt()):(this.Tm?.Ov(),this.Tm=null)}Gv(){return this.Lv}iv(){return this.Xp}$m(){if(null!==this.Nm&&(this.jm(),0!==this.ns().tn().length)){if(null!==this.km){let e=this.Nm.U_();this.km.cs(fh(e))}if(null!==this.Pm){let e=this.Nm.q_();this.Pm.cs(fh(e))}}}Ym(){null!==this.km&&this.km.kt(),null!==this.Pm&&this.Pm.kt()}E_(){return null!==this.Nm?this.Nm.E_():0}A_(e){this.Nm&&this.Nm.A_(e)}lp(e){if(!this.Nm)return;this.Km();let t=e.localX,r=e.localY;this.Zm(t,r,e)}Pp(e){this.Km(),this.Gm(),this.Zm(e.localX,e.localY,e)}op(e){if(!this.Nm)return;this.Km();let t=e.localX,r=e.localY;this.Zm(t,r,e)}Sp(e){null!==this.Nm&&(this.Km(),this.Xm(e))}ip(e){null!==this.Nm&&this.Jm(this.Vm,e)}Xf(e){this.ip(e)}mp(e){this.Km(),this.Qm(e),this.Zm(e.localX,e.localY,e)}bp(e){null!==this.Nm&&(this.Km(),this.Em=!1,this.tw(e))}Mp(e){null!==this.Nm&&this.Xm(e)}Op(e){if(this.Em=!0,null===this.Am){let t={x:e.localX,y:e.localY};this.iw(t,t,e)}}zp(e){null!==this.Nm&&(this.Km(),this.Nm.Qt().vd(null),this.sw())}nw(){return this.Im}ew(){return this.Vm}Ip(){this.Bm=1,this.ns().dn()}Vp(e,t){if(!this.Lv.N().handleScale.pinch)return;let r=5*(t-this.Bm);this.Bm=t,this.ns().Td(e._t,r)}yp(e){this.Em=!1,this.Lm=null!==this.Am,this.Gm();let t=this.ns().gd();null!==this.Am&&t.It()&&(this.zm={x:t.si(),y:t.ni()},this.Am={x:e.localX,y:e.localY})}pp(e){if(null===this.Nm)return;let t=e.localX,r=e.localY;if(null===this.Am)this.Qm(e);else{this.Lm=!1;let n=fh(this.zm),i=n.x+(t-this.Am.x),s=n.y+(r-this.Am.y);this.Zm(i,s,e)}}gp(e){0===this.Gv().N().trackingMode.exitMode&&(this.Lm=!0),this.rw(),this.tw(e)}Qn(e,t){let r=this.Nm;return null===r?null:mo(r,e,t)}hw(e,t){fh("left"===t?this.km:this.Pm).dm(d4({width:e,height:this.Uv.height}))}sv(){return this.Uv}dm(e){d8(this.Uv,e)||(this.Uv=e,this.Kv=!0,this.sm.resizeCanvasElement(e),this.nm.resizeCanvasElement(e),this.Kv=!1,this.Wm.style.width=e.width+"px",this.Wm.style.height=e.height+"px")}aw(){let e=fh(this.Nm);for(let t of(e.H_(e.U_()),e.H_(e.q_()),e.Sl()))if(e.Zn(t)){let r=t.Ft();null!==r&&e.H_(r),t.Ws()}for(let t of e.ru())t.Ws()}nv(){return this.sm.bitmapSize}ev(e,t,r,n){let i=this.nv();if(i.width>0&&i.height>0&&(e.drawImage(this.sm.canvasElement,t,r),n)){let n=this.nm.canvasElement;null!==e&&e.drawImage(n,t,r)}}pm(e){if(0===e||null===this.Nm)return;e>1&&this.aw(),null!==this.km&&this.km.pm(e),null!==this.Pm&&this.Pm.pm(e);let t={colorSpace:this.Lv.N().layout.colorSpace};if(1!==e){this.sm.applySuggestedBitmapSize();let e=fs(this.sm,t);null!==e&&(e.useBitmapCoordinateSpace(e=>{this.wm(e)}),this.Nm&&(this.lw(e,m3),this.ow(e),this.lw(e,m5),this.lw(e,m4)))}this.nm.applySuggestedBitmapSize();let r=fs(this.nm,t);null!==r&&(r.useBitmapCoordinateSpace(({context:e,bitmapSize:t})=>{e.clearRect(0,0,t.width,t.height)}),this._w(r),this.lw(r,m8),this.lw(r,m4))}uw(){return this.km}cw(){return this.Pm}Mm(e,t){this.lw(e,t)}Fm(){null!==this.Nm&&this.Nm.nu().u(this),this.Nm=null}Xm(e){this.Jm(this.Im,e)}Jm(e,t){let r=t.localX,n=t.localY;e.v()&&e.p(this.ns().Et().wc(r),{x:r,y:n},t)}wm({context:e,bitmapSize:t}){let{width:r,height:n}=t,i=this.ns(),s=i.$(),o=i.Kd();s===o?fL(e,0,0,r,n,o):fF(e,0,0,r,n,s,o)}ow(e){let t=fh(this.Nm),r=t.eu().pr().Tt(t);null!==r&&r.nt(e,!1)}_w(e){this.dw(e,m5,mQ,this.ns().gd())}lw(e,t){let r=fh(this.Nm),n=r.Dt(),i=r.ru();for(let r of i)this.dw(e,t,mX,r);for(let r of n)this.dw(e,t,mX,r);for(let r of i)this.dw(e,t,mQ,r);for(let r of n)this.dw(e,t,mQ,r)}dw(e,t,r,n){let i=fh(this.Nm),s=i.Qt().pd(),o=null!==s&&s.hu===n,a=null!==s&&o&&void 0!==s.au?s.au.ie:void 0;mZ(t,t=>r(t,e,o,a),n,i)}jm(){if(null===this.Nm)return;let e=this.Lv,t=this.Nm.U_().N().visible,r=this.Nm.q_().N().visible;t||null===this.km||(this.Hm.removeChild(this.km.iv()),this.km.m(),this.km=null),r||null===this.Pm||(this.Um.removeChild(this.Pm.iv()),this.Pm.m(),this.Pm=null);let n=e.Qt().Nd();t&&null===this.km&&(this.km=new m2(this,e.N(),n,"left"),this.Hm.appendChild(this.km.iv())),r&&null===this.Pm&&(this.Pm=ne
1w m2(this,e.N(),n,"right"),this.Um.appendChild(this.Pm.iv()))}fw(e){return e.Np&&this.Em||null!==this.Am}Zm(e,t,r){e=Math.max(0,Math.min(e,this.Uv.width-1)),t=Math.max(0,Math.min(t,this.Uv.height-1)),this.ns().Ad(e,t,r,fh(this.Nm))}sw(){this.ns().zd()}rw(){this.Lm&&(this.Am=null,this.sw())}iw(e,t,r){this.Am=e,this.Lm=!1,this.Zm(t.x,t.y,r);let n=this.ns().gd();this.zm={x:n.si(),y:n.ni()}}ns(){return this.Lv.Qt()}tw(e){if(!this.Dm)return;let t=this.ns(),r=this.cv();if(t.X_(r,r.Rs()),this.Rm=null,this.Dm=!1,t.Vd(),null!==this.Om){let e=performance.now(),r=t.Et();this.Om.fe(r.Cc(),e),this.Om.Ec(e)||t.vn(this.Om)}}Km(){this.Am=null}Gm(){if(this.Nm){if(this.ns().dn(),document.activeElement!==document.body&&document.activeElement!==document.documentElement)fh(document.activeElement).blur();else{let e=document.getSelection();null!==e&&e.removeAllRanges()}this.Nm.Rs().Gi()||this.ns().Et().Gi()}}Qm(e){if(null===this.Nm)return;let t=this.ns(),r=t.Et();if(r.Gi())return;let n=this.Lv.N(),i=n.handleScroll,s=n.kineticScroll;if((!i.pressedMouseMove||e.Np)&&(!i.horzTouchDrag&&!i.vertTouchDrag||!e.Np))return;let o=this.Nm.Rs(),a=performance.now();if(null!==this.Rm||this.fw(e)||(this.Rm={x:e.clientX,y:e.clientY,cf:a,pw:e.localX,mw:e.localY}),null!==this.Rm&&!this.Dm&&(this.Rm.x!==e.clientX||this.Rm.y!==e.clientY)){if(e.Np&&s.touch||!e.Np&&s.mouse){let e=r.ul();this.Om=new mY(.2/e,7/e,.997,15/e),this.Om.Dv(r.Cc(),this.Rm.cf)}else this.Om=null;o.Gi()||t.Z_(this.Nm,o,e.localY),t.Dd(e.localX),this.Dm=!0}this.Dm&&(o.Gi()||t.G_(this.Nm,o,e.localY),t.Id(e.localX),null!==this.Om&&this.Om.Dv(r.Cc(),a))}}class m7{constructor(e,t,r,n,i){this.xt=!0,this.Uv=d4({width:0,height:0}),this.Zv=()=>this.pm(3),this.Jv="left"===e,this.hd=r.Nd,this.Ps=t,this.ww=n,this.gw=i,this.Jp=document.createElement("div"),this.Jp.style.width="25px",this.Jp.style.height="100%",this.Jp.style.overflow="hidden",this.sm=mG(this.Jp,d4({width:16,height:16})),this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv)}m(){this.sm.unsubscribeSuggestedBitmapSizeChanged(this.Zv),mJ(this.sm.canvasElement),this.sm.dispose()}iv(){return this.Jp}sv(){return this.Uv}dm(e){d8(this.Uv,e)||(this.Uv=e,this.sm.resizeCanvasElement(e),this.Jp.style.width=`${e.width}px`,this.Jp.style.height=`${e.height}px`,this.xt=!0)}pm(e){if(e<3&&!this.xt||0===this.Uv.width||0===this.Uv.height)return;this.xt=!1,this.sm.applySuggestedBitmapSize();let t=fs(this.sm,{colorSpace:this.Ps.layout.colorSpace});null!==t&&t.useBitmapCoordinateSpace(e=>{this.wm(e),this.gm(e)})}nv(){return this.sm.bitmapSize}ev(e,t,r){let n=this.nv();n.width>0&&n.height>0&&e.drawImage(this.sm.canvasElement,t,r)}gm({context:e,bitmapSize:t,horizontalPixelRatio:r,verticalPixelRatio:n}){if(!this.ww())return;e.fillStyle=this.Ps.timeScale.borderColor;let i=Math.floor(this.hd.N().S*r),s=Math.floor(this.hd.N().S*n),o=this.Jv?t.width-i:0;e.fillRect(o,0,i,s)}wm({context:e,bitmapSize:t}){fL(e,0,0,t.width,t.height,this.gw())}}function m9(e){return t=>t.Ka?.(e)??[]}let ge=m9("normal"),gt=m9("top"),gr=m9("bottom");class gn{constructor(e,t){this.Mw=null,this.bw=null,this.M=null,this.Sw=!1,this.Uv=d4({width:0,height:0}),this.xw=new ff,this.qv=new f5(5),this.Kv=!1,this.Zv=()=>{this.Kv||this.Lv.Qt().dr()},this.Xv=()=>{this.Kv||this.Lv.Qt().dr()},this.Lv=e,this.cu=t,this.Ps=e.N().layout,this.Vv=document.createElement("tr"),this.Cw=document.createElement("td"),this.Cw.style.padding="0",this.yw=document.createElement("td"),this.yw.style.padding="0",this.Jp=document.createElement("td"),this.Jp.style.height="25px",this.Jp.style.padding="0",this.kw=document.createElement("div"),this.kw.style.width="100%",this.kw.style.height="100%",this.kw.style.position="relative",this.kw.style.overflow="hidden",this.Jp.appendChild(this.kw),this.sm=mG(this.kw,d4({width:16,height:16})),this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv);const r=this.sm.canvasElement;r.style.position="absolute",r.style.zIndex="1",r.style.left="0",r.style.top="0",this.nm=mG(this.kw,d4({width:16,height:16})),this.nm.subscribeSuggestedBitmapSizeChanged(this.Xv);const n=this.nm.canvasElement;n.style.position="absolute",n.style.zIndex="2",n.style.left="0",n.style.top="0",this.Vv.appendChild(this.Cw),this.Vv.appendChild(this.Jp),this.Vv.appendChild(this.yw),this.Pw(),this.Lv.Qt().B_().i(this.Pw.bind(this),this),this.$p=new mV(this.nm.canvasElement,this,{dp:()=>!0,fp:()=>!this.Lv.N().handleScroll.horzTouchDrag})}m(){this.$p.m(),null!==this.Mw&&this.Mw.m(),null!==this.bw&&this.bw.m(),this.nm.unsubscribeSuggestedBitmapSizeChanged(this.Xv),mJ(this.nm.canvasElement),this.nm.dispose(),this.sm.unsubscribeSuggestedBitmapSizeChanged(this.Zv),mJ(this.sm.canvasElement),this.sm.dispose()}iv(){return this.Vv}Tw(){return this.Mw}Rw(){return this.bw}Pp(e){if(this.Sw)return;this.Sw=!0;let t=this.Lv.Qt();!t.Et().Gi()&&this.Lv.N().handleScale.axisPressedMouseMove.time&&t.Pd(e.localX)}yp(e){this.Pp(e)}Tp(){let e=this.Lv.Qt();!e.Et().Gi()&&this.Sw&&(this.Sw=!1,this.Lv.N().handleScale.axisPressedMouseMove.time&&e.Ed())}mp(e){let t=this.Lv.Qt();!t.Et().Gi()&&this.Lv.N().handleScale.axisPressedMouseMove.time&&t.Bd(e.localX)}pp(e){this.mp(e)}bp(){this.Sw=!1;let e=this.Lv.Qt();e.Et().Gi()&&!this.Lv.N().handleScale.axisPressedMouseMove.time||e.Ed()}gp(){this.bp()}ip(){this.Lv.N().handleScale.axisDoubleClickReset.time&&this.Lv.Qt().wn()}Xf(){this.ip()}lp(){this.Lv.Qt().N().handleScale.axisPressedMouseMove.time&&this.Cm(1)}zp(){this.Cm(0)}sv(){return this.Uv}Dw(){return this.xw}Iw(e,t,r){d8(this.Uv,e)||(this.Uv=e,this.Kv=!0,this.sm.resizeCanvasElement(e),this.nm.resizeCanvasElement(e),this.Kv=!1,this.Jp.style.width=`${e.width}px`,this.Jp.style.height=`${e.height}px`,this.xw.p(e)),null!==this.Mw&&this.Mw.dm(d4({width:t,height:e.height})),null!==this.bw&&this.bw.dm(d4({width:r,height:e.height}))}Vw(){let e=this.Bw();return Math.ceil(e.S+e.C+e.k+e.A+e.I+e.Ew)}kt(){this.Lv.Qt().Et().Vl()}nv(){return this.sm.bitmapSize}ev(e,t,r,n){let i=this.nv();if(i.width>0&&i.height>0&&(e.drawImage(this.sm.canvasElement,t,r),n)){let n=this.nm.canvasElement;e.drawImage(n,t,r)}}pm(e){if(0===e)return;let t={colorSpace:this.Ps.colorSpace};if(1!==e){this.sm.applySuggestedBitmapSize();let r=fs(this.sm,t);null!==r&&(r.useBitmapCoordinateSpace(e=>{this.wm(e),this.gm(e),this.Aw(r,gr)}),this.bm(r),this.Aw(r,ge)),null!==this.Mw&&this.Mw.pm(e),null!==this.bw&&this.bw.pm(e)}this.nm.applySuggestedBitmapSize();let r=fs(this.nm,t);null!==r&&(r.useBitmapCoordinateSpace(({context:e,bitmapSize:t})=>{e.clearRect(0,0,t.width,t.height)}),this.Lw([...this.Lv.Qt().tn(),this.Lv.Qt().gd()],r),this.Aw(r,gt))}Aw(e,t){let r=this.Lv.Qt().tn();for(let n of r)mZ(t,t=>mX(t,e,!1,void 0),n,void 0);for(let n of r)mZ(t,t=>mQ(t,e,!1,void 0),n,void 0)}wm({context:e,bitmapSize:t}){fL(e,0,0,t.width,t.height,this.Lv.Qt().Kd())}gm({context:e,bitmapSize:t,verticalPixelRatio:r}){if(this.Lv.N().timeScale.borderVisible){e.fillStyle=this.zw();let n=Math.max(1,Math.floor(this.Bw().S*r));e.fillRect(0,0,t.width,n)}}bm(e){let t=this.Lv.Qt().Et(),r=t.Vl();if(!r||0===r.length)return;let n=this.cu.maxTickMarkWeight(r),i=this.Bw(),s=t.N();s.borderVisible&&s.ticksVisible&&e.useBitmapCoordinateSpace(({context:e,horizontalPixelRatio:t,verticalPixelRatio:n})=>{e.strokeStyle=this.zw(),e.fillStyle=this.zw();let s=Math.max(1,Math.floor(t)),o=Math.floor(.5*t);e.beginPath();let a=Math.round(i.C*n);for(let n=r.length;n--;){let i=Math.round(r[n].coord*t);e.rect(i-o,0,s,a)}e.fill()}),e.useMediaCoordinateSpace(({context:e})=>{let t=i.S+i.C+i.A+i.k/2;for(let i of(e.textAlign="center",e.textBaseline="middle",e.fillStyle=this.H(),e.font=this._m(),r))if(i.weight<n){let r=i.needAlignCoordinate?this.Ow(e,i.coord,i.label):i.coord;e.fillText(i.label,r,t)}for(let i of(this.Lv.N().timeScale.allowBoldLabels&&(e.font=this.Nw()),r))if(i.weight>=n){let r=i.needAlignCoordinate?this.Ow(e,i.coord,i.label):i.coord;e.fillText(i.label,r,t)}})}Ow(e,t,r){let n=this.qv.Ii(e,r),i=Math.floor(t-n/2)+.5;return i<0?t+=Math.abs(0-i):i+n>this.Uv.width&&(t-=Math.abs(this.Uv.width-(i+n))),t}Lw(e,t){let r=this.Bw();for(let n of e)for(let e of n.fs())e.Tt().nt(t,r)}zw(){return this.Lv.N().timeScale.borderColor}H(){return this.Ps.textColor}F(){return this.Ps.fontSize}_m(){return f_(this.F(),this.Ps.fontFamily)}Nw(){return f_(this.F(),this.Ps.fontFamily,"bold")}Bw(){null===this.M&&(this.M={S:1,L:NaN,A:NaN,I:NaN,ts:NaN,C:5,k:NaN,P:"",Qi:new f5,Ew:0});let e=this.M,t=this._m();if(e.P!==t){let r=this.F();e.k=r,e.P=t,e.A=3*r/12,e.I=3*r/12,e.ts=9*r/12,e.L=0,e.Ew=4*r/12,e.Qi.On()}return this.M}Cm(e){this.Jp.style.cursor=1===e?"ew-resize":"default"}Pw(){let e=this.Lv.Qt(),t=e.N();t.leftPriceScale.visible||null===this.Mw||(this.Cw.removeChild(this.Mw.iv()),this.Mw.m(),this.Mw=null),t.rightPriceScale.visible||null===this.bw||(this.yw.removeChild(this.bw.iv()),this.bw.m(),this.bw=null);let r={Nd:this.Lv.Qt().Nd()},n=()=>t.leftPriceScale.borderVisible&&e.Et().N().borderVisible,i=()=>e.Kd();t.leftPriceScale.visible&&null===this.Mw&&(this.Mw=new m7("left",t,r,n,i),this.Cw.appendChild(this.Mw.iv())),t.rightPriceScale.visible&&null===this.bw&&(this.bw=new m7("right",t,r,n,i),this.yw.appendChild(this.bw.iv()))}}let gi=!!mT&&!!navigator.userAgentData&&navigator.userAgentData.brands.some(e=>e.brand.includes("Chromium"))&&!!mT&&(navigator?.userAgentData?.platform?"Windows"===navigator.userAgentData.platform:navigator.userAgent.toLowerCase().indexOf("win")>=0);class gs{constructor(e,t,r){var n;this.Fw=[],this.Ww=[],this.Hw=0,this.eo=0,this.S_=0,this.Uw=0,this.$w=0,this.qw=null,this.jw=!1,this.Im=new ff,this.Vm=new ff,this.nd=new ff,this.Yw=null,this.Kw=null,this.Av=e,this.Ps=t,this.cu=r,this.Vv=document.createElement("div"),this.Vv.classList.add("tv-lightweight-charts"),this.Vv.style.overflow="hidden",this.Vv.style.direction="ltr",this.Vv.style.width="100%",this.Vv.style.height="100%",(n=this.Vv).style.userSelect="none",n.style.webkitUserSelect="none",n.style.msUserSelect="none",n.style.MozUserSelect="none",n.style.webkitTapHighlightColor="transparent",this.Zw=document.createElement("table"),this.Zw.setAttribute("cellspacing","0"),this.Vv.appendChild(this.Zw),this.Gw=this.Xw.bind(this),go(this.Ps)&&this.Jw(!0),this.ns=new mp(this.rd.bind(this),this.Ps,r),this.Qt().Md().i(this.Qw.bind(this),this),this.tg=new gn(this,this.cu),this.Zw.appendChild(this.tg.iv());const i=t.autoSize&&this.ig();let s=this.Ps.width,o=this.Ps.height;if(i||0===s||0===o){const t=e.getBoundingClientRect();s=s||t.width,o=o||t.height}this.sg(s,o),this.ng(),e.appendChild(this.Vv),this.eg(),this.ns.Et().Oc().i(this.ns.Ca.bind(this.ns),this),this.ns.B_().i(this.ns.Ca.bind(this.ns),this)}Qt(){return this.ns}N(){return this.Ps}Zp(){return this.Fw}rg(){return this.tg}m(){for(let e of(this.Jw(!1),0!==this.Hw&&window.cancelAnimationFrame(this.Hw),this.ns.Md().u(this),this.ns.Et().Oc().u(this),this.ns.B_().u(this),this.ns.m(),this.Fw))this.Zw.removeChild(e.iv()),e.nw().u(this),e.ew().u(this),e.m();for(let e of(this.Fw=[],this.Ww))this.hg(e);this.Ww=[],fh(this.tg).m(),null!==this.Vv.parentElement&&this.Vv.parentElement.removeChild(this.Vv),this.nd.m(),this.Im.m(),this.Vm.m(),this.ag()}sg(e,t,r=!1){if(this.eo===t&&this.S_===e)return;let n=function(e){let t=Math.floor(e.width),r=Math.floor(e.height);return d4({width:t-t%2,height:r-r%2})}(d4({width:e,height:t}));this.eo=n.height,this.S_=n.width;let i=this.eo+"px",s=this.S_+"px";fh(this.Vv).style.height=i,fh(this.Vv).style.width=s,this.Zw.style.height=i,this.Zw.style.width=s,r?this.lg(fJ.yn(),performance.now()):this.ns.Ca()}pm(e){void 0===e&&(e=fJ.yn());for(let t=0;t<this.Fw.length;t++)this.Fw[t].pm(e.un(t).an);this.Ps.timeScale.visible&&this.tg.pm(e._n())}cr(e){let t=go(this.Ps);this.ns.cr(e);let r=go(this.Ps);r!==t&&this.Jw(r),e.layout?.panes&&this.og(),this.eg(),this._g(e)}nw(){return this.Im}ew(){return this.Vm}Md(){return this.nd}ug(e=!1){null!==this.qw&&(this.lg(this.qw,performance.now()),this.qw=null);let t=this.cg(null),r=document.createElement("canvas");r.width=t.width,r.height=t.height;let n=fh(r.getContext("2d"));return this.cg(n,e),r}dg(e){return("left"!==e||this.fg())&&("right"!==e||this.pg())&&0!==this.Fw.length?fh("left"===e?this.Fw[0].uw():this.Fw[0].cw()).fm():0}vg(){return this.Ps.autoSize&&null!==this.Yw}hv(){return this.Vv}mg(e){this.Kw=e,this.Kw?this.hv().style.setProperty("cursor",e):this.hv().style.removeProperty("cursor")}wg(){return this.Kw}gg(e){return fc(this.Fw[e]).sv()}
1og(){this.Ww.forEach(e=>{e.kt()})}_g(e){(void 0!==e.autoSize||!this.Yw||void 0===e.width&&void 0===e.height)&&(e.autoSize&&!this.Yw&&this.ig(),!1===e.autoSize&&null!==this.Yw&&this.ag(),e.autoSize||void 0===e.width&&void 0===e.height||this.sg(e.width||this.S_,e.height||this.eo))}cg(e,t){let r=0,n=0,i=this.Fw[0],s=(r,n)=>{let i=0;for(let s=0;s<this.Fw.length;s++){let o=this.Fw[s],a=fh("left"===r?o.uw():o.cw()),l=a.nv();if(null!==e&&a.ev(e,n,i,t),i+=l.height,s<this.Fw.length-1){let t=this.Ww[s],r=t.nv();null!==e&&t.ev(e,n,i),i+=r.height}}};this.fg()&&(s("left",0),r+=fh(i.uw()).nv().width);for(let i=0;i<this.Fw.length;i++){let s=this.Fw[i],o=s.nv();if(null!==e&&s.ev(e,r,n,t),n+=o.height,i<this.Fw.length-1){let t=this.Ww[i],s=t.nv();null!==e&&t.ev(e,r,n),n+=s.height}}r+=i.nv().width,this.pg()&&(s("right",r),r+=fh(i.cw()).nv().width);let o=(t,r,n)=>{fh("left"===t?this.tg.Tw():this.tg.Rw()).ev(fh(e),r,n)};if(this.Ps.timeScale.visible){let r=this.tg.nv();if(null!==e){let s=0;this.fg()&&(o("left",s,n),s=fh(i.uw()).nv().width),this.tg.ev(e,s,n,t),s+=r.width,this.pg()&&o("right",s,n)}n+=r.height}return d4({width:r,height:n})}Mg(){var e;let t=0,r=0,n=0;for(let e of this.Fw)this.fg()&&(r=Math.max(r,fh(e.uw()).om(),this.Ps.leftPriceScale.minimumWidth)),this.pg()&&(n=Math.max(n,fh(e.cw()).om(),this.Ps.rightPriceScale.minimumWidth)),t+=e.E_();r=mD(r),n=mD(n);let i=this.S_,s=this.eo,o=Math.max(i-r-n,0),a=+this.Ww.length,l=this.Ps.timeScale.visible,u=l?Math.max(this.tg.Vw(),this.Ps.timeScale.minimumHeight):0,c=a+(u=(e=u)+e%2),h=s<c?0:s-c,d=h/t,f=0,p=window.devicePixelRatio||1;for(let e=0;e<this.Fw.length;++e){let t=this.Fw[e];t.qm(this.ns.Xs()[e]);let i=0,s=0;i=Math.max(s=e===this.Fw.length-1?Math.ceil((h-f)*p)/p:Math.round(t.E_()*d*p)/p,2),f+=i,t.dm(d4({width:o,height:i})),this.fg()&&t.hw(r,"left"),this.pg()&&t.hw(n,"right"),t.cv()&&this.ns.bd(t.cv(),i)}this.tg.Iw(d4({width:l?o:0,height:u}),l?r:0,l?n:0),this.ns.L_(o),this.Uw!==r&&(this.Uw=r),this.$w!==n&&(this.$w=n)}Jw(e){e?this.Vv.addEventListener("wheel",this.Gw,{passive:!1}):this.Vv.removeEventListener("wheel",this.Gw)}bg(e){switch(e.deltaMode){case e.DOM_DELTA_PAGE:return 120;case e.DOM_DELTA_LINE:return 32}return gi?1/window.devicePixelRatio:1}Xw(e){if(!(0!==e.deltaX&&this.Ps.handleScroll.mouseWheel||0!==e.deltaY&&this.Ps.handleScale.mouseWheel))return;let t=this.bg(e),r=t*e.deltaX/100,n=-t*e.deltaY/100;if(e.cancelable&&e.preventDefault(),0!==n&&this.Ps.handleScale.mouseWheel){let t=Math.sign(n)*Math.min(1,Math.abs(n)),r=e.clientX-this.Vv.getBoundingClientRect().left;this.Qt().Td(r,t)}0!==r&&this.Ps.handleScroll.mouseWheel&&this.Qt().Rd(-80*r)}lg(e,t){let r=e._n();3===r&&this.Sg(),3!==r&&2!==r||(this.xg(e),this.Cg(e,t),this.tg.kt(),this.Fw.forEach(e=>{e.Ym()}),3===this.qw?._n()&&(this.qw.Sn(e),this.Sg(),this.xg(this.qw),this.Cg(this.qw,t),e=this.qw,this.qw=null)),this.pm(e)}Cg(e,t){for(let r of e.bn())this.xn(r,t)}xg(e){let t=this.ns.Xs();for(let r=0;r<t.length;r++)e.un(r).ln&&t[r].tu()}xn(e,t){let r=this.ns.Et();switch(e.fn){case 0:r.Fc();break;case 1:r.Wc(e.Wt);break;case 2:r.gn(e.Wt);break;case 3:r.Mn(e.Wt);break;case 4:r.Pc();break;case 5:e.Wt.Ec(t)||r.Mn(e.Wt.Ac(t))}}rd(e){null!==this.qw?this.qw.Sn(e):this.qw=e,this.jw||(this.jw=!0,this.Hw=window.requestAnimationFrame(e=>{if(this.jw=!1,this.Hw=0,null!==this.qw){let t=this.qw;for(let r of(this.qw=null,this.lg(t,e),t.bn()))if(5===r.fn&&!r.Wt.Ec(e)){this.Qt().vn(r.Wt);break}}}))}Sg(){this.ng()}hg(e){this.Zw.removeChild(e.iv()),e.m()}ng(){let e=this.ns.Xs(),t=e.length,r=this.Fw.length;for(let e=t;e<r;e++){let e=fc(this.Fw.pop());this.Zw.removeChild(e.iv()),e.nw().u(this),e.ew().u(this),e.m();let t=this.Ww.pop();void 0!==t&&this.hg(t)}for(let n=r;n<t;n++){let t=new m6(this,e[n]);if(t.nw().i(this.yg.bind(this,t),this),t.ew().i(this.kg.bind(this,t),this),this.Fw.push(t),n>0){let e=new mW(this,n-1,n);this.Ww.push(e),this.Zw.insertBefore(e.iv(),this.tg.iv())}this.Zw.insertBefore(t.iv(),this.tg.iv())}for(let r=0;r<t;r++){let t=e[r],n=this.Fw[r];n.cv()!==t?n.qm(t):n.$m()}this.eg(),this.Mg()}Pg(e,t,r,n){let i,s=new Map;
1if(null!==e&&this.ns.tn().forEach(t=>{let r=t.qs().$s(e);null!==r&&s.set(t,r)}),null!==e){let t=this.ns.Et().es(e)?.originalTime;void 0!==t&&(i=t)}let o=this.Qt().pd(),a=null!==o&&o.hu instanceof pF?o.hu:void 0,l=null!==o&&void 0!==o.au?o.au.te:void 0,u=this.Tg(n);return{Gr:i,js:e??void 0,Rg:t??void 0,Dg:-1!==u?u:void 0,Ig:a,Vg:s,Bg:l,Eg:r??void 0}}Tg(e){let t=-1;if(e)t=this.Fw.indexOf(e);else{let e=this.Qt().gd().Gs();null!==e&&(t=this.Qt().Xs().indexOf(e))}return t}yg(e,t,r,n){this.Im.p(()=>this.Pg(t,r,n,e))}kg(e,t,r,n){this.Vm.p(()=>this.Pg(t,r,n,e))}Qw(e,t,r){this.mg(this.Qt().pd()?.ou??null),this.nd.p(()=>this.Pg(e,t,r))}eg(){let e=this.Ps.timeScale.visible?"":"none";this.tg.iv().style.display=e}fg(){return this.Fw[0].cv().U_().N().visible}pg(){return this.Fw[0].cv().q_().N().visible}ig(){return"ResizeObserver"in window&&(this.Yw=new ResizeObserver(e=>{let t=e[e.length-1];t&&this.sg(t.contentRect.width,t.contentRect.height)}),this.Yw.observe(this.Av,{box:"border-box"}),!0)}ag(){null!==this.Yw&&this.Yw.disconnect(),this.Yw=null}}function go(e){return!!(e.handleScroll.mouseWheel||e.handleScale.mouseWheel)}function ga(e){return void 0===e.open&&void 0===e.value}function gl(e){return function(e){return void 0!==e.open}(e)||function(e){return void 0!==e.value}(e)}function gu(e,t,r,n){let i=r.value,s={js:t,wt:e,Wt:[i,i,i,i],Gr:n};return void 0!==r.color&&(s.R=r.color),s}function gc(e,t,r,n){let i=r.value,s={js:t,wt:e,Wt:[i,i,i,i],Gr:n};return void 0!==r.lineColor&&(s.vt=r.lineColor),void 0!==r.topColor&&(s.eh=r.topColor),void 0!==r.bottomColor&&(s.rh=r.bottomColor),s}function gh(e,t,r,n){let i=r.value,s={js:t,wt:e,Wt:[i,i,i,i],Gr:n};return void 0!==r.topLineColor&&(s.hh=r.topLineColor),void 0!==r.bottomLineColor&&(s.ah=r.bottomLineColor),void 0!==r.topFillColor1&&(s.oh=r.topFillColor1),void 0!==r.topFillColor2&&(s._h=r.topFillColor2),void 0!==r.bottomFillColor1&&(s.uh=r.bottomFillColor1),void 0!==r.bottomFillColor2&&(s.dh=r.bottomFillColor2),s}function gd(e,t,r,n){let i={js:t,wt:e,Wt:[r.open,r.high,r.low,r.close],Gr:n};return void 0!==r.color&&(i.R=r.color),i}function gf(e,t,r,n){let i={js:t,wt:e,Wt:[r.open,r.high,r.low,r.close],Gr:n};return void 0!==r.color&&(i.R=r.color),void 0!==r.borderColor&&(i.Ht=r.borderColor),void 0!==r.wickColor&&(i.nh=r.wickColor),i}function gp(e,t,r,n,i){let s=fc(i)(r),o=Math.max(...s),a=Math.min(...s),l=s[s.length-1],{time:u,color:c,...h}=r;return{js:t,wt:e,Wt:[l,o,a,l],Gr:n,le:h,R:c}}function gm(e){return void 0!==e.Wt}function gg(e,t){return void 0!==t.customValues&&(e.Ag=t.customValues),e}function gv(e){return(t,r,n,i,s,o)=>!function(e,t){return t?t(e):ga(e)}(n,o)?gg(e(t,r,n,i,s),n):gg({wt:t,js:r,Gr:i},n)}function gy(e){return({Candlestick:gv(gf),Bar:gv(gd),Area:gv(gc),Baseline:gv(gh),Histogram:gv(gu),Line:gv(gu),Custom:gv(gp)})[e]}function gb(e){return{js:0,Lg:new Map,Ea:e}}function gw(e,t){if(void 0!==e&&0!==e.length)return{zg:t.key(e[0].wt),Og:t.key(e[e.length-1].wt)}}function gx(e){let t;return e.forEach(e=>{void 0===t&&(t=e.Gr)}),fc(t)}class gS{constructor(e){this.Ng=new Map,this.Fg=new Map,this.Wg=new Map,this.Hg=[],this.cu=e}m(){this.Ng.clear(),this.Fg.clear(),this.Wg.clear(),this.Hg=[]}Ug(e,t){let r=0!==this.Ng.size,n=!1,i=this.Fg.get(e);if(void 0!==i)if(1===this.Fg.size)r=!1,n=!0,this.Ng.clear();else for(let t of this.Hg)t.pointData.Lg.delete(e)&&(n=!0);let s=[];if(0!==t.length){let r=t.map(e=>e.time),i=this.cu.createConverterToInternalObj(t),o=gy(e.wh()),a=e.rl(),l=e.hl();s=t.map((t,s)=>{let u=i(t.time),c=this.cu.key(u),h=this.Ng.get(c);void 0===h&&(h=gb(u),this.Ng.set(c,h),n=!0);let d=o(u,h.js,t,r[s],a,l);return h.Lg.set(e,d),d})}r&&this.$g(),this.qg(e,s);let o=-1;if(n){let e=[];this.Ng.forEach(t=>{e.push({timeWeight:0,time:t.Ea,pointData:t,originalTime:gx(t.Lg)})}),e.sort((e,t)=>this.cu.key(e.time)-this.cu.key(t.time)),o=this.jg(e)}return this.Yg(e,o,function(e,t,r){let n=gw(e,r),i=gw(t,r);if(void 0!==n&&void 0!==i)return{Kg:!1,Ta:n.Og>=i.Og&&n.zg>=i.zg}}(this.Fg.get(e),i,this.cu))}Hd(e){return this.Ug(e,[])}Zg(e,t,r){if(r&&e.La())throw Error("Historical updates are not supported when conflation is enabled. Conflation requires data to be processed in order.");let n=t;!function(e){void 0===e.Gr&&(e.Gr=e.time)}(n),this.cu.preprocessData(t);let i=this.cu.createConverterToInternalObj([t])(t.time),s=this.Wg.get(e);if(!r&&void 0!==s&&this.cu.key(i)<this.cu.key(s))throw Error(`Cannot update oldest data, last time=${s}, new time=${i}`);let o=this.Ng.get(this.cu.key(i));if(r&&void 0===o)throw Error("Cannot update non-existing data point when historicalUpdate is true");let a=void 0===o;void 0===o&&(o=gb(i),this.Ng.set(this.cu.key(i),o));let l=gy(e.wh()),u=e.rl(),c=e.hl(),h=l(i,o.js,t,n.Gr,u,c),d=!r&&!a&&void 0!==s&&this.cu.key(i)===this.cu.key(s);o.Lg.set(e,h),r?this.Gg(e,h,o.js):(d&&e.La()&&gm(h)&&e.kr(h),this.Xg
1(e,h));let f={Ta:gm(h),Kg:r};if(!a)return this.Yg(e,-1,f);let p={timeWeight:0,time:o.Ea,pointData:o,originalTime:gx(o.Lg)},m=py(this.Hg,this.cu.key(p.time),(e,t)=>this.cu.key(e.time)<t);this.Hg.splice(m,0,p);for(let e=m;e<this.Hg.length;++e)g_(this.Hg[e].pointData,e);return this.cu.fillWeightsForPoints(this.Hg,m),this.Yg(e,m,f)}Jg(e,t){let r=this.Fg.get(e);if(void 0===r||t<=0)return[[],this.Qg()];t=Math.min(t,r.length);let n=r.splice(-t).reverse();for(let t of(0===r.length?this.Wg.delete(e):this.Wg.set(e,r[r.length-1].wt),n)){let r=this.Ng.get(this.cu.key(t.wt));if(r&&(r.Lg.delete(e),0===r.Lg.size)){this.Ng.delete(this.cu.key(r.Ea)),this.Hg.splice(r.js,1);for(let e=r.js;e<this.Hg.length;++e)g_(this.Hg[e].pointData,e)}}return[n,this.Yg(e,this.Hg.length-1,{Kg:!1,Ta:!1})]}Xg(e,t){let r=this.Fg.get(e);void 0===r&&(r=[],this.Fg.set(e,r));let n=0!==r.length?r[r.length-1]:null;null===n||this.cu.key(t.wt)>this.cu.key(n.wt)?gm(t)&&r.push(t):gm(t)?r[r.length-1]=t:r.splice(-1,1),this.Wg.set(e,t.wt)}Gg(e,t,r){let n=this.Fg.get(e);if(void 0===n)return;let i=py(n,r,(e,t)=>e.js<t);gm(t)?n[i]=t:n.splice(i,1)}qg(e,t){0!==t.length?(this.Fg.set(e,t.filter(gm)),this.Wg.set(e,t[t.length-1].wt)):(this.Fg.delete(e),this.Wg.delete(e))}$g(){for(let e of this.Hg)0===e.pointData.Lg.size&&this.Ng.delete(this.cu.key(e.time))}jg(e){let t=-1;for(let r=0;r<this.Hg.length&&r<e.length;++r){let n=this.Hg[r],i=e[r];if(this.cu.key(n.time)!==this.cu.key(i.time)){t=r;break}i.timeWeight=n.timeWeight,g_(i.pointData,r)}if(-1===t&&this.Hg.length!==e.length&&(t=Math.min(this.Hg.length,e.length)),-1===t)return -1;for(let r=t;r<e.length;++r)g_(e[r].pointData,r);return this.cu.fillWeightsForPoints(e,t),this.Hg=e,t}tM(){if(0===this.Fg.size)return null;let e=0;return this.Fg.forEach(t=>{0!==t.length&&(e=Math.max(e,t[t.length-1].js))}),e}Yg(e,t,r){let n=this.Qg();if(-1!==t)this.Fg.forEach((t,i)=>{n.F_.set(i,{le:t,iM:i===e?r:void 0})}),this.Fg.has(e)||n.F_.set(e,{le:[],iM:r}),n.Et.sM=this.Hg,n.Et.nM=t;else{let t=this.Fg.get(e);n.F_.set(e,{le:t||[],iM:r})}return n}Qg(){return{F_:new Map,Et:{vc:this.tM()}}}}function g_(e,t){e.js=t,e.Lg.forEach(e=>{e.js=t})}function gM(e,t){return e.wt<t}function gO(e,t){return t<e.wt}function gE(e,t,r){let n=t.Aa(),i=t.bi(),s=py(e,n,gM),o=pb(e,i,gO);if(!r)return{from:s,to:o};let a=s,l=o;return s>0&&s<e.length&&e[s].wt>=n&&(a=s-1),o>0&&o<e.length&&e[o-1].wt<=i&&(l=o+1),{from:a,to:l}}class gP{constructor(e,t,r){this.eM=!0,this.rM=!0,this.hM=!0,this.aM=[],this.lM=null,this.oM=-1,this.ee=e,this.re=t,this._M=r}kt(e){this.eM=!0,"data"===e&&(this.rM=!0),"options"===e&&(this.hM=!0)}Tt(){return this.ee.It()?(this.uM(),null===this.lM?null:this.cM):null}dM(){this.aM=this.aM.map(e=>({...e,...this.ee.ga().gh(e.wt)}))}fM(){this.lM=null}uM(){let e=this.re.Et(),t=e.N().enableConflation?e.Hc():0;t!==this.oM&&(this.rM=!0,this.oM=t),this.rM&&(this.pM(),this.rM=!1),this.hM&&(this.dM(),this.hM=!1),this.eM&&(this.vM(),this.eM=!1)}vM(){let e=this.ee.Ft(),t=this.re.Et();if(this.fM(),t.Gi()||e.Gi())return;let r=t.Ie();if(null===r||0===this.ee.qs().yh())return;let n=this.ee.Lt();null!==n&&(this.lM=gE(this.aM,r,this._M),this.mM(e,t,n.Wt),this.wM())}}class gk{constructor(e,t){this.gM=e,this.Ki=t}nt(e,t,r){this.gM.draw(e,this.Ki,t,r)}}class gA extends gP{constructor(e,t,r){super(e,t,!1),this.$h=r,this.cM=new gk(this.$h.renderer(),t=>{let r=e.Lt();return null===r?null:e.Ft().Nt(t,r.Wt)})}get ma(){return this.$h.conflationReducer}Oa(e){return this.$h.priceValueBuilder(e)}al(e){return this.$h.isWhitespace(e)}pM(){let e=this.ee.ga();this.aM=this.ee.Na().Dh().map(t=>({wt:t.js,_t:NaN,...e.gh(t.js),MM:t.le}))}mM(e,t){t.mc(this.aM,fx(this.lM))}wM(){this.$h.update({bars:this.aM.map(gj),barSpacing:this.re.Et().ul(),visibleRange:this.lM,conflationFactor:this.re.Et().Hc()},this.ee.N())}}function gj(e){return{x:e._t,time:e.wt,originalData:e.MM,barColor:e.th}}let gC={color:"#2196f3"},gN=(e,t,r)=>new gA(e,t,fd(r));function gT(e){let t={value:e.Wt[3],time:e.Gr};return void 0!==e.Ag&&(t.customValues=e.Ag),t}function gR(e){let t=gT(e);return void 0!==e.R&&(t.color=e.R),t}function gI(e){let t=gT(e);return void 0!==e.vt&&(t.lineColor=e.vt),void 0!==e.eh&&(t.topColor=e.eh),void 0!==e.rh&&(t.bottomColor=e.rh),t}function gD(e){let t=gT(e);return void 0!==e.hh&&(t.topLineColor=e.hh),void 0!==e.ah&&(t.bottomLineColor=e.ah),void 0!==e.oh&&(t.topFillColor1=e.oh),void 0!==e._h&&(t.topFillColor2=e._h),void 0!==e.uh&&(t.bottomFillColor1=e.uh),void 0!==e.dh&&(t.bottomFillColor2=e.dh),t}function gL(e){let t={open:e.Wt[0],high:e.Wt[1],low:e.Wt[2],close:e.Wt[3],time:e.Gr};return void 0!==e.Ag&&(t.customValues=e.Ag),t}function gV(e){let t=gL(e);return void 0!==e.R&&(t.color=e.R),t}function gz(e){let t=gL(e),{R:r,Ht:n,nh:i}=e;return void 0!==r&&(t.color=r),void 0!==n&&(t.borderColor=n),void 0!==i&&(t.wickColor=i),t}function gF(e){return({Area:gI,Line:gR,Baseline:gD,Histogram:gR,Bar:gV,Candlestick:gz,Custom:gB})[e]}function gB(e){let t=e.Gr;return{...e.le,time:t}}let g$={vertLine:{color:"#9598A1",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroun
1dColor:"#131722"},horzLine:{color:"#9598A1",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#131722"},mode:1,doNotSnapToHiddenSeriesIndices:!1},gU={vertLines:{color:"#D6DCDE",style:0,visible:!0},horzLines:{color:"#D6DCDE",style:0,visible:!0}},gW={background:{type:"solid",color:"#FFFFFF"},textColor:"#191919",fontSize:12,fontFamily:fS,panes:{enableResize:!0,separatorColor:"#E0E3EB",separatorHoverColor:"rgba(178, 181, 189, 0.2)"},attributionLogo:!0,colorSpace:"srgb",colorParsers:[]},gH={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,ensureEdgeTickMarksVisible:!1},gK={rightOffset:0,barSpacing:6,minBarSpacing:.5,maxBarSpacing:0,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,ignoreWhitespaceIndices:!1,enableConflation:!1,conflationThresholdFactor:1,precomputeConflationOnInit:!1,precomputeConflationPriority:"background"};function gY(){return{addDefaultPane:!0,width:0,height:0,autoSize:!1,layout:gW,crosshair:g$,grid:gU,overlayPriceScales:{...gH},leftPriceScale:{...gH,visible:!1},rightPriceScale:{...gH,visible:!0},timeScale:gK,localization:{locale:mT?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}}}class gq{constructor(e,t,r){this.Yp=e,this.bM=t,this.SM=r??0}applyOptions(e){this.Yp.Qt().md(this.bM,e,this.SM)}options(){return this.Ki().N()}width(){return fG(this.bM)?this.Yp.dg(this.bM):0}setVisibleRange(e){this.setAutoScale(!1),this.Ki().$o(new po(e.from,e.to))}getVisibleRange(){let e,t,r=this.Ki().er();if(null===r)return null;if(this.Ki().io()){let n=this.Ki().m_(),i=mm(n);
1e=Number((Math.round((r=p3(r,this.Ki().no())).Ze()/n)*n).toFixed(i)),t=Number((Math.round(r.Ge()/n)*n).toFixed(i))}else e=r.Ze(),t=r.Ge();return{from:e,to:t}}setAutoScale(e){this.applyOptions({autoScale:e})}Ki(){return fh(this.Yp.Qt().wd(this.bM,this.SM)).Ft}}class gG{constructor(e,t,r,n){this.Yp=e,this.yt=r,this.xM=t,this.CM=n}getHeight(){return this.yt.$t()}setHeight(e){let t=this.Yp.Qt(),r=t.Gd(this.yt);t.xd(r,e)}getStretchFactor(){return this.yt.E_()}setStretchFactor(e){this.yt.A_(e),this.Yp.Qt().Ca()}paneIndex(){return this.Yp.Qt().Gd(this.yt)}moveTo(e){let t=this.paneIndex();t!==e&&(fu(e>=0&&e<this.Yp.Zp().length,"Invalid pane index"),this.Yp.Qt().yd(t,e))}getSeries(){return this.yt.F_().map(e=>this.xM(e))??[]}getHTMLElement(){let e=this.Yp.Zp();return e&&0!==e.length&&e[this.paneIndex()]?e[this.paneIndex()].iv():null}attachPrimitive(e){this.yt.nl(e),e.attached&&e.attached({chart:this.CM,requestUpdate:()=>this.yt.Qt().Ca()})}detachPrimitive(e){this.yt.el(e)}priceScale(e){if(null===this.yt.V_(e))throw Error(`Cannot find price scale with id: ${e}`);return new gq(this.Yp,e,this.paneIndex())}setPreserveEmptyPane(e){this.yt.O_(e)}preserveEmptyPane(){return this.yt.N_()}addCustomSeries(e,t={},r=0){return this.CM.addCustomSeries(e,t,r)}addSeries(e,t={}){return this.CM.addSeries(e,t,this.paneIndex())}}let gJ={color:"#FF0000",price:0,lineStyle:2,lineWidth:1,lineVisible:!0,axisLabelVisible:!0,title:"",axisLabelColor:"",axisLabelTextColor:""};class gX{constructor(e){this.hr=e}applyOptions(e){this.hr.cr(e)}options(){return this.hr.N()}yM(){return this.hr}}class gQ{constructor(e,t,r,n,i,s){this.kM=new ff,this.ee=e,this.PM=t,this.TM=r,this.cu=i,this.CM=n,this.RM=s}m(){this.kM.m()}priceFormatter(){return this.ee.Xa()}priceToCoordinate(e){let t=this.ee.Lt();return null===t?null:this.ee.Ft().Nt(e,t.Wt)}coordinateToPrice(e){let t=this.ee.Lt();return null===t?null:this.ee.Ft().Ds(e,t.Wt)}barsInLogicalRange(e){if(null===e)return null;let t=new mh(new ml(e.from,e.to)).Ru(),r=this.ee.qs();if(r.Gi())return null;let n=r.$s(t.Aa(),1),i=r.$s(t.bi(),-1),s=fh(r.kh()),o=fh(r.sn());if(null!==n&&null!==i&&n.js>i.js)return{barsBefore:e.from-s,barsAfter:o-e.to};let a={barsBefore:null===n||n.js===s?e.from-s:n.js-s,barsAfter:null===i||i.js===o?o-e.to:o-i.js};return null!==n&&null!==i&&(a.from=n.Gr,a.to=i.Gr),a}setData(e){this.cu,this.ee.wh(),this.PM.DM(this.ee,e),this.IM("full")}update(e,t=!1){this.ee.wh(),this.PM.VM(this.ee,e,t),this.IM("update")}pop(e=1){let t=this.PM.BM(this.ee,e);0!==t.length&&this.IM("update");let r=gF(this.seriesType());return t.map(e=>r(e))}dataByIndex(e,t){let r=this.ee.qs().$s(e,t);return null===r?null:gF(this.seriesType())(r)}data(){let e=gF(this.seriesType());return this.ee.qs().Dh().map(t=>e(t))}subscribeDataChanged(e){this.kM.i(e)}unsubscribeDataChanged(e){this.kM._(e)}applyOptions(e){this.ee.cr(e)}options(){return fb(this.ee.N())}priceScale(){return this.TM.priceScale(this.ee.Ft().ol(),this.getPane().paneIndex())}createPriceLine(e){let t=fp(fb(gJ),e);return new gX(this.ee.Da(t))}removePriceLine(e){this.ee.Ia(e.yM())}priceLines(){return this.ee.Va().map(e=>new gX(e))}seriesType(){return this.ee.wh()}lastValueData(e){let t=this.ee.Ve(e);return t.Be?{noData:!0}:{noData:!1,price:t.gt,color:t.R}}attachPrimitive(e){this.ee.nl(e),e.attached&&e.attached({chart:this.CM,series:this,requestUpdate:()=>this.ee.Qt().Ca(),horzScaleBehavior:this.cu})}detachPrimitive(e){this.ee.el(e),e.detached&&e.detached(),this.ee.Qt().Ca()}getPane(){let e=this.ee,t=fh(this.ee.Qt().Kn(e));return this.RM(t)}moveToPane(e){this.ee.Qt().jd(this.ee,e)}seriesOrder(){let e=this.ee.Qt().Kn(this.ee);return null===e?-1:e.F_().indexOf(this.ee)}setSeriesOrder(e){let t=this.ee.Qt().Kn(this.ee);null!==t&&t.su(this.ee,e)}IM(e){this.kM.v()&&this.kM.p(e)}}class gZ{constructor(e,t,r){this.EM=new ff,this.Nu=new ff,this.xw=new ff,this.ns=e,this.Jh=e.Et(),this.tg=t,this.Jh.Lc().i(this.AM.bind(this)),this.Jh.zc().i(this.LM.bind(this)),this.tg.Dw().i(this.zM.bind(this)),this.cu=r}m(){this.Jh.Lc().u(this),this.Jh.zc().u(this),this.tg.Dw().u(this),this.EM.m(),this.Nu.m(),this.xw.m()}scrollPosition(){return this.Jh.Cc()}scrollToPosition(e,t){t?this.Jh.Bc(e,1e3):this.ns.Mn(e)}scrollToRealTime(){this.Jh.Vc()}getVisibleRange(){let e=this.Jh.lc();return null===e?null:{from:e.from.originalTime,to:e.to.originalTime}}setVisibleRange(e){let t={from:this.cu.convertHorzItemToInternal(e.from),to:this.cu.convertHorzItemToInternal(e.to)},r=this.Jh.cc(t);this.ns.$d(r)}getVisibleLogicalRange(){let e=this.Jh.ac();return null===e?null:{from:e.Aa(),to:e.bi()}}setVisibleLogicalRange(e){fu(e.from<=e.to,"The from index cannot be after the to index."),this.ns.$d(e)}resetTimeScale(){this.ns.wn()}fitContent(){this.ns.Fc()}logicalToCoordinate(e){let t=this.ns.Et();return t.Gi()?null:t.qt(e)}coordinateToLogical(e){return this.Jh.Gi()?null:this.Jh.wc(e)}timeToIndex(e,t){let r=this.cu.convertHorzItemToInternal(e);return this.Jh.ec(r,t)}timeToCoordinate(e){let t=this.timeToIndex(e,!1);return null===t?null:this.Jh.qt(t)}coordinateToTime(e){let t=this.ns.Et(),r=t.wc(e),n=t.es(r);return null===n?null:n.originalTime}width(){return this.tg.sv().width}height(){return this.tg.sv().height}subscribeVisibleTimeRangeChange(e){this.EM.i(e)}unsubscribeVisibleTimeRangeChange(e){this.EM._(e)}subscribeVisibleLogicalRangeChange(e){this.Nu.i(e)}unsubscribeVisibleLogicalRangeChange(e){this.Nu._(e)}subscribeSizeChange(e){this.xw.i(e)}unsubscribeSizeChange(e){this.xw._(e)}
1applyOptions(e){this.Jh.cr(e)}options(){return{...fb(this.Jh.N()),barSpacing:this.Jh.ul()}}AM(){this.EM.v()&&this.EM.p(this.getVisibleRange())}LM(){this.Nu.v()&&this.Nu.p(this.getVisibleLogicalRange())}zM(e){this.xw.p(e.width,e.height)}}function g0(e){return function(e){if(fy(e.handleScale)){let t=e.handleScale;e.handleScale={axisDoubleClickReset:{time:t,price:t},axisPressedMouseMove:{time:t,price:t},mouseWheel:t,pinch:t}}else if(void 0!==e.handleScale){let{axisPressedMouseMove:t,axisDoubleClickReset:r}=e.handleScale;fy(t)&&(e.handleScale.axisPressedMouseMove={time:t,price:t}),fy(r)&&(e.handleScale.axisDoubleClickReset={time:r,price:r})}let t=e.handleScroll;fy(t)&&(e.handleScroll={horzTouchDrag:t,vertTouchDrag:t,mouseWheel:t,pressedMouseMove:t})}(e),e}class g1{constructor(e,t,r){this.OM=new Map,this.NM=new Map,this.FM=new ff,this.WM=new ff,this.HM=new ff,this.Xc=new WeakMap,this.UM=new gS(t);const n=void 0===r?fb(gY()):fp(fb(gY()),g0(r));this.$M=t,this.Yp=new gs(e,n,t),this.Yp.nw().i(e=>{this.FM.v()&&this.FM.p(this.qM(e()))},this),this.Yp.ew().i(e=>{this.WM.v()&&this.WM.p(this.qM(e()))},this),this.Yp.Md().i(e=>{this.HM.v()&&this.HM.p(this.qM(e()))},this);const i=this.Yp.Qt();this.jM=new gZ(i,this.Yp.rg(),this.$M)}remove(){this.Yp.nw().u(this),this.Yp.ew().u(this),this.Yp.Md().u(this),this.jM.m(),this.Yp.m(),this.OM.clear(),this.NM.clear(),this.FM.m(),this.WM.m(),this.HM.m(),this.UM.m()}resize(e,t,r){this.autoSizeActive()||this.Yp.sg(e,t,r)}addCustomSeries(e,t={},r=0){let n,i=(n=fd(e),{type:"Custom",isBuiltIn:!1,defaultOptions:{...gC,...n.defaultOptions()},YM:gN,KM:n});return this.ZM(i,t,r)}addSeries(e,t={},r=0){return this.ZM(e,t,r)}removeSeries(e){let t=fc(this.OM.get(e)),r=this.UM.Hd(t);this.Yp.Qt().Hd(t),this.GM(r),this.OM.delete(e),this.NM.delete(t)}DM(e,t){this.GM(this.UM.Ug(e,t))}VM(e,t,r){this.GM(this.UM.Zg(e,t,r))}BM(e,t){let[r,n]=this.UM.Jg(e,t);return 0!==r.length&&this.GM(n),r}subscribeClick(e){this.FM.i(e)}unsubscribeClick(e){this.FM._(e)}subscribeCrosshairMove(e){this.HM.i(e)}unsubscribeCrosshairMove(e){this.HM._(e)}subscribeDblClick(e){this.WM.i(e)}unsubscribeDblClick(e){this.WM._(e)}priceScale(e,t=0){return new gq(this.Yp,e,t)}timeScale(){return this.jM}applyOptions(e){this.Yp.cr(g0(e))}options(){return this.Yp.N()}takeScreenshot(e=!1,t=!1){let r,n;try{t||(r=this.Yp.Qt().N().crosshair.mode,this.Yp.cr({crosshair:{mode:2}})),n=this.Yp.ug(e)}finally{t||void 0===r||this.Yp.Qt().cr({crosshair:{mode:r}})}return n}addPane(e=!1){let t=this.Yp.Qt().Xd();return t.O_(e),this.XM(t)}removePane(e){this.Yp.Qt().Sd(e)}swapPanes(e,t){this.Yp.Qt().Cd(e,t)}autoSizeActive(){return this.Yp.vg()}chartElement(){return this.Yp.hv()}panes(){return this.Yp.Qt().Xs().map(e=>this.XM(e))}paneSize(e=0){let t=this.Yp.gg(e);return{height:t.height,width:t.width}}setCrosshairPosition(e,t,r){let n=this.OM.get(r);if(void 0===n)return;let i=this.Yp.Qt().Kn(n);null!==i&&this.Yp.Qt().Ld(e,t,i)}clearCrosshairPosition(){this.Yp.Qt().zd(!0)}horzBehaviour(){return this.$M}ZM(e,t={},r=0){fu(void 0!==e.YM),function(e){if(void 0===e||"custom"===e.type)return;let t=e;void 0!==t.minMove&&void 0===t.precision&&(t.precision=mm(t.minMove))}(t.priceFormat),"Candlestick"===e.type&&function(e){void 0!==e.borderColor&&(e.borderUpColor=e.borderColor,e.borderDownColor=e.borderColor),void 0!==e.wickColor&&(e.wickUpColor=e.wickColor,e.wickDownColor=e.wickColor)}(t);let n=fp(fb(fo),fb(e.defaultOptions),t),i=e.YM,s=new pF(this.Yp.Qt(),e.type,n,i,e.KM);this.Yp.Qt().Fd(s,r);let o=new gQ(s,this,this,this,this.$M,e=>this.XM(e));return this.OM.set(o,s),this.NM.set(s,o),o}GM(e){let t=this.Yp.Qt();t.Od(e.Et.vc,e.Et.sM,e.Et.nM),e.F_.forEach((e,t)=>t.ht(e.le,e.iM)),t.Et().Ju(),t.Sc()}JM(e){return fc(this.NM.get(e))}qM(e){let t=new Map;e.Vg.forEach((e,r)=>{let n=r.wh(),i=gF(n)(e);if("Custom"!==n)fu(gl(i));else{let e=r.hl();fu(!e||!1===e(i))}t.set(this.JM(r),i)});let r=void 0!==e.Ig&&this.NM.has(e.Ig)?this.JM(e.Ig):void 0;return{time:e.Gr,logical:e.js,point:e.Rg,paneIndex:e.Dg,hoveredSeries:r,hoveredObjectId:e.Bg,seriesData:t,sourceEvent:e.Eg}}XM(e){let t=this.Xc.get(e);return t||(t=new gG(this.Yp,e=>this.JM(e),e,this),this.Xc.set(e,t)),t}}function g2(e){if(fv(e)){let t=document.getElementById(e);return fu(null!==t,`Cannot find element in DOM with id=${e}`),t}return e}function g3(e,t,r){let n=new g1(g2(e),t,r);return t.setOptions(n.options()),n}function g5(e,t){return g3(e,new mN,mN.pf(t))}class g4 extends gP{constructor(e,t){super(e,t,!0)}mM(e,t,r){t.mc(this.aM,fx(this.lM)),e.Yo(this.aM,r,fx(this.lM))}QM(e,t){return{wt:e,gt:t,_t:NaN,ut:NaN}}pM(){let e=this.ee.ga();this.aM=this.ee.Na().Dh().map(t=>{let r;if((t.jr??1)>1){let e=t.Wt[1],n=t.Wt[2],i=t.Wt[3];r=Math.abs(e-i)>Math.abs(n-i)?e:n}else r=t.Wt[3];return this.tb(t.js,r,e)})}}function g8(e,t,r,n,i,s,o){if(0===t.length||n.from>=t.length||n.to<=0)return;let{context:a,horizontalPixelRatio:l,verticalPixelRatio:u}=e,c=t[n.from],h=s(e,c),d=c;if(n.to-n.from<2){let t=i/2;a.beginPath();let r={_t:c._t-t,ut:c.ut},n={_t:c._t+t,ut:c.ut};a.moveTo(r._t*l,r.ut*u),a.lineTo(n._t*l,n.ut*u),o(e,h,r,n)}else{let i=(t,r)=>{o(e,h,d,r),a.beginPath(),h=t,d=r},f=d;a.beginPath(),a.moveTo(c._t*l,c.ut*u);for(let o=n.from+1;o<n.to;++o){let n=s(e,f=t[o]);switch(r){case 0:a.lineTo(f._t*l,f.ut*u);break;case 1:a.lineTo(f._t*l,t[o-1].ut*u),n!==h&&(i(n,f),a.lineTo(f._t*l,t[o-1].ut*u)),a.lineTo(f._t*l,f.ut*u);break;case 2:{let[e,r]=ve(t,o-1,o);a.bezierCurveTo(e._t*l,e.ut*u,r._t*l,r.ut*u,f._t*l,f.ut*u)}}
11!==r&&n!==h&&(i(n,f),a.moveTo(f._t*l,f.ut*u))}(d!==f||d===f&&1===r)&&o(e,h,d,f)}}let g6=6;function g7(e,t){return{_t:e._t-t._t,ut:e.ut-t.ut}}function g9(e,t){return{_t:e._t/t,ut:e.ut/t}}function ve(e,t,r){var n,i;let s=Math.max(0,t-1),o=Math.min(e.length-1,r+1);return[(n=e[t],i=g9(g7(e[r],e[s]),g6),{_t:n._t+i._t,ut:n.ut+i.ut}),g7(e[r],g9(g7(e[o],e[t]),g6))]}function vt(e,t){let r=e.context;r.strokeStyle=t,r.stroke()}class vr extends fA{constructor(){super(...arguments),this.rt=null}ht(e){this.rt=e}et(e){if(null===this.rt)return;let{ot:t,lt:r,ib:n,sb:i,ct:s,Zt:o,nb:a}=this.rt;if(null===r)return;let l=e.context;l.lineCap="butt",l.lineWidth=s*e.verticalPixelRatio,fa(l,o),l.lineJoin="round";let u=this.eb.bind(this);void 0!==i&&g8(e,t,i,r,n,u,vt),a&&function(e,t,r,n,i){if(n.to-n.from<=0)return;let{horizontalPixelRatio:s,verticalPixelRatio:o,context:a}=e,l=null,u=Math.max(1,Math.floor(s))%2/2,c=r*o+u;for(let r=n.to-1;r>=n.from;--r){let n=t[r];if(n){let t=i(e,n);t!==l&&(a.beginPath(),null!==l&&a.fill(),a.fillStyle=t,l=t);let r=Math.round(n._t*s)+u,h=n.ut*o;a.moveTo(r,h),a.arc(r,h,c,0,2*Math.PI)}}a.fill()}(e,t,a,r,u)}}class vn extends vr{eb(e,t){return t.vt}}class vi extends g4{constructor(){super(...arguments),this.cM=new vn}tb(e,t,r){return{...this.QM(e,t),...r.gh(e)}}wM(){let e=this.ee.N(),t={ot:this.aM,Zt:e.lineStyle,sb:e.lineVisible?e.lineType:void 0,ct:e.lineWidth,nb:e.pointMarkersVisible?e.pointMarkersRadius||e.lineWidth/2+2:void 0,lt:this.lM,ib:this.re.Et().ul()};this.cM.ht(t)}}let vs={type:"Line",isBuiltIn:!0,defaultOptions:{color:"#2196f3",lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},YM:(e,t)=>new vi(e,t)};function vo(e,t,r,n,i){let{context:s,horizontalPixelRatio:o,verticalPixelRatio:a}=t;s.lineTo(i._t*o,e*a),s.lineTo(n._t*o,e*a),s.closePath(),s.fillStyle=r,s.fill()}class va extends fA{constructor(){super(...arguments),this.rt=null}ht(e){this.rt=e}et(e){if(null===this.rt)return;let{ot:t,lt:r,ib:n,ct:i,Zt:s,sb:o}=this.rt,a=this.rt.ub??(this.rt.cb?0:e.mediaSize.height);if(null===r)return;let l=e.context;l.lineCap="butt",l.lineJoin="round",l.lineWidth=i,fa(l,s),l.lineWidth=1,g8(e,t,o,r,n,this.fb.bind(this),vo.bind(null,a))}}class vl{pb(e,t){let r=this.mb,{wb:n,gb:i,Mb:s,bb:o,ub:a,Sb:l,xb:u}=t;if(void 0===this.Cb||void 0===r||r.wb!==n||r.gb!==i||r.Mb!==s||r.bb!==o||r.ub!==a||r.Sb!==l||r.xb!==u){let{verticalPixelRatio:r}=e,c=a||l>0?r:1,h=l*c,d=u===e.bitmapSize.height?u:u*c,f=(a??0)*c,p=e.context.createLinearGradient(0,h,0,d);if(p.addColorStop(0,n),null!=a){let e=pW((f-h)/(d-h),0,1);p.addColorStop(e,i),p.addColorStop(e,s)}p.addColorStop(1,o),this.Cb=p,this.mb=t}return this.Cb}}class vu extends va{constructor(){super(...arguments),this.yb=new vl}fb(e,t){return this.yb.pb(e,{wb:t.eh,gb:"",Mb:"",bb:t.rh,Sb:this.rt?.Sb??0,xb:e.bitmapSize.height})}}class vc extends g4{constructor(e,t){super(e,t),this.cM=new fk,this.Rb=new vu,this.Db=new vn,this.cM.st([this.Rb,this.Db])}tb(e,t,r){return{...this.QM(e,t),...r.gh(e)}}wM(){let e,t=this.ee.N();if(null!==this.lM&&0!==this.aM.length){if(t.relativeGradient){e=this.aM[this.lM.from].ut;for(let t=this.lM.from;t<this.lM.to;t++){let r=this.aM[t];r.ut<e&&(e=r.ut)}}this.Rb.ht({sb:t.lineType,ot:this.aM,Zt:t.lineStyle,ct:t.lineWidth,ub:null,Sb:e,cb:t.invertFilledArea,lt:this.lM,ib:this.re.Et().ul()}),this.Db.ht({sb:t.lineVisible?t.lineType:void 0,ot:this.aM,Zt:t.lineStyle,ct:t.lineWidth,lt:this.lM,ib:this.re.Et().ul(),nb:t.pointMarkersVisible?t.pointMarkersRadius||t.lineWidth/2+2:void 0})}}}let vh={type:"Area",isBuiltIn:!0,defaultOptions:{topColor:"rgba( 46, 220, 135, 0.4)",bottomColor:"rgba( 40, 221, 100, 0)",invertFilledArea:!1,relativeGradient:!1,lineColor:"#33D778",lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},YM:(e,t)=>new vc(e,t)};class vd extends gP{constructor(e,t){super(e,t,!1)}mM(e,t,r){t.mc(this.aM,fx(this.lM)),e.Zo(this.aM,r,fx(this.lM))}Lb(e,t,r){return{wt:e,Hr:t.Wt[0],Ur:t.Wt[1],$r:t.Wt[2],qr:t.Wt[3],_t:NaN,Go:NaN,Xo:NaN,Jo:NaN,Qo:NaN}}pM(){let e=this.ee.ga();this.aM=this.ee.Na().Dh().map(t=>this.tb(t.js,t,e))}}class vf extends fA{constructor(){super(...arguments),this.jt=null,this.Ib=0}ht(e){this.jt=e}et(e){if(null===this.jt||0===this.jt.qs.length||null===this.jt.lt)return;let{horizontalPixelRatio:t}=e;this.Ib=function(e,t){if(e>=2.5&&e<=4)return Math.floor(3*t);let r=1-.2*Math.atan(Math.max(4,e)-4)/(.5*Math.PI),n=Math.min(Math.floor(e*r*t),Math.floor(e*t));return Math.max(Math.floor(t),n)}(this.jt.ul,t),this.Ib>=2&&Math.floor(t)%2!=this.Ib%2&&this.Ib--;let r=this.jt.qs;this.jt.zb&&this.Ob(e,r,this.jt.lt),this.jt.Mi&&this.gm(e,r,this.jt.lt);let n=this.Nb(t);(!this.jt.Mi||this.Ib>2*n)&&this.Fb(e,r,this.jt.lt)}Ob(e,t,r){if(null===this.jt)return;let{context:n,horizontalPixelRatio:i,verticalPixelRatio:s}=e,o="",a=Math.min(Math.floor(i),Math.floor(this.jt.ul*i)),l=Math.floor(.5*(a=Math.max(Math.floor(i),Math.min(a,this.Ib)))),u=null;for(let e=r.from;e<r.to;e++){let r=t[e];r.sh!==o&&(n.fillStyle=r.sh,o=r.sh);let c=Math.round(Math.min(r.Go,r.Qo)*s),h=Math.round(Math.max(r.Go,r.Qo)*s),d=Math.round(r.Xo*s),f=Math.round(r.Jo*s),p=Math.round(i*r._t)-l,m=p+a-1;null!==u&&(p=Math.min(p=Math.max(u+1,p),m));let g=m-p+1;n.fillRect(p,d,g,c-d),n.fillRect(p,h+1,g,f-h),u=m}}Nb(e){let t=Math.floor(+e);this.Ib<=2*t&&(t=Math.floor(.5*(this.Ib-1)));let r=Math.max(Math.floor(e),t);return this.Ib<=2*r?Math.max(Math.floor(e),Math.floor(+e)):r}gm(e,t,r){if(null===this.jt)return;let{context:n,horizontalPixelRatio:i,verticalPixelRatio:s}=e,o="",a=this.Nb(i),l=null;for(let e=r.from;e<r.to;e++){let r=t[e];r.ih!==o&&(n.fillStyle=r.ih,o=r.ih);let u=Math.round(r._t*i)-Math.floor(.5*this.Ib),c=u+this.Ib-1,h=Math.round(Math.min(r.Go,r.Qo)*s),d=Math.round(Math.max(r.Go,r.Qo)*s);if(null!==l&&(u=Math.min(u=Math.max(l+1,u),c)),this.jt.ul*i>2*a)fD(n,u,h,c-u+1,d-h+1,a);else{let e=c-u+1;n.fillRect(u,h,e,d-h+1)}l=c}}Fb(e,t,r){if(null===this.jt)return;let{context:n,horizontalPixelRatio:i,verticalPixelRatio:s}=e,o="",a=this.Nb(i);for(let e=r.from;e<r.to;e++){let r=t[e],l=Math.round(Math.min(r.Go,r.Qo)*s),u=Math.round(Math.max(r.Go,r.Qo)*s),c=Math.round(r._t*i)-Math.floor(.5*this.Ib),h=c+this.Ib-1;
1if(r.th!==o){let e=r.th;n.fillStyle=e,o=e}this.jt.Mi&&(c+=a,l+=a,h-=a,u-=a),l>u||n.fillRect(c,l,h-c+1,u-l+1)}}}class vp extends vd{constructor(){super(...arguments),this.cM=new vf}tb(e,t,r){return{...this.Lb(e,t,r),...r.gh(e)}}wM(){let e=this.ee.N();this.cM.ht({qs:this.aM,ul:this.re.Et().ul(),zb:e.wickVisible,Mi:e.borderVisible,lt:this.lM})}}let vm={type:"Candlestick",isBuiltIn:!0,defaultOptions:{upColor:"#26a69a",downColor:"#ef5350",wickVisible:!0,borderVisible:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},YM:(e,t)=>new vp(e,t)};class vg extends fA{constructor(){super(...arguments),this.jt=null,this.Wb=[]}ht(e){this.jt=e,this.Wb=[]}et({context:e,horizontalPixelRatio:t,verticalPixelRatio:r}){if(null===this.jt||0===this.jt.ot.length||null===this.jt.lt)return;this.Wb.length||this.Hb(t);let n=Math.max(1,Math.floor(r)),i=Math.round(this.jt.Ub*r)-Math.floor(n/2),s=i+n;for(let t=this.jt.lt.from;t<this.jt.lt.to;t++){let o,a,l=this.jt.ot[t],u=this.Wb[t-this.jt.lt.from],c=Math.round(l.ut*r);e.fillStyle=l.th,c<=i?(o=c,a=s):(o=i,a=c-Math.floor(n/2)+n),e.fillRect(u.Aa,o,u.bi-u.Aa+1,a-o)}}Hb(e){if(null===this.jt||0===this.jt.ot.length||null===this.jt.lt)return void(this.Wb=[]);let t=1>=Math.ceil(this.jt.ul*e)?0:Math.max(1,Math.floor(e)),r=Math.round(this.jt.ul*e)-t;this.Wb=Array(this.jt.lt.to-this.jt.lt.from);for(let t=this.jt.lt.from;t<this.jt.lt.to;t++){let n,i,s=this.jt.ot[t],o=Math.round(s._t*e);if(r%2){let e=(r-1)/2;n=o-e,i=o+e}else{let e=r/2;n=o-e,i=o+e-1}this.Wb[t-this.jt.lt.from]={Aa:n,bi:i,$b:o,oe:s._t*e,wt:s.wt}}for(let e=this.jt.lt.from+1;e<this.jt.lt.to;e++){let r=this.Wb[e-this.jt.lt.from],n=this.Wb[e-this.jt.lt.from-1];r.wt===n.wt+1&&r.Aa-n.bi!==t+1&&(n.$b>n.oe?n.bi=r.Aa-t-1:r.Aa=n.bi+t+1)}let n=Math.ceil(this.jt.ul*e);for(let e=this.jt.lt.from;e<this.jt.lt.to;e++){let t=this.Wb[e-this.jt.lt.from];t.bi<t.Aa&&(t.bi=t.Aa),n=Math.min(t.bi-t.Aa+1,n)}if(t>0&&n<4)for(let e=this.jt.lt.from;e<this.jt.lt.to;e++){let t=this.Wb[e-this.jt.lt.from];t.bi-t.Aa+1>n&&(t.$b>t.oe?t.bi-=1:t.Aa+=1)}}}class vv extends g4{constructor(){super(...arguments),this.cM=new vg}tb(e,t,r){return{...this.QM(e,t),...r.gh(e)}}wM(){let e={ot:this.aM,ul:this.re.Et().ul(),lt:this.lM,Ub:this.ee.Ft().Nt(this.ee.N().base,fh(this.ee.Lt()).Wt)};this.cM.ht(e)}}let vy={type:"Histogram",isBuiltIn:!0,defaultOptions:{color:"#26a69a",base:0},YM:(e,t)=>new vv(e,t)};({...fo,color:"#2196f3"});var vb=e.i(252403);let vw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],vx=(0,vb.default)("loader-circle",vw);var vS=ed,v_=dq,vM=rJ,vO=ex,vE=e.i(164472);function vP(e,[t,r]){return Math.min(r,Math.max(t,e))}function vk(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}"u">typeof window&&window.document&&window.document.createElement;var vA=ex,vj=ex,vC=ed;function vN(e,t){let r=vj.createContext(t),n=e=>{let{children:t,...n}=e,i=vj.useMemo(()=>n,Object.values(n));return(0,vC.jsx)(r.Provider,{value:i,children:t})};return n.displayName=e+"Provider",[n,function(n){let i=vj.useContext(r);if(i)return i;if(void 0!==t)return t;throw Error(`\`${n}\` must be used within \`${e}\``)}]}function vT(e,t=[]){let r=[];function n(t,n){let i=vj.createContext(n),s=r.length;r=[...r,n];let o=t=>{let{scope:r,children:n,...o}=t,a=r?.[e]?.[s]||i,l=vj.useMemo(()=>o,Object.values(o));return(0,vC.jsx)(a.Provider,{value:l,children:n})};return o.displayName=t+"Provider",[o,function(r,o){let a=o?.[e]?.[s]||i,l=vj.useContext(a);if(l)return l;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]}let i=()=>{let t=r.map(e=>vj.createContext(e));return function(r){let n=r?.[e]||t;return vj.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return i.scopeName=e,[n,vR(i,...t)]}function vR(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return vj.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}var vI=ex;function vD(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function vL(...e){return t=>{let r=!1,n=e.map(e=>{let n=vD(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():vD(e[t],null)}}}}function vV(...e){return vI.useCallback(vL(...e),e)}var vz=ex,vF=ed;function vB(e){let t=v$(e),r=vz.forwardRef((e,r)=>{let{children:n,...i}=e,s=vz.Children.toArray(n),o=s.find(vW);if(o){let e=o.props.children,n=s.map(t=>t!==o?t:vz.Children.count(e)>1?vz.Children.only(null):vz.isValidElement(e)?e.props.children:null);return(0,vF.jsx)(t,{...i,ref:r,children:vz.isValidElement(e)?vz.cloneElement(e,void 0,n):null})}return(0,vF.jsx)(t,{...i,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}function v$(e){let t=vz.forwardRef((e,t)=>
1{let{children:r,...n}=e;if(vz.isValidElement(r)){let e=vK(r),i=vH(n,r.props);return r.type!==vz.Fragment&&(i.ref=t?vL(t,e):e),vz.cloneElement(r,i)}return vz.Children.count(r)>1?vz.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vU=Symbol("radix.slottable");function vW(e){return vz.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===vU}function vH(e,t){let r={...t};for(let n in t){let i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...e)=>{let t=s(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...s}:"className"===n&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function vK(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(r=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}var vY=ed;function vq(e){let t=e+"CollectionProvider",[r,n]=vT(t),[i,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:r}=e,n=vA.default.useRef(null),s=vA.default.useRef(new Map).current;return(0,vY.jsx)(i,{scope:t,itemMap:s,collectionRef:n,children:r})};o.displayName=t;let a=e+"CollectionSlot",l=vB(a),u=vA.default.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=vV(t,s(a,r).collectionRef);return(0,vY.jsx)(l,{ref:i,children:n})});u.displayName=a;let c=e+"CollectionItemSlot",h="data-radix-collection-item",d=vB(c),f=vA.default.forwardRef((e,t)=>{let{scope:r,children:n,...i}=e,o=vA.default.useRef(null),a=vV(t,o),l=s(c,r);return vA.default.useEffect(()=>(l.itemMap.set(o,{ref:o,...i}),()=>void l.itemMap.delete(o))),(0,vY.jsx)(d,{...{[h]:""},ref:a,children:n})});return f.displayName=c,[{Provider:o,Slot:u,ItemSlot:f},function(t){let r=s(e+"CollectionConsumer",t);return vA.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}var vG=new WeakMap;function vJ(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=vX(e,t);return -1===r?void 0:e[r]}function vX(e,t){let r=e.length,n=vQ(t),i=n>=0?n:r+n;return i<0||i>=r?-1:i}function vQ(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],vG.set(this,!0)}set(e,t){return vG.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),s=this.#e.length,o=vQ(e),a=o>=0?o:s+o,l=a<0||a>=s?-1:a;if(l===this.size||i&&l===this.size-1||-1===l)return this.set(t,r),this;let u=this.size+ +!i;o<0&&a++;let c=[...this.#e],h=!1;for(let e=a;e<u;e++)if(a===e){let s=c[e];c[e]===t&&(s=c[e+1]),i&&this.delete(t),n=this.get(s),this.set(t,r)}else{h||c[e-1]!==t||(h=!0);let r=c[h?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=vJ(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=vJ(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return vJ(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);
1n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}});var vZ=ex,v0=vZ.createContext(void 0);function v1(e){let t=vZ.useContext(v0);return e||t||"ltr"}var v2=ex,v3=ex,v5=vE,v4=ed,v8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=vB(`Primitive.${t}`),n=v3.forwardRef((e,n)=>{let{asChild:i,...s}=e,o=i?r:t;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,v4.jsx)(o,{...s,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function v6(e,t){e&&v5.flushSync(()=>e.dispatchEvent(t))}var v7=ex;function v9(e){let t=v7.useRef(e);return v7.useEffect(()=>{t.current=e}),v7.useMemo(()=>(...e)=>t.current?.(...e),[])}var ye=ex;function yt(e,t=globalThis?.document){let r=v9(e);ye.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}var yr=ed,yn="DismissableLayer",yi="dismissableLayer.update",ys="dismissableLayer.pointerDownOutside",yo="dismissableLayer.focusOutside",ya=v2.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yl=v2.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=e,u=v2.useContext(ya),[c,h]=v2.useState(null),d=c?.ownerDocument??globalThis?.document,[,f]=v2.useState({}),p=vV(t,e=>h(e)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),y=c?m.indexOf(c):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,x=yc(e=>{let t=e.target,r=[...u.branches].some(e=>e.contains(t));w&&!r&&(i?.(e),o?.(e),e.defaultPrevented||a?.())},d),S=yh(e=>{let t=e.target;![...u.branches].some(e=>e.contains(t))&&(s?.(e),o?.(e),e.defaultPrevented||a?.())},d);return yt(e=>{y===u.layers.size-1&&(n?.(e),!e.defaultPrevented&&a&&(e.preventDefault(),a()))},d),v2.useEffect(()=>{if(c)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(P=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),yd(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(d.body.style.pointerEvents=P)}},[c,d,r,u]),v2.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),yd())},[c,u]),v2.useEffect(()=>{let e=()=>f({});return document.addEventListener(yi,e),()=>document.removeEventListener(yi,e)},[]),(0,yr.jsx)(v8.div,{...l,ref:p,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:vk(e.onFocusCapture,S.onFocusCapture),onBlurCapture:vk(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:vk(e.onPointerDownCapture,x.onPointerDownCapture)})});yl.displayName=yn;var yu="DismissableLayerBranch";function yc(e,t=globalThis?.document){let r=v9(e),n=v2.useRef(!1),i=v2.useRef(()=>{});return v2.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){yf(ys,r,s,{discrete:!0})},s={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function yh(e,t=globalThis?.document){let r=v9(e),n=v2.useRef(!1);return v2.useEffect(()=>{let e=e=>{e.target&&!n.current&&yf(yo,r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function yd(){let e=new CustomEvent(yi);document.dispatchEvent(e)}function yf(e,t,r,{discrete:n}){let i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?v6(i,s):i.dispatchEvent(s)}v2.forwardRef((e,t)=>
1{let r=v2.useContext(ya),n=v2.useRef(null),i=vV(t,n);return v2.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,yr.jsx)(v8.div,{...e,ref:i})}).displayName=yu;var yp=ex,ym=0;function yg(){yp.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??yv()),document.body.insertAdjacentElement("beforeend",e[1]??yv()),ym++,()=>{1===ym&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ym--}},[])}function yv(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var yy=ex,yb=ed,yw="focusScope.autoFocusOnMount",yx="focusScope.autoFocusOnUnmount",yS={bubbles:!1,cancelable:!0},y_="FocusScope",yM=yy.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=e,[a,l]=yy.useState(null),u=v9(i),c=v9(s),h=yy.useRef(null),d=vV(t,e=>l(e)),f=yy.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;yy.useEffect(()=>{if(n){let e=function(e){if(f.paused||!a)return;let t=e.target;a.contains(t)?h.current=t:yC(h.current,{select:!0})},t=function(e){if(f.paused||!a)return;let t=e.relatedTarget;null!==t&&(a.contains(t)||yC(h.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&yC(a)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(r);return a&&n.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[n,a,f.paused]),yy.useEffect(()=>{if(a){yN.add(f);let e=document.activeElement;if(!a.contains(e)){let t=new CustomEvent(yw,yS);a.addEventListener(yw,u),a.dispatchEvent(t),t.defaultPrevented||(yO(yI(yP(a)),{select:!0}),document.activeElement===e&&yC(a))}return()=>{a.removeEventListener(yw,u),setTimeout(()=>{let t=new CustomEvent(yx,yS);a.addEventListener(yx,c),a.dispatchEvent(t),t.defaultPrevented||yC(e??document.body,{select:!0}),a.removeEventListener(yx,c),yN.remove(f)},0)}}},[a,u,c,f]);let p=yy.useCallback(e=>{if(!r&&!n||f.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[n,s]=yE(t);n&&s?e.shiftKey||i!==s?e.shiftKey&&i===n&&(e.preventDefault(),r&&yC(s,{select:!0})):(e.preventDefault(),r&&yC(n,{select:!0})):i===t&&e.preventDefault()}},[r,n,f.paused]);return(0,yb.jsx)(v8.div,{tabIndex:-1,...o,ref:d,onKeyDown:p})});function yO(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(yC(n,{select:t}),document.activeElement!==r)return}function yE(e){let t=yP(e);return[yk(t,e),yk(t.reverse(),e)]}function yP(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function yk(e,t){for(let r of e)if(!yA(r,{upTo:t}))return r}function yA(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function yj(e){return e instanceof HTMLInputElement&&"select"in e}function yC(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&yj(e)&&t&&e.select()}}yM.displayName=y_;var yN=yT();function yT(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),(e=yR(e,t)).unshift(t)},remove(t){e=yR(e,t),e[0]?.resume()}}}function yR(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}function yI(e){return e.filter(e=>"A"!==e.tagName)}var yD=ex,yL=ex,yV=globalThis?.document?yL.useLayoutEffect:()=>{},yz=yD[" useId ".trim().toString()]||(()=>void 0),yF=0;function yB(e){let[t,r]=yD.useState(yz());return yV(()=>{e||r(e=>e??String(yF++))},[e]),e||(t?`radix-${t}`:"")}var y$=ex;let yU=["top","right","bottom","left"],yW=Math.min,yH=Math.max,yK=Math.round,yY=Math.floor,yq=e=>({x:e,y:e}
1),yG={left:"right",right:"left",bottom:"top",top:"bottom"};function yJ(e,t,r){return yH(e,yW(t,r))}function yX(e,t){return"function"==typeof e?e(t):e}function yQ(e){return e.split("-")[0]}function yZ(e){return e.split("-")[1]}function y0(e){return"x"===e?"y":"x"}function y1(e){return"y"===e?"height":"width"}function y2(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function y3(e){return y0(y2(e))}function y5(e,t,r){void 0===r&&(r=!1);let n=yZ(e),i=y3(e),s=y1(i),o="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=bn(o)),[o,bn(o)]}function y4(e){let t=bn(e);return[y8(e),t,y8(t)]}function y8(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let y6=["left","right"],y7=["right","left"],y9=["top","bottom"],be=["bottom","top"];function bt(e,t,r){switch(e){case"top":case"bottom":if(r)return t?y7:y6;return t?y6:y7;case"left":case"right":return t?y9:be;default:return[]}}function br(e,t,r,n){let i=yZ(e),s=bt(yQ(e),"start"===r,n);return i&&(s=s.map(e=>e+"-"+i),t&&(s=s.concat(s.map(y8)))),s}function bn(e){let t=yQ(e);return yG[t]+e.slice(t.length)}function bi(e){return{top:0,right:0,bottom:0,left:0,...e}}function bs(e){return"number"!=typeof e?bi(e):{top:e,right:e,bottom:e,left:e}}function bo(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function ba(e,t,r){let n,{reference:i,floating:s}=e,o=y2(t),a=y3(t),l=y1(a),u=yQ(t),c="y"===o,h=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,f=i[l]/2-s[l]/2;switch(u){case"top":n={x:h,y:i.y-s.height};break;case"bottom":n={x:h,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:d};break;case"left":n={x:i.x-s.width,y:d};break;default:n={x:i.x,y:i.y}}switch(yZ(t)){case"start":n[a]-=f*(r&&c?-1:1);break;case"end":n[a]+=f*(r&&c?-1:1)}return n}async function bl(e,t){var r;void 0===t&&(t={});let{x:n,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:d=!1,padding:f=0}=yX(t,e),p=bs(f),m="floating"===h?"reference":"floating",g=a[d?m:h],v=bo(await s.getClippingRect({element:null==(r=await (null==s.isElement?void 0:s.isElement(g)))||r?g:g.contextElement||await (null==s.getDocumentElement?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),y="floating"===h?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await (null==s.getOffsetParent?void 0:s.getOffsetParent(a.floating)),w=await (null==s.isElement?void 0:s.isElement(b))&&await (null==s.getScale?void 0:s.getScale(b))||{x:1,y:1},x=bo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:b,strategy:l}):y);return{top:(v.top-x.top+p.top)/w.y,bottom:(x.bottom-v.bottom+p.bottom)/w.y,left:(v.left-x.left+p.left)/w.x,right:(x.right-v.right+p.right)/w.x}}let bu=50,bc=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:bl},l=await (null==o.isRTL?void 0:o.isRTL(t)),u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:h}=ba(u,n,l),d=n,f=0,p={};for(let r=0;r<s.length;r++){let m=s[r];if(!m)continue;let{name:g,fn:v}=m,{x:y,y:b,data:w,reset:x}=await v({x:c,y:h,initialPlacement:n,placement:d,strategy:i,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});c=null!=y?y:c,h=null!=b?b:h,p[g]={...p[g],...w},x&&f<bu&&(f++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(u=!0===x.rects?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:c,y:h}=ba(u,d,l)),r=-1)}return{x:c,y:h,placement:d,strategy:i,middlewareData:p}},bh=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=yX(e,t)||{};if(null==u)return{};let h=bs(c),d={x:r,y:n},f=y3(i),p=y1(f),m=await o.getDimensions(u),g="y"===f,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=s.reference[p]+s.reference[f]-d[f]-s.floating[p],x=d[f]-s.reference[f],S=await (null==o.getOffsetParent?void 0:o.getOffsetParent(u)),_=S?S[b]:0;_&&await (null==o.isElement?void 0:o.isElement(S))||(_=a.floating[b]||s.floating[p]);let M=w/2-x/2,O=_/2-m[p]/2-1,E=yW(h[v],O),P=yW(h[y],O),k=E,A=_-m[p]-P,j=_/2-m[p]/2+M,C=yJ(k,j,A),N=!l.arrow&&null!=yZ(i)&&j!==C&&s.reference[p]/2-(j<k?E:P)-m[p]/2<0,T=N?j<k?j-k:j-A:0;return{[f]:d[f]+T,data:{[f]:C,centerOffset:j-C-T,...N&&{alignmentOffset:T}},reset:N}}}),bd=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n,i,s,o;let{placement:a,middlewareData:l,rects:u,initialPlacement:c,platform:h,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...b}=yX(e,t);if(null!=(r=l.arrow)&&r.alignmentOffset)return{};let w=yQ(a),x=y2(c),S=yQ(c)===c,_=await (null==h.isRTL?void 0:h.isRTL(d.floating)),M=m||(S||!y?[bn(c)]:y4(c)),O="none"!==v;!m&&O&&M.push(...br(c,y,v,_));let E=[c,...M],P=await h.detectOverflow(t,b),k=[],A=(null==(n=l.flip)?void 0:n.overflows)||[];if(f&&k.push(P[w]),p){let e=y5(a,u,_);k.push(P[e[0]],P[e[1]])}if(A=[...A,{placement:a,overflows:k}],!k.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=E[e];if(t&&("alignment"!==p||x===y2(t)||A.every(e=>y2(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:A},reset:{placement:t}};let r=null==(s=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>
1e.overflows[1]-t.overflows[1])[0])?void 0:s.placement;if(!r)switch(g){case"bestFit":{let e=null==(o=A.filter(e=>{if(O){let t=y2(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(r=e);break}case"initialPlacement":r=c}if(a!==r)return{reset:{placement:r}}}return{}}}};function bf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bp(e){return yU.some(t=>e[t]>=0)}let bm=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r,platform:n}=t,{strategy:i="referenceHidden",...s}=yX(e,t);switch(i){case"referenceHidden":{let e=bf(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:bp(e)}}}case"escaped":{let e=bf(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:bp(e)}}}default:return{}}}}},bg=new Set(["left","top"]);async function bv(e,t){let{placement:r,platform:n,elements:i}=e,s=await (null==n.isRTL?void 0:n.isRTL(i.floating)),o=yQ(r),a=yZ(r),l="y"===y2(r),u=bg.has(o)?-1:1,c=s&&l?-1:1,h=yX(t,e),{mainAxis:d,crossAxis:f,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof p&&(f="end"===a?-1*p:p),l?{x:f*c,y:d*u}:{x:d*u,y:f*c}}let by=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:s,placement:o,middlewareData:a}=t,l=await bv(t,e);return o===(null==(r=a.offset)?void 0:r.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},bb=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...u}=yX(e,t),c={x:r,y:n},h=await s.detectOverflow(t,u),d=y2(yQ(i)),f=y0(d),p=c[f],m=c[d];if(o){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=p+h[e],n=p-h[t];p=yJ(r,p,n)}if(a){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",r=m+h[e],n=m-h[t];m=yJ(r,m,n)}let g=l.fn({...t,[f]:p,[d]:m});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[f]:o,[d]:a}}}}}},bw=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=yX(e,t),c={x:r,y:n},h=y2(i),d=y0(h),f=c[d],p=c[h],m=yX(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===d?"height":"width",t=s.reference[d]-s.floating[e]+g.mainAxis,r=s.reference[d]+s.reference[e]-g.mainAxis;f<t?f=t:f>r&&(f=r)}if(u){var v,y;let e="y"===d?"width":"height",t=bg.has(yQ(i)),r=s.reference[h]-s.floating[e]+(t&&(null==(v=o.offset)?void 0:v[h])||0)+(t?0:g.crossAxis),n=s.reference[h]+s.reference[e]+(t?0:(null==(y=o.offset)?void 0:y[h])||0)-(t?g.crossAxis:0);p<r?p=r:p>n&&(p=n)}return{[d]:f,[h]:p}}}},bx=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;let i,s,{placement:o,rects:a,platform:l,elements:u}=t,{apply:c=()=>{},...h}=yX(e,t),d=await l.detectOverflow(t,h),f=yQ(o),p=yZ(o),m="y"===y2(o),{width:g,height:v}=a.floating;"top"===f||"bottom"===f?(i=f,s=p===(await (null==l.isRTL?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(s=f,i="end"===p?"top":"bottom");let y=v-d.top-d.bottom,b=g-d.left-d.right,w=yW(v-d[i],y),x=yW(g-d[s],b),S=!t.middlewareData.shift,_=w,M=x;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(M=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(_=y),S&&!p){let e=yH(d.left,0),t=yH(d.right,0),r=yH(d.top,0),n=yH(d.bottom,0);m?M=g-2*(0!==e||0!==t?e+t:yH(d.left,d.right)):_=v-2*(0!==r||0!==n?r+n:yH(d.top,d.bottom))}await c({...t,availableWidth:M,availableHeight:_});let O=await l.getDimensions(u.floating);return g!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function bS(){return"u">typeof window}function b_(e){return bE(e)?(e.nodeName||"").toLowerCase():"#document"}function bM(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function bO(e){var t;return null==(t=(bE(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function bE(e){return!!bS()&&(e instanceof Node||e instanceof bM(e).Node)}function bP(e){return!!bS()&&(e instanceof Element||e instanceof bM(e).Element)}function bk(e){return!!bS()&&(e instanceof HTMLElement||e instanceof bM(e).HTMLElement)}function bA(e){return!(!bS()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof bM(e).ShadowRoot)}function bj(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=bF(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&"inline"!==i&&"contents"!==i}function bC(e){return/^(table|td|th)$/.test(b_(e))}function bN(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let bT=/transform|translate|scale|rotate|perspective|filter/,bR=/paint|layout|strict|content/,bI=e=>!!e&&"none"!==e;function bD(e){let t=bP(e)?bF(e):e;return bI(t.transform)||bI(t.translate)||bI(t.scale)||bI(t.rotate)||bI(t.perspective)||!bV()&&(bI(t.backdropFilter)||bI(t.filter))||bT.test(t.willChange||"")||bR.test(t.contain||"")}function bL(e){let t=b$(e);for(;bk(t)&&!bz(t);){if(bD(t))return t;if(bN(t))break;t=b$(t)}return null}function bV(){return null==d&&(d="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),d}function bz(e){return/^(html|body|#document)$/.test(b_(e))}function bF(e){return bM(e).getComputedStyle(e)}function bB(e){return bP(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function b$(e){if("html"===b_(e))return e;let t=e.assignedSlot||e.parentNode||bA(e)&&e.host||bO(e);return bA(t)?t.host:t}function bU(e){let t=b$(e);return bz(t)?e.ownerDocument?e.ownerDocument.body:e.body:bk(t)&&bj(t)?t:bU(t)}function bW(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=bU(e),s=i===(null==(n=e.ownerDocument)?void 0:n.body),o=bM(i);if(!s)return t.concat(i,bW(i,[],r));{let e=bH(o);
1return t.concat(o,o.visualViewport||[],bj(i)?i:[],e&&r?bW(e):[])}}function bH(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bK(e){let t=bF(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=bk(e),s=i?e.offsetWidth:r,o=i?e.offsetHeight:n,a=yK(r)!==s||yK(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function bY(e){return bP(e)?e:e.contextElement}function bq(e){let t=bY(e);if(!bk(t))return yq(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:s}=bK(t),o=(s?yK(r.width):r.width)/n,a=(s?yK(r.height):r.height)/i;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}let bG=yq(0);function bJ(e){let t=bM(e);return bV()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:bG}function bX(e,t,r){return void 0===t&&(t=!1),!!r&&(!t||r===bM(e))&&t}function bQ(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);let i=e.getBoundingClientRect(),s=bY(e),o=yq(1);t&&(n?bP(n)&&(o=bq(n)):o=bq(e));let a=bX(s,r,n)?bJ(s):yq(0),l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,c=i.width/o.x,h=i.height/o.y;if(s){let e=bM(s),t=n&&bP(n)?bM(n):n,r=e,i=bH(r);for(;i&&n&&t!==r;){let e=bq(i),t=i.getBoundingClientRect(),n=bF(i),s=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,h*=e.y,l+=s,u+=o,i=bH(r=bM(i))}}return bo({width:c,height:h,x:l,y:u})}function bZ(e,t){let r=bB(e).scrollLeft;return t?t.left+r:bQ(bO(e)).left+r}function b0(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-bZ(e,r),y:r.top+t.scrollTop}}function b1(e){let t=bO(e),r=bB(e),n=e.ownerDocument.body,i=yH(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=yH(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),o=-r.scrollLeft+bZ(e),a=-r.scrollTop;return"rtl"===bF(n).direction&&(o+=yH(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}let b2=25;function b3(e,t){let r=bM(e),n=bO(e),i=r.visualViewport,s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;let e=bV();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}let u=bZ(n);if(u<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,o=Math.abs(n.clientWidth-t.clientWidth-i);o<=b2&&(s-=o)}else u<=b2&&(s+=u);return{width:s,height:o,x:a,y:l}}function b5(e,t){let r=bQ(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=bk(e)?bq(e):yq(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y;return{width:o,height:a,x:i*s.x,y:n*s.y}}function b4(e,t,r){let n;if("viewport"===t)n=b3(e,r);else if("document"===t)n=b1(bO(e));else if(bP(t))n=b5(t,r);else{let r=bJ(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return bo(n)}function b8(e,t){let r=b$(e);return!(r===t||!bP(r)||bz(r))&&("fixed"===bF(r).position||b8(r,t))}function b6(e,t){let r=t.get(e);if(r)return r;let n=bW(e,[],!1).filter(e=>bP(e)&&"body"!==b_(e)),i=null,s="fixed"===bF(e).position,o=s?b$(e):e;for(;bP(o)&&!bz(o);){let t=bF(o),r=bD(o);r||"fixed"!==t.position||(i=null),(s?r||i:!(!r&&"static"===t.position&&i&&("absolute"===i.position||"fixed"===i.position)||bj(o)&&!r&&b8(e,o)))?i=t:n=n.filter(e=>e!==o),o=b$(o)}return t.set(e,n),n}function b7(e,t,r){let n=bk(t),i=bO(t),s="fixed"===r,o=bQ(e,!0,s,t),a={scrollLeft:0,scrollTop:0},l=yq(0);function u(){l.x=bZ(i)}if(n||!n&&!s)if(("body"!==b_(t)||bj(i))&&(a=bB(t)),n){let e=bQ(t,!0,s,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&u();s&&!n&&i&&u();let c=!i||n||s?yq(0):b0(i,a);return{x:o.left+a.scrollLeft-l.x-c.x,y:o.top+a.scrollTop-l.y-c.y,width:o.width,height:o.height}}function b9(e){return"static"===bF(e).position}function we(e,t){if(!bk(e)||"fixed"===bF(e).position)return null;if(t)return t(e);let r=e.offsetParent;return bO(e)===r&&(r=r.ownerDocument.body),r}function wt(e,t){let r=bM(e);if(bN(e))return r;if(!bk(e)){let t=b$(e);for(;t&&!bz(t);){if(bP(t)&&!b9(t))return t;t=b$(t)}return r}let n=we(e,t);for(;n&&bC(n)&&b9(n);)n=we(n,t);return n&&bz(n)&&b9(n)&&!bD(n)?r:n||bL(e)||r}let wr=async function(e){let t=this.getOffsetParent||wt,r=this.getDimensions,n=await r(e.floating);return{reference:b7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},wn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,s="fixed"===i,o=bO(n),a=!!t&&bN(t.floating);if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},u=yq(1),c=yq(0),h=bk(n);if((h||!h&&!s)&&(("body"!==b_(n)||bj(o))&&(l=bB(n)),h)){let e=bQ(n);u=bq(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}let d=!o||h||s?yq(0):b0(o,l);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:r.y*u.y-l.scrollTop*u.y+c.y+d.y}},getDocumentElement:bO,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,s=[..."clippingAncestors"===r?bN(t)?[]:b6(t,this._c):[].concat(r),n],o=b4(t,s[0],i),a=o.top,l=o.right,u=o.bottom,c=o.left;for(let e=1;e<s.length;e++){let r=b4(t,s[e],i);a=yH(r.top,a),l=yW(r.right,l),u=yW(r.bottom,u),c=yH(r.left,c)}return{width:l-c,height:u-a,x:c,y:a}},getOffsetParent:wt,getElementRects:wr,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=bK(e);return{width:t,height:r}},getScale:bq,isElement:bP,isRTL:function(e){return"rtl"===bF(e).direction}};function wi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ws(e,t){let r,n=null,i=bO(e);function s(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}function o(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),s();let u=e.getBoundingClientRect(),{left:c,top:h,width:d,height:f}=u;if(a||t(),!d||!f)return;let p={rootMargin:-yY(h)+"px "+-yY(i.clientWidth-(c+d))+"px "+-yY(i.clientHeight-(h+f))+"px "+-yY(c)+"px",threshold:yH(0,yW(1,l))||1},m=!0;function g(t){let n=t[0].intersectionRatio;if(n!==l){if(!m)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==n||wi(u,e.getBoundingClientRect())||o(),m=!1}try{n=new IntersectionObserver(g,{...p,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(g,p)}n.observe(e)}return o(!0),s}function wo(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=n,c=bY(e),h=s||o?[...c?bW(c):[],...t?bW(t):[]]:[];
1h.forEach(e=>{s&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)});let d=c&&l?ws(c,r):null,f=-1,p=null;a&&(p=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),r()}),c&&!u&&p.observe(c),t&&p.observe(t));let m=u?bQ(e):null;function g(){let t=bQ(e);m&&!wi(m,t)&&r(),m=t,i=requestAnimationFrame(g)}return u&&g(),r(),()=>{var e;h.forEach(e=>{s&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(i)}}let wa=by,wl=bb,wu=bd,wc=bx,wh=bm,wd=bh,wf=bw,wp=(e,t,r)=>{let n=new Map,i={platform:wn,...r},s={...i.platform,_c:n};return bc(e,t,{...i,platform:s})};var wm=ex,wg=vE,wv=function(){},wy="u">typeof document?wm.useLayoutEffect:wv;function wb(e,t){let r,n,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!wb(e[n],t[n]))return!1;return!0}if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){let r=i[n];if(("_owner"!==r||!e.$$typeof)&&!wb(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function ww(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wx(e,t){let r=ww(e);return Math.round(t*r)/r}function wS(e){let t=wm.useRef(e);return wy(()=>{t.current=e}),t}function w_(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,h]=wm.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,f]=wm.useState(n);wb(d,n)||f(n);let[p,m]=wm.useState(null),[g,v]=wm.useState(null),y=wm.useCallback(e=>{e!==S.current&&(S.current=e,m(e))},[]),b=wm.useCallback(e=>{e!==_.current&&(_.current=e,v(e))},[]),w=s||p,x=o||g,S=wm.useRef(null),_=wm.useRef(null),M=wm.useRef(c),O=null!=l,E=wS(l),P=wS(i),k=wS(u),A=wm.useCallback(()=>{if(!S.current||!_.current)return;let e={placement:t,strategy:r,middleware:d};P.current&&(e.platform=P.current),wp(S.current,_.current,e).then(e=>{let t={...e,isPositioned:!1!==k.current};j.current&&!wb(M.current,t)&&(M.current=t,wg.flushSync(()=>{h(t)}))})},[d,t,r,P,k]);wy(()=>{!1===u&&M.current.isPositioned&&(M.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[u]);let j=wm.useRef(!1);wy(()=>(j.current=!0,()=>{j.current=!1}),[]),wy(()=>{if(w&&(S.current=w),x&&(_.current=x),w&&x){if(E.current)return E.current(w,x,A);A()}},[w,x,A,E,O]);let C=wm.useMemo(()=>({reference:S,floating:_,setReference:y,setFloating:b}),[y,b]),N=wm.useMemo(()=>({reference:w,floating:x}),[w,x]),T=wm.useMemo(()=>{let e={position:r,left:0,top:0};if(!N.floating)return e;let t=wx(N.floating,c.x),n=wx(N.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+n+"px)",...ww(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,a,N.floating,c.x,c.y]);return wm.useMemo(()=>({...c,update:A,refs:C,elements:N,floatingStyles:T}),[c,A,C,N,T])}let wM=e=>{function t(e){return({}).hasOwnProperty.call(e,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:i}="function"==typeof e?e(r):e;return n&&t(n)?null!=n.current?wd({element:n.current,padding:i}).fn(r):{}:n?wd({element:n,padding:i}).fn(r):{}}}},wO=(e,t)=>{let r=wa(e);return{name:r.name,fn:r.fn,options:[e,t]}},wE=(e,t)=>{let r=wl(e);return{name:r.name,fn:r.fn,options:[e,t]}},wP=(e,t)=>({fn:wf(e).fn,options:[e,t]}),wk=(e,t)=>{let r=wu(e);return{name:r.name,fn:r.fn,options:[e,t]}},wA=(e,t)=>{let r=wc(e);return{name:r.name,fn:r.fn,options:[e,t]}},wj=(e,t)=>{let r=wh(e);return{name:r.name,fn:r.fn,options:[e,t]}},wC=(e,t)=>{let r=wM(e);return{name:r.name,fn:r.fn,options:[e,t]}};var wN=ed,wT="Arrow",wR=ex.forwardRef((e,t)=>{let{children:r,width:n=10,height:i=5,...s}=e;return(0,wN.jsx)(v8.svg,{...s,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,wN.jsx)("polygon",{points:"0,0 30,0 15,10"})})});wR.displayName=wT;var wI=wR,wD=ex;
1function wL(e){let[t,r]=wD.useState(void 0);return yV(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,i;if(!Array.isArray(t)||!t.length)return;let s=t[0];if("borderBoxSize"in s){let e=s.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,i=t.blockSize}else n=e.offsetWidth,i=e.offsetHeight;r({width:n,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}var wV=ed,wz="Popper",[wF,wB]=vT(wz),[w$,wU]=wF(wz),wW=e=>{let{__scopePopper:t,children:r}=e,[n,i]=y$.useState(null);return(0,wV.jsx)(w$,{scope:t,anchor:n,onAnchorChange:i,children:r})};wW.displayName=wz;var wH="PopperAnchor",wK=y$.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...i}=e,s=wU(wH,r),o=y$.useRef(null),a=vV(t,o),l=y$.useRef(null);return y$.useEffect(()=>{let e=l.current;l.current=n?.current||o.current,e!==l.current&&s.onAnchorChange(l.current)}),n?null:(0,wV.jsx)(v8.div,{...i,ref:a})});wK.displayName=wH;var wY="PopperContent",[wq,wG]=wF(wY),wJ=y$.forwardRef((e,t)=>{let{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:h="partial",hideWhenDetached:d=!1,updatePositionStrategy:f="optimized",onPlaced:p,...m}=e,g=wU(wY,r),[v,y]=y$.useState(null),b=vV(t,e=>y(e)),[w,x]=y$.useState(null),S=wL(w),_=S?.width??0,M=S?.height??0,O=n+("center"!==s?"-"+s:""),E="number"==typeof c?c:{top:0,right:0,bottom:0,left:0,...c},P=Array.isArray(u)?u:[u],k=P.length>0,A={padding:E,boundary:P.filter(w0),altBoundary:k},{refs:j,floatingStyles:C,placement:N,isPositioned:T,middlewareData:R}=w_({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>wo(...e,{animationFrame:"always"===f}),elements:{reference:g.anchor},middleware:[wO({mainAxis:i+M,alignmentAxis:o}),l&&wE({mainAxis:!0,crossAxis:!1,limiter:"partial"===h?wP():void 0,...A}),l&&wk({...A}),wA({...A,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:i,height:s}=t.reference,o=e.floating.style;o.setProperty("--radix-popper-available-width",`${r}px`),o.setProperty("--radix-popper-available-height",`${n}px`),o.setProperty("--radix-popper-anchor-width",`${i}px`),o.setProperty("--radix-popper-anchor-height",`${s}px`)}}),w&&wC({element:w,padding:a}),w1({arrowWidth:_,arrowHeight:M}),d&&wj({strategy:"referenceHidden",...A})]}),[I,D]=w2(N),L=v9(p);yV(()=>{T&&L?.()},[T,L]);let V=R.arrow?.x,z=R.arrow?.y,F=R.arrow?.centerOffset!==0,[B,$]=y$.useState();return yV(()=>{v&&$(window.getComputedStyle(v).zIndex)},[v]),(0,wV.jsx)("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...C,transform:T?C.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(" "),...R.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,wV.jsx)(wq,{scope:r,placedSide:I,onArrowChange:x,arrowX:V,arrowY:z,shouldHideArrow:F,children:(0,wV.jsx)(v8.div,{"data-side":I,"data-align":D,...m,ref:b,style:{...m.style,animation:T?void 0:"none"}})})})});wJ.displayName=wY;var wX="PopperArrow",wQ={top:"bottom",right:"left",bottom:"top",left:"right"},wZ=y$.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,i=wG(wX,r),s=wQ[i.placedSide];return(0,wV.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,wV.jsx)(wI,{...n,ref:t,style:{...n.style,display:"block"}})})});function w0(e){return null!==e}wZ.displayName=wX;var w1=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,o=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[l,u]=w2(r),c={start:"0%",center:"50%",end:"100%"}[u],h=(i.arrow?.x??0)+o/2,d=(i.arrow?.y??0)+a/2,f="",p="";return"bottom"===l?(f=s?c:`${h}px`,p=`${-a}px`):"top"===l?(f=s?c:`${h}px`,p=`${n.floating.height+a}px`):"right"===l?(f=`${-a}px`,p=s?c:`${d}px`):"left"===l&&(f=`${n.floating.width+a}px`,p=s?c:`${d}px`),{data:{x:f,y:p}}}});function w2(e){let[t,r="center"]=e.split("-");return[t,r]}var w3=wW,w5=wK,w4=wJ,w8=wZ,w6=ex,w7=vE,w9=ed,xe="Portal",xt=w6.forwardRef((e,t)=>
1{let{container:r,...n}=e,[i,s]=w6.useState(!1);yV(()=>s(!0),[]);let o=r||i&&globalThis?.document?.body;return o?w7.default.createPortal((0,w9.jsx)(v8.div,{...n,ref:t}),o):null});xt.displayName=xe;var xr=ex,xn=ex;xn[" useEffectEvent ".trim().toString()],xn[" useInsertionEffect ".trim().toString()];var xi=xr[" useInsertionEffect ".trim().toString()]||yV;function xs({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[i,s,o]=xo({defaultProp:t,onChange:r}),a=void 0!==e,l=a?e:i;{let t=xr.useRef(void 0!==e);xr.useEffect(()=>{let e=t.current;if(e!==a){let t=e?"controlled":"uncontrolled",r=a?"controlled":"uncontrolled";console.warn(`${n} is changing from ${t} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=a},[a,n])}return[l,xr.useCallback(t=>{if(a){let r=xa(t)?t(e):t;r!==e&&o.current?.(r)}else s(t)},[a,e,s,o])]}function xo({defaultProp:e,onChange:t}){let[r,n]=xr.useState(e),i=xr.useRef(r),s=xr.useRef(t);return xi(()=>{s.current=t},[t]),xr.useEffect(()=>{i.current!==r&&(s.current?.(r),i.current=r)},[r,i]),[r,n,s]}function xa(e){return"function"==typeof e}Symbol("RADIX:SYNC_STATE");var xl=ex;function xu(e){let t=xl.useRef({value:e,previous:e});return xl.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xc=ex,xh=ed,xd=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),xf="VisuallyHidden";xc.forwardRef((e,t)=>(0,xh.jsx)(v8.span,{...e,ref:t,style:{...xd,...e.style}})).displayName=xf;var xp=function(e){return"u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},xm=new WeakMap,xg=new WeakMap,xv={},xy=0,xb=function(e){return e&&(e.host||xb(e.parentNode))},xw=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=xb(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return!!e})},xx=function(e,t,r,n){var i=xw(t,Array.isArray(e)?e:[e]);xv[r]||(xv[r]=new WeakMap);var s=xv[r],o=[],a=new Set,l=new Set(i),u=function(e){!e||a.has(e)||(a.add(e),u(e.parentNode))};i.forEach(u);var c=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(a.has(e))c(e);else try{var t=e.getAttribute(n),i=null!==t&&"false"!==t,l=(xm.get(e)||0)+1,u=(s.get(e)||0)+1;xm.set(e,l),s.set(e,u),o.push(e),1===l&&i&&xg.set(e,!0),1===u&&e.setAttribute(r,"true"),i||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),a.clear(),xy++,function(){o.forEach(function(e){var t=xm.get(e)-1,i=s.get(e)-1;xm.set(e,t),s.set(e,i),t||(xg.has(e)||e.removeAttribute(n),xg.delete(e)),i||e.removeAttribute(r)}),--xy||(xm=new WeakMap,xm=new WeakMap,xg=new WeakMap,xv={})}},xS=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||xp(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),xx(n,i,r,"aria-hidden")):function(){return null}},x_=function(){return(x_=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function xM(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function xO(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var xE=("function"==typeof SuppressedError&&SuppressedError,ex),xP=ex,xk="right-scroll-bar-position",xA="width-before-scroll-bar",xj="with-scroll-bars-hidden",xC="--removed-body-scroll-bar-size",xN=ex;function xT(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var xR=ex;
vendor: 1,786 bytes, line 1
1function xI(e,t){var r=(0,xR.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(value){var n=r.value;n!==value&&(r.value=value,r.callback(value,n))}}}})[0];return r.callback=t,r.facade}var xD="u">typeof window?xN.useLayoutEffect:xN.useEffect,xL=new WeakMap;function xV(e,t){var r=xI(t||null,function(t){return e.forEach(function(e){return xT(e,t)})});return xD(function(){var t=xL.get(r);if(t){var n=new Set(t),i=new Set(e),s=r.current;n.forEach(function(e){i.has(e)||xT(e,null)}),i.forEach(function(e){n.has(e)||xT(e,s)})}xL.set(r,e)},[e]),r}function xz(e){return e}function xF(e,t){void 0===t&&(t=xz);var r=[],n=!1;return{read:function(){if(n)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var i=t(e,n);return r.push(i),function(){r=r.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var i=r;r=[],i.forEach(e),t=r}var s=function(){var r=t;t=[],r.forEach(e)},o=function(){return Promise.resolve().then(s)};o(),r={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),r}}}}}var xB=function(e){void 0===e&&(e={});var t=xF(null);return t.options=x_({async:!0,ssr:!1},e),t}(),x$=function(){},xU=xP.forwardRef(function(e,t){var r=xP.useRef(null),n=xP.useState({onScrollCapture:x$,onWheelCapture:x$,onTouchMoveCapture:x$}),i=n[0],s=n[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,h=e.shards,d=e.sideCar,f=e.noRelative,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,b=e.ga
1pMode,w=xM(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=d,S=xV([r,t]),_=x_(x_({},w),i);return xP.createElement(xP.Fragment,null,c&&xP.createElement(x,{sideCar:xB,removeScrollBar:u,shards:h,noRelative:f,noIsolation:p,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:r,gapMode:b}),o?xP.cloneElement(xP.Children.only(a),x_(x_({},_),{ref:S})):xP.createElement(y,x_({},_,{className:l,ref:S}),a))});xU.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},xU.classNames={fullWidth:xA,zeroRight:xk};var xW=ex,xH=function(e){var t=e.sideCar,r=xM(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return xW.createElement(n,x_({},r))};function xK(e,t){return e.useMedium(t),xH}xH.isSideCarExport=!0;var xY=ex,xq=ex,xG=ex,xJ=function(){return k||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0)};function xX(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xJ();return t&&e.setAttribute("nonce",t),e}function xQ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xZ(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var x0=function(){var e=0,t=null;return{add:function(r){0==e&&(t=xX())&&(xQ(t,r),xZ(t)),e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},x1=function(){var e=x0();return function(t,r){xG.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},x2=function(){var e=x1();return function(t){return e(t.styles,t.dynamic),null}},x3={left:0,top:0,right:0,gap:0},x5=function(e){return parseInt(e||"",10)||0},x4=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[x5(r),x5(n),x5(i)]},x8=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return x3;var t=x4(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},x6=x2(),x7="data-scroll-locked",x9=function(e,t,r,n){var i=e.left,s=e.top,o=e.right,a=e.gap;return void 0===r&&(r="margin"),"\n  .".concat(xj," {\n   overflow: hidden ").concat(n,";\n   padding-right: ").concat(a,"px ").concat(n,";\n  }\n  body[").concat(x7,"] {\n    overflow: hidden ").concat(n,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n    padding-left: ".concat(i,"px;\n    padding-top: ").concat(s,"px;\n    padding-right: ").concat(o,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(a,"px ").concat(n,";\n    "),"padding"===r&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(xk," {\n    right: ").concat(a,"px ").concat(n,";\n  }\n  \n  .").concat(xA," {\n    margin-right: ").concat(a,"px ").concat(n,";\n  }\n  \n  .").concat(xk," .").concat(xk," {\n    right: 0 ").concat(n,";\n  }\n  \n  .").concat(xA," .").concat(xA," {\n    margin-right: 0 ").concat(n,";\n  }\n  \n  body[").concat(x7,"] {\n    ").concat(xC,": ").concat(a,"px;\n  }\n")},Se=function(){var e=parseInt(document.body.getAttribute(x7)||"0",10);return isFinite(e)?e:0},St=function(){xq.useEffect(function(){return document.body.setAttribute(x7,(Se()+1).toString()),function(){var e=Se()-1;e<=0?document.body.removeAttribute(x7):document.body.setAttribute(x7,e.toString())}},[])},Sr=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=void 0===n?"margin":n;St();var s=xq.useMemo(function(){return x8(i)},[i]);return xq.createElement(x6,{styles:x9(s,!t,i,r?"":"!important")})},Sn=!1;if("u">typeof window)try{var Si=Object.defineProperty({},"passive",{get:function(){return Sn=!0,!0}});window.addEventListener("test",Si,Si),window.removeEventListener("test",Si,Si)}catch(e){Sn=!1}var Ss=!!Sn&&{passive:!1},So=function(e){return"TEXTAREA"===e.tagName},Sa=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!So(e)&&"visible"===r[t])},Sl=function(e){return Sa(e,"overflowY")},Su=function(e){return Sa(e,"overflowX")},Sc=function(e,t){var r=t.ownerDocument,n=t;do{if("u">typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Sf(e,n)){var i=Sp(e,n);if(i[1]>i[2])return!0}n=n.parentNode}while(n&&n!==r.body)return!1},Sh=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Sd=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Sf=function(e,t){return"v"===e?Sl(t):Su(t)},Sp=function(e,t){return"v"===e?Sh(t):Sd(t)},Sm=function(e,t){return"h"===e&&"rtl"===t?-1:1},Sg=function(e,t,r,n,i){var s=Sm(e,window.getComputedStyle(t).direction),o=s*n,a=r.target,l=t.contains(a),u=!1,c=o>0,h=0,d=0;do{if(!a)break;var f=Sp(e,a),p=f[0],m=f[1]-f[2]-s*p;(p||m)&&Sf(e,a)&&(h+=m,d+=p);var g=a.parentNode;a=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&a!==document.body||l&&(t.contains(a)||t===a))return c&&(i&&1>Math.abs(h)||!i&&o>h)?u=!0:!c&&(i&&1>Math.abs(d)||!i&&-o>d)&&(u=!0),u},Sv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Sy=function(e){return[e.deltaX,e.deltaY]},Sb=function(e){return e&&"current"in e?e.current:e},Sw=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sx=function(e){return"\n  .block-interactivity-".concat(e," {pointer-events: none;}\n  .allow-interactivity-").concat(e," {pointer-events: all;}\n")},SS=0,S_=[];function SM(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}
1let SO=xK(xB,function(e){var t=xY.useRef([]),r=xY.useRef([0,0]),n=xY.useRef(),i=xY.useState(SS++)[0],s=xY.useState(x2)[0],o=xY.useRef(e);xY.useEffect(function(){o.current=e},[e]),xY.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=xO([e.lockRef.current],(e.shards||[]).map(Sb),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=xY.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!o.current.allowPinchZoom;var i,s=Sv(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-s[0],u="deltaY"in e?e.deltaY:a[1]-s[1],c=e.target,h=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===h&&"range"===c.type)return!1;var d=window.getSelection(),f=d&&d.anchorNode;if(f&&(f===c||f.contains(c)))return!1;var p=Sc(h,c);if(!p)return!0;if(p?i=h:(i="v"===h?"h":"v",p=Sc(h,c)),!p)return!1;if(!n.current&&"changedTouches"in e&&(l||u)&&(n.current=i),!i)return!0;var m=n.current||i;return Sg(m,t,e,"h"===m?l:u,!0)},[]),l=xY.useCallback(function(e){var r=e;if(S_.length&&S_[S_.length-1]===s){var n="deltaY"in r?Sy(r):Sv(r),i=t.current.filter(function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&Sw(e.delta,n)})[0];if(i&&i.should){r.cancelable&&r.preventDefault();return}if(!i){var l=(o.current.shards||[]).map(Sb).filter(Boolean).filter(function(e){return e.contains(r.target)});(l.length>0?a(r,l[0]):!o.current.noIsolation)&&r.cancelable&&r.preventDefault()}}},[]),u=xY.useCallback(function(e,r,n,i){var s={name:e,delta:r,target:n,should:i,shadowParent:SM(n)};t.current.push(s),setTimeout(function(){t.current=t.current.filter(function(e){return e!==s})},1)},[]),c=xY.useCallback(function(e){r.current=Sv(e),n.current=void 0},[]),h=xY.useCallback(function(t){u(t.type,Sy(t),t.target,a(t,e.lockRef.current))},[]),d=xY.useCallback(function(t){u(t.type,Sv(t),t.target,a(t,e.lockRef.current))},[]);xY.useEffect(function(){return S_.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:d}),document.addEventListener("wheel",l,Ss),document.addEventListener("touchmove",l,Ss),document.addEventListener("touchstart",c,Ss),function(){S_=S_.filter(function(e){return e!==s}),document.removeEventListener("wheel",l,Ss),document.removeEventListener("touchmove",l,Ss),document.removeEventListener("touchstart",c,Ss)}},[]);var f=e.removeScrollBar,p=e.inert;return xY.createElement(xY.Fragment,null,p?xY.createElement(s,{styles:Sx(i)}):null,f?xY.createElement(Sr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)});var SE=xE.forwardRef(function(e,t){return xE.createElement(xU,x_({},e,{ref:t,sideCar:SO}))});SE.classNames=xU.classNames;let SP=SE;var Sk=ed,SA=[" ","Enter","ArrowUp","ArrowDown"],Sj=[" ","Enter"],SC="Select",[SN,ST,SR]=vq(SC),[SI,SD]=vT(SC,[SR,wB]),SL=wB(),[SV,Sz]=SI(SC),[SF,SB]=SI(SC),S$=e=>{let{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:u,name:c,autoComplete:h,disabled:d,required:f,form:p}=e,m=SL(t),[g,v]=vO.useState(null),[y,b]=vO.useState(null),[w,x]=vO.useState(!1),S=v1(u),[_,M]=xs({prop:n,defaultProp:i??!1,onChange:s,caller:SC}),[O,E]=xs({prop:o,defaultProp:a,onChange:l,caller:SC}),P=vO.useRef(null),k=!g||p||!!g.closest("form"),[A,j]=vO.useState(new Set),C=Array.from(A).map(e=>e.props.value).join(";");return(0,Sk.jsx)(w3,{...m,children:(0,Sk.jsxs)(SV,{required:f,scope:t,trigger:g,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:yB(),value:O,onValueChange:E,open:_,onOpenChange:M,dir:S,triggerPointerDownPosRef:P,disabled:d,children:[(0,Sk.jsx)(SN.Provider,{scope:t,children:(0,Sk.jsx)(SF,{scope:e.__scopeSelect,onNativeOptionAdd:vO.useCallback(e=>{j(t=>new Set(t).add(e))},[]),onNativeOptionRemove:vO.useCallback(e=>{j(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:r})}),k?(0,Sk.jsxs)(_M,{"aria-hidden":!0,required:f,tabIndex:-1,name:c,autoComplete:h,value:O,onChange:e=>E(e.target.value),disabled:d,form:p,children:[void 0===O?(0,Sk.jsx)("option",{value:""}):null,Array.from(A)]},C):null]})})};S$.displayName=SC;var SU="SelectTrigger",SW=vO.forwardRef((e,t)=>
1{let{__scopeSelect:r,disabled:n=!1,...i}=e,s=SL(r),o=Sz(SU,r),a=o.disabled||n,l=vV(t,o.onTriggerChange),u=ST(r),c=vO.useRef("touch"),[h,d,f]=_E(e=>{let t=u().filter(e=>!e.disabled),r=t.find(e=>e.value===o.value),n=_P(t,e,r);void 0!==n&&o.onValueChange(n.value)}),p=e=>{a||(o.onOpenChange(!0),f()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,Sk.jsx)(w5,{asChild:!0,...s,children:(0,Sk.jsx)(v8.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":_O(o.value)?"":void 0,...i,ref:l,onClick:vk(i.onClick,e=>{e.currentTarget.focus(),"mouse"!==c.current&&p(e)}),onPointerDown:vk(i.onPointerDown,e=>{c.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(p(e),e.preventDefault())}),onKeyDown:vk(i.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||d(e.key),(!t||" "!==e.key)&&SA.includes(e.key)&&(p(),e.preventDefault())})})})});SW.displayName=SU;var SH="SelectValue",SK=vO.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...a}=e,l=Sz(SH,r),{onValueNodeHasChildrenChange:u}=l,c=void 0!==s,h=vV(t,l.onValueNodeChange);return yV(()=>{u(c)},[u,c]),(0,Sk.jsx)(v8.span,{...a,ref:h,style:{pointerEvents:"none"},children:_O(l.value)?(0,Sk.jsx)(Sk.Fragment,{children:o}):s})});SK.displayName=SH;var SY="SelectIcon",Sq=vO.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...i}=e;return(0,Sk.jsx)(v8.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});Sq.displayName=SY;var SG=e=>(0,Sk.jsx)(xt,{asChild:!0,...e});SG.displayName="SelectPortal";var SJ="SelectContent",SX=vO.forwardRef((e,t)=>{let r=Sz(SJ,e.__scopeSelect),[n,i]=vO.useState();if(yV(()=>{i(new DocumentFragment)},[]),!r.open){let t=n;return t?vE.createPortal((0,Sk.jsx)(SZ,{scope:e.__scopeSelect,children:(0,Sk.jsx)(SN.Slot,{scope:e.__scopeSelect,children:(0,Sk.jsx)("div",{children:e.children})})}),t):null}return(0,Sk.jsx)(S3,{...e,ref:t})});SX.displayName=SJ;var SQ=10,[SZ,S0]=SI(SJ),S1="SelectContentImpl",S2=vB("SelectContent.RemoveScroll"),S3=vO.forwardRef((e,t)=>{let{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:h,collisionBoundary:d,collisionPadding:f,sticky:p,hideWhenDetached:m,avoidCollisions:g,...v}=e,y=Sz(SJ,r),[b,w]=vO.useState(null),[x,S]=vO.useState(null),_=vV(t,e=>w(e)),[M,O]=vO.useState(null),[E,P]=vO.useState(null),k=ST(r),[A,j]=vO.useState(!1),C=vO.useRef(!1);vO.useEffect(()=>{if(b)return xS(b)},[b]),yg();let N=vO.useCallback(e=>{let[t,...r]=k().map(e=>e.ref.current),[n]=r.slice(-1),i=document.activeElement;for(let r of e)if(r===i||(r?.scrollIntoView({block:"nearest"}),r===t&&x&&(x.scrollTop=0),r===n&&x&&(x.scrollTop=x.scrollHeight),r?.focus(),document.activeElement!==i))return},[k,x]),T=vO.useCallback(()=>N([M,b]),[N,M,b]);vO.useEffect(()=>{A&&T()},[A,T]);let{onOpenChange:R,triggerPointerDownPosRef:I}=y;vO.useEffect(()=>{if(b){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():b.contains(r.target)||R(!1),document.removeEventListener("pointermove",t),I.current=null};return null!==I.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[b,R,I]),vO.useEffect(()=>{let e=()=>R(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[R]);let[D,L]=_E(e=>{let t=k().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=_P(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),V=vO.useCallback((e,t,r)=>{let n=!C.current&&!r;(void 0!==y.value&&y.value===t||n)&&(O(e),n&&(C.current=!0))},[y.value]),z=vO.useCallback(()=>b?.focus(),[b]),F=vO.useCallback((e,t,r)=>{let n=!C.current&&!r;(void 0!==y.value&&y.value===t||n)&&P(e)},[y.value]),B="popper"===n?S6:S4,$=B===S6?{side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:h,collisionBoundary:d,collisionPadding:f,sticky:p,hideWhenDetached:m,avoidCollisions:g}:{};return(0,Sk.jsx)(SZ,{scope:r,content:b,viewport:x,onViewportChange:S,itemRefCallback:V,selectedItem:M,onItemLeave:z,itemTextRefCallback:F,focusSelectedItem:T,selectedItemText:E,position:n,isPositioned:A,searchRef:D,children:(0,Sk.jsx)(SP,{as:S2,allowPinchZoom:!0,children:(0,Sk.jsx)(yM,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:vk(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,Sk.jsx)(yl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,Sk.jsx)(B,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...$,onPlaced:()=>j(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:vk(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;
1if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||L(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>N(t)),e.preventDefault()}})})})})})})});S3.displayName=S1;var S5="SelectItemAlignedPosition",S4=vO.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:n,...i}=e,s=Sz(SJ,r),o=S0(SJ,r),[a,l]=vO.useState(null),[u,c]=vO.useState(null),h=vV(t,e=>c(e)),d=ST(r),f=vO.useRef(!1),p=vO.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:v,focusSelectedItem:y}=o,b=vO.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&m&&g&&v){let e=s.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=s.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if("rtl"!==s.dir){let n=i.left-t.left,s=r.left-n,o=e.left-s,l=e.width+o,u=Math.max(l,t.width),c=window.innerWidth-SQ,h=vP(s,[SQ,Math.max(SQ,c-u)]);a.style.minWidth=l+"px",a.style.left=h+"px"}else{let n=t.right-i.right,s=window.innerWidth-r.right-n,o=window.innerWidth-e.right-s,l=e.width+o,u=Math.max(l,t.width),c=window.innerWidth-SQ,h=vP(s,[SQ,Math.max(SQ,c-u)]);a.style.minWidth=l+"px",a.style.right=h+"px"}let o=d(),l=window.innerHeight-2*SQ,c=m.scrollHeight,h=window.getComputedStyle(u),p=parseInt(h.borderTopWidth,10),y=parseInt(h.paddingTop,10),b=parseInt(h.borderBottomWidth,10),w=p+y+c+parseInt(h.paddingBottom,10)+b,x=Math.min(5*g.offsetHeight,w),S=window.getComputedStyle(m),_=parseInt(S.paddingTop,10),M=parseInt(S.paddingBottom,10),O=e.top+e.height/2-SQ,E=l-O,P=g.offsetHeight/2,k=p+y+(g.offsetTop+P),A=w-k;if(k<=O){let e=o.length>0&&g===o[o.length-1].ref.current;a.style.bottom="0px";let t=k+Math.max(E,P+(e?M:0)+(u.clientHeight-m.offsetTop-m.offsetHeight)+b);a.style.height=t+"px"}else{let e=o.length>0&&g===o[0].ref.current;a.style.top="0px";let t=Math.max(O,p+m.offsetTop+(e?_:0)+P)+A;a.style.height=t+"px",m.scrollTop=k-O+m.offsetTop}a.style.margin=`${SQ}px 0`,a.style.minHeight=x+"px",a.style.maxHeight=l+"px",n?.(),requestAnimationFrame(()=>f.current=!0)}},[d,s.trigger,s.valueNode,a,u,m,g,v,s.dir,n]);yV(()=>b(),[b]);let[w,x]=vO.useState();yV(()=>{u&&x(window.getComputedStyle(u).zIndex)},[u]);let S=vO.useCallback(e=>{e&&!0===p.current&&(b(),y?.(),p.current=!1)},[b,y]);return(0,Sk.jsx)(S7,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:f,onScrollButtonChange:S,children:(0,Sk.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,Sk.jsx)(v8.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});S4.displayName=S5;var S8="SelectPopperPosition",S6=vO.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:i=SQ,...s}=e,o=SL(r);return(0,Sk.jsx)(w4,{...o,...s,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});S6.displayName=S8;var[S7,S9]=SI(SJ,{}),_e="SelectViewport",_t=vO.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:n,...i}=e,s=S0(_e,r),o=S9(_e,r),a=vV(t,s.onViewportChange),l=vO.useRef(0);return(0,Sk.jsxs)(Sk.Fragment,{children:[(0,Sk.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,Sk.jsx)(SN.Slot,{scope:r,children:(0,Sk.jsx)(v8.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:vk(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=o;if(n?.current&&r){let e=Math.abs(l.current-t.scrollTop);if(e>0){let n=window.innerHeight-2*SQ,i=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(i<n){let s=i+e,o=Math.min(n,s),a=s-o;r.style.height=o+"px","0px"===r.style.bottom&&(t.scrollTop=a>0?a:0,r.style.justifyContent="flex-end")}}}l.current=t.scrollTop})})})]})});_t.displayName=_e;var _r="SelectGroup",[_n,_i]=SI(_r);vO.forwardRef((e,t)=>
1{let{__scopeSelect:r,...n}=e,i=yB();return(0,Sk.jsx)(_n,{scope:r,id:i,children:(0,Sk.jsx)(v8.div,{role:"group","aria-labelledby":i,...n,ref:t})})}).displayName=_r;var _s="SelectLabel",_o=vO.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=_i(_s,r);return(0,Sk.jsx)(v8.div,{id:i.id,...n,ref:t})});_o.displayName=_s;var _a="SelectItem",[_l,_u]=SI(_a),_c=vO.forwardRef((e,t)=>{let{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=e,a=Sz(_a,r),l=S0(_a,r),u=a.value===n,[c,h]=vO.useState(s??""),[d,f]=vO.useState(!1),p=vV(t,e=>l.itemRefCallback?.(e,n,i)),m=yB(),g=vO.useRef("touch"),v=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};if(""===n)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,Sk.jsx)(_l,{scope:r,value:n,disabled:i,textId:m,isSelected:u,onItemTextChange:vO.useCallback(e=>{h(t=>t||(e?.textContent??"").trim())},[]),children:(0,Sk.jsx)(SN.ItemSlot,{scope:r,value:n,disabled:i,textValue:c,children:(0,Sk.jsx)(v8.div,{role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:p,onFocus:vk(o.onFocus,()=>f(!0)),onBlur:vk(o.onBlur,()=>f(!1)),onClick:vk(o.onClick,()=>{"mouse"!==g.current&&v()}),onPointerUp:vk(o.onPointerUp,()=>{"mouse"===g.current&&v()}),onPointerDown:vk(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:vk(o.onPointerMove,e=>{g.current=e.pointerType,i?l.onItemLeave?.():"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:vk(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:vk(o.onKeyDown,e=>{(l.searchRef?.current===""||" "!==e.key)&&(Sj.includes(e.key)&&v()," "===e.key&&e.preventDefault())})})})})});_c.displayName=_a;var _h="SelectItemText",_d=vO.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:i,...s}=e,o=Sz(_h,r),a=S0(_h,r),l=_u(_h,r),u=SB(_h,r),[c,h]=vO.useState(null),d=vV(t,e=>h(e),l.onItemTextChange,e=>a.itemTextRefCallback?.(e,l.value,l.disabled)),f=c?.textContent,p=vO.useMemo(()=>(0,Sk.jsx)("option",{value:l.value,disabled:l.disabled,children:f},l.value),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return yV(()=>(m(p),()=>g(p)),[m,g,p]),(0,Sk.jsxs)(Sk.Fragment,{children:[(0,Sk.jsx)(v8.span,{id:l.textId,...s,ref:d}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?vE.createPortal(s.children,o.valueNode):null]})});_d.displayName=_h;var _f="SelectItemIndicator",_p=vO.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return _u(_f,r).isSelected?(0,Sk.jsx)(v8.span,{"aria-hidden":!0,...n,ref:t}):null});_p.displayName=_f;var _m="SelectScrollUpButton",_g=vO.forwardRef((e,t)=>{let r=S0(_m,e.__scopeSelect),n=S9(_m,e.__scopeSelect),[i,s]=vO.useState(!1),o=vV(t,n.onScrollButtonChange);return yV(()=>
1{if(r.viewport&&r.isPositioned){let e=function(){s(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),i?(0,Sk.jsx)(_b,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});_g.displayName=_m;var _v="SelectScrollDownButton",_y=vO.forwardRef((e,t)=>{let r=S0(_v,e.__scopeSelect),n=S9(_v,e.__scopeSelect),[i,s]=vO.useState(!1),o=vV(t,n.onScrollButtonChange);return yV(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),i?(0,Sk.jsx)(_b,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});_y.displayName=_v;var _b=vO.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:n,...i}=e,s=S0("SelectScrollButton",r),o=vO.useRef(null),a=ST(r),l=vO.useCallback(()=>{null!==o.current&&(window.clearInterval(o.current),o.current=null)},[]);return vO.useEffect(()=>()=>l(),[l]),yV(()=>{let e=a().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[a]),(0,Sk.jsx)(v8.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:vk(i.onPointerDown,()=>{null===o.current&&(o.current=window.setInterval(n,50))}),onPointerMove:vk(i.onPointerMove,()=>{s.onItemLeave?.(),null===o.current&&(o.current=window.setInterval(n,50))}),onPointerLeave:vk(i.onPointerLeave,()=>{l()})})}),_w="SelectSeparator",_x=vO.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,Sk.jsx)(v8.div,{"aria-hidden":!0,...n,ref:t})});_x.displayName=_w;var _S="SelectArrow";vO.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=SL(r),s=Sz(_S,r),o=S0(_S,r);return s.open&&"popper"===o.position?(0,Sk.jsx)(w8,{...i,...n,ref:t}):null}).displayName=_S;var __="SelectBubbleInput",_M=vO.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{let i=vO.useRef(null),s=vV(n,i),o=xu(t);return vO.useEffect(()=>{let e=i.current;if(!e)return;let r=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(o!==t&&r){let n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,Sk.jsx)(v8.select,{...r,style:{...xd,...r.style},ref:s,defaultValue:t})});function _O(e){return""===e||void 0===e}function _E(e){let t=v9(e),r=vO.useRef(""),n=vO.useRef(0),i=vO.useCallback(e=>{let i=r.current+e;t(i),function e(t){r.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))}(i)},[t]),s=vO.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return vO.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function _P(e,t,r){let n=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=r?e.indexOf(r):-1,s=_k(e,Math.max(i,0));1===n.length&&(s=s.filter(e=>e!==r));let o=s.find(e=>e.textValue.toLowerCase().startsWith(n.toLowerCase()));return o!==r?o:void 0}function _k(e,t){return e.map((r,n)=>e[(t+n)%e.length])}_M.displayName=__;var _A=S$,_j=SW,_C=SK,_N=Sq,_T=SG,_R=SX,_I=_t,_D=_o,_L=_c,_V=_d,_z=_p,_F=_g,_B=_y,_$=_x;let _U=[["path",{d:"M9 5v4",key:"14uxtq"}],["rect",{width:"4",height:"6",x:"7",y:"9",rx:"1",key:"f4fvz0"}],["path",{d:"M9 15v2",key:"r5rk32"}],["path",{d:"M17 3v2",key:"1l2re6"}],["rect",{width:"4",height:"8",x:"15",y:"5",rx:"1",key:"z38je5"}],["path",{d:"M17 13v3",key:"5l0wba"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}]],_W=(0,vb.default)("chart-candlestick",_U),_H=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],_K=(0,vb.default)("chart-line",_H);function _Y({selectedTimeRange:e,timeRangeOptions:t,onTimeRangeChange:r,theme:n,
1chartType:i,onChartTypeChange:s}){let o=t.find(t=>t.value===e)?.label||"1D",a=n?.controlBg?{backgroundColor:n.controlBg}:void 0;return(0,vS.jsxs)("div",{className:"flex items-center justify-between gap-3 @container w-full min-w-0",children:[(0,vS.jsx)("div",{className:"hidden @[480px]:inline-flex items-center gap-1.5 flex-wrap",children:t.map(t=>{let n=e===t.value;return(0,vS.jsx)("button",{type:"button","data-track-id":"kline.chart.time_range.switch","data-track-time-range":t.label,onClick:()=>{r(t.value)},className:(0,v_.cn)("px-2.5 py-1 text-[10px] font-semibold rounded-t-[10px] rounded-br-[10px] rounded-bl-[4px] border transition-colors cursor-pointer",n?"bg-[#7C44F7] text-white border-transparent":"border-[#808195]/30 bg-card/50 text-muted-foreground hover:text-foreground hover:bg-muted/60"),"aria-label":t.label,children:t.label},t.value)})}),(0,vS.jsx)("div",{className:"inline-flex @[480px]:hidden",children:(0,vS.jsxs)(_A,{value:e.toString(),onValueChange:e=>{r(Number(e))},children:[(0,vS.jsxs)(_j,{className:"flex items-center justify-between gap-2 min-w-[4.5rem] px-2.5 py-1.5 text-xs font-medium rounded-lg border border-border cursor-pointer hover:bg-muted/70 transition-colors text-foreground",style:a,children:[(0,vS.jsx)(_C,{children:o}),(0,vS.jsx)(_N,{children:(0,vS.jsxs)("svg",{className:"w-3.5 h-3.5 shrink-0",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[(0,vS.jsx)("title",{children:"展开"}),(0,vS.jsx)("path",{d:"M3.5 6L7.5 10L11.5 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,vS.jsx)(_T,{children:(0,vS.jsx)(_R,{className:"bg-popover border border-border rounded-lg shadow-lg z-50 min-w-[var(--radix-select-trigger-width)]",position:"popper",sideOffset:4,children:(0,vS.jsx)(_I,{className:"p-1",children:t.map(e=>(0,vS.jsx)(_L,{value:e.value.toString(),className:"flex items-center px-2.5 py-2 text-xs font-medium text-foreground cursor-pointer rounded-md hover:bg-muted focus:bg-muted focus:outline-none data-[highlighted]:bg-muted",children:(0,vS.jsx)(_V,{children:e.label})},e.value))})})})]})}),s?(0,vS.jsx)("button",{type:"button",onClick:()=>s("candle"===i?"area":"candle"),"data-track-id":"kline.chart.type.toggle","aria-label":"candle"===i?vM.i18n._(rX`Switch to area chart`):vM.i18n._(rX`Switch to candlestick chart`),title:"candle"===i?vM.i18n._(rX`Switch to area`):vM.i18n._(rX`Switch to candlestick`),className:"inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md border border-[#808195]/30 bg-card/50 p-1.5 text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground",children:"candle"===i?(0,vS.jsx)(_K,{className:"size-4"}):(0,vS.jsx)(_W,{className:"size-4"})}):null]})}var _q=ed,_G=rJ,_J=ip,_X=ig,_Q=iv,_Z=ex;function _0(e,t){let r=null,n=0;return function(...i){let s=Date.now();s-n>t?(e.apply(this,i),n=s):(r&&clearTimeout(r),r=setTimeout(()=>{e.apply(this,i),n=Date.now(),r=null},t-(s-n)))}}function _1({assetType:e,chart:t,series:r,chartType:n,stockName:i=_G.i18n._(rX`Stock`),container:s,timezone:o="America/Ne
1w_York",decimalPlaces:a=2,showVolume:l=!1,volumeSeries:u,theme:c}){let h=(0,_Z.useRef)(null),d=(0,_Z.useRef)([]),f=(0,_Z.useRef)(null),p=(0,_Z.useRef)({});return(0,_Z.useEffect)(()=>{if(!t||!r.current||!h.current||l&&!u?.current)return;let a=h.current,m=c?.tooltipBg??"rgba(42, 42, 42, 0.95)",g=c?.tooltipBorder??"#2a2a2a",v=c?.tooltipTextColor??c?.textColor??"#d1d5db",y=c?.tooltipMutedColor??c?.neutralColor??"#9ca3af",b=c?.upColor??"#23E33E";a.style.cssText=`
2      min-width: 120px;
3      min-height: 60px;
4      position: absolute;
5      display: none;
6      padding: 8px 12px;
7      box-sizing: border-box;
8      font-size: 12px;
9      text-align: left;
10      z-index: 1000;
11      pointer-events: none;
12      border-radius: 6px;
13      background: ${m};
14      color: ${v};
15      border: 1px solid ${g};
16      backdrop-filter: blur(8px);
17      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
18    `;let w=120,x=15,S=null,_=()=>{let e,t=s.closest(".tv-lightweight-charts")||s;if(0===(e=t.querySelectorAll("table tr td")).length){let r=t.querySelectorAll(".tv-lightweight-charts table tr td");r.length>0&&(e=r)}d.current=Array.from(e)},M=e=>{if(f.current===e)return;f.current=e,S&&(S.style.backgroundColor="",S.style.color="",S.style.border="",S.style.borderRadius="",S.style.padding="",S.style.fontWeight="",S=null),0===d.current.length&&_();let t=d.current;if(0===t.length)return;let r=null,n=1/0;for(let i of t){let t=i.textContent?.trim()||"";if(!t)continue;let s=parseFloat(t.replace(/[$,%]/g,""));if(!isNaN(s)&&s>0){let t=Math.abs(s-e);t<n&&(n=t,r=i)}}if(r&&n<.02*e){let e=r;S=e,e.style.backgroundColor="#23E33E",e.style.color="#ffffff",e.style.border="1px solid #23E33E",e.style.borderRadius="4px",e.style.padding="2px 4px",e.style.fontWeight="600",e.style.transition="all 0.1s ease"}},O=()=>{S&&(S.style.backgroundColor="",S.style.color="",S.style.border="",S.style.borderRadius="",S.style.padding="",S.style.fontWeight="",S=null)},E={stockNameEl:null,priceEl:null,dateEl:null,timeEl:null,ohlcEl:null,volumeEl:null},P=(e,t,r)=>{let n=document.createElement(e);return Object.assign(n.style,t),void 0!==r&&(n.textContent=r),n};(()=>{if(a.textContent="","line"===n)E.stockNameEl=P("div",{color:b,fontWeight:"600",marginBottom:"4px"}),E.priceEl=P("div",{fontSize:"18px",fontWeight:"700",color:v,margin:"4px 0"}),E.dateEl=P("div",{color:y,fontSize:"11px"}),E.timeEl=P("div",{color:y,fontSize:"11px"}),a.appendChild(E.stockNameEl),a.appendChild(E.priceEl),a.appendChild(E.dateEl),a.appendChild(E.timeEl);else{E.stockNameEl=P("div",{color:b,fontWeight:"600",marginBottom:"4px"}),a.appendChild(E.stockNameEl);let e=e=>{let t=P("div",{display:"flex",gap:"8px",margin:"2px 0",fontSize:"12px"}),r=P("span",{color:y},e),n=P("span",{color:v,fontWeight:"600"});return t.appendChild(r),t.appendChild(n),{row:t,valueSpan:n}},t=e("O:");a.appendChild(t.row);let r=e("H:");a.appendChild(r.row);let n=e("L:");a.appendChild(n.row);let i=e("C:");if(a.appendChild(i.row),l){let e=P("div",{display:"flex",gap:"8px",margin:"2px 0",fontSize:"12px"}),t=P("span",{color:y},"Vol:"),r=P("span",{color:v,fontWeight:"600"});e.appendChild(t),e.appendChild(r),a.appendChild(e),E.volumeEl=e}let s=P("div",{borderTop:`1px solid ${g}`,marginTop:"6px"});E.dateEl=P("div",{color:y,fontSize:"11px"}),E.timeEl=P("div",{color:y,fontSize:"11px"}),s.appendChild(E.dateEl),s.appendChild(E.timeEl),a.appendChild(s),E.ohlcEl=a,E.ohlcEl.ohlcValues=[t.valueSpan,r.valueSpan,n.valueSpan,i.valueSpan]}})();let k=_0(t=>{if(void 0===t.point||!t.time||t.point.x<0||t.point.x>s.clientWidth||t.point.y<0||t.point.y>s.clientHeight){a.style.display="none",O(),f.current=null;return}let c=t.seriesData.get(r.current);if(!c){O(),f.current=null;return}let h="line"===n&&void 0!==c.value?c.value:c.close;void 0!==h&&h>0&&M(h);let d=_J.default.unix(t.time).tz(o),m=d.format("DD MMM 'YY"),g=d.format("HH:mm")+(e===nO.Stock?" ET":"");if("line"===n){if(E.stockNameEl&&p.current.stockName!==i&&(E.stockNameEl.textContent=i,p.current.stockName=i),E.priceEl){let e=rn(void 0!==c.value?c.value:c.close),t=`$${e}`;p.current.price!==t&&(E.priceEl.textContent=t,p.current.price=t)}E.dateEl&&p.current.date!==m&&(E.dateEl.textContent=m,p.current.date=m),E.timeEl&&p.current.time!==g&&(E.timeEl.textContent=g,p.current.time=g)}else{E.stockNameEl&&p.current.stockName!==i&&(E.stockNameEl.textContent=i,p.current.stockName=i);
18let e=rn(c.open)||"N/A",r=rn(c.high)||"N/A",n=rn(c.low)||"N/A",s=rn(c.close)||"N/A",o=`${e}|${r}|${n}|${s}`;if(E.ohlcEl&&p.current.ohlc!==o){let t=E.ohlcEl.ohlcValues;t&&(t[0].textContent=`$${e}`,t[1].textContent=`$${r}`,t[2].textContent=`$${n}`,t[3].textContent=`$${s}`),p.current.ohlc=o}if(l&&E.volumeEl&&u?.current){let e=t.seriesData.get(u.current),r=e&&void 0!==e.value?t7(e.value):"N/A";if(p.current.volume!==r){let e=E.volumeEl.children[1];e&&(e.textContent=r),p.current.volume=r}}E.dateEl&&p.current.date!==m&&(E.dateEl.textContent=m,p.current.date=m),E.timeEl&&p.current.time!==g&&(E.timeEl.textContent=g,p.current.time=g)}a.style.display="block";let v=t.point.y,y=t.point.x+x;y>s.clientWidth-w&&(y=t.point.x-x-w);let b=v+x;b>s.clientHeight-100&&(b=v-100-x),a.style.left=y+"px",a.style.top=b+"px"},16);return t.subscribeCrosshairMove(k),()=>{t.unsubscribeCrosshairMove(k),O(),d.current=[],f.current=null,p.current={}}},[t,r,n,i,s,e,o,l,u,c]),(0,_q.jsx)("div",{ref:h})}_J.default.extend(_Q.default),_J.default.extend(_X.default);var _2=ex;let _3={1:6e4,2:3e5,3:36e5,4:36e5,5:864e5,6:864e5,7:6048e5};function _5(e,t,r,n,i,s,o){let[a]=(0,_2.useState)([]),[l,u]=(0,_2.useState)(null),c=(0,_2.useRef)(null),h=(0,_2.useRef)(!1),d=(0,_2.useRef)(i);d.current=i;let f=(0,_2.useRef)(n);f.current=n;let p=(0,_2.useRef)(t);p.current=t;let m=(0,_2.useCallback)(e=>{let t=f.current;for(let r=0;r<t?.length;r++){let n=t[r],i=t[r+1];if(e>=n.timestamp&&(!i||e<i.timestamp))return r}return -1},[]),g=(0,_2.useCallback)((e,t)=>{let r=m(e);if(-1===r)return;let n=f.current?.at(r)||{};u({time:n.timestamp,open:n?.open?n.open:t,high:Math.max(n.high||t,t),low:Math.min(n.low||t,t),close:t})},[m]),v=(0,_2.useCallback)(e=>{if((s||o)&&e.data.event_type?.toLowerCase()!=="trade")return;let t=e.data.close;if(!t)return;let r=Math.floor(Date.now()/1e3),n=Math.floor((d.current??_3?.[p.current]??6e4)/1e3),i=((e,t,r)=>{if(!e||!Number.isFinite(e))return r?t-t%r:t;if(t<=e+r)return e;let n=e+r;for(;n+r<=t;)n+=r;return n})(f.current?.length?Number(f.current[f.current.length-1]?.timestamp):void 0,r,n),a=Number(t);h.current?g(r,a):u({time:i,open:a,high:a,low:a,close:a})},[s,o,g]);return(0,_2.useEffect)(()=>{h.current=!s&&2===t},[s,t]),(0,_2.useEffect)(()=>{if(s){let e=ab(s,v);return c.current=e,()=>{aw(e),c.current=null}}if(o){let e=aT(o,v);return c.current=e,()=>{aR(e),c.current=null}}if(!e)return;let t=aA(e,v);return c.current=t,()=>{aj(t),c.current=null}},[s,o,e,v]),{presetData:a,realtimeData:l,isPresetMode:h.current}}function _4(e){if(!e||"u"<typeof getComputedStyle)return _8();let t=getComputedStyle(e),r=e=>t.getPropertyValue(e).trim()||void 0,n=e=>e?`hsl(${e})`:void 0;return{background:n(r("--background"))??_8().background,textColor:n(r("--foreground"))??_8().textColor,borderColor:n(r("--border"))??_8().borderColor,upColor:n(r("--gain"))??_8().upColor,downColor:n(r("--loss"))??_8().downColor,neutralColor:n(r("--muted-foreground"))??_8().neutralColor,controlBg:n(r("--card"))??_8().controlBg,controlActiveBg:n(r("--muted"))??_8().controlActiveBg,controlBorder:n(r("--border"))??_8().controlBorder,tooltipBg:n(r("--popover"))??_8().tooltipBg,tooltipBorder:n(r("--border"))??_8().tooltipBorder,tooltipTextColor:n(r("--popover-foreground"))??_8().tooltipTextColor,tooltipMutedColor:n(r("--muted-foreground"))??_8().tooltipMutedColor}}function _8(){return{background:"hsl(240 15% 5%)",textColor:"hsl(0 0% 95%)",borderColor:"hsl(240 10% 16%)",upColor:"hsl(142 71% 45%)",downColor:"hsl(0 84% 60%)",neutralColor:"hsla(0 0% 100% / 0.5)",controlBg:"hsl(240 15% 8%)",controlActiveBg:"hsl(240 10% 16%)",controlBorder:"hsl(240 10% 16%)",tooltipBg:"hsla(240 12% 8% / 0.95)",tooltipBorder:"hsl(240 10% 16%)",tooltipTextColor:"hsl(0 0% 95%)",tooltipMutedColor:"hsla(0 0% 100% / 0.6)"}}function _6(e,t){let r=t??_8();return e?{...r,...e}:r}let _7=[{value:1,label:"LIVE",get rangeLabel(){return d5.i18n._(rX`1 Hour`)},multiplier:1,timespan:2},{value:2,label:"1D",get rangeLabel(){return d5.i18n._(rX`Past week`)},multiplier:5,timespan:2},{value:3,label:"1W",get rangeLabel(){return d5.i18n._(rX`Past month`)},multiplier:1,timespan:3},{value:4,label:"1M",get rangeLabel(){return d5.i18n._(rX`Past month`)},multiplier:1,timespan:3},{value:5,label:"3M",get rangeLabel(){return d5.i18n._(rX`Past 3 months`)},multiplier:1,timespan:4},{value:6,label:"1Y",get rangeLabel(){return d5.i18n._(rX`Past year`)},multiplier:1,timespan:4},{value:7,label:"5Y",get rangeLabel(){return d5.i18n._(rX`Past 5 years`)},multiplier:1,timespan:5}];function _9(e){let t=288,r=e.findIndex(e=>!e.close),n=e.slice(0,-1===r?e.length:r).map(e=>({...e,timestamp:Number(e.timestamp)}));if(n.length){let e=n.length,r=n[n.length-1];for(let i=e;i<t;i++)n.push({timestamp:r.timestamp+300*(i-e+1)})}return n}var Me=ed,Mt=dq,Mr=rJ,Mn=ip,Mi=ex,Ms=ex;
18let Mo={1:6e4,3:6e5,4:36e5,5:864e5,6:864e5,7:864e5,8:864e5,9:6048e5};function Ma(e,t,r,n,i,s,o=nO.Stock){let[a]=(0,Ms.useState)([]),[l,u]=(0,Ms.useState)(null),c=(s||"US").toUpperCase(),h=(0,Ms.useRef)(null),d=(0,Ms.useRef)(1===t),f=o===nO.ETF,p=(0,Ms.useCallback)(e=>{for(let t=0;t<n?.length;t++){let r=n[t],i=n[t+1];if(e>=r.timestamp&&(!i||e<i.timestamp))return t}return -1},[n]),m=(0,Ms.useCallback)((e,t)=>{let r=p(e);if(-1===r)return;let i=n?.at(r)||{};u({time:i.timestamp,open:i?.open?i.open:t,high:Math.max(i.high||t,t),low:Math.min(i.low||t,t),close:t})},[n,p]),g=(0,Ms.useCallback)(e=>{let r=e.data;if(!r.close)return;let{hk:i,us:s}=iS.getState();if("HK"===c&&i.status!==nP.Intraday||"US"===c&&s.status!==nP.Intraday)return;let o=Number(r.close);if(!o)return;let a=Date.now(),l="HK"===c?Math.floor((a-9e5)/1e3):Math.floor(a/1e3),h=Math.floor((Mo?.[t]??6e4)/1e3),f=((e,t,r)=>{if(!e||!Number.isFinite(e))return r?t-t%r:t;if(t<=e+r)return e;let n=e+r;for(;n+r<=t;)n+=r;return n})(n?.length?Number(n[n.length-1]?.timestamp):void 0,l,h);d.current?m(l,o):u({time:f,open:o,high:o,low:o,close:o})},[n,c,t,m]);return(0,Ms.useEffect)(()=>{if(1!==t){d.current=!1;return}d.current=i?.status===nP.Intraday},[i?.status,t]),(0,Ms.useEffect)(()=>{if(e)return h.current=f?aO(e,g):a_(e,g),()=>{h.current&&(f?aE(h.current):aM(h.current),h.current=null)}},[e,g,f]),(0,Ms.useEffect)(()=>()=>{h.current&&(aE(h.current),aM(h.current),h.current=null)},[]),{presetData:a,realtimeData:l,isPresetMode:d.current}}var Ml=e.i(146631);function Mu(e,t){if(t<1||e.length<t)return[];let r=e.map(e=>e.close);return(0,Ml.sma)({period:t,values:r}).map((r,n)=>({time:e[n+t-1].time,value:r}))}function Mc(e,t){if(t<1||e.length<t)return[];let r=e.map(e=>e.close);return(0,Ml.ema)({period:t,values:r}).map((r,n)=>({time:e[n+t-1].time,value:r}))}function Mh(e,t){if(t<1||e.length<=t)return[];let r=e.map(e=>e.close);return(0,Ml.rsi)({period:t,values:r}).map((r,n)=>({time:e[n+t].time,value:r}))}function Md(e,t){let{fastPeriod:r,slowPeriod:n,signalPeriod:i,histogramUpColor:s,histogramDownColor:o}=t;if(e.length<n)return{macd:[],signal:[],histogram:[]};let a=e.map(e=>e.close),l=(0,Ml.macd)({values:a,fastPeriod:r,slowPeriod:n,signalPeriod:i});return{macd:l.map((e,t)=>({r:e,i:t})).filter(({r:e})=>"number"==typeof e.MACD).map(({r:t,i:r})=>({time:e[r+n-1].time,value:t.MACD})),signal:l.map((e,t)=>({r:e,i:t})).filter(({r:e})=>"number"==typeof e.signal).map(({r:t,i:r})=>({time:e[r+n-1].time,value:t.signal})),histogram:l.map((e,t)=>({r:e,i:t})).filter(({r:e})=>"number"==typeof e.histogram).map(({r:t,i:r})=>{let i=t.histogram;return{time:e[r+n-1].time,value:i,color:i>=0?s:o}})}}function Mf(e,t,r){if(t<1||e.length<t)return{upper:[],middle:[],lower:[]};let n=e.map(e=>e.close),i=(0,Ml.bollingerbands)({period:t,values:n,stdDev:r}),s=[],o=[],a=[];for(let r=0;r<i.length;r+=1){let n=e[r+t-1].time,l=i[r];"number"==typeof l.upper&&s.push({time:n,value:l.upper}),"number"==typeof l.middle&&o.push({time:n,value:l.middle}),"number"==typeof l.lower&&a.push({time:n,value:l.lower})}return{upper:s,middle:o,lower:a}}function Mp(e){return"priceLine"===e.kind||"sma"===e.kind||"ema"===e.kind||"bbands"===e.kind}function Mm(e){return"rsi"===e.kind||"macd"===e.kind}let Mg="#5E52F1",Mv="#9363FF",My="#5E52F1",Mb="#22C55E",Mw="#EF4444",Mx="#5E52F1",MS="#FFD700",M_="#22C55E",MM="#EF4444",MO="#9363FF",ME={topColor:"rgba(0,0,0,0)",bottomColor:"rgba(0,0,0,0)"};function MP(e){switch(e){case"dashed":return y.Dashed;case"dotted":return y.Dotted;default:return y.Solid}}function Mk(e,t=1){return 1===e||2===e||3===e||4===e?e:t}function MA(e,t){return t?e.filter(e=>Number(e.time)>=t):e}function Mj(e,t,r,n,i,s,o){switch(n.kind){case"priceLine":{let e=t.createPrice
18Line({price:n.price,color:n.color??MO,lineWidth:Mk(n.lineWidth,1),lineStyle:MP(n.lineStyle??"dashed"),axisLabelVisible:n.axisLabelVisible??!0,title:n.title??""});s.set(n.id,{series:t,line:e});return}case"sma":case"ema":{let t=MA("sma"===n.kind?Mu(r,n.period):Mc(r,n.period),o);if(0===t.length)return;let s=e.addSeries(vs,{color:n.color??Mg,lineWidth:Mk(n.lineWidth,1),priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1});s.setData(t),i.set(n.id,[s]);return}case"bbands":{let t=Mf(r,n.period,n.stdDev),s=MA(t.upper,o),a=MA(t.middle,o),l=MA(t.lower,o);if(0===a.length)return;let u=e.addSeries(vs,{color:n.color??Mv,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}),c=e.addSeries(vs,{color:n.middleColor??n.color??Mv,lineWidth:1,lineStyle:y.Dashed,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}),h=e.addSeries(vs,{color:n.color??Mv,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1});u.setData(s),c.setData(a),h.setData(l),i.set(n.id,[u,c,h]);return}}}function MC(e,t,r,n,i,s,o){switch(r.kind){case"rsi":{let a=MA(Mh(t,r.period),o);if(0===a.length)return;let l=e.addPane();l.setStretchFactor(.5);let u=l.paneIndex(),c=e.addSeries(vs,{color:r.color??My,lineWidth:1,priceLineVisible:!1,lastValueVisible:!0},u);c.setData(a);let[h,d]=r.thresholds??[30,70],f=c.createPriceLine({price:d,color:Mw,lineWidth:1,lineStyle:y.Dotted,axisLabelVisible:!0,title:`${d}`}),p=c.createPriceLine({price:h,color:Mb,lineWidth:1,lineStyle:y.Dotted,axisLabelVisible:!0,title:`${h}`});i.set(r.id,l),n.set(r.id,[c]),s.set(`${r.id}-overbought`,{series:c,line:f}),s.set(`${r.id}-oversold`,{series:c,line:p});return}case"macd":{let s=Md(t,{fastPeriod:r.fastPeriod,slowPeriod:r.slowPeriod,signalPeriod:r.signalPeriod,histogramUpColor:r.histogramUpColor??M_,histogramDownColor:r.histogramDownColor??MM}),a={macd:MA(s.macd,o),signal:MA(s.signal,o),histogram:MA(s.histogram,o)};if(0===a.macd.length)return;let l=e.addPane();l.setStretchFactor(.5);let u=l.paneIndex(),c=e.addSeries(vs,{color:r.macdColor??Mx,lineWidth:1,priceLineVisible:!1,lastValueVisible:!0},u),h=e.addSeries(vs,{color:r.signalColor??MS,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1},u),d=e.addSeries(vy,{priceLineVisible:!1,lastValueVisible:!1},u);c.setData(a.macd),h.setData(a.signal),d.setData(a.histogram),i.set(r.id,l),n.set(r.id,[c,h,d]);return}}}function MN(e,t,r,n,i,s){let o=n.get(e.id);if(o&&0!==o.length)switch(e.kind){case"priceLine":return;case"sma":case"ema":{let n="sma"===e.kind?Mu(t,e.period):Mc(t,e.period);o[0]?.setData(MA(n,r));return}case"bbands":{let n=Mf(t,e.period,e.stdDev);o[0]?.setData(MA(n.upper,r)),o[1]?.setData(MA(n.middle,r)),o[2]?.setData(MA(n.lower,r));return}case"rsi":return void o[0]?.setData(MA(Mh(t,e.period),r));case"macd":{let n=Md(t,{fastPeriod:e.fastPeriod,slowPeriod:e.slowPeriod,signalPeriod:e.signalPeriod,histogramUpColor:e.histogramUpColor??i,histogramDownColor:e.histogramDownColor??s});o[0]?.setData(MA(n.macd,r)),o[1]?.setData(MA(n.signal,r)),o[2]?.setData(MA(n.histogram,r));return}}}let MT=[{value:1,label:"1D",get rangeLabel(){return"1D"}},{value:3,label:"5D",get rangeLabel(){return Mr.i18n._(rX`Past week`)}},{value:4,label:"1M",get rangeLabel(){return Mr.i18n._(rX`Past month`)}},{value:5,label:"3M",get rangeLabel(){return Mr.i18n._(rX`Past 3 months`)}},{value:6,label:"6M",get rangeLabel(){return Mr.i18n._(rX`Past 6 months`)}},{value:7,label:"YTD",get rangeLabel(){return Mr.i18n._(rX`Year to date`)}},{value:8,label:"1Y",get rangeLabel(){return Mr.i18n._(rX`Past year`)}},{value:9,label:"5Y",get rangeLabel(){return Mr.i18n._(rX`Past 5 years`)}}],MR={stock:"stockChart_selectedTimeRange",crypto:"cryptoChart_selectedTimeRange",instrument:"instrumentChart_selectedTimeRange"};function MI(e){let t=MR[e]??MR.stock;try{let e=localStorage.getItem(t);if(null!==e){let t=parseInt(e,10);if(!isNaN(t)&&t>0)return t}}catch(e){console.warn("error:",e)}return 1}let MD=[{value:1,label:"LIVE",get rangeLabel(){return Mr.i18n._(rX`1 Hour`)},interval:"1m"},{value:2,label:"5m",get rangeLabel(){return Mr.i18n._(rX`Past 5 minutes`)},interval:"5m"},{value:3,label:"15m",get rangeLabel(){return Mr.i18n._(rX`Past 15 minutes`)},interval:"15m"},{value:4,label:"30m",get rangeLabel(){return Mr.i18n._(rX`Past 30 minutes`)},interval:"30m"},{value:5,label:"1h",get rangeLabel(){return Mr.i18n._(rX`Past hour`)},interval:"1h"},{value:6,label:"4h",get rangeLabel(){return Mr.i18n._(rX`Past 4 hours`)},interval:"4h"},{value:7,label:"1d",get rangeLabel(){return Mr.i18n._(rX`Past day`)},interval:"1d"},{value:8,label:"1w",get rangeLabel(){return Mr.i18n._(rX`Past week`)},interval:"1w"},{value:9,label:"1M",get rangeLabel(){return Mr.i18n._(rX`Past month`)},interval:"1M"}];function ML(e){return 1===e?[(0,Mn.default)().subtract(1,"hour").unix(),(0,Mn.default)().unix()]:2===e?[(0,Mn.default)().subtract(1,"day").unix(),(0,Mn.default)().unix()]:3===e?[(0,Mn.default)().subtract(3,"day").unix(),(0,Mn.default)().unix()]:4===e?[(0,Mn.default)().subtract(7,"day").unix(),(0,Mn.default)().unix()]:5===e?[(0,Mn.default)().subtract(14,"day").unix(),(0,Mn.default)().unix()]:6===e?[(0,Mn.default)().subtract(90,"day").unix(),(0,Mn.default)().unix()]:7===e?[(0,Mn.default)().subtract(1,"year").unix(),(0,Mn.default)().unix()]:8===e?[(0,Mn.default)().subtract(5,"year").unix(),(0,Mn.default)().unix()]:9===e?[(0,Mn.default)().subtract(10,"year").unix(),(0,Mn.default)().unix()]:void 0}function MV(e){return 1===e?[(0,Mn.default)().subtract(1,"hour").unix(),(0,Mn.default)().unix()]:2===e?[(0,Mn.default)().startOf("day").unix(),(0,Mn.default)().unix()]:3===e?[(0,Mn.default)().subtract(1,"week").unix(),(0,Mn.default)().unix()]:4===e?[(0,Mn.default)().subtract(1,"month").unix(),(0,Mn.default)().unix()]:5===e?[(0,Mn.default)().subtract(3,"month").unix(),(0,Mn.default)().unix()]:6===e?[(0,Mn.default)().subtract(1,"year").unix(),(0,Mn.default)().unix()]:7===e?[(0,Mn.default)().subtract(5,"year").unix(),(0,Mn.default)().unix()]:void 0}function Mz(e){switch(e?.toLowerCase()||"us"){case"us":default:return 390;case"hk":return 330;case"forex":case"metals":return 1440}}function MF(e,t,r,n){if(!e||0===e.length)return[];let i=Mz(r||"us"),s=n??(e.length>0?Number(e[0].timestamp):t.open),o=e.slice(e.findIndex(e=>Number(e.timestamp)>=s)).map(e=>({close:e.close,high:e.high,low:e.low,open:e.open,timestamp:Number(e.timestamp)}));if(o.length){let e=o.length,t=o[o.length-1];for(let r=e;r<i;r++)o.push({timestamp:t.timestamp+60*(r-e+1)})}return o}
18function MB({symbol:e,assetType:t=nO.Stock,locale:r,stockInfo:n,showTickerInfo:i=!1,timezone:s="America/New_York",onNoData:o,headerSlot:a,theme:l,labels:u,transparentChartBackground:c=!1,indicators:h,initialChartType:d="area",enableChartTypeToggle:f=!1,instrumentRef:p}){let m=p?.exchange??"",g=p?.symbol??"",v=p?.instrument_type??"",y=(0,Mi.useMemo)(()=>m&&g?{exchange:m,symbol:g,instrument_type:v}:null,[m,g,v]),b=null!==y,w=b||t===nO.Crypto||t===nO.Hyperliquid,x=w?"UTC":s,S=(0,Mi.useRef)(null),M=(0,Mi.useRef)(null),E=(0,Mi.useRef)(null),P=(0,Mi.useRef)(null),k=(0,Mi.useRef)(null),A=(0,Mi.useRef)(0),j=(0,Mi.useRef)(new Map),C=(0,Mi.useRef)(new Map),N=(0,Mi.useRef)(new Map),[T,R]=(0,Mi.useState)(0),I=(0,Mi.useMemo)(()=>{if(l)return _6(l);let e="u">typeof document?document.body:null;return e?_4(e):_8()},[l]),D=b?"instrument":w?"crypto":"stock",[L,V]=(0,Mi.useState)(1),[z,F]=(0,Mi.useState)(null);(0,Mi.useEffect)(()=>{V(MI(D)),F(D)},[D]);let[B,$]=(0,Mi.useState)(!1),[U,W]=(0,Mi.useState)([]),[H,K]=(0,Mi.useState)(null),[Y,q]=(0,Mi.useState)([]),[G,J]=(0,Mi.useState)(d),X=(0,Mi.useCallback)(e=>{let t=I.upColor??"#22c55e",r=I.downColor??"#ef4444",n=I.neutralColor??"rgba(255,255,255,0.5)";if(!e||0===e.length)return{lineColor:t,...ME};let i=e.filter(e=>void 0!==e.close&&null!==e.close&&e.close>0);if(0===i.length)return{lineColor:t,...ME};let s=i[0].close,o=i[i.length-1].close;return o>s?{lineColor:t,...ME}:o<s?{lineColor:r,...ME}:{lineColor:n,...ME}},[I]),Q=(0,Mi.useRef)(X);Q.current=X;let{us:Z,hk:ee,forex:et,metals:er}=iS(),en=(0,Mi.useMemo)(()=>({us:Z,hk:ee,forex:et,metals:er})[r?.toLowerCase()||"us"]??Z,[r,Z,ee,et,er]),ei=Ma(w?"":e,L,"line",U,en,r,t),es=(0,Mi.useMemo)(()=>{if(!b)return;let e=MD.find(e=>e.value===L)?.interval,t={"1m":6e4,"5m":3e5,"15m":9e5,"30m":18e5,"1h":36e5,"4h":144e5,"1d":864e5,"1w":6048e5,"1M":2592e6};return e?t[e]??6e4:void 0},[b,L]),eo=!b&&t===nO.Hyperliquid,ea=_5(b||eo?"":w?e:"",L,"line",U,es,y,eo?e:""),el=w?ea.presetData:ei.presetData,eu=w?ea.realtimeData:ei.realtimeData,ec=(0,Mi.useCallback)((e,t)=>{let r=w?e:un(e,x);return 0===t?Mn.default.unix(r).format("YYYY"):1===t?Mn.default.unix(r).format("MMM"):2===t?Mn.default.unix(r).format("DD"):3===t?Mn.default.unix(r).format("HH:mm"):""},[x,w]),eh=(0,Mi.useRef)(ec);eh.current=ec,(0,Mi.useEffect)(()=>{if(!S.current)return;let e=c?"transparent":I.controlBg??I.background??"#131615";E.current=g5(S.current,{layout:{background:{type:O.Solid,color:e},textColor:I.textColor??"#d1d5db",attributionLogo:!1,panes:{separatorColor:I.borderColor??"#2a2a2a",separatorHoverColor:I.borderColor??"#2a2a2a",enableResize:!1}},grid:{vertLines:{visible:!1},horzLines:{visible:!1}},crosshair:{mode:1,vertLine:{labelVisible:!1},horzLine:{labelVisible:!1}},rightPriceScale:{borderVisible:!1,borderColor:I.borderColor??"#2a2a2a"},timeScale:{fixLeftEdge:!0,borderVisible:!1,borderColor:I.borderColor??"#2a2a2a",timeVisible:!0,secondsVisible:!1,allowShiftVisibleRangeOnWhitespaceReplacement:!0,lockVisibleTimeRangeOnResize:!0,tickMarkFormatter:(e,t)=>eh.current(e,t)},handleScroll:{mouseWheel:!1,pressedMouseMove:!1,horzTouchDrag:!1,vertTouchDrag:!1},handleScale:{axisPressedMouseMove:!1,mouseWheel:!1,pinch:!1},width:S.current.clientWidth,height:S.current.clientHeight});let t=new ResizeObserver(e=>{for(let t of e)if(E.current&&S.current&&M.current&&t.target===M.current){let e=S.current.clientWidth,t=S.current.clientHeight;e>0&&t>0&&E.current.applyOptions({width:e,height:t})}});return M.current&&t.observe(M.current),()=>{if(t.disconnect(),P.current){try{E.current?.removeSeries(P.current)}catch(e){console.warn("error:",e)}P.current=null}j.current.clear(),C.current.clear(),N.current.clear(),k.current=null,E.current&&(E.current.remove(),E.current=null)}},[I,c]);let ed=(0,Mi.useCallback)(()=>{if(!U.length||!P.current)return;let e=e=>e>1e12?Math.floor(e/1e3):e;try{if("candle"===G){let t=U.filter(e=>Number.isFinite(e?.open)&&Number.isFinite(e?.high)&&Number.isFinite(e?.low)&&Number.isFinite(e?.close)).map(t=>({time:e(Number(t.timestamp)),open:t.open,high:t.high,low:t.low,close:t.close}));t.length>0&&(P.current.setData(t),E.current?.timeScale().fitContent())}else{let t=U.map(t=>({time:e(Number(t.timestamp)),value:t.close}));if(t.length>0){P.current.setData(t),E.current?.timeScale().fitContent();let e=X(U);P.current.applyOptions({lineColor:e.lineColor,topColor:e.topColor,bottomColor:e.bottomColor})}}if(k.current){let t=I.upColor??"#22c55e",r=I.downColor??"#ef4444",n=U.filter(e=>void 0!==e.volume&&Number.isFinite(Number(e.volume))).map(n=>{let i=(n.close??0)>=(n.open??0);return{time:e(Number(n.timestamp)),value:Number(n.volume),color:i?t:r}});n.length>0&&k.current.setData(n)}}catch(e){console.error("error:",e)}},[U,G,X,I]);(0,Mi.useEffect)(()=>
18{if(!E.current)return;if(P.current){try{E.current.removeSeries(P.current)}catch(e){console.warn("error:",e)}P.current=null}if(k.current){try{E.current.removeSeries(k.current)}catch{}k.current=null}let e=X(U),n=U.filter(e=>Number.isFinite(e?.close)).map(e=>({...e,value:e.close})),i=w?"":t===nO.Forex?"FOREX":r?.toLowerCase()==="hk"?"hk":"us",{minMove:s,base:o}=ro(n.length?n:[{time:0,value:0}],i),a={type:"custom",minMove:s,...void 0!==o?{base:1/s}:{},formatter:e=>rn(e,{showThousands:!0})},l=I.upColor??"#22c55e",u=I.downColor??"#ef4444";if("candle"===G){let e=E.current.addSeries(vm,{upColor:l,downColor:u,borderUpColor:l,borderDownColor:u,wickUpColor:l,wickDownColor:u,priceFormat:a});P.current=e,e.priceScale().applyOptions({scaleMargins:{top:.1,bottom:.4}});let t=E.current.addSeries(vy,{priceFormat:{type:"volume"},priceScaleId:"",priceLineVisible:!1,lastValueVisible:!1,color:l});t.priceScale().applyOptions({scaleMargins:{top:.7,bottom:0}}),k.current=t}else{let t=E.current.addSeries(vh,{lineColor:e.lineColor,lineWidth:2,topColor:e.topColor,bottomColor:e.bottomColor,lastPriceAnimation:_.OnDataUpdate,priceFormat:a});P.current=t,t.priceScale().applyOptions({scaleMargins:{top:.1,bottom:.1}})}U.length>0&&ed(),R(e=>e+1)},[t,U,G,X,w,r,I,ed]);let ef=(0,Mi.useRef)("");(0,Mi.useEffect)(()=>{let e=E.current,t=P.current;if(!e||!t)return;let r=h??[],n=`${T}|${r.map(e=>e.id).join("|")}`,i=n!==ef.current;if(ef.current=n,i&&(N.current.forEach(({series:e,line:t})=>{try{e.removePriceLine(t)}catch{}}),N.current.clear(),j.current.forEach(t=>{for(let r of t)try{e.removeSeries(r)}catch{}}),j.current.clear(),C.current.forEach(t=>{try{e.removePane(t.paneIndex())}catch{}}),C.current.clear(),0===r.length))return void t.applyOptions({autoscaleInfoProvider:void 0});if(0===U.length)return;let s=U.filter(e=>Number.isFinite(e?.close)).map(e=>{let t=Number(e.timestamp);return{time:t>1e12?Math.floor(t/1e3):t,close:e.close}});if(0===s.length)return;let o=s[0].time,a=[...Y.filter(e=>e.time<o),...s];if(!i){let e=I.upColor??M_,t=I.downColor??MM;for(let n of r)MN(n,a,o,j.current,e,t);return}for(let n of r)Mp(n)&&Mj(e,t,a,n,j.current,N.current,o);for(let t of r)Mm(t)&&MC(e,a,t,j.current,C.current,N.current,o);let l=[];for(let e of r)"priceLine"===e.kind&&Number.isFinite(e.price)&&l.push(e.price);l.length>0?t.applyOptions({autoscaleInfoProvider:e=>{let t=e();if(!t?.priceRange)return t;let{minValue:r,maxValue:n}=t.priceRange;for(let e of l)e<r&&(r=e),e>n&&(n=e);return{...t,priceRange:{minValue:r,maxValue:n}}}}):t.applyOptions({autoscaleInfoProvider:void 0})},[h,U,Y,T,I]);let ep=(0,Mi.useCallback)(async(n,i=!0)=>{if(!e)return;let s=A.current+1;A.current=s;let a=()=>A.current===s;try{i&&$(!0);let s=e=>{W(e);let t=e.map(e=>{let t=Number(e.timestamp),r=t>1e12?Math.floor(t/1e3):t;return e.close&&e.close>0?{time:r,value:e.close}:{time:r}});if(P.current&&t.length>0)try{P.current.setData(t),E.current?.timeScale().fitContent();let r=Q.current(e);P.current.applyOptions({lineColor:r.lineColor,topColor:r.topColor,bottomColor:r.bottomColor})}catch(e){console.error("error:",e)}};if(b&&y){let e=MD.find(e=>e.value===n),[t,r]=ML(n)??[0,0],i=await lZ({refs:[y],interval:e?.interval??"1d",from:t,to:r,limit_per_ref:2e3});if(!a())return;let l=(0===i.ret?i.data?.series?.[0]?.list??[]:[]).map(e=>({open:Number(e.open),high:Number(e.high),low:Number(e.low),close:Number(e.close),timestamp:Number(e.timestamp),volume:e.volume}));if(!l.some(e=>e.close&&Number.isFinite(e.close)&&e.close>0))return void o?.();s(l);return}if(w){let r=_7.find(e=>e.value===n),[i,l]=MV(n)??[0,0],u=await lQ({symbol:e,end_time:l,multiplier:r?.multiplier??1,start_time:i,timespan:r?.timespan??4,type:t===nO.Hyperliquid?3:1,locale:t===nO.Hyperliquid?"HYPERLIQUID":""});if(!a())return;if(0===u.ret&&u.list){if(!u.list.some(e=>e.close&&Number.isFinite(e.close)&&e.close>0))return void o?.();let e=2===n?_9(u.list):u.list.map(e=>({...e,timestamp:Number(e.timestamp)}));s(e)}else o?.();return}let l=await ic({code:e,stype:n,locale:r?.toUpperCase?.()||"US"});if(!a())return;if(0===l.ret&&l.list){let e;if(!l.list.some(e=>e.close&&Number.isFinite(e.close)&&e.close>0))return void o?.();e=1===n?MF(l.list,en,r):l.list.map(e=>({close:e.close,high:e.high,low:e.low,open:e.open,timestamp:Number(e.timestamp),volume:e.volume?String(e.volume):void 0})),K(l.prev_day),l.prev_list&&l.prev_list.length>0?q(l.prev_list.filter(e=>Number.isFinite(e?.close)).map(e=>{let t=Number(e.timestamp);return{time:t>1e12?Math.floor(t/1e3):t,close:e.close}})):q([]),s(e)}else o?.()}catch(e){console.error("error:",e)}finally{i&&a()&&$(!1)}},[t,en,w,b,r,o,y,e]);(0,Mi.useEffect)(()=>
18{if(el.length&&P.current&&E.current)try{let e=el.map(e=>({time:e.time,value:e.value||e.close||0}));P.current.setData(e)}catch(e){console.error("error:",e)}},[el]),(0,Mi.useEffect)(()=>{if(eu&&P.current&&E.current&&0!==U.length)try{let e=w?2===L:1===L;"candle"===G?P.current.update({time:eu.time,open:eu.open,high:eu.high,low:eu.low,close:eu.close},e):P.current.update({time:eu.time,value:eu.close},e),W(e=>{let t=[...e],r=Number(eu.time),n=t.findIndex(e=>Number(e.timestamp)===r),i={timestamp:r,open:eu.open,high:eu.high,low:eu.low,close:eu.close};if(-1!==n?t[n]={...t[n],...i}:t.push(i),P.current){let r=X(t),n=X(e);if(n.lineColor!==r.lineColor||n.topColor!==r.topColor||n.bottomColor!==r.bottomColor)try{P.current.applyOptions({lineColor:r.lineColor,topColor:r.topColor,bottomColor:r.bottomColor})}catch(e){console.error("error:",e)}}return t})}catch(e){console.error("error:",e)}},[U.length,G,X,w,eu,L]),(0,Mi.useEffect)(()=>{z===D&&ep(L)},[D,ep,z,L]);let em=e=>{V(e);try{localStorage.setItem(MR[D]??MR.stock,String(e))}catch(e){console.warn("error:",e)}},[eg,ev]=(0,Mi.useState)(!1);(0,Mi.useEffect)(()=>{ev(!0)},[]);let ey=u?.timeRangeOptions??(b?MD:w?_7:MT),eb=u?.intraLabel??Mr.i18n._(rX`Intra`),ew=(0,Mi.useMemo)(()=>!eg||w?ey:en?.status===nP.Intraday?ey.map(e=>1===e.value?{...e,label:eb,rangeLabel:eb}:e):ey,[eg,w,en?.status,ey,eb]),ex=(0,Mi.useMemo)(()=>{let e=ew.find(e=>e.value===L);return e?.rangeLabel||"1D"},[ew,L]),eS=(0,Mi.useMemo)(()=>{let e=H?.close||0;return(((n?.close||0)-e)/e*100).toFixed(2)},[n?.close,H?.close]);return(0,Me.jsxs)("div",{ref:M,className:(0,Mt.cn)("w-full h-full rounded-lg overflow-hidden flex flex-col",""),children:[!!i&&(a??(0,Me.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Me.jsx)(d3,{code:e,type:t===nO.Crypto?"crypto":t===nO.Forex?"forex":t===nO.ETF?"etf":t===nO.Stock?"stock":"hyperliquid",locale:r,className:"w-10 h-10"}),(0,Me.jsxs)("div",{children:[(0,Me.jsx)("div",{className:"text-foreground text-base font-bold leading-4",children:e}),(0,Me.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,Me.jsxs)("span",{className:"text-base font-bold text-foreground",children:["$",rn(n?.close??0,{showThousands:!0})]}),(0,Me.jsxs)("span",{className:(0,Mt.cn)("font-bold text-sm",eS?.startsWith("-")?"text-down":"text-up"),children:[eS?.startsWith("-")?"":"+",eS,"%"]}),(0,Me.jsx)("span",{className:"text-muted-foreground font-bold text-sm",children:ex})]})]})]})),(0,Me.jsx)(_Y,{symbol:e,type:t,price:n?.close||0,timeRangeOptions:ew,selectedTimeRange:L,showTickerInfo:i,onTimeRangeChange:em,theme:I,chartType:G,onChartTypeChange:f?J:void 0}),(0,Me.jsxs)("div",{className:"relative flex-1",children:[B?(0,Me.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-card/80 z-10 backdrop-blur-sm",children:(0,Me.jsx)(vx,{className:"w-8 h-8 animate-spin"})}):null,(0,Me.jsx)("div",{ref:S,className:"w-full h-full"}),E.current&&P.current&&S.current&&(0,Me.jsx)(_1,{assetType:t,chart:E.current,series:P,chartType:"line",stockName:e,timezone:x,container:S.current,theme:I})]})]})}var M$=dq,MU=rJ,MW=ex;function MH(e){return e?`hsl(${e})`:"hsl(0 0% 50%)"}function MK(e=null){let t=e??document.documentElement;if("u"<typeof getComputedStyle)return MY();let r=getComputedStyle(t),n=e=>r.getPropertyValue(e).trim()||void 0,i=MH(n("--foreground")),s=MH(n("--background")),o=MH(n("--muted-foreground")),a=MH(n("--border")),l=MH(n("--gain")),u=MH(n("--loss")),c=MH(n("--primary")),h=MH(n("--card")),d=n("--foreground");return{background:s,foreground:i,muted:o,border:a,gain:l,loss:u,primary:c,card:h,gridLine:d?`hsl(${d} / 0.2)`:"rgba(128, 128, 128, 0.2)",labelBg:i}}function MY(){return{background:"hsl(240 15% 5%)",foreground:"hsl(0 0% 95%)",muted:"hsla(0 0% 100% / 0.5)",border:"hsl(240 10% 16%)",gain:"hsl(142 71% 45%)",loss:"hsl(0 84% 60%)",primary:"hsl(217 91% 60%)",card:"hsl(240 12% 8%)",gridLine:"rgba(255, 255, 255, 0.2)",labelBg:"hsl(0 0% 95%)"}}function Mq(e){if(null==e)return;let t=Number.parseFloat(e);return Number.isNaN(t)?void 0:t}function MG(e){if(e.data){let t=e.data;return{symbol:t.symbol??e.symbol??"",asset_type:t.type??e.asset_type??0,locale:t.locale||e.locale||"",summary:e.summary,pivot:Mq(t.pivot),r1:Mq(t.R1),r2:Mq(t.R2),r3:Mq(t.R3),s1:Mq(t.S1),s2:Mq(t.S2),s3:Mq(t.S3)}}return{symbol:e.symbol??"",asset_type:e.asset_type??0,locale:e.locale??"",pivot:e.pivot,r1:e.r1,r2:e.r2,r3:e.r3,s1:e.s1,s2:e.s2,s3:e.s3}}function MJ(e){switch(e){case nO.Metals:return"metals";case nO.Forex:return"forex";case nO.Crypto:default:return"US"}}function MX(e){switch(e){case nO.ETF:return nO.ETF;case nO.Crypto:return nO.Crypto;case nO.Metals:return nO.Metals;case nO.Forex:return nO.Forex;case nO.Hyperliquid:return nO.Hyperliquid;default:return nO.Stock}}let MQ=new Set(["","US","HK","HYPERLIQUID"]);function MZ({label:e,value:t,variant:r}){return(0,ew.jsxs)("span",{className:(0,M$.cn)("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-semibold","resistance"===r&&"bg-loss/15 text-loss","support"===r&&"bg-gain/15 text-gain","pivot"===r&&"bg-primary/15 text-primary"),children:[(0,ew.jsx)("span",{className:"opacity-70",children:e}),(0,ew.jsxs)("span",{children:["$",t.toFixed(2)]})]})}let M0=(0,MW.memo)(function({data:e}){let t=(0,MW.useMemo)(()=>MG(e),[e]),{symbol:r,asset_type:n,locale:i,summary:s}=t,o="HYPERLIQUID"===(i||"").toUpperCase()||n===nO.Hyperliquid,a=r.toUpperCase(),l=o?nO.Hyperliquid:MX(n),u=o?"HYPE
18RLIQUID":i||MJ(n),c=(0,MW.useMemo)(()=>{let e=l===nO.Crypto||l===nO.Hyperliquid,t=i.trim().toUpperCase();if(!(!e||MQ.has(t)))return{exchange:t,symbol:a,instrument_type:l===nO.Hyperliquid?"perp":"spot"}},[l,i,a]),h=(0,MW.useMemo)(()=>MK(),[]),d=(0,MW.useMemo)(()=>({background:h.card,textColor:h.muted,borderColor:h.border,upColor:h.gain,downColor:h.loss}),[h]),f=[null!=t.r3&&{label:"R3",value:t.r3},null!=t.r2&&{label:"R2",value:t.r2},null!=t.r1&&{label:"R1",value:t.r1}].filter(Boolean),p=[null!=t.s1&&{label:"S1",value:t.s1},null!=t.s2&&{label:"S2",value:t.s2},null!=t.s3&&{label:"S3",value:t.s3}].filter(Boolean),m=null!=t.pivot,g=f.length>0||p.length>0||m,v=(0,ew.jsxs)("div",{className:"flex min-w-0 items-center gap-2 mb-3",children:[(0,ew.jsx)(d3,{code:a,type:l===nO.Crypto||l===nO.Hyperliquid?"crypto":l===nO.Forex?"forex":l===nO.ETF?"etf":"0",locale:u,className:"size-8 shrink-0"}),(0,ew.jsx)("span",{className:"shrink-0 text-sm font-bold text-foreground",children:a}),g&&(0,ew.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[f.map(e=>(0,ew.jsx)(MZ,{label:e.label,value:e.value,variant:"resistance"},e.label)),m&&(0,ew.jsx)(MZ,{label:MU.i18n._(rX`Pivot`),value:t.pivot,variant:"pivot"}),p.map(e=>(0,ew.jsx)(MZ,{label:e.label,value:e.value,variant:"support"},e.label))]})]});return(0,ew.jsxs)("div",{className:"w-full space-y-2",children:[(0,ew.jsx)("div",{className:"h-[320px] w-full overflow-hidden rounded-xl",children:(0,ew.jsx)(MB,{symbol:a,locale:u,assetType:l,instrumentRef:c,showTickerInfo:!0,headerSlot:v,theme:d})}),s&&(0,ew.jsx)("p",{className:"px-1 text-sub leading-relaxed text-muted-foreground",children:s})]})});var M1=ed,M2=dq,M3=rJ;let M5=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],M4=(0,vb.default)("chart-column",M5);var M8=ex,M6=ed,M7=rJ;let M9=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Oe=(0,vb.default)("triangle-alert",M9),Ot=rX`This is not financial advice. Please do your own research before making investment decisions.`;function Or({text:e}){let t=e??M7.i18n._(Ot);return(0,M6.jsxs)("div",{className:"mt-3 flex gap-2 rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,M6.jsx)(Oe,{className:"size-4 shrink-0 text-gain","aria-hidden":!0}),(0,M6.jsx)("p",{className:"text-sub text-muted-foreground",children:t})]})}var On=ed;let Oi=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Os=(0,vb.default)("paperclip",Oi);function Oo({icon:e,title:t,timeTag:r}){return(0,On.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border pb-3",children:[(0,On.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,On.jsx)(e,{className:"size-5 shrink-0 text-warning"}),(0,On.jsx)("span",{className:"truncate font-semibold text-foreground",children:t})]}),(0,On.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[r&&(0,On.jsx)("span",{className:"rounded-md bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:r}),(0,On.jsx)(Os,{className:"size-4 text-muted-foreground","aria-hidden":!0})]})]})}var Oa=ed,Ol=dq,Ou=ex;function Oc(e){let t=Math.abs(e);return t>=100?e.toFixed(0):t>=1?e.toFixed(1):e.toFixed(2)}let Oh=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Od(e){let t=new Date(1e3*e);return`${Oh[t.getMonth()]} ${t.getDate()}`}let Of="12px Arial",Op="rgba(255, 255, 255, 0.5)";function Om(e,t){(0,Ou.useEffect)(()=>{let r=e.current;if(!r)return;let n=()=>{let e=window.devicePixelRatio||1,n=r.parentElement;if(!n)return;let i=n.getBoundingClientRect();r.width=i.width*e,r.height=i.height*e,r.style.width=`${i.width}px`,r.style.height=`${i.height}px`;let s=r.getContext("2d");s&&s.setTransform(1,0,0,1,0,0),s&&s.scale(e,e),i.width>0&&i.height>0&&t.current()};n();let i=new window.ResizeObserver(n);return r.parentElement&&i.observe(r.parentElement),window.addEventListener("resize",n),(
18)=>{i.disconnect(),window.removeEventListener("resize",n)}},[e,t])}function Og({closePrices:e,timestamps:t,predictTs:r,high:n,low:i,sentiment:s,height:o=150,showAxes:a=!1,className:l}){let u=(0,Ou.useRef)(null),c=(0,Ou.useRef)(()=>{}),h=(0,Ou.useRef)(0);Om(u,c);let d=(0,Ou.useCallback)((e,t,r,n,i,s,o,a,l,u)=>{let c=n-i,h=(c/i*100).toFixed(2),d=`${c>=0?"+":""}${h}%`,f=n.toFixed(2),p=10,m=8,g=2,v=2;e.font=`${p}px Arial`;let y=e.measureText(f);e.font=`${m}px Arial`;let b=e.measureText(d),w=Math.max(y.width,b.width),x=l||w+12,S=p+m+v+2*g,_=t,M=r-S/2;M<0&&(M=0),M+S>a&&(M=a-S),_+x>o&&(_=o-x-4),e.fillStyle=s,e.beginPath(),e.moveTo(_+4,M),e.lineTo(_+x-4,M),e.quadraticCurveTo(_+x,M,_+x,M+4),e.lineTo(_+x,M+S-4),e.quadraticCurveTo(_+x,M+S,_+x-4,M+S),e.lineTo(_+4,M+S),e.quadraticCurveTo(_,M+S,_,M+S-4),e.lineTo(_,M+4),e.quadraticCurveTo(_,M,_+4,M),e.closePath(),e.fill(),e.font=`${p}px Arial`,e.fillStyle=u??"white",e.textAlign="right",e.textBaseline="top",e.fillText(f,_+x-6,M+g),e.font=`${m}px Arial`,e.fillText(d,_+x-6,M+g+p+v)},[]),f=(0,Ou.useCallback)(()=>{let o=u.current;if(!o)return;let l=o.getContext("2d");if(!l)return;let f=MK(o.parentElement),p=o.getBoundingClientRect(),m=window.devicePixelRatio||1;o.width=p.width*m,o.height=p.height*m,o.style.width=`${p.width}px`,o.style.height=`${p.height}px`,l.setTransform(1,0,0,1,0,0),l.scale(m,m);let g=p.width,v=p.height;if(0===g||0===v){h.current<20&&o.isConnected&&(h.current+=1,setTimeout(()=>c.current(),100));return}h.current=0;let y=e.length;if(0===y)return;let b=30*!!a,w=a&&Array.isArray(t)&&t.length>1,x=v-18*!!w,S=b+(g-b)*.7,_=g-60,M="string"==typeof n&&n.includes("$")?parseFloat(n.substring(1)):parseFloat(String(n)),O="string"==typeof i&&i.includes("$")?parseFloat(i.substring(1)):parseFloat(String(i)),E=Math.min(...e,M,O),P=Math.max(...e,M,O)-E||1;l.clearRect(0,0,g,v),l.strokeStyle=f.gridLine,l.lineWidth=1,l.setLineDash([5,4]);for(let e=1;e<=3;e++){let t=x*e/4;l.beginPath(),l.moveTo(b,t),l.lineTo(g,t),l.stroke()}l.beginPath(),l.moveTo(S,0),l.lineTo(S,x),l.stroke(),l.setLineDash([]);let k=.1*v,A=x,j=A-k;l.strokeStyle=s.toLowerCase().includes("bullish")?f.gain:s.toLowerCase().includes("bearish")?f.loss:f.muted,l.lineWidth=1.5;let C=l.createLinearGradient(0,k,0,A);s.toLowerCase().includes("bullish")?(C.addColorStop(0,`${f.gain.replace(")","")} / 0.5)`),C.addColorStop(1,`${f.gain.replace(")","")} / 0)`)):s.toLowerCase().includes("bearish")?(C.addColorStop(0,`${f.loss.replace(")","")} / 0.5)`),C.addColorStop(1,`${f.loss.replace(")","")} / 0)`)):(C.addColorStop(0,`${f.muted.replace(")","")} / 0.5)`),C.addColorStop(1,`${f.muted.replace(")","")} / 0)`)),l.fillStyle=C,l.beginPath();for(let t=0;t<y;t++){let r=b+(S-b)*t/(y-1),n=A-(e[t]-E)/P*j;0===t?l.moveTo(r,n):l.lineTo(r,n)}l.lineTo(S,A),l.lineTo(b,A),l.closePath(),l.fill(),l.beginPath();for(let t=0;t<y;t++){let r=b+(S-b)*t/(y-1),n=A-(e[t]-E)/P*j;0===t?l.moveTo(r,n):l.lineTo(r,n)}l.stroke(),l.fillStyle=`${f.muted.replace(")","")} / 0.2)`,l.fillRect(S,0,g-S,x);let N=A-(e[y-1]-E)/P*j,T=5,R=8,I=9,D=x-5-4,L=Math.max(9,Math.min(A-(M-E)/P*j,D)),V=Math.max(9,Math.min(A-(O-E)/P*j,D)),z=28,F=4,B=L,$=V;32>Math.abs(B-$)&&(B<$?(B=$-z-F)-z/2<I&&($=(B=I+z/2)+z+F):($=B-z-F)-z/2<I&&(B=($=I+z/2)+z+F)),l.setLineDash([5,4]);let U=M>e[y-1]?f.gain:f.loss,W=O>e[y-1]?f.gain:f.loss;l.strokeStyle=U,l.beginPath(),l.moveTo(S,N),l.lineTo(_,L),l.stroke(),l.strokeStyle=W,l.beginPath(),l.moveTo(S,N),l.lineTo(_,V),l.stroke(),l.setLineDash([]),l.fillStyle=U,l.beginPath(),l.arc(_,L,3,0,2*Math.PI),l.fill(),l.fillStyle=W,l.beginPath(),l.arc(_,V,3,0,2*Math.PI),l.fill();let H=12,K=10;l.font=`${H}px Arial`;let Y=l.measureText(M.toFixed(2)),q=l.measureText(O.toFixed(2)),G=M-e[y-1],J=(G/e[y-1]*100).toFixed(2),X=`${G>=0?"+":""}${J}%`,Q=O-e[y-1],Z=(Q/e[y-1]*100).toFixed(2),ee=`${Q>=0?"+":""}${Z}%`;l.font=`${K}px Arial`;let et=l.measureText(X),er=l.measureText(ee),en=Math.max(Math.max(Y.width,q.width),Math.max(et.width,er.width))+12;if(d(l,_+T+R,B,M,e[y-1],U,g,v,en,U===f.gain?"black":"white"),d(l,_+T+R,$,O,e[y-1],W,g,v,en,U===f.gain?"black":"white"),a){l.font=Of,l.fillStyle=Op,l.textAlign="right",l.textBaseline="middle";for(let e=1;e<=3;e++){let t=x*e/4,r=E+(A-t)/j*P;l.fillText(Oc(r),b-4,t)}}if(w&&t){l.font=Of,l.fillStyle=Op,l.textBaseline="bottom";let e=v-2,n=Od(t[0]),i=Od(t[t.length-1]),s=r?Od(r):null,o=b+l.measureText(n).width,a=l.measureText(i).width,u=S-a/2,c=S+a/2,h=s?_-l.measureText(s).width:1/0,d=4,f=u-4>o&&c+d<h;l.textAlign="left",l.fillText(n,b,e),f&&(l.textAlign="center",l.fillText(i,S,e)),s&&(l.textAlign="right",l.fillText(s,_,e))}},[e,t,r,n,i,s,a,d]);return c.current=f,(0,Ou.useEffect)(()=>{e.length>0&&u.current&&setTimeout(()=>{c.current()},200)},[e]),(0,Oa.jsx)("div",{className:(0,Ol.cn)("relative w-full",l),style:{height:o},children:(0,Oa.jsx)("canvas",{ref:u,className:"block h-full w-full",style:{width:"100%",height:o}})})}let Ov=new Set(["","US","HK","HYPERLIQUID"]);function Oy({data:e}){let{symbol:t,type:r,title:n,desc:i,sentiment:s,low:o,high:a,locale:l}=e,[u,c]=(0,M8.useState)([]),[h,d]=(0,M8.useState)(!0),[f,p]=(0,M8.useState)(null),[m,g]=(0,M8.useState)("0"),[v,y]=(0,M8.useState)("0"),b=(0,M8.useCallback)(async()=>
18{if(d(!0),p(null),t)try{let e=Date.now(),i=Math.floor(e/1e3),s=n.includes("1-Day")?30:n.includes("1-Month")?90:60;if("2"===r||"5"===r){let e="5"===r,n=t.toUpperCase(),o=(l??"").trim().toUpperCase(),a=!Ov.has(o),u=[];if(a){let t=await lZ({refs:[{exchange:o,symbol:n,instrument_type:e?"perp":"spot"}],interval:"1d",from:i-24*s*3600,to:i,limit_per_ref:s});u=(t?.data?.series?.[0]?.list??[]).map(e=>Number(e.close??0))}else{let t=await lQ({symbol:n,end_time:i,multiplier:1,timespan:4,limit:s,type:e?3:1,locale:e?"HYPERLIQUID":""});t?.list.length>0&&(u=t.list.map(e=>Number(e.close??0)))}if(u.length>0){let e=u[u.length-1],t=u[u.length-2]??e;g(rn(e)||"0"),y(((e-t)/(t||1)*100).toFixed(2)),c(u)}}else{let e=await il({code:t,end_time:i.toString(),multiplier:"1",timespan:"4",count:s.toString(),locale:l});if(e?.data?.list?.length>0){let t=e.data.list.map(e=>Number(e.close??0)),r=t[t.length-1],n=t[t.length-2]??r;g(rn(r)||"0"),y(((r-n)/(n||1)*100).toFixed(2)),c(t)}}d(!1)}catch(e){console.error("Prediction fetchKlineData error:",e),p(M3.i18n._(rX`Failed to get kline data`)),d(!1)}},[t,r,n,l]);(0,M8.useEffect)(()=>{b()},[b]);let w=()=>s.toLowerCase().includes("bullish")?"text-gain":s.toLowerCase().includes("bearish")?"text-loss":"text-muted-foreground",x=()=>(0,M1.jsxs)("div",{className:"w-full rounded-xl border border-border bg-card p-5 animate-pulse",children:[(0,M1.jsxs)("div",{className:"flex items-center mb-2 relative",children:[(0,M1.jsx)("div",{className:"h-4 bg-muted rounded w-20 mb-3"}),(0,M1.jsx)("div",{className:"ml-2 h-4 bg-muted rounded w-32 mb-3"}),(0,M1.jsxs)("div",{className:"absolute right-0 top-[-10px]",children:[(0,M1.jsx)("div",{className:"h-5 bg-muted rounded w-16 mb-1"}),(0,M1.jsx)("div",{className:"h-4 bg-muted rounded w-12"})]})]}),(0,M1.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,M1.jsx)("div",{className:"h-3 bg-muted rounded w-full"}),(0,M1.jsx)("div",{className:"h-3 bg-muted rounded w-4/5"}),(0,M1.jsx)("div",{className:"h-3 bg-muted rounded w-3/4"})]}),(0,M1.jsx)("div",{className:"relative w-full h-[150px] bg-muted/50 rounded-lg",children:(0,M1.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,M1.jsx)("div",{className:"w-8 h-8 border-2 border-border border-t-primary rounded-full animate-spin"})})})]}),S=t?`${M3.i18n._(rX`Price Prediction for`)} ${t}`:n;return t?(0,M1.jsxs)("div",{className:"w-full rounded-xl bg-[#1c1c1c] p-4",children:[(0,M1.jsx)(Oo,{icon:M4,title:S}),(0,M1.jsx)("div",{className:"mt-4 space-y-2 border-b border-border pb-4",children:(0,M1.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-body",children:[(0,M1.jsx)("span",{className:"text-muted-foreground",children:M3.i18n._(rX`Option`)}),(0,M1.jsx)("span",{className:"text-muted-foreground",children:M3.i18n._(rX`Value`)}),(0,M1.jsx)("span",{className:"text-foreground",children:M3.i18n._(rX`Daily High`)}),(0,M1.jsx)("span",{className:"font-medium text-gain",children:a}),(0,M1.jsx)("span",{className:"text-foreground",children:M3.i18n._(rX`Daily Low`)}),(0,M1.jsx)("span",{className:"font-medium text-loss",children:o}),(0,M1.jsx)("span",{className:"text-foreground",children:M3.i18n._(rX`Sentiment`)}),(0,M1.jsx)("span",{className:(0,M2.cn)("font-medium",w()),children:s}),(0,M1.jsx)("span",{className:"text-foreground",children:M3.i18n._(rX`Confidence`)}),(0,M1.jsxs)("span",{className:"font-medium text-muted-foreground",children:[m," (",Number(v)>0?"+":"",v,"%)"]})]})}),(0,M1.jsx)("div",{className:"text-muted-foreground text-sub leading-relaxed",children:i}),(0,M1.jsxs)("div",{className:"relative mt-4 w-full h-full",children:[h&&(0,M1.jsx)("div",{className:"flex justify-center items-center h-[150px]",children:(0,M1.jsx)(vx,{className:"w-8 h-8 animate-spin text-muted-foreground"})}),f&&(0,M1.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,M1.jsx)("span",{className:"text-down text-body",children:f})}),!h&&!f&&0===u.length&&(0,M1.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,M1.jsx)("span",{className:"text-muted-foreground text-body",children:M3.i18n._(rX`No data`)})}),!h&&!f&&u.length>0&&(0,M1.jsx)(Og,{closePrices:u,high:a,low:o,sentiment:s,height:150})]}),(0,M1.jsx)(Or,{})]}):(0,M1.jsx)(x,{})}var Ob=ed,Ow=ed,Ox=rJ;function OS({active:e,payload:t,label:r,labelFormatter:n,formatter:i,hideSeriesLabel:s}){if(!e||!t?.length)return null;let o=n?n(String(r??""),t):null!=r?String(r):void 0;return(0,Ow.jsxs)("div",{className:"min-w-[7rem] rounded-lg border border-border bg-popover px-3 py-2 text-xs shadow-lg",style:{boxShadow:"0 4px 12px -2px rgb(0 0 0 / 0.15)"},children:[null!=o&&(0,Ow.jsx)("div",{className:"mb-1.5 font-medium text-foreground",children:o}),(0,Ow.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=i&&e?.value!==void 0?i(e.value,e.name??e.dataKey??"value",e):e?.value,r=e?.name??e?.dataKey??Ox.i18n._(rX`Value`);return(0,Ow.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,Ow.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ow.jsx)("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:e.color??"hsl(var(--muted-foreground))"}}),!s&&(0,Ow.jsx)("span",{className:"text-muted-foreground",children:r})]}),(0,Ow.jsx)("span",{className:"font-semibold tabular-nums text-foreground",children:t})]},e.dataKey??r)})})]})}function O_(e){return(0,Ow.jsx)(OS,{active:e.active,payload:e.payload,label:e.label,labelFormatter:e.labelFormatter,formatter:e.formatter,hideSeriesLabel:e.hideSeriesLabel})}var OM=ed,OO=dq,OE=ex,OP=ex;function Ok(e,t){return OP.useReducer((e,r)=>t[e][r]??e,e)}var OA=e=>{let{present:t,children:r}=e,n=Oj(t),i="function"==typeof r?r({present:n.isPresent}):OP.Children.only(r),s=vV(n.ref,ON(i));return"function"==typeof r||n.isPresent?OP.cloneElement(i,{ref:s}):null};function Oj(e){let[t,r]=OP.useState(),n=OP.useRef(null),i=OP.useRef(e),s=OP.useRef("none"),[o,a]=Ok(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return OP.useEffect(()=>{let e=OC(n.current);s.current="mounted"===o?e:"none"},[o]),yV(()=>{let t=n.current,r=i.current;if(r!==e){let n=s.current,o=OC(t);if(e)a("MOUNT");else if("none"===o||t?.display==="none")a("UNMOUNT");else{let e=n!==o;r&&e?a("ANIMATION_OUT"):a("UNMOUNT")}i.current=e}},[e,a]),yV(()=>
18{if(t){let e,r=t.ownerDocument.defaultView??window,o=s=>{let o=OC(n.current).includes(CSS.escape(s.animationName));if(s.target===t&&o&&(a("ANIMATION_END"),!i.current)){let n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},l=e=>{e.target===t&&(s.current=OC(n.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",o),t.addEventListener("animationend",o),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",o),t.removeEventListener("animationend",o)}}a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:OP.useCallback(e=>{n.current=e?getComputedStyle(e):null,r(e)},[])}}function OC(e){return e?.animationName||"none"}function ON(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(r=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}OA.displayName="Presence";var OT=ed,OR="Popover",[OI,OD]=vT(OR,[wB]),OL=wB(),[OV,Oz]=OI(OR),OF=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!1}=e,a=OL(t),l=OE.useRef(null),[u,c]=OE.useState(!1),[h,d]=xs({prop:n,defaultProp:i??!1,onChange:s,caller:OR});return(0,OT.jsx)(w3,{...a,children:(0,OT.jsx)(OV,{scope:t,contentId:yB(),triggerRef:l,open:h,onOpenChange:d,onOpenToggle:OE.useCallback(()=>d(e=>!e),[d]),hasCustomAnchor:u,onCustomAnchorAdd:OE.useCallback(()=>c(!0),[]),onCustomAnchorRemove:OE.useCallback(()=>c(!1),[]),modal:o,children:r})})};OF.displayName=OR;var OB="PopoverAnchor";OE.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=Oz(OB,r),s=OL(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=i;return OE.useEffect(()=>(o(),()=>a()),[o,a]),(0,OT.jsx)(w5,{...s,...n,ref:t})}).displayName=OB;var O$="PopoverTrigger",OU=OE.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=Oz(O$,r),s=OL(r),o=vV(t,i.triggerRef),a=(0,OT.jsx)(v8.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":O2(i.open
18),...n,ref:o,onClick:vk(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?a:(0,OT.jsx)(w5,{asChild:!0,...s,children:a})});OU.displayName=O$;var OW="PopoverPortal",[OH,OK]=OI(OW,{forceMount:void 0}),OY=e=>{let{__scopePopover:t,forceMount:r,children:n,container:i}=e,s=Oz(OW,t);return(0,OT.jsx)(OH,{scope:t,forceMount:r,children:(0,OT.jsx)(OA,{present:r||s.open,children:(0,OT.jsx)(xt,{asChild:!0,container:i,children:n})})})};OY.displayName=OW;var Oq="PopoverContent",OG=OE.forwardRef((e,t)=>{let r=OK(Oq,e.__scopePopover),{forceMount:n=r.forceMount,...i}=e,s=Oz(Oq,e.__scopePopover);return(0,OT.jsx)(OA,{present:n||s.open,children:s.modal?(0,OT.jsx)(OX,{...i,ref:t}):(0,OT.jsx)(OQ,{...i,ref:t})})});OG.displayName=Oq;var OJ=vB("PopoverContent.RemoveScroll"),OX=OE.forwardRef((e,t)=>{let r=Oz(Oq,e.__scopePopover),n=OE.useRef(null),i=vV(t,n),s=OE.useRef(!1);return OE.useEffect(()=>{let e=n.current;if(e)return xS(e)},[]),(0,OT.jsx)(SP,{as:OJ,allowPinchZoom:!0,children:(0,OT.jsx)(OZ,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vk(e.onCloseAutoFocus,e=>{e.preventDefault(),s.current||r.triggerRef.current?.focus()}),onPointerDownOutside:vk(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;s.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:vk(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),OQ=OE.forwardRef((e,t)=>{let r=Oz(Oq,e.__scopePopover),n=OE.useRef(!1),i=OE.useRef(!1);return(0,OT.jsx)(OZ,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let s=t.target;r.triggerRef.current?.contains(s)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),OZ=OE.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...h}=e,d=Oz(Oq,r),f=OL(r);return yg(),(0,OT.jsx)(yM,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s,children:(0,OT.jsx)(yl,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:c,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>d.onOpenChange(!1),children:(0,OT.jsx)(w4,{"data-state":O2(d.open),role:"dialog",id:d.contentId,...f,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),O0="PopoverClose";OE.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=Oz(O0,r);return(0,OT.jsx)(v8.button,{type:"button",...n,ref:t,onClick:vk(e.onClick,()=>i.onOpenChange(!1))})}).displayName=O0;var O1="PopoverArrow";function O2(e){return e?"open":"closed"}OE.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=OL(r);return(0,OT.jsx)(w8,{...i,...n,ref:t})}).displayName=O1;var O3=OY,O5=OG;let O4=OF,O8=OU,O6=ex.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},i)=>(0,OM.jsx)(O3,{children:(0,OM.jsx)(O5,{ref:i,align:t,sideOffset:r,className:(0,OO.cn)("z-50 w-72 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));O6.displayName=O5.displayName;var O7=dq,O9=rJ,Ee=ex,Et=ed,Er="Dialog",[En,Ei]=vT(Er),[Es,Eo]=En(Er),Ea=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!0}=e,a=Ee.useRef(null),l=Ee.useRef(null),[u,c]=xs({prop:n,defaultProp:i??!1,onChange:s,caller:Er});return(0,Et.jsx)(Es,{scope:t,triggerRef:a,contentRef:l,contentId:yB(),titleId:yB(),descriptionId:yB(),open:u,onOpenChange:c,onOpenToggle:Ee.useCallback(()=>c(e=>!e),[c]),modal:o,children:r})};Ea.displayName=Er;var El="DialogTrigger",Eu=Ee.forwardRef((e,t)=>
18{let{__scopeDialog:r,...n}=e,i=Eo(El,r),s=vV(t,i.triggerRef);return(0,Et.jsx)(v8.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":EA(i.open),...n,ref:s,onClick:vk(e.onClick,i.onOpenToggle)})});Eu.displayName=El;var Ec="DialogPortal",[Eh,Ed]=En(Ec,{forceMount:void 0}),Ef=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:i}=e,s=Eo(Ec,t);return(0,Et.jsx)(Eh,{scope:t,forceMount:r,children:Ee.Children.map(n,e=>(0,Et.jsx)(OA,{present:r||s.open,children:(0,Et.jsx)(xt,{asChild:!0,container:i,children:e})}))})};Ef.displayName=Ec;var Ep="DialogOverlay",Em=Ee.forwardRef((e,t)=>{let r=Ed(Ep,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=Eo(Ep,e.__scopeDialog);return s.modal?(0,Et.jsx)(OA,{present:n||s.open,children:(0,Et.jsx)(Ev,{...i,ref:t})}):null});Em.displayName=Ep;var Eg=vB("DialogOverlay.RemoveScroll"),Ev=Ee.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=Eo(Ep,r);return(0,Et.jsx)(SP,{as:Eg,allowPinchZoom:!0,shards:[i.contentRef],children:(0,Et.jsx)(v8.div,{"data-state":EA(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ey="DialogContent",Eb=Ee.forwardRef((e,t)=>{let r=Ed(Ey,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=Eo(Ey,e.__scopeDialog);return(0,Et.jsx)(OA,{present:n||s.open,children:s.modal?(0,Et.jsx)(Ew,{...i,ref:t}):(0,Et.jsx)(Ex,{...i,ref:t})})});Eb.displayName=Ey;var Ew=Ee.forwardRef((e,t)=>{let r=Eo(Ey,e.__scopeDialog),n=Ee.useRef(null),i=vV(t,r.contentRef,n);return Ee.useEffect(()=>{let e=n.current;if(e)return xS(e)},[]),(0,Et.jsx)(ES,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vk(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:vk(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:vk(e.onFocusOutside,e=>e.preventDefault())})}),Ex=Ee.forwardRef((e,t)=>{let r=Eo(Ey,e.__scopeDialog),n=Ee.useRef(!1),i=Ee.useRef(!1);return(0,Et.jsx)(ES,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let s=t.target;r.triggerRef.current?.contains(s)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),ES=Ee.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=e,a=Eo(Ey,r),l=Ee.useRef(null),u=vV(t,l);return yg(),(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsx)(yM,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s,children:(0,Et.jsx)(yl,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":EA(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsx)(ET,{titleId:a.titleId}),(0,Et.jsx)(EI,{contentRef:l,descriptionId:a.descriptionId})]})]})}),E_="DialogTitle",EM=Ee.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=Eo(E_,r);return(0,Et.jsx)(v8.h2,{id:i.titleId,...n,ref:t})});EM.displayName=E_;var EO="DialogDescription",EE=Ee.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=Eo(EO,r);return(0,Et.jsx)(v8.p,{id:i.descriptionId,...n,ref:t})});EE.displayName=EO;var EP="DialogClose",Ek=Ee.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=Eo(EP,r);return(0,Et.jsx)(v8.button,{type:"button",...n,ref:t,onClick:vk(e.onClick,()=>i.onOpenChange(!1))})});function EA(e){return e?"open":"closed"}Ek.displayName=EP;var Ej="DialogTitleWarning",[EC,EN]=vN(Ej,{contentName:Ey,titleName:E_,docsSlug:"dialog"}),ET=({titleId:e})=>{let t=EN(Ej),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
19
20If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
21
22For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Ee.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},ER="DialogDescriptionWarning",EI=({contentRef:e,descriptionId:t})=>{let r=EN(ER),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return Ee.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},ED=Ea,EL=Eu,EV=Ef,Ez=Em,EF=Eb,EB=EM,E$=EE,EU=Ek,EW=ip,EH=ex,EK=ex,EY=!0,Eq=function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];if(EY&&"u">typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(t.replace(/%s/g,()=>n[s++]))}},EG=e.i(117877),EJ=4;function EX(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:EJ,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function EQ(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];
22return e.reduce((e,t,n)=>{var i=r[n-1];return"string"==typeof i?e+i+t:void 0!==i?e+EX(i)+t:e+t},"")}var EZ=e=>0===e?0:e>0?1:-1,E0=e=>"number"==typeof e&&e!=+e,E1=e=>"string"==typeof e&&e.indexOf("%")===e.length-1,E2=e=>("number"==typeof e||e instanceof Number)&&!E0(e),E3=e=>E2(e)||"string"==typeof e,E5=0,E4=e=>{var t=++E5;return"".concat(e||"").concat(t)},E8=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!E2(e)&&"string"!=typeof e)return n;if(E1(e)){if(null==t)return n;var s=e.indexOf("%");r=t*parseFloat(e.slice(0,s))/100}else r=+e;return E0(r)&&(r=n),i&&null!=t&&r>t&&(r=t),r},E6=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(r[String(e[n])])return!0;else r[String(e[n])]=!0;return!1};function E7(e,t,r){return E2(e)&&E2(t)?EX(e+r*(t-e)):t}function E9(e,t,r){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):(0,EG.default)(e,t))===r)}var Pe=e=>null==e,Pt=e=>Pe(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Pr(e){return null!=e}function Pn(){}var Pi=e.i(959445),Ps=EG;function Po(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Pa(e){return function(){return e}}function Pl(e,t){if((i=e.length)>1)for(var r,n,i,s=1,o=e[t[0]],a=o.length;s<i;++s)for(n=o,o=e[t[s]],r=0;r<a;++r)o[r][1]+=o[r][0]=isNaN(n[r][1])?n[r][0]:n[r][1]}function Pu(e){for(var t=e.length,r=Array(t);--t>=0;)r[t]=t;return r}function Pc(e,t){return e[t]}function Ph(e){let t=[];return t.key=e,t}function Pd(){var e=Pa([]),t=Pu,r=Pl,n=Pc;function i(i){var s,o,a=Array.from(e.apply(this,arguments),Ph),l=a.length,u=-1;for(let e of i)for(s=0,++u;s<l;++s)(a[s][u]=[0,+n(e,a[s].key,u,i)]).data=e;for(s=0,o=Po(t(a));s<l;++s)a[o[s]].index=s;return r(a,o),a}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:Pa(Array.from(t)),i):e},i.value=function(e){return arguments.length?(n="function"==typeof e?e:Pa(+e),i):n},i.order=function(e){return arguments.length?(t=null==e?Pu:"function"==typeof e?e:Pa(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(r=null==e?Pl:e,i):r},i}function Pf(e,t){if((r=e.length)>0){for(var r,n=0,i=e[t[0]],s=i.length;n<s;++n){for(var o=0,a=0;o<r;++o)a+=e[o][n][1]||0;i[n][1]+=i[n][0]=-a/2}Pl(e,t)}}function Pp(e,t){if((i=e.length)>0&&(n=(r=e[t[0]]).length)>0){for(var r,n,i,s=0,o=1;o<n;++o){for(var a=0,l=0,u=0;a<i;++a){for(var c=e[t[a]],h=c[o][1]||0,d=(h-(c[o-1][1]||0))/2,f=0;f<a;++f){var p=e[t[f]];
22d+=(p[o][1]||0)-(p[o-1][1]||0)}l+=h,u+=d*h}r[o-1][1]+=r[o-1][0]=s,l&&(s-=u/l)}r[o-1][1]+=r[o-1][0]=s,Pl(e,t)}}function Pm(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Pg(e){return Number.isFinite(e)}function Pv(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}function Py(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Pb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Py(Object(r),!0).forEach(function(t){Pw(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Py(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Pw(e,t,r){return(t=Px(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Px(e){var t=PS(e,"string");return"symbol"==typeof t?t:t+""}function PS(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function P_(e,t,r){return Pe(e)||Pe(t)?r:E3(t)?(0,Ps.default)(e,t,r):"function"==typeof t?t(e):r}Array.prototype.slice;var PM=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:s,verticalAlign:o,layout:a}=t;if(("vertical"===a||"horizontal"===a&&"middle"===o)&&"center"!==s&&E2(e[s]))return Pb(Pb({},e),{},{[s]:e[s]+(n||0)});if(("horizontal"===a||"vertical"===a&&"center"===s)&&"middle"!==o&&E2(e[o]))return Pb(Pb({},e),{},{[o]:e[o]+(i||0)})}return e},PO=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,PE=(e,t,r,n)=>{if(n)return e.map(e=>e.coordinate);var i,s,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===r&&(s=!0),e.coordinate));return i||o.push(t),s||o.push(r),o},PP=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:s,scale:o,realScaleType:a,isCategorical:l,categoricalDomain:u,tickCount:c,ticks:h,niceTicks:d,axisType:f}=e;if(!o)return null;var p="scaleBand"===a&&o.bandwidth?o.bandwidth()/2:2,m=(t||r)&&"category"===i&&o.bandwidth?o.bandwidth()/p:0;return(m="angleAxis"===f&&s&&s.length>=2?2*EZ(s[0]-s[1])*m:m,t&&(h||d))?(h||d||[]).map((e,t)=>{var r=n?n.indexOf(e):e,i=o.map(r);return Pg(i)?{coordinate:i+m,value:e,offset:m,index:t}:null}).filter(Pr):l&&u?u.map((e,t)=>{var r=o.map(e);return Pg(r)?{coordinate:r+m,value:e,index:t,offset:m}:null}).filter(Pr):o.ticks&&!r&&null!=c?o.ticks(c).map((e,t)=>{var r=o.map(e);return Pg(r)?{coordinate:r+m,value:e,index:t,offset:m}:null}).filter(Pr):o.domain().map((e,t)=>{var r=o.map(e);return Pg(r)?{coordinate:r+m,value:n?n[e]:e,index:t,offset:m}:null}).filter(Pr)},Pk=(e,t)=>{if(!t||2!==t.length||!E2(t[0])||!E2(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!E2(e[0])||e[0]<r)&&(i[0]=r),(!E2(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},PA={sign:e=>{var t,r=e.length;if(!(r<=0)){var n=null==(t=e[0])?void 0:t.length;if(null!=n&&!(n<=0))for(var i=0;i<n;++i)for(var s=0,o=0,a=0;a<r;++a){var l=e[a],u=null==l?void 0:l[i];if(null!=u){var c=u[1],h=u[0],d=E0(c)?h:c;d>=0?(u[0]=s,s+=d,u[1]=s):(u[0]=o,o+=d,u[1]=o)}}}},expand:function(e,t){if((n=e.length)>0){for(var r,n,i,s=0,o=e[0].length;s<o;++s){for(i=r=0;r<n;++r)i+=e[r][s][1]||0;if(i)for(r=0;r<n;++r)e[r][s][1]/=i}Pl(e,t)}},none:Pl,silhouette:Pf,wiggle:Pp,positive:e=>{var t,r=e.length;if(!(r<=0)){var n=null==(t=e[0])?void 0:t.length;if(null!=n&&!(n<=0))for(var i=0;i<n;++i)for(var s=0,o=0;o<r;++o){var a=e[o],l=null==a?void 0:a[i];if(null!=l){var u=E0(l[1])?l[0]:l[1];u>=0?(l[0]=s,s+=u,l[1]=s):(l[0]=0,l[1]=0)}}}}},Pj=(e,t,r)=>{var n,i=null!=(n=PA[r])?n:Pl,s=Pd().keys(t).value((e,t)=>Number(P_(e,t,0))).order(Pu).offset(i)(e);return s.forEach((r,n)=>{r.forEach((r,i)=>{var s=P_(e[i],t[n],0);Array.isArray(s)&&2===s.length&&E2(s[0])&&E2(s[1])&&(r[0]=s[0],r[1]=s[1])})}),s};function PC(e){return null==e?void 0:String(e)}function PN(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:s,dataKey:o}=e;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!Pe(i[t.dataKey])){var a=E9(r,"value",i[t.dataKey]);if(a)return a.coordinate+n/2}
22return null!=r&&r[s]?r[s].coordinate+n/2:null}var l=P_(i,Pe(o)?t.dataKey:o),u=t.scale.map(l);return E2(u)?u:null}var PT=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:s,index:o}=e;if("category"===t.type)return r[o]?r[o].coordinate+n:null;var a=P_(s,t.dataKey,t.scale.domain()[o]);if(Pe(a))return null;var l=t.scale.map(a);return E2(l)?l-i/2+n:null},PR=e=>{var{numericAxis:t}=e,r=t.scale.domain();if("number"===t.type){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},PI=e=>{var t=e.flat(2).filter(E2);return[Math.min(...t),Math.max(...t)]},PD=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],PL=(e,t,r)=>{if(null!=e)return PD(Object.keys(e).reduce((n,i)=>{var s=e[i];if(!s)return n;var{stackedData:o}=s,a=o.reduce((e,n)=>{var i=PI(Pm(n,t,r));return Pg(i[0])&&Pg(i[1])?[Math.min(e[0],i[0]),Math.max(e[1],i[1])]:e},[1/0,-1/0]);return[Math.min(a[0],n[0]),Math.max(a[1],n[1])]},[1/0,-1/0]))},PV=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Pz=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,PF=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=(0,Pi.default)(t,e=>e.coordinate),s=1/0,o=1,a=i.length;o<a;o++){var l=i[o],u=i[o-1];s=Math.min(((null==l?void 0:l.coordinate)||0)-((null==u?void 0:u.coordinate)||0),s)}return s===1/0?0:s}return r?void 0:0};function PB(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:s}=e;return Pb(Pb({},t),{},{dataKey:r,payload:n,value:i,name:s})}function P$(e,t){return e?String(e):"string"==typeof t?t:void 0}var PU=(e,t)=>"horizontal"===t?e.chartX:"vertical"===t?e.chartY:void 0,PW=(e,t)=>"centric"===t?e.angle:e.radius,PH={devToolsEnabled:!0,isSsr:!("u">typeof window&&window.document&&window.document.createElement&&window.setTimeout)};function PK(e,t,r){return(t=PY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PY(e){var t=Pq(e,"string");return"symbol"==typeof t?t:t+""}function Pq(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class PG{constructor(e){PK(this,"cache",new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return void 0!==t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;null!=r&&this.cache.delete(r)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}function PJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function PX(e,t,r){return(t=PQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PQ(e){var t=PZ(e,"string");return"symbol"==typeof t?t:t+""}function PZ(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var P0=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?PJ(Object(r),!0).forEach(function(t){PX(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PJ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},{cacheSize:2e3,enableCache:!0}),P1=new PG(P0.cacheSize),P2={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},P3="recharts_measurement_span";function P5(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",s=t.fontStyle||"",o=t.letterSpacing||"",a=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(s,"|").concat(o,"|").concat(a)}var P4=(e,t)=>{try{var r=document.getElementById(P3);r||((r=document.createElement("span")).setAttribute("id",P3),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,P2,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch(e){return{width:0,height:0}}},P8=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||PH.isSsr)return{width:0,height:0};if(!P0.enableCache)return P4(e,t);var r=P5(e,t),n=P1.get(r);if(n)return n;var i=P4(e,t);return P1.set(r,i),i},P6=(e,t)=>{var{x:r,y:n}=e,{x:i,y:s}=t;return{x:Math.min(r,i),y:Math.min(n,s),width:Math.abs(i-r),height:Math.abs(s-n)}},P7=e=>{var{x1:t,y1:r,x2:n,y2:i}=e;return P6({x:t,y:r},{x:n,y:i})};function P9(e){return(e%180+180)%180}var ke=function(e){var{width:t,height:r}=e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=P9(n)*Math.PI/180,s=Math.atan(r/t);return Math.abs(i>s&&i<Math.PI-s?r/Math.sin(i):t/Math.cos(i))};function kt(e,t){if(t<1)return[];if(1===t)return e;for(var r=[],n=0;n<e.length;n+=t){var i=e[n];void 0!==i&&r.push(i)}return r}function kr(e,t,r){return ke({width:e.width+t.width,height:e.height+t.height},r)}function kn(e,t,r){var n="width"===r,{x:i,y:s,width:o,height:a}=e;return 1===t?{start:n?i:s,end:n?i+o:s+a}:{start:n?i+o:s+a,end:n?i:s}}function ki(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var s=r();return e*(t-e*s/2-n)>=0&&e*(t+e*s/2-i)<=0}function ks(e,t){return kt(e,t+1)}function ko(e,t,r,n,i){for(var s,o=(n||[]).slice(),{start:a,end:l}=t,u=0,c=1,h=a,d=function(){var t,s=null==n?void 0:n[u];if(void 0===s)return{v:kt(n,c)};var o=u,d=()=>(void 0===t&&(t=r(s,o)),t),f=s.coordinate,p=0===u||ki(e,f,d,h,l);p||(u=0,h=a,c+=1),p&&(h=f+e*(d()/2+i),u+=c)};c<=o.length;)if(s=d())return s.v;return[]}function ka(e,t,r,n,i){var s=(n||[]).slice().length;if(0===s)return[];for(var{start:o,end:a}=t,l=1;l<=s;l++){for(var u,c=(s-1)%l,h=o,d=!0,f=function(){var t,s=n[p];if(null==s)return 0;var o=p,l=()=>(void 0===t&&(t=r(s,o)),t),u=s.coordinate,f=p===c||ki(e,u,l,h,a);if(!f)return d=!1,1;f&&(h=u+e*(l()/2+i))},p=c;p<s&&(0===(u=f())||1!==u);p+=l);if(d){for(var m=[],g=c;g<s;g+=l){var v=n[g];null!=v&&m.push(v)}return m}}return[]}function kl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ku(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?kl(Object(r),!0).forEach(function(t){kc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kl(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function kc(e,t,r){return(t=kh(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kh(e){var t=kd(e,"string");return"symbol"==typeof t?t:t+""}function kd(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function kf(e,t,r,n,i){for(var s=(n||[]).slice(),o=s.length,{start:a}=t,{end:l}=t,u=function(t){var n,u=s[t];if(null==u)return 1;var c=u,h=()=>(void 0===n&&(n=r(u,t)),n);if(t===o-1){var d=e*(c.coordinate+e*h()/2-l);s[t]=c=ku(ku({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate})}else s[t]=c=ku(ku({},c),{},{tickCoord:c.coordinate});null!=c.tickCoord&&ki(e,c.tickCoord,h,a,l)&&(l=c.tickCoord-e*(h()/2+i),s[t]=ku(ku({},c),{},{isShow:!0}))},c=o-1;c>=0;c--)if(u(c))continue;return s}function kp(e,t,r,n,i,s){var o=(n||[]).slice(),a=o.length,{start:l,end:u}=t;if(s){var c=n[a-1];if(null!=c){var h=r(c,a-1),d=e*(c.coordinate+e*h/2-u);o[a-1]=c=ku(ku({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate}),null!=c.tickCoord&&ki(e,c.tickCoord,()=>h,l,u)&&(u=c.tickCoord-e*(h/2+i),o[a-1]=ku(ku({},c),{},{isShow:!0}))}}for(var f=s?a-1:a,p=function(t){var n,s=o[t];if(null==s)return 1;var a=s,c=()=>(void 0===n&&(n=r(s,t)),n);if(0===t){var h=e*(a.coordinate-e*c()/2-l);o[t]=a=ku(ku({},a),{},{tickCoord:h<0?a.coordinate-h*e:a.coordinate})}else o[t]=a=ku(ku({},a),{},{tickCoord:a.coordinate});null!=a.tickCoord&&ki(e,a.tickCoord,c,l,u)&&(l=a.tickCoord+e*(c()/2+i),o[t]=ku(ku({},a),{},{isShow:!0}))},m=0;m<f;m++)if(p(m))continue;return o}function km(e,t,r){var n,{tick:i,ticks:s,viewBox:o,minTickGap:a,orientation:l,interval:u,tickFormatter:c,unit:h,angle:d}=e;if(!s||!s.length||!i)return[];if(E2(u)||PH.isSsr)return null!=(n=ks(s,E2(u)?u:0))?n:[];var f=[],p="top"===l||"bottom"===l?"width":"height",m=h&&"width"===p?P8(h,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=(e,n)=>{var i="function"==typeof c?c(e.value,n):e.value;return"width"===p?kr(P8(i,{fontSize:t,letterSpacing:r}),m,d):P8(i,{fontSize:t,letterSpacing:r})[p]},v=s[0],y=s[1],b=s.length>=2&&null!=v&&null!=y?EZ(y.coordinate-v.coordinate):1,w=kn(o,b,p);return"equidistantPreserveStart"===u?ko(b,w,g,s,a):"equidistantPreserveEnd"===u?ka(b,w,g,s,a):(f="preserveStart"===u||"preserveStartEnd"===u?kp(b,w,g,s,a,"preserveStartEnd"===u):kf(b,w,g,s,a)).filter(e=>e.isShow)}var kg=ex,kv=EG,ky=e.i(7284),kb=ex,kw=ky,kx=ex,kS=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxCl
22ick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function k_(e){return"string"==typeof e&&kS.includes(e)}var kM=ex,kO=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"]);function kE(e){return"string"==typeof e&&kO.has(e)}function kP(e){return"string"==typeof e&&e.startsWith("data-")}function kk(e){if("object"!=typeof e||null===e)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(kE(r)||kP(r))&&(t[r]=e[r]);return t}function kA(e){return null==e?null:(0,kM.isValidElement)(e)&&"object"==typeof e.props&&null!==e.props?kk(e.props):"object"!=typeof e||Array.isArray(e)?null:kk(e)}function kj(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(kE(r)||kP(r)||k_(r))&&(t[r]=e[r]);return t}function kC(e){return null==e?null:(0,kx.isValidElement)(e)?kj(e.props):"object"!=typeof e||Array.isArray(e)?null:kj(e)}var kN=["children","className"];function kT(){return(kT=Object.assign.bind()).apply(null,arguments)}function kR(e,t){if(null==e)return{};var r,n,i=kI(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function kI(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var kD=kb.forwardRef((e,t)=>
22{var{children:r,className:n}=e,i=kR(e,kN),s=(0,kw.clsx)("recharts-layer",n);return kb.createElement("g",kT({className:s},kj(i),{ref:t}),r)}),kL=ex,kV=ky;function kz(e,t,r){return(t=kF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kF(e){var t=kB(e,"string");return"symbol"==typeof t?t:t+""}function kB(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var k$=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,kU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,kW=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,kH=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,kK={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},kY=["cm","mm","pt","pc","in","Q","px"];function kq(e){return kY.includes(e)}var kG="NaN";function kJ(e,t){return e*kK[t]}class kX{static parse(e){var t,[,r,n]=null!=(t=kH.exec(e))?t:[];return null==r?kX.NaN:new kX(parseFloat(r),null!=n?n:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,E0(e)&&(this.unit=""),""===t||kW.test(t)||(this.num=NaN,this.unit=""),kq(t)&&(this.num=kJ(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new kX(NaN,""):new kX(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new kX(NaN,""):new kX(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new kX(NaN,""):new kX(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new kX(NaN,""):new kX(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return E0(this.num)}}function kQ(e){if(null==e||e.includes(kG))return kG;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,s]=null!=(r=k$.exec(t))?r:[],o=kX.parse(null!=n?n:""),a=kX.parse(null!=s?s:""),l="*"===i?o.multiply(a):o.divide(a);if(l.isNaN())return kG;t=t.replace(k$,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,[,c,h,d]=null!=(u=kU.exec(t))?u:[],f=kX.parse(null!=c?c:""),p=kX.parse(null!=d?d:""),m="+"===h?f.add(p):f.subtract(p);if(m.isNaN())return kG;t=t.replace(kU,m.toString())}return t}A=kX,kz(kX,"NaN",new A(NaN,""));var kZ=/\(([^()]*)\)/;function k0(e){for(var t,r=e;null!=(t=kZ.exec(r));){var[,n]=t;r=r.replace(kZ,kQ(n))}return r}function k1(e){var t=e.replace(/\s+/g,"");return kQ(t=k0(t))}function k2(e){try{return k1(e)}catch(e){return kG}}function k3(e){var t=k2(e.slice(5,-1));return t===kG?"":t}function k5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function k4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k5(Object(r),!0).forEach(function(t){k8(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k5(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function k8(e,t,r){return(t=k6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k6(e){var t=k7(e,"string");return"symbol"==typeof t?t:t+""}function k7(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function k9(e,t){var r=k4({},e),n=t;return Object.keys(t).reduce((e,t)=>(void 0===e[t]&&void 0!==n[t]&&(e[t]=n[t]),e),r)}var Ae=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],At=["dx","dy","angle","className","breakAll"];function Ar(){return(Ar=Object.assign.bind()).apply(null,arguments)}function An(e,t){if(null==e)return{};var r,n,i=Ai(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ai(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var As=/[ \f\n\r\t\v\u2028\u2029]+/,Ao=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];Pe(t)||(i=r?t.toString().split(""):t.toString().split(As));var s=i.map(e=>({word:e,width:P8(e,n).width})),o=r?0:P8(" ",n).width;return{wordsWithComputedWidth:s,spaceWidth:o}}catch(e){return null}};function Aa(e){return"start"===e||"middle"===e||"end"===e||"inherit"===e}var Al=(e,t,r,n)=>e.reduce((e,i)=>{var{word:s,width:o}=i,a=e[e.length-1];if(a&&null!=o&&(null==t||n||a.width+o+r<Number(t)))a.words.push(s),a.width+=o+r;else{var l={words:[s],width:o};e.push(l)}return e},[]),Au=e=>e.reduce((e,t)=>
22e.width>t.width?e:t),Ac="…",Ah=(e,t,r,n,i,s,o,a)=>{var l=Ao({breakAll:r,style:n,children:e.slice(0,t)+Ac});if(!l)return[!1,[]];var u=Al(l.wordsWithComputedWidth,s,o,a);return[u.length>i||Au(u).width>Number(s),u]},Ad=(e,t,r,n,i)=>{var s,{maxLines:o,children:a,style:l,breakAll:u}=e,c=E2(o),h=String(a),d=Al(t,n,r,i);if(!c||i||!(d.length>o||Au(d).width>Number(n)))return d;for(var f=0,p=h.length-1,m=0;f<=p&&m<=h.length-1;){var g=Math.floor((f+p)/2),[v,y]=Ah(h,g-1,u,l,o,n,r,i),[b]=Ah(h,g,u,l,o,n,r,i);if(v||b||(f=g+1),v&&b&&(p=g-1),!v&&b){s=y;break}m++}return s||d},Af=e=>[{words:Pe(e)?[]:e.toString().split(As),width:void 0}],Ap=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:s,maxLines:o}=e;if((t||r)&&!PH.isSsr){var a,l=Ao({breakAll:s,children:n,style:i});if(!l)return Af(n);var{wordsWithComputedWidth:u,spaceWidth:c}=l;return a=u,Ad({breakAll:s,children:n,maxLines:o,style:i},a,c,t,!!r)}return Af(n)},Am="#808080",Ag={angle:0,breakAll:!1,capHeight:"0.71em",fill:Am,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Av=(0,kL.forwardRef)((e,t)=>{var r,n=k9(e,Ag),{x:i,y:s,lineHeight:o,capHeight:a,fill:l,scaleToFit:u,textAnchor:c,verticalAnchor:h}=n,d=An(n,Ae),f=(0,kL.useMemo)(()=>Ap({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:u,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,u,d.style,d.width]),{dx:p,dy:m,angle:g,className:v,breakAll:y}=d,b=An(d,At);if(!E3(i)||!E3(s)||0===f.length)return null;var w=Number(i)+(E2(p)?p:0),x=Number(s)+(E2(m)?m:0);if(!Pg(w)||!Pg(x))return null;switch(h){case"start":r=k3("calc(".concat(a,")"));break;case"middle":r=k3("calc(".concat((f.length-1)/2," * -").concat(o," + (").concat(a," / 2))"));break;default:r=k3("calc(".concat(f.length-1," * -").concat(o,")"))}var S=[],_=f[0];if(u&&null!=_){var M=_.width,{width:O}=d;S.push("scale(".concat(E2(O)&&E2(M)?O/M:1,")"))}return g&&S.push("rotate(".concat(g,", ").concat(w,", ").concat(x,")")),S.length&&(b.transform=S.join(" ")),kL.createElement("text",Ar({},kj(b),{ref:t,x:w,y:x,className:(0,kV.clsx)("recharts-text",v),textAnchor:c,fill:l.includes("url")?Am:l}),f.map((e,t)=>{var n=e.words.join(y?"":" ");return kL.createElement("tspan",{x:w,dy:0===t?r:o,key:"".concat(n,"-").concat(t)},n)}))});Av.displayName="Text";var Ay=ex,Ab=ky;function Aw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ax(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Aw(Object(r),!0).forEach(function(t){AS(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Aw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function AS(e,t,r){return(t=A_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A_(e){var t=AM(e,"string");return"symbol"==typeof t?t:t+""}function AM(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var AO=Math.PI/180,AE=e=>180*e/Math.PI,AP=(e,t,r,n)=>({x:e+Math.cos(-AO*n)*r,y:t+Math.sin(-AO*n)*r}),Ak=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(r.left||0)-(r.right||0)),Math.abs(t-(r.top||0)-(r.bottom||0)))/2},AA=(e,t)=>{var{x:r,y:n}=e,{x:i,y:s}=t;return Math.sqrt((r-i)**2+(n-s)**2)},Aj=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:s}=t,o=AA({x:r,y:n},{x:i,y:s});if(o<=0)return{radius:o,angle:0};var a=Math.acos((r-i)/o);return n>s&&(a=2*Math.PI-a),{radius:o,angle:AE(a),angleInRadian:a}},AC=e=>{var{startAngle:t,endAngle:r}=e,n=Math.min(Math.floor(t/360),Math.floor(r/360));return{startAngle:t-360*n,endAngle:r-360*n}},AN=(e,t)=>{var{startAngle:r,endAngle:n}=t;return e+360*Math.min(Math.floor(r/360),Math.floor(n/360))},AT=(e,t)=>
22{var r,{chartX:n,chartY:i}=e,{radius:s,angle:o}=Aj({x:n,y:i},t),{innerRadius:a,outerRadius:l}=t;if(s<a||s>l||0===s)return null;var{startAngle:u,endAngle:c}=AC(t),h=o;if(u<=c){for(;h>c;)h-=360;for(;h<u;)h+=360;r=h>=u&&h<=c}else{for(;h>u;)h-=360;for(;h<c;)h+=360;r=h>=c&&h<=u}return r?Ax(Ax({},t),{},{radius:s,angle:AN(h,t)}):null},AR=ex,AI=e.i(596482),AD=ex,AL=(0,ex.createContext)(null),AV=e=>e,Az=()=>{var e=(0,AD.useContext)(AL);return e?e.store.dispatch:AV},AF=()=>{},AB=()=>AF,A$=(e,t)=>e===t;function AU(e){var t=(0,AD.useContext)(AL),r=(0,AD.useMemo)(()=>t?t=>{if(null!=t)return e(t)}:AF,[t,e]);return(0,AI.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:AB,t?t.store.getState:AF,t?t.store.getState:AF,r,A$)}e.i(999369);var AW=Symbol.for("immer-nothing"),AH=Symbol.for("immer-draftable"),AK=Symbol.for("immer-state");function AY(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Aq=Object,AG=Aq.getPrototypeOf,AJ="constructor",AX="prototype",AQ="configurable",AZ="enumerable",A0="writable",A1="value",A2=e=>!!e&&!!e[AK];function A3(e){return!!e&&(A8(e)||jn(e)||!!e[AH]||!!e[AJ]?.[AH]||ji(e)||js(e))}var A5=Aq[AX][AJ].toString(),A4=new WeakMap;function A8(e){if(!e||!jo(e))return!1;let t=AG(e);if(null===t||t===Aq[AX])return!0;let r=Aq.hasOwnProperty.call(t,AJ)&&t[AJ];if(r===Object)return!0;if(!ja(r))return!1;let n=A4.get(r);return void 0===n&&(n=Function.toString.call(r),A4.set(r,n)),n===A5}function A6(e,t,r=!0){0===A7(e)?(r?Reflect.ownKeys(e):Aq.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function A7(e){let t=e[AK];return t?t.type_:jn(e)?1:ji(e)?2:3*!!js(e)}var A9=(e,t,r=A7(e))=>2===r?e.has(t):Aq[AX].hasOwnProperty.call(e,t),je=(e,t,r=A7(e))=>2===r?e.get(t):e[t],jt=(e,t,r,n=A7(e))=>{2===n?e.set(t,r):3===n?e.add(r):e[t]=r};function jr(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}var jn=Array.isArray,ji=e=>e instanceof Map,js=e=>e instanceof Set,jo=e=>"object"==typeof e,ja=e=>"function"==typeof e,jl=e=>"boolean"==typeof e;function ju(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var jc=e=>e.copy_||e.base_,jh=e=>e.modified_?e.copy_:e.base_;function jd(e,t){if(ji(e))return new Map(e);if(js(e))return new Set(e);if(jn(e))return Array[AX].slice.call(e);let r=A8(e);if(!0!==t&&("class_only"!==t||r)){let t=AG(e);if(null!==t&&r)return{...e};let n=Aq.create(t);return Aq.assign(n,e)}{let t=Aq.getOwnPropertyDescriptors(e);delete t[AK];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){let i=r[n],s=t[i];!1===s[A0]&&(s[A0]=!0,s[AQ]=!0),(s.get||s.set)&&(t[i]={[AQ]:!0,[A0]:!0,[AZ]:s[AZ],[A1]:e[i]})}return Aq.create(AG(e),t)}}function jf(e,t=!1){return jm(e)||A2(e)||!A3(e)||(A7(e)>1&&Aq.defineProperties(e,{set:jp,add:jp,clear:jp,delete:jp}),Aq.freeze(e),t&&A6(e,(e,t)=>{jf(t,!0)},!1)),e}var jp={[A1]:function(){AY(2)}};function jm(e){return!(null!==e&&jo(e))||Aq.isFrozen(e)}var jg="MapSet",jv="Patches",jy="ArrayMethods",jb={};function jw(e){let t=jb[e];return t||AY(0,e),t}var jx=e=>!!jb[e],jS=()=>j,j_=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:jx(jg)?jw(jg):void 0,arrayMethodsPlugin_:jx(jy)?jw(jy):void 0});function jM(e,t){t&&(e.patchPlugin_=jw(jv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function jO(e){jE(e),e.drafts_.forEach(jk),e.drafts_=null}function jE(e){e===j&&(j=e.parent_)}var jP=e=>j=j_(j,e);function jk(e){let t=e[AK];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function jA(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(void 0!==e&&e!==r){r[AK].modified_&&(jO(t),AY(4)),A3(e)&&(e=jj(t,e));let{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[AK].base_,e,t)}else e=jj(t,r);return jC(t,e,!0),jO(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==AW?e:void 0}function jj(e,t){if(jm(t))return t;let r=t[AK];if(!r)return jz(t,e.handledSet_,e);if(!jT(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:t}=r;if(t)for(;t.length>0;)t.pop()(e);jL(r,e)}return r.copy_}function jC(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&jf(t,r)}function jN(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var jT=(e,t)=>
22e.scope_===t,jR=[];function jI(e,t,r,n){let i=jc(e),s=e.type_;if(void 0!==n&&je(i,n,s)===t)return void jt(i,n,r,s);if(!e.draftLocations_){let t=e.draftLocations_=new Map;A6(i,(e,r)=>{if(A2(r)){let n=t.get(r)||[];n.push(e),t.set(r,n)}})}for(let n of e.draftLocations_.get(t)??jR)jt(i,n,r,s)}function jD(e,t,r){e.callbacks_.push(function(n){let i=t;if(!i||!jT(i,n))return;n.mapSetPlugin_?.fixSetContents(i);let s=jh(i);jI(e,i.draft_??i,s,r),jL(i,n)})}function jL(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:r}=t;if(r){let n=r.getPath(e);n&&r.generatePatches_(e,n,t)}jN(e)}}function jV(e,t,r){let{scope_:n}=e;if(A2(r)){let i=r[AK];jT(i,n)&&i.callbacks_.push(function(){jY(e),jI(e,r,jh(i),t)})}else A3(r)&&e.callbacks_.push(function(){let i=jc(e);3===e.type_?i.has(r)&&jz(r,n.handledSet_,n):je(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&jz(je(e.copy_,t,e.type_),n.handledSet_,n)})}function jz(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||A2(e)||t.has(e)||!A3(e)||jm(e)||(t.add(e),A6(e,(n,i)=>{if(A2(i)){let t=i[AK];jT(t,r)&&(jt(e,n,jh(t),e.type_),jN(t))}else A3(i)&&jz(i,t,r)})),e}function jF(e,t){let r=jn(e),n={type_:+!!r,scope_:t?t.scope_:jS(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,s=jB;r&&(i=[n],s=j$);let{revoke:o,proxy:a}=Proxy.revocable(i,s);return n.draft_=a,n.revoke_=o,[a,n]}var jB={get(e,t){if(t===AK)return e;let r=e.scope_.arrayMethodsPlugin_,n=1===e.type_&&"string"==typeof t;if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let i=jc(e);if(!A9(i,t,e.type_))return jW(e,i,t);let s=i[t];if(e.finalized_||!A3(s)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&ju(t))return s;if(s===jU(e.base_,t)){jY(e);let r=1===e.type_?+t:t,n=jq(e.scope_,s,e,r);return e.copy_[r]=n}return s},has:(e,t)=>t in jc(e),ownKeys:e=>Reflect.ownKeys(jc(e)),set(e,t,r){let n=jH(jc(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=jU(jc(e),t),i=n?.[AK];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(jr(r,n)&&(void 0!==r||A9(e.base_,t,e.type_)))return!0;jY(e),jK(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=r,e.assigned_.set(t,!0),jV(e,t,r),!0)},deleteProperty:(e,t)=>(jY(e),void 0!==jU(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),jK(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=jc(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{[A0]:!0,[AQ]:1!==e.type_||"length"!==t,[AZ]:n[AZ],[A1]:r[t]}:n},defineProperty(){AY(11)},getPrototypeOf:e=>AG(e.base_),setPrototypeOf(){AY(12)}},j$={};for(let e in jB){let t=jB[e];j$[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function jU(e,t){let r=e[AK];return(r?jc(r):e)[t]}function jW(e,t,r){let n=jH(t,r);return n?A1 in n?n[A1]:n.get?.call(e.draft_):void 0}function jH(e,t){if(!(t in e))return;let r=AG(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=AG(r)}}function jK(e){!e.modified_&&(e.modified_=!0,e.parent_&&jK(e.parent_))}function jY(e){e.copy_||(e.assigned_=new Map,e.copy_=jd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function jq(e,t,r,n){let[i,s]=ji(t)?jw(jg).proxyMap_(t,r):js(t)?jw(jg).proxySet_(t,r):jF(t,r);return(r?.scope_??jS()).drafts_.push(i),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&void 0!==n?jD(r,s,n):s.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:t}=e;s.modified_&&t&&t.generatePatches_(s,[],e)}),i}function jG(e){return A2(e)||AY(10,e),jJ(e)}function jJ(e){let t;if(!A3(e)||jm(e))return e;let r=e[AK],n=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,t=jd(e,r.scope_.immer_.useStrictShallowCopy_),n=r.scope_.immer_.shouldUseStrictIteration()}else t=jd(e,!0);return A6(t,(e,r)=>{jt(t,e,jJ(r))},n),r&&(r.finalized_=!1),t}j$.deleteProperty=function(e,t){return j$.set.call(this,e,t,void 0)},j$.set=function(e,t,r){return jB.set.call(this,e[0],t,r,e[0])};var jX=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,r)=>{let n;if(ja(e)&&!ja(t)){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if(ja(t)||AY(6),void 0===r||ja(r)||AY(7),A3(e)){let i=jP(this),s=jq(i,e,void 0),o=!0;try{n=t(s),o=!1}finally{o?jO(i):jE(i)}return jM(i,r),jA(n,i)}if(e&&jo(e))AY(1,e);else{if(void 0===(n=t(e))&&(n=e),n===AW&&(n=void 0),this.autoFreeze_&&jf(n,!0),r){let t=[],i=[];jw(jv).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:i}),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return ja(e)?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},jl(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),jl(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),jl(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){A3(e)||AY(8),A2(e)&&(e=jG(e));let t=jP(this),r=jq(t,e,void 0);return r[AK].isManual_=!0,jE(t),r}finishDraft(e,t){let r=e&&e[AK];r&&r.isManual_||AY(9);let{scope_:n}=r;return jM(n,t),jA(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];
22if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=jw(jv).applyPatches_;return A2(e)?n(e,t):this.produce(e,e=>n(e,t))}}().produce;function jQ(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}function jZ(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}function j0(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${r}]`)}}var j1=e=>Array.isArray(e)?e:[e];function j2(e){let t=Array.isArray(e[0])?e[0]:e;return j0(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function j3(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var j5=0,j4=null,j8=class{revision=j5;_value;_lastValue;_isEqual=j6;constructor(e,t=j6){this._value=this._lastValue=e,this._isEqual=t}get value(){return j4?.add(this),this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++j5)}};function j6(e,t){return e===t}function j7(e){return e instanceof j8||console.warn("Not a valid cell! ",e),e.value}function j9(e,t=j6){return new j8(e,t)}var Ce=(e,t)=>!1;function Ct(){return j9(null,Ce)}var Cr=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=Ct()),j7(t)};Symbol();var Cn=0,Ci=Object.getPrototypeOf({}),Cs=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,Co);tag=Ct();tags={};children={};collectionTag=null;id=Cn++},Co={get:(e,t)=>(function(){let{value:r}=e,n=Reflect.get(r,t);if("symbol"==typeof t||t in Ci)return n;if("object"==typeof n&&null!==n){let r=e.children[t];return void 0===r&&(r=e.children[t]=Cu(n)),r.tag&&j7(r.tag),r.proxy}{let r=e.tags[t];return void 0===r&&((r=e.tags[t]=Ct()).value=n),j7(r),n}})(),ownKeys:e=>(Cr(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},Ca=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],Cl);tag=Ct();tags={};children={};collectionTag=null;id=Cn++},Cl={get:([e],t)=>("length"===t&&Cr(e),Co.get(e,t)),ownKeys:([e])=>Co.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>Co.getOwnPropertyDescriptor(e,t),has:([e],t)=>Co.has(e,t)};function Cu(e){return Array.isArray(e)?new Ca(e):new Cs(e)}var Cc=class{constructor(e){this.value=e}deref(){return this.value}},Ch="u">typeof WeakRef?WeakRef:Cc,Cd=0,Cf=1;function Cp(){return{s:Cd,v:void 0,o:null,p:null}}function Cm(e,t={}){let r,n=Cp(),{resultEqualityCheck:i}=t,s=0;function o(){let t,o=n,{length:a}=arguments;for(let e=0,t=a;e<t;e++){let t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=o.o;null===e&&(o.o=e=new WeakMap);let r=e.get(t);void 0===r?(o=Cp(),e.set(t,o)):o=r}else{let e=o.p;null===e&&(o.p=e=new Map);let r=e.get(t);void 0===r?(o=Cp(),e.set(t,o)):o=r}}let l=o;if(o.s===Cf)t=o.v;else if(t=e.apply(null,arguments),s++,i){let e=r?.deref?.()??r;null!=e&&i(e,t)&&(t=e,0!==s&&s--),r="object"==typeof t&&null!==t||"function"==typeof t?new Ch(t):t}return l.s=Cf,l.v=t,t}return o.clearCache=()=>{n=Cp(),o.resetResultsCount()},o.resultsCount=()=>s,o.resetResultsCount=()=>{s=0},o}var Cg=function e(t,...r){let n="function"==typeof t?{memoize:t,memoizeOptions:r}:t,i=(...e)=>{let t,r=0,i=0,s={},o=e.pop();"object"==typeof o&&(s=o,o=e.pop()),jQ(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:a,memoizeOptions:l=[],argsMemoize:u=Cm,argsMemoizeOptions:c=[],devModeChecks:h={}}={...n,...s},d=j1(l),f=j1(c),p=j2(e),m=a(function(){return r++,o.apply(null,arguments)},...d);return Object.assign(u(function(){i++;let e=j3(p,arguments);return t=m.apply(null,e)},...f),{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:a,argsMemoize:u})};return Object.assign(i,{withTypes:()=>i}),i}(Cm),Cv=Object.assign((e,t=Cg)=>{jZ(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e);return t(r.map(t=>e[t]),(...e)=>
22e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>Cv});function Cy(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Cb="function"==typeof Symbol&&Symbol.observable||"@@observable",Cw=()=>Math.random().toString(36).substring(7).split("").join("."),Cx={INIT:`@@redux/INIT${Cw()}`,REPLACE:`@@redux/REPLACE${Cw()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Cw()}`};function CS(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function C_(e,t,r){if("function"!=typeof e)throw Error(Cy(2));if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error(Cy(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw Error(Cy(1));return r(C_)(e,t)}let n=e,i=t,s=new Map,o=s,a=0,l=!1;
22function u(){o===s&&(o=new Map,s.forEach((e,t)=>{o.set(t,e)}))}function c(){if(l)throw Error(Cy(3));return i}function h(e){if("function"!=typeof e)throw Error(Cy(4));if(l)throw Error(Cy(5));let t=!0;u();let r=a++;return o.set(r,e),function(){if(t){if(l)throw Error(Cy(6));t=!1,u(),o.delete(r),s=null}}}function d(e){if(!CS(e))throw Error(Cy(7));if(void 0===e.type)throw Error(Cy(8));if("string"!=typeof e.type)throw Error(Cy(17));if(l)throw Error(Cy(9));try{l=!0,i=n(i,e)}finally{l=!1}return(s=o).forEach(e=>{e()}),e}function f(e){if("function"!=typeof e)throw Error(Cy(10));n=e,d({type:Cx.REPLACE})}function p(){let e=h;return{subscribe(t){if("object"!=typeof t||null===t)throw Error(Cy(11));function r(){let e=t;e.next&&e.next(c())}return r(),{unsubscribe:e(r)}},[Cb](){return this}}}return d({type:Cx.INIT}),{dispatch:d,subscribe:h,getState:c,replaceReducer:f,[Cb]:p}}function CM(e){Object.keys(e).forEach(t=>{let r=e[t];if(void 0===r(void 0,{type:Cx.INIT}))throw Error(Cy(12));if(void 0===r(void 0,{type:Cx.PROBE_UNKNOWN_ACTION()}))throw Error(Cy(13))})}function CO(e){let t,r=Object.keys(e),n={};for(let t=0;t<r.length;t++){let i=r[t];"function"==typeof e[i]&&(n[i]=e[i])}let i=Object.keys(n);try{CM(n)}catch(e){t=e}return function(e={},r){if(t)throw t;let s=!1,o={};for(let t=0;t<i.length;t++){let a=i[t],l=n[a],u=e[a],c=l(u,r);if(void 0===c)throw r&&r.type,Error(Cy(14));o[a]=c,s=s||c!==u}return(s=s||i.length!==Object.keys(e).length)?o:e}}function CE(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}function CP(...e){return t=>(r,n)=>{let i=t(r,n),s=()=>{throw Error(Cy(15))},o={getState:i.getState,dispatch:(e,...t)=>s(e,...t)};return s=CE(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:s}}}function Ck(e){return CS(e)&&"type"in e&&"string"==typeof e.type}function CA(e){return({dispatch:t,getState:r})=>n=>i=>"function"==typeof i?i(t,r,e):n(i)}var Cj=CA(),CC=CA,CN="u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!=arguments.length)return"object"==typeof arguments[0]?CE:CE.apply(null,arguments)};"u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function CT(e,t){function r(...n){if(t){let r=t(...n);if(!r)throw Error(NC(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>Ck(t)&&t.type===e,r}var CR=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function CI(e){return A3(e)?jX(e,()=>{}):e}function CD(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function CL(e){return"boolean"==typeof e}var CV=()=>function(e){let{thunk:t=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:i=!0}=e??{},s=new CR;return t&&(CL(t)?s.push(Cj):s.push(CC(t.extraArgument))),s},Cz="RTK_autoBatch",CF=()=>e=>({payload:e,meta:{[Cz]:!0}}),CB=e=>t=>{setTimeout(t,e)},C$=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,s=!1,o=!1,a=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"u">typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:CB(10):"callback"===e.type?e.queueNotification:CB(e.timeout),u=()=>{o=!1,s&&(s=!1,a.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){let t=()=>i&&e(),r=n.subscribe(t);return a.add(e),()=>{r(),a.delete(e)}},dispatch(e){try{return(s=!(i=!e?.meta?.[Cz]))&&!o&&(o=!0,l(u)),n.dispatch(e)}finally{i=!0}}})},CU=e=>function(t){let{autoBatch:r=!0}=t??{},n=new CR(e);return r&&n.push(C$("object"==typeof r?r:void 0)),n};function CW(e){let t,r,n=CV(),{reducer:i,middleware:s,devTools:o=!0,duplicateMiddlewareCheck:a=!0,preloadedState:l,enhancers:u}=e||{};if("function"==typeof i)t=i;else if(CS(i))t=CO(i);else throw Error(NC(1));r="function"==typeof s?s(n):n();let c=CE;o&&(c=CN({trace:!1,..."object"==typeof o&&o}));let h=CU(CP(...r));return C_(t,l,c(..."function"==typeof u?u(h):h()))}function CH(e){let t,r={},n=[],i={addCase(e,t){let n="string"==typeof e?e:e.type;if(!n)throw Error(NC(28));if(n in r)throw Error(NC(29));return r[n]=t,i},addAsyncThunk:(e,t)=>(t.pending&&(r[e.pending.type]=t.pending),t.rejected&&(r[e.rejected.type]=t.rejected),t.fulfilled&&(r[e.fulfilled.type]=t.fulfilled),t.settled&&n.push({matcher:e.settled,reducer:t.settled}),i),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(t=e,i)};return e(i),[r,n,t]}function CK(e){return"function"==typeof e}function CY(e,t){let r,[n,i,s]=CH(t);if(CK(e))r=()=>CI(e());else{let t=CI(e);r=()=>t}function o(e=r(),t){let a=[n[t.type],...i.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===a.filter(e=>!!e).length&&(a=[s]),a.reduce((e,r)=>{if(r)if(A2(e)){let n=r(e,t);return void 0===n?e:n}else{if(A3(e))return jX(e,e=>r(e,t));let n=r(e,t);if(void 0===n){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return e},e)}return o.getInitialState=r,o}var Cq="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",CG=(e=21)=>{let t="",r=e;for(;r--;)t+=Cq[64*Math.random()|0];return t},CJ=Symbol.for("rtk-slice-createasyncthunk"),CX=((f=CX||{}).reducer="reducer",f.reducerWithPrepare="reducerWithPrepare",f.asyncThunk="asyncThunk",f);function CQ(e,t){return`${e}/${t}`}function CZ(e,t,r,n){function i(s,...o){let a=t(s);return void 0===a&&n&&(a=r()),e(a,...o)}return i.unwrapped=e,i}var C0=function({creators:e}={}){let t=e?.asyncThunk?.[CJ];return function(e){let r,{name:n,reducerPath:i=n}=e;if(!n)throw Error(NC(11));let s=("function"==typeof e.reducers?e.reducers(C1()):e.reducers)||{},o=Object.keys(s),a={},l={},u={},c=[],h={addCase(e,t){let r="string"==typeof e?e:e.type;if(!r)throw Error(NC(12));if(r in l)throw Error(NC(13));return l[r]=t,h},addMatcher:(e,t)=>(c.push({matcher:e,reducer:t}),h),exposeAction:(e,t)=>(u[e]=t,h),exposeCaseReducer:(e,t)=>(a[e]=t,h)};function d(){let[t={},r=[],n]="function"==typeof e.extraReducers?CH(e.extraReducers):[e.extraReducers],i={...t,...l};return CY(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of c)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}
22o.forEach(r=>{let i=s[r],o={reducerName:r,type:CQ(n,r),createNotation:"function"==typeof e.reducers};C3(i)?C4(o,i,h,t):C2(o,i,h)});let f=e=>e,p=new Map,m=new WeakMap;function g(e,t){return r||(r=d()),r(e,t)}function v(){return r||(r=d()),r.getInitialState()}function y(t,r=!1){function n(e){let i=e[t];return void 0===i&&r&&(i=CD(m,n,v)),i}function i(t=f){let n=CD(p,r,()=>new WeakMap);return CD(n,t,()=>{let n={};for(let[i,s]of Object.entries(e.selectors??{}))n[i]=CZ(s,t,()=>CD(m,t,v),r);return n})}return{reducerPath:t,getSelectors:i,get selectors(){return i(n)},selectSlice:n}}let b={name:n,reducer:g,actions:u,caseReducers:a,getInitialState:v,...y(i),injectInto(e,{reducerPath:t,...r}={}){let n=t??i;return e.inject({reducerPath:n,reducer:g},r),{...b,...y(n,!0)}}};return b}}();function C1(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}function C2({type:e,reducerName:t,createNotation:r},n,i){let s,o;if("reducer"in n){if(r&&!C5(n))throw Error(NC(17));s=n.reducer,o=n.prepare}else s=n;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?CT(e,o):CT(e))}function C3(e){return"asyncThunk"===e._reducerDefinitionType}function C5(e){return"reducerWithPrepare"===e._reducerDefinitionType}function C4({type:e,reducerName:t},r,n,i){if(!i)throw Error(NC(18));let{payloadCreator:s,fulfilled:o,pending:a,rejected:l,settled:u,options:c}=r,h=i(e,s,c);n.exposeAction(t,h),o&&n.addCase(h.fulfilled,o),a&&n.addCase(h.pending,a),l&&n.addCase(h.rejected,l),u&&n.addMatcher(h.settled,u),n.exposeCaseReducer(t,{fulfilled:o||C8,pending:a||C8,rejected:l||C8,settled:u||C8})}function C8(){}var C6="task",C7="listener",C9="completed",Ne="cancelled",Nt=`task-${Ne}`,Nr=`task-${C9}`,Nn=`${C7}-${Ne}`,Ni=`${C7}-${C9}`,Ns=class{constructor(e){this.code=e,this.message=`${C6} ${Ne} (reason: ${e})`}name="TaskAbortError";message},No=(e,t)=>{if("function"!=typeof e)throw TypeError(NC(32))},Na=()=>{},Nl=(e,t=Na)=>(e.catch(t),e),Nu=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Nc=e=>{if(e.aborted)throw new Ns(e.reason)};function Nh(e,t){let r=Na;return new Promise((n,i)=>{let s=()=>i(new Ns(e.reason));e.aborted?s():(r=Nu(e,s),t.finally(()=>r()).then(n,i))}).finally(()=>{r=Na})}var Nd=async(e,t)=>{try{await Promise.resolve();let t=await e();return{status:"ok",value:t}}catch(e){return{status:e instanceof Ns?"cancelled":"rejected",error:e}}finally{t?.()}},Nf=e=>t=>Nl(Nh(e,t).then(t=>(Nc(e),t))),Np=e=>{let t=Nf(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:Nm}=Object,Ng={},Nv="listenerMiddleware",Ny=(e,t)=>{let r=t=>Nu(e,()=>t.abort(e.reason));return(n,i)=>{No(n,"taskExecutor");let s=new AbortController;r(s);let o=Nd(async()=>{Nc(e),Nc(s.signal);let t=await n({pause:Nf(s.signal),delay:Np(s.signal),signal:s.signal});return Nc(s.signal),t},()=>s.abort(Nr));return i?.autoJoin&&t.push(o.catch(Na)),{result:Nf(e)(o),cancel(){s.abort(Nt)}}}},Nb=(e,t)=>{let r=async(r,n)=>{Nc(t);let i=()=>{},s=[new Promise((t,n)=>{let s=e({predicate:r,effect:(e,r)=>{r.unsubscribe(),t([e,r.getState(),r.getOriginalState()])}});i=()=>{s(),n()}})];null!=n&&s.push(new Promise(e=>setTimeout(e,n,null)));try{let e=await Nh(t,Promise.race(s));return Nc(t),e}finally{i()}};return(e,t)=>Nl(r(e,t))},Nw=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:s}=e;if(t)i=CT(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(i);else throw Error(NC(21));return No(s,"options.listener"),{predicate:i,type:t,effect:s}},Nx=Nm(e=>{let{type:t,predicate:r,effect:n}=Nw(e);
22return{id:CG(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw Error(NC(22))}}},{withTypes:()=>Nx}),NS=(e,t)=>{let{type:r,effect:n,predicate:i}=Nw(t);return Array.from(e.values()).find(e=>("string"==typeof r?e.type===r:e.predicate===i)&&e.effect===n)},N_=e=>{e.pending.forEach(e=>{e.abort(Nn)})},NM=(e,t)=>()=>{for(let e of t.keys())N_(e);e.clear()},NO=(e,t,r)=>{try{e(t,r)}catch(e){setTimeout(()=>{throw e},0)}},NE=Nm(CT(`${Nv}/add`),{withTypes:()=>NE}),NP=CT(`${Nv}/removeAll`),Nk=Nm(CT(`${Nv}/remove`),{withTypes:()=>Nk}),NA=(...e)=>{console.error(`${Nv}/error`,...e)},Nj=(e={})=>{let t=new Map,r=new Map,n=e=>{let t=r.get(e)??0;r.set(e,t+1)},i=e=>{let t=r.get(e)??1;1===t?r.delete(e):r.set(e,t-1)},{extra:s,onError:o=NA}=e;No(o,"onError");let a=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&N_(e)}),l=e=>a(NS(t,e)??Nx(e));Nm(l,{withTypes:()=>l});let u=e=>{let r=NS(t,e);return r&&(r.unsubscribe(),e.cancelActive&&N_(r)),!!r};Nm(u,{withTypes:()=>u});let c=async(e,r,a,u)=>{let c=new AbortController,h=Nb(l,c.signal),d=[];try{e.pending.add(c),n(e),await Promise.resolve(e.effect(r,Nm({},a,{getOriginalState:u,condition:(e,t)=>h(e,t).then(Boolean),take:h,delay:Np(c.signal),pause:Nf(c.signal),extra:s,signal:c.signal,fork:Ny(c.signal,d),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,r)=>{e!==c&&(e.abort(Nn),r.delete(e))})},cancel:()=>{c.abort(Nn),e.pending.delete(c)},throwIfCancelled:()=>{Nc(c.signal)}})))}catch(e){e instanceof Ns||NO(o,e,{raisedBy:"effect"})}finally{await Promise.all(d),c.abort(Ni),i(e),e.pending.delete(c)}},h=NM(t,r);return{middleware:e=>r=>n=>{let i;if(!Ck(n))return r(n);if(NE.match(n))return l(n.payload);if(NP.match(n))return void h();if(Nk.match(n))return u(n.payload);let s=e.getState(),a=()=>{if(s===Ng)throw Error(NC(23));return s};try{if(i=r(n),t.size>0){let r=e.getState();for(let i of Array.from(t.values())){let t=!1;try{t=i.predicate(n,r,s)}catch(e){t=!1,NO(o,e,{raisedBy:"predicate"})}t&&c(i,n,e,a)}}}finally{s=Ng}return i},startListening:l,stopListening:u,clearListeners:h}};function NC(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original");var NN=C0({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,s;e.margin.top=null!=(r=t.payload.top)?r:0,e.margin.right=null!=(n=t.payload.right)?n:0,e.margin.bottom=null!=(i=t.payload.bottom)?i:0,e.margin.left=null!=(s=t.payload.left)?s:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:NT,setLayout:NR,setChartSize:NI,setScale:ND}=NN.actions,NL=NN.reducer,NV=Pi,Nz=e=>e.legend.settings,NF=e=>e.legend.size;Cg([e=>e.legend.payload,Nz],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?(0,NV.default)(n,r):n});var NB=e=>e.layout.width,N$=e=>e.layout.height,NU=e=>e.layout.scale,NW=e=>e.layout.margin,NH=Cg(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),NK=Cg(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),NY="data-recharts-item-index",Nq="data-recharts-item-id",NG=60;function NJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function NX(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?NJ(Object(r),!0).forEach(function(t){NQ(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NJ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function NQ(e,t,r){return(t=NZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NZ(e){var t=N0(e,"string");return"symbol"==typeof t?t:t+""}function N0(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}
22var N1=Cg([NB,N$,NW,e=>e.brush.height,function(e){return NK(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:NG),0)},function(e){return NK(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:NG),0)},function(e){return NH(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return NH(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},Nz,NF],(e,t,r,n,i,s,o,a,l,u)=>{var c={left:(r.left||0)+i,right:(r.right||0)+s},h=NX(NX({},{top:(r.top||0)+o,bottom:(r.bottom||0)+a}),c),d=h.bottom;h.bottom+=n;var f=e-(h=PM(h,l,u)).left-h.right,p=t-h.top-h.bottom;return NX(NX({brushBottom:d},h),{},{width:Math.max(f,0),height:Math.max(p,0)})}),N2=Cg(N1,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),N3=Cg(NB,N$,(e,t)=>({x:0,y:0,width:e,height:t})),N5=ex,N4=(0,N5.createContext)(null),N8=()=>null!=(0,N5.useContext)(N4),N6=e=>e.brush,N7=Cg([N6,N1,NW],(e,t,r)=>({height:e.height,x:E2(e.x)?e.x:t.left,y:E2(e.y)?e.y:t.top+t.height+t.brushBottom-((null==r?void 0:r.bottom)||0),width:E2(e.width)?e.width:t.width})),N9=ky,Te=ex,Tt=e.i(358369),Tr="100%",Tn="100%",Ti=0,Ts=0,To={width:-1,height:-1},Ta=(e,t,r)=>{var{width:n=Tr,height:i=Tn,aspect:s,maxHeight:o}=r,a=E1(n)?e:Number(n),l=E1(i)?t:Number(i);return s&&s>0&&(a?l=a/s:l&&(a=l*s),o&&null!=l&&l>o&&(l=o)),{calculatedWidth:a,calculatedHeight:l}},Tl={width:0,height:0,overflow:"visible"},Tu={width:0,overflowX:"visible"},Tc={height:0,overflowY:"visible"},Th={},Td=e=>{var{width:t,height:r}=e,n=E1(t),i=E1(r);return n&&i?Tl:n?Tu:i?Tc:Th};function Tf(e){var{width:t,height:r,aspect:n}=e,i=t,s=r;return void 0===i&&void 0===s?(i=Tr,s=Tn):void 0===i?i=n&&n>0?void 0:Tr:void 0===s&&(s=n&&n>0?void 0:Tn),{width:i,height:s}}function Tp(){return(Tp=Object.assign.bind()).apply(null,arguments)}function Tm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Tg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tm(Object(r),!0).forEach(function(t){Tv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tm(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Tv(e,t,r){return(t=Ty(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ty(e){var t=Tb(e,"string");return"symbol"==typeof t?t:t+""}function Tb(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Tw=(0,Te.createContext)(To);function Tx(e){return Pv(e.width)&&Pv(e.height)}function TS(e){var{children:t,width:r,height:n}=e,i=(0,Te.useMemo)(()=>({width:r,height:n}),[r,n]);return Tx(i)?Te.createElement(Tw.Provider,{value:i},t):null}var T_=()=>(0,Te.useContext)(Tw),TM=(0,Te.forwardRef)((e,t)=>{var{aspect:r,initialDimension:n=To,width:i,height:s,minWidth:o=Ts,minHeight:a,maxHeight:l,children:u,debounce:c=Ti,id:h,className:d,onResize:f,style:p={}}=e,m=(0,Te.useRef)(null),g=(0,Te.useRef)();g.current=f,(0,Te.useImperativeHandle)(t,()=>m.current);var[v,y]=(0,Te.useState)({containerWidth:n.width,containerHeight:n.height}),b=(0,Te.useCallback)((e,t)=>{y(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]);(0,Te.useEffect)(()=>{if(null==m.current||"u"<typeof ResizeObserver)return Pn;var e=e=>{var t,r=e[0];if(null!=r){var{width:n,height:i}=r.contentRect;b(n,i),null==(t=g.current)||t.call(g,n,i)}};c>0&&(e=(0,Tt.default)(e,c,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:r,height:n}=m.current.getBoundingClientRect();return b(r,n),t.observe(m.current),()=>{t.disconnect()}},[b,c]);var{containerWidth:w,containerHeight:x}=v;Eq(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:S,calculatedHeight:_}=Ta(w,x,{width:i,height:s,aspect:r,maxHeight:l});return Eq(null!=S&&S>0||null!=_&&_>0,"The width(%s) and height(%s) of chart should be greater than 0,\n       please check the style of container, or the props width(%s) and height(%s),\n       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n       height and width.",S,_,i,s,o,a,r),Te.createElement("div",{id:h?"".concat(h):void 0,className:(0,N9.clsx)("recharts-responsive-container",d),style:Tg(Tg({},p),{},{width:i,height:s,minWidth:o,minHeight:a,maxHeight:l}),ref:m},Te.createElement("div",{style:Td({width:i,height:s})},Te.createElement(TS,{width:S,height:_},u)))}),TO=(0,Te.forwardRef)((e,t)=>{var r=T_();if(Pv(r.width)&&Pv(r.height))return e.children;var{width:n,height:i}=Tf({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:s,calculatedHeight:o}=Ta(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return E2(s)&&E2(o)?Te.createElement(TS,{width:s,height:o},e.children):Te.createElement(TM,Tp({},e,{width:n,height:i,ref:t}))});function TE(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var TP=()=>{var e,t=N8(),r=AU(N2),n=AU(N7),i=null==(e=AU(N6))?void 0:e.padding;return t&&n&&i?{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}:r}
22,Tk={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},TA=()=>{var e;return null!=(e=AU(N1))?e:Tk},Tj=()=>AU(NB),TC=()=>AU(N$),TN=e=>e.layout.layoutType,TT=()=>AU(TN),TR=()=>{var e=TT();if("horizontal"===e||"vertical"===e)return e},TI=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},TD=()=>void 0!==TT(),TL=e=>{var t=Az(),r=N8(),{width:n,height:i}=e,s=T_(),o=n,a=i;return s&&(o=s.width>0?s.width:n,a=s.height>0?s.height:i),(0,AR.useEffect)(()=>{!r&&Pv(o)&&Pv(a)&&t(NI({width:o,height:a}))},[t,r,o,a]),null},TV={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Tz={allowDecimals:!1,allowDuplicatedCategory:!0,allowDataOverflow:!1,angle:0,angleAxisId:0,axisLine:!0,axisLineType:"polygon",cx:0,cy:0,hide:!1,includeHidden:!1,label:!1,orientation:"outer",reversed:!1,scale:"auto",tick:!0,tickLine:!0,tickSize:8,type:"auto",zIndex:TV.axis},TF={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,label:!1,orientation:"right",radiusAxisId:0,reversed:!1,scale:"auto",stroke:"#ccc",tick:!0,tickCount:5,tickLine:!0,type:"auto",zIndex:TV.axis},TB=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t};function T$(e,t,r){return"auto"!==r?r:null!=e?PO(e,t)?"category":"number":void 0}function TU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function TW(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?TU(Object(r),!0).forEach(function(t){TH(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TU(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function TH(e,t,r){return(t=TK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TK(e){var t=TY(e,"string");return"symbol"==typeof t?t:t+""}function TY(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Tq={allowDataOverflow:Tz.allowDataOverflow,allowDecimals:Tz.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Tz.angleAxisId,includeHidden:!1,name:void 0,reversed:Tz.reversed,scale:Tz.scale,tick:Tz.tick,tickCount:void 0,ticks:void 0,type:Tz.type,unit:void 0},TG={allowDataOverflow:TF.allowDataOverflow,allowDecimals:TF.allowDecimals,allowDuplicatedCategory:TF.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:TF.radiusAxisId,includeHidden:TF.includeHidden,name:void 0,reversed:TF.reversed,scale:TF.scale,tick:TF.tick,tickCount:TF.tickCount,ticks:void 0,type:TF.type,unit:void 0},TJ=Cg([(e,t)=>{if(null!=t)return e.polarAxis.angleAxis[t]},TI],(e,t)=>{if(null!=e)return e;var r,n=null!=(r=T$(t,"angleAxis",Tq.type))?r:"category";return TW(TW({},Tq),{},{type:n})}),TX=Cg([(e,t)=>e.polarAxis.radiusAxis[t],TI],(e,t)=>{if(null!=e)return e;var r,n=null!=(r=T$(t,"radiusAxis",TG.type))?r:"category";return TW(TW({},TG),{},{type:n})}),TQ=e=>e.polarOptions,TZ=Cg([NB,N$,N1],Ak),T0=Cg([TQ,TZ],(e,t)=>{if(null!=e)return E8(e.innerRadius,t,0)}),T1=Cg([TQ,TZ],(e,t)=>{if(null!=e)return E8(e.outerRadius,t,.8*t)}),T2=Cg([TQ],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]});Cg([TJ,T2],TB);var T3=Cg([TZ,T0,T1],(e,t,r)=>{if(null!=e&&null!=t&&null!=r)return[t,r]});Cg([TX,T3],TB);var T5=Cg([TN,TQ,T0,T1,NB,N$],(e,t,r,n,i,s)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=r&&null!=n){var{cx:o,cy:a,startAngle:l,endAngle:u}=t;return{cx:E8(o,i,i/2),cy:E8(a,s,s/2),innerRadius:r,outerRadius:n,startAngle:l,endAngle:u,clockWise:!1}}}),T4=ex,T8=vE;function T6(e,t){return!!(Array.isArray(e)&&Array.isArray(t))&&0===e.length&&0===t.length||e===t}function T7(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var T9=Cg(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(null!=t){var n=e[t];if(null!=n)return r?n.panoramaElement:n.element}}),Re=Cg(e=>e.zIndex.zIndexMap,e=>Array.from(new Set(Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(TV)))).sort((e,t)=>
22e-t),{memoizeOptions:{resultEqualityCheck:T7}}),Rt=Symbol.for("immer-nothing"),Rr=Symbol.for("immer-draftable"),Rn=Symbol.for("immer-state");function Ri(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Rs=Object.getPrototypeOf;function Ro(e){return!!e&&!!e[Rn]}function Ra(e){return!!e&&(Rc(e)||Array.isArray(e)||!!e[Rr]||!!e.constructor?.[Rr]||Rg(e)||Rv(e))}var Rl=Object.prototype.constructor.toString(),Ru=new WeakMap;function Rc(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if("function"!=typeof r)return!1;let n=Ru.get(r);return void 0===n&&(n=Function.toString.call(r),Ru.set(r,n)),n===Rl}function Rh(e,t,r=!0){0===Rd(e)?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Rd(e){let t=e[Rn];return t?t.type_:Array.isArray(e)?1:Rg(e)?2:3*!!Rv(e)}function Rf(e,t){return 2===Rd(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Rp(e,t,r){let n=Rd(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function Rm(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Rg(e){return e instanceof Map}function Rv(e){return e instanceof Set}function Ry(e){return e.copy_||e.base_}function Rb(e,t){if(Rg(e))return new Map(e);if(Rv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Rc(e);if(!0!==t&&("class_only"!==t||r)){let t=Rs(e);return null!==t&&r?{...e}:Object.assign(Object.create(t),e)}{let t=Object.getOwnPropertyDescriptors(e);delete t[Rn];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){let i=r[n],s=t[i];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Rs(e),t)}}function Rw(e,t=!1){return RS(e)||Ro(e)||!Ra(e)||(Rd(e)>1&&Object.defineProperties(e,{set:Rx,add:Rx,clear:Rx,delete:Rx}),Object.freeze(e),t&&Object.values(e).forEach(e=>Rw(e,!0))),e}var Rx={value:function(){Ri(2)}};function RS(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var R_={};function RM(e){let t=R_[e];return t||Ri(0,e),t}function RO(){return C}function RE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function RP(e,t){t&&(RM("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Rk(e){RA(e),e.drafts_.forEach(RC),e.drafts_=null}function RA(e){e===C&&(C=e.parent_)}function Rj(e){return C=RE(C,e)}function RC(e){let t=e[Rn];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function RN(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return void 0!==e&&e!==r?(r[Rn].modified_&&(Rk(t),Ri(4)),Ra(e)&&(e=RT(t,e),t.parent_||RI(t,e)),t.patches_&&RM("Patches").generateReplacementPatches_(r[Rn].base_,e,t.patches_,t.inversePatches_)):e=RT(t,r,[]),Rk(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Rt?e:void 0}function RT(e,t,r){if(RS(t))return t;let n=e.immer_.shouldUseStrictIteration(),i=t[Rn];if(!i)return Rh(t,(n,s)=>RR(e,i,t,n,s,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return RI(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;let t=i.copy_,s=t,o=!1;3===i.type_&&(s=new Set(t),t.clear(),o=!0),Rh(s,(n,s)=>RR(e,i,t,n,s,r,o),n),RI(e,t,!1),r&&e.patches_&&RM("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function RR(e,t,r,n,i,s,o){if(null==i||"object"!=typeof i&&!o)return;let a=RS(i);if(!a||o){if(Ro(i)){let o=RT(e,i,s&&t&&3!==t.type_&&!Rf(t.assigned_,n)?s.concat(n):void 0);if(Rp(r,n,o),!Ro(o))return;e.canAutoFreeze_=!1}else o&&r.add(i);if(Ra(i)&&!a){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&a)return;RT(e,i),(!t||!t.scope_.parent_)&&"symbol"!=typeof n&&(Rg(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&RI(e,i)}}}function RI(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Rw(t,r)}function RD(e,t){let r=Array.isArray(e),n={type_:+!!r,scope_:t?t.scope_:RO(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=n,s=RL;r&&(i=[n],s=RV);let{revoke:o,proxy:a}=Proxy.revocable(i,s);return n.draft_=a,n.revoke_=o,a}var RL={get(e,t){if(t===Rn)return e;let r=Ry(e);if(!Rf(r,t))return RF(e,r,t);let n=r[t];return e.finalized_||!Ra(n)?n:n===Rz(e.base_,t)?(RU(e),e.copy_[t]=RW(n,e)):n},has:(e,t)=>t in Ry(e),ownKeys:e=>Reflect.ownKeys(Ry(e)),set(e,t,r){let n=RB(Ry(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=Rz(Ry(e),t),i=n?.[Rn];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Rm(r,n)&&(void 0!==r||Rf(e.base_,t)))return!0;RU(e),R$(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||
22(e.copy_[t]=r,e.assigned_[t]=!0,!0)},deleteProperty:(e,t)=>(void 0!==Rz(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,RU(e),R$(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=Ry(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){Ri(11)},getPrototypeOf:e=>Rs(e.base_),setPrototypeOf(){Ri(12)}},RV={};function Rz(e,t){let r=e[Rn];return(r?Ry(r):e)[t]}function RF(e,t,r){let n=RB(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function RB(e,t){if(!(t in e))return;let r=Rs(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=Rs(r)}}function R$(e){!e.modified_&&(e.modified_=!0,e.parent_&&R$(e.parent_))}function RU(e){e.copy_||(e.copy_=Rb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function RW(e,t){let r=Rg(e)?RM("MapSet").proxyMap_(e,t):Rv(e)?RM("MapSet").proxySet_(e,t):RD(e,t);return(t?t.scope_:RO()).drafts_.push(r),r}function RH(e){return Ro(e)||Ri(10,e),RK(e)}function RK(e){let t;if(!Ra(e)||RS(e))return e;let r=e[Rn],n=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,t=Rb(e,r.scope_.immer_.useStrictShallowCopy_),n=r.scope_.immer_.shouldUseStrictIteration()}else t=Rb(e,!0);return Rh(t,(e,r)=>{Rp(t,e,RK(r))},n),r&&(r.finalized_=!1),t}function RY(e){return e}function Rq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function RG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rq(Object(r),!0).forEach(function(t){RJ(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rq(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function RJ(e,t,r){return(t=RX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RX(e){var t=RQ(e,"string");return"symbol"==typeof t?t:t+""}function RQ(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Rh(RL,(e,t)=>{RV[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),RV.deleteProperty=function(e,t){return RV.set.call(this,e,t,void 0)},RV.set=function(e,t,r){return RL.set.call(this,e[0],t,r,e[0])},new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,r)=>{let n;if("function"==typeof e&&"function"!=typeof t){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if("function"!=typeof t&&Ri(6),void 0!==r&&"function"!=typeof r&&Ri(7),Ra(e)){let i=Rj(this),s=RW(e,void 0),o=!0;try{n=t(s),o=!1}finally{o?Rk(i):RA(i)}return RP(i,r),RN(n,i)}if(e&&"object"==typeof e)Ri(1,e);else{if(void 0===(n=t(e))&&(n=e),n===Rt&&(n=void 0),this.autoFreeze_&&Rw(n,!0),r){let t=[],i=[];RM("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return"function"==typeof e?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ra(e)||Ri(8),Ro(e)&&(e=RH(e));let t=Rj(this),r=RW(e,void 0);return r[Rn].isManual_=!0,RA(t),r}finishDraft(e,t){let r=e&&e[Rn];r&&r.isManual_||Ri(9);let{scope_:n}=r;return RP(n,t),RN(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];
22if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=RM("Patches").applyPatches_;return Ro(e)?n(e,t):this.produce(e,e=>n(e,t))}}().produce;var RZ={},R0={zIndexMap:Object.values(TV).reduce((e,t)=>RG(RG({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),RZ)},R1=new Set(Object.values(TV));function R2(e){return R1.has(e)}var R3=C0({name:"zIndex",initialState:R0,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:CF()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!R2(r)&&delete e.zIndexMap[r])},prepare:CF()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:i}=t.payload;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElement=RY(n):e.zIndexMap[r].element=RY(n):e.zIndexMap[r]={consumers:0,element:i?void 0:RY(n),panoramaElement:i?RY(n):void 0}},prepare:CF()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:CF()}}}),{registerZIndexPortal:R5,unregisterZIndexPortal:R4,registerZIndexPortalElement:R8,unregisterZIndexPortalElement:R6}=R3.actions,R7=R3.reducer;function R9(e){var{zIndex:t,children:r}=e,n=TD()&&void 0!==t&&0!==t,i=N8(),s=Az();(0,T4.useLayoutEffect)(()=>n?(s(R5({zIndex:t})),()=>{s(R4({zIndex:t}))}):Pn,[s,t,n]);var o=AU(e=>T9(e,t,i));return n?o?(0,T8.createPortal)(r,o):null:r}function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function It(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach(function(t){Ir(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ir(e,t,r){return(t=In(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function In(e){var t=Ii(e,"string");return"symbol"==typeof t?t:t+""}function Ii(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Is=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i,clamp:s}=e,{x:o,y:a,height:l,upperWidth:u,lowerWidth:c}=TE(t),h=o,d=o+(u-c)/2,f=(h+d)/2,p=(u+c)/2,m=h+u/2,g=l>=0?1:-1,v=g*n,y=g>0?"end":"start",b=g>0?"start":"end",w=u>=0?1:-1,x=w*n,S=w>0?"end":"start",_=w>0?"start":"end",M=i;if("top"===r){var O={x:h+u/2,y:a-v,horizontalAnchor:"middle",verticalAnchor:y};return s&&M&&(O.height=Math.max(a-M.y,0),O.width=u),O}if("bottom"===r){var E={x:d+c/2,y:a+l+v,horizontalAnchor:"middle",verticalAnchor:b};return s&&M&&(E.height=Math.max(M.y+M.height-(a+l),0),E.width=c),E}if("left"===r){var P={x:f-x,y:a+l/2,horizontalAnchor:S,verticalAnchor:"middle"};return s&&M&&(P.width=Math.max(P.x-M.x,0),P.height=l),P}if("right"===r){var k={x:f+p+x,y:a+l/2,horizontalAnchor:_,verticalAnchor:"middle"};return s&&M&&(k.width=Math.max(M.x+M.width-k.x,0),k.height=l),k}var A=s&&M?{width:p,height:l}:{};return"insideLeft"===r?It({x:f+x,y:a+l/2,horizontalAnchor:_,verticalAnchor:"middle"},A):"insideRight"===r?It({x:f+p-x,y:a+l/2,horizontalAnchor:S,verticalAnchor:"middle"},A):"insideTop"===r?It({x:h+u/2,y:a+v,horizontalAnchor:"middle",verticalAnchor:b},A):"insideBottom"===r?It({x:d+c/2,y:a+l-v,horizontalAnchor:"middle",verticalAnchor:y},A):"insideTopLeft"===r?It({x:h+x,y:a+v,horizontalAnchor:_,verticalAnchor:b},A):"insideTopRight"===r?It({x:h+u-x,y:a+v,horizontalAnchor:S,verticalAnchor:b},A):"insideBottomLeft"===r?It({x:d+x,y:a+l-v,horizontalAnchor:_,verticalAnchor:y},A):"insideBottomRight"===r?It({x:d+c-x,y:a+l-v,horizontalAnchor:S,verticalAnchor:y},A):r&&"object"==typeof r&&(E2(r.x)||E1(r.x))&&(E2(r.y)||E1(r.y))?It({x:o+E8(r.x,p),y:a+E8(r.y,l),horizontalAnchor:"end",verticalAnchor:"end"},A):It({x:m,y:a+l/2,horizontalAnchor:"middle",verticalAnchor:"middle"},A)},Io=["labelRef"],Ia=["content"];function Il(e,t){if(null==e)return{};var r,n,i=Iu(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Iu(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function Ic(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ih(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?Ic(Object(r),!0).forEach(function(t){Id(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ic(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Id(e,t,r){return(t=If(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function If(e){var t=Ip(e,"string");return"symbol"==typeof t?t:t+""}function Ip(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Im(){return(Im=Object.assign.bind()).apply(null,arguments)}var Ig=(0,Ay.createContext)(null),Iv=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:s,height:o,children:a}=e,l=(0,Ay.useMemo)(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:s,height:o}),[t,r,n,i,s,o]);return Ay.createElement(Ig.Provider,{value:l},a)},Iy=()=>{var e=(0,Ay.useContext)(Ig),t=TP();return e||(t?TE(t):void 0)},Ib=(0,Ay.createContext)(null),Iw=()=>{var e=(0,Ay.useContext)(Ib),t=AU(T5);return e||t},Ix=e=>{var{value:t,formatter:r}=e,n=Pe(e.children)?t:e.children;return"function"==typeof r?r(n):n},IS=e=>null!=e&&"function"==typeof e,I_=(e,t)=>EZ(t-e)*Math.min(Math.abs(t-e),360),IM=(e,t,r,n,i)=>{var s,o,{offset:a,className:l}=e,{cx:u,cy:c,innerRadius:h,outerRadius:d,startAngle:f,endAngle:p,clockWise:m}=i,g=(h+d)/2,v=I_(f,p),y=v>=0?1:-1;switch(t){case"insideStart":s=f+y*a,o=m;break;case"insideEnd":s=p-y*a,o=!m;break;case"end":s=p+y*a,o=m;break;default:throw Error("Unsupported position ".concat(t))}o=v<=0?o:!o;var b=AP(u,c,g,s),w=AP(u,c,g,s+(o?1:-1)*359),x="M".concat(b.x,",").concat(b.y,"\n    A").concat(g,",").concat(g,",0,1,").concat(+!o,",\n    ").concat(w.x,",").concat(w.y),S=Pe(e.id)?E4("recharts-radial-line-"):e.id;return Ay.createElement("text",Im({},n,{dominantBaseline:"central",className:(0,Ab.clsx)("recharts-radial-bar-label",l)}),Ay.createElement("defs",null,Ay.createElement("path",{id:S,d:x})),Ay.createElement("textPath",{xlinkHref:"#".concat(S)},r))},IO=(e,t,r)=>{var{cx:n,cy:i,innerRadius:s,outerRadius:o,startAngle:a,endAngle:l}=e,u=(a+l)/2;if("outside"===r){var{x:c,y:h}=AP(n,i,o+t,u);return{x:c,y:h,textAnchor:c>=n?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var{x:d,y:f}=AP(n,i,(s+o)/2,u);return{x:d,y:f,textAnchor:"middle",verticalAnchor:"middle"}},IE=e=>null!=e&&"cx"in e&&E2(e.cx),IP={angle:0,offset:5,zIndex:TV.label,position:"middle",textBreakAll:!1};function Ik(e){if(!IE(e))return e;var{cx:t,cy:r,outerRadius:n}=e,i=2*n;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function IA(e){var t,r,n,i=k9(e,IP),{viewBox:s,parentViewBox:o,position:a,value:l,children:u,content:c,className:h="",textBreakAll:d,labelRef:f}=i,p=Iw(),m=Iy(),g="center"===a?m:null!=p?p:m,v=Ik(t=null==s?g:IE(s)?s:TE(s));if(!t||Pe(l)&&Pe(u)&&!(0,Ay.isValidElement)(c)&&"function"!=typeof c)return null;var y=Ih(Ih({},i),{},{viewBox:t});if((0,Ay.isValidElement)(c)){var{labelRef:b}=y,w=Il(y,Io);return(0,Ay.cloneElement)(c,w)}if("function"==typeof c){var{content:x}=y,S=Il(y,Ia);if(r=(0,Ay.createElement)(c,S),(0,Ay.isValidElement)(r))return r}else r=Ix(i);var _=kj(i);if(IE(t)){if("insideStart"===a||"insideEnd"===a||"end"===a)return IM(i,a,r,_,t);n=IO(t,i.offset,i.position)}else{if(!v)return null;var M=Is({viewBox:v,position:a,offset:i.offset,parentViewBox:IE(o)?void 0:o,clamp:!0});n=Ih(Ih({x:M.x,y:M.y,textAnchor:M.horizontalAnchor,verticalAnchor:M.verticalAnchor},void 0!==M.width?{width:M.width}:{}),void 0!==M.height?{height:M.height}:{})}return Ay.createElement(R9,{zIndex:i.zIndex},Ay.createElement(Av,Im({ref:f,className:(0,Ab.clsx)("recharts-label",h)},_,n,{textAnchor:Aa(_.textAnchor)?_.textAnchor:n.textAnchor,breakAll:d}),r))}IA.displayName="Label";var Ij=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return!0===e?Ay.createElement(IA,Im({key:"label-implicit"},n)):E3(e)?Ay.createElement(IA,Im({key:"label-implicit",value:e},n)):(0,Ay.isValidElement)(e)?e.type===IA?(0,Ay.cloneElement)(e,Ih({key:"label-implicit"},n)):Ay.createElement(IA,Im({key:"label-implicit",content:e},n)):IS(e)?Ay.createElement(IA,Im({key:"label-implicit",content:e},n)):e&&"object"==typeof e?Ay.createElement(IA,Im({},e,{key:"label-implicit"},n)):null};function IC(e){var{label:t,labelRef:r}=e;return Ij(t,Iy(),r)||null}var IN=ex,IT=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,IR=(e,t)=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,IN.isValidElement)(e)&&(r=e.props),"object"!=typeof r&&"function"!=typeof r)return null;var n={};
22return Object.keys(r).forEach(e=>{k_(e)&&(n[e]=t||(t=>r[e](r,t)))}),n},II=(e,t,r)=>n=>(e(t,r,n),null),ID=(e,t,r)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var n=null;return Object.keys(e).forEach(i=>{var s=e[i];k_(i)&&"function"==typeof s&&(n||(n={}),n[i]=II(s,t,r))}),n},IL=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:s=0}=e,o=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>o&&(o=t.width)}});var a=r?r.getBoundingClientRect().width:0;return Math.round(o+(i+s)+a+(r?n:0))}return 0};function IV(e){return e&&"object"==typeof e&&"className"in e&&"string"==typeof e.className?e.className:""}var Iz=["axisLine","width","height","className","hide","ticks","axisType"];function IF(e,t){if(null==e)return{};var r,n,i=IB(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function IB(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function I$(){return(I$=Object.assign.bind()).apply(null,arguments)}function IU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function IW(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?IU(Object(r),!0).forEach(function(t){IH(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IU(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function IH(e,t,r){return(t=IK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IK(e){var t=IY(e,"string");return"symbol"==typeof t?t:t+""}function IY(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Iq={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:TV.axis};function IG(e){var{x:t,y:r,width:n,height:i,orientation:s,mirror:o,axisLine:a,otherSvgProps:l}=e;if(!a)return null;var u=IW(IW(IW({},l),kk(a)),{},{fill:"none"});if("top"===s||"bottom"===s){var c=+("top"===s&&!o||"bottom"===s&&o);u=IW(IW({},u),{},{x1:t,y1:r+c*i,x2:t+n,y2:r+c*i})}else{var h=+("left"===s&&!o||"right"===s&&o);u=IW(IW({},u),{},{x1:t+h*n,y1:r,x2:t+h*n,y2:r+i})}return kg.createElement("line",I$({},u,{className:(0,ky.clsx)("recharts-cartesian-axis-line",(0,kv.default)(a,"className"))}))}function IJ(e,t,r,n,i,s,o,a,l){var u,c,h,d,f,p,m=a?-1:1,g=e.tickSize||o,v=E2(e.tickCoord)?e.tickCoord:e.coordinate;switch(s){case"top":u=c=e.coordinate,p=(h=(d=r+!a*i)-m*g)-m*l,f=v;break;case"left":h=d=e.coordinate,f=(u=(c=t+!a*n)-m*g)-m*l,p=v;break;case"right":h=d=e.coordinate,f=(u=(c=t+a*n)+m*g)+m*l,p=v;break;default:u=c=e.coordinate,p=(h=(d=r+a*i)+m*g)+m*l,f=v}return{line:{x1:u,y1:h,x2:c,y2:d},tick:{x:f,y:p}}}function IX(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function IQ(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function IZ(e){var t,{option:r,tickProps:n,value:i}=e,s=(0,ky.clsx)(n.className,"recharts-cartesian-axis-tick-value");if(kg.isValidElement(r))t=kg.cloneElement(r,IW(IW({},n),{},{className:s}));else if("function"==typeof r)t=r(IW(IW({},n),{},{className:s}));else{var o="recharts-cartesian-axis-tick-value";"boolean"!=typeof r&&(o=(0,ky.clsx)(o,IV(r))),t=kg.createElement(Av,I$({},n,{className:o}),i)}return t}var I0=(0,kg.forwardRef)((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:s,tickFormatter:o,unit:a,padding:l,tickTextProps:u,orientation:c,mirror:h,x:d,y:f,width:p,height:m,tickSize:g,tickMargin:v,fontSize:y,letterSpacing:b,getTicksConfig:w,events:x,axisType:S}
22=e,_=km(IW(IW({},w),{},{ticks:r}),y,b),M=IX(c,h),O=IQ(c,h),E=kk(w),P=kA(n),k={};"object"==typeof i&&(k=i);var A=IW(IW({},E),{},{fill:"none"},k),j=_.map(e=>IW({entry:e},IJ(e,d,f,p,m,c,g,h,v))),C=j.map(e=>{var{entry:t,line:r}=e;return kg.createElement(kD,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(t.value,"-").concat(t.coordinate,"-").concat(t.tickCoord)},i&&kg.createElement("line",I$({},A,r,{className:(0,ky.clsx)("recharts-cartesian-axis-tick-line",(0,kv.default)(i,"className"))})))}),N=j.map((e,t)=>{var r,i,{entry:c,tick:h}=e,d=IW(IW(IW(IW({verticalAnchor:O},E),{},{textAnchor:M,stroke:"none",fill:s},h),{},{index:t,payload:c,visibleTicksCount:_.length,tickFormatter:o,padding:l},u),{},{angle:null!=(r=null!=(i=null==u?void 0:u.angle)?i:E.angle)?r:0}),f=IW(IW({},d),P);return kg.createElement(kD,I$({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(c.value,"-").concat(c.coordinate,"-").concat(c.tickCoord)},ID(x,c,t)),n&&kg.createElement(IZ,{option:n,tickProps:f,value:"".concat("function"==typeof o?o(c.value,t):c.value).concat(a||"")}))});return kg.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(S,"-ticks")},N.length>0&&kg.createElement(R9,{zIndex:TV.label},kg.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(S,"-tick-labels"),ref:t},N)),C.length>0&&kg.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(S,"-tick-lines")},C))}),I1=(0,kg.forwardRef)((e,t)=>{var{axisLine:r,width:n,height:i,className:s,hide:o,ticks:a,axisType:l}=e,u=IF(e,Iz),[c,h]=(0,kg.useState)(""),[d,f]=(0,kg.useState)(""),p=(0,kg.useRef)(null);(0,kg.useImperativeHandle)(t,()=>({getCalculatedWidth:()=>{var t;return IL({ticks:p.current,label:null==(t=e.labelRef)?void 0:t.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=(0,kg.useCallback)(e=>{if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value");p.current=t;var r=t[0];if(r){var n=window.getComputedStyle(r),i=n.fontSize,s=n.letterSpacing;(i!==c||s!==d)&&(h(i),f(s))}}},[c,d]);return o||null!=n&&n<=0||null!=i&&i<=0?null:kg.createElement(R9,{zIndex:e.zIndex},kg.createElement(kD,{className:(0,ky.clsx)("recharts-cartesian-axis",s)},kg.createElement(IG,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:kk(e)}),kg.createElement(I0,{ref:m,axisType:l,events:u,fontSize:c,getTicksConfig:e,height:e.height,letterSpacing:d,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:a,unit:e.unit,width:e.width,x:e.x,y:e.y}),kg.createElement(Iv,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},kg.createElement(IC,{label:e.label,labelRef:e.labelRef}),e.children)))}),I2=kg.forwardRef((e,t)=>{var r=k9(e,Iq);return kg.createElement(I1,I$({},r,{ref:t}))});I2.displayName="CartesianAxis";var I3=e.i(820785);function I5(e,t,r){e*=1,t*=1,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((t-e)/r)),s=Array(i);++n<i;)s[n]=e+n*r;return s}function I4(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function I8(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}e.s([],207434),e.i(207434),e.s([],371752),e.i(371752);class I6 extends Map{constructor(e,t=Dt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,r]of e)this.set(t,r)}get(e){return super.get(I7(this,e))}has(e){return super.has(I7(this,e))}set(e,t){return super.set(I9(this,e),t)}delete(e){return super.delete(De(this,e))}}function I7({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function I9({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function De({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Dt(e){return null!==e&&"object"==typeof e?e.valueOf():e}
22let Dr=Symbol("implicit");function Dn(){var e=new I6,t=[],r=[],n=Dr;function i(i){let s=e.get(i);if(void 0===s){if(n!==Dr)return n;e.set(i,s=t.push(i)-1)}return r[s%r.length]}return i.domain=function(r){if(!arguments.length)return t.slice();for(let n of(t=[],e=new I6,r))e.has(n)||e.set(n,t.push(n)-1);return i},i.range=function(e){return arguments.length?(r=Array.from(e),i):r.slice()},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return Dn(t,r).unknown(n)},I4.apply(i,arguments),i}function Di(){var e,t,r=Dn().unknown(void 0),n=r.domain,i=r.range,s=0,o=1,a=!1,l=0,u=0,c=.5;function h(){var r=n().length,h=o<s,d=h?o:s,f=h?s:o;e=(f-d)/Math.max(1,r-l+2*u),a&&(e=Math.floor(e)),d+=(f-d-e*(r-l))*c,t=e*(1-l),a&&(d=Math.round(d),t=Math.round(t));var p=I5(r).map(function(t){return d+e*t});return i(h?p.reverse():p)}return delete r.unknown,r.domain=function(e){return arguments.length?(n(e),h()):n()},r.range=function(e){return arguments.length?([s,o]=e,s*=1,o*=1,h()):[s,o]},r.rangeRound=function(e){return[s,o]=e,s*=1,o*=1,a=!0,h()},r.bandwidth=function(){return t},r.step=function(){return e},r.round=function(e){return arguments.length?(a=!!e,h()):a},r.padding=function(e){return arguments.length?(l=Math.min(1,u=+e),h()):l},r.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},r.paddingOuter=function(e){return arguments.length?(u=+e,h()):u},r.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),h()):c},r.copy=function(){return Di(n(),[s,o]).round(a).paddingInner(l).paddingOuter(u).align(c)},I4.apply(h(),arguments)}function Ds(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ds(t())},e}function Do(){return Ds(Di.apply(null,arguments).paddingInner(1))}let Da=Math.sqrt(50),Dl=Math.sqrt(10),Du=Math.sqrt(2);function Dc(e,t,r){let n,i,s,o=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(o)),l=o/Math.pow(10,a),u=l>=Da?10:l>=Dl?5:l>=Du?2:1;return(a<0?(n=Math.round(e*(s=Math.pow(10,-a)/u)),i=Math.round(t*s),n/s<e&&++n,i/s>t&&--i,s=-s):(n=Math.round(e/(s=Math.pow(10,a)*u)),i=Math.round(t/s),n*s<e&&++n,i*s>t&&--i),i<n&&.5<=r&&r<2)?Dc(e,t,2*r):[n,i,s]}function Dh(e,t,r){if(t*=1,e*=1,!((r*=1)>0))return[];if(e===t)return[e];let n=t<e,[i,s,o]=n?Dc(t,e,r):Dc(e,t,r);if(!(s>=i))return[];let a=s-i+1,l=Array(a);if(n)if(o<0)for(let e=0;e<a;++e)l[e]=-((s-e)/o);else for(let e=0;e<a;++e)l[e]=(s-e)*o;else if(o<0)for(let e=0;e<a;++e)l[e]=-((i+e)/o);else for(let e=0;e<a;++e)l[e]=(i+e)*o;return l}function Dd(e,t,r){return Dc(e*=1,t*=1,r*=1)[2]}function Df(e,t,r){t*=1,e*=1,r*=1;let n=t<e,i=n?Dd(t,e,r):Dd(e,t,r);return(n?-1:1)*(i<0?-(1/i):i)}function Dp(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Dm(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Dg(e){let t,r,n;function i(e,n,s=0,o=e.length){if(s<o){if(0!==t(n,n))return o;do{let t=s+o>>>1;0>r(e[t],n)?s=t+1:o=t}while(s<o)}return s}function s(e,t,r=0,o=e.length){let a=i(e,t,r,o-1);return a>r&&n(e[a-1],t)>-n(e[a],t)?a-1:a}return 2!==e.length?(t=Dp,r=(t,r)=>Dp(e(t),r),n=(t,r)=>e(t)-r):(t=e===Dp||e===Dm?e:Dv,r=e,n=e),{left:i,center:s,right:function(e,n,i=0,s=e.length){if(i<s){if(0!==t(n,n))return s;do{let t=i+s>>>1;0>=r(e[t],n)?i=t+1:s=t}while(i<s)}return i}}}function Dv(){return 0}function Dy(e){return null===e?NaN:+e}function*Db(e,t){if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&(yield t);else{let r=-1;for(let n of e)null!=(n=t(n,++r,e))&&(n*=1)>=n&&(yield n)}}let Dw=Dg(Dp),Dx=Dw.right;Dw.left,Dg(Dy).center;let DS=Dx;function D_(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function DM(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function DO(){}var DE=.7,DP=1.4285714285714286,Dk="\\s*([+-]?\\d+)\\s*",DA="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Dj="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",DC=/^#([0-9a-f]{3,8})$/,DN=RegExp(`^rgb\\(${Dk},${Dk},${Dk}\\)$`),DT=RegExp(`^rgb\\(${Dj},${Dj},${Dj}\\)$`),DR=RegExp(`^rgba\\(${Dk},${Dk},${Dk},${DA}\\)$`),DI=RegExp(`^rgba\\(${Dj},${Dj},${Dj},${DA}\\)$`),DD=RegExp(`^hsl\\(${DA},${Dj},${Dj}\\)$`),DL=RegExp(`^hsla\\(${DA},${Dj},${Dj},${DA}\\)$`),DV={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function Dz(){return this.rgb().formatHex()}function DF(){return this.rgb().formatRgb()}function DB(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=DC.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?D$(t):3===r?new DK(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?DU(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?DU(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=DN.exec(e))?new DK(t[1],t[2],t[3],1):(t=DT.exec(e))?new DK(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=DR.exec(e))?DU(t[1],t[2],t[3],t[4]):(t=DI.exec(e))?DU(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=DD.exec(e))?DZ(t[1],t[2]/100,t[3]/100,1):(t=DL.exec(e))?DZ(t[1],t[2]/100,t[3]/100,t[4]):DV.hasOwnProperty(e)?D$(DV[e]):"transparent"===e?new DK(NaN,NaN,NaN,0):null}function D$(e){return new DK(e>>16&255,e>>8&255,255&e,1)}function DU(e,t,r,n){return n<=0&&(e=t=r=NaN),new DK(e,t,r,n)}function DW(e){return(e instanceof DO||(e=DB(e)),e)?new DK((e=e.rgb()).r,e.g,e.b,e.opacity):new DK}function DH(e,t,r,n){return 1==arguments.length?DW(e):new DK(e,t,r,null==n?1:n)}function DK(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function DY(){return`#${DQ(this.r)}${DQ(this.g)}${DQ(this.b)}`}function Dq(){return`#${DQ(this.r)}${DQ(this.g)}${DQ(this.b)}${DQ((isNaN(this.opacity)?1:this.opacity)*255)}`}function DG(){let e=DJ(this.opacity);return`${1===e?"rgb(":"rgba("}${DX(this.r)}, ${DX(this.g)}, ${DX(this.b)}${1===e?")":`, ${e})`}`}function DJ(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function DX(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function DQ(e){return((e=DX(e))<16?"0":"")+e.toString(16)}function DZ(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new D2(e,t,r,n)}function D0(e){if(e instanceof D2)return new D2(e.h,e.s,e.l,e.opacity);if(e instanceof DO||(e=DB(e)),!e)return new D2;if(e instanceof D2)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),s=Math.max(t,r,n),o=NaN,a=s-i,l=(s+i)/2;return a?(o=t===s?(r-n)/a+(r<n)*6:r===s?(n-t)/a+2:(t-r)/a+4,a/=l<.5?s+i:2-s-i,o*=60):a=l>0&&l<1?0:o,new D2(o,a,l,e.opacity)}function D1(e,t,r,n){return 1==arguments.length?D0(e):new D2(e,t,r,null==n?1:n)}function D2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function D3(e){return(e=(e||0)%360)<0?e+360:e}function D5(e){return Math.max(0,Math.min(1,e||0))}function D4(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function D8(e,t,r,n,i){var s=e*e,o=s*e;return((1-3*e+3*s-o)*t+(4-6*s+3*o)*r+(1+3*e+3*s-3*o)*n+o*i)/6}function D6(e){var t=e.length-1;
22return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],s=e[n+1],o=n>0?e[n-1]:2*i-s,a=n<t-1?e[n+2]:2*s-i;return D8((r-n/t)*t,o,i,s,a)}}function D7(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],s=e[n%t],o=e[(n+1)%t],a=e[(n+2)%t];return D8((r-n/t)*t,i,s,o,a)}}D_(DO,DB,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Dz,formatHex:Dz,formatHex8:function e(){return this.rgb().formatHex8()},formatHsl:function e(){return D0(this).formatHsl()},formatRgb:DF,toString:DF}),D_(DK,DH,DM(DO,{brighter(e){return e=null==e?DP:Math.pow(DP,e),new DK(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?DE:Math.pow(DE,e),new DK(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new DK(DX(this.r),DX(this.g),DX(this.b),DJ(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:DY,formatHex:DY,formatHex8:Dq,formatRgb:DG,toString:DG})),D_(D2,D1,DM(DO,{brighter(e){return e=null==e?DP:Math.pow(DP,e),new D2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?DE:Math.pow(DE,e),new D2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new DK(D4(e>=240?e-240:e+120,i,n),D4(e,i,n),D4(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new D2(D3(this.h),D5(this.s),D5(this.l),DJ(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=DJ(this.opacity);return`${1===e?"hsl(":"hsla("}${D3(this.h)}, ${100*D5(this.s)}%, ${100*D5(this.l)}%${1===e?")":`, ${e})`}`}}));let D9=e=>()=>e;function Le(e,t){return function(r){return e+r*t}}function Lt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Lr(e){return 1==(e*=1)?Ln:function(t,r){return r-t?Lt(t,r,e):D9(isNaN(t)?r:t)}}function Ln(e,t){var r=t-e;return r?Le(e,r):D9(isNaN(e)?t:e)}let Li=function e(t){var r=Lr(t);function n(e,t){var n=r((e=DH(e)).r,(t=DH(t)).r),i=r(e.g,t.g),s=r(e.b,t.b),o=Ln(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=s(t),e.opacity=o(t),e+""}}return n.gamma=e,n}(1);function Ls(e){return function(t){var r,n,i=t.length,s=Array(i),o=Array(i),a=Array(i);for(r=0;r<i;++r)n=DH(t[r]),s[r]=n.r||0,o[r]=n.g||0,a[r]=n.b||0;return s=e(s),o=e(o),a=e(a),n.opacity=1,function(e){return n.r=s(e),n.g=o(e),n.b=a(e),n+""}}}function Lo(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(s){for(r=0;r<n;++r)i[r]=e[r]*(1-s)+t[r]*s;return i}}function La(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ll(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,s=Array(i),o=Array(n);for(r=0;r<i;++r)s[r]=Lv(e[r],t[r]);for(;r<n;++r)o[r]=t[r];return function(e){for(r=0;r<i;++r)o[r]=s[r](e);return o}}function Lu(e,t){var r=new Date;return e*=1,t*=1,function(n){return r.setTime(e*(1-n)+t*n),r}}function Lc(e,t){return e*=1,t*=1,function(r){return e*(1-r)+t*r}}function Lh(e,t){var r,n={},i={};for(r in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)r in e?n[r]=Lv(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}Ls(D6),Ls(D7);var Ld=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Lf=RegExp(Ld.source,"g");function Lp(e){return function(){return e}}function Lm(e){return function(t){return e(t)+""}}function Lg(e,t){var r,n,i,s=Ld.lastIndex=Lf.lastIndex=0,o=-1,a=[],l=[];for(e+="",t+="";(r=Ld.exec(e))&&(n=Lf.exec(t));)(i=n.index)>s&&(i=t.slice(s,i),a[o]?a[o]+=i:a[++o]=i),(r=r[0])===(n=n[0])?a[o]?a[o]+=n:a[++o]=n:(a[++o]=null,l.push({i:o,x:Lc(r,n)})),s=Lf.lastIndex;return s<t.length&&(i=t.slice(s),a[o]?a[o]+=i:a[++o]=i),a.length<2?l[0]?Lm(l[0].x):Lp(t):(t=l.length,function(e){for(var r,n=0;n<t;++n)a[(r=l[n]).i]=r.x(e);return a.join("")})}function Lv(e,t){var r,n=typeof t;return null==t||"boolean"===n?D9(t):("number"===n?Lc:"string"===n?(r=DB(t))?(t=r,Li):Lg:t instanceof DB?Li:t instanceof Date?Lu:La(t)?Lo:Array.isArray(t)?Ll:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Lh:Lc)(e,t)}function Ly(e,t){return e*=1,t*=1,function(r){return Math.round(e*(1-r)+t*r)}}
22function Lb(e){return function(){return e}}function Lw(e){return+e}var Lx=[0,1];function LS(e){return e}function L_(e,t){return(t-=e*=1)?function(r){return(r-e)/t}:Lb(isNaN(t)?NaN:.5)}function LM(e,t){var r;return e>t&&(r=e,e=t,t=r),function(r){return Math.max(e,Math.min(t,r))}}function LO(e,t,r){var n=e[0],i=e[1],s=t[0],o=t[1];return i<n?(n=L_(i,n),s=r(o,s)):(n=L_(n,i),s=r(s,o)),function(e){return s(n(e))}}function LE(e,t,r){var n=Math.min(e.length,t.length)-1,i=Array(n),s=Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=L_(e[o],e[o+1]),s[o]=r(t[o],t[o+1]);return function(t){var r=DS(e,t,1,n)-1;return s[r](i[r](t))}}function LP(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Lk(){var e,t,r,n,i,s,o=Lx,a=Lx,l=Lv,u=LS;function c(){var e=Math.min(o.length,a.length);return u!==LS&&(u=LM(o[0],o[e-1])),n=e>2?LE:LO,i=s=null,h}function h(t){return null==t||isNaN(t*=1)?r:(i||(i=n(o.map(e),a,l)))(e(u(t)))}return h.invert=function(r){return u(t((s||(s=n(a,o.map(e),Lc)))(r)))},h.domain=function(e){return arguments.length?(o=Array.from(e,Lw),c()):o.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),c()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=Ly,c()},h.clamp=function(e){return arguments.length?(u=!!e||LS,c()):u!==LS},h.interpolate=function(e){return arguments.length?(l=e,c()):l},h.unknown=function(e){return arguments.length?(r=e,h):r},function(r,n){return e=r,t=n,c()}}function LA(){return Lk()(LS,LS)}function Lj(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function LC(e,t){if(!isFinite(e)||0===e)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function LN(e){return(e=LC(Math.abs(e)))?e[1]:NaN}function LT(e,t){return function(r,n){for(var i=r.length,s=[],o=0,a=e[0],l=0;i>0&&a>0&&(l+a+1>n&&(a=Math.max(1,n-l)),s.push(r.substring(i-=a,i+a)),!((l+=a+1)>n));)a=e[o=(o+1)%e.length];return s.reverse().join(t)}}function LR(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var LI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function LD(e){var t;if(!(t=LI.exec(e)))throw Error("invalid format: "+e);return new LL({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function LL(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function LV(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}function Lz(e,t){var r=LC(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+Array(i-n.length+2).join("0")}LD.prototype=LL.prototype,LL.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};let LF={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Lj,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Lz(100*e,t),r:Lz,s:function(e,t){var r=LC(e,t);if(!r)return N=void 0,e.toPrecision(t);var n=r[0],i=r[1],s=i-(N=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=n.length;return s===o?n:s>o?n+Array(s-o+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+Array(1-s).join("0")+LC(e,Math.max(0,t+s-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function LB(e){return e}var L$=Array.prototype.map,LU=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function LW(e){var t=void 0===e.grouping||void 0===e.thousands?LB:LT(L$.call(e.grouping,Number),e.thous
22ands+""),r=void 0===e.currency?"":e.currency[0]+"",n=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?LB:LR(L$.call(e.numerals,String)),o=void 0===e.percent?"%":e.percent+"",a=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function u(e,u){var c=(e=LD(e)).fill,h=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,g=e.comma,v=e.precision,y=e.trim,b=e.type;"n"===b?(g=!0,b="g"):LF[b]||(void 0===v&&(v=12),y=!0,b="g"),(p||"0"===c&&"="===h)&&(p=!0,c="0",h="=");var w=(u&&void 0!==u.prefix?u.prefix:"")+("$"===f?r:"#"===f&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),x=("$"===f?n:/[%p]/.test(b)?o:"")+(u&&void 0!==u.suffix?u.suffix:""),S=LF[b],_=/[defgprs%]/.test(b);function M(e){var r,n,o,u=w,f=x;if("c"===b)f=S(e)+f,e="";else{var M=(e*=1)<0||1/e<0;if(e=isNaN(e)?l:S(Math.abs(e),v),y&&(e=LV(e)),M&&0==+e&&"+"!==d&&(M=!1),u=(M?"("===d?d:a:"-"===d||"("===d?"":d)+u,f=("s"!==b||isNaN(e)||void 0===N?"":LU[8+N/3])+f+(M&&"("===d?")":""),_){for(r=-1,n=e.length;++r<n;)if(48>(o=e.charCodeAt(r))||o>57){f=(46===o?i+e.slice(r+1):e.slice(r))+f,e=e.slice(0,r);break}}}g&&!p&&(e=t(e,1/0));var O=u.length+e.length+f.length,E=O<m?Array(m-O+1).join(c):"";switch(g&&p&&(e=t(E+e,E.length?m-f.length:1/0),E=""),h){case"<":e=u+e+f+E;break;case"=":e=u+E+e+f;break;case"^":e=E.slice(0,O=E.length>>1)+u+e+f+E.slice(O);break;default:e=E+u+e+f}return s(e)}return v=void 0===v?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),M.toString=function(){return e+""},M}function c(e,t){var r=3*Math.max(-8,Math.min(8,Math.floor(LN(t)/3))),n=Math.pow(10,-r),i=u(((e=LD(e)).type="f",e),{suffix:LU[8+r/3]});return function(e){return i(n*e)}}return{format:u,formatPrefix:c}}function LH(e){return Math.max(0,-LN(Math.abs(e)))}function LK(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(LN(t)/3)))-LN(Math.abs(e)))}function LY(e,t){return Math.max(0,LN(t=Math.abs(t)-(e=Math.abs(e)))-LN(e))+1}function Lq(e,t,r,n){var i,s=Df(e,t,r);switch((n=LD(null==n?",f":n)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=LK(s,o))||(n.precision=i),I(n,o);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=LY(s,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=LH(s))||(n.precision=i-("%"===n.type)*2)}return R(n)}function LG(e){var t=e.domain;return e.ticks=function(e){var r=t();return Dh(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return Lq(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i,s=t(),o=0,a=s.length-1,l=s[o],u=s[a],c=10;for(u<l&&(i=l,l=u,u=i,i=o,o=a,a=i);c-- >0;){if((i=Dd(l,u,r))===n)return s[o]=l,s[a]=u,t(s);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else if(i<0)l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i;else break;n=i}return e},e}function LJ(){var e=LA();return e.copy=function(){return LP(e,LJ())},I4.apply(e,arguments),LG(e)}function LX(e){var t;function r(e){return null==e||isNaN(e*=1)?t:e}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(e=Array.from(t,Lw),r):e.slice()},r.unknown=function(e){return arguments.length?(t=e,r):t},r.copy=function(){return LX(e).unknown(t)},e=arguments.length?Array.from(e,Lw):[0,1],LG(r)}function LQ(e,t){e=e.slice();var r,n=0,i=e.length-1,s=e[n],o=e[i];return o<s&&(r=n,n=i,i=r,r=s,s=o,o=r),e[n]=t.floor(s),e[i]=t.ceil(o),e}function LZ(e){return Math.log(e)}function L0(e){return Math.exp(e)}function L1(e){return-Math.log(-e)}function L2(e){return-Math.exp(-e)}function L3(e){return isFinite(e)?+("1e"+e):e<0?0:e}function L5(e){return 10===e?L3:e===Math.E?Math.exp:t=>Math.pow(e,t)}function L4(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function L8(e){return(t,r)=>-e(-t,r)}function L6(e){let t,r,n=e(LZ,L0),i=n.domain,s=10;function o(){return t=L4(s),r=L5(s),i()[0]<0?(t=L8(t),r=L8(r),e(L1,L2)):e(LZ,L0),n}return n.base=function(e){return arguments.length?(s=+e,o()):s},n.domain=function(e){return arguments.length?(i(e),o()):i()},n.ticks=e=>{let n,o,a=i(),l=a[0],u=a[a.length-1],c=u<l;c&&([l,u]=[u,l]);let h=t(l),d=t(u),f=null==e?10:+e,p=[];
22if(!(s%1)&&d-h<f){if(h=Math.floor(h),d=Math.ceil(d),l>0){for(;h<=d;++h)for(n=1;n<s;++n)if(!((o=h<0?n/r(-h):n*r(h))<l)){if(o>u)break;p.push(o)}}else for(;h<=d;++h)for(n=s-1;n>=1;--n)if(!((o=h>0?n/r(-h):n*r(h))<l)){if(o>u)break;p.push(o)}2*p.length<f&&(p=Dh(l,u,f))}else p=Dh(h,d,Math.min(d-h,f)).map(r);return c?p.reverse():p},n.tickFormat=(e,i)=>{if(null==e&&(e=10),null==i&&(i=10===s?"s":","),"function"!=typeof i&&(s%1||null!=(i=LD(i)).precision||(i.trim=!0),i=R(i)),e===1/0)return i;let o=Math.max(1,s*e/n.ticks().length);return e=>{let n=e/r(Math.round(t(e)));return n*s<s-.5&&(n*=s),n<=o?i(e):""}},n.nice=()=>i(LQ(i(),{floor:e=>r(Math.floor(t(e))),ceil:e=>r(Math.ceil(t(e)))})),n}function L7(){let e=L6(Lk()).domain([1,10]);return e.copy=()=>LP(e,L7()).base(e.base()),I4.apply(e,arguments),e}function L9(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Ve(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Vt(e){var t=1,r=e(L9(1),Ve(t));return r.constant=function(r){return arguments.length?e(L9(t=+r),Ve(t)):t},LG(r)}function Vr(){var e=Vt(Lk());return e.copy=function(){return LP(e,Vr()).constant(e.constant())},I4.apply(e,arguments)}function Vn(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Vi(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Vs(e){return e<0?-e*e:e*e}function Vo(e){var t=e(LS,LS),r=1;function n(){return 1===r?e(LS,LS):.5===r?e(Vi,Vs):e(Vn(r),Vn(1/r))}return t.exponent=function(e){return arguments.length?(r=+e,n()):r},LG(t)}function Va(){var e=Vo(Lk());return e.copy=function(){return LP(e,Va()).exponent(e.exponent())},I4.apply(e,arguments),e}function Vl(){return Va.apply(null,arguments).exponent(.5)}function Vu(e){return Math.sign(e)*e*e}function Vc(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Vh(){var e,t=LA(),r=[0,1],n=!1;function i(r){var i=Vc(t(r));return isNaN(i)?e:n?Math.round(i):i}return i.invert=function(e){return t.invert(Vu(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain()},i.range=function(e){return arguments.length?(t.range((r=Array.from(e,Lw)).map(Vu)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(e){return arguments.length?(t.clamp(e),i):t.clamp()},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return Vh(t.domain(),r).round(n).clamp(t.clamp()).unknown(e)},I4.apply(i,arguments),LG(i)}function Vd(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let n=-1;for(let i of e)null!=(i=t(i,++n,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function Vf(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let n=-1;for(let i of e)null!=(i=t(i,++n,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function Vp(e=Dp){if(e===Dp)return Vm;if("function"!=typeof e)throw TypeError("compare is not a function");return(t,r)=>{let n=e(t,r);return n||0===n?n:(0===e(r,r))-(0===e(t,t))}}function Vm(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:+(e>t))}function Vg(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=void 0===i?Vm:Vp(i);n>r;){if(n-r>600){let s=n-r+1,o=t-r+1,a=Math.log(s),l=.5*Math.exp(2*a/3),u=.5*Math.sqrt(a*l*(s-l)/s)*(o-s/2<0?-1:1),c=Math.max(r,Math.floor(t-o*l/s+u)),h=Math.min(n,Math.floor(t+(s-o)*l/s+u));Vg(e,t,c,h,i)}let s=e[t],o=r,a=n;for(Vv(e,r,t),i(e[n],s)>0&&Vv(e,r,n);o<a;){for(Vv(e,o,a),++o,--a;0>i(e[o],s);)++o;for(;i(e[a],s)>0;)--a}0===i(e[r],s)?Vv(e,r,a):Vv(e,++a,n),a<=t&&(r=a+1),t<=a&&(n=a-1)}return e}function Vv(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function Vy(e,t,r){if(!(!(n=(e=Float64Array.from(Db(e,r))).length)||isNaN(t*=1))){if(t<=0||n<2)return Vf(e);if(t>=1)return Vd(e);var n,i=(n-1)*t,s=Math.floor(i),o=Vd(Vg(e,s).subarray(0,s+1)),a=Vf(e.subarray(s+1));return o+(a-o)*(i-s)}}function Vb(e,t,r=Dy){if(!(!(n=e.length)||isNaN(t*=1))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,s=Math.floor(i),o=+r(e[s],s,e),a=+r(e[s+1],s+1,e);return o+(a-o)*(i-s)}}function Vw(){var e,t=[],r=[],n=[];function i(){var e=0,i=Math.max(1,r.length);for(n=Array(i-1);++e<i;)n[e-1]=Vb(t,e/i);return s}function s(t){return null==t||isNaN(t*=1)?e:r[DS(n,t)]}return s.invertExtent=function(e){var i=r.indexOf(e);return i<0?[NaN,NaN]:[i>0?n[i-1]:t[0],i<n.length?n[i]:t[t.length-1]]},s.domain=function(e){if(!arguments.length)return t.slice();for(let r of(t=[],e))null==r||isNaN(r*=1)||t.push(r);return t.sort(Dp),i()},s.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},s.unknown=function(t){return arguments.length?(e=t,s):e},s.quantiles=function(){return n.slice()},s.copy=function(){return Vw().domain(t).range(r).unknown(e)},I4.apply(s,arguments)}function Vx(){var e,t=0,r=1,n=1,i=[.5],s=[0,1];function o(t){return null!=t&&t<=t?s[DS(i,t,0,n)]:e}function a(){var e=-1;for(i=Array(n);++e<n;)i[e]=((e+1)*r-(e-n)*t)/(n+1);return o}return o.domain=function(e){return arguments.length?([t,r]=e,t*=1,r*=1,a()):[t,r]},o.range=function(e){return arguments.length?(n=(s=Array.from(e)).length-1,a()):s.slice()},o.invertExtent=function(e){var o=s.indexOf(e);return o<0?[NaN,NaN]:o<1?[t,i[0]]:o>=n?[i[n-1],r]:[i[o-1],i[o]]},o.unknown=function(t){return arguments.length&&(e=t),o},o.thresholds=function(){return i.slice()},o.copy=function(){return Vx().domain([t,r]).range(s).unknown(e)},I4.apply(LG(o),arguments)}function VS(){var e,t=[.5],r=[0,1],n=1;function i(i){return null!=i&&i<=i?r[DS(t,i,0,n)]:e}return i.domain=function(e){return arguments.length?(n=Math.min((t=Array.from(e)).length,r.length-1),i):t.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),n=Math.min(t.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var n=r.indexOf(e);return[t[n-1],t[n]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return VS().domain(t).range(r).unknown(e)},I4.apply(i,arguments)}(function e(e){return R=(T=LW(e)).format,I=T.formatPrefix})({thousands:",",grouping:[3],currency:["$",""]});let V_=new Date,VM=new Date;function VO(e,t,r,n){function i(t){return e(t=0==arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=r=>
22(e(r=new Date(r-1)),t(r,1),e(r),r),i.round=e=>{let t=i(e),r=i.ceil(e);return e-t<r-e?t:r},i.offset=(e,r)=>(t(e=new Date(+e),null==r?1:Math.floor(r)),e),i.range=(r,n,s)=>{let o,a=[];if(r=i.ceil(r),s=null==s?1:Math.floor(s),!(r<n)||!(s>0))return a;do a.push(o=new Date(+r)),t(r,s),e(r);while(o<r&&r<n)return a},i.filter=r=>VO(t=>{if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)},(e,n)=>{if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}),r&&(i.count=(t,n)=>(V_.setTime(+t),VM.setTime(+n),e(V_),e(VM),Math.floor(r(V_,VM))),i.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?i.filter(n?t=>n(t)%e==0:t=>i.count(0,t)%e==0):i:null),i}let VE=VO(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());VE.every=e=>isFinite(e=Math.floor(e))&&e>0?VO(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}):null,VE.range;let VP=VO(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());VP.every=e=>isFinite(e=Math.floor(e))&&e>0?VO(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}):null,VP.range;let Vk=VO(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Vk.range;let VA=VO(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());VA.range;let Vj=1e3,VC=6e4,VN=36e5,VT=864e5,VR=6048e5,VI=2592e6,VD=31536e6;function VL(e){return VO(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*VC)/VR)}let VV=VL(0),Vz=VL(1),VF=VL(2),VB=VL(3),V$=VL(4),VU=VL(5),VW=VL(6);function VH(e){return VO(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/VR)}VV.range,Vz.range,VF.range,VB.range,V$.range,VU.range,VW.range;let VK=VH(0),VY=VH(1),Vq=VH(2),VG=VH(3),VJ=VH(4),VX=VH(5),VQ=VH(6);VK.range,VY.range,Vq.range,VG.range,VJ.range,VX.range,VQ.range;let VZ=VO(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*VC)/VT,e=>e.getDate()-1);VZ.range;let V0=VO(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/VT,e=>e.getUTCDate()-1);V0.range;let V1=VO(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/VT,e=>Math.floor(e/VT));V1.range;let V2=VO(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vj-e.getMinutes()*VC)},(e,t)=>{e.setTime(+e+t*VN)},(e,t)=>(t-e)/VN,e=>e.getHours());V2.range;let V3=VO(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*VN)},(e,t)=>(t-e)/VN,e=>e.getUTCHours());V3.range;let V5=VO(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vj)},(e,t)=>{e.setTime(+e+t*VC)},(e,t)=>(t-e)/VC,e=>e.getMinutes());V5.range;let V4=VO(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*VC)},(e,t)=>(t-e)/VC,e=>e.getUTCMinutes());V4.range;let V8=VO(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Vj)},(e,t)=>(t-e)/Vj,e=>e.getUTCSeconds());V8.range;let V6=VO(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);function V7(e,t,r,n,i,s){let o=[[V8,1,Vj],[V8,5,5*Vj],[V8,15,15*Vj],[V8,30,30*Vj],[s,1,VC],[s,5,5*VC],[s,15,15*VC],[s,30,30*VC],[i,1,VN],[i,3,3*VN],[i,6,6*VN],[i,12,12*VN],[n,1,VT],[n,2,2*VT],[r,1,VR],[t,1,VI],[t,3,3*VI],[e,1,VD]];function a(t,r,n){let i=Math.abs(r-t)/n,s=Dg(([,,e])=>e).right(o,i);if(s===o.length)return e.every(Df(t/VD,r/VD,n));if(0===s)return V6.every(Math.max(Df(t,r,n),1));let[a,l]=o[i/o[s-1][2]<o[s][2]/i?s-1:s];return a.every(l)}return[function(e,t,r){let n=t<e;n&&([e,t]=[t,e]);let i=r&&"function"==typeof r.range?r:a(e,t,r),s=i?i.range(e,+t+1):[];return n?s.reverse():s},a]}V6.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?VO(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):V6:null,V6.range;let[V9,ze]=V7(VP,VA,VK,V1,V3,V4),[zt,zr]=V7(VE,Vk,VV,VZ,V2,V5);function zn(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function zi(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function zs(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function zo(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,s=e.days,o=e.shortDays,a=e.months,l=e.shortMonths,u=zf(i),c=zp(i),h=zf(s),d=zp(s),f=zf(o),p=zp(o),m=zf(a),g=zp(a),v=zf(l),y=zp(l),b={a:T,A:R,b:I,B:D,c:null,d:zI,e:zI,f:zF,g:zX,G:zZ,H:zD,I:zL,j:zV,L:zz,m:zB,M:z$,p:L,q:V,Q:Fd,s:Ff,S:zU,u:zW,U:zH,V:zY,w:zq,W:zG,x:null,X:null,y:zJ,Y:zQ,Z:z0,"%":Fh},w={a:z,A:F,b:B,B:$,c:null,d:z1,e:z1,f:z8,g:Fa,G:Fu,H:z2,I:z3,j:z5,L:z4,m:z6,M:z7,p:U,q:W,Q:Fd,s:Ff,S:z9,u:Fe,U:Ft,V:Fn,w:Fi,W:Fs,x:null,X:null,y:Fo,Y:Fl,Z:Fc,"%":Fh},x={a:E,A:P,b:k,B:A,c:j,d:zO,e:zO,f:zC,g:zx,G:zw,H:zP,I:zP,j:zE,L:zj,m:zM,M:zk,p:O,q:z_,Q:zT,
vendor: 9,035 bytes, line 22
22s:zR,S:zA,u:zg,U:zv,V:zy,w:zm,W:zb,x:C,X:N,y:zx,Y:zw,Z:zS,"%":zN};function S(e,t){return function(r){var n,i,s,o=[],a=-1,l=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++a<u;)37===e.charCodeAt(a)&&(o.push(e.slice(l,a)),null!=(i=za[n=e.charAt(++a)])?n=e.charAt(++a):i="e"===n?" ":"0",(s=t[n])&&(n=s(r,i)),o.push(n),l=a+1);return o.push(e.slice(l,a)),o.join("")}}function _(e,t){return function(r){var n,i,s=zs(1900,void 0,1);if(M(s,e,r+="",0)!=r.length)return null;if("Q"in s)return new Date(s.Q);if("s"in s)return new Date(1e3*s.s+("L"in s?s.L:0));if(!t||"Z"in s||(s.Z=0),"p"in s&&(s.H=s.H%12+12*s.p),void 0===s.m&&(s.m="q"in s?s.q:0),"V"in s){if(s.V<1||s.V>53)return null;"w"in s||(s.w=1),"Z"in s?(n=(i=(n=zi(zs(s.y,0,1))).getUTCDay())>4||0===i?VY.ceil(n):VY(n),n=V0.offset(n,(s.V-1)*7),s.y=n.getUTCFullYear(),s.m=n.getUTCMonth(),s.d=n.getUTCDate()+(s.w+6)%7):(n=(i=(n=zn(zs(s.y,0,1))).getDay())>4||0===i?Vz.ceil(n):Vz(n),n=VZ.offset(n,(s.V-1)*7),s.y=n.getFullYear(),s.m=n.getMonth(),s.d=n.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:+("W"in s)),i="Z"in s?zi(zs(s.y,0,1)).getUTCDay():zn(zs(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+7*s.W-(i+5)%7:s.w+7*s.U-(i+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,zi(s)):zn(s)}}function M(e,t,r,n){for(var i,s,o=0,a=t.length,l=r.length;o<a;){if(n>=l)return -1;if(37===(i=t.charCodeAt(o++))){if(!(s=x[(i=t.charAt(o++))in za?t.charAt(o++):i])||(n=s(e,r,n))<0)return -1}else if(i!=r.charCodeAt(n++))return -1}return n}function O(e,t,r){var n=u.exec(t.slice(r));return n?(e.p=c.get(n[0].toLowerCase()),r+n[0].length):-1}function E(e,t,r){var n=f.exec(t.slice(r));return n?(e.w=p.get(n[0].toLowerCase()),r+n[0].length):-1}function P(e,t,r){var n=h.exec(t.slice(r));return n?(e.w=d.get(n[0].toLowerCase()),r+n[0].length):-1}function k(e,t,r){var n=v.exec(t.slice(r));return n?(e.m=y.get(n[0].toLowerCase()),r+n[0].length):-1}function A(e,t,r){var n=m.exec(t.slice(r));return n?(e.m=g.get(n[0].toLowerCase()),r+n[0].length):-1}function j(e,r,n){return M(e,t,r,n)}function C(e,t,n){return M(e,r,t,n)}function N(e,t,r){return M(e,n,t,r)}function T(e){return o[e.getDay()]}function R(e){return s[e.getDay()]}function I(e){return l[e.getMonth()]}function D(e){return a[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function V(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function F(e){return s[e.getUTCDay()]}function B(e){return l[e.getUTCMonth()]}function $(e){return a[e.getUTCMonth()]}function U(e){return i[+(e.getUTCHours()>=12)]}function W(e){return 1+~~(e.getUTCMonth()/3)}return b.x=S(r,b),b.X=S(n,b),b.c=S(t,b),w.x=S(r,w),w.X=S(n,w),w.c=S(t,w),{format:function(e){var t=S(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=_(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=_(e+="",!0);return t.toString=function(){return e},t}}}var za={"-":"",_:" ",0:"0"},zl=/^\s*\d+/,zu=/^%/,zc=/[\\^$*+?|[\]().{}]/g;function zh(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",s=i.length;return n+(s<r?Array(r-s+1).join(t)+i:i)}function zd(e){return e.replace(zc,"\\$&")}function zf(e){return RegExp("^(?:"+e.map(zd).join("|")+")","i")}function zp(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function zm(e,t,r){var n=zl.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function zg(e,t,r){var n=zl.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function zv(e,t,r){var n=zl.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function zy(e,t,r){var n=zl.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function zb(e,t,r){var n=zl.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function zw(e,t,r){var n=zl.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function zx(e,t,r){var n=zl.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function zS(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function z_(e,t,r){var n=zl.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function zM(e,t,r){var n=zl.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function zO(e,t,r){var n=zl.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function zE(e,t,r){var n=zl.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function zP(e,t,r){var n=zl.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function zk(e,t,r){var n=zl.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function zA(e,t,r){var n=zl.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function zj(e,t,r){var n=zl.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function zC(e,t,r){var n=zl.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function zN(e,t,r){var n=zu.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function zT(e,t,r){var n=zl.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function zR(e,t,r){var n=zl.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function zI(e,t){return zh(e.getDate(),t,2)}function zD(e,t){return zh(e.getHours(),t,2)}function zL(e,t){return zh(e.getHours()%12||12,t,2)}function zV(e,t){return zh(1+VZ.count(VE(e),e),t,3)}function zz(e,t){return zh(e.getMilliseconds(),t,3)}function zF(e,t){return zz(e,t)+"000"}function zB(e,t){return zh(e.getMonth()+1,t,2)}function z$(e,t){return zh(e.getMinutes(),t,2)}function zU(e,t){return zh(e.getSeconds(),t,2)}function zW(e){var t=e.getDay();return 0===t?7:t}function zH(e,t){return zh(VV.count(VE(e)-1,e),t,2)}function zK(e){var t=e.getDay();return t>=4||0===t?V$(e):V$.ceil(e)}function zY(e,t){return e=zK(e),zh(V$.count(VE(e),e)+(4===VE(e).getDay()),t,2)}function zq(e){return e.getDay()}function zG(e,t){return zh(Vz.count(VE(e)-1,e),t,2)}function zJ(e,t){return zh(e.getFullYear()%100,t,2)}function zX(e,t){return zh((e=zK(e)).getFullYear()%100,t,2)}function zQ(e,t){return zh(e.getFullYear()%1e4,t,4)}function zZ(e,t){var r=e.getDay();return zh((e=r>=4||0===r?V$(e):V$.ceil(e)).getFullYear()%1e4,t,4)}function z0(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+zh(t/60|0,"0",2)+zh(t%60,"0",2)}function z1(e,t){return zh(e.getUTCDate(),t,2)}function z2(e,t){return zh(e.getUTCHours(),t,2)}function z3(e,t){return zh(e.getUTCHours()%12||12,t,2)}function z5(e,t){return zh(1+V0.count(VP(e),e),t,3)}function z4(e,t){return zh(e.getUTCMilliseconds(),t,3)}function z8(e,t){return z4(e,t)+"000"}function z6(e,t){return zh(e.getUTCMonth()+1,t,2)}function z7(e,t){return zh(e.getUTCMinutes(),t,2)}function z9(e,t){return zh(e.getUTCSeconds(),t,2)}function Fe(e){var t=e.getUTCDay();return 0===t?7:t}function Ft(e,t){return zh(VK.count(VP(e)-1,e),t,2)}function Fr(e){var t=e.getUTCDay();return t>=4||0===t?VJ(e):VJ.ceil(e)}function Fn(e,t){return e=Fr(e),zh(VJ.count(VP(e),e)+(4===VP(e).getUTCDay()),t,2)}function Fi(e){return e.getUTCDay()}function Fs(e,t){return zh(VY.count(VP(e)-1,e),t,2)}function Fo(e,t){return zh(e.getUTCFullYear()%100,t,2)}function Fa(e,t){return zh((e=Fr(e)).getUTCFullYear()%100,t,2)}function Fl(e,t){return zh(e.getUTCFullYear()%1e4,t,4)}function Fu(e,t){var r=e.getUTCDay();return zh((e=r>=4||0===r?VJ(e):VJ.ceil(e)).getUTCFullYear()%1e4,t,4)}function Fc(){return"+0000"}function Fh(){return"%"}function Fd(e){return+e}function Ff(e){return Math.floor(e/1e3)}function Fp(e){return new Date(e)}function Fm(e){return e instanceof Date?+e:+new Date(+e)}function Fg(e,t,r,n,i,s,o,a,l,u){var c=LA(),h=c.invert,d=c.domain,f=u(".%L"),p=u(":%S"),m=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),y=u("%b %d"),b=u("%B"),w=u("%Y");function x(e){return(l(e)<e?f:a(e)<e?p:o(e)<e?m:s(e)<e?g:n(e)<e?i(e)<e?v:y:r(e)<e?b:w)(e)}return c.invert=function(e){return new Date(h(e))},c.domain=function(e){return arguments.length?d(Array.from(e,Fm)):d().map(Fp)},c.ticks=function(t){var r=d();return e(r[0],r[r.length-1],null==t?10:t)},c.tickFormat=function(e,t){return null==t?x:u(t)},c.nice=function(e){var r=d();return e&&"function"==typeof e.range||(e=t(r[0],r[r.length-1],null==e?10:e)),e?d(LQ(r,e)):c},c.copy=function(){return LP(c,Fg(e,t,r,n,i,s,o,a,l,u))},c}function Fv(){return I4.apply(Fg(zt,zr,VE,Vk,VV,VZ,V2,V5,V8,L).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Fy(){return I4.apply(Fg(V9,ze,VP,VA,VK,V0,V3,V4,V8,z).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Fb(){var e,t,r,n,i,s=0,o=1,a=LS,l=!1;function u(t){return null==t||isNaN(t*=1)?i:a(0===r?.5:(t=(n(t)-e)*r,l?Math.max(0,Math.min(1,t)):t))}function c(e){return function(t){var r,n;return arguments.length?([r,n]=t,a=e(r,n),u):[a(0),a(1)]}}return u.domain=function(i){return arguments.length?([s,o]=i,e=n(s*=1),t=n(o*=1),r=e===t?0:1/(t-e),u):[s,o]},u.clamp=function(e){return arguments.length?(l=!!e,u):l},u.interpolator=function(e){return arguments.length?(a=e,u):a},u.range=c(Lv),u.rangeRound=c(Ly),u.unknown=function(e){return arguments.length?(i=e,u):i}
22,function(i){return n=i,e=i(s),t=i(o),r=e===t?0:1/(t-e),u}}function Fw(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Fx(){var e=LG(Fb()(LS));return e.copy=function(){return Fw(e,Fx())},I8.apply(e,arguments)}function FS(){var e=L6(Fb()).domain([1,10]);return e.copy=function(){return Fw(e,FS()).base(e.base())},I8.apply(e,arguments)}function F_(){var e=Vt(Fb());return e.copy=function(){return Fw(e,F_()).constant(e.constant())},I8.apply(e,arguments)}function FM(){var e=Vo(Fb());return e.copy=function(){return Fw(e,FM()).exponent(e.exponent())},I8.apply(e,arguments)}function FO(){return FM.apply(null,arguments).exponent(.5)}function FE(){var e=[],t=LS;function r(r){if(null!=r&&!isNaN(r*=1))return t((DS(e,r,1)-1)/(e.length-1))}return r.domain=function(t){if(!arguments.length)return e.slice();for(let r of(e=[],t))null==r||isNaN(r*=1)||e.push(r);return e.sort(Dp),r},r.interpolator=function(e){return arguments.length?(t=e,r):t},r.range=function(){return e.map((r,n)=>t(n/(e.length-1)))},r.quantiles=function(t){return Array.from({length:t+1},(r,n)=>Vy(e,n/t))},r.copy=function(){return FE(t).domain(e)},I8.apply(r,arguments)}function FP(e,t){void 0===t&&(t=e,e=Lv);for(var r=0,n=t.length-1,i=t[0],s=Array(n<0?0:n);r<n;)s[r]=e(i,i=t[++r]);return function(e){var t=Math.max(0,Math.min(n-1,Math.floor(e*=n)));return s[t](e-t)}}function Fk(){var e,t,r,n,i,s,o,a=0,l=.5,u=1,c=1,h=LS,d=!1;function f(e){return isNaN(e*=1)?o:(e=.5+((e=+s(e))-t)*(c*e<c*t?n:i),h(d?Math.max(0,Math.min(1,e)):e))}function p(e){return function(t){var r,n,i;return arguments.length?([r,n,i]=t,h=FP(e,[r,n,i]),f):[h(0),h(.5),h(1)]}}return f.domain=function(o){return arguments.length?([a,l,u]=o,e=s(a*=1),t=s(l*=1),r=s(u*=1),n=e===t?0:.5/(t-e),i=t===r?0:.5/(r-t),c=t<e?-1:1,f):[a,l,u]},f.clamp=function(e){return arguments.length?(d=!!e,f):d},f.interpolator=function(e){return arguments.length?(h=e,f):h},f.range=p(Lv),f.rangeRound=p(Ly),f.unknown=function(e){return arguments.length?(o=e,f):o},function(o){return s=o,e=o(a),t=o(l),r=o(u),n=e===t?0:.5/(t-e),i=t===r?0:.5/(r-t),c=t<e?-1:1,f}}function FA(){var e=LG(Fk()(LS));return e.copy=function(){return Fw(e,FA())},I8.apply(e,arguments)}function Fj(){var e=L6(Fk()).domain([.1,1,10]);return e.copy=function(){return Fw(e,Fj()).base(e.base())},I8.apply(e,arguments)}function FC(){var e=Vt(Fk());return e.copy=function(){return Fw(e,FC()).constant(e.constant())},I8.apply(e,arguments)}function FN(){var e=Vo(Fk());return e.copy=function(){return Fw(e,FN()).exponent(e.exponent())},I8.apply(e,arguments)}function FT(){return FN.apply(null,arguments).exponent(.5)}(function e(e){return L=(D=zo(e)).format,V=D.parse,z=D.utcFormat,F=D.utcParse})({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),e.s(["scaleBand",0,Di,"scaleDiverging",0,FA,"scaleDivergingLog",0,Fj,"scaleDivergingPow",0,FN,"scaleDivergingSqrt",0,FT,"scaleDivergingSymlog",0,FC,"scaleIdentity",0,LX,"scaleImplicit",0,Dr,"scaleLinear",0,LJ,"scaleLog",0,L7,"scaleOrdinal",0,Dn,"scalePoint",0,Do,"scalePow",0,Va,"scaleQuantile",0,Vw,"scaleQuantize",0,Vx,"scaleRadial",0,Vh,"scaleSequential",0,Fx,"scaleSequentialLog",0,FS,"scaleSequentialPow",0,FM,"scaleSequentialQuantile",0,FE,"scaleSequentialSqrt",0,FO,"scaleSequentialSymlog",0,F_,"scaleSqrt",0,Vl,"scaleSymlog",0,Vr,"scaleThreshold",0,VS,"scaleTime",0,Fv,"scaleUtc",0,Fy,"tickFormat",0,Lq],289717),e.i(289717),e.s(["scaleBand",0,Di,"scaleDiverging",0,FA,"scaleDivergingLog",0,Fj,"scaleDivergingPow",0,FN,"scaleDivergingSqrt",0,FT,"scaleDivergingSymlog",0,FC,"scaleIdentity",0,LX,"scaleImplicit",0,Dr,"scaleLinear",0,LJ,"scaleLog",0,L7,"scaleOrdinal",0,Dn,"scalePoint",0,Do,"scalePow",0,Va,"scaleQuantile",0,Vw,"scaleQuantize",0,Vx,"scaleRadial",0,Vh,"scaleSequential",0,Fx,"scaleSequentialLog",0,FS,"scaleSequentialPow",0,FM,"scaleSequentialQuantile",0,FE,"scaleSequentialSqrt",0,FO,"scaleSequentialSymlog",0,F_,"scaleSqrt",0,Vl,"scaleSymlog",0,Vr,"scaleThreshold",0,VS,"scaleTime",0,Fv,"scaleUtc",0,Fy,"tickFormat",0,Lq],778776);var FR=e.i(778776),FI=e=>e.chartData,FD=Cg([FI],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),FL=(e,t,r,n)=>n?FD(e):FI(e),FV=(e,t,r)=>r?FD(e):FI(e);function Fz(e){if(Array.isArray(e)&&2===e.length){var[t,r]=e;if(Pg(t)&&Pg(r))return!0}return!1}function FF(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function FB(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var r,n,[i,s]=e;if(Pg(i))r=i;else if("function"==typeof i)return;if(Pg(s))n=s;else if("function"==typeof s)return;var o=[r,n];if(Fz(o))return o}}function F$(e,t,r){if(r||null!=t){if("function"==typeof e&&null!=t)try{var n=e(t,r);
22if(Fz(n))return FF(n,t,r)}catch(e){}if(Array.isArray(e)&&2===e.length){var i,s,[o,a]=e;if("auto"===o)null!=t&&(i=Math.min(...t));else if(E2(o))i=o;else if("function"==typeof o)try{null!=t&&(i=o(null==t?void 0:t[0]))}catch(e){}else if("string"==typeof o&&PV.test(o)){var l=PV.exec(o);if(null==l||null==l[1]||null==t)i=void 0;else{var u=+l[1];i=t[0]-u}}else i=null==t?void 0:t[0];if("auto"===a)null!=t&&(s=Math.max(...t));else if(E2(a))s=a;else if("function"==typeof a)try{null!=t&&(s=a(null==t?void 0:t[1]))}catch(e){}else if("string"==typeof a&&Pz.test(a)){var c=Pz.exec(a);if(null==c||null==c[1]||null==t)s=void 0;else{var h=+c[1];s=t[1]+h}}else s=null==t?void 0:t[1];var d=[i,s];if(Fz(d))return null==t?d:FF(d,t,r)}}}var FU=e.i(560600),FW=FU;function FH(e){return 0===e?1:Math.floor(new FW.default(e).abs().log(10).toNumber())+1}function FK(e,t,r){for(var n=new FW.default(e),i=0,s=[];n.lt(t)&&i<1e5;)s.push(n.toNumber()),n=n.add(r),i++;return s}var FY=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},Fq=(e,t,r)=>{if(e.lte(0))return new FU.default(0);var n=FH(e.toNumber()),i=new FU.default(10).pow(n),s=e.div(i),o=1!==n?.05:.1,a=new FU.default(Math.ceil(s.div(o).toNumber())).add(r).mul(o).mul(i);return new FU.default(t?a.toNumber():Math.ceil(a.toNumber()))},FG=(e,t,r)=>{var n=new FU.default(1),i=new FU.default(e);if(!i.isint()&&r){var s=Math.abs(e);s<1?(n=new FU.default(10).pow(FH(e)-1),i=new FU.default(Math.floor(i.div(n).toNumber())).mul(n)):s>1&&(i=new FU.default(Math.floor(e)))}else 0===e?i=new FU.default(Math.floor((t-1)/2)):r||(i=new FU.default(Math.floor(e)));for(var o=Math.floor((t-1)/2),a=[],l=0;l<t;l++)a.push(i.add(new FU.default(l-o).mul(n)).toNumber());return a},FJ=function(e,t,r,n){var i,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new FU.default(0),tickMin:new FU.default(0),tickMax:new FU.default(0)};var o=Fq(new FU.default(t).sub(e).div(r-1),n,s),a=Math.ceil((i=e<=0&&t>=0?new FU.default(0):(i=new FU.default(e).add(t).div(2)).sub(new FU.default(i).mod(o))).sub(e).div(o).toNumber()),l=Math.ceil(new FU.default(t).sub(i).div(o).toNumber()),u=a+l+1;return u>r?FJ(e,t,r,n,s+1):(u<r&&(l=t>0?l+(r-u):l,a=t>0?a:a+(r-u)),{step:o,tickMin:i.sub(new FU.default(a).mul(o)),tickMax:i.add(new FU.default(l).mul(o))})},FX=function(e){var[t,r]=e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=Math.max(n,2),[o,a]=FY([t,r]);if(o===-1/0||a===1/0){var l=a===1/0?[o,...Array(n-1).fill(1/0)]:[...Array(n-1).fill(-1/0),a];return t>r?l.reverse():l}if(o===a)return FG(o,n,i);var{step:u,tickMin:c,tickMax:h}=FJ(o,a,s,i,0),d=FK(c,h.add(new FU.default(.1).mul(u)),u);return t>r?d.reverse():d},FQ=function(e,t){var[r,n]=e,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],[s,o]=FY([r,n]);if(s===-1/0||o===1/0)return[r,n];if(s===o)return[s];var a=Math.max(t,2),l=Fq(new FU.default(o).sub(s).div(a-1),i,0),u=[...FK(new FU.default(s),new FU.default(o),l),o];return!1===i&&(u=u.map(e=>Math.round(e))),r>n?u.reverse():u},FZ=e=>e.rootProps.maxBarSize,F0=e=>e.rootProps.barGap,F1=e=>e.rootProps.barCategoryGap,F2=e=>e.rootProps.barSize,F3=e=>e.rootProps.stackOffset,F5=e=>e.rootProps.reverseStackOrder,F4=e=>e.options.chartName,F8=e=>e.rootProps.syncId,F6=e=>e.rootProps.syncMethod,F7=e=>e.options.eventEmitter,F9=e=>e.rootProps.baseValue,Be=(e,t)=>t,Bt=(e,t,r)=>r;function Br(e){return null==e?void 0:e.id}function Bn(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:s}=r,o=new Map;return e.forEach(e=>{var t,r=null!=(t=e.data)?t:n;if(null!=r&&0!==r.length){var a=Br(e);r.forEach((t,r)=>{var n,l=null==s||i?r:String(P_(t,s,null)),u=P_(t,e.dataKey,0);Object.assign(n=o.has(l)?o.get(l):{},{[a]:u}),o.set(l,n)})}}),Array.from(o.values())}function Bi(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}var Bs=(e,t)=>e===t||null!=e&&null!=t&&e[0]===t[0]&&e[1]===t[1],Bo=e=>{var t=TN(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},Ba=e=>e.tooltip.settings.axisId,Bl=FR;function Bu(e){if(e in Bl)return Bl[e]();var t="scale".concat(Pt(e));if(t in Bl)return Bl[t]()}function Bc(e){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],r=i[1];return t<=r?e>=t&&e<=r:e>=r&&e<=t},bandwidth:r?()=>r.call(e):void 0,ticks:t?r=>t.call(e,r):void 0,map:(t,r)=>{var n=e(t);if(null!=n){if(e.bandwidth&&null!=r&&r.position){var i=e.bandwidth();switch(r.position){case"middle":n+=i/2;break;case"end":n+=i}}return n}}}}function Bh(e,t,r){if("function"==typeof e)return Bc(e.copy().domain(t).range(r));if(null!=e){var n=Bu(e);if(null!=n)return n.domain(t).range(r),Bc(n)}}var Bd=(e,t)=>{if(null!=t)if("linear"!==e)return t;else{if(!Fz(t)){for(var r,n,i=0;i<t.length;i++){var s=t[i];Pg(s)&&((void 0===r||s<r)&&(r=s),(void 0===n||s>n)&&(n=s))}return void 0!==r&&void 0!==n?[r,n]:void 0}return t}};function Bf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Bp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?Bf(Object(r),!0).forEach(function(t){Bm(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bf(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Bm(e,t,r){return(t=Bg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bg(e){var t=Bv(e,"string");return"symbol"==typeof t?t:t+""}function Bv(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var By=[0,"auto"],Bb={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},Bw=(e,t)=>e.cartesianAxis.xAxis[t],Bx=(e,t)=>{var r=Bw(e,t);return null==r?Bb:r},BS={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:By,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:NG},B_=(e,t)=>e.cartesianAxis.yAxis[t],BM=(e,t)=>{var r=B_(e,t);return null==r?BS:r},BO={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},BE=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return null==r?BO:r},BP=(e,t,r)=>{switch(t){case"xAxis":return Bx(e,r);case"yAxis":return BM(e,r);case"zAxis":return BE(e,r);case"angleAxis":return TJ(e,r);case"radiusAxis":return TX(e,r);default:throw Error("Unexpected axis type: ".concat(t))}},Bk=(e,t,r)=>{switch(t){case"xAxis":return Bx(e,r);case"yAxis":return BM(e,r);default:throw Error("Unexpected axis type: ".concat(t))}},BA=(e,t,r)=>{switch(t){case"xAxis":return Bx(e,r);case"yAxis":return BM(e,r);case"angleAxis":return TJ(e,r);case"radiusAxis":return TX(e,r);default:throw Error("Unexpected axis type: ".concat(t))}},Bj=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function BC(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var BN=e=>e.graphicalItems.cartesianItems,BT=Cg([Be,Bt],BC),BR=(e,t,r)=>e.filter(r).filter(e=>(null==t?void 0:t.includeHidden)===!0||!e.hide),BI=Cg([BN,BP,BT],BR,{memoizeOptions:{resultEqualityCheck:T6}}),BD=Cg([BI],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(Bi)),BL=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),BV=Cg([BI],BL),Bz=e=>e.map(e=>e.data).filter(Boolean).flat(1),BF=Cg([BI],Bz,{memoizeOptions:{resultEqualityCheck:T6}}),BB=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},B$=Cg([BF,FL],BB),BU=(e,t,r)=>(null==t?void 0:t.dataKey)!=null?e.map(e=>({value:P_(e,t.dataKey)})):r.length>0?r.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:P_(e,t)}))):e.map(e=>({value:e})),BW=Cg([B$,BP,BI],BU);function BH(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}function BK(e){if(E3(e)||e instanceof Date){var t=Number(e);if(Pg(t))return t}}function BY(e){if(Array.isArray(e)){var t=[BK(e[0]),BK(e[1])];return Fz(t)?t:void 0}var r=BK(e);if(null!=r)return[r,r]}function Bq(e){return e.map(BK).filter(Pr)}function BG(e,t,r){return!r||"number"!=typeof t||E0(t)||!r.length?[]:Bq(r.flatMap(r=>{var n,i,s=P_(e,r.dataKey);if(Array.isArray(s)?[n,i]=s:n=i=s,Pg(n)&&Pg(i))return[t-n,t+i]}))}
22var BJ=e=>{var t=Bo(e),r=Ba(e);return BA(e,t,r)},BX=Cg([BJ],e=>null==e?void 0:e.dataKey),BQ=Cg([BD,FL,BJ],Bn),BZ=(e,t,r,n)=>{var i={};return Object.fromEntries(Object.entries(t.reduce((e,t)=>{if(null==t.stackId)return e;var r=e[t.stackId];return null==r&&(r=[]),r.push(t),e[t.stackId]=r,e},i)).map(t=>{var[i,s]=t,o=n?[...s].reverse():s;return[i,{stackedData:Pj(e,o.map(Br),r),graphicalItems:o}]}))},B0=Cg([BQ,BD,F3,F5],BZ),B1=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:s}=t;if(null==n&&"zAxis"!==r){var o=PL(e,i,s);if(null==o||0!==o[0]||0!==o[1])return o}},B2=Cg([BP],e=>e.allowDataOverflow),B3=e=>{var t;if(null==e||!("domain"in e))return By;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var r=Bq(e.ticks);return[Math.min(...r),Math.max(...r)]}if("category"===e.type)return e.ticks.map(String)}return null!=(t=null==e?void 0:e.domain)?t:By},B5=Cg([BP],B3),B4=Cg([B5,B2],FB),B8=Cg([B0,FI,Be,B4],B1,{memoizeOptions:{resultEqualityCheck:Bs}}),B6=e=>e.errorBars,B7=(e,t,r)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>BH(r,e)),B9=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(Boolean);if(0!==n.length){var i=n.flat(),s=Math.min(...i),o=Math.max(...i);return[s,o]}},$e=(e,t,r,n,i)=>{var s,o;if(r.length>0&&e.forEach(e=>{r.forEach(r=>{var a,l,u=null==(a=n[r.id])?void 0:a.filter(e=>BH(i,e)),c=P_(e,null!=(l=t.dataKey)?l:r.dataKey),h=BG(e,c,u);if(h.length>=2){var d=Math.min(...h),f=Math.max(...h);(null==s||d<s)&&(s=d),(null==o||f>o)&&(o=f)}var p=BY(c);null!=p&&(s=null==s?p[0]:Math.min(s,p[0]),o=null==o?p[1]:Math.max(o,p[1]))})}),(null==t?void 0:t.dataKey)!=null&&e.forEach(e=>{var r=BY(P_(e,t.dataKey));null!=r&&(s=null==s?r[0]:Math.min(s,r[0]),o=null==o?r[1]:Math.max(o,r[1]))}),Pg(s)&&Pg(o))return[s,o]},$t=Cg([B$,BP,BV,B6,Be],$e,{memoizeOptions:{resultEqualityCheck:Bs}});function $r(e){var{value:t}=e;if(E3(t)||t instanceof Date)return t}var $n=(e,t,r)=>{var n=e.map($r).filter(e=>null!=e);return r&&(null==t.dataKey||t.allowDuplicatedCategory&&E6(n))?(0,I3.default)(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},$i=e=>e.referenceElements.dots,$s=(e,t,r)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===r:e.yAxisId===r),$o=Cg([$i,Be,Bt],$s),$a=e=>e.referenceElements.areas,$l=Cg([$a,Be,Bt],$s),$u=e=>e.referenceElements.lines,$c=Cg([$u,Be,Bt],$s),$h=(e,t)=>{if(null!=e){var r=Bq(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},$d=Cg($o,Be,$h),$f=(e,t)=>{if(null!=e){var r=Bq(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},$p=Cg([$l,Be],$f);function $m(e){if(null!=e.x)return Bq([e.x]);var t,r=null==(t=e.segment)?void 0:t.map(e=>e.x);return null==r||0===r.length?[]:Bq(r)}function $g(e){if(null!=e.y)return Bq([e.y]);var t,r=null==(t=e.segment)?void 0:t.map(e=>e.y);return null==r||0===r.length?[]:Bq(r)}var $v=(e,t)=>{if(null!=e){var r=e.flatMap(e=>"xAxis"===t?$m(e):$g(e));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},$y=Cg([$c,Be],$v),$b=Cg($d,$y,$p,(e,t,r)=>B9(e,r,t)),$w=(e,t,r,n,i,s,o,a)=>null!=r?r:F$(t,"vertical"===o&&"xAxis"===a||"horizontal"===o&&"yAxis"===a?B9(n,s,i):B9(s,i),e.allowDataOverflow),$x=Cg([BP,B5,B4,B8,$t,$b,TN,Be],$w,{memoizeOptions:{resultEqualityCheck:Bs}}),$S=[0,1],$_=(e,t,r,n,i,s,o)=>{if(null!=e&&null!=r&&0!==r.length||void 0!==o){var a,{dataKey:l,type:u}=e,c=PO(t,s);return c&&null==l?(0,I3.default)(0,null!=(a=null==r?void 0:r.length)?a:0):"category"===u?$n(n,e,c):"expand"===i?$S:o}},$M=Cg([BP,TN,B$,BW,F3,Be,$x],$_);function $O(e){return e in FR}var $E=(e,t,r)=>{if(null!=e){var{scale:n,type:i}=e;if("auto"===n)return"category"===i&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>
22=0||r.indexOf("ComposedChart")>=0&&!t)?"point":"category"===i?"band":"linear";if("string"==typeof n){var s="scale".concat(Pt(n));return $O(s)?s:"point"}}},$P=Cg([BP,Bj,F4],$E);function $k(e,t,r,n){if(null!=r&&null!=n)return"function"==typeof e.scale?Bh(e.scale,r,n):Bh(t,r,n)}var $A=(e,t,r)=>{var n=B3(t);if("auto"===r||"linear"===r){if(null!=t&&t.tickCount&&Array.isArray(n)&&("auto"===n[0]||"auto"===n[1])&&Fz(e))return FX(e,t.tickCount,t.allowDecimals);if(null!=t&&t.tickCount&&"number"===t.type&&Fz(e))return FQ(e,t.tickCount,t.allowDecimals)}},$j=Cg([$M,BA,$P],$A),$C=(e,t,r,n)=>{if("angleAxis"!==n&&(null==e?void 0:e.type)==="number"&&Fz(t)&&Array.isArray(r)&&r.length>0){var i,s;return[Math.min(t[0],null!=(i=r[0])?i:0),Math.max(t[1],null!=(s=r[r.length-1])?s:0)]}return t},$N=Cg([BP,$M,$j,Be],$C),$T=Cg(BW,BP,(e,t)=>{if(t&&"number"===t.type){var r=1/0,n=Array.from(Bq(e.map(e=>e.value))).sort((e,t)=>e-t),i=n[0],s=n[n.length-1];if(null==i||null==s)return 1/0;var o=s-i;if(0===o)return 1/0;for(var a=0;a<n.length-1;a++){var l=n[a],u=n[a+1];if(null!=l&&null!=u){var c=u-l;r=Math.min(r,c)}}return r/o}}),$R=Cg($T,TN,F1,N1,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!Pg(e))return 0;var s="vertical"===t?n.height:n.width;if("gap"===i)return e*s/2;if("no-gap"===i){var o=E8(r,e*s),a=e*s/2;return a-o-(a-o)/s*o}return 0}),$I=(e,t,r)=>{var n=Bx(e,t);return null==n||"string"!=typeof n.padding?0:$R(e,"xAxis",t,r,n.padding)},$D=(e,t,r)=>{var n=BM(e,t);return null==n||"string"!=typeof n.padding?0:$R(e,"yAxis",t,r,n.padding)},$L=Cg(Bx,$I,(e,t)=>{if(null==e)return{left:0,right:0};var r,n,{padding:i}=e;return"string"==typeof i?{left:t,right:t}:{left:(null!=(r=i.left)?r:0)+t,right:(null!=(n=i.right)?n:0)+t}}),$V=Cg(BM,$D,(e,t)=>{if(null==e)return{top:0,bottom:0};var r,n,{padding:i}=e;return"string"==typeof i?{top:t,bottom:t}:{top:(null!=(r=i.top)?r:0)+t,bottom:(null!=(n=i.bottom)?n:0)+t}}),$z=Cg([N1,$L,N7,N6,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:s}=n;return i?[s.left,r.width-s.right]:[e.left+t.left,e.left+e.width-t.right]}),$F=Cg([N1,TN,$V,N7,N6,(e,t,r)=>r],(e,t,r,n,i,s)=>{var{padding:o}=i;return s?[n.height-o.bottom,o.top]:"horizontal"===t?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),$B=(e,t,r,n)=>{var i;switch(t){case"xAxis":return $z(e,r,n);case"yAxis":return $F(e,r,n);case"zAxis":return null==(i=BE(e,r))?void 0:i.range;case"angleAxis":return T2(e);case"radiusAxis":return T3(e,r);default:return}},$$=Cg([BP,$B],TB),$U=Cg([$P,$N],Bd),$W=Cg([BP,$P,$U,$$],$k);function $H(e,t){return e.id<t.id?-1:+(e.id>t.id)}Cg([BI,B6,Be],B7);var $K=(e,t)=>t,$Y=(e,t,r)=>r,$q=Cg(NH,$K,$Y,(e,t,r)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===r).sort($H)),$G=Cg(NK,$K,$Y,(e,t,r)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===r).sort($H)),$J=(e,t)=>({width:e.width,height:t.height}),$X=(e,t)=>({width:"number"==typeof t.width?t.width:NG,height:e.height}),$Q=Cg(N1,Bx,$J),$Z=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},$0=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},$1=Cg(N$,N1,$q,$K,$Y,(e,t,r,n,i)=>{var s,o={};return r.forEach(r=>{var a=$J(t,r);null==s&&(s=$Z(t,n,e));var l="top"===n&&!i||"bottom"===n&&i;o[r.id]=s-Number(l)*a.height,s+=(l?-1:1)*a.height}),o}),$2=Cg(NB,N1,$G,$K,$Y,(e,t,r,n,i)=>{var s,o={};return r.forEach(r=>{var a=$X(t,r);null==s&&(s=$0(t,n,e));var l="left"===n&&!i||"right"===n&&i;o[r.id]=s-Number(l)*a.width,s+=(l?-1:1)*a.width}),o}),$3=(e,t)=>{var r=Bx(e,t);if(null!=r)return $1(e,r.orientation,r.mirror)},$5=Cg([N1,Bx,$3,(e,t)=>t],(e,t,r,n)=>{if(null!=t){var i=null==r?void 0:r[n];return null==i?{x:e.left,y:0}:{x:e.left,y:i}}}),$4=(e,t)=>{var r=BM(e,t);if(null!=r)return $2(e,r.orientation,r.mirror)},$8=Cg([N1,BM,$4,(e,t)=>t],(e,t,r,n)=>{if(null!=t){var i=null==r?void 0:r[n];return null==i?{x:0,y:e.top}:{x:i,y:e.top}}}),$6=Cg(N1,BM,(e,t)=>({width:"number"==typeof t.width?t.width:NG,height:e.height})),$7=(e,t,r)=>{switch(t){case"xAxis":return $Q(e,r).width;case"yAxis":return $6(e,r).height;default:return}},$9=(e,t,r,n)=>{if(null!=r){var{allowDuplicatedCategory:i,type:s,dataKey:o}=r,a=PO(e,n),l=t.map(e=>e.value);if(o&&a&&"category"===s&&i&&E6(l))return l}},Ue=Cg([TN,BW,BP,Be],$9),Ut=(e,t,r,n)=>{if(null!=r&&null!=r.dataKey){var{type:i,scale:s}=r,o=PO(e,n);if(o&&("number"===i||"auto"!==s))return t.map(e=>e.value)}},Ur=Cg([TN,BW,BA,Be],Ut),Un=Cg([TN,Bk,$P,$W,Ue,Ur,$B,$j,Be],(e,t,r,n,i,s,o,a,l)=>{if(null!=t){var u=PO(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:s,duplicateDomain:i,isCategorical:u,niceTicks:a,range:o,realScaleType:r,scale:n}}}),Ui=Cg([TN,BA,$P,$W,$j,$B,Ue,Ur,Be],(e,t,r,n,i,s,o,a,l)=>{if(null!=t&&null!=n){var u=PO(e,l),{type:c,ticks:h,tickCount:d}=t,f="scaleBand"===r&&"function"==typeof n.bandwidth?n.bandwidth()/2:2,p="category"===c&&n.bandwidth?n.bandwidth()/f:0;p="angleAxis"===l&&null!=s&&s.length>=2?2*EZ(s[0]-s[1])*p:p;var m=h||i;return m?m.map((e,t)=>{var r=o?o.indexOf(e):e,i=n.map(r);return Pg(i)?{index:t,coordinate:i+p,value:e,offset:p}:null}).filter(Pr):u&&a?a.map((e,t)=>{var r=n.map(e);return Pg(r)?{coordinate:r+p,value:e,index:t,offset:p}:null}).filter(Pr):n.ticks?n.ticks(d).map((e,t)=>{var r=n.map(e);return Pg(r)?{coordinate:r+p,value:e,index:t,offset:p}:null}).filter(Pr):n.domain().map((e,t)=>{var r=n.map(e);return Pg(r)?{coordinate:r+p,value:o?o[e]:e,index:t,offset:p}:null}).filter(Pr)}}),Us=Cg([TN,BA,$W,$B,Ue,Ur,Be],(e,t,r,n,i,s,o)=>
22{if(null!=t&&null!=r&&null!=n&&n[0]!==n[1]){var a=PO(e,o),{tickCount:l}=t,u=0;return(u="angleAxis"===o&&(null==n?void 0:n.length)>=2?2*EZ(n[0]-n[1])*u:u,a&&s)?s.map((e,t)=>{var n=r.map(e);return Pg(n)?{coordinate:n+u,value:e,index:t,offset:u}:null}).filter(Pr):r.ticks?r.ticks(l).map((e,t)=>{var n=r.map(e);return Pg(n)?{coordinate:n+u,value:e,index:t,offset:u}:null}).filter(Pr):r.domain().map((e,t)=>{var n=r.map(e);return Pg(n)?{coordinate:n+u,value:i?i[e]:e,index:t,offset:u}:null}).filter(Pr)}}),Uo=Cg(BP,$W,(e,t)=>{if(null!=e&&null!=t)return Bp(Bp({},e),{},{scale:t})}),Ua=Cg([BP,$P,$M,$$],$k);Cg((e,t,r)=>BE(e,r),Ua,(e,t)=>{if(null!=e&&null!=t)return Bp(Bp({},e),{},{scale:t})});var Ul=Cg([TN,NH,NK],(e,t,r)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),Uu=["x1","y1","x2","y2","key"],Uc=["offset"],Uh=["xAxisId","yAxisId"],Ud=["xAxisId","yAxisId"];function Uf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Up(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uf(Object(r),!0).forEach(function(t){Um(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uf(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Um(e,t,r){return(t=Ug(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ug(e){var t=Uv(e,"string");return"symbol"==typeof t?t:t+""}function Uv(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Uy(){return(Uy=Object.assign.bind()).apply(null,arguments)}function Ub(e,t){if(null==e)return{};var r,n,i=Uw(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Uw(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var Ux=e=>{var{fill:t}=e;if(!t||"none"===t)return null;var{fillOpacity:r,x:n,y:i,width:s,height:o,ry:a}=e;return EK.createElement("rect",{x:n,y:i,ry:a,width:s,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function US(e){var{option:t,lineItemProps:r}=e;if(EK.isValidElement(t))n=EK.cloneElement(t,r);else if("function"==typeof t)n=t(r);else{var n,i,{x1:s,y1:o,x2:a,y2:l,key:u}=r,c=null!=(i=kk(Ub(r,Uu)))?i:{},{offset:h}=c,d=Ub(c,Uc);n=EK.createElement("line",Uy({},d,{x1:s,y1:o,x2:a,y2:l,fill:"none",key:u}))}return n}function U_(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:s,yAxisId:o}=e,a=Ub(e,Uh),l=i.map((e,i)=>{var s=Up(Up({},a),{},{x1:t,y1:e,x2:t+r,y2:e,key:"line-".concat(i),index:i});return EK.createElement(US,{key:"line-".concat(i),option:n,lineItemProps:s})});return EK.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function UM(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:s,yAxisId:o}=e,a=Ub(e,Ud),l=i.map((e,i)=>{var s=Up(Up({},a),{},{x1:e,y1:t,x2:e,y2:t+r,key:"line-".concat(i),index:i});return EK.createElement(US,{option:n,lineItemProps:s,key:"line-".concat(i)})});return EK.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function UO(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:s,height:o,horizontalPoints:a,horizontal:l=!0}=e;if(!l||!t||!t.length||null==a)return null;var u=a.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==u[0]&&u.unshift(0);var c=u.map((e,a)=>{var l=u[a+1],c=null==l?i+o-e:l-e;if(c<=0)return null;var h=a%t.length;return EK.createElement("rect",{key:"react-".concat(a),y:e,x:n,height:c,width:s,stroke:"none",fill:t[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return EK.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function UE(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:s,width:o,height:a,verticalPoints:l}=e;if(!t||!r||!r.length)return null;var u=l.map(e=>Math.round(e+i-i)).sort((e,t)=>
22e-t);i!==u[0]&&u.unshift(0);var c=u.map((e,t)=>{var l=u[t+1],c=null==l?i+o-e:l-e;if(c<=0)return null;var h=t%r.length;return EK.createElement("rect",{key:"react-".concat(t),x:e,y:s,width:c,height:a,stroke:"none",fill:r[h],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return EK.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var UP=(e,t)=>{var{xAxis:r,width:n,height:i,offset:s}=e;return PE(km(Up(Up(Up({},Iq),r),{},{ticks:PP(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),s.left,s.left+s.width,t)},Uk=(e,t)=>{var{yAxis:r,width:n,height:i,offset:s}=e;return PE(km(Up(Up(Up({},Iq),r),{},{ticks:PP(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),s.top,s.top+s.height,t)},UA={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:TV.grid};function Uj(e){var t=Tj(),r=TC(),n=TA(),i=Up(Up({},k9(e,UA)),{},{x:E2(e.x)?e.x:n.left,y:E2(e.y)?e.y:n.top,width:E2(e.width)?e.width:n.width,height:E2(e.height)?e.height:n.height}),{xAxisId:s,yAxisId:o,x:a,y:l,width:u,height:c,syncWithTicks:h,horizontalValues:d,verticalValues:f}=i,p=N8(),m=AU(e=>Un(e,"xAxis",s,p)),g=AU(e=>Un(e,"yAxis",o,p));if(!Pv(u)||!Pv(c)||!E2(a)||!E2(l))return null;var v=i.verticalCoordinatesGenerator||UP,y=i.horizontalCoordinatesGenerator||Uk,{horizontalPoints:b,verticalPoints:w}=i;if((!b||!b.length)&&"function"==typeof y){var x=d&&d.length,S=y({yAxis:g?Up(Up({},g),{},{ticks:x?d:g.ticks}):void 0,width:null!=t?t:u,height:null!=r?r:c,offset:n},!!x||h);Eq(Array.isArray(S),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof S,"]")),Array.isArray(S)&&(b=S)}if((!w||!w.length)&&"function"==typeof v){var _=f&&f.length,M=v({xAxis:m?Up(Up({},m),{},{ticks:_?f:m.ticks}):void 0,width:null!=t?t:u,height:null!=r?r:c,offset:n},!!_||h);Eq(Array.isArray(M),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof M,"]")),Array.isArray(M)&&(w=M)}return EK.createElement(R9,{zIndex:i.zIndex},EK.createElement("g",{className:"recharts-cartesian-grid"},EK.createElement(Ux,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),EK.createElement(UO,Uy({},i,{horizontalPoints:b})),EK.createElement(UE,Uy({},i,{verticalPoints:w})),EK.createElement(U_,Uy({},i,{offset:n,horizontalPoints:b,xAxis:m,yAxis:g})),EK.createElement(UM,Uy({},i,{offset:n,verticalPoints:w,xAxis:m,yAxis:g}))))}Uj.displayName="CartesianGrid";var UC=e=>null;UC.displayName="Cell";var UN=ex,UT=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!E0(r))return e[r]}},UR=C0({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),UI=UR.reducer,{createEventEmitter:UD}=UR.actions,UL=ex,UV=ex,Uz=ex;function UF(e){e()}function UB(){let e=null,t=null;return{clear(){e=null,t=null},notify(){UF(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){let t=[],r=e;for(;r;)t.push(r),r=r.next;return t},subscribe(r){let n=!0,i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){n&&null!==e&&(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}e.i(264675);var U$={notify(){},get:()=>[]};function UU(e,t){let r,n=U$,i=0,s=!1;function o(){u.onStateChange&&u.onStateChange()}function a(){i++,r||(r=t?t.addNestedSub(o):e.subscribe(o),n=UB())}function l(){i--,r&&0===i&&(r(),r=void 0,n.clear(),n=U$)}let u={addNestedSub:function(e){a();let t=n.subscribe(e),r=!1;return()=>{r||(r=!0,t(),l())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return s},trySubscribe:function(){s||(s=!0,a())},tryUnsubscribe:function(){s&&(s=!1,l())},getListeners:()=>n};return u}var UW="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,UH="u">typeof navigator&&"ReactNative"===navigator.product,UK=UW||UH?Uz.useLayoutEffect:Uz.useEffect;function UY(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Uq(e,t){if(UY(e,t))return!0;
22if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!UY(e[r[n]],t[r[n]]))return!1;return!0}var UG=Symbol.for("react-redux-context"),UJ="u">typeof globalThis?globalThis:{},UX=function(){if(!Uz.createContext)return{};let e=UJ[UG]??=new Map,t=e.get(Uz.createContext);return t||(t=Uz.createContext(null),e.set(Uz.createContext,t)),t}(),UQ=function(e){let{children:t,context:r,serverState:n,store:i}=e,s=Uz.useMemo(()=>{let e=UU(i);return{store:i,subscription:e,getServerState:n?()=>n:void 0}},[i,n]),o=Uz.useMemo(()=>i.getState(),[i]);UK(()=>{let{subscription:e}=s;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[s,o]);let a=r||UX;return Uz.createElement(a.Provider,{value:s},t)};function UZ(e=UX){return function(){return Uz.useContext(e)}}var U0=UZ(),U1={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},U2=C0({name:"tooltip",initialState:{itemInteraction:{click:U1,hover:U1},axisInteraction:{click:U1,hover:U1},keyboardInteraction:U1,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(RY(t.payload))},prepare:CF()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=jG(e).tooltipItemPayloads.indexOf(RY(r));i>-1&&(e.tooltipItemPayloads[i]=RY(n))},prepare:CF()},removeTooltipEntrySettings:{reducer(e,t){var r=jG(e).tooltipItemPayloads.indexOf(RY(t.payload));r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:CF()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:U3,replaceTooltipEntrySettings:U5,removeTooltipEntrySettings:U4,setTooltipSettingsState:U8,setActiveMouseOverItemIndex:U6,mouseLeaveItem:U7,mouseLeaveChart:U9,setActiveClickItemIndex:We,setMouseOverAxisIndex:Wt,setMouseClickAxisIndex:Wr,setSyncInteraction:Wn,setKeyboardInteraction:Wi}=U2.actions,Ws=U2.reducer,Wo=C0({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=RY(t.payload),null==t.payload){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;null!=r&&(e.dataStartIndex=r),null!=n&&(e.dataEndIndex=n)}}}),{setChartData:Wa,setDataStartEndIndexes:Wl,setComputedData:Wu}=Wo.actions,Wc=Wo.reducer,Wh=e=>e.options.defaultTooltipEventType,Wd=e=>e.options.validateTooltipEventTypes;function Wf(e,t,r){if(null==e)return t;var n=e?"axis":"item";return null==r?t:r.includes(n)?n:t}function Wp(e,t){return Wf(t,Wh(e),Wd(e))}function Wm(e){return AU(t=>Wp(t,e))}var Wg=(e,t)=>{var r,n=Number(t);if(!E0(n)&&null!=t)return n>=0?null==e||null==(r=e[n])?void 0:r.value:void 0},Wv=e=>e.tooltip.settings;function Wy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Wb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?Wy(Object(r),!0).forEach(function(t){Ww(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wy(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ww(e,t,r){return(t=Wx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wx(e){var t=WS(e,"string");return"symbol"==typeof t?t:t+""}function WS(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function W_(e,t,r){return"axis"===t?"click"===r?e.axisInteraction.click:e.axisInteraction.hover:"click"===r?e.itemInteraction.click:e.itemInteraction.hover}function WM(e){return null!=e.index}var WO=(e,t,r,n)=>{if(null==t)return U1;var i=W_(e,t,r);if(null==i)return U1;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var s=!0===e.settings.active;if(WM(i)){if(s)return Wb(Wb({},i),{},{active:!0})}else if(null!=n)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Wb(Wb({},U1),{},{coordinate:i.coordinate})};function WE(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function WP(e,t){var r=WE(e),n=t[0],i=t[1];if(void 0===r)return!1;var s=Math.min(n,i),o=Math.max(n,i);return r>=s&&r<=o}function Wk(e,t,r){if(null==r||null==t)return!0;var n=P_(e,t);return!(null!=n&&Fz(r))||WP(n,r)}var WA=(e,t,r,n)=>{var i=null==e?void 0:e.index;if(null==i)return null;var s=Number(i);if(!Pg(s))return i;var o=0,a=Infinity;t.length>0&&(a=t.length-1);var l=Math.max(o,Math.min(s,a)),u=t[l];return null==u||Wk(u,r,n)?String(l):null},Wj=(e,t,r,n,i,s,o)=>{if(null!=s){var a=o[0],l=null==a?void 0:a.getPosition(s);if(null!=l)return l;var u=null==i?void 0:i[Number(s)];if(u)if("horizontal"===r)return{x:u.coordinate,y:(n.top+t)/2};else return{x:(n.left+e)/2,y:u.coordinate}}},WC=(e,t,r,n)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];if(null==(i="hover"===r?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId)&&null!=n){var i,s=e.tooltipItemPayloads[0];return null!=s?[s]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null==(t=e.settings)?void 0:t.graphicalItemId)===i})},WN=e=>e.options.tooltipPayloadSearcher,WT=e=>e.tooltip;function WR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function WI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?WR(Object(r),!0).forEach(function(t){WD(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WR(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function WD(e,t,r){return(t=WL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WL(e){var t=WV(e,"string");return"symbol"==typeof t?t:t+""}function WV(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Wz(e,t){return null!=e?e:t}var WF=(e,t,r,n,i,s,o)=>{if(null!=t&&null!=s){var{chartData:a,computedData:l,dataStartIndex:u,dataEndIndex:c}=r,h=[];return e.reduce((e,r)=>{var h,d,f,{dataDefinedOnItem:p,settings:m}=r,g=Wz(p,a),v=Array.isArray(g)?Pm(g,u,c):g,y=null!=(h=null==m?void 0:m.dataKey)?h:n,b=null==m?void 0:m.nameKey;return Array.isArray(d=n&&Array.isArray(v)&&!Array.isArray(v[0])&&"axis"===o?E9(v,n,i):s(v,t,l,b))?d.forEach(t=>{var r=WI(WI({},m),{},{name:t.name,unit:t.unit,color:void 0,fill:void 0});e.push(PB({tooltipEntrySettings:r,dataKey:t.dataKey,payload:t.payload,value:P_(t.payload,t.dataKey),name:t.name}))}):e.push(PB({tooltipEntrySettings:m,dataKey:y,payload:d,value:P_(d,y),name:null!=(f=P_(d,b))?f:null==m?void 0:m.name})),e},h)}},WB=Cg([BJ,Bj,F4],$E),W$=Cg([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),WU=Cg([Bo,Ba],BC),WW=Cg([W$,BJ,WU],BR,{memoizeOptions:{resultEqualityCheck:T6}}),WH=Cg([WW],e=>e.filter(Bi)),WK=Cg([WW],Bz,{memoizeOptions:{resultEqualityCheck:T6}}),WY=Cg([WK,FI],BB),Wq=Cg([WH,FI,BJ],Bn),WG=Cg([WY,BJ,WW],BU),WJ=Cg([BJ],B3),WX=Cg([BJ],e=>e.allowDataOverflow),WQ=Cg([WJ,WX],FB),WZ=Cg([WW],e=>e.filter(Bi)),W0=Cg([Wq,WZ,F3,F5],BZ),W1=Cg([W0,FI,Bo,WQ],B1),W2=Cg([WW],BL),W3=Cg([WY,BJ,W2,B6,Bo],$e,{memoizeOptions:{resultEqualityCheck:Bs}}),W5=Cg([$i,Bo,Ba],$s),W4=Cg([W5,Bo],$h),W8=Cg([$a,Bo,Ba],$s),W6=Cg([W8,Bo],$f),W7=Cg([$u,Bo,Ba],$s),W9=Cg([W7,Bo],$v),He=Cg([W4,W9,W6],B9),Ht=Cg([BJ,WJ,WQ,W1,W3,He,TN,Bo],$w),Hr=Cg([BJ,TN,WY,WG,F3,Bo,Ht],$_),Hn=Cg([Hr,BJ,WB],$A),Hi=Cg([BJ,Hr,Hn,Bo],$C),Hs=e=>{var t=Bo(e),r=Ba(e);return $B(e,t,r,!1)},Ho=Cg([BJ,Hs],TB),Ha=Cg([BJ,WB,Hi,Ho],$k),Hl=Cg([TN,WG,BJ,Bo],$9),Hu=Cg([TN,WG,BJ,Bo],Ut),Hc=Cg([TN,BJ,WB,Ha,Hs,Hl,Hu,Bo],(e,t,r,n,i,s,o,a)=>
22{if(t){var{type:l}=t,u=PO(e,a);if(n){var c="scaleBand"===r&&n.bandwidth?n.bandwidth()/2:2,h="category"===l&&n.bandwidth?n.bandwidth()/c:0;return(h="angleAxis"===a&&null!=i&&(null==i?void 0:i.length)>=2?2*EZ(i[0]-i[1])*h:h,u&&o)?o.map((e,t)=>{var r=n.map(e);return Pg(r)?{coordinate:r+h,value:e,index:t,offset:h}:null}).filter(Pr):n.domain().map((e,t)=>{var r=n.map(e);return Pg(r)?{coordinate:r+h,value:s?s[e]:e,index:t,offset:h}:null}).filter(Pr)}}}),Hh=Cg([Wh,Wd,Wv],(e,t,r)=>Wf(r.shared,e,t)),Hd=e=>e.tooltip.settings.trigger,Hf=e=>e.tooltip.settings.defaultIndex,Hp=Cg([WT,Hh,Hd,Hf],WO),Hm=Cg([Hp,WY,BX,Hr],WA),Hg=Cg([Hc,Hm],Wg),Hv=Cg([Hp],e=>{if(e)return e.dataKey}),Hy=Cg([Hp],e=>{if(e)return e.graphicalItemId}),Hb=Cg([WT,Hh,Hd,Hf],WC),Hw=Cg([NB,N$,TN,N1,Hc,Hf,Hb],Wj),Hx=Cg([Hp,Hw],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),HS=Cg([Hp],e=>{var t;return null!=(t=null==e?void 0:e.active)&&t}),H_=Cg([Hb,Hm,FI,BX,Hg,WN,Hh],WF),HM=Cg([H_],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}}),HO=Pi;function HE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function HP(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?HE(Object(r),!0).forEach(function(t){Hk(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HE(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Hk(e,t,r){return(t=HA(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HA(e){var t=Hj(e,"string");return"symbol"==typeof t?t:t+""}function Hj(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var HC=(e,t,r,n)=>{var i=t.find(e=>e&&e.index===r);if(i){if("horizontal"===e)return{x:i.coordinate,y:n.chartY};if("vertical"===e)return{x:n.chartX,y:i.coordinate}}return{x:0,y:0}},HN=(e,t,r,n)=>{var i=t.find(e=>e&&e.index===r);if(i){if("centric"===e){var s=i.coordinate,{radius:o}=n;return HP(HP(HP({},n),AP(n.cx,n.cy,o,s)),{},{angle:s,radius:o})}var a=i.coordinate,{angle:l}=n;return HP(HP(HP({},n),AP(n.cx,n.cy,a,l)),{},{angle:l,radius:a})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function HT(e,t){var{chartX:r,chartY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var HR=(e,t,r,n,i)=>{var s=null!=(h=null==t?void 0:t.length)?h:0;if(s<=1||null==e)return 0;if("angleAxis"===n&&null!=i&&1e-6>=Math.abs(Math.abs(i[1]-i[0])-360))for(var o=0;o<s;o++){var a=o>0?null==(d=r[o-1])?void 0:d.coordinate:null==(f=r[s-1])?void 0:f.coordinate,l=null==(p=r[o])?void 0:p.coordinate,u=o>=s-1?null==(m=r[0])?void 0:m.coordinate:null==(g=r[o+1])?void 0:g.coordinate,c=void 0;if(null!=a&&null!=l&&null!=u)if(EZ(l-a)!==EZ(u-l)){var h,d,f,p,m,g,v,y=[];if(EZ(u-l)===EZ(i[1]-i[0])){c=u;var b=l+i[1]-i[0];y[0]=Math.min(b,(b+a)/2),y[1]=Math.max(b,(b+a)/2)}else{c=a;var w=u+i[1]-i[0];y[0]=Math.min(l,(w+l)/2),y[1]=Math.max(l,(w+l)/2)}var x=[Math.min(l,(c+l)/2),Math.max(l,(c+l)/2)];if(e>x[0]&&e<=x[1]||e>=y[0]&&e<=y[1])return null==(v=r[o])?void 0:v.index}else{var S,_=Math.min(a,u),M=Math.max(a,u);if(e>(_+l)/2&&e<=(M+l)/2)return null==(S=r[o])?void 0:S.index}}else if(t)for(var O=0;O<s;O++){var E=t[O];if(null!=E){var P=t[O+1],k=t[O-1];if(0===O&&null!=P&&e<=(E.coordinate+P.coordinate)/2||O===s-1&&null!=k&&e>(E.coordinate+k.coordinate)/2||O>0&&O<s-1&&null!=k&&null!=P&&e>(E.coordinate+k.coordinate)/2&&e<=(E.coordinate+P.coordinate)/2)return E.index}}return -1},HI=()=>AU(F4),HD=(e,t)=>t,HL=(e,t,r)=>r,HV=(e,t,r,n)=>n,Hz=Cg(Hc,e=>(0,HO.default)(e,e=>e.coordinate)),HF=Cg([WT,HD,HL,HV],WO),HB=Cg([HF,WY,BX,Hr],WA),H$=(e,t,r)=>{if(null!=t){var n=WT(e);return"axis"===t?"hover"===r?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:"hover"===r?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},HU=Cg([WT,HD,HL,HV],WC),HW=Cg([NB,N$,TN,N1,Hc,HV,HU],Wj),HH=Cg([HF,HW],(e,t)=>{var r;return null!=(r=e.coordinate)?r:t}),HK=Cg([Hc,HB],Wg),HY=Cg([HU,HB,FI,BX,HK,WN,HD],WF),Hq=Cg([HF,HB],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),HG=(e,t,r,n,i,s,o)=>
22{if(e&&r&&n&&i&&HT(e,o)){var a=PU(e,t),l=HR(a,s,i,r,n),u=HC(t,i,l,e);return{activeIndex:String(l),activeCoordinate:u}}},HJ=(e,t,r,n,i,s,o)=>{if(e&&n&&i&&s&&r){var a=AT(e,r);if(a){var l=PW(a,t),u=HR(l,o,s,n,i),c=HN(t,s,u,a);return{activeIndex:String(u),activeCoordinate:c}}}},HX=Cg([(e,t)=>t,TN,T5,Bo,Ho,Hc,Hz,N1],(e,t,r,n,i,s,o,a)=>{if(e&&t&&n&&i&&s)return"horizontal"===t||"vertical"===t?HG(e,t,n,i,s,o,a):HJ(e,t,r,n,i,s,o)}),HQ=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},HZ=CT("mouseClick"),H0=Nj();H0.startListening({actionCreator:HZ,effect:(e,t)=>{var r=e.payload,n=HX(t.getState(),HQ(r));(null==n?void 0:n.activeIndex)!=null&&t.dispatch(Wr({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var H1=CT("mouseMove"),H2=Nj(),H3=null;function H5(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":"children"===e&&"object"==typeof t&&null!==t?"<<CHILDREN>>":t}function H4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function H8(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H4(Object(r),!0).forEach(function(t){H6(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H4(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function H6(e,t,r){return(t=H7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H7(e){var t=H9(e,"string");return"symbol"==typeof t?t:t+""}function H9(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}H2.startListening({actionCreator:H1,effect:(e,t)=>{var r=e.payload;null!==H3&&cancelAnimationFrame(H3);var n=HQ(r);H3=requestAnimationFrame(()=>{var e=t.getState();if("axis"===Wp(e,e.tooltip.settings.shared)){var r=HX(e,n);(null==r?void 0:r.activeIndex)!=null?t.dispatch(Wt({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate})):t.dispatch(U9())}H3=null})}});var Ke=0,Kt=C0({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=RY(t.payload)},prepare:CF()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;void 0!==e.xAxis[r.id]&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=RY(n))},prepare:CF()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:CF()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=RY(t.payload)},prepare:CF()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;void 0!==e.yAxis[r.id]&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=RY(n))},prepare:CF()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:CF()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=RY(t.payload)},prepare:CF()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;void 0!==e.zAxis[r.id]&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=RY(n))},prepare:CF()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:CF()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var s,o=i.widthHistory||[];if(3===o.length&&o[0]===o[2]&&n===o[1]&&n!==i.width&&1>=Math.abs(n-(null!=(s=o[0])?s:0)))return;var a=[...o,n].slice(-3);e.yAxis[r]=H8(H8({},i),{},{width:n,widthHistory:a})}}}}),{addXAxis:Kr,replaceXAxis:Kn,removeXAxis:Ki,addYAxis:Ks,replaceYAxis:Ko,removeYAxis:Ka,addZAxis:Kl,replaceZAxis:Ku,removeZAxis:Kc,updateYAxisWidth:Kh}=Kt.actions,Kd=Kt.reducer,Kf=C0({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(RY(t.payload))},prepare:CF()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=jG(e).cartesianItems.indexOf(RY(r));i>-1&&(e.cartesianItems[i]=RY(n))},prepare:CF()},removeCartesianGraphicalItem:{reducer(e,t){var r=jG(e).cartesianItems.indexOf(RY(t.payload));r>-1&&e.cartesianItems.splice(r,1)},prepare:CF()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(RY(t.payload))},prepare:CF()},removePolarGraphicalItem:{reducer(e,t){var r=jG(e).polarItems.indexOf(RY(t.payload));r>-1&&e.polarItems.splice(r,1)},prepare:CF()}}}),{addCartesianGraphicalItem:Kp,replaceCartesianGraphicalItem:Km,removeCartesianGraphicalItem:Kg,addPolarGraphicalItem:Kv,removePolarGraphicalItem:Ky}=Kf.actions,Kb=Kf.reducer,Kw=C0({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>
22{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=jG(e).dots.findIndex(e=>e===t.payload);-1!==r&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=jG(e).areas.findIndex(e=>e===t.payload);-1!==r&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(RY(t.payload))},removeLine:(e,t)=>{var r=jG(e).lines.findIndex(e=>e===t.payload);-1!==r&&e.lines.splice(r,1)}}}),{addDot:Kx,removeDot:KS,addArea:K_,removeArea:KM,addLine:KO,removeLine:KE}=Kw.actions,KP=Kw.reducer,Kk={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},KA=C0({name:"brush",initialState:Kk,reducers:{setBrushSettings:(e,t)=>null==t.payload?Kk:t.payload}}),{setBrushSettings:Kj}=KA.actions,KC=KA.reducer,KN=C0({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(RY(t.payload))},prepare:CF()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=jG(e).payload.indexOf(RY(r));i>-1&&(e.payload[i]=RY(n))},prepare:CF()},removeLegendPayload:{reducer(e,t){var r=jG(e).payload.indexOf(RY(t.payload));r>-1&&e.payload.splice(r,1)},prepare:CF()}}}),{setLegendSize:KT,setLegendSettings:KR,addLegendPayload:KI,replaceLegendPayload:KD,removeLegendPayload:KL}=KN.actions,KV=KN.reducer,Kz={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},KF=C0({name:"rootProps",initialState:Kz,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!=(r=t.payload.barGap)?r:Kz.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),KB=KF.reducer,{updateOptions:K$}=KF.actions,KU=C0({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=RY(t.payload)},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=RY(t.payload)},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:KW,removeRadiusAxis:KH,addAngleAxis:KK,removeAngleAxis:KY}=KU.actions,Kq=KU.reducer,KG=C0({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:KJ}=KG.actions,KX=KG.reducer,KQ=CT("keyDown"),KZ=CT("focus"),K0=Nj();K0.startListening({actionCreator:KQ,effect:(e,t)=>{var r=t.getState();if(!1===r.rootProps.accessibilityLayer)return;var{keyboardInteraction:n}=r.tooltip,i=e.payload;if("ArrowRight"===i||"ArrowLeft"===i||"Enter"===i){var s=WA(n,WY(r),BX(r),Hr(r)),o=null==s?-1:Number(s);if(Number.isFinite(o)&&!(o<0)){var a=Hc(r);if("Enter"===i){var l=HW(r,"axis","hover",String(n.index));t.dispatch(Wi({active:!n.active,activeIndex:n.index,activeCoordinate:l}));return}var u=o+("ArrowRight"===i?1:-1)*("left-to-right"===Ul(r)?1:-1);if(null!=a&&!(u>=a.length)&&!(u<0)){var c=HW(r,"axis","hover",String(u));t.dispatch(Wi({active:!0,activeIndex:u.toString(),activeCoordinate:c}))}}}}}),K0.startListening({actionCreator:KZ,effect:(e,t)=>{var r=t.getState();if(!1!==r.rootProps.accessibilityLayer){var{keyboardInteraction:n}=r.tooltip;if(!n.active&&null==n.index){var i="0",s=HW(r,"axis","hover",String(i));t.dispatch(Wi({active:!0,activeIndex:i,activeCoordinate:s}))}}}});var K1=CT("externalEvent"),K2=Nj(),K3=new Map;K2.startListening({actionCreator:K1,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(null!=r){n.persist();var i=n.type,s=K3.get(i);void 0!==s&&cancelAnimationFrame(s);var o=requestAnimationFrame(()=>{try{var e=t.getState(),s={activeCoordinate:Hx(e),activeDataKey:Hv(e),activeIndex:Hm(e),activeLabel:Hg(e),activeTooltipIndex:Hm(e),isTooltipActive:HS(e)};r(s,n)}finally{K3.delete(i)}});K3.set(i,o)}}});var K5=Cg([WT],e=>e.tooltipItemPayloads),K4=Cg([K5,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(null!=t){var n=e.find(e=>e.settings.graphicalItemId===r);if(null!=n){var{getPosition:i}=n;if(null!=i)return i(t)}}}),K8=CT("touchMove"),K6=Nj();K6.startListening({actionCreator:K8,effect:(e,t)=>
22{var r=e.payload;if(null!=r.touches&&0!==r.touches.length){var n=t.getState(),i=Wp(n,n.tooltip.settings.shared);if("axis"===i){var s=r.touches[0];if(null==s)return;var o=HX(n,HQ({clientX:s.clientX,clientY:s.clientY,currentTarget:r.currentTarget}));(null==o?void 0:o.activeIndex)!=null&&t.dispatch(Wt({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if("item"===i){var a,l=r.touches[0];if(null==document.elementFromPoint||null==l)return;var u=document.elementFromPoint(l.clientX,l.clientY);if(!u||!u.getAttribute)return;var c=u.getAttribute(NY),h=null!=(a=u.getAttribute(Nq))?a:void 0,d=WW(n).find(e=>e.id===h);if(null==c||null==d||null==h)return;var{dataKey:f}=d,p=K4(n,c,h);t.dispatch(U6({activeDataKey:f,activeIndex:c,activeCoordinate:p,activeGraphicalItemId:h}))}}}});var K7=C0({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(e=>e.dataKey===n.dataKey&&e.direction===n.direction?i:e))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(e=>e.dataKey!==n.dataKey||e.direction!==n.direction))}}}),{addErrorBar:K9,replaceErrorBar:Ye,removeErrorBar:Yt}=K7.actions,Yr=CO({brush:KC,cartesianAxis:Kd,chartData:Wc,errorBars:K7.reducer,graphicalItems:Kb,layout:NL,legend:KV,options:UI,polarAxis:Kq,polarOptions:KX,referenceElements:KP,rootProps:KB,tooltip:Ws,zIndex:R7}),Yn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart";return CW({reducer:Yr,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([H0.middleware,H2.middleware,K0.middleware,K2.middleware,K6.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat(C$({type:"raf"}))},devTools:PH.devToolsEnabled&&{serialize:{replacer:H5},name:"recharts-".concat(t)}})};function Yi(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=N8(),s=(0,UV.useRef)(null);if(i)return r;null==s.current&&(s.current=Yn(t,n));var o=AL;return UV.createElement(UQ,{context:o,store:s.current},r)}var Ys=ex,Yo=e=>{var{chartData:t}=e,r=Az(),n=N8();return(0,Ys.useEffect)(()=>n?()=>{}:(r(Wa(t)),()=>{r(Wa(void 0))}),[t,r,n]),null},Ya=ex,Yl=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function Yu(e,t){return null==e&&null==t||("number"==typeof e&&"number"==typeof t?e===t||e!=e&&t!=t:e===t)}function Yc(e,t){for(var r of new Set([...Object.keys(e),...Object.keys(t)]))if(Yl.has(r)){if(null==e[r]&&null==t[r])continue;if(!Uq(e[r],t[r]))return!1}else if(!Yu(e[r],t[r]))return!1;return!0}function Yh(e){var{layout:t,margin:r}=e,n=Az(),i=N8();return(0,Ya.useEffect)(()=>{i||(n(NR(t)),n(NT(r)))},[n,i,t,r]),null}var Yd=(0,Ya.memo)(Yh,Yc),Yf=ex;function Yp(e){var t=Az();return(0,Yf.useEffect)(()=>{t(K$(e))},[t,e]),null}var Ym=ex,Yg=ex,Yv=()=>{var e;return null==(e=AU(e=>e.rootProps.accessibilityLayer))||e},Yy=ex,Yb=ky,Yw=["children","width","height","viewBox","className","style","title","desc"];function Yx(){return(Yx=Object.assign.bind()).apply(null,arguments)}function YS(e,t){if(null==e)return{};var r,n,i=Y_(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Y_(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var YM=(0,Yy.forwardRef)((e,t)=>{var{children:r,width:n,height:i,viewBox:s,className:o,style:a,title:l,desc:u}=e,c=YS(e,Yw),h=s||{width:n,height:i,x:0,y:0},d=(0,Yb.clsx)("recharts-surface",o);return Yy.createElement("svg",Yx({},kj(c),{className:d,width:n,height:i,style:a,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height),ref:t}),Yy.createElement("title",null,l),Yy.createElement("desc",null,u),r)}),YO=ex;function YE(e){var{zIndex:t,isPanorama:r}=e,n=(0,YO.useRef)(null),i=Az();return(0,YO.useLayoutEffect)(()=>(n.current&&i(R8({zIndex:t,element:n.current,isPanorama:r})),()=>{i(R6({zIndex:t,isPanorama:r}))}),[i,t,r]),YO.createElement("g",{tabIndex:-1,ref:n})}function YP(e){var{children:t,isPanorama:r}=e,n=AU(Re);
22if(!n||0===n.length)return t;var i=n.filter(e=>e<0),s=n.filter(e=>e>0);return YO.createElement(YO.Fragment,null,i.map(e=>YO.createElement(YE,{key:e,zIndex:e,isPanorama:r})),t,s.map(e=>YO.createElement(YE,{key:e,zIndex:e,isPanorama:r})))}var Yk=["children"];function YA(e,t){if(null==e)return{};var r,n,i=Yj(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Yj(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function YC(){return(YC=Object.assign.bind()).apply(null,arguments)}var YN={width:"100%",height:"100%",display:"block"},YT=(0,Yg.forwardRef)((e,t)=>{var r,n,i=Tj(),s=TC(),o=Yv();if(!Pv(i)||!Pv(s))return null;var{children:a,otherAttributes:l,title:u,desc:c}=e;return null!=l&&(r="number"==typeof l.tabIndex?l.tabIndex:o?0:void 0,n="string"==typeof l.role?l.role:o?"application":void 0),Yg.createElement(YM,YC({},l,{title:u,desc:c,role:n,tabIndex:r,width:i,height:s,style:YN,ref:t}),a)}),YR=e=>{var{children:t}=e,r=AU(N7);if(!r)return null;var{width:n,height:i,y:s,x:o}=r;return Yg.createElement(YM,{width:n,height:i,x:o,y:s},t)},YI=(0,Yg.forwardRef)((e,t)=>{var{children:r}=e,n=YA(e,Yk);return N8()?Yg.createElement(YR,null,Yg.createElement(YP,{isPanorama:!0},r)):Yg.createElement(YT,YC({ref:t},n),Yg.createElement(YP,{isPanorama:!1},r))}),YD=ex,YL=ky,YV=ex,Yz=new(e.i(571650)).default,YF="recharts.syncEvent.tooltip",YB="recharts.syncEvent.brush";function Y$(e){return e.tooltip.syncInteraction}var YU=["x","y"];function YW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function YH(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?YW(Object(r),!0).forEach(function(t){YK(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YW(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function YK(e,t,r){return(t=YY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YY(e){var t=Yq(e,"string");return"symbol"==typeof t?t:t+""}function Yq(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function YG(e,t){if(null==e)return{};var r,n,i=YJ(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function YJ(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function YX(){var e=AU(F8),t=AU(F7),r=Az(),n=AU(F6),i=AU(Hc),s=TT(),o=TP(),a=AU(e=>e.rootProps.className);(0,YV.useEffect)(()=>{if(null==e)return Pn;var a=(a,l,u)=>{if(t!==u&&e===a){if("index"===n){if(o&&null!=l&&null!=(c=l.payload)&&c.coordinate&&l.payload.sourceViewBox){var c,h,d=l.payload.coordinate,{x:f,y:p}=d,m=YG(d,YU),{x:g,y:v,width:y,height:b}=l.payload.sourceViewBox,w=YH(YH({},m),{},{x:o.x+(y?(f-g)/y:0)*o.width,y:o.y+(b?(p-v)/b:0)*o.height});r(YH(YH({},l),{},{payload:YH(YH({},l.payload),{},{coordinate:w})}))}else r(l);return}if(null!=i){if("function"==typeof n){var x=n(i,{activeTooltipIndex:null==l.payload.index?void 0:Number(l.payload.index),isTooltipActive:l.payload.active,activeIndex:null==l.payload.index?void 0:Number(l.payload.index),activeLabel:l.payload.label,activeDataKey:l.payload.dataKey,activeCoordinate:l.payload.coordinate});h=i[x]}else"value"===n&&(h=i.find(e=>String(e.value)===l.payload.label));var{coordinate:S}=l.payload;if(null==h||!1===l.payload.active||null==S||null==o)return void r(Wn({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));var{x:_,y:M}=S,O=Math.min(_,o.x+o.width),E=Math.min(M,o.y+o.height),P={x:"horizontal"===s?h.coordinate:O,y:"horizontal"===s?E:h.coordinate},k=Wn({active:l.payload.active,coordinate:P,dataKey:l.payload.dataKey,index:String(h.index),label:l.payload.label,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:l.payload.graphicalItemId});r(k)}}};return Yz.on(YF,a),()=>{Yz.off(YF,a)}},[a,r,t,e,n,i,s,o])}function YQ(){var e=AU(F8),t=AU(F7),r=Az();(0,YV.useEffect)(()=>
22{if(null==e)return Pn;var n=(n,i,s)=>{t!==s&&e===n&&r(Wl(i))};return Yz.on(YB,n),()=>{Yz.off(YB,n)}},[r,t,e])}function YZ(){var e=Az();(0,YV.useEffect)(()=>{e(UD())},[e]),YX(),YQ()}function Y0(e,t,r,n,i,s){var o=AU(r=>H$(r,e,t)),a=AU(F7),l=AU(F8),u=AU(F6),c=AU(Y$),h=null==c?void 0:c.active,d=TP();(0,YV.useEffect)(()=>{if(!h&&null!=l&&null!=a){var e=Wn({active:s,coordinate:r,dataKey:o,index:i,label:"number"==typeof n?String(n):n,sourceViewBox:d,graphicalItemId:void 0});Yz.emit(YF,l,e,a)}},[h,r,o,i,n,a,l,u,s,d])}var Y1=ex;function Y2(){var e=Az(),[t,r]=(0,Y1.useState)(null),n=AU(NU);return(0,Y1.useEffect)(()=>{if(null!=t){var r=t.getBoundingClientRect(),i=r.width/t.offsetWidth;Pg(i)&&i!==n&&e(ND(i))}},[t,e,n]),r}var Y3=ex,Y5=(0,Y3.createContext)(null),Y4=()=>(0,Y3.useContext)(Y5),Y8=(0,ex.createContext)(null);function Y6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Y7(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y6(Object(r),!0).forEach(function(t){Y9(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y6(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Y9(e,t,r){return(t=qe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qe(e){var t=qt(e,"string");return"symbol"==typeof t?t:t+""}function qt(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function qr(){return(qr=Object.assign.bind()).apply(null,arguments)}var qn=()=>(YZ(),null);function qi(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var qs=(0,YD.forwardRef)((e,t)=>{var r,n,i=(0,YD.useRef)(null),[s,o]=(0,YD.useState)({containerWidth:qi(null==(r=e.style)?void 0:r.width),containerHeight:qi(null==(n=e.style)?void 0:n.height)}),a=(0,YD.useCallback)((e,t)=>{o(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]),l=(0,YD.useCallback)(e=>{if("function"==typeof t&&t(e),null!=e&&"u">typeof ResizeObserver){var{width:r,height:n}=e.getBoundingClientRect();a(r,n);var s=new ResizeObserver(e=>{var t=e[0];if(null!=t){var{width:r,height:n}=t.contentRect;a(r,n)}});s.observe(e),i.current=s}},[t,a]);return(0,YD.useEffect)(()=>()=>{var e=i.current;null!=e&&e.disconnect()},[a]),YD.createElement(YD.Fragment,null,YD.createElement(TL,{width:s.containerWidth,height:s.containerHeight}),YD.createElement("div",qr({ref:l},e)))}),qo=(0,YD.forwardRef)((e,t)=>{var{width:r,height:n}=e,[i,s]=(0,YD.useState)({containerWidth:qi(r),containerHeight:qi(n)}),o=(0,YD.useCallback)((e,t)=>{s(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]),a=(0,YD.useCallback)(e=>{if("function"==typeof t&&t(e),null!=e){var{width:r,height:n}=e.getBoundingClientRect();o(r,n)}},[t,o]);return YD.createElement(YD.Fragment,null,YD.createElement(TL,{width:i.containerWidth,height:i.containerHeight}),YD.createElement("div",qr({ref:a},e)))}),qa=(0,YD.forwardRef)((e,t)=>{var{width:r,height:n}=e;return YD.createElement(YD.Fragment,null,YD.createElement(TL,{width:r,height:n}),YD.createElement("div",qr({ref:t},e)))}),ql=(0,YD.forwardRef)((e,t)=>{var{width:r,height:n}=e;return"string"==typeof r||"string"==typeof n?YD.createElement(qo,qr({},e,{ref:t})):"number"==typeof r&&"number"==typeof n?YD.createElement(qa,qr({},e,{width:r,height:n,ref:t})):YD.createElement(YD.Fragment,null,YD.createElement(TL,{width:r,height:n}),YD.createElement("div",qr({ref:t},e)))});function qu(e){return e?qs:ql}var qc=(0,YD.forwardRef)((e,t)=>{var{children:r,className:n,height:i,onClick:s,onContextMenu:o,onDoubleClick:a,onMouseDown:l,onMouseEnter:u,onMouseLeave:c,onMouseMove:h,onMouseUp:d,onTouchEnd:f,onTouchMove:p,onTouchStart:m,style:g,width:v,responsive:y,dispatchTouchEvents:b=!0}=e,w=(0,YD.useRef)(null),x=Az(),[S,_]=(0,YD.useState)(null),[M,O]=(0,YD.useState)(null),E=Y2(),P=T_(),k=(null==P?void 0:P.width)>0?P.width:v,A=(null==P?void 0:P.height)>
220?P.height:i,j=(0,YD.useCallback)(e=>{E(e),"function"==typeof t&&t(e),_(e),O(e),null!=e&&(w.current=e)},[E,t,_,O]),C=(0,YD.useCallback)(e=>{x(HZ(e)),x(K1({handler:s,reactEvent:e}))},[x,s]),N=(0,YD.useCallback)(e=>{x(H1(e)),x(K1({handler:u,reactEvent:e}))},[x,u]),T=(0,YD.useCallback)(e=>{x(U9()),x(K1({handler:c,reactEvent:e}))},[x,c]),R=(0,YD.useCallback)(e=>{x(H1(e)),x(K1({handler:h,reactEvent:e}))},[x,h]),I=(0,YD.useCallback)(()=>{x(KZ())},[x]),D=(0,YD.useCallback)(e=>{x(KQ(e.key))},[x]),L=(0,YD.useCallback)(e=>{x(K1({handler:o,reactEvent:e}))},[x,o]),V=(0,YD.useCallback)(e=>{x(K1({handler:a,reactEvent:e}))},[x,a]),z=(0,YD.useCallback)(e=>{x(K1({handler:l,reactEvent:e}))},[x,l]),F=(0,YD.useCallback)(e=>{x(K1({handler:d,reactEvent:e}))},[x,d]),B=(0,YD.useCallback)(e=>{x(K1({handler:m,reactEvent:e}))},[x,m]),$=(0,YD.useCallback)(e=>{b&&x(K8(e)),x(K1({handler:p,reactEvent:e}))},[x,b,p]),U=(0,YD.useCallback)(e=>{x(K1({handler:f,reactEvent:e}))},[x,f]),W=qu(y);return YD.createElement(Y5.Provider,{value:S},YD.createElement(Y8.Provider,{value:M},YD.createElement(W,{width:null!=k?k:null==g?void 0:g.width,height:null!=A?A:null==g?void 0:g.height,className:(0,YL.clsx)("recharts-wrapper",n),style:Y7({position:"relative",cursor:"default",width:k,height:A},g),onClick:C,onContextMenu:L,onDoubleClick:V,onFocus:I,onKeyDown:D,onMouseDown:z,onMouseEnter:N,onMouseLeave:T,onMouseMove:R,onMouseUp:F,onTouchEnd:U,onTouchMove:$,onTouchStart:B,ref:j},YD.createElement(qn,null),r)))}),qh=ex,qd=Cg([N1],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),qf=Cg([qd,NB,N$],(e,t,r)=>{if(e&&null!=t&&null!=r)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),qp=()=>AU(qf),qm=()=>AU(HM),qg=(0,qh.createContext)(void 0),qv=e=>{var{children:t}=e,[r]=(0,qh.useState)("".concat(E4("recharts"),"-clip")),n=qp();if(null==n)return null;var{x:i,y:s,width:o,height:a}=n;return qh.createElement(qg.Provider,{value:r},qh.createElement("defs",null,qh.createElement("clipPath",{id:r},qh.createElement("rect",{x:i,y:s,height:a,width:o}))),t)},qy=()=>(0,qh.useContext)(qg),qb=["width","height","responsive","children","className","style","compact","title","desc"];function qw(e,t){if(null==e)return{};var r,n,i=qx(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function qx(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var qS=(0,Ym.forwardRef)((e,t)=>{var{width:r,height:n,responsive:i,children:s,className:o,style:a,compact:l,title:u,desc:c}=e,h=kk(qw(e,qb));return l?Ym.createElement(Ym.Fragment,null,Ym.createElement(TL,{width:r,height:n}),Ym.createElement(YI,{otherAttributes:h,title:u,desc:c},s)):Ym.createElement(qc,{className:o,style:a,width:r,height:n,responsive:null!=i&&i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},Ym.createElement(YI,{otherAttributes:h,title:u,desc:c,ref:t},Ym.createElement(qv,null,s)))});function q_(){return(q_=Object.assign.bind()).apply(null,arguments)}var qM={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},qO=(0,UL.forwardRef)(function(e,t){var r,n=k9(e.categoricalChartProps,qM),{chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:o,tooltipPayloadSearcher:a,categoricalChartProps:l}=e,u={chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:o,tooltipPayloadSearcher:a,eventEmitter:void 0};return UL.createElement(Yi,{preloadedState:{options:u},reduxStoreName:null!=(r=l.id)?r:i},UL.createElement(Yo,{chartData:l.data}),UL.createElement(Yd,{layout:n.layout,margin:n.margin}),UL.createElement(Yp,{baseValue:n.baseValue,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),UL.createElement(qS,q_({},n,{ref:t})))}),qE=["axis"],qP=(0,UN.forwardRef)((e,t)=>
22UN.createElement(qO,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:qE,tooltipPayloadSearcher:UT,categoricalChartProps:e,ref:t})),qk=ex,qA=ky,qj=ex,qC=e.i(750171),qN=["valueAccessor"],qT=["dataKey","clockWise","id","textBreakAll","zIndex"];function qR(){return(qR=Object.assign.bind()).apply(null,arguments)}function qI(e,t){if(null==e)return{};var r,n,i=qD(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function qD(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var qL=e=>Array.isArray(e.value)?(0,qC.default)(e.value):e.value,qV=(0,qj.createContext)(void 0),qz=qV.Provider,qF=(0,qj.createContext)(void 0),qB=qF.Provider;function q$(){return(0,qj.useContext)(qV)}function qU(){return(0,qj.useContext)(qF)}function qW(e){var{valueAccessor:t=qL}=e,r=qI(e,qN),{dataKey:n,clockWise:i,id:s,textBreakAll:o,zIndex:a}=r,l=qI(r,qT),u=q$(),c=qU(),h=u||c;return h&&h.length?qj.createElement(R9,{zIndex:null!=a?a:TV.label},qj.createElement(kD,{className:"recharts-label-list"},h.map((e,i)=>{var a,u=Pe(n)?t(e,i):P_(e.payload,n),c=Pe(s)?{}:{id:"".concat(s,"-").concat(i)};return qj.createElement(IA,qR({key:"label-".concat(i)},kj(e),l,c,{fill:null!=(a=r.fill)?a:e.fill,parentViewBox:e.parentViewBox,value:u,textBreakAll:o,viewBox:e.viewBox,index:i,zIndex:0}))}))):null}function qH(e){var{label:t}=e;return t?!0===t?qj.createElement(qW,{key:"labelList-implicit"}):qj.isValidElement(t)||IS(t)?qj.createElement(qW,{key:"labelList-implicit",content:t}):"object"==typeof t?qj.createElement(qW,qR({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}qW.displayName="LabelList";var qK=ex,qY=ky,qq=ex,qG=ky;function qJ(){return(qJ=Object.assign.bind()).apply(null,arguments)}var qX=e=>{var{cx:t,cy:r,r:n,className:i}=e,s=(0,qG.clsx)("recharts-dot",i);return E2(t)&&E2(r)&&E2(n)?qq.createElement("circle",qJ({},kk(e),IR(e),{className:s,cx:t,cy:r,r:n})):null},qQ=EG,qZ=ex,q0=e.i(247707),q1=e=>"string"==typeof e?e:e?e.displayName||e.name||"Component":"",q2=null,q3=null,q5=e=>{if(e===q2&&Array.isArray(q3))return q3;var t=[];return qZ.Children.forEach(e,e=>{Pe(e)||((0,q0.isFragment)(e)?t=t.concat(q5(e.props.children)):t.push(e))}),q3=t,q2=e,t};function q4(e,t){var r=[],n=[];return n=Array.isArray(t)?t.map(e=>q1(e)):[q1(t)],q5(e).forEach(e=>{var t=(0,qQ.default)(e,"type.displayName")||(0,qQ.default)(e,"type.name");t&&-1!==n.indexOf(t)&&r.push(e)}),r}var q8=e=>!e||"object"!=typeof e||!("clipDot"in e)||!!e.clipDot,q6=["points"];function q7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function q9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?q7(Object(r),!0).forEach(function(t){Ge(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q7(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ge(e,t,r){return(t=Gt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gt(e){var t=Gr(e,"string");return"symbol"==typeof t?t:t+""}function Gr(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Gn(){return(Gn=Object.assign.bind()).apply(null,arguments)}function Gi(e,t){if(null==e)return{};var r,n,i=Gs(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Gs(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function Go(e){var{option:t,dotProps:r,className:n}=e;if((0,qK.isValidElement)(t))return(0,qK.cloneElement)(t,r);if("function"==typeof t)return t(r);var i=(0,qY.clsx)(n,"boolean"!=typeof t?t.className:""),s=null!=r?r:{},{points:o}=s,a=Gi(s,q6);return qK.createElement(qX,Gn({},a,{className:i}))}function Ga(e,t){return null!=e&&(!!t||1===e.length)}function Gl(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:s,baseProps:o,needClip:a,clipPathId:l,zIndex:u=TV.scatter}=e;if(!Ga(t,r))return null;var c=q8(r),h=kC(r),d=t.map((e,n)=>{var a,l,u=q9(q9(q9({r:3},o),h),{},{index:n,cx:null!=(a=e.x)?a:void 0,cy:null!=(l=e.y)?l:void 0,dataKey:s,value:e.value,payload:e.payload,points:t});return qK.createElement(Go,{key:"dot-".concat(n),option:r,dotProps:u,className:i})}),f={};return a&&null!=l&&(f.clipPath="url(#clipPath-".concat(c?"":"dots-").concat(l,")")),qK.createElement(R9,{zIndex:u},qK.createElement(kD,Gn({className:n},f),d))}var Gu=ex;function Gc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Gh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?Gc(Object(r),!0).forEach(function(t){Gd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gc(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Gd(e,t,r){return(t=Gf(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gf(e){var t=Gp(e,"string");return"symbol"==typeof t?t:t+""}function Gp(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Gm=e=>{var t,{point:r,childIndex:n,mainColor:i,activeDot:s,dataKey:o,clipPath:a}=e;if(!1===s||null==r.x||null==r.y)return null;var l=Gh(Gh(Gh({},{index:n,dataKey:o,cx:r.x,cy:r.y,r:4,fill:null!=i?i:"none",strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value}),kA(s)),IR(s));return t=(0,Gu.isValidElement)(s)?(0,Gu.cloneElement)(s,l):"function"==typeof s?s(l):Gu.createElement(qX,l),Gu.createElement(kD,{className:"recharts-active-dot",clipPath:a},t)};function Gg(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:s,zIndex:o=TV.activeDot}=e,a=AU(Hm),l=qm();if(null==t||null==l)return null;var u=t.find(e=>l.includes(e.payload));return Pe(u)?null:Gu.createElement(R9,{zIndex:o},Gu.createElement(Gm,{point:u,childIndex:Number(a),mainColor:r,dataKey:i,activeDot:n,clipPath:s}))}var Gv=ex;function Gy(e){var{tooltipEntrySettings:t}=e,r=Az(),n=N8(),i=(0,Gv.useRef)(null);return(0,Gv.useLayoutEffect)(()=>{n||(null===i.current?r(U3(t)):i.current!==t&&r(U5({prev:i.current,next:t})),i.current=t)},[t,r,n]),(0,Gv.useLayoutEffect)(()=>()=>{i.current&&(r(U4(i.current)),i.current=null)},[r]),null}var Gb=ex,Gw=["children"];function Gx(e,t){if(null==e)return{};var r,n,i=GS(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function GS(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var G_={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},GM=(0,Gb.createContext)(G_);function GO(e){var{children:t}=e,r=Gx(e,Gw);return Gb.createElement(GM.Provider,{value:r},t)}var GE=ex;function GP(e,t){var r,n,i=AU(t=>Bx(t,e)),s=AU(e=>BM(e,t)),o=null!=(r=null==i?void 0:i.allowDataOverflow)?r:Bb.allowDataOverflow,a=null!=(n=null==s?void 0:s.allowDataOverflow)?n:BS.allowDataOverflow;return{needClip:o||a,needClipX:o,needClipY:a}}function Gk(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=qp(),{needClipX:s,needClipY:o,needClip:a}=GP(t,r);if(!a||!i)return null;var{x:l,y:u,width:c,height:h}=i;return GE.createElement("clipPath",{id:"clipPath-".concat(n)},GE.createElement("rect",{x:s?l:l-c/2,y:o?u:u-h/2,width:s?c:2*c,height:o?h:2*h}))}var GA=(e,t,r,n)=>Uo(e,"xAxis",t,n),Gj=(e,t,r,n)=>Us(e,"xAxis",t,n),GC=(e,t,r,n)=>Uo(e,"yAxis",r,n),GN=(e,t,r,n)=>Us(e,"yAxis",r,n),GT=Cg([TN,GA,GC,Gj,GN],(e,t,r,n,i)=>PO(e,"xAxis")?PF(t,n,!1):PF(r,i,!1));function GR(e){return"line"===e.type}var GI=Cg([BN,(e,t,r,n,i)=>i],(e,t)=>e.filter(GR).find(e=>e.id===t)),GD=Cg([TN,GA,GC,Gj,GN,GI,GT,FL],(e,t,r,n,i,s,o,a)=>{var l,{chartData:u,dataStartIndex:c,dataEndIndex:h}=a;if(null!=s&&null!=t&&null!=r&&null!=n&&null!=i&&0!==n.length&&0!==i.length&&null!=o&&("horizontal"===e||"vertical"===e)){var{dataKey:d,data:f}=s;if(null!=(l=null!=f&&f.length>0?f:null==u?void 0:u.slice(c,h+1)))return Zv({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:l})}}),GL=ex;function GV(e){var{legendPayload:t}=e,r=Az(),n=N8(),i=(0,GL.useRef)(null);return(0,GL.useLayoutEffect)(()=>{n||(null===i.current?r(KI(t)):i.current!==t&&r(KD({prev:i.current,next:t})),i.current=t)},[r,n,t]),(0,GL.useLayoutEffect)(()=>()=>{i.current&&(r(KL(i.current)),i.current=null)},[r]),null}function Gz(e){var{legendPayload:t}=e,r=Az(),n=AU(TN),i=(0,GL.useRef)(null);return(0,GL.useLayoutEffect)(()=>{("centric"===n||"radial"===n)&&(null===i.current?r(KI(t)):i.current!==t&&r(KD({prev:i.current,next:t})),i.current=t)},[r,n,t]),(0,GL.useLayoutEffect)(()=>()=>{i.current&&(r(KL(i.current)),i.current=null)},[r]),null}var GF=ex;function GB(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",r=(0,GF.useRef)(E4(t)),n=(0,GF.useRef)(e);return n.current!==e&&(r.current=E4(t),n.current=e),r.current}var G$=ex,GU=ex,GW=()=>{var[e]=GU.useState(()=>E4("uid-"));return e},GH=null!=(B=GU["useId".toString()])?B:GW;function GK(e,t){var r=GH();return t||(e?"".concat(e,"-").concat(r):r)}var GY=(0,G$.createContext)(void 0),Gq=e=>{var{id:t,type:r,children:n}=e,i=GK("recharts-".concat(r),t);return G$.createElement(GY.Provider,{value:i},n(i))},GG=ex,GJ=e=>{var t=Az(),r=(0,GG.useRef)(null);return(0,GG.useLayoutEffect)(()=>{null===r.current?t(Kp(e)):r.current!==e&&t(Km({prev:r.current,next:e})),r.current=e},[t,e]),(0,GG.useLayoutEffect)(()=>()=>{r.current&&(t(Kg(r.current)),r.current=null)},[t]),null},GX=(0,GG.memo)(GJ);function GQ(e){var t=Az();return(0,GG.useLayoutEffect)(()=>(t(Kv(e)),()=>{t(Ky(e))}),[t,e]),null}var GZ=ex;function G0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function G1(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?G0(Object(r),!0).forEach(function(t){G2(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G0(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function G2(e,t,r){return(t=G3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G3(e){var t=G5(e,"string");return"symbol"==typeof t?t:t+""}function G5(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var G4=e=>e.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())),G8=(e,t,r)=>e.map(e=>"".concat(G4(e)," ").concat(t,"ms ").concat(r)).join(","),G6=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((e,t)=>e.filter(e=>t.includes(e))),G7=(e,t)=>Object.keys(t).reduce((r,n)=>G1(G1({},r),{},{[n]:e(n,t[n])}),{});function G9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G9(Object(r),!0).forEach(function(t){Jt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G9(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Jt(e,t,r){return(t=Jr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jr(e){var t=Jn(e,"string");return"symbol"==typeof t?t:t+""}function Jn(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Ji=(e,t,r)=>e+(t-e)*r,Js=e=>{var{from:t,to:r}=e;return t!==r},Jo=(e,t,r)=>{var n=G7((t,r)=>{if(Js(r)){var[n,i]=e(r.from,r.to,r.velocity);return Je(Je({},r),{},{from:n,velocity:i})}return r},t);return r<1?G7((e,t)=>Js(t)&&null!=n[e]?Je(Je({},t),{},{velocity:Ji(t.velocity,n[e].velocity,r),from:Ji(t.from,n[e].from,r)}):t,t):Jo(e,n,r-1)};function Ja(e,t,r,n,i,s){var o,a=n.reduce((r,n)=>Je(Je({},r),{},{[n]:{from:e[n],velocity:0,to:t[n]}}),{}),l=()=>G7((e,t)=>t.from,a),u=()=>!Object.values(a).filter(Js).length,c=null,h=n=>{o||(o=n);var d=(n-o)/r.dt;a=Jo(r,a,d),i(Je(Je(Je({}
22,e),t),l())),o=n,u()||(c=s.setTimeout(h))};return()=>(c=s.setTimeout(h),()=>{var e;null==(e=c)||e()})}function Jl(e,t,r,n,i,s,o){var a,l=null,u=i.reduce((r,n)=>{var i=e[n],s=t[n];return null==i||null==s?r:Je(Je({},r),{},{[n]:[i,s]})},{}),c=i=>{a||(a=i);var h=(i-a)/n,d=G7((e,t)=>Ji(...t,r(h)),u);if(s(Je(Je(Je({},e),t),d)),h<1)l=o.setTimeout(c);else{var f=G7((e,t)=>Ji(...t,r(1)),u);s(Je(Je(Je({},e),t),f))}};return()=>(l=o.setTimeout(c),()=>{var e;null==(e=l)||e()})}let Ju=(e,t,r,n,i,s)=>{var o=G6(e,t);return null==r?()=>(i(Je(Je({},e),t)),()=>{}):!0===r.isStepper?Ja(e,t,r,o,i,s):Jl(e,t,r,n,o,i,s)};var Jc=1e-4,Jh=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],Jd=(e,t)=>e.map((e,r)=>e*t**r).reduce((e,t)=>e+t),Jf=(e,t)=>r=>Jd(Jh(e,t),r),Jp=(e,t)=>r=>Jd([...Jh(e,t).map((e,t)=>e*t).slice(1),0],r),Jm=e=>{var t,r=e.split("(");if(2!==r.length||"cubic-bezier"!==r[0])return null;var n=null==(t=r[1])||null==(t=t.split(")")[0])?void 0:t.split(",");if(null==n||4!==n.length)return null;var i=n.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]},Jg=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(1===t.length)switch(t[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:var n=Jm(t[0]);if(n)return n}return 4===t.length?t:[0,0,1,1]},Jv=(e,t,r,n)=>{var i=Jf(e,r),s=Jf(t,n),o=Jp(e,r),a=e=>e>1?1:e<0?0:e,l=e=>{for(var t=e>1?1:e,r=t,n=0;n<8;++n){var l=i(r)-t,u=o(r);if(Math.abs(l-t)<Jc||u<Jc)break;r=a(r-l/u)}return s(r)};return l.isStepper=!1,l},Jy=function(){return Jv(...Jg(...arguments))},Jb=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:t=100,damping:r=8,dt:n=17}=e,i=(e,i,s)=>{var o=s*r,a=s+(-(e-i)*t-o)*n/1e3,l=s*n/1e3+e;return Math.abs(l-i)<Jc&&Math.abs(a)<Jc?[i,0]:[l,a]};return i.isStepper=!0,i.dt=n,i},Jw=e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Jy(e);case"spring":return Jb();default:if("cubic-bezier"===e.split("(")[0])return Jy(e)}return"function"==typeof e?e:null},Jx=ex;function JS(e){var t=()=>null,r=!1,n=null,i=s=>{if(!r){if(Array.isArray(s)){if(!s.length)return;var[o,...a]=s;if("number"==typeof o){n=e.setTimeout(i.bind(null,a),o);return}i(o),n=e.setTimeout(i.bind(null,a));return}"string"==typeof s&&t(s),"object"==typeof s&&t(s),"function"==typeof s&&s()}};return{stop:()=>{r=!0},start:e=>{r=!1,n&&(n(),n=null),i(e)},subscribe:e=>(t=e,()=>{t=()=>null}),getTimeoutController:()=>e}}class J_{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=performance.now(),n=null,i=s=>{s-r>=t?e(s):"function"==typeof requestAnimationFrame&&(n=requestAnimationFrame(i))};return n=requestAnimationFrame(i),()=>{null!=n&&cancelAnimationFrame(n)}}}function JM(){return JS(new J_)}var JO=(0,Jx.createContext)(JM);function JE(e,t){var r=(0,Jx.useContext)(JO);return(0,Jx.useMemo)(()=>null!=t?t:r(e),[e,t,r])}var JP={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Jk={t:0},JA={t:1};function Jj(e){var t=k9(e,JP),{isActive:r,canBegin:n,duration:i,easing:s,begin:o,onAnimationEnd:a,onAnimationStart:l,children:u}=t,c="auto"===r?!PH.isSsr:r,h=JE(t.animationId,t.animationManager),[d,f]=(0,GZ.useState)(c?Jk:JA),p=(0,GZ.useRef)(null);return(0,GZ.useEffect)(()=>{c||f(JA)},[c]),(0,GZ.useEffect)(()=>{if(!c||!n)return Pn;var e=Ju(Jk,JA,Jw(s),i,f,h.getTimeoutController()),t=()=>{p.current=e()};return h.start([l,o,t,i,a]),()=>{h.stop(),p.current&&p.current(),a()}},[c,n,i,s,o,l,a,h]),u(d.t)}function JC(e){var t=kA(e),r=3,n=2;if(null!=t){var{r:i,strokeWidth:s}=t,o=Number(i),a=Number(s);return(Number.isNaN(o)||o<0)&&(o=r),(Number.isNaN(a)||a<0)&&(a=n),{r:o,strokeWidth:a}}return{r:r,strokeWidth:n}}var JN=ex,JT=e.i(815090),JR=ex,JI=ky,JD=["radius"],JL=["radius"];function JV(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Jz(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?JV(Object(r),!0).forEach(function(t){JF(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JV(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function JF(e,t,r){return(t=JB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JB(e){var t=J$(e,"string");return"symbol"==typeof t?t:t+""}function J$(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function JU(){return(JU=Object.assign.bind()).apply(null,arguments)}function JW(e,t){if(null==e)return{};var r,n,i=JH(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function JH(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function JK(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var JY=(e,t,r,n,i)=>{var s=EX(r),o=EX(n),a=Math.min(Math.abs(s)/2,Math.abs(o)/2),l=o>=0?1:-1,u=s>=0?1:-1,c=+(o>=0&&s>=0||o<0&&s<0);if(a>0&&Array.isArray(i)){for(var h=[0,0,0,0],d=0,f=4;d<f;d++){var p,m,g=null!=(m=i[d])?m:0;h[d]=g>a?a:g}p=EQ($||($=JK(["M",",",""])),e,t+l*h[0]),h[0]>0&&(p+=EQ(U||(U=JK(["A ",",",",0,0,",",",",",""])),h[0],h[0],c,e+u*h[0],t)),p+=EQ(W||(W=JK(["L ",",",""])),e+r-u*h[1],t),h[1]>0&&(p+=EQ(H||(H=JK(["A ",",",",0,0,",",\n        ",",",""])),h[1],h[1],c,e+r,t+l*h[1])),p+=EQ(K||(K=JK(["L ",",",""])),e+r,t+n-l*h[2]),h[2]>0&&(p+=EQ(Y||(Y=JK(["A ",",",",0,0,",",\n        ",",",""])),h[2],h[2],c,e+r-u*h[2],t+n)),p+=EQ(q||(q=JK(["L ",",",""])),e+u*h[3],t+n),h[3]>0&&(p+=EQ(G||(G=JK(["A ",",",",0,0,",",\n        ",",",""])),h[3],h[3],c,e,t+n-l*h[3])),p+="Z"}else if(a>0&&i===+i&&i>0){var v=Math.min(a,i);p=EQ(J||(J=JK(["M ",",","\n            A ",",",",0,0,",",",",","\n            L ",",","\n            A ",",",",0,0,",",",",","\n            L ",",","\n            A ",",",",0,0,",",",",","\n            L ",",","\n            A ",",",",0,0,",",",","," Z"])),e,t+l*v,v,v,c,e+u*v,t,e+r-u*v,t,v,v,c,e+r,t+l*v,e+r,t+n-l*v,v,v,c,e+r-u*v,t+n,e+u*v,t+n,v,v,c,e,t+n-l*v)}else p=EQ(X||(X=JK(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return p},Jq={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},JG=e=>{var t=k9(e,Jq),r=(0,JR.useRef)(null),[n,i]=(0,JR.useState)(-1);(0,JR.useEffect)(()=>{if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&i(e)}catch(e){}},[]);var{x:s,y:o,width:a,height:l,radius:u,className:c}=t,{animationEasing:h,animationDuration:d,animationBegin:f,isAnimationActive:p,isUpdateAnimationActive:m}=t,g=(0,JR.useRef)(a),v=(0,JR.useRef)(l),y=(0,JR.useRef)(s),b=(0,JR.useRef)(o),w=GB((0,JR.useMemo)(()=>({x:s,y:o,width:a,height:l,radius:u}),[s,o,a,l,u]),"rectangle-");if(s!==+s||o!==+o||a!==+a||l!==+l||0===a||0===l)return null;var x=(0,JI.clsx)("recharts-rectangle",c);if(!m){var S=kj(t),{radius:_}=S,M=JW(S,JD);return JR.createElement("path",JU({},M,{x:EX(s),y:EX(o),width:EX(a),height:EX(l),radius:"number"==typeof u?u:void 0,className:x,d:JY(s,o,a,l,u)}))}var O=g.current,E=v.current,P=y.current,k=b.current,A="0px ".concat(-1===n?1:n,"px"),j="".concat(n,"px 0px"),C=G8(["strokeDasharray"],d,"string"==typeof h?h:Jq.animationEasing);return JR.createElement(Jj,{animationId:w,key:w,canBegin:n>0,duration:d,easing:h,isActive:m,begin:f},e=>{var n,i=E7(O,a,e),c=E7(E,l,e),h=E7(P,s,e),d=E7(k,o,e);r.current&&(g.current=i,v.current=c,y.current=h,b.current=d),n=p?e>0?{transition:C,strokeDasharray:j}:{strokeDasharray:A}:{strokeDasharray:j};var f=kj(t),{radius:m}=f,w=JW(f,JL);return JR.createElement("path",JU({},w,{radius:"number"==typeof u?u:void 0,className:x,d:JY(h,d,i,c,u),ref:r,style:Jz(Jz({},n),t.style)}
22))})},JJ=ex,JX=ky;function JQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function JZ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?JQ(Object(r),!0).forEach(function(t){J0(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JQ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function J0(e,t,r){return(t=J1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J1(e){var t=J2(e,"string");return"symbol"==typeof t?t:t+""}function J2(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function J3(){return(J3=Object.assign.bind()).apply(null,arguments)}function J5(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var J4=(e,t,r,n,i)=>{var s=r-n;return EQ(Q||(Q=J5(["M ",",",""])),e,t)+EQ(Z||(Z=J5(["L ",",",""])),e+r,t)+EQ(ee||(ee=J5(["L ",",",""])),e+r-s/2,t+i)+EQ(et||(et=J5(["L ",",",""])),e+r-s/2-n,t+i)+EQ(er||(er=J5(["L ",","," Z"])),e,t)},J8={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},J6=e=>{var t=k9(e,J8),{x:r,y:n,upperWidth:i,lowerWidth:s,height:o,className:a}=t,{animationEasing:l,animationDuration:u,animationBegin:c,isUpdateAnimationActive:h}=t,d=(0,JJ.useRef)(null),[f,p]=(0,JJ.useState)(-1),m=(0,JJ.useRef)(i),g=(0,JJ.useRef)(s),v=(0,JJ.useRef)(o),y=(0,JJ.useRef)(r),b=(0,JJ.useRef)(n),w=GB(e,"trapezoid-");if((0,JJ.useEffect)(()=>{if(d.current&&d.current.getTotalLength)try{var e=d.current.getTotalLength();e&&p(e)}catch(e){}},[]),r!==+r||n!==+n||i!==+i||s!==+s||o!==+o||0===i&&0===s||0===o)return null;var x=(0,JX.clsx)("recharts-trapezoid",a);if(!h)return JJ.createElement("g",null,JJ.createElement("path",J3({},kj(t),{className:x,d:J4(r,n,i,s,o)})));var S=m.current,_=g.current,M=v.current,O=y.current,E=b.current,P="0px ".concat(-1===f?1:f,"px"),k="".concat(f,"px 0px"),A=G8(["strokeDasharray"],u,l);return JJ.createElement(Jj,{animationId:w,key:w,canBegin:f>0,duration:u,easing:l,isActive:h,begin:c},e=>{var a=E7(S,i,e),l=E7(_,s,e),u=E7(M,o,e),c=E7(O,r,e),h=E7(E,n,e);d.current&&(m.current=a,g.current=l,v.current=u,y.current=c,b.current=h);var f=e>0?{transition:A,strokeDasharray:k}:{strokeDasharray:P};return JJ.createElement("path",J3({},kj(t),{className:x,d:J4(c,h,a,l,u),ref:d,style:JZ(JZ({},f),t.style)}))})},J7=ex,J9=ky;function Xe(){return(Xe=Object.assign.bind()).apply(null,arguments)}function Xt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Xr=(e,t)=>EZ(t-e)*Math.min(Math.abs(t-e),359.999),Xn=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:s,isExternal:o,cornerRadius:a,cornerIsExternal:l}=e,u=a*(o?1:-1)+n,c=Math.asin(a/u)/AO,h=l?i:i+s*c,d=AP(t,r,u,h),f=AP(t,r,n,h),p=l?i-s*c:i;return{center:d,circleTangency:f,lineTangency:AP(t,r,u*Math.cos(c*AO),p),theta:c}},Xi=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:s,endAngle:o}=e,a=Xr(s,o),l=s+a,u=AP(t,r,i,s),c=AP(t,r,i,l),h=EQ(en||(en=Xt(["M ",",","\n    A ",",",",0,\n    ",",",",\n    ",",","\n  "])),u.x,u.y,i,i,+(Math.abs(a)>180),+(s>l),c.x,c.y);if(n>0){var d=AP(t,r,n,s),f=AP(t,r,n,l);h+=EQ(ei||(ei=Xt(["L ",",","\n            A ",",",",0,\n            ",",",",\n            ",","," Z"])),f.x,f.y,n,n,+(Math.abs(a)>180),+(s<=l),d.x,d.y)}else h+=EQ(es||(es=Xt(["L ",","," Z"])),t,r);return h},Xs=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:s,forceCornerRadius:o,cornerIsExternal:a,startAngle:l,endAngle:u}=e,c=EZ(u-l),{circleTangency:h,lineTangency:d,theta:f}=Xn({cx:t,cy:r,radius:i,angle:l,sign:c,cornerRadius:s,cornerIsExternal:a}),{circleTangency:p,lineTangency:m,theta:g}=Xn({cx:t,cy:r,radius:i,angle:u,sign:-c,cornerRadius:s,cornerIsExternal:a}),v=a?Math.abs(l-u):Math.abs(l-u)-f-g;if(v<0)return o?EQ(eo||(eo=Xt(["M ",",","\n        a",",",",0,0,1,",",0\n        a",",",",0,0,1,",",0\n      "])),d.x,d.y,s,s,2*s,s,s,-(2*s)):Xi({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:l,endAngle:u});var y=EQ(ea||(ea=Xt(["M ",",","\n    A",",",",0,0,",",",",","\n    A",",",",0,",",",",",",","\n    A",",",",0,0,",",",",","\n  "])),d.x,d.y,s,s,+(c<0),h.x,h.y,i,i,+(v>180),+(c<0),p.x,p.y,s,s,+(c<0),m.x,m.y);if(n>0){var{circleTangency:b,lineTangency:w,theta:x}=Xn({cx:t,cy:r,radius:n,angle:l,sign:c,isExternal:!0,cornerRadius:s,cornerIsExternal:a}),{circleTangency:S,lineTangency:_,theta:M}=Xn({cx:t,cy:r,radius:n,angle:u,sign:-c,isExternal:!0,cornerRadius:s,cornerIsExternal:a}),O=a?Math.abs(l-u):Math.abs(l-u)-x-M;if(O<0&&0===s)return"".concat(y,"L").concat(t,",").concat(r,"Z");y+=EQ(el||(el=Xt(["L",",","\n      A",",",",0,0,",",",",","\n      A",",",",0,",",",",",",","\n      A",",",",0,0,",",",",","Z"])),_.x,_.y,s,s,+(c<0),S.x,S.y,n,n,+(O>180),+(c>0),b.x,b.y,s,s,+(c<0),w.x,w.y)}else y+=EQ(eu||(eu=Xt(["L",",","Z"])),t,r);return y},Xo={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Xa=e=>{var t,r=k9(e,Xo),{cx:n,cy:i,innerRadius:s,outerRadius:o,cornerRadius:a,forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:h,className:d}=r;if(o<s||c===h)return null;var f=(0,J9.clsx)("recharts-sector",d),p=o-s,m=E8(a,p,0,!0);return t=m>0&&360>Math.abs(c-h)?Xs({cx:n,cy:i,innerRadius:s,outerRadius:o,cornerRadius:Math.min(m,p/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:h}):Xi({cx:n,cy:i,innerRadius:s,outerRadius:o,startAngle:c,endAngle:h}),J7.createElement("path",Xe({},kj(r),{className:f,d:t}))},Xl=ex;let Xu=Math.PI,Xc=2*Xu,Xh=1e-6,Xd=Xc-1e-6;function Xf(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Xp(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Xf;let r=10**t;return function(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=Math.round(arguments[t]*r)/r+e[t]}}class Xm{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Xf:Xp(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,r,n){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(e,t,r,n,i,s){this._append`C${+e},${+t},${+r},${+n}
22,${this._x1=+i},${this._y1=+s}`}arcTo(e,t,r,n,i){if(e*=1,t*=1,r*=1,n*=1,(i*=1)<0)throw Error(`negative radius: ${i}`);let s=this._x1,o=this._y1,a=r-e,l=n-t,u=s-e,c=o-t,h=u*u+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(h>Xh)if(Math.abs(c*a-l*u)>Xh&&i){let d=r-s,f=n-o,p=a*a+l*l,m=Math.sqrt(p),g=Math.sqrt(h),v=i*Math.tan((Xu-Math.acos((p+h-(d*d+f*f))/(2*m*g)))/2),y=v/g,b=v/m;Math.abs(y-1)>Xh&&this._append`L${e+y*u},${t+y*c}`,this._append`A${i},${i},0,0,${+(c*d>u*f)},${this._x1=e+b*a},${this._y1=t+b*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,r,n,i,s){if(e*=1,t*=1,r*=1,s=!!s,r<0)throw Error(`negative radius: ${r}`);let o=r*Math.cos(n),a=r*Math.sin(n),l=e+o,u=t+a,c=1^s,h=s?n-i:i-n;null===this._x1?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Xh||Math.abs(this._y1-u)>Xh)&&this._append`L${l},${u}`,r&&(h<0&&(h=h%Xc+Xc),h>Xd?this._append`A${r},${r},0,1,${c},${e-o},${t-a}A${r},${r},0,1,${c},${this._x1=l},${this._y1=u}`:h>Xh&&this._append`A${r},${r},0,${+(h>=Xu)},${c},${this._x1=e+r*Math.cos(i)},${this._y1=t+r*Math.sin(i)}`)}rect(e,t,r,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r*=1}v${+n}h${-r}Z`}toString(){return this._}}function Xg(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(null==r)t=null;else{let e=Math.floor(r);if(!(e>=0))throw RangeError(`invalid digits: ${r}`);t=e}return e},()=>new Xm(t)}Xm.prototype;let Xv=Math.cos,Xy=Math.sin,Xb=Math.sqrt,Xw=Math.PI,Xx=2*Xw;Xb(3);let XS={draw(e,t){let r=Xb(t/Xw);e.moveTo(r,0),e.arc(0,0,r,0,Xx)}},X_={draw(e,t){let r=Xb(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},XM=Xb(1/3),XO=2*XM,XE={draw(e,t){let r=Xb(t/XO),n=r*XM;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},XP={draw(e,t){let r=Xb(t),n=-r/2;e.rect(n,n,r,r)}},Xk=.8908130915292852,XA=Xy(Xw/10)/Xy(7*Xw/10),Xj=Xy(Xx/10)*XA,XC=-Xv(Xx/10)*XA,XN={draw(e,t){let r=Xb(t*Xk),n=Xj*r,i=XC*r;e.moveTo(0,-r),e.lineTo(n,i);for(let t=1;t<5;++t){let s=Xx*t/5,o=Xv(s),a=Xy(s);e.lineTo(a*r,-o*r),e.lineTo(o*n-a*i,a*n+o*i)}e.closePath()}},XT=Xb(3),XR={draw(e,t){let r=-Xb(t/(3*XT));e.moveTo(0,2*r),e.lineTo(-XT*r,-r),e.lineTo(XT*r,-r),e.closePath()}};Xb(3);let XI=-.5,XD=Xb(3)/2,XL=1/Xb(12),XV=(XL/2+1)*3,Xz={draw(e,t){let r=Xb(t/XV),n=r/2,i=r*XL,s=n,o=r*XL+r,a=-s,l=o;e.moveTo(n,i),e.lineTo(s,o),e.lineTo(a,l),e.lineTo(XI*n-XD*i,XD*n+XI*i),e.lineTo(XI*s-XD*o,XD*s+XI*o),e.lineTo(XI*a-XD*l,XD*a+XI*l),e.lineTo(XI*n+XD*i,XI*i-XD*n),e.lineTo(XI*s+XD*o,XI*o-XD*s),e.lineTo(XI*a+XD*l,XI*l-XD*a),e.closePath()}};function XF(e,t){let r=null,n=Xg(i);function i(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return e="function"==typeof e?e:Pa(e||XS),t="function"==typeof t?t:Pa(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:Pa(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:Pa(+e),i):t},i.context=function(e){return arguments.length?(r=null==e?null:e,i):r},i}var XB=ky,X$=["type","size","sizeType"];function XU(){return(XU=Object.assign.bind()).apply(null,arguments)}function XW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function XH(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?XW(Object(r),!0).forEach(function(t){XK(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XW(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function XK(e,t,r){return(t=XY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XY(e){var t=Xq(e,"string");return"symbol"==typeof t?t:t+""}function Xq(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}
22function XG(e,t){if(null==e)return{};var r,n,i=XJ(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function XJ(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var XX={symbolCircle:XS,symbolCross:X_,symbolDiamond:XE,symbolSquare:XP,symbolStar:XN,symbolTriangle:XR,symbolWye:Xz},XQ=Math.PI/180,XZ=e=>XX["symbol".concat(Pt(e))]||XS,X0=(e,t,r)=>{if("area"===t)return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var n=18*XQ;return 1.25*e*e*(Math.tan(n)-Math.tan(2*n)*Math.tan(n)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},X1=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=XH(XH({},XG(e,X$)),{},{type:t,size:r,sizeType:n}),s="circle";"string"==typeof t&&(s=t);var o=()=>{var e=XZ(s),t=XF().type(e).size(X0(r,n,s))();if(null!==t)return t},{className:a,cx:l,cy:u}=i,c=kj(i);return E2(l)&&E2(u)&&E2(r)?Xl.createElement("path",XU({}
vendor: 6,600 bytes, line 22
22,c,{className:(0,XB.clsx)("recharts-symbols",a),transform:"translate(".concat(l,", ").concat(u,")"),d:o()})):null};X1.registerSymbol=(e,t)=>{XX["symbol".concat(Pt(e))]=t};var X2=ex;function X3(e){this._context=e}function X5(e){return new X3(e)}function X4(e){return e[0]}function X8(e){return e[1]}function X6(e,t){var r=Pa(!0),n=null,i=X5,s=null,o=Xg(a);function a(a){var l,u,c,h=(a=Po(a)).length,d=!1;for(null==n&&(s=i(c=o())),l=0;l<=h;++l)!(l<h&&r(u=a[l],l,a))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+e(u,l,a),+t(u,l,a));if(c)return s=null,c+""||null}return e="function"==typeof e?e:void 0===e?X4:Pa(e),t="function"==typeof t?t:void 0===t?X8:Pa(t),a.x=function(t){return arguments.length?(e="function"==typeof t?t:Pa(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:Pa(+e),a):t},a.defined=function(e){return arguments.length?(r="function"==typeof e?e:Pa(!!e),a):r},a.curve=function(e){return arguments.length?(i=e,null!=n&&(s=i(n)),a):i},a.context=function(e){return arguments.length?(null==e?n=s=null:s=i(n=e),a):n},a}function X7(e,t,r){var n=null,i=Pa(!0),s=null,o=X5,a=null,l=Xg(u);function u(u){var c,h,d,f,p,m=(u=Po(u)).length,g=!1,v=Array(m),y=Array(m);for(null==s&&(a=o(p=l())),c=0;c<=m;++c){if(!(c<m&&i(f=u[c],c,u))===g)if(g=!g)h=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=c-1;d>=h;--d)a.point(v[d],y[d]);a.lineEnd(),a.areaEnd()}g&&(v[c]=+e(f,c,u),y[c]=+t(f,c,u),a.point(n?+n(f,c,u):v[c],r?+r(f,c,u):y[c]))}if(p)return a=null,p+""||null}function c(){return X6().defined(i).curve(o).context(s)}return e="function"==typeof e?e:void 0===e?X4:Pa(+e),t="function"==typeof t?t:void 0===t?Pa(0):Pa(+t),r="function"==typeof r?r:void 0===r?X8:Pa(+r),u.x=function(t){return arguments.length?(e="function"==typeof t?t:Pa(+t),n=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:Pa(+t),u):e},u.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:Pa(+e),u):n},u.y=function(e){return arguments.length?(t="function"==typeof e?e:Pa(+e),r=null,u):t},u.y0=function(e){return arguments.length?(t="function"==typeof e?e:Pa(+e),u):t},u.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Pa(+e),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(e){return arguments.length?(i="function"==typeof e?e:Pa(!!e),u):i},u.curve=function(e){return arguments.length?(o=e,null!=s&&(a=o(s)),u):o},u.context=function(e){return arguments.length?(null==e?s=a=null:a=o(s=e),u):s},u}function X9(){}function Qe(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Qt(e){this._context=e}function Qr(e){return new Qt(e)}function Qn(e){this._context=e}function Qi(e){return new Qn(e)}function Qs(e){this._context=e}function Qo(e){return new Qs(e)}X3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Qe(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Qe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Qn.prototype={areaStart:X9,areaEnd:X9,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Qe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Qs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Qe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};class Qa{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function Ql(e){return new Qa(e,!0)}function Qu(e){return new Qa(e,!1)}function Qc(e){this._context=e}function Qh(e){return new Qc(e)}function Qd(e){return e<0?-1:1}function Qf(e,t,r){var n=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),a=(s*i+o*n)/(n+i);return(Qd(s)+Qd(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a)
22)||0}function Qp(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Qm(e,t,r){var n=e._x0,i=e._y0,s=e._x1,o=e._y1,a=(s-n)/3;e._context.bezierCurveTo(n+a,i+a*t,s-a,o-a*r,s,o)}function Qg(e){this._context=e}function Qv(e){this._context=new Qy(e)}function Qy(e){this._context=e}function Qb(e){return new Qg(e)}function Qw(e){return new Qv(e)}function Qx(e){this._context=e}function QS(e){var t,r,n=e.length-1,i=Array(n),s=Array(n),o=Array(n);for(i[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/s[t];for(t=0,s[n-1]=(e[n]+i[n-1])/2;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function Q_(e){return new Qx(e)}function QM(e,t){this._context=e,this._t=t}Qc.prototype={areaStart:X9,areaEnd:X9,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e*=1,t*=1,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},Qg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Qm(this,this._t0,Qp(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(t*=1,(e*=1)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Qm(this,Qp(this,r=Qf(this,e,t)),r);break;default:Qm(this,this._t0,r=Qf(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}},(Qv.prototype=Object.create(Qg.prototype)).point=function(e,t){Qg.prototype.point.call(this,t,e)},Qy.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,s){this._context.bezierCurveTo(t,e,n,r,s,i)}},Qx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===r)this._context.lineTo(e[1],t[1]);else for(var n=QS(e),i=QS(t),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(n[0][s],i[0][s],n[1][s],i[1][s],e[o],t[o]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},QM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}};var QO=ky;function QE(){return(QE=Object.assign.bind()).apply(null,arguments)}function QP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Qk(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?QP(Object(r),!0).forEach(function(t){QA(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QP(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function QA(e,t,r){return(t=Qj(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qj(e){var t=QC(e,"string");return"symbol"==typeof t?t:t+""}function QC(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var QN={curveBasisClosed:Qi,curveBasisOpen:Qo,curveBasis:Qr,curveBumpX:Ql,curveBumpY:Qu,curveLinearClosed:Qh,curveLinear:X5,curveMonotoneX:Qb,curveMonotoneY:Qw,curveNatural:Q_,curveStep:function(e){return new QM(e,.5)},curveStepAfter:function(e){return new QM(e,1)},curveStepBefore:function(e){return new QM(e,0)}},QT=e=>Pg(e.x)&&Pg(e.y),QR=e=>null!=e.base&&QT(e.base)&&QT(e),QI=e=>e.x,QD=e=>e.y,QL=(e,t)=>{if("function"==typeof e)return e;var r="curve".concat(Pt(e));if(("curveMonotone"===r||"curveBump"===r)&&t){var n=QN["".concat(r).concat("vertical"===t?"Y":"X")];if(n)return n}return QN[r]||X5},QV=!1,Qz="linear",QF=e=>{var t,{type:r=Qz,points:n=[],baseLine:i,layout:s,connectNulls:o=QV}=e,a=QL(r,s),l=o?n.filter(QT):n;if(Array.isArray(i)){var u,c=n.map((e,t)=>Qk(Qk({},e),{},{base:i[t]}));return(u="vertical"===s?X7().y(QD).x1(QI).x0(e=>e.base.x):X7().x(QI).y1(QD).y0(e=>e.base.y)).defined(QR).curve(a)(o?c.filter(QR):c)}return(t="vertical"===s&&E2(i)?X7().y(QD).x1(QI).x0(i):E2(i)?X7().x(QI).y1(QD).y0(i):X6().x(QI).y(QD)).defined(QT).curve(a)(l)},QB=e=>{var{className:t,points:r,path:n,pathRef:i}=e,s=TT();if((!r||!r.length)&&!n)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||s,connectNulls:e.connectNulls},a=r&&r.length?QF(o):n;return X2.createElement("path",QE({},kk(e),IR(e),{className:(0,QO.clsx)("recharts-curve",t),d:null===a?void 0:a,ref:i}))},Q$=["option","shapeType","activeClassName"];function QU(e,t){if(null==e)return{};var r,n,i=QW(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function QW(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function QH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function QK(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?QH(Object(r),!0).forEach(function(t){QY(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QH(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function QY(e,t,r){return(t=Qq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qq(e){var t=QG(e,"string");return"symbol"==typeof t?t:t+""}function QG(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function QJ(e,t){return QK(QK({},t),e)}function QX(e,t){return"symbols"===e}function QQ(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return JN.createElement(JG,r);case"trapezoid":return JN.createElement(J6,r);case"sector":return JN.createElement(Xa,r);case"symbols":if(QX(t,r))return JN.createElement(X1,r);break;case"curve":return JN.createElement(QB,r);default:return null}}function QZ(e){return(0,JN.isValidElement)(e)?e.props:e}function Q0(e){var t,{option:r,shapeType:n,activeClassName:i="recharts-active-shape"}=e,s=QU(e,Q$);if((0,JN.isValidElement)(r))t=(0,JN.cloneElement)(r,QK(QK({},s),QZ(r)));else if("function"==typeof r)t=r(s,s.index);else if((0,JT.default)(r)&&"boolean"!=typeof r){var o=QJ(r,s);t=JN.createElement(QQ,{shapeType:n,elementProps:o})}else{var a=s;t=JN.createElement(QQ,{shapeType:n,elementProps:a})}return s.isActive?JN.createElement(kD,{className:i},t):t}var Q1=["id"],Q2=["type","layout","connectNulls","needClip","shape"],Q3=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Q5(){return(Q5=Object.assign.bind()).apply(null,arguments)}function Q4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Q8(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q4(Object(r),!0).forEach(function(t){Q6(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q4(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Q6(e,t,r){return(t=Q7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q7(e){var t=Q9(e,"string");return"symbol"==typeof t?t:t+""}function Q9(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ze(e,t){if(null==e)return{};var r,n,i=Zt(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zt(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var Zr=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:s}=e;return[{inactive:s,dataKey:t,type:i,color:n,value:P$(r,t),payload:e}]},Zn=qk.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:s,name:o,hide:a,unit:l,tooltipType:u,id:c}=e,h={dataDefinedOnItem:r,getPosition:Pn,settings:{stroke:n,strokeWidth:i,fill:s,dataKey:t,nameKey:void 0,name:P$(o,t),hide:a,type:u,color:n,unit:l,graphicalItemId:c}};return qk.createElement(Gy,{tooltipEntrySettings:h})}),Zi=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function Zs(e,t){for(var r=e.length%2!=0?[...e,0]:e,n=[],i=0;i<t;++i)n=[...n,...r];return n}var Zo=(e,t,r)=>{var n=r.reduce((e,t)=>e+t);if(!n)return Zi(t,e);for(var i=Math.floor(e/n),s=e%n,o=t-e,a=[],l=0,u=0;l<r.length;u+=null!=(c=r[l])?c:0,++l){var c,h=r[l];if(null!=h&&u+h>s){a=[...r.slice(0,l),s-u];break}}var d=a.length%2==0?[0,o]:[o];return[...Zs(r,i),...a,...d].map(e=>"".concat(e,"px")).join(", ")};function Za(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:s,needClip:o}=n,{id:a}=n,l=kk(Ze(n,Q1));return qk.createElement(Gl,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:s,baseProps:l,needClip:o,clipPathId:t})}function Zl(e){var{showLabels:t,children:r,points:n}=e,i=(0,qk.useMemo)(()=>null==n?void 0:n.map(e=>{var t,r,n={x:null!=(t=e.x)?t:0,y:null!=(r=e.y)?r:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Q8(Q8({},n),{},{value:e.value,payload:e.payload,viewBox:n,parentViewBox:void 0,fill:void 0})}),[n]);return qk.createElement(qz,{value:t?i:void 0},r)}function Zu(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:s}=e,{type:o,layout:a,connectNulls:l,needClip:u,shape:c}=s,h=Q8(Q8({},kj(Ze(s,Q2))),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(t,")"):void 0,points:n,type:o,layout:a,connectNulls:l,strokeDasharray:null!=i?i:s.strokeDasharray});return qk.createElement(qk.Fragment,null,(null==n?void 0:n.length)>1&&qk.createElement(Q0,Q5({shapeType:"curve",option:c},h,{pathRef:r})),qk.createElement(Za,{points:n,clipPathId:t,props:s}))}function Zc(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}function Zh(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:s}=e,{points:o,strokeDasharray:a,isAnimationActive:l,animationBegin:u,animationDuration:c,animationEasing:h,animateNewValues:d,width:f,height:p,onAnimationEnd:m,onAnimationStart:g}=r,v=i.current,y=GB(o,"recharts-line-"),b=(0,qk.useRef)(y),[w,x]=(0,qk.useState)(!1),S=!w,_=(0,qk.useCallback)(()=>{"function"==typeof m&&m(),x(!1)},[m]),M=(0,qk.useCallback)(()=>{"function"==typeof g&&g(),x(!0)},[g]),O=Zc(n.current),E=(0,qk.useRef)(0);b.current!==y&&(E.current=s.current,b.current=y);var P=E.current;return qk.createElement(Zl,{points:o,showLabels:S},r.children,qk.createElement(Jj,{animationId:y,begin:u,duration:c,isActive:l,easing:h,onAnimationEnd:_,onAnimationStart:M,key:y},e=>{var u,c=Math.min(E7(P,O+P,e),O);if(u=l?a?Zo(c,O,"".concat(a).split(/[,\s]+/gim).map(e=>parseFloat(e))):Zi(O,c):null==a?void 0:String(a),e>0&&O>0&&(i.current=o,s.current=Math.max(s.current,c)),v){var h=v.length/o.length,m=1===e?o:o.map((t,r)=>{var n=Math.floor(r*h);if(v[n]){var i=v[n];return Q8(Q8({},t),{},{x:E7(i.x,t.x,e),y:E7(i.y,t.y,e)})}return d?Q8(Q8({},t),{}
22,{x:E7(2*f,t.x,e),y:E7(p/2,t.y,e)}):Q8(Q8({},t),{},{x:t.x,y:t.y})});return i.current=m,qk.createElement(Zu,{props:r,points:m,clipPathId:t,pathRef:n,strokeDasharray:u})}return qk.createElement(Zu,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:u})}),qk.createElement(qH,{label:r.label}))}function Zd(e){var{clipPathId:t,props:r}=e,n=(0,qk.useRef)(null),i=(0,qk.useRef)(0),s=(0,qk.useRef)(null);return qk.createElement(Zh,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:s})}var Zf=(e,t)=>{var r,n;return{x:null!=(r=e.x)?r:void 0,y:null!=(n=e.y)?n:void 0,value:e.value,errorVal:P_(e.payload,t)}};class Zp extends qk.Component{render(){var{hide:e,dot:t,points:r,className:n,xAxisId:i,yAxisId:s,top:o,left:a,width:l,height:u,id:c,needClip:h,zIndex:d}=this.props;if(e)return null;var f=(0,qA.clsx)("recharts-line",n),p=c,{r:m,strokeWidth:g}=JC(t),v=q8(t),y=2*m+g,b=h?"url(#clipPath-".concat(v?"":"dots-").concat(p,")"):void 0;return qk.createElement(R9,{zIndex:d},qk.createElement(kD,{className:f},h&&qk.createElement("defs",null,qk.createElement(Gk,{clipPathId:p,xAxisId:i,yAxisId:s}),!v&&qk.createElement("clipPath",{id:"clipPath-dots-".concat(p)},qk.createElement("rect",{x:a-y/2,y:o-y/2,width:l+y,height:u+y}))),qk.createElement(GO,{xAxisId:i,yAxisId:s,data:r,dataPointFormatter:Zf,errorBarOffset:0},qk.createElement(Zd,{props:this.props,clipPathId:p}))),qk.createElement(Gg,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:b}))}}var Zm={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:TV.line,type:"linear"};function Zg(e){var t=k9(e,Zm),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:s,animationEasing:o,connectNulls:a,dot:l,hide:u,isAnimationActive:c,label:h,legendType:d,xAxisId:f,yAxisId:p,id:m}=t,g=Ze(t,Q3),{needClip:v}=GP(f,p),y=qp(),b=TT(),w=N8(),x=AU(e=>GD(e,f,p,w,m));if("horizontal"!==b&&"vertical"!==b||null==x||null==y)return null;var{height:S,width:_,x:M,y:O}=y;return qk.createElement(Zp,Q5({},g,{id:m,connectNulls:a,dot:l,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:s,animationEasing:o,isAnimationActive:c,hide:u,label:h,legendType:d,xAxisId:f,yAxisId:p,points:x,layout:b,height:S,width:_,left:M,top:O,needClip:v}))}function Zv(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:s,dataKey:o,bandSize:a,displayedData:l}=e;return l.map((e,l)=>{var u=P_(e,o);if("horizontal"===t){var c=PN({axis:r,ticks:i,bandSize:a,entry:e,index:l}),h=Pe(u)?null:n.scale.map(u);return{x:c,y:null!=h?h:null,value:u,payload:e}}var d=Pe(u)?null:r.scale.map(u),f=PN({axis:n,ticks:s,bandSize:a,entry:e,index:l});return null==d||null==f?null:{x:d,y:f,value:u,payload:e}}).filter(Boolean)}function Zy(e){var t=k9(e,Zm),r=N8();return qk.createElement(Gq,{id:t.id,type:"line"},e=>qk.createElement(qk.Fragment,null,qk.createElement(GV,{legendPayload:Zr(t)}),qk.createElement(Zn,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),qk.createElement(GX,{type:"line",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),qk.createElement(Zg,Q5({},t,{id:e}))))}var Zb=qk.memo(Zy,Yc);Zb.displayName="Line";var Zw=ex,Zx=EG,ZS=ky,Z_=e=>e.graphicalItems.polarItems,ZM=Cg([Be,Bt],BC),ZO=Cg([Z_,BP,ZM],BR),ZE=Cg([ZO],Bz),ZP=Cg([ZE,FD],BB),Zk=Cg([ZP,BP,ZO],BU);Cg([ZP,BP,ZO],(e,t,r)=>r.length>0?e.flatMap(e=>r.flatMap(r=>{var n;return{value:P_(e,null!=(n=t.dataKey)?n:r.dataKey),errorDomain:[]}})).filter(Boolean):(null==t?void 0:t.dataKey)!=null?e.map(e=>({value:P_(e,t.dataKey),errorDomain:[]})):e.map(e=>({value:e,errorDomain:[]})));var ZA=()=>void 0,Zj=Cg([ZP,BP,ZO,B6,Be],$e),ZC=Cg([BP,B5,B4,ZA,Zj,ZA,TN,Be],$w),ZN=Cg([BP,TN,ZP,Zk,F3,Be,ZC],$_),ZT=Cg([ZN,BA,$P],$A),ZR=Cg([BP,ZN,ZT,Be],$C);function ZI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ZD(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?ZI(Object(r),!0).forEach(function(t){ZL(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZI(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ZL(e,t,r){return(t=ZV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZV(e){var t=Zz(e,"string");return"symbol"==typeof t?t:t+""}function Zz(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Cg([$P,ZR],Bd);var ZF=Cg([Z_,(e,t)=>t],(e,t)=>e.filter(e=>"pie"===e.type).find(e=>e.id===t)),ZB=[],Z$=(e,t,r)=>(null==r?void 0:r.length)===0?ZB:r,ZU=Cg([FD,ZF,Z$],(e,t,r)=>{var n,{chartData:i}=e;if(null!=t&&((n=(null==t?void 0:t.data)!=null&&t.data.length>0?t.data:i)&&n.length||null==r||(n=r.map(e=>ZD(ZD({},t.presentationProps),e.props))),null!=n))return n}),ZW=Cg([ZU,ZF,Z$],(e,t,r)=>{if(null!=e&&null!=t)return e.map((e,n)=>{var i,s,o=P_(e,t.nameKey,t.name);return s=null!=r&&null!=(i=r[n])&&null!=(i=i.props)&&i.fill?r[n].props.fill:"object"==typeof e&&null!=e&&"fill"in e?e.fill:t.fill,{value:P$(o,t.dataKey),color:s,payload:e,type:t.legendType}})}),ZH=Cg([ZU,ZF,Z$,N1],(e,t,r,n)=>{if(null!=t&&null!=e)return eel({offset:n,pieSettings:t,displayedData:e,cells:r})}),ZK=(e,t,r)=>{var n=Az();return(i,s)=>o=>{null==e||e(i,s,o),n(U6({activeIndex:String(s),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},ZY=e=>{var t=Az();return(r,n)=>i=>{null==e||e(r,n,i),t(U7())}},Zq=(e,t,r)=>{var n=Az();return(i,s)=>o=>{null==e||e(i,s,o),n(We({activeIndex:String(s),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},ZG=["key"],ZJ=["onMouseEnter","onClick","onMouseLeave"],ZX=["id"],ZQ=["id"];function ZZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Z0(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ZZ(Object(r),!0).forEach(function(t){Z1(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZZ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Z1(e,t,r){return(t=Z2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z2(e){var t=Z3(e,"string");return"symbol"==typeof t?t:t+""}function Z3(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Z5(){return(Z5=Object.assign.bind()).apply(null,arguments)}function Z4(e,t){if(null==e)return{};var r,n,i=Z8(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Z8(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function Z6(e){var t=(0,Zw.useMemo)(()=>q4(e.children,UC),[e.children]),r=AU(r=>ZW(r,e.id,t));return null==r?null:Zw.createElement(Gz,{legendPayload:r})}var Z7=Zw.memo(e=>{var{dataKey:t,nameKey:r,sectors:n,stroke:i,strokeWidth:s,fill:o,name:a,hide:l,tooltipType:u,id:c}=e,h={dataDefinedOnItem:n.map(e=>e.tooltipPayload),getPosition:e=>{var t;return null==(t=n[Number(e)])?void 0:t.tooltipPosition},settings:{stroke:i,strokeWidth:s,fill:o,dataKey:t,nameKey:r,name:P$(a,t),hide:l,type:u,color:o,unit:"",graphicalItemId:c}};return Zw.createElement(Gy,{tooltipEntrySettings:h})}),Z9=(e,t)=>e>t?"start":e<t?"end":"middle",eee=(e,t,r)=>"function"==typeof t?E8(t(e),r,.8*r):E8(t,r,.8*r),eet=(e,t,r)=>{var{top:n,left:i,width:s,height:o}=t,a=Ak(s,o),l=i+E8(e.cx,s,s/2),u=n+E8(e.cy,o,o/2),c=E8(e.innerRadius,a,0);return{cx:l,cy:u,innerRadius:c,outerRadius:eee(r,e.outerRadius,a),maxRadius:e.maxRadius||Math.sqrt(s*s+o*o)/2}},eer=(e,t)=>EZ(t-e)*Math.min(Math.abs(t-e),360),een=(e,t)=>{if(Zw.isValidElement(e))return Zw.cloneElement(e,t);if("function"==typeof e)return e(t);var r=(0,ZS.clsx)("recharts-pie-label-line","boolean"!=typeof e?e.className:""),{key:n}=t,i=Z4(t,ZG);return Zw.createElement(QB,Z5({},i,{type:"linear",className:r}))},eei=(e,t,r)=>{if(Zw.isValidElement(e))return Zw.cloneElement(e,t);var n=r;if("function"==typeof e&&(n=e(t),Zw.isValidElement(n)))return n;var i=(0,ZS.clsx)("recharts-pie-label-text",IV(e));return Zw.createElement(Av,Z5({},t,{alignmentBaseline:"middle",className:i}),n)};function ees(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:s,dataKey:o}=r;if(!n||!i||!t)return null;var a=kk(r),l=kA(i),u=kA(s),c="object"==typeof i&&"offsetRadius"in i&&"number"==typeof i.offsetRadius&&i.offsetRadius||20,h=t.map((e,t)=>{var r=(e.startAngle+e.endAngle)/2,n=AP(e.cx,e.cy,e.outerRadius+c,r),h=Z0(Z0(Z0(Z0({},a),e),{},{stroke:"none"},l),{},{index:t,textAnchor:Z9(n.x,e.cx)},n),d=Z0(Z0(Z0(Z0({},a),e),{},{fill:"none",stroke:e.fill},u),{},{index:t,points:[AP(e.cx,e.cy,e.outerRadius,r),n],key:"line"});return Zw.createElement(R9,{zIndex:TV.label,key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(t)},Zw.createElement(kD,null,s&&een(s,d),eei(i,h,P_(e,o))))});return Zw.createElement(kD,{className:"recharts-pie-labels"},h)}function eeo(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return"object"==typeof i&&null!=i&&"position"in i?Zw.createElement(qH,{label:i}):Zw.createElement(ees,{sectors:t,props:r,showLabels:n})}function eea(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i,shape:s,id:o}
22=e,a=AU(Hm),l=AU(Hv),u=AU(Hy),{onMouseEnter:c,onClick:h,onMouseLeave:d}=i,f=Z4(i,ZJ),p=ZK(c,i.dataKey,o),m=ZY(d),g=Zq(h,i.dataKey,o);return null==t||0===t.length?null:Zw.createElement(Zw.Fragment,null,t.map((e,c)=>{if((null==e?void 0:e.startAngle)===0&&(null==e?void 0:e.endAngle)===0&&1!==t.length)return null;var h=null==u||u===o,d=String(c)===a&&(null==l||i.dataKey===l)&&h,v=a?n:null,y=r&&d?r:v,b=Z0(Z0({},e),{},{stroke:e.stroke,tabIndex:-1,[NY]:c,[Nq]:o});return Zw.createElement(kD,Z5({key:"sector-".concat(null==e?void 0:e.startAngle,"-").concat(null==e?void 0:e.endAngle,"-").concat(e.midAngle,"-").concat(c),tabIndex:-1,className:"recharts-pie-sector"},ID(f,e,c),{onMouseEnter:p(e,c),onMouseLeave:m(e,c),onClick:g(e,c)}),Zw.createElement(Q0,Z5({option:null!=s?s:y,index:c,shapeType:"sector",isActive:d},b)))}))}function eel(e){var t,r,n,{pieSettings:i,displayedData:s,cells:o,offset:a}=e,{cornerRadius:l,startAngle:u,endAngle:c,dataKey:h,nameKey:d,tooltipType:f}=i,p=Math.abs(i.minAngle),m=eer(u,c),g=Math.abs(m),v=s.length<=1?0:null!=(t=i.paddingAngle)?t:0,y=s.filter(e=>0!==P_(e,h,0)).length,b=(g>=360?y:y-1)*v,w=g-y*p-b,x=s.reduce((e,t)=>{var r=P_(t,h,0);return e+(E2(r)?r:0)},0);return x>0&&(r=s.map((e,t)=>{var r,s=P_(e,h,0),c=P_(e,d,t),g=eet(i,a,e),y=(E2(s)?s:0)/x,b=Z0(Z0({},e),o&&o[t]&&o[t].props),S=(r=t?n.endAngle+EZ(m)*v*(0!==s):u)+EZ(m)*((0!==s?p:0)+y*w),_=(r+S)/2,M=(g.innerRadius+g.outerRadius)/2,O=[{name:c,value:s,payload:b,dataKey:h,type:f,graphicalItemId:i.id}],E=AP(g.cx,g.cy,M,_);return n=Z0(Z0(Z0(Z0({},i.presentationProps),{},{percent:y,cornerRadius:"string"==typeof l?parseFloat(l):l,name:c,tooltipPayload:O,midAngle:_,middleRadius:M,tooltipPosition:E},b),g),{},{value:s,dataKey:h,startAngle:r,endAngle:S,payload:b,paddingAngle:EZ(m)*v})})),r}function eeu(e){var{showLabels:t,sectors:r,children:n}=e,i=(0,Zw.useMemo)(()=>t&&r?r.map(e=>({value:e.value,payload:e.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill})):[],[r,t]);return Zw.createElement(qB,{value:t?i:void 0},n)}function eec(e){var{props:t,previousSectorsRef:r,id:n}=e,{sectors:i,isAnimationActive:s,animationBegin:o,animationDuration:a,animationEasing:l,activeShape:u,inactiveShape:c,onAnimationStart:h,onAnimationEnd:d}=t,f=GB(t,"recharts-pie-"),p=r.current,[m,g]=(0,Zw.useState)(!1),v=(0,Zw.useCallback)(()=>{"function"==typeof d&&d(),g(!1)},[d]),y=(0,Zw.useCallback)(()=>{"function"==typeof h&&h(),g(!0)},[h]);return Zw.createElement(eeu,{showLabels:!m,sectors:i},Zw.createElement(Jj,{animationId:f,begin:o,duration:a,isActive:s,easing:l,onAnimationStart:y,onAnimationEnd:v,key:f},e=>{var s,o=[],a=i&&i[0],l=null!=(s=null==a?void 0:a.startAngle)?s:0;return null==i||i.forEach((t,r)=>{var n=p&&p[r],i=r>0?(0,Zx.default)(t,"paddingAngle",0):0;if(n){var s=E7(n.endAngle-n.startAngle,t.endAngle-t.startAngle,e),a=Z0(Z0({},t),{},{startAngle:l+i,endAngle:l+s+i});o.push(a),l=a.endAngle}else{var{endAngle:u,startAngle:c}=t,h=E7(0,u-c,e),d=Z0(Z0({},t),{},{startAngle:l+i,endAngle:l+h+i});o.push(d),l=d.endAngle}}),r.current=o,Zw.createElement(kD,null,Zw.createElement(eea,{sectors:o,activeShape:u,inactiveShape:c,allOtherPieProps:t,shape:t.shape,id:n}))}),Zw.createElement(eeo,{showLabels:!m,sectors:i,props:t}),t.children)}var eeh={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:TV.area};function eed(e){var{id:t}=e,r=Z4(e,ZX),{hide:n,className:i,rootTabIndex:s}=e,o=(0,Zw.useMemo)(()=>q4(e.children,UC),[e.children]),a=AU(e=>ZH(e,t,o)),l=(0,Zw.useRef)(null),u=(0,ZS.clsx)("recharts-pie",i);return n||null==a?(l.current=null,Zw.createElement(kD,{tabIndex:s,className:u})):Zw.createElement(R9,{zIndex:e.zIndex},Zw.createElement(Z7,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:a,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t}),Zw.createElement(kD,{tabIndex:s,className:u},Zw.createElement(eec,{props:Z0(Z0({},r),{},{sectors:a}),previousSectorsRef:l,id:t}
22)))}function eef(e){var t=k9(e,eeh),{id:r}=t,n=Z4(t,ZQ),i=kk(n);return Zw.createElement(Gq,{id:r,type:"pie"},e=>Zw.createElement(Zw.Fragment,null,Zw.createElement(GQ,{type:"pie",id:e,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),Zw.createElement(Z6,Z5({},n,{id:e})),Zw.createElement(eed,Z5({},n,{id:e}))))}eef.displayName="Pie";var eep=ex,eem=ex,eeg=ex;function eev(e){var t=Az();return(0,eeg.useEffect)(()=>{t(KJ(e))},[t,e]),null}var eey=["layout"];function eeb(){return(eeb=Object.assign.bind()).apply(null,arguments)}function eew(e,t){if(null==e)return{};var r,n,i=eex(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function eex(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var eeS={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},ee_=(0,eem.forwardRef)(function(e,t){var r,n=k9(e.categoricalChartProps,eeS),{layout:i}=n,s=eew(n,eey),{chartName:o,defaultTooltipEventType:a,validateTooltipEventTypes:l,tooltipPayloadSearcher:u}=e,c={chartName:o,defaultTooltipEventType:a,validateTooltipEventTypes:l,tooltipPayloadSearcher:u,eventEmitter:void 0};return eem.createElement(Yi,{preloadedState:{options:c},reduxStoreName:null!=(r=n.id)?r:o},eem.createElement(Yo,{chartData:n.data}),eem.createElement(Yd,{layout:i,margin:n.margin}),eem.createElement(Yp,{baseValue:void 0,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),eem.createElement(eev,{cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius}),eem.createElement(qS,eeb({},s,{ref:t})))});function eeM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eeO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eeM(Object(r),!0).forEach(function(t){eeE(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eeM(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eeE(e,t,r){return(t=eeP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eeP(e){var t=eek(e,"string");return"symbol"==typeof t?t:t+""}function eek(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var eeA=["item"],eej=eeO(eeO({},eeS),{},{layout:"centric",startAngle:0,endAngle:360}),eeC=(0,eep.forwardRef)((e,t)=>{var r=k9(e,eej);return eep.createElement(ee_,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:eeA,tooltipPayloadSearcher:UT,categoricalChartProps:r,ref:t})}),eeN=ex,eeT=vE,eeR=ex,eeI=Pi,eeD=ky;function eeL(){return(eeL=Object.assign.bind()).apply(null,arguments)}function eeV(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eez(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?eeV(Object(r),!0).forEach(function(t){eeF(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eeV(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eeF(e,t,r){return(t=eeB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eeB(e){var t=ee$(e,"string");return"symbol"==typeof t?t:t+""}function ee$(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function eeU(e){return Array.isArray(e)&&E3(e[0])&&E3(e[1])?e.join(" ~ "):e}var eeW=" : ",eeH={margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},eeK={display:"block",paddingTop:4,paddingBottom:4,color:"#000"},eeY={},eeq=!1,eeG=e=>{var{separator:t=eeW,contentStyle:r,itemStyle:n,labelStyle:i=eeY,payload:s,formatter:o,itemSorter:a,wrapperClassName:l,labelClassName:u,label:c,labelFormatter:h,accessibilityLayer:d=eeq}=e,f=()=>{if(s&&s.length){var e={padding:0,margin:0},r=(a?(0,eeI.default)(s,a):s).map((e,r)=>{if("none"===e.type)return null;var i=e.formatter||o||eeU,{value:a,name:l}=e,u=a,c=l,h=i(a,l,e,r,s);if(Array.isArray(h))[u,c]=h;else{if(null==h)return null;u=h}var d=eez(eez({},eeK),{},{color:e.color||eeK.color},n);return eeR.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(r),style:d},E3(c)?eeR.createElement("span",{className:"recharts-tooltip-item-name"},c):null,E3(c)?eeR.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,eeR.createElement("span",{className:"recharts-tooltip-item-value"},u),eeR.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return eeR.createElement("ul",{className:"recharts-tooltip-item-list",style:e},r)}return null},p=eez(eez({},eeH),r),m=eez({margin:0},i),g=!Pe(c),v=g?c:"",y=(0,eeD.clsx)("recharts-default-tooltip",l),b=(0,eeD.clsx)("recharts-tooltip-label",u);g&&h&&null!=s&&(v=h(c,s));var w=d?{role:"status","aria-live":"assertive"}:{};return eeR.createElement("div",eeL({className:y,style:p},w),eeR.createElement("p",{className:b,style:m},eeR.isValidElement(v)?v:"".concat(v)),f())},eeJ=ex,eeX=ky,eeQ="recharts-tooltip-wrapper",eeZ={visibility:"hidden"};function ee0(e){var{coordinate:t,translateX:r,translateY:n}=e;return(0,eeX.clsx)(eeQ,{["".concat(eeQ,"-right")]:E2(r)&&t&&E2(t.x)&&r>=t.x,["".concat(eeQ,"-left")]:E2(r)&&t&&E2(t.x)&&r<t.x,["".concat(eeQ,"-bottom")]:E2(n)&&t&&E2(t.y)&&n>=t.y,["".concat(eeQ,"-top")]:E2(n)&&t&&E2(t.y)&&n<t.y})}function ee1(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:s,reverseDirection:o,tooltipDimension:a,viewBox:l,viewBoxDimension:u}=e;if(s&&E2(s[n]))return s[n];var c=r[n]-a-(i>0?i:0),h=r[n]+i;if(t[n])return o[n]?c:h;var d=l[n];return null==d?0:o[n]?c<d?Math.max(h,d):Math.max(c,d):null==u?0:h+a>d+u?Math.max(c,d):Math.max(h,d)}function ee2(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function ee3(e){var t,r,n,{allowEscapeViewBox:i,coordinate:s,offsetTop:o,offsetLeft:a,position:l,reverseDirection:u,tooltipBox:c,useTranslate3d:h,viewBox:d}=e;return{cssProperties:t=c.height>0&&c.width>0&&s?ee2({translateX:r=ee1({allowEscapeViewBox:i,coordinate:s,key:"x",offset:a,position:l,reverseDirection:u,tooltipDimension:c.width,viewBox:d,viewBoxDimension:d.width}),translateY:n=ee1({allowEscapeViewBox:i,coordinate:s,key:"y",offset:o,position:l,reverseDirection:u,tooltipDimension:c.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:h}):eeZ,cssClasses:ee0({translateX:r,translateY:n,coordinate:s})}}function ee5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ee4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?ee5(Object(r),!0).forEach(function(t){ee8(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee5(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ee8(e,t,r){return(t=ee6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ee6(e){var t=ee7(e,"string");return"symbol"==typeof t?t:t+""}function ee7(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ee9 extends eeJ.PureComponent{constructor(){super(...arguments),ee8(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),ee8(this,"handleKeyDown",e=>{if("Escape"===e.key){var t,r,n,i;this.setState({dismissed:!0,dismissedAtCoordinate:{x:null!=(t=null==(r=this.props.coordinate)?void 0:r.x)?t:0,y:null!=(n=null==(i=this.props.coordinate)?void 0:i.y)?n:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var e,t;this.state.dismissed&&((null==(e=this.props.coordinate)?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null==(t=this.props.coordinate)?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:e,allowEscapeViewBox:t,animationDuration:r,animationEasing:n,children:i,coordinate:s,hasPayload:o,isAnimationActive:a,offset:l,position:u,reverseDirection:c,useTranslate3d:h,viewBox:d,wrapperStyle:f,lastBoundingBox:p,innerRef:m,hasPortalFromProps:g}=this.props,{cssClasses:v,cssProperties:y}=ee3({allowEscapeViewBox:t,coordinate:s,offsetLeft:"number"==typeof l?l:l.x,offsetTop:"number"==typeof l?l:l.y,position:u,reverseDirection:c,tooltipBox:{height:p.height,width:p.width},useTranslate3d:h,viewBox:d}),b=g?{}:ee4(ee4({transition:a&&e?"transform ".concat(r,"ms ").concat(n):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&o?"visible":"hidden",position:"absolute",top:0,left:0}),w=ee4(ee4({},b),{},{visibility:!this.state.dismissed&&e&&o?"visible":"hidden"},f);return eeJ.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:v,style:w,ref:m},i)}}var ete=e.i(884195);function ett(e,t,r){return!0===t?(0,ete.default)(e,r):"function"==typeof t?(0,ete.default)(e,t):e}var etr=ex,etn=1;function eti(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[t,r]=(0,etr.useState)({height:0,left:0,top:0,width:0}),n=(0,etr.useCallback)(e=>{if(null!=e){var n=e.getBoundingClientRect(),i={height:n.height,left:n.left,top:n.top,width:n.width};(Math.abs(i.height-t.height)>etn||Math.abs(i.left-t.left)>etn||Math.abs(i.top-t.top)>etn||Math.abs(i.width-t.width)>etn)&&r({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}var ets=ex,eto=ky,eta=ex,etl=ky,etu=["x","y","top","left","width","height","className"];function etc(){return(etc=Object.assign.bind()).apply(null,arguments)}function eth(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function etd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eth(Object(r),!0).forEach(function(t){etf(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eth(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function etf(e,t,r){return(t=etp(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function etp(e){var t=etm(e,"string");return"symbol"==typeof t?t:t+""}function etm(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function etg(e,t){if(null==e)return{};var r,n,i=etv(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function etv(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var ety=(e,t,r,n,i,s)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(s,",").concat(t,"h").concat(r),etb=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:s=0,height:o=0,className:a}=e,l=etd({x:t,y:r,top:n,left:i,width:s,height:o},etg(e,etu));return E2(t)&&E2(r)&&E2(s)&&E2(o)&&E2(n)&&E2(i)?eta.createElement("path",etc({},kj(l),{className:(0,etl.clsx)("recharts-cross",a),d:ety(t,r,s,o,n,i)})):null};function etw(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:r.left+.5,y:"horizontal"===e?r.top+.5:t.y-i,width:"horizontal"===e?n:r.width-1,height:"horizontal"===e?r.height-1:n}}function etx(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:s}=e;return{points:[AP(t,r,n,i),AP(t,r,n,s)],cx:t,cy:r,radius:n,startAngle:i,endAngle:s}}function etS(e,t,r){if("horizontal"===e)return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if("vertical"===e)return[{x:r.left,y:t.y}
22,{x:r.left+r.width,y:t.y}];if(IT(t)){if("centric"===e){var{cx:n,cy:i,innerRadius:s,outerRadius:o,angle:a}=t,l=AP(n,i,s,a),u=AP(n,i,o,a);return[{x:l.x,y:l.y},{x:u.x,y:u.y}]}return etx(t)}}function et_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function etM(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?et_(Object(r),!0).forEach(function(t){etO(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):et_(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function etO(e,t,r){return(t=etE(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function etE(e){var t=etP(e,"string");return"symbol"==typeof t?t:t+""}function etP(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var etk=()=>AU(BJ),etA=()=>{var e=etk(),t=AU(Hc),r=AU(Ha);return e&&r?PF(etM(etM({},e),{},{scale:r}),t):PF(void 0,t)};function etj(){return(etj=Object.assign.bind()).apply(null,arguments)}function etC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function etN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?etC(Object(r),!0).forEach(function(t){etT(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):etC(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function etT(e,t,r){return(t=etR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function etR(e){var t=etI(e,"string");return"symbol"==typeof t?t:t+""}function etI(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function etD(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return(0,ets.isValidElement)(t)?(0,ets.cloneElement)(t,n):(0,ets.createElement)(r,n)}function etL(e){var t,r,n,i,{coordinate:s,payload:o,index:a,offset:l,tooltipAxisBandSize:u,layout:c,cursor:h,tooltipEventType:d,chartName:f}=e,p=s,m=o,g=a;if(!h||!p||"ScatterChart"!==f&&"axis"!==d)return null;if("ScatterChart"===f)r=p,n=etb,i=TV.cursorLine;else if("BarChart"===f)r=etw(c,p,l,u),n=JG,i=TV.cursorRectangle;else if("radial"===c&&IT(p)){var{cx:v,cy:y,radius:b,startAngle:w,endAngle:x}=etx(p);r={cx:v,cy:y,startAngle:w,endAngle:x,innerRadius:b,outerRadius:b},n=Xa,i=TV.cursorLine}else r={points:etS(c,p,l)},n=QB,i=TV.cursorLine;var S="object"==typeof h&&"className"in h?h.className:void 0,_=etN(etN(etN(etN({stroke:"#ccc",pointerEvents:"none"},l),r),kA(h)),{},{payload:m,payloadIndex:g,className:(0,eto.clsx)("recharts-tooltip-cursor",S)});return ets.createElement(R9,{zIndex:null!=(t=e.zIndex)?t:i},ets.createElement(etD,{cursor:h,cursorComp:n,cursorProps:_}))}function etV(e){var t=etA(),r=TA(),n=TT(),i=HI();return null==t||null==r||null==n||null==i?null:ets.createElement(etL,etj({}
22,e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}function etz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function etF(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?etz(Object(r),!0).forEach(function(t){etB(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):etz(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function etB(e,t,r){return(t=et$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function et$(e){var t=etU(e,"string");return"symbol"==typeof t?t:t+""}function etU(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function etW(e){return e.dataKey}function etH(e,t){return eeN.isValidElement(e)?eeN.cloneElement(e,t):"function"==typeof e?eeN.createElement(e,t):eeN.createElement(eeG,t)}var etK=[],etY={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function etq(e){var t,r,n=k9(e,etY),{active:i,allowEscapeViewBox:s,animationDuration:o,animationEasing:a,content:l,filterNull:u,isAnimationActive:c,offset:h,payloadUniqBy:d,position:f,reverseDirection:p,useTranslate3d:m,wrapperStyle:g,cursor:v,shared:y,trigger:b,defaultIndex:w,portal:x,axisId:S}=n,_=Az(),M="number"==typeof w?String(w):w;(0,eeN.useEffect)(()=>{_(U8({shared:y,trigger:b,axisId:S,active:i,defaultIndex:M}))},[_,y,b,S,i,M]);var O=TP(),E=Yv(),P=Wm(y),{activeIndex:k,isActive:A}=null!=(t=AU(e=>Hq(e,P,b,M)))?t:{},j=AU(e=>HY(e,P,b,M)),C=AU(e=>HK(e,P,b,M)),N=AU(e=>HH(e,P,b,M)),T=j,R=Y4(),I=null!=(r=null!=i?i:A)&&r,[D,L]=eti([T,I]),V="axis"===P?C:void 0;Y0(P,b,N,V,k,I);var z=null!=x?x:R;if(null==z||null==O||null==P)return null;var F=null!=T?T:etK;I||(F=etK),u&&F.length&&(F=ett(F.filter(e=>null!=e.value&&(!0!==e.hide||n.includeHidden)),d,etW));var B=F.length>0,$=eeN.createElement(ee9,{allowEscapeViewBox:s,animationDuration:o,animationEasing:a,isAnimationActive:c,active:I,coordinate:N,hasPayload:B,offset:h,position:f,reverseDirection:p,useTranslate3d:m,viewBox:O,wrapperStyle:g,lastBoundingBox:D,innerRef:L,hasPortalFromProps:!!x},etH(l,etF(etF({},n),{},{payload:F,label:V,active:I,activeIndex:k,coordinate:N,accessibilityLayer:E})));return eeN.createElement(eeN.Fragment,null,(0,eeT.createPortal)($,z),I&&eeN.createElement(etV,{cursor:v,tooltipEventType:P,coordinate:N,payload:F,index:k}))}var etG=ex,etJ=ky,etX=["domain","range"],etQ=["domain","range"];function etZ(e,t){if(null==e)return{};var r,n,i=et0(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function et0(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function et1(e,t){return e===t||!!(Array.isArray(e)&&2===e.length&&Array.isArray(t))&&2===t.length&&e[0]===t[0]&&e[1]===t[1]}function et2(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=etZ(e,etX),{domain:s,range:o}=t,a=etZ(t,etQ);return!!et1(r,s)&&!!et1(n,o)&&Yc(i,a)}var et3=["type"],et5=["dangerouslySetInnerHTML","ticks","scale"],et4=["id","scale"];function et8(){return(et8=Object.assign.bind()).apply(null,arguments)}function et6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function et7(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?et6(Object(r),!0).forEach(function(t){et9(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):et6(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function et9(e,t,r){return(t=ere(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ere(e){var t=ert(e,"string");return"symbol"==typeof t?t:t+""}function ert(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function err(e,t){if(null==e)return{};var r,n,i=ern(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ern(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function eri(e){var t=Az(),r=(0,etG.useRef)(null),n=TR(),{type:i}=e,s=err(e,et3),o=T$(n,"xAxis",i),a=(0,etG.useMemo)(()=>{if(null!=o)return et7(et7({},s),{},{type:o})},[s,o]);return(0,etG.useLayoutEffect)(()=>{null!=a&&(null===r.current?t(Kr(a)):r.current!==a&&t(Kn({prev:r.current,next:a})),r.current=a)},[a,t]),(0,etG.useLayoutEffect)(()=>()=>{r.current&&(t(Ki(r.current)),r.current=null)},[t]),null}var ers=e=>{var{xAxisId:t,className:r}=e,n=AU(N3),i=N8(),s="xAxis",o=AU(e=>Ui(e,s,t,i)),a=AU(e=>$Q(e,t)),l=AU(e=>$5(e,t)),u=AU(e=>Bw(e,t));if(null==a||null==l||null==u)return null;var{dangerouslySetInnerHTML:c,ticks:h,scale:d}=e,f=err(e,et5),{id:p,scale:m}=u,g=err(u,et4);return etG.createElement(I2,et8({},f,g,{x:l.x,y:l.y,width:a.width,height:a.height,className:(0,etJ.clsx)("recharts-".concat(s," ").concat(s),r),viewBox:n,ticks:o,axisType:s}))},ero={allowDataOverflow:Bb.allowDataOverflow,allowDecimals:Bb.allowDecimals,allowDuplicatedCategory:Bb.allowDuplicatedCategory,angle:Bb.angle,axisLine:Iq.axisLine,height:Bb.height,hide:!1,includeHidden:Bb.includeHidden,interval:Bb.interval,label:!1,minTickGap:Bb.minTickGap,mirror:Bb.mirror,orientation:Bb.orientation,padding:Bb.padding,reversed:Bb.reversed,scale:Bb.scale,tick:Bb.tick,tickCount:Bb.tickCount,tickLine:Iq.tickLine,tickSize:Iq.tickSize,type:Bb.type,xAxisId:0},era=e=>{var t=k9(e,ero);return etG.createElement(etG.Fragment,null,etG.createElement(eri,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit}),etG.createElement(ers,t))},erl=etG.memo(era,et2);erl.displayName="XAxis";var eru=ex,erc=ky,erh=["type"],erd=["dangerouslySetInnerHTML","ticks","scale"],erf=["id","scale"];function erp(){return(erp=Object.assign.bind()).apply(null,arguments)}function erm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function erg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?erm(Object(r),!0).forEach(function(t){erv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):erm(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function erv(e,t,r){return(t=ery(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ery(e){var t=erb(e,"string");return"symbol"==typeof t?t:t+""}function erb(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function erw(e,t){if(null==e)return{};var r,n,i=erx(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function erx(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function erS(e){var t=Az(),r=(0,eru.useRef)(null),n=TR(),{type:i}=e,s=erw(e,erh),o=T$(n,"yAxis",i),a=(0,eru.useMemo)(()=>
22{if(null!=o)return erg(erg({},s),{},{type:o})},[o,s]);return(0,eru.useLayoutEffect)(()=>{null!=a&&(null===r.current?t(Ks(a)):r.current!==a&&t(Ko({prev:r.current,next:a})),r.current=a)},[a,t]),(0,eru.useLayoutEffect)(()=>()=>{r.current&&(t(Ka(r.current)),r.current=null)},[t]),null}function er_(e){var{yAxisId:t,className:r,width:n,label:i}=e,s=(0,eru.useRef)(null),o=(0,eru.useRef)(null),a=AU(N3),l=N8(),u=Az(),c="yAxis",h=AU(e=>$6(e,t)),d=AU(e=>$8(e,t)),f=AU(e=>Ui(e,c,t,l)),p=AU(e=>B_(e,t));if((0,eru.useLayoutEffect)(()=>{if(!("auto"!==n||!h||IS(i)||(0,eru.isValidElement)(i))&&null!=p){var e=s.current;if(e){var r=e.getCalculatedWidth();Math.round(h.width)!==Math.round(r)&&u(Kh({id:t,width:r}))}}},[f,h,u,i,t,n,p]),null==h||null==d||null==p)return null;var{dangerouslySetInnerHTML:m,ticks:g,scale:v}=e,y=erw(e,erd),{id:b,scale:w}=p,x=erw(p,erf);return eru.createElement(I2,erp({},y,x,{ref:s,labelRef:o,x:d.x,y:d.y,tickTextProps:"auto"===n?{width:void 0}:{width:n},width:h.width,height:h.height,className:(0,erc.clsx)("recharts-".concat(c," ").concat(c),r),viewBox:a,ticks:f,axisType:c}))}var erM={allowDataOverflow:BS.allowDataOverflow,allowDecimals:BS.allowDecimals,allowDuplicatedCategory:BS.allowDuplicatedCategory,angle:BS.angle,axisLine:Iq.axisLine,hide:!1,includeHidden:BS.includeHidden,interval:BS.interval,label:!1,minTickGap:BS.minTickGap,mirror:BS.mirror,orientation:BS.orientation,padding:BS.padding,reversed:BS.reversed,scale:BS.scale,tick:BS.tick,tickCount:BS.tickCount,tickLine:Iq.tickLine,tickSize:Iq.tickSize,type:BS.type,width:BS.width,yAxisId:0},erO=e=>{var t=k9(e,erM);return eru.createElement(eru.Fragment,null,eru.createElement(erS,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter}),eru.createElement(er_,t))},erE=eru.memo(erO,et2);erE.displayName="YAxis";let erP={src:e.i(726833).default,width:80,height:40,blurWidth:8,blurHeight:4,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAYAAACzzX7wAAAAcElEQVR42oXNsQpAUBQAUKsMLAxKqZdBBt9guuX+ks+gMDBIpBQDm5hkMhgsyiQT/yBvM9lPHYZ4g2XUp62VO6rZinIyoxiNyPudzTqhxZjNhWZ7g14dQIoNlHQBKZ5ACHrg3Bb/AXFpgbTIPwW+xQNLsDrN7VJp2QAAAABJRU5ErkJggg=="},erk={src:e.i(917814).default,width:80,height:40,blurWidth:8,blurHeight:4,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAYAAACzzX7wAAAAaklEQVR42oXNMQpAABQAUBdhMlAokUQShl/+4giKkiRJUS7kBM4gIhEpp6EYbPZXj5DbwDKPytX2ApU1Q3FOkBsjZPrApRrPIuyzRueswThKULccpCUFYYqBHUKgOx//wVug/in4p0DyLi4k7jZom4rngAAAAABJRU5ErkJggg=="},erA={src:e.i(156839).default,width:80,height:40,blurWidth:8,blurHeight:4,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAYAAACzzX7wAAAAXklEQVR42oXNMQqAIBgG0O7V1NIPfQ0iCqIIgjp41YauUqHmGjm1tT94wy7EVENYbudQtEaWEpkxnMCyjeM01JTQUqLmPRVrqShFhXO61pWOecY/6EWM6IUx3wJv8QDXYzyPJEwXnAAAAABJRU5ErkJggg=="},erj=[{label:rX`Analyst`,key:1},{label:rX`Rating`,key:2},{label:rX`Action`,key:3},{label:rX`Price Target`,key:4},{label:rX`Date`,key:5},{label:rX`Rating Reason`,key:6}],erC="minmax(0,1.25fr) minmax(0,1.6fr) minmax(0,0.85fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.3fr)",erN="hsl(var(--gain))",erT="hsl(var(--muted-foreground))",erR="hsl(var(--destructive))",erI="hsl(var(--primary))",erD="hsl(187 45% 45%)",erL="hsl(var(--gain))",erV="hsl(var(--destructive))",erz=e=>"string"==typeof e?e:e?.src??"";function erF(e,t,r=6){let n=(t-e)/(r-1);return Array.from({length:r},(t,r)=>e+r*n)}function erB(e){let t=[];if(e.forEach(e=>{[e.price,e.average,e.high,e.low].forEach(e=>{"number"==typeof e&&Number.isFinite(e)&&t.push(e)})}),0===t.length)return[0,100];let r=5*Math.floor(Math.min(...t)/5),n=5*Math.ceil(Math.max(...t)/5),i=n-r,s=5;i>100?s=20:i>50&&(s=10);let o=[];for(let e=r;e<=n;e+=s)o.push(e);return o.length>0?o:[r,n]}function er$({reason:e}){let t=e.trim();return t?(0,Ob.jsxs)(O4,{children:[(0,Ob.jsx)(O8,{asChild:!0,children:(0,Ob.jsx)("button",{type:"button","data-track-id":"chat.rating.reason.open",className:"inline-flex h-8 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:O9.i18n._(rX`View`)})}),(0,Ob.jsx)(O6,{className:"max-h-[min(60vh,320px)] max-w-[min(90vw,360px)] overflow-y-auto border-border bg-popover p-3 text-sm leading-relaxed text-popover-foreground",side:"top",align:"end",children:t})]}):(0,Ob.jsx)("span",{className:"text-muted-foreground",children:"—"})}function erU(e){return e.includes("Hold")?"bg-muted text-muted-foreground":e.includes("Sell")?"text-destructive":"text-gain"}function erW(e){let t=e.match(/^(.+?)\s*(?:→|->)\s*(.+)$/);return t?[t[1].trim(),t[2].trim()]:null}function erH({label:e,compact:t}){return(0,Ob.jsx)("span",{className:(0,O7.cn)("inline-block max-w-full truncate rounded-[10px] px-2 py-0.5",t?"text-xs":"text-sm",erU(e)),title:e,children:e})}function erK({rating:e=""}){if(!e)return(0,Ob.jsx)("span",{className:"text-muted-foreground",children:"—"});let t=erW(e);if(t){let[e,r]=t;return`${e}${r}`.length>18?(0,Ob.jsxs)("div",{className:"flex min-w-0 flex-col items-center gap-0.5",children:[(0,Ob.jsx)(erH,{label:e,compact:!0}),(0,Ob.jsxs)("span",{className:"flex min-w-0 items-center justify-center gap-1 text-xs text-muted-foreground",children:[(0,Ob.jsx)("span",{"aria-hidden":!0,
22children:"→"}),(0,Ob.jsx)(erH,{label:r,compact:!0})]})]}):(0,Ob.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center justify-center gap-1",children:[(0,Ob.jsx)(erH,{label:e,compact:!0}),(0,Ob.jsx)("span",{className:"shrink-0 text-muted-foreground",children:"→"}),(0,Ob.jsx)(erH,{label:r,compact:!0})]})}return"Buy"===e||"Strong Buy"===e||"Hold"===e||"Sell"===e||"Strong Sell"===e?(0,Ob.jsx)(erH,{label:e}):(0,Ob.jsx)("span",{className:"line-clamp-2 min-w-0 text-center wrap-break-word text-sm",title:e,children:e})}function erY({data:e}){let{symbol:t,locale:r,mock:n}=e,{start:i,end:s}=ui(1),[o,a]=(0,EH.useState)(!n),[l,u]=(0,EH.useState)([]),[c,h]=(0,EH.useState)(!0),[d,f]=(0,EH.useState)({}),[p,m]=(0,EH.useState)({name:"buy",value:0}),[g,v]=(0,EH.useState)({open:!1,message:""}),y=(0,EH.useCallback)(async e=>{if(!n)try{a(!0);let t=await ey({ticker:e,from:i,to:s,locale:r});if(0===t.ret){let e=t.results?.list??[];u(e.slice(0,5)),h(e.length>0),f(t.analysis_summary??{})}else h(!1)}finally{a(!1)}},[n,i,s,r]),b=(0,EH.useCallback)(async e=>{try{let t=await ey({ticker:e,from:i,to:s,locale:r});0===t.ret&&(t.analysis_summary?.history_price??[]).length>0&&f(e=>({...e,history_price:t.analysis_summary.history_price}))}catch{}},[i,s,r]);(0,EH.useEffect)(()=>{if(n){let e=n.analysis_summary??{},r=n.results?.list??[];f(e),u(r),h(r.length>0),a(!1),(!e.history_price||0===e.history_price.length)&&t&&b(t);return}t&&y(t)},[t,n,y,b]);let w=(0,EH.useMemo)(()=>[{name:"buy",value:d.buy??0,color:erN},{name:"hold",value:d.hold??0,color:erT},{name:"sell",value:d.sell??0,color:erR}],[d.buy,d.hold,d.sell]),x=(0,EH.useMemo)(()=>{let e=w.reduce((e,t)=>e.value>=t.value?e:t,w[0]);return p&&p.value>0?p:e&&e.value>0?{name:e.name,value:e.value}:{name:"buy",value:0}},[p,w]);(0,EH.useEffect)(()=>{let e=w.reduce((e,t)=>e.value>=t.value?e:t,w[0]);e&&e.value>0&&m({name:e.name,value:e.value})},[w]);let S=(0,EH.useMemo)(()=>{let e=d.history_price??[],t=e.length>0&&Number(e.at(-1)?.close)||0,r=e=>Number(String(e??"").replace(/[$,]/g,""))||t;return{avg:r(d.average_price_target),high:r(d.highest_price_target),low:r(d.lowest_price_target),lastClose:t}},[d]),_=(0,EH.useMemo)(()=>{let e=d.history_price??[];if(0===e.length)return[];let{avg:t,high:r,low:n,lastClose:i}=S,s=erB([...e.map(e=>({price:Number(e.close)})),{average:t,high:r,low:n,price:void 0}]),o=Math.min(...s),a=Math.max(...s),l=o+(a-o)*.824,u=o+(a-o)*.472,c=o+(a-o)*.119,h=erF(i,u),f=erF(i,l),p=erF(i,c);return[...e.map((t,r)=>({date:(0,EW.default)(1e3*t.timestamp).format("YYYY/MM/DD"),price:Number(t.close),average:r===e.length-1?h[0]:void 0,high:r===e.length-1?f[0]:void 0,low:r===e.length-1?p[0]:void 0})),...[,,,,,].fill(null).map((e,t)=>({date:"",price:void 0,average:h[t+1],high:f[t+1],low:p[t+1]}))]},[d]),M=(0,EH.useMemo)(()=>erB(_),[_]);if(!t||!c&&!o)return null;let O="HK"!==r;return(0,Ob.jsxs)("div",{className:c?"block":"hidden",children:[(0,Ob.jsxs)("div",{className:"w-full rounded-xl border border-border bg-card pb-4",children:[(0,Ob.jsx)("div",{className:"flex h-14 items-center justify-between rounded-t-lg px-4 bg-muted/50",children:(0,Ob.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ob.jsx)(d3,{code:t,type:"stock",locale:r??"US",className:"size-10 shrink-0 rounded-full"}),(0,Ob.jsxs)("div",{className:"text-body font-semibold text-foreground",children:[(0,Ob.jsx)("span",{className:"mr-1",children:t}),(0,Ob.jsx)("span",{children:O9.i18n._(rX`Analyst Rating`)})]})]})}),O&&(0,Ob.jsxs)("div",{className:"relative @container h-[220px] min-w-0 @[520px]:flex @[520px]:h-[240px]",children:[(0,Ob.jsx)("div",{className:"absolute left-5 top-5 text-base font-bold text-foreground",children:d.rating_label??O9.i18n._(rX`Moderate Buy`)}),(0,Ob.jsxs)("div",{className:"flex shrink-0 flex-col items-center px-2 @[520px]:w-[170px]",children:[(0,Ob.jsxs)("div",{className:"relative mt-12 size-[150px] shrink-0",children:[(0,Ob.jsx)(TO,{width:"100%",height:"100%",children:(0,Ob.jsx)(eeC,{children:(0,Ob.jsx)(eef,{data:w,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:46,outerRadius:70,paddingAngle:2,onMouseEnter:(e,t)=>{let r=w[t];r&&m({name:r.name,value:r.value})},onMouseLeave:()=>{let e=w.reduce((e,t)=>
22e.value>=t.value?e:t,w[0]);e?.value>0&&m({name:e.name,value:e.value})},children:w.map(e=>(0,Ob.jsx)(UC,{fill:e.color,stroke:"none"},e.name))})})}),(0,Ob.jsx)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",children:(0,Ob.jsxs)("div",{className:"text-center text-foreground",children:[(0,Ob.jsx)("div",{className:"text-xl font-bold",children:x.value}),(0,Ob.jsx)("div",{className:"text-xs text-muted-foreground capitalize",children:x.name})]})})]}),(0,Ob.jsxs)("div",{className:"mt-1 flex items-center gap-3 text-xs @[520px]:gap-4",children:[(0,Ob.jsxs)("span",{className:"flex items-center gap-1 text-gain",children:[(0,Ob.jsx)("span",{className:"size-2.5 rounded-full",style:{background:erN}}),O9.i18n._(rX`Buy`)]}),(0,Ob.jsxs)("span",{className:"flex items-center gap-1 text-muted-foreground",children:[(0,Ob.jsx)("span",{className:"size-2.5 rounded-full",style:{background:erT}}),O9.i18n._(rX`Hold`)]}),(0,Ob.jsxs)("span",{className:"flex items-center gap-1 text-destructive",children:[(0,Ob.jsx)("span",{className:"size-2.5 rounded-full",style:{background:erR}}),O9.i18n._(rX`Sell`)]})]})]}),(0,Ob.jsx)("div",{className:"hidden min-h-[190px] min-w-0 flex-1 self-stretch p-4 pr-0 @[520px]:block",children:(0,Ob.jsx)(TO,{width:"100%",height:"100%",minHeight:190,children:(0,Ob.jsxs)(qP,{data:_,margin:{top:8,right:8,left:0,bottom:0},className:"text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line]:stroke-border/50",children:[(0,Ob.jsx)(Uj,{strokeDasharray:"2 4",vertical:!1,stroke:"hsl(var(--border) / 0.5)"}),(0,Ob.jsx)(erl,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:8}),(0,Ob.jsx)(erE,{domain:M.length>0?[Math.min(...M),Math.max(...M)]:["dataMin","dataMax"],ticks:M.length>0?M:void 0,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:e=>Number.isFinite(e)&&e!==(M.length>0?Math.min(...M):-1/0)?String(Math.round(e)):""}),(0,Ob.jsx)(etq,{content:e=>(0,Ob.jsx)(O_,{...e,formatter:e=>null!=e?String(e):"—"})}),(0,Ob.jsx)(Zb,{type:"monotone",dataKey:"price",stroke:erI,strokeWidth:2,dot:{r:4},connectNulls:!0}),(0,Ob.jsx)(Zb,{type:"monotone",dataKey:"average",stroke:erD,strokeWidth:1,strokeDasharray:"4 4",dot:!1,connectNulls:!0}),(0,Ob.jsx)(Zb,{type:"monotone",dataKey:"high",stroke:erL,strokeWidth:1,strokeDasharray:"4 4",dot:!1,connectNulls:!0}),(0,Ob.jsx)(Zb,{type:"monotone",dataKey:"low",stroke:erV,strokeWidth:1,strokeDasharray:"4 4",dot:!1,connectNulls:!0})]})})}),(0,Ob.jsxs)("div",{className:"hidden w-[100px] shrink-0 flex-col items-center justify-around gap-3 py-2 @[520px]:flex",children:[(0,Ob.jsxs)("div",{className:"relative flex items-center justify-center",children:[(0,Ob.jsx)("img",{src:erz(erk),alt:"high",className:"h-10 w-20 object-contain"}),(0,Ob.jsxs)("div",{className:"absolute text-center text-xs text-gain",children:[(0,Ob.jsx)("div",{children:O9.i18n._(rX`High`)}),(0,Ob.jsx)("div",{children:d.highest_price_target??"—"})]})]}),(0,Ob.jsxs)("div",{className:"relative flex items-center justify-center",children:[(0,Ob.jsx)("img",{src:erz(erP),alt:"average",className:"h-10 w-20 object-contain"}),(0,Ob.jsxs)("div",{className:"absolute text-center text-xs text-[hsl(187_45%_45%)]",children:[(0,Ob.jsx)("div",{children:O9.i18n._(rX`Averages`)}),(0,Ob.jsx)("div",{children:d.average_price_target??"—"})]})]}),(0,Ob.jsxs)("div",{className:"relative flex items-center justify-center",children:[(0,Ob.jsx)("img",{src:erz(erA),alt:"low",className:"h-10 w-20 object-contain"}),(0,Ob.jsxs)("div",{className:"absolute text-center text-xs text-destructive",children:[(0,Ob.jsx)("div",{children:O9.i18n._(rX`Low`)}),(0,Ob.jsx)("div",{children:d.lowest_price_target??"—"})]})]})]})]}),(0,Ob.jsx)("div",{className:"overflow-x-auto px-4",children:(0,Ob.jsxs)("div",{className:"min-w-[700px] w-full",children:[(0,Ob.jsx)("div",{className:"mt-5 grid w-full gap-x-2 py-3 text-sm font-normal text-muted-foreground",style:{gridTemplateColumns:erC},children:erj.map(e=>(0,Ob.jsx)("div",{className:"min-w-0 text-center",children:O9.i18n._(e.label)},e.key))}),o?(0,Ob.jsx)("div",{className:"flex h-32 items-center justify-center",children:(0,Ob.jsx)(vx,{className:"size-8 animate-spin text-primary"})}):l.length>0?(0,Ob.jsx)("div",{className:"text-foreground",children:l.map((e,t)=>(0,Ob.jsxs)("div",{className:"grid w-full min-h-14 items-center gap-x-2 py-2 text-sm",style:{gridTemplateColumns:erC},children:[(0,Ob.jsxs)("div",{className:"flex min-w-0 flex-col items-center justify-center text-center",children:[(0,Ob.jsx)("div",{className:"w-full font-bold line-clamp-1",children:e.rating_analyst_firm??"—"}),(0,Ob.jsx)("div",{className:"w-full line-clamp-1 text-sub text-muted-foreground",children:e.rating_analyst??"—"})]}),(0,Ob.jsx)("div",{className:"flex min-w-0 items-center justify-center text-center",children:(0,Ob.jsx)(erK,{rating:e.rating})}),(0,Ob.jsx)("div",{className:(0,O7.cn)("min-w-0 truncate text-center","Upgrades"===e.rating_action&&"text-gain","Downgrades"===e.rating_action&&"text-destructive"),title:e.rating_action??void 0,children:e.rating_action??"—"}),(0,Ob.jsx)("div",{className:"min-w-0 truncate text-center",title:e.rating_price_target??void 0,children:e.rating_price_target??"—"}),(0,Ob.jsx)("div",{className:"min-w-0 truncate text-center",children:e.rating_date??"—"}),(0,Ob.jsx)("div",{className:"flex min-w-0 items-center justify-center",children:(0,Ob.jsx)(er$,{reason:e.rating_reason??""})})]},e.rating_date+String(t)))}):(0,Ob.jsx)("div",{className:"py-8 text-center text-body text-muted-foreground",children:O9.i18n._(rX`No data`)})]})})]}),(0,Ob.jsx)(ED,{open:g.open,onOpenChange:e=>v({open:e,message:""}),children:(0,Ob.jsxs)(EV,{children:[(0,Ob.jsx)(Ez,{className:"fixed inset-0 z-50 bg-black/50"}),(0,Ob.jsxs)(EF,{className:"fixed left-1/2 top-1/2 z-50 min-w-[300px] -translate-x-1/2 -translate-y-1/2 roun
22ded-lg bg-[#131614] p-6",children:[(0,Ob.jsx)(EB,{className:"mb-4 text-lg font-bold text-foreground",children:O9.i18n._(rX`Warning`)}),(0,Ob.jsx)(E$,{className:"mb-6 text-body text-foreground",children:g.message}),(0,Ob.jsx)("div",{className:"flex justify-end",children:(0,Ob.jsx)(EU,{asChild:!0,children:(0,Ob.jsx)("button",{type:"button","data-track-id":"chat.rating.warning.confirm",className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:opacity-90",children:O9.i18n._(rX`OK`)})})})]})]})})]})}function erq(e,t){return e.data.symbol===t.data.symbol&&e.data.locale===t.data.locale&&JSON.stringify(e.data.mock)===JSON.stringify(t.data.mock)}let erG=(0,EH.memo)(erY,erq);var erJ=ed,erX=ed,erQ=dq;let erZ=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],er0=(0,vb.default)("check",erZ);var er1=e.i(941624);let er2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],er3=(0,vb.default)("chevron-up",er2);var er5=ex;let er4=_A,er8=_C,er6=er5.forwardRef(({className:e,children:t,...r},n)=>(0,erX.jsxs)(_j,{ref:n,className:(0,erQ.cn)("flex h-10 w-full items-center justify-between rounded-lg border border-input bg-background px-3 py-2 text-sm r
22ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,(0,erX.jsx)(_N,{asChild:!0,children:(0,erX.jsx)(er1.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));er6.displayName=_j.displayName;let er7=er5.forwardRef(({className:e,...t},r)=>(0,erX.jsx)(_F,{ref:r,className:(0,erQ.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,erX.jsx)(er3,{className:"h-4 w-4"})}));er7.displayName=_F.displayName;let er9=er5.forwardRef(({className:e,...t},r)=>(0,erX.jsx)(_B,{ref:r,className:(0,erQ.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,erX.jsx)(er1.ChevronDown,{className:"h-4 w-4"})}));er9.displayName=_B.displayName;let ene=er5.forwardRef(({className:e,children:t,position:r="popper",...n},i)=>(0,erX.jsx)(_T,{children:(0,erX.jsxs)(_R,{ref:i,className:(0,erQ.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[(0,erX.jsx)(er7,{}),(0,erX.jsx)(_I,{className:(0,erQ.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,erX.jsx)(er9,{})]})}));ene.displayName=_R.displayName,er5.forwardRef(({className:e,...t},r)=>(0,erX.jsx)(_D,{ref:r,className:(0,erQ.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})).displayName=_D.displayName;let ent=er5.forwardRef(({className:e,children:t,...r},n)=>(0,erX.jsxs)(_L,{ref:n,className:(0,erQ.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[(0,erX.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,erX.jsx)(_z,{children:(0,erX.jsx)(er0,{className:"h-4 w-4"})})}),(0,erX.jsx)(_V,{children:t})]}));ent.displayName=_L.displayName,er5.forwardRef(({className:e,...t},r)=>(0,erX.jsx)(_$,{ref:r,className:(0,erQ.cn)("-mx-1 my-1 h-px bg-muted",e),...t})).displayName=_$.displayName;var enr=dq,enn=rJ,eni=ex,ens=ex,eno=ky,ena=ex,enl="Invariant failed";function enu(e,t){if(!e)throw Error(enl)}function enc(){return(enc=Object.assign.bind()).apply(null,arguments)}function enh(e){return ena.createElement(Q0,enc({shapeType:"rectangle",activeClassName:"recharts-active-bar"},e))}var end=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(r,n)=>{if(E2(e))return e;var i=E2(r)||Pe(r);return i?e(r,n):(i||enu(!1,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")),t)}},enf=(e,t,r)=>{var n=null!=r?r:e;if(!Pe(n))return E8(n,t,0)},enp=(e,t,r)=>{var n={},i=e.filter(Bi),s=e.filter(e=>null==e.stackId);return[...Object.entries(i.reduce((e,t)=>{var r=e[t.stackId];return null==r&&(r=[]),r.push(t),e[t.stackId]=r,e},n)).map(e=>{var n,[i,s]=e;return{stackId:i,dataKeys:s.map(e=>e.dataKey),barSize:enf(t,r,null==(n=s[0])?void 0:n.barSize)}}),...s.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>null!=e),barSize:enf(t,r,e.barSize)}))]};function enm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eng(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
22t%2?enm(Object(r),!0).forEach(function(t){env(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):enm(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function env(e,t,r){return(t=eny(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eny(e){var t=enb(e,"string");return"symbol"==typeof t?t:t+""}function enb(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function enw(e,t,r,n,i){var s,o,a=n.length;if(!(a<1)){var l=E8(e,r,0,!0),u=[];if(Pg(null==(s=n[0])?void 0:s.barSize)){var c=!1,h=r/a,d=n.reduce((e,t)=>e+(t.barSize||0),0);(d+=(a-1)*l)>=r&&(d-=(a-1)*l,l=0),d>=r&&h>0&&(c=!0,h*=.9,d=a*h);var f={offset:((r-d)/2|0)-l,size:0};o=n.reduce((e,t)=>{var r,n={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:f.offset+f.size+l,size:c?h:null!=(r=t.barSize)?r:0}},i=[...e,n];return f=n.position,i},u)}else{var p=E8(t,r,0,!0);r-2*p-(a-1)*l<=0&&(l=0);var m=(r-2*p-(a-1)*l)/a;m>1&&(m>>=0);var g=Pg(i)?Math.min(m,i):m;o=n.reduce((e,t,r)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:p+(m+l)*r+(m-g)/2,size:g}}],u)}return o}}var enx=(e,t,r,n,i,s,o)=>{var a=enw(r,n,i!==s?i:s,e,Pe(o)?t:o);return i!==s&&null!=a&&(a=a.map(e=>eng(eng({},e),{},{position:eng(eng({},e.position),{},{offset:e.position.offset-i/2})}))),a},enS=(e,t)=>{var r=Br(t);if(!e||null==r||null==t)return;var{stackId:n}=t;if(null!=n){var i=e[n];if(i){var{stackedData:s}=i;if(s)return s.find(e=>e.key===r)}}};function en_(e,t){var r,n;return null!=(r=null==(n=e.graphicalItems.cartesianItems.find(e=>e.id===t))?void 0:n.xAxisId)?r:Ke}function enM(e,t){var r,n;return null!=(r=null==(n=e.graphicalItems.cartesianItems.find(e=>e.id===t))?void 0:n.yAxisId)?r:Ke}var enO=(e,t)=>{if(null!=e&&null!=t){var r=e.find(e=>e.stackId===t.stackId&&null!=t.dataKey&&e.dataKeys.includes(t.dataKey));if(null!=r)return r.position}},enE=(e,t,r)=>r,enP=Cg([BN,(e,t)=>t],(e,t)=>e.filter(e=>"bar"===e.type).find(e=>e.id===t)),enk=Cg([enP],e=>null==e?void 0:e.maxBarSize),enA=(e,t,r,n)=>n,enj=Cg([TN,BN,en_,enM,enE],(e,t,r,n,i)=>t.filter(t=>"horizontal"===e?t.xAxisId===r:t.yAxisId===n).filter(e=>e.isPanorama===i).filter(e=>!1===e.hide).filter(e=>"bar"===e.type)),enC=(e,t,r)=>{var n=TN(e),i=en_(e,t),s=enM(e,t);if(null!=i&&null!=s)return"horizontal"===n?B0(e,"yAxis",s,r):B0(e,"xAxis",i,r)},enN=Cg([enj,F2,(e,t)=>{var r=TN(e),n=en_(e,t),i=enM(e,t);if(null!=n&&null!=i)return"horizontal"===r?$7(e,"xAxis",n):$7(e,"yAxis",i)}],enp),enT=(e,t,r)=>{var n,i,s,o,a=enP(e,t);if(null==a)return 0;var l=en_(e,t),u=enM(e,t);if(null==l||null==u)return 0;var c=TN(e),h=FZ(e),{maxBarSize:d}=a,f=Pe(d)?h:d;return"horizontal"===c?(s=Uo(e,"xAxis",l,r),o=Us(e,"xAxis",l,r)):(s=Uo(e,"yAxis",u,r),o=Us(e,"yAxis",u,r)),null!=(n=null!=(i=PF(s,o,!0))?i:f)?n:0},enR=(e,t,r)=>{var n,i,s=TN(e),o=en_(e,t),a=enM(e,t);if(null!=o&&null!=a)return"horizontal"===s?(n=Uo(e,"xAxis",o,r),i=Us(e,"xAxis",o,r)):(n=Uo(e,"yAxis",a,r),i=Us(e,"yAxis",a,r)),PF(n,i)},enI=Cg([enN,FZ,F0,F1,enT,enR,enk],enx),enD=(e,t,r)=>{var n=en_(e,t);if(null!=n)return Uo(e,"xAxis",n,r)},enL=(e,t,r)=>{var n=enM(e,t);if(null!=n)return Uo(e,"yAxis",n,r)},enV=(e,t,r)=>{var n=en_(e,t);if(null!=n)return Us(e,"xAxis",n,r)},enz=(e,t,r)=>{var n=enM(e,t);if(null!=n)return Us(e,"yAxis",n,r)},enF=Cg([enI,enP],enO),enB=Cg([enC,enP],enS),en$=Cg([N1,N3,enD,enL,enV,enz,enF,TN,FV,enR,enB,enP,enA],(e,t,r,n,i,s,o,a,l,u,c,h,d)=>{var f,{chartData:p,dataStartIndex:m,dataEndIndex:g}=l;if(null!=h&&null!=o&&null!=t&&("horizontal"===a||"vertical"===a)&&null!=r&&null!=n&&null!=i&&null!=s&&null!=u){var{data:v}=h;if(null!=(f=null!=v&&v.length>0?v:null==p?void 0:p.slice(m,g+1)))return eiS({layout:a,barSettings:h,pos:o,parentViewBox:t,bandSize:u,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:s,stackedData:c,displayedData:f,offset:e,cells:d,dataStartIndex:m})}});function enU(e,t){return e&&"object"==typeof e&&"zIndex"in e&&"number"==typeof e.zIndex&&Pg(e.zIndex)?e.zIndex:t}var enW=ex,enH=(e,t)=>t,enK=(e,t,r)=>r,enY=Cg([enH,BN,enK],(e,t,r)=>t.filter(e=>"bar"===e.type).filter(t=>t.stackId===e).filter(e=>e.isPanorama===r).filter(e=>!e.hide)),enq=Cg([enY],e=>e.map(e=>e.id)),enG=(e,t)=>
22{if(!e)return t;if(!t)return e;var r=Math.min(e.x,e.x+e.width,t.x,t.x+t.width),n=Math.min(e.y,e.y+e.height,t.y,t.y+t.height),i=Math.max(e.x,e.x+e.width,t.x,t.x+t.width),s=Math.max(e.y,e.y+e.height,t.y,t.y+t.height),o=i-r,a=s-n;return{x:r,y:n,width:o,height:a}},enJ=Cg([e=>e,enH,enK],(e,t,r)=>{var n=enq(e,t,r),i=[];return n.forEach(t=>{var n=en$(e,t,r,void 0);null==n||n.forEach((e,t)=>{i[t]=enG(i[t],e)})}),i}),enX=["index"];function enQ(){return(enQ=Object.assign.bind()).apply(null,arguments)}function enZ(e,t){if(null==e)return{};var r,n,i=en0(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function en0(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var en1=(0,enW.createContext)(void 0),en2=e=>{var t=(0,enW.useContext)(en1);return null!=t?t.stackId:null!=e?PC(e):void 0},en3=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),en5=e=>{var t=(0,enW.useContext)(en1);if(null!=t){var{stackId:r}=t;return"url(#".concat(en3(r,e),")")}},en4=e=>{var{index:t}=e,r=enZ(e,enX),n=en5(t);return enW.createElement(kD,enQ({className:"recharts-bar-stack-layer",clipPath:n},r))},en8=["onMouseEnter","onMouseLeave","onClick"],en6=["value","background","tooltipPosition"],en7=["id"],en9=["onMouseEnter","onClick","onMouseLeave"];function eie(){return(eie=Object.assign.bind()).apply(null,arguments)}function eit(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eir(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eit(Object(r),!0).forEach(function(t){ein(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eit(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ein(e,t,r){return(t=eii(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eii(e){var t=eis(e,"string");return"symbol"==typeof t?t:t+""}function eis(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function eio(e,t){if(null==e)return{};var r,n,i=eia(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function eia(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var eil=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:s}=e;return[{inactive:s,dataKey:t,type:i,color:n,value:P$(r,t),payload:e}]},eiu=ens.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:s,hide:o,unit:a,tooltipType:l,id:u}=e,c={dataDefinedOnItem:void 0,getPosition:Pn,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:P$(s,t),hide:o,type:l,color:i,unit:a,graphicalItemId:u}};return ens.createElement(Gy,{tooltipEntrySettings:c})});function eic(e){var t=AU(Hm),{data:r,dataKey:n,background:i,allOtherBarProps:s}=e,{onMouseEnter:o,onMouseLeave:a,onClick:l}=s,u=eio(s,en8),c=ZK(o,n,s.id),h=ZY(a),d=Zq(l,n,s.id);if(!i||null==r)return null;var f=kA(i);return ens.createElement(R9,{zIndex:enU(i,TV.barBackground)},r.map((e,r)=>{var{value:s,background:o,tooltipPosition:a}=e,l=eio(e,en6);if(!o)return null;var p=c(e,r),m=h(e,r),g=d(e,r),v=eir(eir(eir(eir(eir({option:i,isActive:String(r)===t},l),{},{fill:"#eee"},o),f),ID(u,e,r)),{},{onMouseEnter:p,onMouseLeave:m,onClick:g,dataKey:n,index:r,className:"recharts-bar-background-rectangle"});return ens.createElement(enh,eie({key:"background-bar-".concat(r)},v))}))}function eih(e){var{showLabels:t,children:r,rects:n}=e,i=null==n?void 0:n.map(e=>{var t={x:e.x,y:e.y,width:e.width,lowerWidth:e.width,upperWidth:e.width,height:e.height};return eir(eir({},t),{},{value:e.value,payload:e.payload,parentViewBox:e.parentViewBox,viewBox:t,fill:e.fill})});return ens.createElement(qz,{value:t?i:void 0},r)}function eid(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:s,dataKey:o}=e,a=AU(Hm),l=AU(Hv),u=r&&String(s)===a&&(null==l||o===l),c=u?r:t;return u?ens.createElement(R9,{zIndex:TV.activeBar},ens.createElement(en4,{index:s},ens.createElement(enh,eie({},n,{name:String(n.name)},i,{isActive:u,option:c,index:s,dataKey:o})))):ens.createElement(enh,eie({},n,{name:String(n.name)},i,{isActive:u,option:c,index:s,dataKey:o}))}function eif(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:s}=e;return ens.createElement(enh,eie({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:s}))}function eip(e){var t,{data:r,props:n}=e,i=null!=(t=kk(n))?t:{},{id:s}=i,o=eio(i,en7),{shape:a,dataKey:l,activeBar:u}=n,{onMouseEnter:c,onClick:h,onMouseLeave:d}=n,f=eio(n,en9),p=ZK(c,l,s),m=ZY(d),g=Zq(h,l,s);return r?ens.createElement(ens.Fragment,null,r.map((e,t)=>ens.createElement(en4,eie({index:t,key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value,"-").concat(t),className:"recharts-bar-rectangle"},ID(f,e,t),{onMouseEnter:p(e,t),onMouseLeave:m(e,t),onClick:g(e,t)}),u?ens.createElement(eid,{shape:a,activeBar:u,baseProps:o,entry:e,index:t,dataKey:l}):ens.createElement(eif,{shape:a,baseProps:o,entry:e,index:t,dataKey:l})))):null}function eim(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:s,animationBegin:o,animationDuration:a,animationEasing:l,onAnimationEnd:u,onAnimationStart:c}=t,h=r.current,d=GB(t,"recharts-bar-"),[f,p]=(0,ens.useState)(!1),m=!f,g=(0,ens.useCallback)(()=>{"function"==typeof u&&u(),p(!1)},[u]),v=(0,ens.useCallback)(()=>{"function"==typeof c&&c(),p(!0)},[c]);return ens.createElement(eih,{showLabels:m,rects:n},ens.createElement(Jj,{animationId:d,begin:o,duration:a,isActive:s,easing:l,onAnimationEnd:g,onAnimationStart:v,ke
22y:d},e=>{var s=1===e?n:null==n?void 0:n.map((t,r)=>{var n=h&&h[r];if(n)return eir(eir({},t),{},{x:E7(n.x,t.x,e),y:E7(n.y,t.y,e),width:E7(n.width,t.width,e),height:E7(n.height,t.height,e)});if("horizontal"===i){var s=E7(0,t.height,e),o=E7(t.stackedBarStart,t.y,e);return eir(eir({},t),{},{y:o,height:s})}var a=E7(0,t.width,e),l=E7(t.stackedBarStart,t.x,e);return eir(eir({},t),{},{width:a,x:l})});return(e>0&&(r.current=null!=s?s:null),null==s)?null:ens.createElement(kD,null,ens.createElement(eip,{props:t,data:s}))}),ens.createElement(qH,{label:t.label}),t.children)}function eig(e){var t=(0,ens.useRef)(null);return ens.createElement(eim,{previousRectanglesRef:t,props:e})}var eiv=0,eiy=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:P_(e,t)}};class eib extends ens.PureComponent{render(){var{hide:e,data:t,dataKey:r,className:n,xAxisId:i,yAxisId:s,needClip:o,background:a,id:l}=this.props;if(e||null==t)return null;var u=(0,eno.clsx)("recharts-bar",n),c=l;return ens.createElement(kD,{className:u,id:l},o&&ens.createElement("defs",null,ens.createElement(Gk,{clipPathId:c,xAxisId:i,yAxisId:s})),ens.createElement(kD,{className:"recharts-bar-rectangles",clipPath:o?"url(#clipPath-".concat(c,")"):void 0},ens.createElement(eic,{data:t,dataKey:r,background:a,allOtherBarProps:this.props}),ens.createElement(eig,this.props)))}}var eiw={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:eiv,xAxisId:0,yAxisId:0,zIndex:TV.bar};function eix(e){var t,{xAxisId:r,yAxisId:n,hide:i,legendType:s,minPointSize:o,activeBar:a,animationBegin:l,animationDuration:u,animationEasing:c,isAnimationActive:h}=e,{needClip:d}=GP(r,n),f=TT(),p=N8(),m=q4(e.children,UC),g=AU(t=>en$(t,e.id,p,m));if("vertical"!==f&&"horizontal"!==f)return null;var v=null==g?void 0:g[0];return t=null==v||null==v.height||null==v.width?0:"vertical"===f?v.height/2:v.width/2,ens.createElement(GO,{xAxisId:r,yAxisId:n,data:g,dataPointFormatter:eiy,errorBarOffset:t},ens.createElement(eib,eie({},e,{layout:f,needClip:d,data:g,xAxisId:r,yAxisId:n,hide:i,legendType:s,minPointSize:o,activeBar:a,animationBegin:l,animationDuration:u,animationEasing:c,isAnimationActive:h})))}function eiS(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:i,bandSize:s,xAxis:o,yAxis:a,xAxisTicks:l,yAxisTicks:u,stackedData:c,displayedData:h,offset:d,cells:f,parentViewBox:p,dataStartIndex:m}=e,g="horizontal"===t?a:o,v=c?g.scale.domain():null,y=PR({numericAxis:g}),b=g.scale.map(y);return h.map((e,h)=>{if(c){var g=c[h+m];if(null==g)return null;x=Pk(g,v)}else Array.isArray(x=P_(e,r))||(x=[y,x]);var w=end(n,eiv)(x[1],h);if("horizontal"===t){var x,S,_,M,O,E,P,k=a.scale.map(x[0]),A=a.scale.map(x[1]);if(null==k||null==A)return null;S=PT({axis:o,ticks:l,bandSize:s,offset:i.offset,entry:e,index:h}),_=null!=(P=null!=A?A:k)?P:void 0,M=i.size;var j=k-A;if(O=E0(j)?0:j,E={x:S,y:d.top,width:M,height:d.height},Math.abs(w)>0&&Math.abs(O)<Math.abs(w)){var C=EZ(O||w)*(Math.abs(w)-Math.abs(O));_-=C,O+=C}}else{var N=o.scale.map(x[0]),T=o.scale.map(x[1]);if(null==N||null==T)return null;if(S=N,_=PT({axis:a,ticks:u,bandSize:s,offset:i.offset,entry:e,index:h}),M=T-N,O=i.size,E={x:d.left,y:_,width:d.width,height:O},Math.abs(w)>0&&Math.abs(M)<Math.abs(w)){var R=EZ(M||w)*(Math.abs(w)-Math.abs(M));M+=R}}return null==S||null==_||null==M||null==O?null:eir(eir({},e),{},{stackedBarStart:b,x:S,y:_,width:M,height:O,value:c?x:x[1],payload:e,background:E,tooltipPosition:{x:S+M/2,y:_+O/2},parentViewBox:p},f&&f[h]&&f[h].props)}).filter(Boolean)}function ei_(e){var t=k9(e,eiw),r=en2(t.stackId),n=N8();return ens.createElement(Gq,{id:t.id,type:"bar"},e=>ens.createElement(ens.Fragment,null,ens.createElement(GV,{legendPayload:eil(t)}),ens.createElement(eiu,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),ens.createElement(GX,{type:"bar",id:e,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),ens.createElement(R9,{zIndex:t.zIndex},ens.createElement(eix,eie({},t,{id:e})))))}var eiM=ens.memo(ei_,Yc);eiM.displayName="Bar";var eiO=rJ;let eiE=[{get name(){return eiO.i18n._(rX`Revenue`)},key:2},{name:"EPS",key:1},{get name(){return eiO.i18n._(rX`Gross Margin`)},key:4},{get name(){return eiO.i18n._(rX`Net Margin`)},key:5},{name:"ROE",key:3},{get name(){return eiO.i18n._(rX`Current Ratio`)},key:6}
22,{get name(){return eiO.i18n._(rX`Debt to Equity`)},key:7}];function eiP(e,t){return e?.length?[1,2,3,4,5,6,7].includes(t)&&e.length>=8?e.slice(-8):e.length>=10?e.slice(-10):e:[]}function eik(e,t){let r=e[0],n=e[2];if(!r?.list?.length)return[];let i=[1,2,3,4,5,6,7].includes(t)&&n?.list?.length;if(r.list.length>=10){let e=r.list.slice(-8),n=e.map(e=>e.title??"");if(i){let e=us(n[n.length-1],2);return[3,4,5,6,7].includes(t)?n:[...n,...e]}return e.map(e=>e.title??"")}let s=r.list.map(e=>e.title??"");if(i){let e=us(s[s.length-1],2);return[...s,...e]}return(r.list?.slice(-8)??r.list??[]).map(e=>e.title??"")}function eiA(e,t,r){if([1,2,3,4,5,6,7].includes(r)&&e.length>=8){let r=t.slice(-2),n=e.filter(e=>r.some(t=>e.title===t));n.sort((e,t)=>{let[r,n]=String(e.title).split("/Q").map(Number),[i,s]=String(t.title).split("/Q").map(Number);return r!==i?r-i:n-s});let i=new Map([...e.slice(-8),...n].map(e=>[e.title??"",e]));return t.map(e=>i.get(e)?.value)}let n=new Map(e.map(e=>[e.title??"",e]));return t.map(e=>n.get(e)?.value)}function eij(e,t){let r=eik(e,t),n=e[0],i=e[1],s=e[2],o=[],a=[],l=r.map(e=>({name:e}));if(Array.isArray(n?.list)&&n.list.length>0){let e=new Map(eiP(n.list,t).map(e=>[e.title??"",e]));o.push({name:n.name??"S0",color:"#65DAFC",type:"bar",dataKey:"s0",yAxisId:"left",format:"number"}),a.push("s0"),r.forEach((t,r)=>{l[r].s0=e.get(t)?.value})}if(Array.isArray(i?.list)&&i.list.length>0){let e=new Map(eiP(i.list,t).map(e=>[e.title??"",e])),n=[3,4,5,6,7].includes(t),s=[1,2].includes(t)&&"YoY"===i.name;o.push({name:i.name??"S1",color:"#C054EF",type:n?"bar":"line",dataKey:"s1",yAxisId:n?"left":s?"right":"left",format:s?"percent":"number"}),a.push("s1"),r.forEach((t,r)=>{l[r].s1=e.get(t)?.value})}if(Array.isArray(s?.list)&&s.list.length>0){let e=eiA(s.list,r,t),n="Estimate"===s.name,i=!n&&[3,4,5,6,7].includes(t);o.push({name:s.name??"S2",color:"#1BD760",type:"line",dataKey:"s2",yAxisId:i?"right":"left",format:n?"number":"percent",strokeDasharray:1===t?"4 4":void 0}),a.push("s2"),r.forEach((t,r)=>{l[r].s2=e[r]})}return{chartData:l,series:o}}function eiC(e,t){if(null==e)return"—";let r=Number(e);if(!Number.isFinite(r))return String(e);if("percent"===t)return`${r.toFixed(2)}%`;if(Math.abs(r)>=10||-10>=Math.abs(r)){let e=t7(r,"",0);return"1,000M"===e&&(e="1B"),"1,000K"===e&&(e="1M"),"-1,000M"===e&&(e="-1B"),"-1,000K"===e&&(e="-1M"),e}return String(r)}function eiN({data:e}){let{symbol:t}=e,[r,n]=(0,eni.useState)(!0),[i,s]=(0,eni.useState)(!0),[o,a]=(0,eni.useState)([]),[l,u]=(0,eni.useState)(null),[c,h]=(0,eni.useState)(2),d=e=>{h(e.key)},f=(0,eni.useCallback)(async()=>{if(t)try{let e={type:c,report_type:2,code:t};s(!0);let{list:r,ret:i}=await ev(e);if(0===i){let e=r||[];a(e);let t=eij(e,c);u(t),e.length>0?n(!0):n(2!==c)}}finally{s(!1)}},[c,t]);if((0,eni.useEffect)(()=>{f()},[f]),!t||!r)return null;let p=l&&l.series.length>0&&l.chartData.length>0;return(0,erJ.jsxs)("div",{className:"relative w-full rounded-xl bg-[#1c1c1c] p-4",children:[(0,erJ.jsxs)("div",{className:"flex w-full justify-between",children:[(0,erJ.jsxs)("div",{className:"flex items-center gap-2",children:[(0,erJ.jsx)(d3,{code:t,type:"stock",className:"size-10 shrink-0 rounded-full"}),(0,erJ.jsxs)("div",{className:"text-body font-bold text-foreground",children:[(0,erJ.jsxs)("div",{children:[(0,erJ.jsx)("span",{className:"mr-1",children:t}),(0,erJ.jsx)("span",{children:enn.i18n._(rX`Financial`)})]}),(0,erJ.jsx)("div",{children:enn.i18n._(rX`Snapshot`)})]})]}),(0,erJ.jsx)("div",{className:"block md:hidden @max-lg/chatrail
22:!block",children:(0,erJ.jsxs)(er4,{value:String(c),onValueChange:e=>{let t=eiE.find(t=>t.key===Number(e));t&&d(t)},children:[(0,erJ.jsx)(er6,{className:"h-10 border-border bg-muted",children:(0,erJ.jsx)(er8,{})}),(0,erJ.jsx)(ene,{children:eiE.map(e=>(0,erJ.jsx)(ent,{value:String(e.key),children:e.name},e.key))})]})}),(0,erJ.jsx)("div",{className:"hidden md:flex @max-lg/chatrail:!hidden",children:(0,erJ.jsx)("div",{className:"flex h-10 items-center rounded-lg bg-muted",children:eiE.map(e=>(0,erJ.jsx)("button",{type:"button","data-track-id":"chat.snapshot.tab_select","data-track-tab-key":e.key,onClick:()=>d(e),className:(0,enr.cn)("flex h-full items-center justify-center px-2.5 text-xs",c===e.key?"rounded-lg bg-muted-foreground/20 font-semibold text-foreground":"text-muted-foreground hover:text-foreground"),children:e.name},e.key))})})]}),l&&l.series.length>0&&(0,erJ.jsx)("div",{className:"mt-6 flex w-full justify-end gap-5",children:l.series.map(e=>(0,erJ.jsxs)("div",{className:"flex items-center gap-2",children:[(0,erJ.jsx)("div",{className:"size-3 rounded-sm",style:{background:e.color}}),(0,erJ.jsx)("span",{className:"text-xs text-foreground",children:e.name})]},e.dataKey))}),(0,erJ.jsxs)("div",{className:"relative mt-5 h-[240px] sm:h-[343px] w-full",children:[i&&(0,erJ.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center rounded-lg bg-card/80",children:(0,erJ.jsx)(vx,{className:"size-8 animate-spin text-primary"})}),p?(0,erJ.jsx)(TO,{width:"100%",height:"100%",children:(0,erJ.jsxs)(qP,{data:l.chartData,margin:{top:8,right:4,left:0,bottom:0},className:"text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line]:stroke-border/50",children:[(0,erJ.jsx)(Uj,{strokeDasharray:"2 4",vertical:!1}),(0,erJ.jsx)(erl,{dataKey:"name",tickLine:!1,axisLine:!1,tickMargin:8}),(0,erJ.jsx)(erE,{yAxisId:"left",width:40,tickLine:!1,axisLine:!1,tickMargin:4,tickFormatter:e=>eiC(e,"number")}),(0,erJ.jsx)(erE,{yAxisId:"right",orientation:"right",tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:e=>eiC(e,"percent")}),(0,erJ.jsx)(etq,{content:e=>(0,erJ.jsx)(O_,{...e,formatter:(e,t)=>{let r=l.series.find(e=>e.dataKey===t||e.name===t);return eiC(e,r?.format)}})}),l.series.map(e=>"bar"===e.type?(0,erJ.jsx)(eiM,{dataKey:e.dataKey,name:e.name,fill:e.color,radius:[4,4,0,0],yAxisId:e.yAxisId,barSize:[3,4,5,6,7].includes(c)?14:24},e.dataKey):(0,erJ.jsx)(Zb,{type:"monotone",dataKey:e.dataKey,name:e.name,stroke:e.color,strokeWidth:2,strokeDasharray:e.strokeDasharray,yAxisId:e.yAxisId,dot:{fill:e.color,strokeWidth:0,r:4},activeDot:{r:4,fill:e.color,stroke:"hsl(var(--background))",strokeWidth:1}},e.dataKey))]})}):null]}),0===o.length&&!i&&(0,erJ.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 py-8 text-center text-body text-muted-foreground",children:enn.i18n._(rX`No data`)})]})}let eiT=(0,eni.memo)(eiN,(e,t)=>e.data.symbol===t.data.symbol);var eiR=ed,eiI=lq,eiD=rJ,eiL=ex,eiV=ex;let eiz={get url(){return`file://${e.P("node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-router/dist/development/chunk-LFPYN7LY.mjs")}`}};var eiF=((p=eiF||{}).Pop="POP",p.Push="PUSH",p.Replace="REPLACE",p);function eiB(e,t){if(!1===e||null==e)throw Error(t)}function ei$(e,t){if(!e){"u">typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function eiU({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function eiW(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function eiH(e,t,r="/"){return eiK(e,t,r,!1)}function eiK(e,t,r,n){let i=ei9(("string"==typeof t?eiW(t):t).pathname||"/",r);if(null==i)return null;let s=eiY(e);eiG(s);let o=null;for(let e=0;null==o&&e<s.length;++e){let t=ei7(i);o=ei4(s[e],t,n)}return o}function eiY(e,t=[],r=[],n="",i=!1){let s=(e,s,o=i,a)=>{let l={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:s,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(n)&&o)return;eiB(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}
22" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length)}let u=esa([n,l.relativePath]),c=r.concat(l);e.children&&e.children.length>0&&(eiB(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),eiY(e.children,t,c,u,o)),(null!=e.path||e.index)&&t.push({path:u,score:ei3(u,e.index),routesMeta:c})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of eiq(e.path))s(e,t,!0,r);else s(e,t)}),t}function eiq(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(0===n.length)return i?[s,""]:[s];let o=eiq(n.join("/")),a=[];return a.push(...o.map(e=>""===e?s:[s,e].join("/"))),i&&a.push(...o),a.map(t=>e.startsWith("/")&&""===t?"/":t)}function eiG(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:ei5(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}ec=new WeakMap;var eiJ=/^:[\w-]+$/,eiX=3,eiQ=2,eiZ=1,ei0=10,ei1=-2,ei2=e=>"*"===e;function ei3(e,t){let r=e.split("/"),n=r.length;return r.some(ei2)&&(n+=ei1),t&&(n+=eiQ),r.filter(e=>!ei2(e)).reduce((e,t)=>e+(eiJ.test(t)?eiX:""===t?eiZ:ei0),n)}function ei5(e,t){return e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r])?e[e.length-1]-t[t.length-1]:0}function ei4(e,t,r=!1){let{routesMeta:n}=e,i={},s="/",o=[];for(let e=0;e<n.length;++e){let a=n[e],l=e===n.length-1,u="/"===s?t:t.slice(s.length)||"/",c=ei8({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},u),h=a.route;if(!c&&l&&r&&!n[n.length-1].route.index&&(c=ei8({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},u)),!c)return null;
22Object.assign(i,c.params),o.push({params:i,pathname:esa([s,c.pathname]),pathnameBase:esl(esa([s,c.pathnameBase])),route:h}),"/"!==c.pathnameBase&&(s=esa([s,c.pathnameBase]))}return o}function ei8(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ei6(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=a[n]||"";o=s.slice(0,s.length-e.length).replace(/(.)\/+$/,"$1")}let i=a[n];return r&&!i?e[t]=void 0:e[t]=(i||"").replace(/%2F/g,"/"),e},{}),pathname:s,pathnameBase:o,pattern:e}}function ei6(e,t=!1,r=!0){ei$("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r,i,s)=>{if(n.push({paramName:t,isOptional:null!=r}),r){let t=s.charAt(i+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function ei7(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return ei$(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ei9(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}var ese=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function est(e,t="/"){let r,{pathname:n,search:i="",hash:s=""}="string"==typeof e?eiW(e):e;return{pathname:r=n?(n=n.replace(/\/\/+/g,"/")).startsWith("/")?esr(n.substring(1),"/"):esr(n,t):t,search:esu(i),hash:esc(s)}}function esr(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function esn(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function esi(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function ess(e){let t=esi(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function eso(e,t,r,n=!1){let i,s;"string"==typeof e?i=eiW(e):(eiB(!(i={...e}).pathname||!i.pathname.includes("?"),esn("?","pathname","search",i)),eiB(!i.pathname||!i.pathname.includes("#"),esn("#","pathname","hash",i)),eiB(!i.search||!i.search.includes("#"),esn("#","search","hash",i)));let o=""===e||""===i.pathname,a=o?"/":i.pathname;if(null==a)s=r;else{let e=t.length-1;if(!n&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}s=e>=0?t[e]:"/"}let l=est(i,s),u=a&&"/"!==a&&a.endsWith("/"),c=(o||"."===a)&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var esa=e=>e.join("/").replace(/\/\/+/g,"/"),esl=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),esu=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",esc=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",esh=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function esd(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function esf(e){return e.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var esp="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function esm(e,t){let r=e;if("string"!=typeof r||!ese.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,i=!1;if(esp)try{let e=new URL(window.location.href),n=new URL(r.startsWith("//")?e.protocol+r:r),s=ei9(n.pathname,t);
22n.origin===e.origin&&null!=s?r=s+n.search+n.hash:i=!0}catch(e){ei$(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:i,to:r}}Symbol("Uninstrumented"),Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),Symbol("ResetLoaderData");var esg=eiV.createContext(null);esg.displayName="DataRouter";var esv=eiV.createContext(null);esv.displayName="DataRouterState";var esy=eiV.createContext(!1),esb=eiV.createContext({isTransitioning:!1});esb.displayName="ViewTransition",eiV.createContext(new Map).displayName="Fetchers",eiV.createContext(null).displayName="Await";var esw=eiV.createContext(null);esw.displayName="Navigation";var esx=eiV.createContext(null);esx.displayName="Location";var esS=eiV.createContext({outlet:null,matches:[],isDataRoute:!1});esS.displayName="Route";var es_=eiV.createContext(null);es_.displayName="RouteError";var esM="REACT_ROUTER_ERROR",esO="REDIRECT",esE="ROUTE_ERROR_RESPONSE";function esP(e){if(e.startsWith(`${esM}:${esO}:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}function esk(e){if(e.startsWith(`${esM}:${esE}:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new esh(t.status,t.statusText,t.data)}catch{}}function esA(e,{relative:t}={}){eiB(esj(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=eiV.useContext(esw),{hash:i,pathname:s,search:o}=esD(e,{relative:t}),a=s;return"/"!==r&&(a="/"===s?r:esa([r,s])),n.createHref({pathname:a,search:o,hash:i})}function esj(){return null!=eiV.useContext(esx)}function esC(){return eiB(esj(),"useLocation() may be used only in the context of a <Router> component."),eiV.useContext(esx).location}var esN="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function esT(e){eiV.useContext(esw).static||eiV.useLayoutEffect(e)}function esR(){let{isDataRoute:e}=eiV.useContext(esS);return e?esQ():esI()}function esI(){eiB(esj(),"useNavigate() may be used only in the context of a <Router> component.");
22let e=eiV.useContext(esg),{basename:t,navigator:r}=eiV.useContext(esw),{matches:n}=eiV.useContext(esS),{pathname:i}=esC(),s=JSON.stringify(ess(n)),o=eiV.useRef(!1);return esT(()=>{o.current=!0}),eiV.useCallback((n,a={})=>{if(ei$(o.current,esN),!o.current)return;if("number"==typeof n)return void r.go(n);let l=eso(n,JSON.parse(s),i,"path"===a.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:esa([t,l.pathname])),(a.replace?r.replace:r.push)(l,a.state,a)},[t,r,s,i,e])}function esD(e,{relative:t}={}){let{matches:r}=eiV.useContext(esS),{pathname:n}=esC(),i=JSON.stringify(ess(r));return eiV.useMemo(()=>eso(e,JSON.parse(i),n,"path"===t),[e,i,n,t])}function esL(e,t,r){let n;eiB(esj(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=eiV.useContext(esw),{matches:s}=eiV.useContext(esS),o=s[s.length-1],a=o?o.params:{},l=o?o.pathname:"/",u=o?o.pathnameBase:"/",c=o&&o.route;{let e=c&&c.path||"";es0(l,!c||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
23
24Please change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h=esC();if(t){let e="string"==typeof t?eiW(t):t;eiB("/"===u||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),n=e}else n=h;let d=n.pathname||"/",f=d;if("/"!==u){let e=u.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(e.length).join("/")}let p=eiH(e,{pathname:f});ei$(c||null!=p,`No routes matched location "${n.pathname}${n.search}${n.hash}" `),ei$(null==p||void 0!==p[p.length-1].route.element||void 0!==p[p.length-1].route.Component||void 0!==p[p.length-1].route.lazy,`Matched leaf route at location "${n.pathname}${n.search}${n.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let m=esW(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:esa([u,i.encodeLocation?i.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:esa([u,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),s,r);return t&&m?eiV.createElement(esx.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...n},navigationType:"POP"}},m):m}function esV(){let e=esX(),t=esd(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=eiV.createElement(eiV.Fragment,null,eiV.createElement("p",null,"💿 Hey developer 👋"),eiV.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",eiV.createElement("code",{style:s},"ErrorBoundary")," or"," ",eiV.createElement("code",{style:s},"errorElement")," prop on your route.")),eiV.createElement(eiV.Fragment,null,eiV.createElement("h2",null,"Unexpected Application Error!"),eiV.createElement("h3",{style:{fontStyle:"italic"}},t),r?eiV.createElement("pre",{style:i},r):null,o)}eiV.createContext(null);var esz=eiV.createElement(esV,null),esF=class extends eiV.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){let t=esk(e.digest);t&&(e=t)}let t=void 0!==e?eiV.createElement(esS.Provider,{value:this.props.routeContext},eiV.createElement(es_.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?eiV.createElement(es$,{error:e},t):t}};esF.contextType=esy;var esB=new WeakMap;function es$({children:e,error:t}){let{basename:r}=eiV.useContext(esw);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=esP(t.digest);if(e){let n=esB.get(t);if(n)throw n;let i=esm(e.location,r);if(esp&&!esB.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let r=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw esB.set(t,r),r}
24return eiV.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function esU({routeContext:e,match:t,children:r}){let n=eiV.useContext(esg);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),eiV.createElement(esS.Provider,{value:e},r)}function esW(e,t=[],r){let n=r?.state;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let i=e,s=n?.errors;if(null!=s){let e=i.findIndex(e=>e.route.id&&s?.[e.route.id]!==void 0);eiB(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,a=-1;if(r&&n){o=n.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(a=e),t.route.id){let{loaderData:e,errors:s}=n,l=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!s||void 0===s[t.route.id]);if(t.route.lazy||l){r.isStatic&&(o=!0),i=a>=0?i.slice(0,a+1):[i[0]];break}}}}let l=r?.onError,u=n&&l?(e,t)=>{l(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:esf(n.matches),errorInfo:t})}:void 0;return i.reduceRight((e,r,l)=>{let c,h=!1,d=null,f=null;n&&(c=s&&r.route.id?s[r.route.id]:void 0,d=r.route.errorElement||esz,o&&(a<0&&0===l?(es0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,f=null):a===l&&(h=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(i.slice(0,l+1)),m=()=>{let t;return t=c?d:h?f:r.route.Component?eiV.createElement(r.route.Component,null):r.route.element?r.route.element:e,eiV.createElement(esU,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===l)?eiV.createElement(esF,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0},onError:u}):m()},null)}function esH(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function esK(e){let t=eiV.useContext(esg);return eiB(t,esH(e)),t}function esY(e){let t=eiV.useContext(esv);return eiB(t,esH(e)),t}function esq(e){let t=eiV.useContext(esS);return eiB(t,esH(e)),t}function esG(e){let t=esq(e),r=t.matches[t.matches.length-1];return eiB(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function esJ(){return esG("useRouteId")}function esX(){let e=eiV.useContext(es_),t=esY("useRouteError"),r=esG("useRouteError");return void 0!==e?e:t.errors?.[r]}function esQ(){let{router:e}=esK("useNavigate"),t=esG("useNavigate"),r=eiV.useRef(!1);return esT(()=>{r.current=!0}),eiV.useCallback(async(n,i={})=>{ei$(r.current,esN),r.current&&("number"==typeof n?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...i}))},[e,t])}var esZ={};function es0(e,t,r){t||esZ[e]||(esZ[e]=!0,ei$(!1,r))}function es1({routes:e,future:t,state:r,isStatic:n,onError:i}){return esL(e,void 0,{state:r,isStatic:n,onError:i,future:t})}eiV.useOptimistic,eiV.memo(es1),eiV.Component;var es2="get",es3="application/x-www-form-urlencoded";function es5(e){return"u">typeof HTMLElement&&e instanceof HTMLElement}function es4(e){return es5(e)&&"button"===e.tagName.toLowerCase()}function es8(e){return es5(e)&&"form"===e.tagName.toLowerCase()}function es6(e){return es5(e)&&"input"===e.tagName.toLowerCase()}function es7(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function es9(e,t){return 0===e.button&&(!t||"_self"===t)&&!es7(e)}var eoe=null;function eot(){if(null===eoe)try{new FormData(document.createElement("form"),0),eoe=!1}catch(e){eoe=!0}return eoe}var eor=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function eon(e){return null==e||eor.has(e)?e:(ei$(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${es3}"`),null)}function eoi(e,t){let r,n,i,s,o;if(es8(e)){let o=e.getAttribute("action");n=o?ei9(o,t):null,r=e.getAttribute("method")||es2,i=eon(e.getAttribute("enctype"))||es3,s=new FormData(e)}else if(es4(e)||es6(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw Error('Cannot submit a <button> or <input type="submit"> without a <form>');let a=e.getAttribute("formaction")||o.getAttribute("action");if(n=a?ei9(a,t):null,r=e.getAttribute("formmethod")||o.getAttribute("method")||es2,i=eon(e.getAttribute("formenctype"))||eon(o.getAttribute("enctype"))||es3,s=new FormData(o,e),!eot()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";s.append(`${e}x`,"0"),s.append(`${e}y`,"0")}
24else t&&s.append(t,n)}}else if(es5(e))throw Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');else r=es2,n=null,i=es3,o=e;return s&&"text/plain"===i&&(o=s,s=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),"u">typeof window&&window;function eos(e,t){if(!1===e||null==e)throw Error(t)}function eoo(e,t,r,n){let i="string"==typeof e?new URL(e,"u"<typeof window?"server://singlefetch/":window.location.origin):e;return r?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${n}`:i.pathname=`${i.pathname}.${n}`:"/"===i.pathname?i.pathname=`_root.${n}`:t&&"/"===ei9(i.pathname,t)?i.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${n}`,i}async function eoa(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(t){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&eiz.hot)throw t;return window.location.reload(),new Promise(()=>{})}}function eol(e){return null!=e&&"string"==typeof e.page}function eou(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function eoc(e,t,r){return eom((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await eoa(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(eou).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function eoh(e,t,r,n,i,s){let o=(e,t)=>!r[t]||e.route.id!==r[t].route.id,a=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===s?t.filter((e,t)=>o(e,t)||a(e,t)):"data"===s?t.filter((t,s)=>{let l=n.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(o(t,s)||a(t,s))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function eod(e,t,{includeHydrateFallback:r}={}){return eof(e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let i=[n.module];return n.clientActionModule&&(i=i.concat(n.clientActionModule)),n.clientLoaderModule&&(i=i.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(i=i.concat(n.hydrateFallbackModule)),n.imports&&(i=i.concat(n.imports)),i}).flat(1))}function eof(e){return[...new Set(e)]}function eop(e){let t={};for(let r of Object.keys(e).sort())t[r]=e[r];return t}function eom(e,t){let r=new Set,n=new Set(t);return e.reduce((e,i)=>{if(t&&!eol(i)&&"script"===i.as&&i.href&&n.has(i.href))return e;let s=JSON.stringify(eop(i));return r.has(s)||(r.add(s),e.push({key:s,link:i})),e},[])}function eog(){let e=eiV.useContext(esg);return eos(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function eov(){let e=eiV.useContext(esv);return eos(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}Symbol("SingleFetchRedirect");var eoy=eiV.createContext(void 0);function eob(){let e=eiV.useContext(eoy);return eos(e,"You must render this element inside a <HydratedRouter> element"),e}function eow(e,t){let r=eiV.useContext(eoy),[n,i]=eiV.useState(!1),[s,o]=eiV.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:h}=t,d=eiV.useRef(null);eiV.useEffect(()=>{if("render"===e&&o(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return d.current&&e.observe(d.current),()=>{e.disconnect()}}},[e]),eiV.useEffect(()=>{if(n){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[n]);let f=()=>{i(!0)},p=()=>{i(!1),o(!1)};return r?"intent"!==e?[s,d,{}]:[s,d,{onFocus:eox(a,f),onBlur:eox(l,p),onMouseEnter:eox(u,f),onMouseLeave:eox(c,p),onTouchStart:eox(h,f)}]:[!1,d,{}]}function eox(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function eoS({page:e,...t}){let{router:r}=eog(),n=eiV.useMemo(()=>eiH(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?eiV.createElement(eoM,{page:e,matches:n,...t}):null}function eo_(e){let{manifest:t,routeModules:r}=eob(),[n,i]=eiV.useState([]);return eiV.useEffect(()=>{let n=!1;return eoc(e,t,r).then(e=>{n||i(e)}
24),()=>{n=!0}},[e,t,r]),n}function eoM({page:e,matches:t,...r}){let n=esC(),{future:i,manifest:s,routeModules:o}=eob(),{basename:a}=eog(),{loaderData:l,matches:u}=eov(),c=eiV.useMemo(()=>eoh(e,t,u,s,n,"data"),[e,t,u,s,n]),h=eiV.useMemo(()=>eoh(e,t,u,s,n,"assets"),[e,t,u,s,n]),d=eiV.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,u=!1;if(t.forEach(e=>{let t=s.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in l&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?u=!0:r.add(e.route.id))}),0===r.size)return[];let h=eoo(e,a,i.unstable_trailingSlashAwareDataRequests,"data");return u&&r.size>0&&h.searchParams.set("_routes",t.filter(e=>r.has(e.route.id)).map(e=>e.route.id).join(",")),[h.pathname+h.search]},[a,i.unstable_trailingSlashAwareDataRequests,l,n,s,c,t,e,o]),f=eiV.useMemo(()=>eod(h,s),[h,s]),p=eo_(h);return eiV.createElement(eiV.Fragment,null,d.map(e=>eiV.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),f.map(e=>eiV.createElement("link",{key:e,rel:"modulepreload",href:e,...r})),p.map(({key:e,link:t})=>eiV.createElement("link",{key:e,nonce:r.nonce,...t,crossOrigin:t.crossOrigin??r.crossOrigin})))}eoy.displayName="FrameworkContext";function eoO(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}eiV.Component;var eoE="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{eoE&&(window.__reactRouterVersion="7.13.1")}catch(e){}var eoP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eok=eiV.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:i,replace:s,unstable_mask:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:h,unstable_defaultShouldRevalidate:d,...f},p){let{basename:m,navigator:g,unstable_useTransitions:v}=eiV.useContext(esw),y="string"==typeof u&&eoP.test(u),b=esm(u,m),w=esA(u=b.to,{relative:n}),x=esC(),S=null;if(o){let e=eso(o,[],x.unstable_mask?x.unstable_mask.pathname:"/",!0);"/"!==m&&(e.pathname="/"===e.pathname?m:esa([m,e.pathname])),S=g.createHref(e)}let[_,M,O]=eow(r,f),E=eoC(u,{replace:s,unstable_mask:o,state:a,target:l,preventScrollReset:c,relative:n,viewTransition:h,unstable_defaultShouldRevalidate:d,unstable_useTransitions:v});function P(t){e&&e(t),t.defaultPrevented||E(t)}let k=!(b.isExternal||i),A=eiV.createElement("a",{...f,...O,href:(k?S:void 0)||b.absoluteURL||w,onClick:k?P:e,ref:eoO(p,M),target:l,"data-discover":y||"render"!==t?void 0:"true"});return _&&!y?eiV.createElement(eiV.Fragment,null,A,eiV.createElement(eoS,{page:w})):A});function eoA(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function eoj(e){let t=eiV.useContext(esg);return eiB(t,eoA(e)),t}function eoC(e,{target:t,replace:r,unstable_mask:n,state:i,preventScrollReset:s,relative:o,viewTransition:a,unstable_defaultShouldRevalidate:l,unstable_useTransitions:u}={}){let c=esR(),h=esC(),d=esD(e,{relative:o});return eiV.useCallback(f=>{if(es9(f,t)){f.preventDefault();let t=void 0!==r?r:eiU(h)===eiU(d),p=()=>c(e,{replace:t,unstable_mask:n,state:i,preventScrollReset:s,relative:o,viewTransition:a,unstable_defaultShouldRevalidate:l});u?eiV.startTransition(()=>p()):p()}},[h,c,d,r,n,i,t,e,s,o,a,l,u])}eok.displayName="Link",eiV.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:i,to:s,viewTransition:o,children:a,...l},u){let c,h=esD(s,{relative:l.relative}),d=esC(),f=eiV.useContext(esv),{navigator:p,basename:m}=eiV.useContext(esw),g=null!=f&&eoD(h)&&!0===o,v=p.encodeLocation?p.encodeLocation(h).pathname:h.pathname,y=d.pathname,b=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(y=y.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&m&&(b=ei9(b,m)||b);let w="/"!==v&&v.endsWith("/")?v.length-1:v.length,x=y===v||!n&&y.startsWith(v)&&"/"===y.charAt(w),S=null!=b&&(b===v||!n&&b.startsWith(v)&&"/"===b.charAt(v.length)),_={isActive:x,isPending:S,isTransitioning:g},M=x?e:void 0;c="function"==typeof r?r(_):[r,x?"active":null,S?"pending":null,g?"transitioning":null].filter(
24Boolean).join(" ");let O="function"==typeof i?i(_):i;return eiV.createElement(eok,{...l,"aria-current":M,className:c,ref:u,style:O,to:s,viewTransition:o},"function"==typeof a?a(_):a)}).displayName="NavLink",eiV.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:s,method:o=es2,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:h,unstable_defaultShouldRevalidate:d,...f},p)=>{let{unstable_useTransitions:m}=eiV.useContext(esw),g=eoR(),v=eoI(a,{relative:u}),y="get"===o.toLowerCase()?"get":"post",b="string"==typeof a&&eoP.test(a),w=e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,a=n?.getAttribute("formmethod")||o,f=()=>g(n||e.currentTarget,{fetcherKey:t,method:a,navigate:r,replace:i,state:s,relative:u,preventScrollReset:c,viewTransition:h,unstable_defaultShouldRevalidate:d});m&&!1!==r?eiV.startTransition(()=>f()):f()};return eiV.createElement("form",{ref:p,method:y,action:v,onSubmit:n?l:w,...f,"data-discover":b||"render"!==e?void 0:"true"})}).displayName="Form";var eoN=0,eoT=()=>`__${String(++eoN)}__`;function eoR(){let{router:e}=eoj("useSubmit"),{basename:t}=eiV.useContext(esw),r=esJ(),n=e.fetch,i=e.navigate;return eiV.useCallback(async(e,s={})=>{let{action:o,method:a,encType:l,formData:u,body:c}=eoi(e,t);if(!1===s.navigate){let e=s.fetcherKey||eoT();await n(e,r,s.action||o,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:u,body:c,formMethod:s.method||a,formEncType:s.encType||l,flushSync:s.flushSync})}else await i(s.action||o,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:u,body:c,formMethod:s.method||a,formEncType:s.encType||l,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,i,t,r])}function eoI(e,{relative:t}={}){let{basename:r}=eiV.useContext(esw),n=eiV.useContext(esS);eiB(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),s={...esD(e||".",{relative:t})},o=esC();if(null==e){s.search=o.search;let e=new URLSearchParams(s.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();s.search=r?`?${r}`:""}}return(!e||"."===e)&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),"/"!==r&&(s.pathname="/"===s.pathname?r:esa([r,s.pathname])),eiU(s)}function eoD(e,{relative:t}={}){let r=eiV.useContext(esb);eiB(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=eoj("useViewTransitionState"),i=esD(e,{relative:t});if(!r.isTransitioning)return!1;let s=ei9(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=ei9(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=ei8(i.pathname,o)||null!=ei8(i.pathname,s)}var eoL=ed,eoV=dq;let eoz=({className:e,...t})=>(0,eoL.jsx)("div",{className:(0,eoV.cn)("animate-pulse rounded-md bg-muted",e),...t});function eoF(){return(0,eoL.jsx)("div",{className:"relative w-full rounded-xl bg-[#1c1c1c] p-4",children:(0,eoL.jsx)("div",{className:"overflow-x-auto",children:(0,eoL.jsxs)("div",{className:"min-w-[400px]",children:[(0,eoL.jsx)("div",{className:"flex h-10 items-center gap-2 border-b border-border",children:[1,2,3,4].map(e=>(0,eoL.jsx)(eoz,{className:"h-4 w-20"},e))}),[1,2,3,4].map(e=>(0,eoL.jsx)("div",{className:"flex h-12 items-center gap-2 border-b border-border/50",children:[1,2,3,4].map(e=>(0,eoL.jsx)(eoz,{className:"h-4 w-16"},e))},e))]})})})}var eoB=ed,eo$=ed,eoU=dq,eoW=rJ,eoH=e.i(973752),eoK=ex,eoY=ex;let eoq=(0,eoY.createContext)(null);function eoG(){return(0,eoY.useContext)(eoq)}let eoJ=ED,eoX=EL,eoQ=({container:e,...t})=>{let r=eoG();return(0,eo$.jsx)(EV,{container:e??r,...t})},eoZ=eoK.forwardRef(({className:e,...t},r)=>(0,eo$.jsx)(Ez,{ref:r,className:(0,eoU.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));eoZ.displayName=Ez.displayName;let eo0=eoK.forwardRef(({className:e,overlayClassName:t,children:r,...n},i)=>(0,eo$.jsxs)(eoQ,{children:[(0,eo$.jsx)(eoZ,{className:t}),(0,eo$.jsxs)(EF,{ref:i,className:(0,eoU.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
24nded-lg",e),...n,children:[r,(0,eo$.jsxs)(EU,{"data-track-id":"dialog.close",className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[(0,eo$.jsx)(eoH.X,{className:"h-4 w-4"}),(0,eo$.jsx)("span",{className:"sr-only",children:eoW.i18n._(rX`Close`)})]})]})]}));eo0.displayName=EF.displayName,eoK.forwardRef(({className:e,children:t,...r},n)=>(0,eo$.jsx)(EF,{ref:n,className:(0,eoU.cn)("fixed z-50 focus:outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r,children:t})).displayName="DialogContentCustom";let eo1=({className:e,...t})=>(0,eo$.jsx)("div",{className:(0,eoU.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});eo1.displayName="DialogHeader";let eo2=eoK.forwardRef(({className:e,...t},r)=>(0,eo$.jsx)(EB,{ref:r,className:(0,eoU.cn)("text-lg font-semibold leading-none tracking-tight",e),...t}));eo2.displayName=EB.displayName,eoK.forwardRef(({className:e,...t},r)=>(0,eo$.jsx)(E$,{ref:r,className:(0,eoU.cn)("text-sm text-muted-foreground",e),...t})).displayName=E$.displayName;var eo3=ed,eo5=dq,eo4=ex;let eo8=eo4.forwardRef(({className:e,...t},r)=>(0,eo3.jsx)("div",{className:"relative w-full overflow-auto",children:(0,eo3.jsx)("table",{ref:r,className:(0,eo5.cn)("w-full caption-bottom text-sm md:text-base",e),...t})}));eo8.displayName="Table";let eo6=eo4.forwardRef(({className:e,...t},r)=>(0,eo3.jsx)("thead",{ref:r,className:(0,eo5.cn)("[&_tr]:border-b",e),...t}));eo6.displayName="TableHeader";let eo7=eo4.forwardRef(({className:e,...t},r)=>(0,eo3.jsx)("tbody",{ref:r,className:(0,eo5.cn)("[&_tr:last-child]:border-0",e),...t}));eo7.displayName="TableBody",eo4.forwardRef(({className:e,...t},r)=>(0,eo3.jsx)("tfoot",{ref:r,className:(0,eo5.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})).displayName="TableFooter";let eo9=eo4.forwardRef(({className:e,...t},r)=>(0,eo3.jsx)("tr",{ref:r,className:(0,eo5.cn)("border-b  data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));eo9.displayName="TableRow";let eae=eo4.forwardRef(({className:e,...t},r)=>(0,eo3.jsx)("th",{ref:r,className:(0,eo5.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));eae.displayName="TableHead";let eat=eo4.forwardRef(({className:e,...t},r)=>(0,eo3.jsx)("td",{ref:r,className:(0,eo5.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));eat.displayName="TableCell",eo4.forwardRef(({className:e,...t},r)=>(0,eo3.jsx)("caption",{ref:r,className:(0,eo5.cn)("mt-4 text-sm text-muted-foreground",e),...t})).displayName="TableCaption";var ear=rJ,ean=er1,eai=ex;let eas={0:"stock",1:"etf",2:"crypto"};function eao(e,t,r){if(null==e||""===e)return"—";if("ticker"===t||"name"===t)return String(e);if("price"===t)return"0"===r&&Number.isFinite(Number(e))?Number(e).toFixed(2):String(e);let n=Number(e);return Number.isFinite(n)?t7(n):String(e)}function eaa({content:e}){let[t,r]=(0,eai.useState)(!1),n=e?.trim()||"";return n?(0,eoB.jsxs)("div",{className:"flex max-w-full flex-nowrap items-end gap-0.5 text-foreground text-sm leading-relaxed",children:[(0,eoB.jsx)("span",{className:"min-w-0 flex-1 line-clamp-3",children:n}),(0,eoB.jsxs)(eoJ,{open:t,onOpenChange:r,children:[(0,eoB.jsx)(eoX,{asChild:!0,children:(0,eoB.jsx)("button",{type:"button","data-track-id":"chat.stock_picking.info.open",className:"shrink-0 cursor-pointer whitespace-nowrap text-xs text-primary underline underline-offset-2 hover:text-primary/90",children:ear.i18n._(rX`Expand`)})}),(0,eoB.jsxs)(eo0,{className:"max-h-[80vh] max-w-2xl overflow-hidden",children:[(0,eoB.jsx)(eo1,{children:(0,eoB.jsx)(eo2,{children:ear.i18n._(rX`Details`)})}),(0,eoB.jsx)("div",{className:"max-h-[60vh] overflow-y-auto pr-2 text-body text-foreground leading-relaxed whitespace-pre-wrap",children:n})]})]})]}):(0,eoB.jsx)("span",{className:"text-muted-foreground",children:"—"})}let eal=5;function eau({datas:e,displayFields:t,type:r="0",onTickerClick:n}){let[i,s]=(0,eai.useState)(!1),o=eas[r]??"stock",a=Array.isArray(t)?t:[],l=e.length>eal,u=l&&!i?e.slice(0,eal):e;return 0===a.length||0===e.length?null:(0,eoB.jsxs)("div",{className:"space-y-2",children:[(0,eoB.jsxs)(eo8,{children:[(0,eoB.jsx)(eo6,{children:(0,eoB.jsx)(eo9,{className:"border-border bg-muted/60 hover:bg-muted/60",children:a.map(e=>(0,eoB.jsx)(eae,{className:"min-w-[110px] whitespace-nowrap bg-muted/60 px-4 py-3 font-semibold capitalize text-foreground",children:e.replace(/_/g," ")},e))})}),(0,eoB.jsx)(eo7,{children:u.map((e,t)=>{let i=e?.info??{},s=String(i.ticker??i.symbol??"");return(0,eoB.jsx)(eo9,{className:"border-border",children:a.map(e=>{let t=i[e];return"ticker"===e?(0,eoB.jsx)(eat,{className:"text-foreground",children:(0,eoB.jsxs)("button",{type:"button","data-track-id":"chat.stock_picking.ticker.link","data-track-symbol":s,onClick:()=>n?.(s),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,eoB.jsx)(d3,{code:s,t
24ype:o,className:"size-6 shrink-0 rounded-full"}),(0,eoB.jsx)("span",{className:"font-medium",children:s})]})},e):"info"===e?(0,eoB.jsx)(eat,{className:"min-w-[200px] max-w-[320px] text-foreground align-top",children:(0,eoB.jsx)(eaa,{content:String(t??"")})},e):(0,eoB.jsx)(eat,{className:"text-foreground",children:eao(t,e,r)},e)})},s||t)})})]}),l&&(0,eoB.jsx)("button",{type:"button","data-track-id":"chat.stock_picking.toggle",onClick:()=>s(e=>!e),className:"flex w-full items-center justify-center gap-1.5 py-2 text-sm text-primary underline underline-offset-2 hover:text-primary/90",children:i?(0,eoB.jsxs)(eoB.Fragment,{children:[(0,eoB.jsx)(er3,{className:"size-4"}),ear.i18n._(rX`Collapse`)]}):(0,eoB.jsxs)(eoB.Fragment,{children:[(0,eoB.jsx)(ean.ChevronDown,{className:"size-4"}),ear.i18n._(rX`Expand`)," (",e.length-eal," ",ear.i18n._(rX`more`),")"]})})]})}function eac({data:e}){let t=esR(),{screenId:r="",type:n="0",title:i}=e,[s,o]=(0,eiL.useState)(!!r),[a,l]=(0,eiL.useState)([]),[u,c]=(0,eiL.useState)([]);(0,eiL.useEffect)(()=>{if(!r)return;let e=!1;return async function(){o(!0);try{let{ret:t,request_json_body:i,datas:s=[]}=await (0,eiI.byScreenerId)({screener_id:r});if(e)return;if(0!==t)return void l([]);if(i&&n)try{await (0,eiI.screenerParam)({screener_type:[n]})}catch{}if(Array.isArray(s)&&s.length>0){l(s);let e=s[0]?.info?.field_display_order;c("string"==typeof e?e.split(","):[])}else l([]),c([])}catch{e||l([])}finally{e||o(!1)}}(),()=>{e=!0}},[r,n]);let h=e=>{"0"===n?t(`/stock/${e}`):"1"===n?t(`/etf/${e}`):"2"===n&&t(`/crypto/${e}`)};if(s)return(0,eiR.jsx)(eoF,{});let d=i??eiD.i18n._(rX`Trending stocks with bullish trend`);return(0,eiR.jsxs)("div",{className:"relative w-full rounded-xl bg-[#1c1c1c] p-4",children:[(0,eiR.jsx)(Oo,{icon:M4,title:d}),(0,eiR.jsx)("div",{className:"mt-4 overflow-x-auto",children:(0,eiR.jsx)(eau,{datas:a,displayFields:u,type:n,onTickerClick:h})}),0===a.length&&(0,eiR.jsx)("div",{className:"py-8 text-center text-body text-muted-foreground",children:eiD.i18n._(rX`No data`)})]})}var eah=rJ,ead=ip;function eaf(e,t="YYYY-MM-DD"){return{start:(0,ead.default)().subtract(e,"year").format(t),end:(0,ead.default)().format(t)}}!function(e){e[e.PE=0]="PE",e[e.PB=1]="PB",e[e.PS=2]="PS",e[e.PRICE_TO_FREE_CASH_FLOW=3]="PRICE_TO_FREE_CASH_FLOW",e[e.EV_TO_EBITDA=4]="EV_TO_EBITDA",e[e.PRICE_TO_OPERATING_CASH_FLOW=5]="PRICE_TO_OPERATING_CASH_FLOW",e[e.FCF_YIELD=6]="FCF_YIELD",e[e.EV_EBIT=7]="EV_EBIT"}(eh||(eh={}));let eap=[{name:"P/E",key:eh.PE},{name:"EV/EBITDA",key:eh.EV_TO_EBITDA},{name:"EV/EBIT",key:eh.EV_EBIT},{name:"P/S",key:eh.PS},{name:"P/OCF",key:eh.PRICE_TO_OPERATING_CASH_FLOW},{name:"P/FCF",key:eh.PRICE_TO_FREE_CASH_FLOW}],eam=[{get name(){return eah.i18n._(rX`Trailing`)},type:"trailing"},{get name(){return eah.i18n._(rX`Forward`)},type:"forward"}],eag=[{name:"1Y",key:3,time:eaf(1)},{name:"3Y",key:4,time:eaf(3)},{name:"5Y",key:5,time:eaf(5)}],eav={get mean(){return eah.i18n._(rX`Historic Trend Line - Fairly Valued`)},get overvalued(){return eah.i18n._(rX`Overvalued`)},get undervalued(){return eah.i18n._(rX`Undervalued`)},get strongly_overvalued(){return eah.i18n._(rX`Strongly Overvalued`)},get strongly_undervalued(){return eah.i18n._(rX`Strongly Undervalued`)}},eay={mean:"hsl(var(--muted-foreground))",overvalued:"#FD7E14",undervalued:"#97D87B",strongly_overvalued:"#FF5947",strongly_undervalued:"#198754"};var eab=ed;let eaw="[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-[hsl(var(--muted))] [&_.recharts-curve.recharts-tooltip-cursor]:stroke-[hsl(var(--border))]";var eax=dq,eaS=rJ,ea_=ip,eaM=e.i(661592),eaO=ex,eaE=ex,eaP=ky,eak=(e,t,r)=>Uo(e,"xAxis",en_(e,t),r),eaA=(e,t,r)=>Us(e,"xAxis",en_(e,t),r),eaj=(e,t,r)=>Uo(e,"yAxis",enM(e,t),r),eaC=(e,t,r)=>Us(e,"yAxis",enM(e,t),r),eaN=Cg([TN,eak,eaj,eaA,eaC],(e,t,r,n,i)=>PO(e,"xAxis")?PF(t,n,!1):PF(r,i,!1)),eaT=Cg([BN,(e,t)=>t],(e,t)=>e.filter(e=>"area"===e.type).find(e=>e.id===t)),eaR=e=>PO(TN(e),"xAxis")?"yAxis":"xAxis",eaI=(e,t)=>"yAxis"===eaR(e)?enM(e,t):en_(e,t),eaD=Cg([eaT,(e,t,r)=>B0(e,eaR(e),eaI(e,t),r)],(e,t)=>{if(null!=e&&null!=t){var r,{stackId:n}=e,i=Br(e);if(null!=n&&null!=i){var s=null==(r=t[n])?void 0:r.stackedData,o=null==s?void 0:s.find(e=>e.key===i);if(null!=o)return o.map(e=>[e[0],e[1]])}}}),eaL=Cg([TN,eak,eaj,eaA,eaC,eaD,FV,eaN,eaT,F9],(e,t,r,n,i,s,o,a,l,u)=>{var c,{chartData:h,dataStartIndex:d,dataEndIndex:f}=o;if(null!=l&&("horizontal"===e||"vertical"===e)&&null!=t&&null!=r&&null!=n&&null!=i&&0!==n.length&&0!==i.length&&null!=a){var{data:p}=l;if(null!=(c=p&&p.length>0?p:null==h?void 0:h.slice(d,f+1)))return ea9({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:d,areaSettings:l,stackedData:s,displayedData:c,chartBaseValue:u,bandSize:a})}}),eaV=["id"],eaz=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function eaF(){return(eaF=Object.assign.bind()).apply(null,arguments)}function eaB(e,t){if(null==e)return{};var r,n,i=ea$(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ea$(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function eaU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eaW(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
24t%2?eaU(Object(r),!0).forEach(function(t){eaH(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eaU(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eaH(e,t,r){return(t=eaK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eaK(e){var t=eaY(e,"string");return"symbol"==typeof t?t:t+""}function eaY(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function eaq(e,t){return e&&"none"!==e?e:t}var eaG=e=>{var{dataKey:t,name:r,stroke:n,fill:i,legendType:s,hide:o}=e;return[{inactive:o,dataKey:t,type:s,color:eaq(n,i),value:P$(r,t),payload:e}]},eaJ=eaE.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:s,name:o,hide:a,unit:l,tooltipType:u,id:c}=e,h={dataDefinedOnItem:r,getPosition:Pn,settings:{stroke:n,strokeWidth:i,fill:s,dataKey:t,nameKey:void 0,name:P$(o,t),hide:a,type:u,color:eaq(n,s),unit:l,graphicalItemId:c}};return eaE.createElement(Gy,{tooltipEntrySettings:h})});function eaX(e){var{clipPathId:t,points:r,props:n}=e,{needClip:i,dot:s,dataKey:o}=n,a=kk(n);return eaE.createElement(Gl,{points:r,dot:s,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:o,baseProps:a,needClip:i,clipPathId:t})}function eaQ(e){var{showLabels:t,children:r,points:n}=e,i=n.map(e=>{var t,r,n={x:null!=(t=e.x)?t:0,y:null!=(r=e.y)?r:0,width:0,lowerWidth:0,upperWidth:0,height:0};return eaW(eaW({},n),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:n,fill:void 0})});return eaE.createElement(qz,{value:t?i:void 0},r)}function eaZ(e){var{points:t,baseLine:r,needClip:n,clipPathId:i,props:s}=e,{layout:o,type:a,stroke:l,connectNulls:u,isRange:c}=s,{id:h}=s,d=eaB(s,eaV),f=kk(d),p=kj(d);return eaE.createElement(eaE.Fragment,null,(null==t?void 0:t.length)>1&&eaE.createElement(kD,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},eaE.createElement(QB,eaF({},p,{id:h,points:t,connectNulls:u,type:a,baseLine:r,layout:o,stroke:"none",className:"recharts-area-area"})),"none"!==l&&eaE.createElement(QB,eaF({},f,{className:"recharts-area-curve",layout:o,type:a,connectNulls:u,fill:"none",points:t})),"none"!==l&&c&&eaE.createElement(QB,eaF({},f,{className:"recharts-area-curve",layout:o,type:a,connectNulls:u,fill:"none",points:r}))),eaE.createElement(eaX,{points:t,props:d,clipPathId:i}))}function ea0(e){var t,r,{alpha:n,baseLine:i,points:s,strokeWidth:o}=e,a=null==(t=s[0])?void 0:t.y,l=null==(r=s[s.length-1])?void 0:r.y;if(!Pg(a)||!Pg(l))return null;var u=n*Math.abs(a-l),c=Math.max(...s.map(e=>e.x||0));return(E2(i)?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(...i.map(e=>e.x||0),c)),E2(c))?eaE.createElement("rect",{x:0,y:a<l?a:a-u,width:c+(o?parseInt("".concat(o),10):1),height:Math.floor(u)}):null}function ea1(e){var t,r,{alpha:n,baseLine:i,points:s,strokeWidth:o}=e,a=null==(t=s[0])?void 0:t.x,l=null==(r=s[s.length-1])?void 0:r.x;if(!Pg(a)||!Pg(l))return null;var u=n*Math.abs(a-l),c=Math.max(...s.map(e=>e.y||0));return(E2(i)?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(...i.map(e=>e.y||0),c)),E2(c))?eaE.createElement("rect",{x:a<l?a:a-u,y:0,width:u,height:Math.floor(c+(o?parseInt("".concat(o),10):1))}):null}function ea2(e){var{alpha:t,layout:r,points:n,baseLine:i,strokeWidth:s}=e;return"vertical"===r?eaE.createElement(ea0,{alpha:t,points:n,baseLine:i,strokeWidth:s}):eaE.createElement(ea1,{alpha:t,points:n,baseLine:i,strokeWidth:s})}function ea3(e){var{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:s}=e,{points:o,baseLine:a,isAnimationActive:l,animationBegin:u,animationDuration:c,animationEasing:h,onAnimationStart:d,onAnimationEnd:f}=n,p=GB((0,eaE.useMemo)(()=>({points:o,baseLine:a}),[o,a]),"recharts-area-"),m=TR(),[g,v]=(0,eaE.useState)(!1),y=!g,b=(0,eaE.useCallback)(()=>{"function"==typeof f&&f(),v(!1)},[f]),w=(0,eaE.useCallback)(()=>{"function"==typeof d&&d(),v(!0)},[d]);if(null==m)return null;var x=i.current,S=s.current;return eaE.createElement(eaQ,{showLabels:y,points:o},n.children,eaE.createElement(Jj,{animationId:p,begin:u,duration:c,isActive:l,easing:h,onAnimationEnd:b,onAnimationStart:w,key:p},e=>{if(x){var u,c=x.length/o.length,h=1===e?o:o.map((t,r)=>{var n=Math.floor(r*c);if(x[n]){var i=x[n];return eaW(eaW({},t),{},{x:E7(i.x,t.x,e),y:E7(i.y,t.y,e)})}return t});return u=E2(a)?E7(S,a,e):Pe(a)||E0(a)?E7(S,0,e):a.map((t,r)=>{var n=Math.floor(r*c);if(Array.isArray(S)&&S[n]){var i=S[n];return eaW(eaW({},t),{},{x:E7(i.x,t.x,e),y:E7(i.y,t.y,e)})}return t}),e>0&&(i.current=h,s.current=u),eaE.createElement(eaZ,{points:h,baseLine:u,needClip:t,clipPathId:r,props:n})}return e>
240&&(i.current=o,s.current=a),eaE.createElement(kD,null,l&&eaE.createElement("defs",null,eaE.createElement("clipPath",{id:"animationClipPath-".concat(r)},eaE.createElement(ea2,{alpha:e,points:o,baseLine:a,layout:m,strokeWidth:n.strokeWidth}))),eaE.createElement(kD,{clipPath:"url(#animationClipPath-".concat(r,")")},eaE.createElement(eaZ,{points:o,baseLine:a,needClip:t,clipPathId:r,props:n})))}),eaE.createElement(qH,{label:n.label}))}function ea5(e){var{needClip:t,clipPathId:r,props:n}=e,i=(0,eaE.useRef)(null),s=(0,eaE.useRef)();return eaE.createElement(ea3,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:s})}class ea4 extends eaE.PureComponent{render(){var{hide:e,dot:t,points:r,className:n,top:i,left:s,needClip:o,xAxisId:a,yAxisId:l,width:u,height:c,id:h,baseLine:d,zIndex:f}=this.props;if(e)return null;var p=(0,eaP.clsx)("recharts-area",n),m=h,{r:g,strokeWidth:v}=JC(t),y=q8(t),b=2*g+v,w=o?"url(#clipPath-".concat(y?"":"dots-").concat(m,")"):void 0;return eaE.createElement(R9,{zIndex:f},eaE.createElement(kD,{className:p},o&&eaE.createElement("defs",null,eaE.createElement(Gk,{clipPathId:m,xAxisId:a,yAxisId:l}),!y&&eaE.createElement("clipPath",{id:"clipPath-dots-".concat(m)},eaE.createElement("rect",{x:s-b/2,y:i-b/2,width:u+b,height:c+b}))),eaE.createElement(ea5,{needClip:o,clipPathId:m,props:this.props})),eaE.createElement(Gg,{points:r,mainColor:eaq(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}),this.props.isRange&&Array.isArray(d)&&eaE.createElement(Gg,{points:d,mainColor:eaq(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}))}}var ea8={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:TV.area};function ea6(e){var t,r=k9(e,ea8),{activeDot:n,animationBegin:i,animationDuration:s,animationEasing:o,connectNulls:a,dot:l,fill:u,fillOpacity:c,hide:h,isAnimationActive:d,legendType:f,stroke:p,xAxisId:m,yAxisId:g}=r,v=eaB(r,eaz),y=TT(),b=HI(),{needClip:w}=GP(m,g),x=N8(),{points:S,isRange:_,baseLine:M}=null!=(t=AU(t=>eaL(t,e.id,x)))?t:{},O=qp();if("horizontal"!==y&&"vertical"!==y||null==O||"AreaChart"!==b&&"ComposedChart"!==b)return null;var{height:E,width:P,x:k,y:A}=O;return S&&S.length?eaE.createElement(ea4,eaF({},v,{activeDot:n,animationBegin:i,animationDuration:s,animationEasing:o,baseLine:M,connectNulls:a,dot:l,fill:u,fillOpacity:c,height:E,hide:h,layout:y,isAnimationActive:"auto"===d?!PH.isSsr:d,isRange:_,legendType:f,needClip:w,points:S,stroke:p,width:P,left:k,top:A,xAxisId:m,yAxisId:g})):null}var ea7=(e,t,r,n,i)=>{var s=null!=r?r:t;if(E2(s))return s;var o="horizontal"===e?i:n,a=o.scale.domain();if("number"===o.type){var l=Math.max(a[0],a[1]),u=Math.min(a[0],a[1]);return"dataMin"===s?u:"dataMax"===s||l<0?l:Math.max(Math.min(a[0],a[1]),0)}return"dataMin"===s?a[0]:"dataMax"===s?a[1]:a[0]};function ea9(e){var t,{areaSettings:{connectNulls:r,baseValue:n,dataKey:i},stackedData:s,layout:o,chartBaseValue:a,xAxis:l,yAxis:u,displayedData:c,dataStartIndex:h,xAxisTicks:d,yAxisTicks:f,bandSize:p}=e,m=s&&s.length,g=ea7(o,a,n,l,u),v="horizontal"===o,y=!1,b=c.map((e,t)=>{if(m)c=s[h+t];else{var n,o,a,c,b,w=P_(e,i);Array.isArray(w)?(c=w,y=!0):c=[g,w]}var x=null!=(n=null==(o=c)?void 0:o[1])?n:null,S=null==x||m&&!r&&null==P_(e,i);return v?{x:PN({axis:l,ticks:d,bandSize:p,entry:e,index:t}),y:S?null:null!=(b=u.scale.map(x))?b:null,value:c,payload:e}:{x:S?null:null!=(a=l.scale.map(x))?a:null,y:PN({axis:u,ticks:f,bandSize:p,entry:e,index:t}),value:c,payload:e}});return t=m||y?b.map(e=>{var t,r,n=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:null!=n&&null!=e.y&&null!=(r=u.scale.map(n))?r:null,payload:e.payload}:{x:null!=n&&null!=(t=l.scale.map(n))?t:null,y:e.y,payload:e.payload}}):v?u.scale.map(g):l.scale.map(g),{points:b,baseLine:null!=t?t:0,isRange:y}}function ele(e){var t=k9(e,ea8),r=N8();return eaE.createElement(Gq,{id:t.id,type:"area"},e=>eaE.createElement(eaE.Fragment,null,eaE.createElement(GV,{legendPayload:eaG(t)}
24),eaE.createElement(eaJ,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),eaE.createElement(GX,{type:"area",id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:PC(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),eaE.createElement(ea6,eaF({},t,{id:e}))))}var elt=eaE.memo(ele,Yc);elt.displayName="Area";var elr=ex,eln=["axis"],eli=(0,elr.forwardRef)((e,t)=>elr.createElement(qO,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:eln,tooltipPayloadSearcher:UT,categoricalChartProps:e,ref:t})),els=ex,elo=ky;class ela{constructor(e){var{x:t,y:r}=e;this.xAxisScale=t,this.yAxisScale=r}map(e,t){var r,n,{position:i}=t;return{x:null!=(r=this.xAxisScale.map(e.x,{position:i}))?r:0,y:null!=(n=this.yAxisScale.map(e.y,{position:i}))?n:0}}mapWithFallback(e,t){var r,n,i,s,{position:o,fallback:a}=t;return i="rangeMin"===a?this.yAxisScale.rangeMin():"rangeMax"===a?this.yAxisScale.rangeMax():0,s="rangeMin"===a?this.xAxisScale.rangeMin():"rangeMax"===a?this.xAxisScale.rangeMax():0,{x:null!=(r=this.xAxisScale.map(e.x,{position:o}))?r:s,y:null!=(n=this.yAxisScale.map(e.y,{position:o}))?n:i}}isInRange(e){var{x:t,y:r}=e,n=null==t||this.xAxisScale.isInRange(t),i=null==r||this.yAxisScale.isInRange(r);return n&&i}}function ell(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function elu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ell(Object(r),!0).forEach(function(t){elc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ell(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function elc(e,t,r){return(t=elh(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function elh(e){var t=eld(e,"string");return"symbol"==typeof t?t:t+""}function eld(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function elf(){return(elf=Object.assign.bind()).apply(null,arguments)}var elp=(e,t)=>{var r;if(els.isValidElement(e))r=els.cloneElement(e,t);else if("function"==typeof e)r=e(t);else{if(!Pg(t.x1)||!Pg(t.y1)||!Pg(t.x2)||!Pg(t.y2))return null;r=els.createElement("line",elf({},t,{className:"recharts-reference-line-line"}))}return r},elm=(e,t,r,n,i,s)=>{var{x:o,width:a}=s,l=i.map(e,{position:r});if(!Pg(l)||"discard"===t&&!i.isInRange(l))return null;var u=[{x:o+a,y:l},{x:o,y:l}];return"left"===n?u.reverse():u},elg=(e,t,r,n,i,s)=>{var{y:o,height:a}=s,l=i.map(e,{position:r});if(!Pg(l)||"discard"===t&&!i.isInRange(l))return null;var u=[{x:l,y:o+a},{x:l,y:o}];return"top"===n?u.reverse():u},elv=(e,t,r,n)=>{var i=[n.mapWithFallback(e[0],{position:r,fallback:"rangeMin"}),n.mapWithFallback(e[1],{position:r,fallback:"rangeMax"})];return"discard"===t&&i.some(e=>!n.isInRange(e))?null:i},ely=(e,t,r,n,i,s,o)=>{var{x:a,y:l,segment:u,ifOverflow:c}=o,h=E3(a);return E3(l)?elm(l,c,n,s,t,r):h?elg(a,c,n,i,e,r):null!=u&&2===u.length?elv(u,c,n,new ela({x:e,y:t})):null};function elb(e){var t=Az();return(0,els.useEffect)(()=>(t(KO(e)),()=>{t(KE(e))})),null}function elw(e){var{xAxisId:t,yAxisId:r,shape:n,className:i,ifOverflow:s}=e,o=N8(),a=qy(),l=AU(e=>Bx(e,t)),u=AU(e=>BM(e,r)),c=AU(e=>$W(e,"xAxis",t,o)),h=AU(e=>$W(e,"yAxis",r,o)),d=TP();if(!a||!d||null==l||null==u||null==c||null==h)return null;var f=ely(c,h,d,e.position,l.orientation,u.orientation,e);if(!f)return null;var p=f[0],m=f[1];if(null==p||null==m)return null;var{x:g,y:v}=p,{x:y,y:b}=m,w=elu(elu({clipPath:"hidden"===s?"url(#".concat(a,")"):void 0},kj(e)),{},{x1:g,y1:v,x2:y,y2:b}),x=P7({x1:g,y1:v,x2:y,y2:b});return els.createElement(R9,{zIndex:e.zIndex},els.createElement(kD,{className:(0,elo.clsx)("recharts-reference-line",i)},elp(n,w),els.createElement(Iv,elf({},x,{lowerWidth:x.width,upperWidth:x.width}),els.createElement(IC,{label:e.label}),e.children)))}var elx={ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",label:!1,stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle",zIndex:TV.line};function elS(e){var t=k9(e,elx);return els.createElement(els.Fragment,null,els.createElement(elb,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x:t.x,y:t.y,segment:t.segment}),els.createElement(elw,t))}elS.displayName="ReferenceLine";let el_=["mean","overvalued","undervalued","strongly_overvalued","strongly_undervalued"],elM={3:1,4:3,5:5},elO=10;function elE(e){let{x:t=0,y:r=0,payload:n}=e;return(0,eab.jsx)(Av,{x:t,y:r,textAnchor:"middle",verticalAnchor:"start",fill:"hsl(var(--muted-foreground))",fontSize:elO,children:n?.value??""})}function elP(e){let{x:t=0,y:r=0,payload:n,tickFormatter:i}=e,s="string"==typeof t?parseFloat(t)||0:t,o="string"==typeof r?parseFloat(r)||0:r,a=n?.value,l="number"==typeof a&&i?i(a):String(a??"");return(0,eab.jsx)(Av,{x:s,y:o,textAnchor:"end",verticalAnchor:"middle",fill:"hsl(var(--muted-foreground))",fontSize:elO,children:l})}function elk({data:e,onStockClick:t,onTabChange:r,useApiFetch:n=!1}){let{symbol:i,valuation:s=[],variance_info:o={},activeName:a="P/E"}=e,[l,u]=(0,eaO.useState)(0),[c,h]=(0,eaO.useState)(5),[d,f]=(0,eaO.useState)("forward"),[p,m]=(0,eaO.useState)(!1),[g,v]=(0,eaO.useState)([]),[y,b]=(0,eaO.useState)({}),[w,x]=(0,eaO.useState)(!1),[S,_]=(0,eaO.useState)({open:!1,message:""}),M=n||!!i&&0===s.length,O=M?g:s,E=M?y:o,P=(0,eaO.useCallback)(async e=>{if(!e)return;let t=eag.find(e=>e.key===c)?.time;try{m(!0);let{ret:r,data:n}=await eb({ticker:e,from:t?.start,to:t?.end,valuation_type:l,is_forward:"forward"===d});if(0===r){let e=n?.valuation;Array.isArray(e)&&e.length>0?v(e):v([]),b(n?.variance_info??{})}}finally{m(!1)}},[l,c,d]);(0,eaO.useEffect)(()=>{M&&i&&P(i)},[i,M,P]);let k=(0,eaO.useMemo)(()=>O.map(e=>({x:(0,ea_.default)(e.t).format("YYYY/MM"),y:e.v,date:e.t})),[O]),A=(0,eaO.useMemo)(()=>
24{if(!M)return k;let e=elM[c]??5,t=(0,ea_.default)().subtract(e,"year");return k.filter(e=>!(0,ea_.default)(e.date).isBefore(t,"day"))},[k,c,M]),j=(0,eaO.useMemo)(()=>{let e=[];return el_.forEach(t=>{let r=E[t];null==r||Number.isNaN(Number(r))||e.push({y:Number(r),label:eav[t]??t,color:eay[t]??"hsl(var(--muted-foreground))"})}),e},[E]),C=(0,eaO.useMemo)(()=>{let e=[...A.map(e=>e.y),...j.map(e=>e.y)];if(0===e.length)return["auto","auto"];let t=Math.min(...e),r=Math.max(...e),n=.05*(r-t||1);return[t-n,r+n]},[A,j]),N=A.length>0,T=e=>{u(e),r?.({active:e,activeTime:c,subActive:d})},R=e=>{h(e),r?.({active:l,activeTime:e,subActive:d})},I=e=>{f(e),r?.({active:l,activeTime:c,subActive:e})},D=async()=>{if(i&&t){x(!0);try{let e=await ih({symbol:i}),r=e?.list??[],n=r?.find(e=>e.symbol===i);if(!n?.code)return void _({open:!0,message:eaS.i18n._(rX`This stock is not currently listed in our database.`)});t(i,n.code)}finally{x(!1)}}};return i?(0,eab.jsxs)("div",{className:"relative w-full rounded-xl bg-[#1c1c1c] p-4",children:[p&&(0,eab.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center rounded-xl bg-card/80",children:(0,eab.jsx)(vx,{className:"size-8 animate-spin text-primary"})}),(0,eab.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,eab.jsxs)("div",{className:"flex items-center gap-2",children:[(0,eab.jsx)(d3,{code:i,type:"stock",className:"size-10 shrink-0 rounded-full"}),(0,eab.jsxs)("div",{className:"text-body font-semibold text-foreground",children:[(0,eab.jsx)("span",{className:"mr-1",children:i}),(0,eab.jsx)("span",{children:eaS.i18n._(rX`Valuation`)})]})]}),(0,eab.jsx)("div",{className:"block md:hidden @max-lg/chatrail
24:!block",children:(0,eab.jsxs)(er4,{value:String(l),onValueChange:e=>T(Number(e)),children:[(0,eab.jsx)(er6,{className:"h-10 border-border bg-muted",children:(0,eab.jsx)(er8,{})}),(0,eab.jsx)(ene,{children:eap.map(e=>(0,eab.jsx)(ent,{value:String(e.key),children:e.name},e.key))})]})}),(0,eab.jsx)("div",{className:"hidden md:flex @max-lg/chatrail:!hidden items-center gap-1 overflow-x-auto",children:eap.map(e=>(0,eab.jsx)("button",{type:"button","data-track-id":"chat.valuation.tab_switch","data-track-tab-key":e.key,onClick:()=>T(e.key),className:(0,eax.cn)("shrink-0 rounded-lg px-3 py-2 text-xs font-semibold transition-colors",l===e.key?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"),children:e.name},e.key))})]}),(0,eab.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,eab.jsx)("div",{className:"block md:hidden @max-lg/chatrail:!block",children:(0,eab.jsxs)(er4,{value:String(c),onValueChange:e=>R(Number(e)),children:[(0,eab.jsx)(er6,{className:"h-9 border-border bg-muted/50",children:(0,eab.jsx)(er8,{})}),(0,eab.jsx)(ene,{children:eag.map(e=>(0,eab.jsx)(ent,{value:String(e.key),children:e.name},e.key))})]})}
24),(0,eab.jsx)("div",{className:"hidden md:flex @max-lg/chatrail:!hidden rounded-lg bg-muted/50 p-0.5",children:eag.map(e=>(0,eab.jsx)("button",{type:"button","data-track-id":"chat.valuation.time.select","data-track-time-key":e.key,onClick:()=>R(e.key),className:(0,eax.cn)("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",c===e.key?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.name},e.key))}),(0,eab.jsx)("div",{className:"flex rounded-lg bg-muted/50 p-0.5",children:eam.map(e=>(0,eab.jsx)("button",{type:"button","data-track-id":"chat.valuation.sub_tab.switch","data-track-sub-tab":e.type,onClick:()=>I(e.type),className:(0,eax.cn)("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",d===e.type?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.name},e.type))}),(0,eab.jsx)("div",{className:"ml-auto text-xs text-muted-foreground",children:a})]}),(0,eab.jsx)("div",{className:(0,eax.cn)("mt-4 w-full h-[240px] sm:h-[280px]",eaw,"[&_.recharts-cartesian-grid_line]:stroke-border/50"),children:N?(0,eab.jsx)(TO,{width:"100%",height:"100%",children:(0,eab.jsxs)(eli,{data:A,margin:{top:8,right:4,left:0,bottom:0},children:[(0,eab.jsx)("defs",{children:(0,eab.jsxs)("linearGradient",{id:"valuationArea",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,eab.jsx)("stop",{offset:"0%",stopColor:"hsl(var(--primary))",stopOpacity:.4}),(0,eab.jsx)("stop",{offset:"100%",stopColor:"hsl(var(--primary))",stopOpacity:0})]})}),(0,eab.jsx)(Uj,{strokeDasharray:"2 4",vertical:!1}),(0,eab.jsx)(erl,{dataKey:"x",tickLine:!1,axisLine:!1,tickMargin:6,tick:(0,eab.jsx)(elE,{})}),(0,eab.jsx)(erE,{tickLine:!1,axisLine:!1,tickMargin:4,width:40,domain:C,tickFormatter:e=>t7(e),tick:e=>(0,eab.jsx)(elP,{...e,tickFormatter:e=>t7(e)})}),(0,eab.jsx)(etq,{content:e=>(0,eab.jsx)(O_,{...e,formatter:e=>t7(Number(e))})}),j.map(e=>(0,eab.jsx)(elS,{y:e.y,stroke:e.color,strokeDasharray:"4 4",strokeWidth:1,label:{value:e.label,position:"insideTopLeft",fill:e.color,fontSize:elO}},e.label)),(0,eab.jsx)(elt,{type:"monotone",dataKey:"y",stroke:"hsl(var(--primary))",strokeWidth:2,fill:"url(#valuationArea)",dot:!1,activeDot:{r:4,fill:"hsl(var(--primary))",stroke:"hsl(var(--background))",strokeWidth:1}})]},`${l}-${c}-${d}`)}):(0,eab.jsx)("div",{className:"flex h-full items-center justify-center text-body text-muted-foreground",children:eaS.i18n._(rX`No data`)})}),t&&(0,eab.jsxs)("button",{type:"button","data-track-id":"chat.valuation.stock_detail.link","data-track-symbol":i,className:"relative mt-3 flex cursor-pointer items-center text-xs font-bold text-foreground hover:text-primary",onClick:D,children:[(0,eab.jsx)("span",{children:eaS.i18n._(rX`More about`)}),(0,eab.jsx)("span",{className:"ml-1",children:i}),(0,eab.jsx)(eaM.ChevronRight,{className:"ml-1 size-4"}),w&&(0,eab.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-card/80",children:(0,eab.jsx)(vx,{className:"size-4 animate-spin text-primary"})})]}),(0,eab.jsx)(ED,{open:S.open,onOpenChange:e=>_({open:e,message:""}),children:(0,eab.jsxs)(EV,{children:[(0,eab.jsx)(Ez,{className:"fixed inset-0 z-50 bg-black/50"}),(0,eab.jsxs)(EF,{className:"fixed left-1/2 top-1/2 z-50 min-w-[300px] -translate-x-1/2 -translate-y-1/2 rounded-lg bg-card p-6",children:[(0,eab.jsx)(EB,{className:"mb-4 text-lg font-bold text-foreground",children:eaS.i18n._(rX`Warning`)}),(0,eab.jsx)(E$,{className:"mb-6 text-body text-foreground",children:S.message}),(0,eab.jsx)("div",{className:"flex justify-end",children:(0,eab.jsx)(EU,{asChild:!0,children:(0,eab.jsx)("button",{type:"button","data-track-id":"chat.valuation.warning.confirm","aria-label":eaS.i18n._(rX`OK`),className:"rounded bg-primary px-4 py-2 text-primary-foreground transition-colors hover:bg-primary/90",children:eaS.i18n._(rX`OK`)})})})]})]})})]}):null}function elA(e,t){return e.data.symbol===t.data.symbol&&e.useApiFetch===t.useApiFetch&&JSON.stringify(e.data.valuation)===JSON.stringify(t.data.valuation)&&JSON.stringify(e.data.variance_info)===JSON.stringify(t.data.variance_info)&&e.data.activeName===t.data.activeName}let elj=(0,eaO.memo)(elk,elA);var elC=ex;let elN=new Set(["SEGMENTS","STRATEGY_CHART","OPTION_SENTIMENT"]);function elT({type:e,params:t}){let r=t.symbol??"",n=Number(t.type??2),i=t.locale||"",[s,o]=(0,elC.useState)(!1);(0,elC.useEffect)(()=>o(!0),[]);let[a,l]=(0,elC.useState)("checking");if((0,elC.useEffect)(()=>
24{if("VALUATION"!==e||!r)return;let t=!1,n=eag.find(e=>5===e.key)?.time;return eb({ticker:r,from:n?.start,to:n?.end,valuation_type:0,is_forward:!0}).then(e=>{t||l(e?.ret===0&&Array.isArray(e?.data?.valuation)&&e.data.valuation.length>0?"has":"empty")}).catch(()=>{t||l("empty")}),()=>{t=!0}},[e,r]),elN.has(e))return null;if("VALUATION"===e)return"has"!==a?null:(0,ed.jsx)("div",{className:"my-6 @container",children:(0,ed.jsx)(elj,{data:{type:"valuation",symbol:r}})});if(!s)return(0,ed.jsx)("div",{className:"my-6 h-[320px] w-full animate-pulse rounded-xl border border-border bg-card"});switch(e){case"KLINE":case"KLINE_LITE":return(0,ed.jsx)("div",{className:"my-6 @container",children:(0,ed.jsx)(M0,{data:{type:"kline",symbol:r,asset_type:n,locale:i}})});case"RATING":return(0,ed.jsx)("div",{className:"my-6 @container",children:(0,ed.jsx)(erG,{data:{symbol:r,locale:i}})});case"SNAPSHOT":return(0,ed.jsx)("div",{className:"my-6 @container",children:(0,ed.jsx)(eiT,{data:{symbol:r}})});case"PRICE_PREDICTION":return(0,ed.jsx)("div",{className:"my-6 @container",children:(0,ed.jsx)(Oy,{data:{symbol:r,type:String(n),title:"",desc:"",sentiment:"",low:"",high:"",locale:i}})});case"SCREENER":return(0,ed.jsx)("div",{className:"my-6 @container",children:(0,ed.jsx)(eac,{data:{screenId:t.screen_id??"",title:t.title}})});default:return null}}e.s(["ChartToken",0,elT],520811)},876894,e=>{"use strict";var t=e.i(847915),r=e.i(78141);function n(...e){return e.filter(Boolean).join(" ")}function i(){let[e,i]=(0,r.useState)([]),[s,o]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=document.getElementById("blog-content");e&&i(Array.from(e.querySelectorAll("h2")).map(e=>(e.textContent||"").replace(/\r?\n/g,"").trim()))},[]),(0,r.useEffect)(()=>{if(!e.length)return;let t=()=>{let e=document.querySelectorAll("#blog-content h2"),t=0;e.forEach((e,r)=>{e.getBoundingClientRect().top<=100&&(t=r)}),o(t)};return window.addEventListener("scroll",t,{passive:!0}),t(),()=>window.removeEventListener("scroll",t)},[e]);let a=e=>{let t=document.querySelectorAll("#blog-content h2")[e];t?.scrollIntoView({behavior:"smooth",block:"start"})};return e.length?(0,t.jsx)("aside",{className:"hidden w-[240px] shrink-0 md:block",children:(0,t.jsxs)("div",{className:"sticky top-[80px]",children:[(0,t.jsx)("p",{className:"mb-[18px] pr-[14px] text-lg font-semibold leading-[26px] text-foreground",children:"Contents"}),(0,t.jsxs)("div",{className:"relative grid grid-cols-1",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 h-full w-[4px] rounded-[2px] bg-foreground
24/15"}),e.map((e,r)=>(0,t.jsxs)("button",{type:"button",onClick:()=>a(r),className:n("relative cursor-pointer px-[14px] text-left leading-[26px] transition-colors hover:text-primary",0===r?"":"mt-[12px]",r===s?"text-primary":"text-muted-foreground"),children:[r===s&&(0,t.jsx)("span",{className:"absolute left-0 top-0 h-full w-[4px] rounded-[4px] bg-primary"}),e]},`${r}-${e}`))]})]})}):null}e.s(["BlogToc",0,i])},538865,e=>{"use strict";var t=e.i(78141);function r(){return(0,t.useEffect)(()=>{let t,r=!1;return e.A(734597).then(({default:e})=>{r||(t=e("#blog-content [data-zoomable]",{background:"rgba(0,0,0,0.7)"}))}),()=>{r=!0,t?.detach()}},[]),null}e.s(["ImageZoom",0,r])}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.