@devexperts/dxcharts-lite
Version:
8 lines • 349 kB
JavaScript
/*
* Copyright (C) 2019 - 2025 Devexperts Solutions IE Limited
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
(()=>{var it=Math.pow;(()=>{var Go={156:k=>{"use strict";k.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},195:k=>{k.exports=function(N){return!N||typeof N=="string"?!1:N instanceof Array||Array.isArray(N)||N.length>=0&&(N.splice instanceof Function||Object.getOwnPropertyDescriptor(N,N.length-1)&&N.constructor.name!=="String")}},507:(k,nt,N)=>{const q=N(659);function z(){const y={},C=Object.keys(q);for(let w=C.length,g=0;g<w;g++)y[C[g]]={distance:-1,parent:null};return y}function L(y){const C=z(),w=[y];for(C[y].distance=0;w.length;){const g=w.pop(),S=Object.keys(q[g]);for(let _=S.length,A=0;A<_;A++){const m=S[A],T=C[m];T.distance===-1&&(T.distance=C[g].distance+1,T.parent=g,w.unshift(m))}}return C}function ht(y,C){return function(w){return C(y(w))}}function b(y,C){const w=[C[y].parent,y];let g=q[C[y].parent][y],S=C[y].parent;for(;C[S].parent;)w.unshift(C[S].parent),g=ht(q[C[S].parent][S],g),S=C[S].parent;return g.conversion=w,g}k.exports=function(y){const C=L(y),w={},g=Object.keys(C);for(let S=g.length,_=0;_<S;_++){const A=g[_];C[A].parent!==null&&(w[A]=b(A,C))}return w}},520:(k,nt,N)=>{const q=N(854),z=N(734),L=["keyword","gray","hex"],ht={};for(const m of Object.keys(z))ht[[...z[m].labels].sort().join("")]=m;const b={};function y(m,T){if(!(this instanceof y))return new y(m,T);if(T&&T in L&&(T=null),T&&!(T in z))throw new Error("Unknown model: "+T);let E,I;if(m==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(m instanceof y)this.model=m.model,this.color=[...m.color],this.valpha=m.valpha;else if(typeof m=="string"){const F=q.get(m);if(F===null)throw new Error("Unable to parse color from string: "+m);this.model=F.model,I=z[this.model].channels,this.color=F.value.slice(0,I),this.valpha=typeof F.value[I]=="number"?F.value[I]:1}else if(m.length>0){this.model=T||"rgb",I=z[this.model].channels;const F=Array.prototype.slice.call(m,0,I);this.color=A(F,I),this.valpha=typeof m[I]=="number"?m[I]:1}else if(typeof m=="number")this.model="rgb",this.color=[m>>16&255,m>>8&255,m&255],this.valpha=1;else{this.valpha=1;const F=Object.keys(m);"alpha"in m&&(F.splice(F.indexOf("alpha"),1),this.valpha=typeof m.alpha=="number"?m.alpha:0);const lt=F.sort().join("");if(!(lt in ht))throw new Error("Unable to parse color from object: "+JSON.stringify(m));this.model=ht[lt];const{labels:Dt}=z[this.model],Ft=[];for(E=0;E<Dt.length;E++)Ft.push(m[Dt[E]]);this.color=A(Ft)}if(b[this.model])for(I=z[this.model].channels,E=0;E<I;E++){const F=b[this.model][E];F&&(this.color[E]=F(this.color[E]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}y.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(m){let T=this.model in q.to?this:this.rgb();T=T.round(typeof m=="number"?m:1);const E=T.valpha===1?T.color:[...T.color,this.valpha];return q.to[T.model](E)},percentString(m){const T=this.rgb().round(typeof m=="number"?m:1),E=T.valpha===1?T.color:[...T.color,this.valpha];return q.to.rgb.percent(E)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const m={},{channels:T}=z[this.model],{labels:E}=z[this.model];for(let I=0;I<T;I++)m[E[I]]=this.color[I];return this.valpha!==1&&(m.alpha=this.valpha),m},unitArray(){const m=this.rgb().color;return m[0]/=255,m[1]/=255,m[2]/=255,this.valpha!==1&&m.push(this.valpha),m},unitObject(){const m=this.rgb().object();return m.r/=255,m.g/=255,m.b/=255,this.valpha!==1&&(m.alpha=this.valpha),m},round(m){return m=Math.max(m||0,0),new y([...this.color.map(w(m)),this.valpha],this.model)},alpha(m){return m!==void 0?new y([...this.color,Math.max(0,Math.min(1,m))],this.model):this.valpha},red:g("rgb",0,S(255)),green:g("rgb",1,S(255)),blue:g("rgb",2,S(255)),hue:g(["hsl","hsv","hsl","hwb","hcg"],0,m=>(m%360+360)%360),saturationl:g("hsl",1,S(100)),lightness:g("hsl",2,S(100)),saturationv:g("hsv",1,S(100)),value:g("hsv",2,S(100)),chroma:g("hcg",1,S(100)),gray:g("hcg",2,S(100)),white:g("hwb",1,S(100)),wblack:g("hwb",2,S(100)),cyan:g("cmyk",0,S(100)),magenta:g("cmyk",1,S(100)),yellow:g("cmyk",2,S(100)),black:g("cmyk",3,S(100)),x:g("xyz",0,S(95.047)),y:g("xyz",1,S(100)),z:g("xyz",2,S(108.833)),l:g("lab",0,S(100)),a:g("lab",1),b:g("lab",2),keyword(m){return m!==void 0?new y(m):z[this.model].keyword(this.color)},hex(m){return m!==void 0?new y(m):q.to.hex(this.rgb().round().color)},hexa(m){if(m!==void 0)return new y(m);const T=this.rgb().round().color;let E=Math.round(this.valpha*255).toString(16).toUpperCase();return E.length===1&&(E="0"+E),q.to.hex(T)+E},rgbNumber(){const m=this.rgb().color;return(m[0]&255)<<16|(m[1]&255)<<8|m[2]&255},luminosity(){const m=this.rgb().color,T=[];for(const[E,I]of m.entries()){const F=I/255;T[E]=F<=.04045?F/12.92:it((F+.055)/1.055,2.4)}return .2126*T[0]+.7152*T[1]+.0722*T[2]},contrast(m){const T=this.luminosity(),E=m.luminosity();return T>E?(T+.05)/(E+.05):(E+.05)/(T+.05)},level(m){const T=this.contrast(m);return T>=7?"AAA":T>=4.5?"AA":""},isDark(){const m=this.rgb().color;return(m[0]*2126+m[1]*7152+m[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const m=this.rgb();for(let T=0;T<3;T++)m.color[T]=255-m.color[T];return m},lighten(m){const T=this.hsl();return T.color[2]+=T.color[2]*m,T},darken(m){const T=this.hsl();return T.color[2]-=T.color[2]*m,T},saturate(m){const T=this.hsl();return T.color[1]+=T.color[1]*m,T},desaturate(m){const T=this.hsl();return T.color[1]-=T.color[1]*m,T},whiten(m){const T=this.hwb();return T.color[1]+=T.color[1]*m,T},blacken(m){const T=this.hwb();return T.color[2]+=T.color[2]*m,T},grayscale(){const m=this.rgb().color,T=m[0]*.3+m[1]*.59+m[2]*.11;return y.rgb(T,T,T)},fade(m){return this.alpha(this.valpha-this.valpha*m)},opaquer(m){return this.alpha(this.valpha+this.valpha*m)},rotate(m){const T=this.hsl();let E=T.color[0];return E=(E+m)%360,E=E<0?360+E:E,T.color[0]=E,T},mix(m,T){if(!m||!m.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof m);const E=m.rgb(),I=this.rgb(),F=T===void 0?.5:T,lt=2*F-1,Dt=E.alpha()-I.alpha(),Ft=((lt*Dt===-1?lt:(lt+Dt)/(1+lt*Dt))+1)/2,Fe=1-Ft;return y.rgb(Ft*E.red()+Fe*I.red(),Ft*E.green()+Fe*I.green(),Ft*E.blue()+Fe*I.blue(),E.alpha()*F+I.alpha()*(1-F))}};for(const m of Object.keys(z)){if(L.includes(m))continue;const{channels:T}=z[m];y.prototype[m]=function(...E){return this.model===m?new y(this):E.length>0?new y(E,m):new y([..._(z[this.model][m].raw(this.color)),this.valpha],m)},y[m]=function(...E){let I=E[0];return typeof I=="number"&&(I=A(E,T)),new y(I,m)}}function C(m,T){return Number(m.toFixed(T))}function w(m){return function(T){return C(T,m)}}function g(m,T,E){m=Array.isArray(m)?m:[m];for(const I of m)(b[I]||(b[I]=[]))[T]=E;return m=m[0],function(I){let F;return I!==void 0?(E&&(I=E(I)),F=this[m](),F.color[T]=I,F):(F=this[m]().color[T],E&&(F=E(F)),F)}}function S(m){return function(T){return Math.max(0,Math.min(m,T))}}function _(m){return Array.isArray(m)?m:[m]}function A(m,T){for(let E=0;E<T;E++)typeof m[E]!="number"&&(m[E]=0);return m}k.exports=y},659:(k,nt,N)=>{const q=N(156),z={};for(const b of Object.keys(q))z[q[b]]=b;const L={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};k.exports=L;for(const b of Object.keys(L)){if(!("channels"in L[b]))throw new Error("missing channels property: "+b);if(!("labels"in L[b]))throw new Error("missing channel labels property: "+b);if(L[b].labels.length!==L[b].channels)throw new Error("channel and label counts mismatch: "+b);const{channels:y,labels:C}=L[b];delete L[b].channels,delete L[b].labels,Object.defineProperty(L[b],"channels",{value:y}),Object.defineProperty(L[b],"labels",{value:C})}L.rgb.hsl=function(b){const y=b[0]/255,C=b[1]/255,w=b[2]/255,g=Math.min(y,C,w),S=Math.max(y,C,w),_=S-g;let A,m;S===g?A=0:y===S?A=(C-w)/_:C===S?A=2+(w-y)/_:w===S&&(A=4+(y-C)/_),A=Math.min(A*60,360),A<0&&(A+=360);const T=(g+S)/2;return S===g?m=0:T<=.5?m=_/(S+g):m=_/(2-S-g),[A,m*100,T*100]},L.rgb.hsv=function(b){let y,C,w,g,S;const _=b[0]/255,A=b[1]/255,m=b[2]/255,T=Math.max(_,A,m),E=T-Math.min(_,A,m),I=function(F){return(T-F)/6/E+1/2};return E===0?(g=0,S=0):(S=E/T,y=I(_),C=I(A),w=I(m),_===T?g=w-C:A===T?g=.3333333333333333+y-w:m===T&&(g=.6666666666666666+C-y),g<0?g+=1:g>1&&(g-=1)),[g*360,S*100,T*100]},L.rgb.hwb=function(b){const y=b[0],C=b[1];let w=b[2];const g=L.rgb.hsl(b)[0],S=1/255*Math.min(y,Math.min(C,w));return w=1-.00392156862745098*Math.max(y,Math.max(C,w)),[g,S*100,w*100]},L.rgb.cmyk=function(b){const y=b[0]/255,C=b[1]/255,w=b[2]/255,g=Math.min(1-y,1-C,1-w),S=(1-y-g)/(1-g)||0,_=(1-C-g)/(1-g)||0,A=(1-w-g)/(1-g)||0;return[S*100,_*100,A*100,g*100]};function ht(b,y){return it(b[0]-y[0],2)+it(b[1]-y[1],2)+it(b[2]-y[2],2)}L.rgb.keyword=function(b){const y=z[b];if(y)return y;let C=1/0,w;for(const g of Object.keys(q)){const S=q[g],_=ht(b,S);_<C&&(C=_,w=g)}return w},L.keyword.rgb=function(b){return q[b]},L.rgb.xyz=function(b){let y=b[0]/255,C=b[1]/255,w=b[2]/255;y=y>.04045?it((y+.055)/1.055,2.4):y/12.92,C=C>.04045?it((C+.055)/1.055,2.4):C/12.92,w=w>.04045?it((w+.055)/1.055,2.4):w/12.92;const g=y*.4124+C*.3576+w*.1805,S=y*.2126+C*.7152+w*.0722,_=y*.0193+C*.1192+w*.9505;return[g*100,S*100,_*100]},L.rgb.lab=function(b){const y=L.rgb.xyz(b);let C=y[0],w=y[1],g=y[2];C/=95.047,w/=100,g/=108.883,C=C>.008856?it(C,.3333333333333333):7.787*C+.13793103448275862,w=w>.008856?it(w,.3333333333333333):7.787*w+.13793103448275862,g=g>.008856?it(g,.3333333333333333):7.787*g+.13793103448275862;const S=116*w-16,_=500*(C-w),A=200*(w-g);return[S,_,A]},L.hsl.rgb=function(b){const y=b[0]/360,C=b[1]/100,w=b[2]/100;let g,S,_;if(C===0)return _=w*255,[_,_,_];w<.5?g=w*(1+C):g=w+C-w*C;const A=2*w-g,m=[0,0,0];for(let T=0;T<3;T++)S=y+.3333333333333333*-(T-1),S<0&&S++,S>1&&S--,6*S<1?_=A+(g-A)*6*S:2*S<1?_=g:3*S<2?_=A+(g-A)*(.6666666666666666-S)*6:_=A,m[T]=_*255;return m},L.hsl.hsv=function(b){const y=b[0];let C=b[1]/100,w=b[2]/100,g=C;const S=Math.max(w,.01);w*=2,C*=w<=1?w:2-w,g*=S<=1?S:2-S;const _=(w+C)/2,A=w===0?2*g/(S+g):2*C/(w+C);return[y,A*100,_*100]},L.hsv.rgb=function(b){const y=b[0]/60,C=b[1]/100;let w=b[2]/100;const g=Math.floor(y)%6,S=y-Math.floor(y),_=255*w*(1-C),A=255*w*(1-C*S),m=255*w*(1-C*(1-S));switch(w*=255,g){case 0:return[w,m,_];case 1:return[A,w,_];case 2:return[_,w,m];case 3:return[_,A,w];case 4:return[m,_,w];case 5:return[w,_,A]}},L.hsv.hsl=function(b){const y=b[0],C=b[1]/100,w=b[2]/100,g=Math.max(w,.01);let S,_;_=(2-C)*w;const A=(2-C)*g;return S=C*g,S/=A<=1?A:2-A,S=S||0,_/=2,[y,S*100,_*100]},L.hwb.rgb=function(b){const y=b[0]/360;let C=b[1]/100,w=b[2]/100;const g=C+w;let S;g>1&&(C/=g,w/=g);const _=Math.floor(6*y),A=1-w;S=6*y-_,_&1&&(S=1-S);const m=C+S*(A-C);let T,E,I;switch(_){default:case 6:case 0:T=A,E=m,I=C;break;case 1:T=m,E=A,I=C;break;case 2:T=C,E=A,I=m;break;case 3:T=C,E=m,I=A;break;case 4:T=m,E=C,I=A;break;case 5:T=A,E=C,I=m;break}return[T*255,E*255,I*255]},L.cmyk.rgb=function(b){const y=b[0]/100,C=b[1]/100,w=b[2]/100,g=b[3]/100,S=1-Math.min(1,y*(1-g)+g),_=1-Math.min(1,C*(1-g)+g),A=1-Math.min(1,w*(1-g)+g);return[S*255,_*255,A*255]},L.xyz.rgb=function(b){const y=b[0]/100,C=b[1]/100,w=b[2]/100;let g,S,_;return g=y*3.2406+C*-1.5372+w*-.4986,S=y*-.9689+C*1.8758+w*.0415,_=y*.0557+C*-.204+w*1.057,g=g>.0031308?1.055*it(g,.4166666666666667)-.055:g*12.92,S=S>.0031308?1.055*it(S,.4166666666666667)-.055:S*12.92,_=_>.0031308?1.055*it(_,.4166666666666667)-.055:_*12.92,g=Math.min(Math.max(0,g),1),S=Math.min(Math.max(0,S),1),_=Math.min(Math.max(0,_),1),[g*255,S*255,_*255]},L.xyz.lab=function(b){let y=b[0],C=b[1],w=b[2];y/=95.047,C/=100,w/=108.883,y=y>.008856?it(y,.3333333333333333):7.787*y+.13793103448275862,C=C>.008856?it(C,.3333333333333333):7.787*C+.13793103448275862,w=w>.008856?it(w,.3333333333333333):7.787*w+.13793103448275862;const g=116*C-16,S=500*(y-C),_=200*(C-w);return[g,S,_]},L.lab.xyz=function(b){const y=b[0],C=b[1],w=b[2];let g,S,_;S=(y+16)/116,g=C/500+S,_=S-w/200;const A=it(S,3),m=it(g,3),T=it(_,3);return S=A>.008856?A:(S-.13793103448275862)/7.787,g=m>.008856?m:(g-.13793103448275862)/7.787,_=T>.008856?T:(_-.13793103448275862)/7.787,g*=95.047,S*=100,_*=108.883,[g,S,_]},L.lab.lch=function(b){const y=b[0],C=b[1],w=b[2];let g;g=Math.atan2(w,C)*360/2/Math.PI,g<0&&(g+=360);const _=Math.sqrt(C*C+w*w);return[y,_,g]},L.lch.lab=function(b){const y=b[0],C=b[1],g=b[2]/360*2*Math.PI,S=C*Math.cos(g),_=C*Math.sin(g);return[y,S,_]},L.rgb.ansi16=function(b,y=null){const[C,w,g]=b;let S=y===null?L.rgb.hsv(b)[2]:y;if(S=Math.round(S/50),S===0)return 30;let _=30+(Math.round(g/255)<<2|Math.round(w/255)<<1|Math.round(C/255));return S===2&&(_+=60),_},L.hsv.ansi16=function(b){return L.rgb.ansi16(L.hsv.rgb(b),b[2])},L.rgb.ansi256=function(b){const y=b[0],C=b[1],w=b[2];return y===C&&C===w?y<8?16:y>248?231:Math.round((y-8)/247*24)+232:16+36*Math.round(y/255*5)+6*Math.round(C/255*5)+Math.round(w/255*5)},L.ansi16.rgb=function(b){let y=b%10;if(y===0||y===7)return b>50&&(y+=3.5),y=y/10.5*255,[y,y,y];const C=(~~(b>50)+1)*.5,w=(y&1)*C*255,g=(y>>1&1)*C*255,S=(y>>2&1)*C*255;return[w,g,S]},L.ansi256.rgb=function(b){if(b>=232){const S=(b-232)*10+8;return[S,S,S]}b-=16;let y;const C=Math.floor(b/36)/5*255,w=Math.floor((y=b%36)/6)/5*255,g=y%6/5*255;return[C,w,g]},L.rgb.hex=function(b){const C=(((Math.round(b[0])&255)<<16)+((Math.round(b[1])&255)<<8)+(Math.round(b[2])&255)).toString(16).toUpperCase();return"000000".substring(C.length)+C},L.hex.rgb=function(b){const y=b.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!y)return[0,0,0];let C=y[0];y[0].length===3&&(C=C.split("").map(A=>A+A).join(""));const w=parseInt(C,16),g=w>>16&255,S=w>>8&255,_=w&255;return[g,S,_]},L.rgb.hcg=function(b){const y=b[0]/255,C=b[1]/255,w=b[2]/255,g=Math.max(Math.max(y,C),w),S=Math.min(Math.min(y,C),w),_=g-S;let A,m;return _<1?A=S/(1-_):A=0,_<=0?m=0:g===y?m=(C-w)/_%6:g===C?m=2+(w-y)/_:m=4+(y-C)/_,m/=6,m%=1,[m*360,_*100,A*100]},L.hsl.hcg=function(b){const y=b[1]/100,C=b[2]/100,w=C<.5?2*y*C:2*y*(1-C);let g=0;return w<1&&(g=(C-.5*w)/(1-w)),[b[0],w*100,g*100]},L.hsv.hcg=function(b){const y=b[1]/100,C=b[2]/100,w=y*C;let g=0;return w<1&&(g=(C-w)/(1-w)),[b[0],w*100,g*100]},L.hcg.rgb=function(b){const y=b[0]/360,C=b[1]/100,w=b[2]/100;if(C===0)return[w*255,w*255,w*255];const g=[0,0,0],S=y%1*6,_=S%1,A=1-_;let m=0;switch(Math.floor(S)){case 0:g[0]=1,g[1]=_,g[2]=0;break;case 1:g[0]=A,g[1]=1,g[2]=0;break;case 2:g[0]=0,g[1]=1,g[2]=_;break;case 3:g[0]=0,g[1]=A,g[2]=1;break;case 4:g[0]=_,g[1]=0,g[2]=1;break;default:g[0]=1,g[1]=0,g[2]=A}return m=(1-C)*w,[(C*g[0]+m)*255,(C*g[1]+m)*255,(C*g[2]+m)*255]},L.hcg.hsv=function(b){const y=b[1]/100,C=b[2]/100,w=y+C*(1-y);let g=0;return w>0&&(g=y/w),[b[0],g*100,w*100]},L.hcg.hsl=function(b){const y=b[1]/100,w=b[2]/100*(1-y)+.5*y;let g=0;return w>0&&w<.5?g=y/(2*w):w>=.5&&w<1&&(g=y/(2*(1-w))),[b[0],g*100,w*100]},L.hcg.hwb=function(b){const y=b[1]/100,C=b[2]/100,w=y+C*(1-y);return[b[0],(w-y)*100,(1-w)*100]},L.hwb.hcg=function(b){const y=b[1]/100,w=1-b[2]/100,g=w-y;let S=0;return g<1&&(S=(w-g)/(1-g)),[b[0],g*100,S*100]},L.apple.rgb=function(b){return[b[0]/65535*255,b[1]/65535*255,b[2]/65535*255]},L.rgb.apple=function(b){return[b[0]/255*65535,b[1]/255*65535,b[2]/255*65535]},L.gray.rgb=function(b){return[b[0]/100*255,b[0]/100*255,b[0]/100*255]},L.gray.hsl=function(b){return[0,0,b[0]]},L.gray.hsv=L.gray.hsl,L.gray.hwb=function(b){return[0,100,b[0]]},L.gray.cmyk=function(b){return[0,0,0,b[0]]},L.gray.lab=function(b){return[b[0],0,0]},L.gray.hex=function(b){const y=Math.round(b[0]/100*255)&255,w=((y<<16)+(y<<8)+y).toString(16).toUpperCase();return"000000".substring(w.length)+w},L.rgb.gray=function(b){return[(b[0]+b[1]+b[2])/3/255*100]}},734:(k,nt,N)=>{const q=N(659),z=N(507),L={},ht=Object.keys(q);function b(C){const w=function(...g){const S=g[0];return S==null?S:(S.length>1&&(g=S),C(g))};return"conversion"in C&&(w.conversion=C.conversion),w}function y(C){const w=function(...g){const S=g[0];if(S==null)return S;S.length>1&&(g=S);const _=C(g);if(typeof _=="object")for(let A=_.length,m=0;m<A;m++)_[m]=Math.round(_[m]);return _};return"conversion"in C&&(w.conversion=C.conversion),w}ht.forEach(C=>{L[C]={},Object.defineProperty(L[C],"channels",{value:q[C].channels}),Object.defineProperty(L[C],"labels",{value:q[C].labels});const w=z(C);Object.keys(w).forEach(S=>{const _=w[S];L[C][S]=y(_),L[C][S].raw=b(_)})}),k.exports=L},854:(k,nt,N)=>{var q=N(156),z=N(872),L=Object.hasOwnProperty,ht=Object.create(null);for(var b in q)L.call(q,b)&&(ht[q[b]]=b);var y=k.exports={to:{},get:{}};y.get=function(g){var S=g.substring(0,3).toLowerCase(),_,A;switch(S){case"hsl":_=y.get.hsl(g),A="hsl";break;case"hwb":_=y.get.hwb(g),A="hwb";break;default:_=y.get.rgb(g),A="rgb";break}return _?{model:A,value:_}:null},y.get.rgb=function(g){if(!g)return null;var S=/^#([a-f0-9]{3,4})$/i,_=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,A=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,m=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,T=/^(\w+)$/,E=[0,0,0,1],I,F,lt;if(I=g.match(_)){for(lt=I[2],I=I[1],F=0;F<3;F++){var Dt=F*2;E[F]=parseInt(I.slice(Dt,Dt+2),16)}lt&&(E[3]=parseInt(lt,16)/255)}else if(I=g.match(S)){for(I=I[1],lt=I[3],F=0;F<3;F++)E[F]=parseInt(I[F]+I[F],16);lt&&(E[3]=parseInt(lt+lt,16)/255)}else if(I=g.match(A)){for(F=0;F<3;F++)E[F]=parseInt(I[F+1],0);I[4]&&(I[5]?E[3]=parseFloat(I[4])*.01:E[3]=parseFloat(I[4]))}else if(I=g.match(m)){for(F=0;F<3;F++)E[F]=Math.round(parseFloat(I[F+1])*2.55);I[4]&&(I[5]?E[3]=parseFloat(I[4])*.01:E[3]=parseFloat(I[4]))}else return(I=g.match(T))?I[1]==="transparent"?[0,0,0,0]:L.call(q,I[1])?(E=q[I[1]],E[3]=1,E):null:null;for(F=0;F<3;F++)E[F]=C(E[F],0,255);return E[3]=C(E[3],0,1),E},y.get.hsl=function(g){if(!g)return null;var S=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,_=g.match(S);if(_){var A=parseFloat(_[4]),m=(parseFloat(_[1])%360+360)%360,T=C(parseFloat(_[2]),0,100),E=C(parseFloat(_[3]),0,100),I=C(isNaN(A)?1:A,0,1);return[m,T,E,I]}return null},y.get.hwb=function(g){if(!g)return null;var S=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,_=g.match(S);if(_){var A=parseFloat(_[4]),m=(parseFloat(_[1])%360+360)%360,T=C(parseFloat(_[2]),0,100),E=C(parseFloat(_[3]),0,100),I=C(isNaN(A)?1:A,0,1);return[m,T,E,I]}return null},y.to.hex=function(){var g=z(arguments);return"#"+w(g[0])+w(g[1])+w(g[2])+(g[3]<1?w(Math.round(g[3]*255)):"")},y.to.rgb=function(){var g=z(arguments);return g.length<4||g[3]===1?"rgb("+Math.round(g[0])+", "+Math.round(g[1])+", "+Math.round(g[2])+")":"rgba("+Math.round(g[0])+", "+Math.round(g[1])+", "+Math.round(g[2])+", "+g[3]+")"},y.to.rgb.percent=function(){var g=z(arguments),S=Math.round(g[0]/255*100),_=Math.round(g[1]/255*100),A=Math.round(g[2]/255*100);return g.length<4||g[3]===1?"rgb("+S+"%, "+_+"%, "+A+"%)":"rgba("+S+"%, "+_+"%, "+A+"%, "+g[3]+")"},y.to.hsl=function(){var g=z(arguments);return g.length<4||g[3]===1?"hsl("+g[0]+", "+g[1]+"%, "+g[2]+"%)":"hsla("+g[0]+", "+g[1]+"%, "+g[2]+"%, "+g[3]+")"},y.to.hwb=function(){var g=z(arguments),S="";return g.length>=4&&g[3]!==1&&(S=", "+g[3]),"hwb("+g[0]+", "+g[1]+"%, "+g[2]+"%"+S+")"},y.to.keyword=function(g){return ht[g.slice(0,3)]};function C(g,S,_){return Math.min(Math.max(S,g),_)}function w(g){var S=Math.round(g).toString(16).toUpperCase();return S.length<2?"0"+S:S}},872:(k,nt,N)=>{"use strict";var q=N(195),z=Array.prototype.concat,L=Array.prototype.slice,ht=k.exports=function(y){for(var C=[],w=0,g=y.length;w<g;w++){var S=y[w];q(S)?C=z.call(C,L.call(S)):C.push(S)}return C};ht.wrap=function(b){return function(){return b(ht(arguments))}}}},gn={};function _t(k){var nt=gn[k];if(nt!==void 0)return nt.exports;var N=gn[k]={exports:{}};return Go[k](N,N.exports,_t),N.exports}_t.n=k=>{var nt=k&&k.__esModule?()=>k.default:()=>k;return _t.d(nt,{a:nt}),nt},_t.d=(k,nt)=>{for(var N in nt)_t.o(nt,N)&&!_t.o(k,N)&&Object.defineProperty(k,N,{enumerable:!0,get:nt[N]})},_t.o=(k,nt)=>Object.prototype.hasOwnProperty.call(k,nt),_t.r=k=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})};var ps={};(()=>{"use strict";_t.r(ps),_t.d(ps,{Chart:()=>Xo,createChart:()=>gp,generateCandlesData:()=>fp});function k(n){return typeof n=="function"}function nt(n){return k(n==null?void 0:n.lift)}function N(n){return function(t){if(nt(t))return t.lift(function(e){try{return n(e,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}var q=function(n,t){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,s){e.__proto__=s}||function(e,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])},q(n,t)};function z(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");q(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var L=function(){return L=Object.assign||function(t){for(var e,s=1,i=arguments.length;s<i;s++){e=arguments[s];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},L.apply(this,arguments)};function ht(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(n);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(n,s[i])&&(e[s[i]]=n[s[i]]);return e}function b(n,t,e,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(r=(i<3?o(r):i>3?o(t,e,r):o(t,e))||r);return i>3&&r&&Object.defineProperty(t,e,r),r}function y(n,t){return function(e,s){t(e,s,n)}}function C(n,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,t)}function w(n,t,e,s){function i(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function a(h){try{c(s.next(h))}catch(d){o(d)}}function l(h){try{c(s.throw(h))}catch(d){o(d)}}function c(h){h.done?r(h.value):i(h.value).then(a,l)}c((s=s.apply(n,t||[])).next())})}function g(n,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,i,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(h){return l([c,h])}}function l(c){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(e=0)),e;)try{if(s=1,i&&(r=c[0]&2?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,i=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){e.label=c[1];break}if(c[0]===6&&e.label<r[1]){e.label=r[1],r=c;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(c);break}r[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(n,e)}catch(h){c=[6,h],i=0}finally{s=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var S=Object.create?function(n,t,e,s){s===void 0&&(s=e);var i=Object.getOwnPropertyDescriptor(t,e);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,s,i)}:function(n,t,e,s){s===void 0&&(s=e),n[s]=t[e]};function _(n,t){for(var e in n)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&S(t,n,e)}function A(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],s=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var s=e.call(n),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=s.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=s.return)&&e.call(s)}finally{if(o)throw o.error}}return r}function T(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(m(arguments[t]));return n}function E(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var s=Array(n),i=0,t=0;t<e;t++)for(var r=arguments[t],o=0,a=r.length;o<a;o++,i++)s[i]=r[o];return s}function I(n,t,e){if(e||arguments.length===2)for(var s=0,i=t.length,r;s<i;s++)(r||!(s in t))&&(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return n.concat(r||Array.prototype.slice.call(t))}function F(n){return this instanceof F?(this.v=n,this):new F(n)}function lt(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=e.apply(n,t||[]),i,r=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(u){s[u]&&(i[u]=function(f){return new Promise(function(p,v){r.push([u,f,p,v])>1||a(u,f)})})}function a(u,f){try{l(s[u](f))}catch(p){d(r[0][3],p)}}function l(u){u.value instanceof F?Promise.resolve(u.value.v).then(c,h):d(r[0][2],u)}function c(u){a("next",u)}function h(u){a("throw",u)}function d(u,f){u(f),r.shift(),r.length&&a(r[0][0],r[0][1])}}function Dt(n){var t,e;return t={},s("next"),s("throw",function(i){throw i}),s("return"),t[Symbol.iterator]=function(){return this},t;function s(i,r){t[i]=n[i]?function(o){return(e=!e)?{value:F(n[i](o)),done:i==="return"}:r?r(o):o}:r}}function Ft(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof A=="function"?A(n):n[Symbol.iterator](),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(r){e[r]=n[r]&&function(o){return new Promise(function(a,l){o=n[r](o),i(a,l,o.done,o.value)})}}function i(r,o,a,l){Promise.resolve(l).then(function(c){r({value:c,done:a})},o)}}function Fe(n,t){return Object.defineProperty?Object.defineProperty(n,"raw",{value:t}):n.raw=t,n}var Zo=Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t};function pp(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&S(t,n,e);return Zo(t,n),t}function mp(n){return n&&n.__esModule?n:{default:n}}function vp(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)}function bp(n,t,e,s,i){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!i:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?i.call(n,e):i?i.value=e:t.set(n,e),e}function Cp(n,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?t===n:n.has(t)}function pn(n){var t=function(s){Error.call(s),s.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var ms=pn(function(n){return function(e){n(this),this.message=e?e.length+` errors occurred during unsubscription:
`+e.map(function(s,i){return i+1+") "+s.toString()}).join(`
`):"",this.name="UnsubscriptionError",this.errors=e}});function He(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var ae=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,s,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=A(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(v){t={error:v}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var h=this.initialTeardown;if(k(h))try{h()}catch(v){r=v instanceof ms?v.errors:[v]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var u=A(d),f=u.next();!f.done;f=u.next()){var p=f.value;try{bn(p)}catch(v){r=r!=null?r:[],v instanceof ms?r=I(I([],m(r)),m(v.errors)):r.push(v)}}}catch(v){s={error:v}}finally{try{f&&!f.done&&(i=u.return)&&i.call(u)}finally{if(s)throw s.error}}}if(r)throw new ms(r)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)bn(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&He(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&He(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),mn=ae.EMPTY;function vn(n){return n instanceof ae||n&&"closed"in n&&k(n.remove)&&k(n.add)&&k(n.unsubscribe)}function bn(n){k(n)?n():n.unsubscribe()}var qt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ke={setTimeout:function(n,t){for(var e=[],s=2;s<arguments.length;s++)e[s-2]=arguments[s];var i=ke.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,I([n,t],m(e))):setTimeout.apply(void 0,I([n,t],m(e)))},clearTimeout:function(n){var t=ke.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(n)},delegate:void 0};function Cn(n){ke.setTimeout(function(){var t=qt.onUnhandledError;if(t)t(n);else throw n})}function yn(){}var $o=function(){return vs("C",void 0,void 0)}();function Ko(n){return vs("E",void 0,n)}function qo(n){return vs("N",n,void 0)}function vs(n,t,e){return{kind:n,value:t,error:e}}var Jt=null;function je(n){if(qt.useDeprecatedSynchronousErrorHandling){var t=!Jt;if(t&&(Jt={errorThrown:!1,error:null}),n(),t){var e=Jt,s=e.errorThrown,i=e.error;if(Jt=null,s)throw i}}else n()}function Jo(n){qt.useDeprecatedSynchronousErrorHandling&&Jt&&(Jt.errorThrown=!0,Jt.error=n)}var bs=function(n){z(t,n);function t(e){var s=n.call(this)||this;return s.isStopped=!1,e?(s.destination=e,vn(e)&&e.add(s)):s.destination=sa,s}return t.create=function(e,s,i){return new ye(e,s,i)},t.prototype.next=function(e){this.isStopped?ys(qo(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?ys(Ko(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?ys($o,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(ae),Qo=Function.prototype.bind;function Cs(n,t){return Qo.call(n,t)}var ta=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(s){Ye(s)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(s){Ye(s)}else Ye(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Ye(e)}},n}(),ye=function(n){z(t,n);function t(e,s,i){var r=n.call(this)||this,o;if(k(e)||!e)o={next:e!=null?e:void 0,error:s!=null?s:void 0,complete:i!=null?i:void 0};else{var a;r&&qt.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&Cs(e.next,a),error:e.error&&Cs(e.error,a),complete:e.complete&&Cs(e.complete,a)}):o=e}return r.destination=new ta(o),r}return t}(bs);function Ye(n){qt.useDeprecatedSynchronousErrorHandling?Jo(n):Cn(n)}function ea(n){throw n}function ys(n,t){var e=qt.onStoppedNotification;e&&ke.setTimeout(function(){return e(n,t)})}var sa={closed:!0,next:yn,error:ea,complete:yn};function Ct(n,t,e,s,i){return new na(n,t,e,s,i)}var na=function(n){z(t,n);function t(e,s,i,r,o,a){var l=n.call(this,e)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=s?function(c){try{s(c)}catch(h){e.error(h)}}:n.prototype._next,l._error=r?function(c){try{r(c)}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._error,l._complete=i?function(){try{i()}catch(c){e.error(c)}finally{this.unsubscribe()}}:n.prototype._complete,l}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;n.prototype.unsubscribe.call(this),!s&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(bs);function dt(n,t){return N(function(e,s){var i=0;e.subscribe(Ct(s,function(r){s.next(n.call(t,r,i++))}))})}var wn=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function Sn(n){return k(n==null?void 0:n.then)}var ws=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function le(n){return n}function yp(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return xn(n)}function xn(n){return n.length===0?le:n.length===1?n[0]:function(e){return n.reduce(function(s,i){return i(s)},e)}}var mt=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,s){var i=this,r=ra(t)?t:new ye(t,e,s);return je(function(){var o=i,a=o.operator,l=o.source;r.add(a?a.call(r,l):l?i._subscribe(r):i._trySubscribe(r))}),r},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var s=this;return e=Pn(e),new e(function(i,r){var o=new ye({next:function(a){try{t(a)}catch(l){r(l),o.unsubscribe()}},error:r,complete:i});s.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[ws]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return xn(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Pn(t),new t(function(s,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return s(r)})})},n.create=function(t){return new n(t)},n}();function Pn(n){var t;return(t=n!=null?n:qt.Promise)!==null&&t!==void 0?t:Promise}function ia(n){return n&&k(n.next)&&k(n.error)&&k(n.complete)}function ra(n){return n&&n instanceof bs||ia(n)&&vn(n)}function _n(n){return k(n[ws])}function Tn(n){return Symbol.asyncIterator&&k(n==null?void 0:n[Symbol.asyncIterator])}function Mn(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function oa(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var An=oa();function En(n){return k(n==null?void 0:n[An])}function In(n){return lt(this,arguments,function(){var e,s,i,r;return g(this,function(o){switch(o.label){case 0:e=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,F(e.read())];case 3:return s=o.sent(),i=s.value,r=s.done,r?[4,F(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,F(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Dn(n){return k(n==null?void 0:n.getReader)}function Lt(n){if(n instanceof mt)return n;if(n!=null){if(_n(n))return aa(n);if(wn(n))return la(n);if(Sn(n))return ca(n);if(Tn(n))return Ln(n);if(En(n))return ha(n);if(Dn(n))return da(n)}throw Mn(n)}function aa(n){return new mt(function(t){var e=n[ws]();if(k(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function la(n){return new mt(function(t){for(var e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function ca(n){return new mt(function(t){n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Cn)})}function ha(n){return new mt(function(t){var e,s;try{for(var i=A(n),r=i.next();!r.done;r=i.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(s=i.return)&&s.call(i)}finally{if(e)throw e.error}}t.complete()})}function Ln(n){return new mt(function(t){ua(n,t).catch(function(e){return t.error(e)})})}function da(n){return Ln(In(n))}function ua(n,t){var e,s,i,r;return w(this,void 0,void 0,function(){var o,a;return g(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),e=Ft(n),l.label=1;case 1:return[4,e.next()];case 2:if(s=l.sent(),!!s.done)return[3,4];if(o=s.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),i={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),s&&!s.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Ht(n,t,e,s,i){s===void 0&&(s=0),i===void 0&&(i=!1);var r=t.schedule(function(){e(),i?n.add(this.schedule(null,s)):this.unsubscribe()},s);if(n.add(r),!i)return r}function fa(n,t,e,s,i,r,o,a){var l=[],c=0,h=0,d=!1,u=function(){d&&!l.length&&!c&&t.complete()},f=function(v){return c<s?p(v):l.push(v)},p=function(v){r&&t.next(v),c++;var x=!1;Lt(e(v,h++)).subscribe(Ct(t,function(P){i==null||i(P),r?f(P):t.next(P)},function(){x=!0},void 0,function(){if(x)try{c--;for(var P=function(){var D=l.shift();o?Ht(t,o,function(){return p(D)}):p(D)};l.length&&c<s;)P();u()}catch(D){t.error(D)}}))};return n.subscribe(Ct(t,f,function(){d=!0,u()})),function(){a==null||a()}}function On(n,t,e){return e===void 0&&(e=1/0),k(t)?On(function(s,i){return dt(function(r,o){return t(s,r,i,o)})(Lt(n(s,i)))},e):(typeof t=="number"&&(e=t),N(function(s,i){return fa(s,i,n,e)}))}function Bn(n){return n===void 0&&(n=1/0),On(le,n)}var Rn=new mt(function(n){return n.complete()});function wp(n){return n?ga(n):Rn}function ga(n){return new Observable(function(t){return n.schedule(function(){return t.complete()})})}function Fn(n){return n&&k(n.schedule)}function Ss(n){return n[n.length-1]}function pa(n){return k(Ss(n))?n.pop():void 0}function Ne(n){return Fn(Ss(n))?n.pop():void 0}function ma(n,t){return typeof Ss(n)=="number"?n.pop():t}function Hn(n,t){return t===void 0&&(t=0),N(function(e,s){e.subscribe(Ct(s,function(i){return Ht(s,n,function(){return s.next(i)},t)},function(){return Ht(s,n,function(){return s.complete()},t)},function(i){return Ht(s,n,function(){return s.error(i)},t)}))})}function kn(n,t){return t===void 0&&(t=0),N(function(e,s){s.add(n.schedule(function(){return e.subscribe(s)},t))})}function va(n,t){return Lt(n).pipe(kn(t),Hn(t))}function ba(n,t){return Lt(n).pipe(kn(t),Hn(t))}function Ca(n,t){return new mt(function(e){var s=0;return t.schedule(function(){s===n.length?e.complete():(e.next(n[s++]),e.closed||this.schedule())})})}function ya(n,t){return new mt(function(e){var s;return Ht(e,t,function(){s=n[An](),Ht(e,t,function(){var i,r,o;try{i=s.next(),r=i.value,o=i.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return k(s==null?void 0:s.return)&&s.return()}})}function jn(n,t){if(!n)throw new Error("Iterable cannot be null");return new mt(function(e){Ht(e,t,function(){var s=n[Symbol.asyncIterator]();Ht(e,t,function(){s.next().then(function(i){i.done?e.complete():e.next(i.value)})},0,!0)})})}function wa(n,t){return jn(In(n),t)}function Sa(n,t){if(n!=null){if(_n(n))return va(n,t);if(wn(n))return Ca(n,t);if(Sn(n))return ba(n,t);if(Tn(n))return jn(n,t);if(En(n))return ya(n,t);if(Dn(n))return wa(n,t)}throw Mn(n)}function Xe(n,t){return t?Sa(n,t):Lt(n)}function vt(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Ne(n),s=ma(n,1/0),i=n;return i.length?i.length===1?Lt(i[0]):Bn(s)(Xe(i,e)):Rn}var xa=pn(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),R=function(n){z(t,n);function t(){var e=n.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var s=new Yn(this,this);return s.operator=e,s},t.prototype._throwIfClosed=function(){if(this.closed)throw new xa},t.prototype.next=function(e){var s=this;je(function(){var i,r;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var o=A(s.currentObservers),a=o.next();!a.done;a=o.next()){var l=a.value;l.next(e)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var s=this;je(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=e;for(var i=s.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;je(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var s=e.observers;s.length;)s.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var s=this,i=this,r=i.hasError,o=i.isStopped,a=i.observers;return r||o?mn:(this.currentObservers=null,a.push(e),new ae(function(){s.currentObservers=null,He(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var s=this,i=s.hasError,r=s.thrownError,o=s.isStopped;i?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new mt;return e.source=this,e},t.create=function(e,s){return new Yn(e,s)},t}(mt),Yn=function(n){z(t,n);function t(e,s){var i=n.call(this)||this;return i.destination=e,i.source=s,i}return t.prototype.next=function(e){var s,i;(i=(s=this.destination)===null||s===void 0?void 0:s.next)===null||i===void 0||i.call(s,e)},t.prototype.error=function(e){var s,i;(i=(s=this.destination)===null||s===void 0?void 0:s.error)===null||i===void 0||i.call(s,e)},t.prototype.complete=function(){var e,s;(s=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||s===void 0||s.call(e)},t.prototype._subscribe=function(e){var s,i;return(i=(s=this.source)===null||s===void 0?void 0:s.subscribe(e))!==null&&i!==void 0?i:mn},t}(R),ft=function(n){z(t,n);function t(e){var s=n.call(this)||this;return s._value=e,s}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var s=n.prototype._subscribe.call(this,e);return!s.closed&&e.next(this._value),s},t.prototype.getValue=function(){var e=this,s=e.hasError,i=e.thrownError,r=e._value;if(s)throw i;return this._throwIfClosed(),r},t.prototype.next=function(e){n.prototype.next.call(this,this._value=e)},t}(R);let xs=!1,Ps=0;const ze=new Map,_s=new Map,Nn=()=>{xs||(xs=!0,Ps=requestAnimationFrame(()=>{_s.forEach((n,t)=>{n(),_s.delete(t)}),ze.forEach((n,t)=>{n(),ze.delete(t)}),xs=!1}))},Xn=(n,t)=>{ze.set(n,t),Nn()},Pa=n=>{ze.delete(n)},we=(n,t)=>{_s.set(n,t),Nn()};function yt(){const n=()=>Math.random().toString(16).slice(-4);return`${n()+n()}-${n()}-${n()}-${n()}-${n()+n()+n()}`}var _a=Math.pow;const We=14,Ve=[];for(let n=0;n<We+1;n++)Ve.push(_a(10,n));const Ts=5e-13;class ut{static roundToNearest(t,e){return isFinite(t)?ut.isZero(t)?0:(t>0?t+=Ts:t<0&&(t-=Ts),ut.roundDecimal(Math.round(ut.roundDecimal(t/e))*e)):t}static roundUpToNearest(t,e){return ut.roundDecimal(Math.ceil(t/e))*e}static roundDecimal(t){if(isNaN(t)||t===Math.floor(t))return t;const e=Math.sign(t),s=Math.abs(t),i=Math.min(We,We-1-Math.floor(Math.log10(s)));for(let r=i;r>=0;r--){const o=Math.floor(Ve[r]*s+.5);if(o<Ve[We])return e*o/Ve[r]}return Math.round(t)}static makeDecimal(t,e,s,i){if(!isFinite(t))return"";if(isFinite(t)){let r=t.toFixed(e);if(!i)return s?r.replace(".",s):r;if(s===i)throw new Error("Grouping symbol cannot be the same as decimal separator.");const o=r.split(".");let a=o[0];const l=o[1];return Math.abs(t)>=1e3&&(a=a.replace(RegExp("\\d(?=(\\d{3})+$)","g"),`$&${i}`)),l?(r=[a,l].join(s),r):a}return""}static compare(t,e,s){return t>e+s?1:t<e-s?-1:(isNaN(t)?1:0)-(isNaN(e)?1:0)}static isZero(t){return ut.compare(t,0,Ts)===0}static cutNumber(t,e,s=0){return{K:r=>r/1e3,M:r=>r/1e6}[e](t).toFixed(s)+e}static isExponential(t){return/\de(\-|\+)\d/.test(t.toString())}}function Ta(n,t,e){const s=n/t;return s>=e||s<=1/e}function Ms(n,t,e){return Math.max(t,Math.min(n,e))}function Ma(n){return 1-(Math.pow(2,-5*n)-.0009765625)*1.0009775171065494}function Se(...n){for(const t of n)if(t!==void 0&&isFinite(t))return t;return NaN}const rt=n=>~~n,Aa=n=>~~(n+1),xe=n=>~~(n+.5),Ea=(n,t)=>n>>t;function Sp(n){if(!Number.isFin