UNPKG

@lightningchart/lcjs

Version:

A high-performance charting library.

2 lines 1.44 MB
/* LightningChart JS v8.2.0 */ import*as t from"immutable";import{Record as i}from"immutable";import s from"earcut";class e{constructor(){this.u=!0}S(){return this.u}}class r extends e{constructor(t,i){super(),this.M=t,this._=t,this.u=i}C(t){return t!==this.M&&(this._=this.M,this.M=t,this.u=!0),this}T(){return this.M}S(){return super.S()}}const h=(t,i)=>({x:t,y:i}),n=(t,i)=>({x:t,y:i}),o=(t,i,s)=>({position:t,high:i,low:s}),a=(t,i,s)=>({x:t,y:i,z:s}),l=t=>{const i=Array(0),s=Array(0);return t.length>0&&t.forEach((t=>{i.push(h(t.position,t.high)),s.push(h(t.position,t.low))})),[i,s]},u=(t,i)=>({min:t,max:i}),c=(t,i,s,e)=>({x:t,y:i,width:s,height:e}),d=(t,i=!0)=>new r(t,i),f=(t=0,i=0,s=0,e=0)=>({left:t,top:i,right:s,bottom:e}),A=f,g=(t,i)=>({left:void 0!==i.left?i.left:t.left,top:void 0!==i.top?i.top:t.top,right:void 0!==i.right?i.right:t.right,bottom:void 0!==i.bottom?i.bottom:t.bottom}),v=i({type:"color",r:1,g:1,b:1,a:1});class y extends v{constructor(t){super(t)}toUint32(){return void 0!==this.F||(this.F=F(this.getR(),this.getG(),this.getB(),this.getA())),this.F}toString(){return`color:${this.r},${this.g},${this.b},${this.a}`}setA(t){return this.set("a",t/255)}setR(t){return this.set("r",t/255)}setG(t){return this.set("g",t/255)}setB(t){return this.set("b",t/255)}getA(){return 255*this.get("a")}getR(){return 255*this.get("r")}getG(){return 255*this.get("g")}getB(){return 255*this.get("b")}getHighlight(){return this.I||(this.I=new y({r:this.r+.45*(1-this.r),g:this.g+.45*(1-this.g),b:this.b+.45*(1-this.b),a:this.a<1?this.a+.45*(1-this.a):1})),this.I}getLighter(){return this.P||(this.P=new y({r:this.r+.4*(1-this.r),g:this.g+.4*(1-this.g),b:this.b+.4*(1-this.b),a:this.a})),this.P}getDarker(){return this.L||(this.L=new y({r:this.r-.4*(1-this.r),g:this.g-.4*(1-this.g),b:this.b-.4*(1-this.b),a:this.a})),this.L}toRGBAString(){return`rgba(${(255*this.r).toFixed(0)},${(255*this.g).toFixed(0)},${(255*this.b).toFixed(0)},${this.a})`}}const p=t=>!(!t||"object"!=typeof t||!("type"in t)||"color"!==t.type),m=(t,i,s,e=255)=>new y({r:t/255,g:i/255,b:s/255,a:e/255}),S=t=>{const i=t.startsWith("#")?t.substring(1):t.startsWith("0x")?t.substr(2):t;switch(i.length){case 8:return new y({r:Number(`0x${i.substring(0,2)}`)/255,g:Number(`0x${i.substring(2,4)}`)/255,b:Number(`0x${i.substring(4,6)}`)/255,a:Number(`0x${i.substring(6,8)}`)/255});case 6:return new y({r:Number(`0x${i.substring(0,2)}`)/255,g:Number(`0x${i.substring(2,4)}`)/255,b:Number(`0x${i.substring(4,6)}`)/255});case 4:return new y({r:Number(`0x${i.charAt(0)}${i.charAt(0)}`)/255,g:Number(`0x${i.charAt(1)}${i.charAt(1)}`)/255,b:Number(`0x${i.charAt(2)}${i.charAt(2)}`)/255,a:Number(`0x${i.charAt(3)}${i.charAt(3)}`)/255});case 3:return new y({r:Number(`0x${i.charAt(0)}${i.charAt(0)}`)/255,g:Number(`0x${i.charAt(1)}${i.charAt(1)}`)/255,b:Number(`0x${i.charAt(2)}${i.charAt(2)}`)/255});default:throw new Error(`ColorHEX parsing error | input: ${t}`)}},b=(t,i=1,s=1)=>{let e,r,h;t/=360;const n=Math.floor(6*t),o=6*t-n,a=s*(1-i),l=s*(1-o*i),u=s*(1-(1-o)*i);switch(n%6){case 0:e=s,r=u,h=a;break;case 1:e=l,r=s,h=a;break;case 2:e=a,r=s,h=u;break;case 3:e=a,r=l,h=s;break;case 4:e=u,r=a,h=s;break;default:e=s,r=a,h=l}return new y({r:e,g:r,b:h})},x=t=>{try{if(t.startsWith("rgba")){const i=t.substr(5).slice(0,-1),s=JSON.parse(`[${i}]`);return m(s[0],s[1],s[2],255*s[3])}if(t.startsWith("rgb")){const i=t.substr(4).slice(0,-1),s=JSON.parse(`[${i}]`);return m(s[0],s[1],s[2])}if(t.startsWith("hsl")){const i=t.substr(4).slice(0,-1).split(",").map(parseFloat),s=_(i[0],i[1],i[2]);return m(s[0],s[1],s[2])}return t.startsWith("#")||t.startsWith("0x")?S(t):S(k(t))}catch(t){}return console.warn(`ColorCSS parsing error: ${t}`),S("#fff")},M=t=>m(255&t,255&(t>>=8),255&(t>>=8),255&(t>>=8)),_=(t,i,s)=>{i/=100,s/=100;const e=(1-Math.abs(2*s-1))*i,r=t/60,h=e*(1-Math.abs(r%2-1));let n=[];isNaN(t)?n=[0,0,0]:r<=1?n=[e,h,0]:r<=2?n=[h,e,0]:r<=3?n=[0,e,h]:r<=4?n=[0,h,e]:r<=5?n=[h,0,e]:r<=6&&(n=[e,0,h]);const o=s-.5*e;return[Math.round(255*(n[0]+o)),Math.round(255*(n[1]+o)),Math.round(255*(n[2]+o))]},w={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},k=t=>{const i=w[t.toLowerCase()];if(i)return i;throw new Error(`Unknown color code: ${t}`)},C=new y({}),T=m(0,0,0,0),F=(t,i,s,e=255)=>(e<<24|s<<16|i<<8|t)>>>0,I=t=>F(255*t.r,255*t.g,255*t.b,255*t.a),P=i({type:"font",size:14,family:"Arial",weight:"normal",style:"normal",variant:!1});class L extends P{constructor(t){super(t)}setSize(t){return this.set("size",t)}setFamily(t){return this.set("family",t)}setWeight(t){return this.set("weight",t)}setStyle(t){return this.set("style",t)}setVariant(t){return this.set("variant",t)}getSize(){return this.get("size")}getFamily(){return this.get("family")}getWeight(){return this.get("weight")}getStyle(){return this.get("style")}getVariant(){return this.get("variant")}}const B=t=>!(!t||"object"!=typeof t||!("type"in t)||"font"!==t.type),D=new L;var E,R;!function(t){t.circle="circle",t.ellipse="ellipse"}(E||(E={})),function(t){t.closestSide="closest-side",t.closestCorner="closest-corner",t.farthestSide="farthest-side",t.farthestCorner="farthest-corner"}(R||(R={}));const O=i({type:"fillstyle",fillType:"radial-gradient",ditheringEnabled:!0,stops:[{color:S("#f00"),offset:0},{color:S("#0f0"),offset:1}],position:h(.5,.5),shape:E.ellipse,extent:R.farthestCorner});class z extends O{constructor(t){if(super(t),null===t||t&&null===t.stops||t&&t.stops&&!Array.isArray(t.stops)||t&&t.stops&&Array.isArray(t.stops)&&t.stops.length<2)throw new Error("RadialGradientFill requires minimum two color stops to be defined.")}toString(){return`radialGradientFill:${this.shape},${this.ditheringEnabled},${this.extent},${this.position.x},${this.position.y},${this.stops.map((t=>`${t.offset},${t.color.toString()}`)).join(",")}`}toCSS(){return`radial-gradient(${this.shape} ${this.extent} at ${100*this.position.x}% ${100*this.position.y}%, ${this.stops.map((t=>`${t.color.toString()} ${100*t.offset}%`)).join(", ")})`}setColorStops(t){if(t.length<2)throw new Error("Minimum of two color stops required");return this.set("stops",t)}getColorStops(){return this.get("stops")}setPosition(t){return this.set("position",t)}getPosition(){return this.get("position")}setShape(t){return this.set("shape",t)}getShape(){return this.get("shape")}setExtent(t){return this.set("extent",t)}getExtent(){return this.get("extent")}setDitheringEnabled(t){return this.set("ditheringEnabled",t)}getDitheringEnabled(){return this.get("ditheringEnabled")}}const V=t=>!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"radial-gradient"===t.fillType),N=i({type:"fillstyle",fillType:"linear-gradient",stops:[{color:S("#f00"),offset:0},{color:S("#0f0"),offset:1}],angle:0});class G extends N{constructor(t){if(super(t),null===t||t&&null===t.stops||t&&t.stops&&!Array.isArray(t.stops)||t&&t.stops&&Array.isArray(t.stops)&&t.stops.length<2)throw new Error("LinearGradientFill requires minimum two color stops to be defined.")}toString(){return`linearGradientFill:${this.angle},${this.stops.map((t=>`${t.offset},${t.color.toString()}`)).join(",")}`}toCSS(){return`linear-gradient(${this.angle}deg, ${this.stops.map((t=>`${t.color.toString()} ${100*t.offset}%`)).join(", ")})`}setColorStops(t){if(t.length<2)throw new Error("Minimum of two color stops required");const i=t.sort(((t,i)=>t.offset-i.offset));return this.set("stops",i)}getColorStops(){return this.get("stops")}setAngle(t,i){return this.set("angle",i?function(t){return 180*t/Math.PI}(t):t)}getAngle(t){return t?se(this.get("angle")):this.get("angle")}}const $=t=>!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"linear-gradient"===t.fillType);class U{constructor(t,i,s,e){this.D=new Lt,this.cellIndex=t,this.cellSpan=i,this.cellsAmount=s,this.observedAmount=e,this.x=new j,this.y=new j,this.z=new j;const r={...t},h={...i};if(e){const t=t=>{const i=t.value;this.cellsAmount.x=i.reduce(Fs,0),this.cellIndex.x=i.reduce(((t,i,s)=>s>=r.x?t:t+i),0),this.cellSpan.x=i.reduce(((t,i,s)=>s>=r.x&&s<r.x+h.x?t+i:t),0),this.D.R("cellresize",{})};e.x.O("change",t),t({value:e.x.T()});const i=t=>{const i=t.value;this.cellsAmount.y=i.reduce(Fs,0),this.cellIndex.y=i.reduce(((t,i,s)=>s>=r.y?t:t+i),0),this.cellSpan.y=i.reduce(((t,i,s)=>s>=r.y&&s<r.y+h.y?t+i:t),0),this.D.R("cellresize",{})};e.y.O("change",i),i({value:e.y.T()}),this.V=()=>{e.x.N("change",t),e.y.N("change",i)}}}G(){return this.V&&(this.V(),this.V=void 0),this}addEventListener(t,i,s){this.D.addEventListener(t,i,s)}removeEventListener(t,i){this.D.removeEventListener(t,i)}}class j extends e{constructor(){super(...arguments),this.$=0,this.U=10,this.j=1,this.Y=!1}H(){return!1}W(){return this.u=!1,this}X(){return this.u=!0,this}getInnerStart(){return this.$}getInnerEnd(){return this.U}getInnerInterval(){return Math.abs(this.getInnerEnd()-this.getInnerStart())}Z(t,i){return this.$=t,this.U=i,this.J(),this}K(t){return this.j=t,this.J(),this}q(t){return t/this.j}J(){const t=this.q(this.U-this.$),i=this.j;void 0!==this.tt&&!1!==ai(t,this.tt)||(this.u=!0,this.it=i,this.tt=t);let s=this.$;this.U;let e=0;this.Y&&(s=0,this.U,this.$,e=this.$);const r=t,h=s+.5*r*i;this.st={displacement:h,scaling:r,highPrecisionOffset:e}}et(){return this.tt}rt(){return this.U<this.$}ht(){return this.st}nt(t,i){return!0}}class Y{constructor(){this.ot=!0}getInnerStart(){return this.$}getInnerEnd(){return this.U}getInnerInterval(){return Math.abs(this.U-this.$)}Z(t,i){return t===this.$&&i===this.U||(this.ot=!0),this.$=t,this.U=i,this}W(){return this.ot=!1,this}X(){return this.ot=!0,this}}class H extends Y{constructor(t,i,s,e){if(super(),this.ut=!0,this.ct=!0,this.dt=[0,0],this.ft=!0,this.At=t,this.vt=i,this.yt=s,this.St=t,this.bt=i,e){const t=t=>{this.xt(t.value)};e.O("change",t),this.xt(e.T()),this.Mt=()=>e.N("change",t)}}H(){return this.ct}K(t){return this.j=t,this.ct=!0,this}_t(t){return this.dt=t.map(Math.abs),this.ft=!0,this}wt(){return this.At/this.yt*this.j+this.dt[0]}kt(){return(this.At+this.vt)/this.yt*this.j-this.dt[1]}Ct(){return this.getCellSize()-this.Tt()}Ft(){return this.j}getCellSize(){return this.It(this.j)}Tt(){return this.dt[0]+this.dt[1]}Pt(){return this.dt}xt(t){this.yt=t.reduce(Fs,0),this.At=t.reduce(((t,i,s)=>s>=this.St?t:t+i),0),this.vt=t.reduce(((t,i,s)=>s>=this.St&&s<this.St+this.bt?t+i:t),0),this.ut=!0,this.Lt()}It(t){return t*this.vt/this.yt}W(){return super.W(),this.ct=!1,this.ft=!1,this.ut=!1,this}X(){return super.X(),this.ct=!0,this.ft=!0,this.ut=!0,this}}class W extends H{constructor(t,i,s,e){super(t,i,s,e),this.Y=!1,this.Bt=!1,this.Dt=0,this.j=1e3,this.Z(0,10),this.J()}Et(){return this.Bt}nt(t,i,s,e,r){if(t===i)return!1;const h=Math.abs(e-s),n=Math.abs(i-t);if(!this.Y){const s=zi(t,i,this.getCellSize());if(void 0===s)return!1;if(n>s)return!0;const e=(i+t)/2,o=(r?s/2:h/2)*(t>i?-1:1);return{start:e-o,end:e+o}}const o=10**-(12-Math.log10(Math.max(Math.abs(t),1)));if(n>o)return!0;const a=(i+t)/2,l=(r?o/2:h/2)*(t>i?-1:1);return{start:a-l,end:a+l}}Lt(){this.J()}Rt(t){return this.wt()+(t-this.$)/(this.U-this.$)*(this.kt()-this.wt())}Ot(t){return this.$+(t-this.wt())/(this.kt()-this.wt())*(this.U-this.$)}Z(t,i){return super.Z(t,i),this.J(),this}_t(t){return super._t(t),this.J(),this}K(t){return super.K(t),this.zt=X(this.U-this.$,this.dt,this.j,this.vt,this.yt),this.J(),this}Vt(){return this.Y=!0,this}Nt(){return this.Y}Gt(){return Math.abs(this.$t)}Ut(){return this.Gt()/this.zt}jt(){return this.Yt}Ht(){return this.Wt}getPixelSize(){return this.zt}ht(){return this.st}X(){return super.X(),this.Bt=!0,this}W(){return super.W(),this.Bt=!1,this}Xt(t,i=Ae.Numeric){return i(t,{start:this.$,end:this.U})}Zt(){const t=Math.abs(this.getInnerEnd()).toString().length,i=Math.abs(this.getInnerStart()).toString().length;return t>i?t:i}Jt(t){return X(t,this.dt,this.j,this.vt,this.yt)}J(){let t=this.$,i=this.U,s=0;this.Y&&(t=0,i=this.U-this.$,s=this.$);const e=i-t,r=X(e,this.dt,this.j,this.vt,this.yt);this.Wt=this.$-this.dt[0]*r,this.Yt=this.U+this.dt[1]*r;const h=t-this.dt[0]*r,n=i+this.dt[1]*r-h,o=n-this.$t,a=Math.abs(o/r),l=e-this.Dt,u=Math.abs(l/r);(!this.st||a>=.4||u>=.4)&&(this.Dt=e,this.$t=n,this.zt=r,this.Bt=!0);const c=this.$t*this.yt/(2*this.vt),d=-(h-this.$t*this.At/this.vt)-c,f=2*this.wt()/this.j-1,A=2*this.kt()/this.j-1-f;this.st={displacement:d,scaling:c,highPrecisionOffset:s,viewportStart:f,viewportSize:A,scaleStartLog:0,scaleIntervalLog:0}}Qt(t,i){return t+this.zt*i}}const X=(t,i,s,e=1,r=1)=>t/(s*e/r-(i[0]+i[1]));class Z{Kt(t,i){return"x"in t?(this.x=t.x,this.y=t.y):(this.x=t,this.y=i),this}W(){return this.x.W(),this.y.W(),this}X(){return this.x.X(),this.y.X(),this}K(t,i){return"object"==typeof t?(this.x.K(t.x),this.y.K(t.y)):(this.x.K(t),this.y.K(i)),this}Ft(){return h(this.x.Ft(),this.y.Ft())}qt(t){return this.x._t(t),this}ti(t){return this.y._t(t),this}Tt(){return h(this.x.Tt(),this.y.Tt())}ii(t,i){return this.x.Z(t,i),this}si(t,i){return this.y.Z(t,i),this}getInnerIntervalPixels(){const t=this.x.getCellSize(),i=this.y.getCellSize();return{x:t-this.x.Tt(),y:i-this.y.Tt()}}ei(){return this.x.Et()||this.y.Et()}}class J extends Z{constructor(){super(...arguments),this.ri="LinearScaleXY"}hi(t,i,s,e){return this.x=new W(t.x,i.x,s.x,e?e.x:void 0),this.y=new W(t.y,i.y,s.y,e?e.y:void 0),this}Nt(){return this.x.Nt()||this.y.Nt()}ni(){return h(this.x.getPixelSize(),this.y.getPixelSize())}ht(){return{x:this.x.ht(),y:this.y.ht()}}Qt(t,i){const s=this.ni();return{x:t.x+i.x*s.x,y:t.y+i.y*s.y}}oi(t,i,s,e){const r=this.ni(),h=Hs(t,i);return h.x*=e,h.y*=e,{x:t.x+s*r.x*h.x,y:t.y+s*r.y*h.y}}}class Q extends Z{constructor(){super(...arguments),this.ri="MixedScaleXY"}Nt(){return!1}Qt(t,i){const s=this.x.Rt(t.x),e=this.y.Rt(t.y),r={x:s+i.x,y:e+i.y};return{x:this.x.Ot(r.x),y:this.y.Ot(r.y)}}oi(t,i,s,e){const r={x:this.x.Rt(t.x),y:this.y.Rt(t.y)},h={x:this.x.Rt(i.x),y:this.y.Rt(i.y)},n=Ys(Js(h,r)),o=Hs(h,r),a={x:r.x+n.x*e+o.x*s,y:r.y+n.y*e+o.y*s};return{x:this.x.Ot(a.x),y:this.y.Ot(a.y)}}ht(){const t=this.x.ht(),i=this.y.ht();return{uScaleStart:[this.x.$,this.y.$],uScaleInterval:[this.x.U-this.x.$,this.y.U-this.y.$],uScaleStartLog:[t.scaleStartLog,i.scaleStartLog],uScaleIntervalLog:[t.scaleIntervalLog,i.scaleIntervalLog],uViewportStart:[t.viewportStart,i.viewportStart],uViewportSize:[t.viewportSize,i.viewportSize]}}}const K={d1:t=>new t.scale1DConstructor(0,1,1,void 0),d2:t=>(new t.scaleXYConstructor).hi({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0),d3:()=>new U({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0)},q=(t,i,s)=>i===s?t:s.Ot(i.Rt(t)),tt=(t,i,s)=>{if(i===s)return t;const e=i instanceof Z?i.x:i.x instanceof Z?i.x.x:i.x.ai,r=i instanceof Z?i.y:i.y instanceof Z?i.y.y:i.y.ai,h=s instanceof Z?s.x:s.x instanceof Z?s.x.x:s.x.ai,n=s instanceof Z?s.y:s.y instanceof Z?s.y.y:s.y.ai;return{...t,x:q(t.x,e,h),y:q(t.y,r,n)}},it=(t,i,s)=>{const e=t(i,s);return t=>new Te({color:e(t)})},st=(t,i,s)=>{const e=t(i+1,s);return t=>new z({stops:[{offset:0,color:e(t)},{offset:1,color:e(t).getDarker()}]})},et=(t,i,s,e)=>{const r=t(i+1,e);return t=>new G({stops:[{offset:0,color:r(t).getDarker()},{offset:.5,color:r(t)},{offset:1,color:r(t).getDarker()}],angle:s||90})},rt=(...t)=>{if(0===t.length)return{remove:oi};let i=!1;const s=t.map((s=>{const e=e=>{((s,e,r)=>{i||(i=!0,t.filter((t=>t!==s)).forEach((t=>t.li(e,r,!1,s.getStopped(),"synchronizedAxis"))),i=!1)})(s,e.start,e.end)};return s.addEventListener("intervalchange",e),e}));let e=!1;const r=t.map((i=>{const s=s=>{((i,s)=>{e||(e=!0,t.filter((t=>t!==i)).forEach((t=>t.setStopped(s))),e=!1)})(i,s.isStopped)};return i.addEventListener("stoppedchange",s),s}));return{remove:()=>{t.forEach(((t,i)=>{t.removeEventListener("intervalchange",s[i]),t.removeEventListener("stoppedchange",r[i])}))}}},ht=(t,i,s,e)=>{if(!s||0===s.length)throw new Error("Invalid use regularColorSteps 'colorPalette' is undefined or empty");const r=null==e?void 0:e.formatLabels,h=null==e?void 0:e.alpha;return s.map(((e,n)=>{const o=t+n/(s.length-1)*(i-t);return{color:void 0!==h?e.setA(h):e,value:o,label:r?r(o):void 0}}))},nt=(t,i)=>{const s=null!=i?i:t=>t;return{levels:t.steps.map((t=>s({value:t.value},t)))}},ot=t=>t&&"object"==typeof t&&"column"in t&&"row"in t,at=t=>t&&"object"==typeof t&&"z"in t&&"column"in t&&"row"in t,lt=t=>t&&"object"==typeof t&&"position"in t&&"open"in t&&"high"in t&&"isPacked"in t,ut=t=>t&&"object"==typeof t&&"annulus"in t&&"sector"in t,ct=t=>t&&"object"==typeof t&&"index"in t,dt=t=>t&&"object"==typeof t&&"xSize"in t&&"ySize"in t&&"zSize"in t,ft=t=>t&&"object"==typeof t&&"figure"in t&&"positionAndSize"in t,At=t=>t&&"object"==typeof t&&"figure"in t&&"start"in t&&"end"in t&&"median"in t&&"upperQuartile"in t,gt=t=>t&&"object"==typeof t&&"figure"in t&&"x"in t&&"radiusX"in t&&"radiusY"in t,vt=t=>t&&"object"==typeof t&&"figure"in t&&"x"in t&&"coordinates"in t,yt=t=>t&&"object"==typeof t&&"figure"in t&&"startX"in t&&"endX"in t,pt=t=>t&&"object"==typeof t&&"x"in t&&"y"in t,mt=t=>!0===t.isLcjsArtificialEvent,St=(t,i,s,e)=>s<0?t:s>1?i:m(t.getR()+s*(i.getR()-t.getR()),t.getG()+s*(i.getG()-t.getG()),t.getB()+s*(i.getB()-t.getB()),void 0===e?t.getA()+s*(i.getA()-t.getA()):e);var bt;!function(t){t[t.Nearest=0]="Nearest",t[t.NearestX=1]="NearestX",t[t.NearestY=2]="NearestY"}(bt||(bt={}));const xt=(t,i,s,e,r,h,n,o,a,l)=>{const u=t.length;if(0===u)return;const c=e?1:0,d=u-(r?2:1);if(s===bt.Nearest)return Mt(t,i,h,n,c,d);if(s===bt.NearestX||s===bt.NearestY){if("boolean"==typeof l&&("x"===a&&s===bt.NearestX||"y"===a&&s===bt.NearestY))return kt(t,tt(i,n,h),a,l,c,d);if(s===bt.NearestX)return _t(t,tt(i,n,h),o,c,d);if(s===bt.NearestY)return wt(t,tt(i,n,h),o,c,d)}},Mt=(t,i,s,e,r,h)=>{let n,o=Number.MAX_VALUE;for(let a=r;a<=h;a+=1){const r=t[a];if(!Number.isNaN(r.x)&&!Number.isNaN(r.y)){const t=tt(r,s,e),h=(t.x-i.x)**2+(t.y-i.y)**2;h<o&&(o=h,n=a)}}return n},_t=(t,i,s,e,r)=>{if(i.x<s.min.x||i.x>s.max.x)return;let h,n=Number.MAX_VALUE;for(let s=e;s<=r;s+=1){const e=t[s],r=e.x>i.x?e.x-i.x:i.x-e.x;r<n&&!Number.isNaN(e.x)&&!Number.isNaN(e.y)&&(n=r,h=s)}return h},wt=(t,i,s,e,r)=>{if(i.y<s.min.y||i.y>s.max.y)return;let h,n=Number.MAX_VALUE;for(let s=e;s<=r;s+=1){const e=t[s],r=e.y>i.y?e.y-i.y:i.y-e.y;r<n&&!Number.isNaN(e.x)&&!Number.isNaN(e.y)&&(n=r,h=s)}return h},kt=(t,i,s,e,r,h)=>{const n="x"===s,o=n?i.x:i.y,a=t[r],l=t[h],u=a.x<l.x?a.x:l.x,c=a.y<l.y?a.y:l.y,d=a.x>l.x?a.x:l.x,f=a.y>l.y?a.y:l.y;if(n&&(o<u||o>d)||!n&&(o<c||o>f))return;let A=r,g=Math.floor((r+h)/2),v=h,y=-1;for(;;){const i=o-(n?t[g].x:t[g].y);if(i*(e?-1:1)>0)A=Math.min(g+1,v),y=Math.floor((A+v)/2);else{if(0===Math.abs(i))return g;v=Math.max(g-1,A),y=Math.floor((A+v)/2)}if(y===g){const s=g>r?Math.abs(o-(n?t[g-1].x:t[g-1].y)):Ss,e=g<h?Math.abs(o-(n?t[g+1].x:t[g+1].y)):Ss,a=Math.abs(i);switch(Math.min(a,s,e)){case s:return g-1;case e:return g+1;default:return g}}else g=y}},Ct=(t,i,s,e,r,h)=>{const n="x"===s,o=n?i.x:i.y,a=t[r],l=t[h],u=a.x<l.x?a.x:l.x,c=a.y<l.y?a.y:l.y,d=a.x>l.x?a.x:l.x,f=a.y>l.y?a.y:l.y;if(n&&(o<u||o>d)||!n&&(o<c||o>f))return;let A=r,g=Math.floor((r+h)/2),v=h,y=-1;for(;;){const s=o-(n?t[g].x:t[g].y);if(s*(e?-1:1)>0)A=Math.min(g+1,v),y=Math.floor((A+v)/2);else{if(0===Math.abs(s))return{a:g,b:g,lerpAmount:0};v=Math.max(g-1,A),y=Math.floor((A+v)/2)}if(y===g){if(s*(e?-1:1)<0&&g>r){const s=t[g-1],e=t[g];return{a:g-1,b:g,lerpAmount:n?(i.x-s.x)/(e.x-s.x):(i.y-s.y)/(e.y-s.y)}}if(g<h){const s=t[g],e=t[g+1];return{a:g,b:g+1,lerpAmount:n?(i.x-s.x)/(e.x-s.x):(i.y-s.y)/(e.y-s.y)}}return{a:g,b:g,lerpAmount:0}}g=y}};let Tt=0;class Ft{constructor(t,i,s){this.ui=d(!0),this.ci=!1,this.di=!0,this.fi=!1,this.Ai=void 0,this.gi=0,this.D=new Lt,this.yi=t,this.pi=i,this.mi=s,this.Si=Tt,Tt+=1,this.bi=t.xi.highlightColorOffset}Mi(){let t;return this._i("DataPattern",(i=>(t=i.pattern,!0))),"ProgressiveX"===t||"RegressiveX"===t?bt.NearestX:"ProgressiveY"===t||"RegressiveY"===t?bt.NearestY:bt.Nearest}wi(){}addEventListener(t,i,s){this.D.addEventListener(t,i,s)}R(t,i,s,e){this.D.R(t,i,{collectionMember:s,info:e})}removeEventListener(t,i){this.D.removeEventListener(t,i)}ki(t){return void 0!==this.mi.find((i=>i.type===t))}_i(t,i){var s;return!!this.ki(t)&&!0===i(null===(s=this.mi.find((i=>i.type===t)))||void 0===s?void 0:s.args)}dispose(){return this.ci||(this.yi.Ci(this),this.ci=!0,this.pi(this),this.D.R("dispose",{})),this}isDisposed(){return this.ci}setVisible(t){const i=this.di;return this.di=t,!t&&i&&this.ui.T()&&this.yi.Ci(this),this}getVisible(){return this.di}setPointerEvents(t){const i=this.ui.T();return this.ui.C(t),t||i&&this.yi.Ci(this),this}getPointerEvents(){return this.ui.T()}Ti(t){return this.Ai=t,this}Fi(){return this.Ai?this.Ai:It}Ii(t){return this.gi=t,this}Pi(){return this.gi}Li(t){return this.bi=t,this}Bi(){return this.bi}}const It=u(h(0,0),h(0,0)),Pt={click:!0,contextmenu:!0,dblclick:!0,gotpointercapture:!0,lostpointercapture:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,wheel:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0};class Lt{constructor(){this.Di=new Array,this.Ei=[],this.ui=!0,this.Ri=!1,this.Oi=new Map}setPointerEvents(t){this.ui=t,this.Ei.forEach((i=>i.setPointerEvents(t)))}getPointerEvents(){return this.ui}addEventListener(t,i,s){this.Di.push({listener:i,key:t,options:s||{}})}removeEventListener(t,i){const s=this.Di.findIndex((t=>t.listener===i));s>=0&&this.Di.splice(s,1)}set draggable(t){this.Ri=t,this.Ei.forEach((i=>{i.fi=t}))}get draggable(){return this.Ri}R(t,i,s=void 0){const e=this.Di.slice();for(let r=e.length-1;r>=0;r-=1){const h=e[r];h.key===t&&(h.listener(i,s),!0===h.options.once&&this.removeEventListener(t,h.listener))}}zi(t,i){const s=[];Object.keys(Pt).forEach((e=>{const r=(t,s)=>{const r=Bt(t)?{clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY}:t,h=(null==i?void 0:i.getExtraData)&&void 0!==r.clientX?i.getExtraData(r,s.collectionMember,s.info):{};this.R(e,t,h),!t.defaultPrevented&&(null==i?void 0:i.continueIfNotPrevented)&&i.continueIfNotPrevented(e,t,h)};t.addEventListener(e,r),s.push((()=>t.removeEventListener(e,r)))})),this.Ei.push(t);const e=()=>{const i=this.Ei.indexOf(t);i>=0&&this.Ei.splice(i,1),s.forEach((t=>t()))};t.addEventListener("dispose",e),s.push((()=>t.removeEventListener("dispose",e))),this.Oi.set(t,(()=>{s.forEach((t=>t()))})),t.fi=this.Ri,t.setPointerEvents(this.ui)}Vi(){this.Oi.forEach((t=>t())),this.Oi.clear(),this.Ei.length=0}Ni(t,i){const s=[];Object.keys(Pt).forEach((e=>{const r=(t,s)=>{const r=i(s.collectionMember);r&&this.R(e,t,r)};t.addEventListener(e,r),s.push((()=>t.removeEventListener(e,r)))})),this.Ei.push(t);const e=()=>{const i=this.Ei.indexOf(t);i>=0&&this.Ei.splice(i,1),s.forEach((t=>t()))};t.addEventListener("dispose",e),s.push((()=>t.removeEventListener("dispose",e))),this.Oi.set(t,(()=>{s.forEach((t=>t()))})),t.setPointerEvents(this.ui),t.fi=this.Ri}Gi(t){Object.keys(Pt).forEach((i=>{t.addEventListener(i,((t,s)=>{this.R(i,t,s)}))})),t.setPointerEvents(this.ui),t.draggable=this.Ri}}const Bt=t=>!(!t||"object"!=typeof t||!("touches"in t)),Dt={linear:(t,i,s)=>{const e=i-t;return r=>r<s?t+e/s*r:i},easeIn:(t,i,s)=>e=>e<s?t+Math.abs(2*(Math.sqrt(.5)*e/s)**2)*(i-t):i,easeOut:(t,i,s)=>e=>e<s?t+Math.abs(1-2*(Math.sqrt(.5)*(1-e/s))**2)*(i-t):i,ease:(t,i,s)=>e=>e<s?t+(e<s/2?.5*(e/s*2)**2.5:.5+.5*(1-(1-2*(e/s-.5))**2.5))*(i-t):i,logarithmic:t=>{const i=Ni(t);return(s,e,r)=>{const h=i(s),n=i(e);return i=>i<r?t**(h+Math.abs(1-2*(Math.sqrt(.5)*(1-i/r))**2)*(n-h)):e}}};class Et{constructor(t,i,s,e=Dt.linear,r){this.delta=0,this.nextAnimations=new Array,this.$i=!1,this.easing=Dt.linear,this.isOver=()=>(this.delta===this.duration||this.$i)&&0===this.nextAnimations.length,this.D=new Lt,this.values=t,this.action=i,this.duration=s,this.easing=e,this.Ui=r,this.eases=t.map((([t,i])=>e(t,i,s)))}ji(){this.D.R("start",{})}start(){return this.Ui.includes(this)||this.Ui.push(this),this}addNextAnimations(t){return t instanceof Array?t.forEach((t=>this.nextAnimations.push(t))):this.nextAnimations.push(t),this}NextAnimation(t,i,s=this.duration,e=this.easing){const r=new Et(t,i,s,e,this.Ui);return this.nextAnimations.push(r),r}finish(t=!0){if(this.$i=!0,this.Ui.splice(this.Ui.indexOf(this),1),this.nextAnimations.length>0){const i=this.nextAnimations[0];return t&&this.D.Di.forEach((t=>{"allAnimationEnd"===t.key&&i.addEventListener("allAnimationEnd",t.listener),"everyAnimationEnd"===t.key&&i.addEventListener("everyAnimationEnd",t.listener)})),i.addNextAnimations(this.nextAnimations.slice(1)),i.start(),t&&(this.D.R("end",{nextAnimation:i}),this.D.R("everyAnimationEnd",{nextAnimation:i})),i}t&&(this.D.R("end",{nextAnimation:void 0}),this.D.R("everyAnimationEnd",{nextAnimation:void 0}),this.D.R("allAnimationEnd",{}))}finishAll(t=!0){let i=this;for(;i;)i=i.finish(t)}getFinalValues(){return this.nextAnimations.length>0?this.nextAnimations[this.nextAnimations.length-1].values.map(hi):this.values.map(hi)}getTimeUntilFinish(){let t=this.duration-this.delta;for(let i=0;i<this.nextAnimations.length;i+=1)t+=this.nextAnimations[i].duration-this.nextAnimations[i].delta;return t}addEventListener(t,i,s){this.D.addEventListener(t,i,s)}removeEventListener(t,i){this.D.removeEventListener(t,i)}}const Rt=(t,i=60)=>{i>60&&console.log("Note: Animator FPS is usually capped at 60 by the browser!");const s=[];let e,r,h=0;const n=()=>{e=void 0;const o=Date.now();r=r||o,h=o-r,h/1e3>=1/i&&(r=Date.now()-h%(1e3/i),s.forEach((t=>{0===t.delta&&t.ji(),t.delta+=h-h%(1e3/i),t.delta>t.duration&&(t.delta=t.duration),t.action(t.eases.map((i=>i(t.delta)))),t.delta===t.duration&&t.finish()})),t()),s.length>0?e=si.requestAnimationFrame(n):(e=void 0,r=void 0)};return(t=1e3,i=Dt.linear)=>(r,h,o=t)=>{const a=new Et(r,h,o,i,s).start();return e||(e=si.requestAnimationFrame(n)),a}};var Ot;!function(t){t[t.Fill=0]="Fill",t[t.Fit=1]="Fit",t[t.Stretch=2]="Stretch",t[t.Center=3]="Center",t[t.Tile=4]="Tile"}(Ot||(Ot={}));const zt=i({type:"fillstyle",fillType:"image",source:void 0,surroundingColor:m(0,0,0,0),sourceMissingColor:m(0,0,0,0),fitMode:Ot.Fill});class Vt extends zt{constructor(t){super(t)}setSource(t){return this.set("source",t)}getSource(){return this.get("source")}setSurroundingColor(t){return p(t)?this.set("surroundingColor",t):this.set("surroundingColor",t(this.get("surroundingColor")))}getSurroundingColor(){return this.get("surroundingColor")}setSourceMissingColor(t){return p(t)?this.set("sourceMissingColor",t):this.set("sourceMissingColor",t(this.get("sourceMissingColor")))}getSourceMissingColor(){return this.get("sourceMissingColor")}setFitMode(t){return this.set("fitMode",t)}getFitMode(){return this.get("fitMode")}toString(){return`imagefill:${this.fitMode}`}toCSS(){return`url(${this.getSource().src})`}}const Nt=t=>!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"image"===t.fillType),Gt=i({type:"linestyle",lineType:"empty"}),$t=new class extends Gt{constructor(){super(...arguments),this.thickness=0}setThickness(t){return this}getThickness(){return 0}Yi(){return 0}setFillStyle(t){return this}getFillStyle(){return _e}},Ut=t=>!(!t||"object"!=typeof t||!("lineType"in t)||"empty"!==t.lineType),jt=-34028234663852886e22,Yt="-340282346638528859811704183484516925440.0";var Ht,Wt,Xt,Zt;!function(t){t[t.Content=0]="Content",t[t.PaddedContent=1]="PaddedContent",t[t.PaddedBackground=2]="PaddedBackground",t[t.Everything=3]="Everything"}(Ht||(Ht={})),function(t){t[t.never=0]="never",t[t.always=1]="always",t[t.whenHovered=2]="whenHovered",t[t.whenDragged=3]="whenDragged",t[t.whenNotDragged=4]="whenNotDragged",t[t.whenHoveredOrDragged=5]="whenHoveredOrDragged"}(Wt||(Wt={})),function(t){t[t.notDraggable=0]="notDraggable",t[t.draggable=1]="draggable",t[t.onlyHorizontal=2]="onlyHorizontal",t[t.onlyVertical=3]="onlyVertical"}(Xt||(Xt={})),function(t){t[t.Up=0]="Up",t[t.Right=1]="Right",t[t.Down=2]="Down",t[t.Left=3]="Left"}(Zt||(Zt={}));const Jt=t=>"getHighlight"in t&&"setHighlight"in t,Qt=(t,i,s)=>void 0===t||"number"==typeof t||"string"==typeof t?t:Array.isArray(t)?t.slice(i,s):t.subarray(i,s),Kt=(...t)=>{const i=t=>t&&"object"==typeof t&&!Array.isArray(t);return t.reduce(((t,s)=>s?(Object.keys(s).forEach((e=>{const r=t[e],h=s[e];i(r)&&i(h)?t[e]=Kt(r,h):t[e]=h})),t):t),{})},qt=t=>{if(t.resourcesBaseUrl){const i=t.styleFactory(t.resourcesBaseUrl),s=Nt(i)&&i.getSource(),e=s&&s instanceof Image?s:void 0;return null==e||e.addEventListener("error",(()=>{os(t.resourcesBaseUrl,e.src,"Theme resource",{shouldCrash:!1})})),i}const i=`${si.location.origin}/resources`,s=t.styleFactory(i);if(Nt(s)){const i=s.getSource();i instanceof Image&&i.addEventListener("error",(()=>{const s=t.styleFactory("https://lcjs-resources.lightningchart.com/v1"),e=Nt(s)&&s.getSource(),r=e&&e instanceof Image?e:void 0;si.console.warn("LightningChart JS warning | fallbacking to publicly hosted asset resources.\nFor more information, please see https://lightningchart.com/js-charts/docs/troubleshooting/warning-using-publicly-hosted-resources/"),null==r||r.addEventListener("load",(()=>{t.apply(s)})),null==r||r.addEventListener("error",(()=>{os(t.resourcesBaseUrl,i.src,"Theme resource",{shouldCrash:!1})}))}))}return s};let ti=0;const ii=()=>{const t=Date.now().toString(36),i=(1048575&ti++).toString(36);return`${t}-${Math.floor(4294967295*Math.random()).toString(36)}-${i}`},si="undefined"!=typeof window?window:"undefined"!=typeof global&&global._lcjs?global._lcjs:{},ei=(t,i)=>t.x===i.x&&t.y===i.y,ri=t=>t!==Ss&&t!==bs&&!Number.isNaN(t)&&Number.isFinite(t)&&t!==1/0&&t!==-1/0,hi=t=>t[1],ni=t=>t.dispose(),oi=()=>{},ai=(t,i)=>t===i,li=(t,i,s)=>s>i?Math.min(Math.max(t,i),s):Math.min(Math.max(t,s),i),ui=t=>Array.prototype.concat.apply([],t),ci=(t,i)=>void 0===t||Number.isNaN(t)?i:t,di=t=>t.Hi(),fi=t=>t.Wi(),Ai=t=>t.Xi(),gi=t=>t.Zi(),vi=t=>t.min.x,yi=t=>t.max.x,pi=t=>t.min.y,mi=t=>t.max.y,Si=(t,i,s,e,r)=>{if(t.length>0){let h=r?e(r):void 0;for(let e=0;e<t.length;e+=1){const r=i(t[e]);void 0!==r&&(h=void 0!==h?s(h,r):r)}return h}if(r)return e(r)},bi=h(0,1),xi=h(1,0),Mi=h(0,-1),_i=h(-1,0),wi=h(0,0),ki=t=>{switch(t){case Zt.Up:return bi;case Zt.Right:return xi;case Zt.Down:return Mi;case Zt.Left:return _i;default:return wi}},Ci=t=>t===Zt.Left||t===Zt.Right,Ti=t=>{t.stopPropagation(),t.preventDefault()},Fi=(t,i)=>{if(!i)return t;const s=t.length,e=new Float32Array(2*s);let r=0;for(let i=0;i<s;i+=1){const s=t[i],h=Math.fround(s);e[r+0]=h,e[r+1]=s-h,r+=2}return e},Ii=(t,i,s=Float32Array)=>{if(!i){const i=t.length,e=new s(2*i);let r=0;for(let s=0;s<i;s+=1){const i=t[s];e[r+0]=i.x,e[r+1]=i.y,r+=2}return e}const e=t.length,r=new s(4*e);let h=0;for(let i=0;i<e;i+=1){const s=t[i],e=Math.fround(s.x),n=Math.fround(s.y);r[h+0]=e,r[h+1]=n,r[h+2]=s.x-e,r[h+3]=s.y-n,h+=4}return r},Pi=(t,i)=>{if(!i){const i=t.length,s=new Float32Array(3*i);let e=0;for(let r=0;r<i;r+=1){const i=t[r];s[e+0]=i.x,s[e+1]=i.y,s[e+2]=i.z,e+=3}return s}const s=t.length,e=new Float32Array(6*s);let r=0;for(let i=0;i<s;i+=1){const s=t[i],h=Math.fround(s.x),n=Math.fround(s.y),o=Math.fround(s.z);e[r+0]=h,e[r+1]=n,e[r+2]=o,e[r+3]=s.x-h,e[r+4]=s.y-n,e[r+5]=s.z-o,r+=6}return e},Li=(t,i,s,e,r)=>t||i||s||e?!t||i||s||e||r?t||!i||s||e||r?t||i||!s||e||r?t||i||s||!e||r?(h,n,o)=>{const a=3+(r?3:0)+(t?4:0)+(i?1:0)+(s?1:0)+(e?3:0),l=h.length,u=new Float32Array(l*a);let c=0,d=c;if(r){for(let t=0;t<l;t+=1){const i=h[t],s=Math.fround(i.x),e=Math.fround(i.y),r=Math.fround(i.z);u[d+0]=s,u[d+1]=e,u[d+2]=r,u[d+3]=i.x-s,u[d+4]=i.y-e,u[d+5]=i.z-r,d+=a}c+=6}else{for(let t=0;t<l;t+=1){const i=h[t];u[d+0]=i.x,u[d+1]=i.y,u[d+2]=i.z,d+=a}c+=3}if(t){const t=o&&Pe(o)&&o.getFallbackColor()||C;d=c;for(let i=0;i<l;i+=1){const s=h[i].color||t;u[d+0]=s.r,u[d+1]=s.g,u[d+2]=s.b,u[d+3]=s.a,d+=a}c+=4}if(i){const t=n&&n.getSize();let i=1;"number"==typeof t&&(i=t),d=c;for(let t=0;t<l;t+=1){const s=h[t],e=void 0!==s.size?s.size:i;u[d+0]=e,d+=a}c+=1}if(s){d=c;for(let t=0;t<l;t+=1){const i=h[t];u[d+0]=void 0!==i.value?i.value:jt,d+=a}c+=1}if(e){const t=n&&n.getSize();let i={x:1,y:1,z:1};"object"==typeof t&&(i=t),d=c;for(let t=0;t<l;t+=1){const s=h[t],e=void 0!==s.sizeAxisX?s.sizeAxisX:i.x,r=void 0!==s.sizeAxisY?s.sizeAxisY:i.y,n=void 0!==s.sizeAxisZ?s.sizeAxisZ:i.z;u[d+0]=e,u[d+1]=r,u[d+2]=n,d+=a}c+=3}return u}:(t,i,s)=>Bi(t,i):(t,i,s)=>Ri(t):(t,i,s)=>Ei(t,i):(t,i,s)=>Di(t,s):(t,i,s)=>Pi(t,r),Bi=(t,i)=>{const s=i&&i.getSize();let e={x:1,y:1,z:1};"object"==typeof s&&(e=s);const r=t.length,h=new Float32Array(6*r);let n=0;for(let i=0;i<r;i+=1){const s=t[i];h[n+0]=s.x,h[n+1]=s.y,h[n+2]=s.z;const r=void 0!==s.sizeAxisX?s.sizeAxisX:e.x,o=void 0!==s.sizeAxisY?s.sizeAxisY:e.y,a=void 0!==s.sizeAxisZ?s.sizeAxisZ:e.z;h[n+3]=r,h[n+4]=o,h[n+5]=a,n+=6}return h},Di=(t,i)=>{const s=i&&Pe(i)&&i.getFallbackColor()||C,e=t.length,r=new Float32Array(7*e);for(let i=0,h=0;i<e;i+=1){const e=t[i];r[h+0]=e.x,r[h+1]=e.y,r[h+2]=e.z;const n=e.color||s;r[h+3]=n.r,r[h+4]=n.g,r[h+5]=n.b,r[h+6]=n.a,h+=7}return r},Ei=(t,i)=>{const s=i&&i.getSize();let e=1;"number"==typeof s&&(e=s);const r=t.length,h=new Float32Array(4*r);for(let i=0,s=0;i<r;i+=1){const r=t[i];h[s+0]=r.x,h[s+1]=r.y,h[s+2]=r.z;const n=void 0!==r.size?r.size:e;h[s+3]=n,s+=4}return h},Ri=t=>{const i=t.length,s=new Float32Array(4*i);for(let e=0,r=0;e<i;e+=1){const i=t[e];s[r+0]=i.x,s[r+1]=i.y,s[r+2]=i.z,s[r+3]=void 0!==i.value?i.value:jt,r+=4}return s},Oi=t=>i=>{const s=t.indexOf(i);s>=0&&t.splice(s,1)},zi=(t,i,s)=>{const e=((t,i)=>{if(i<Ss&&i>bs&&t<Ss&&t>bs){const s=Math.abs(t/2**23),e=Math.abs(i/2**23),r=Math.min(s,e);return 10**Math.floor(Math.log10(r))}})(t,i);if(void 0!==e)return e*s},Vi=t=>{let i=t.length;for(let s=0;s<i-1;s+=1)t[s].x===t[s+1].x&&t[s].y===t[s+1].y&&(t.splice(s,1),s-=1,i-=1);return t},Ni=t=>{const i=Math.log(t);return t=>Math.log(t)/i},Gi=Ni(Math.E),$i=(t,i)=>{const s=i[t];return s?s():void 0},Ui=(t,i)=>{let s;if(i)s=i;else{const i={x:0,y:0};for(let s=0;s<t.length;s+=1)i.x+=t[s].x/t.length,i.y+=t[s].y/t.length;s=i}return t.sort(((t,i)=>ee(Js(t,s))-ee(Js(i,s))))},ji=(t,i,s)=>{if(0===t.length)return!1===s.canReturnB?i.slice():i;const e=i.length;if(e<1e5)return t.push.apply(t,i),t;for(let s=0;s<e;s+=1)t.push(i[s]);return t},Yi=t=>255===t.getA()?t:t.setA(255),Hi=(()=>{const t=m(0,0,0);return i=>(i=Yi(i),new G({angle:180,stops:[{offset:0,color:i},{offset:1,color:St(i,t,.5)}]}))})(),Wi=(()=>{const t=(t,i)=>{var s;if(t){if(Fe(t)){if(0===t.getColor().getA())return;return t.getColor()}if(V(t)||$(t)){const i=t.getColorStops();return 2===i.length?i[1].color:null===(s=i[0])||void 0===s?void 0:s.color}return De(t)&&void 0!==i?t.lut.getColors(i,void 0):void 0}};return(i,s,e)=>{var r;const h=[];if(e.fill&&h.push(e.fill),e.fill2&&h.push(e.fill2),e.stroke){const t=e.stroke.getFillStyle();t!==_e&&("stroke"===(null===(r=e.behavior)||void 0===r?void 0:r.priority)?h.unshift(t):h.push(t))}if(e.point3D){const t=e.point3D;h.push(t.getFillStyle())}let n;if(e.behavior&&!0===e.behavior.colorStep){const[s,r]=h.reduce(((i,s)=>{if(i[0]&&i[1])return i;const r=t(s,e.lutValue);return r&&(void 0===i[0]?i[0]=r:i[1]=r),i}),[void 0,void 0]);n=s&&r?(o=s)===(a=r)||o.getR()===a.getR()&&o.getG()===a.getG()&&o.getB()===a.getB()?Hi(o):(o=Yi(o),a=Yi(a),new G({angle:0,stops:[{offset:0,color:a},{offset:.5,color:a},{offset:.5,color:o},{offset:1,color:o}]})):i.uiButtonFillStyle}else{const r=h.reduce(((i,s)=>i||t(s,e.lutValue)),void 0);n=r?s?new Te({color:r}):Hi(r):i.uiButtonFillStyle}var o,a;return n}})(),Xi=(t,i)=>{const s=t;if(De(s))return{lut:s.getPalette(),lookUpProperty:s.getLookUpProperty(),valueRange:i}},Zi=t=>{let i=0;return()=>(i+=1,`${t}-${i}`)},Ji=(t,i)=>{let s="string"==typeof t?t:String(t);const e=s.indexOf(".");let r=e>=0?e:s.length;for(;r<i;r+=1)s=`0${s}`;return s},Qi=(t,i)=>"function"==typeof t?t(i):t,Ki=(t,i)=>i(),qi=()=>new Error("LightningChart JS encountered an unexpected error.\nPlease report this issue to https://lightningchart.com/js-charts/docs/contact"),ts=t=>t===xs||t.min.x===xs.min.x&&t.max.x===xs.max.x&&t.min.y===xs.min.y&&t.max.y===xs.max.y,is=t=>Array.from(new Set(t)),ss=t=>t.filter((t=>void 0!==t)),es=t=>"boolean"==typeof t?t?1:0:t>1?1:t<0?0:t,rs=(t,i)=>{throw new Error(i)},hs=t=>{let i;return()=>i||(i=t(),i)},ns=t=>{if(t===$t)return 0;const i=t.getThickness();return i<0?1:1*i},os=(t,i,s,e)=>{const r=`LightningChart JS Resources not found.\nresourcesBaseUrl: "${t}"\ninitiator: ${s}\nresource url: ${i}\nFor more information, please see https://lightningchart.com/js-charts/docs/troubleshooting/error-resources-not-found/`;if(e.shouldCrash)throw si.alert(r),new Error(r);si.console.warn(r)},as=(t,i,s,e=0)=>{if(t<s(e)||s(i)<t)return;const r=i;for(;e!==i;){const r=Math.ceil((e+i)/2);t<s(r)?i=r-1:e=r}const h=Math.abs(t-s(e));return e<r&&Math.abs(t-s(e+1))<h?e+1:e},ls=()=>{const t=new Map;return{Ji:i=>(Object.keys(Pt).forEach((s=>{i.addEventListener(s,((i,e)=>{const r=e.collectionMember&&t.get(e.collectionMember);if(!r)return;const h=Bt(i)?{clientX:i.changedTouches[0].clientX,clientY:i.changedTouches[0].clientY}:i,n=r.Qi(e.info,h,e.collectionMember);r.D.R(s,i,n)}))})),i),Ki:(i,s)=>{t.set(i,s)},Vi:()=>{t.clear()}}},us={left:0,right:0,top:0,bottom:0},cs=()=>Math.round(Math.random()*Number.MAX_SAFE_INTEGER),ds=(t,i,s)=>{i&&i.qi();const e=s();return Object.keys(e).forEach((i=>{const s=i,r=e[s];t.addEventListener(s,r)})),{ts:t,qi:()=>{Object.entries(e).forEach((([i,s])=>{const e=i,r=s;t.removeEventListener(e,r)}))}}},fs=(t,i,s)=>{let e;const r=()=>(e=s(),e),h={...t,resolve:()=>e||r()};for(const t of Object.keys(i))Object.defineProperty(h,t,{get:function(){return e?e[t]:r()[t]}});return h},As=t=>{if(t)return"resolve"in t?t.resolve():t},gs=t=>{let i=t;return{es:t=>{const s=i;return i=s+t,[s,t]}}},vs=t=>{const i=Date.now();si.document.body.addEventListener(t,(t=>{Date.now()-i>500||(t.stopPropagation(),t.preventDefault())}),{once:!0,capture:!0})},ys=()=>{const t=si.performance.now();si.document.body.addEventListener("contextmenu",(i=>{si.performance.now()-t>5e3||i.preventDefault()}),{once:!0})},ps=()=>{const t=si.performance.now();si.document.body.addEventListener("touchstart",(i=>{si.performance.now()-t>5e3||i.preventDefault()}),{once:!0})},ms={add:(t,i)=>a(t.x+i,t.y+i,t.z+i),addVec(t,...i){const s={x:t.x,y:t.y,z:t.z};for(const t of i)s.x+=t.x,s.y+=t.y,s.z+=t.z;return s},subtract:(t,i)=>a(t.x-i,t.y-i,t.z-i),subtractVec(t,...i){const s={x:t.x,y:t.y,z:t.z};for(const t of i)s.x-=t.x,s.y-=t.y,s.z-=t.z;return s},multiply:(t,i)=>a(t.x*i,t.y*i,t.z*i),divide:(t,i)=>a(t.x/i,t.y/i,t.z/i),multiplyVec(t,...i){const s={x:t.x,y:t.y,z:t.z};for(const t of i)s.x*=t.x,s.y*=t.y,s.z*=t.z;return s},divideVec(t,...i){const s={x:t.x,y:t.y,z:t.z};for(const t of i)s.x/=t.x,s.y/=t.y,s.z/=t.z;return s},length:t=>Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z),normalize:t=>ms.divide(t,ms.length(t)),dot:(t,i)=>t.x*i.x+t.y*i.y+t.z*i.z,cross:(t,i)=>a(t.y*i.z-t.z*i.y,t.z*i.x-t.x*i.z,t.x*i.y-t.y*i.x),angle:(t,i)=>Math.acos(ms.dot(t,i)/(ms.length(t)*ms.length(i))),rotateAroundAxis(t,i,s){const e=Math.cos(s),r=Math.sin(s),h=ms.dot(i,t),n=ms.cross(i,t);return ms.addVec(ms.multiply(t,e),ms.addVec(ms.multiply(i,(1-e)*h),ms.multiply(n,r)))},lerp:(t,i,s)=>(s=li(s,0,1),ms.addVec(ms.multiply(t,1-s),ms.multiply(i,s))),equals:(t,i)=>ai(t.x,i.x)&&ai(t.y,i.y)&&ai(t.z,i.z),abs:t=>({x:Math.abs(t.x),y:Math.abs(t.y),z:Math.abs(t.z)}),sign:t=>({x:Math.sign(t.x),y:Math.sign(t.y),z:Math.sign(t.z)})},Ss=Number.MAX_VALUE,bs=-Number.MAX_VALUE,xs=u(h(Ss,Ss),h(bs,bs)),Ms=u(a(Ss,Ss,Ss),a(bs,bs,bs)),_s=(t,i)=>{const s=Math.log(t)/Math.log(i);return Math.floor((t=>(Math.ceil(t)-t<1e-4?t=Math.ceil(t):t-Math.floor(t)<1e-4&&(t=Math.floor(t)),t))(s))},ws=(t,i)=>!(i.min.x>t.max.x||i.max.x<t.min.x||i.min.y>t.max.y||i.max.y<t.min.y),ks=(t,i)=>!(t[1].x<i[0].x||t[0].x>i[1].x||t[3].y<i[0].y||t[0].y>i[3].y),Cs=(t,i)=>({min:{x:Math.min(t[0].x,i[0].x),y:Math.min(t[0].y,i[0].y)},max:{x:Math.max(t[2].x,i[2].x),y:Math.max(t[2].y,i[2].y)}}),Ts=t=>{const i=t.length;for(let s=0;s<i;s+=1)for(let e=s+1;e<i;e+=1)if(ws(t[s],t[e]))return!0;return!1},Fs=(t,i)=>i+t,Is=(t,i,s)=>{const e=Js(i,t),r=e.x*e.x+e.y*e.y;if(0===r)return t;const n=Js(s,t),o=(n.x*e.x+n.y*e.y)/r;return o<=0?t:o>=1?i:h(t.x+o*e.x,t.y+o*e.y)},Ps=(t,i,s)=>s>i?t>=i&&t<=s:t>=s&&t<=i,Ls=(t,i)=>{const s=t.x-i.x,e=t.y-i.y;return Math.sqrt(s*s+e*e)},Bs=(t,i)=>{const s=t.x-i.x,e=t.y-i.y;return s*s+e*e},Ds=(t,i,s)=>{let e=s.x-i.x,r=s.y-i.y;const h=e*e+r*r;if(h<.01)return Number.MAX_VALUE;const n=((t.x-i.x)*e+(t.y-i.y)*r)/h,o=i.x+n*e,a=i.y+n*r;return e=t.x-o,r=t.y-a,e*e+r*r},Es=(t,i,s)=>Zs(t,Xs(Js(i,t),s)),Rs=(t,i,s)=>ms.addVec(t,ms.multiply(ms.subtractVec(i,t),s));function Os(t){const i=t.length;if(i>0){let s=t[0].x,e=t[0].x,r=t[0].y,n=t[0].y;for(let h=1;h<i;h+=1){const i=t[h];i.x>s&&(s=i.x),i.x<e&&(e=i.x),i.y>r&&(r=i.y),i.y<n&&(n=i.y)}return u(h(e,n),h(s,r))}return xs}function zs(t){const i=t.length;if(i>0){let s=t[0].x,e=t[0].x,r=t[0].y,h=t[0].y,n=t[0].z,o=t[0].z;for(let a=0;a<i;a+=1){const i=t[a];i.x>s&&(s=i.x),i.x<e&&(e=i.x),i.y>r&&(r=i.y),i.y<h&&(h=i.y),i.z>n&&(n=i.z),i.z<o&&(o=i.z)}return u(a(e,h,o),a(s,r,n))}return Ms}const Vs=(...t)=>{const i={min:{x:Ss,y:Ss},max:{x:bs,y:bs}};for(const s of t)i.min.x=i.min.x<s.min.x?i.min.x:s.min.x,i.max.x=i.max.x>s.max.x?i.max.x:s.max.x,i.min.y=i.min.y<s.min.y?i.min.y:s.min.y,i.max.y=i.max.y>s.max.y?i.max.y:s.max.y;return i},Ns=(t,i)=>u(a(t.min.x<i.min.x?t.min.x:i.min.x,t.min.y<i.min.y?t.min.y:i.min.y,t.min.z<i.min.z?t.min.z:i.min.z),a(t.max.x>i.max.x?t.max.x:i.max.x,t.max.y>i.max.y?t.max.y:i.max.y,t.max.z>i.max.z?t.max.z:i.max.z));function Gs(t,i,s,e){const r=t.x-e.x,h=t.y-e.y,n=e.x-s.x,o=s.y-e.y,a=o*r+n*h,l=(e.y-i.y)*r+(i.x-e.x)*h,u=o*(i.x-e.x)+n*(i.y-e.y);return u<0?a<=0&&l<=0&&a+l>=u:a>=0&&l>=0&&a+l<=u}const $s=(t,i,s)=>!(t.x>s.x||t.y>s.y||t.x<i.x||t.y<i.y);function Us(t,i,s){return h(Math.cos(s)*(t.x-i.x)+Math.sin(s)*(t.y-i.y)+i.x,-Math.sin(s)*(t.x-i.x)+Math.cos(s)*(t.y-i.y)+i.y)}function js(t,i){return h(t.x-i.x,t.y-i.y)}function Ys(t){const i=Ws(t);return 0===i?h(0,0):h(t.x/i,t.y/i)}function Hs(t,i){let s={x:i.x-t.x,y:i.y-t.y};s=Ys(s);const e=Math.PI/2,r=s.x;return s.x=-Math.sin(e)*s.y,s.y=r*Math.sin(e),s}function Ws(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function Xs(t,i){return h(t.x*i,t.y*i)}function Zs(t,i){return h(t.x+i.x,t.y+i.y)}function Js(t,i){return h(t.x-i.x,t.y-i.y)}function Qs(t,i){return h(t.x*i.x,t.y*i.y)}function Ks(t,i){return h(t.x/i.x,t.y/i.y)}function qs(t){return Xs(t,-1)}function te(t,i){return t.x*i.x+t.y*i.y}const ie=(t,i,s)=>{const e=(s.y-i.y)/(s.x-i.x),r=i.y+(t-i.x)*e;return h(t,r)};function se(t){return t*Math.PI/180}function ee(t){return 180*Math.atan2(t.y,t.x)/Math.PI}function re(t){return h(Math.cos(t),Math.sin(t))}const he=(t,i,s,e)=>{let r,n,o,a;if(i.x-t.x!=0||e.x-s.x!=0)return i.x-t.x==0?(o=i.x,n=(e.y-s.y)/(e.x-s.x),a=n*(o-s.x)+s.y):e.x-s.x==0?(o=e.x,r=(i.y-t.y)/(i.x-t.x),a=r*(o-t.x)+t.y):(r=(i.y-t.y)/(i.x-t.x),n=(e.y-s.y)/(e.x-s.x),o=(s.y-n*s.x+r*t.x-t.y)/(r-n),a=r*(o-t.x)+t.y),h(o,a)},ne=(t,i)=>{const s=t.length,e=i.length,r=new Uint16Array(s+e);return r.set(t,0),r.set(i,s),r};class oe extends H{constructor(t,i,s,e){super(t,i,s,e),this.rs={internal:10,function:ae(10),number:10},this.j=1e3,this.Z(1,1e3),this.st=this.hs()}nt(t,i,s,e,r){if(t===i)return!1;const h=Math.min(t,i)<ue,n=Math.max(t,i)>ce;return!h&&!n||!!r&&(i>t?{start:h?ue:t,end:n?ce:i}:{start:n?ce:t,end:h?ue:i})}Rt(t){const i=this.wt(),s=this.kt(),e=Math.max(t,ue);return i+(this.rs.function(e)-this.st.scaleStartLog)/this.st.scaleIntervalLog*(s-i)}Ot(t){const i=this.wt(),s=(t-i)/(this.kt()-i),e=this.st.scaleStartLog+s*this.st.scaleIntervalLog;return this.rs.number**e}Lt(){this.rs&&this.hs()}Z(t,i){return super.Z(t,i),this.rs&&this.hs(),this}_t(t){return super._t(t),this.rs&&this.hs(),this}K(t){return super.K(t),this.rs&&this.hs(),this}ns(t){return this.rs={internal:t,function:ae(t),number:le(t)},this}ls(){return this.rs.internal}Qt(t,i){const s=this.Rt(t)+i;return this.Ot(s)}Et(){return this.ct||this.ot||this.ft||this.ut}hs(){const t=this.rs.function(this.$),i=this.rs.function(this.U)-t,s=2*this.wt()/this.j-1,e=2*this.kt()/this.j-1-s;return this.st={scaleStartLog:t,scaleIntervalLog:i,viewportStart:s,viewportSize:e},this.st}ht(){return this.st}}const ae=t=>"e"===t?Gi:Ni(t),le=t=>"e"===t?Math.E:t,ue=.9*10**-20,ce=1.1*10**25,de=[{prefix:"T",unit:10**12},{prefix:"B",unit:10**9},{prefix:"M",unit:1e6},{prefix:"K",unit:1e3}],fe=(t,i,s)=>{const e=Math.abs(s-i);if(0===e)return t.toFixed(0);const r=Math.max(2-_s(e,10),0);return t.toFixed(r)},Ae={Numeric:(t,i)=>{const{start:s,end:e}=i;return fe(t,s,e)},NumericUnits:(t,i)=>{const{start:s,end:e}=i,r=Math.abs(e-s),h=t<0;t=Math.abs(t);let n="",o="";if(r>=1e3&&t>1e3){let i="";for(const s of de){const e=Math.round(1e3*t/s.unit)/1e3;if(e>=1){i=e.toString(),o=s.prefix;break}}n=(h?"-":"")+i}else{let i=String(Math.floor(t));const s=_s(t,1e3);for(let t=1;t<=s;t+=1){const s=i.length-(3*t+(t-1));i=`${i.substring(0,s)} ${i.substring(s,i.length)}`}n=(h?"-":"")+i+(r<=10?((t,i)=>{if(0===i)return"";let s=(Math.abs(t)-Math.abs(Math.floor(t))).toString().substring(1);return s.length>i&&(s=s.substring(0,i+1)),s})(t,2-_s(r,10)):"")}return n+=o,n},LogarithmicExponentsRounded:(t,i,s,e=10)=>{const r=ae(e)(t);return`${e}${ge(r)}`},LogarithmicExponents:(t,i,s,e=10)=>{const r=ae(e),h=Math.floor(r(t)),n=t/le(e)**h;return`${Math.round(n)}×${e}${ge(h)}`},LogarithmicExtreme:(t,i,s,e=10)=>{const r=ae(e),h=Math.floor(r(t));return`${(t/le(e)**h).toFixed(2)}×${e}${ge(h)}`},LogarithmicNoExponents:(t,i,s,e=10)=>{const r=ae(e);if("e"===e)return`${Math.floor(r(t))}e`;const h=t.toString();if(t>1)return h;const n=Math.floor(r(t));return t.toFixed(Math.abs(n))},Scientific:(t,i)=>{const{start:s,end:e}=i,r=Math.max(Math.abs(s),Math.abs(e)),h=Math.floor(Math.log10(r));return 0===t?`0.00e${h<0?"":"+"}${h}`:t.toExponential(2)}},ge=t=>Math.round(t).toString().split("").map((t=>{switch(t){case"0":return"⁰";case"1":return"¹";case"2":return"²";case"3":return"³";case"4":return"⁴";case"5":return"⁵";case"6":return"⁶";case"7":return"⁷";case"8":return"⁸";case"9":return"⁹";case"-":return"⁻";default:return t}})).join(""),ve=(t,i)=>t.value-i.value,ye=i({type:"lut",steps:[],title:"",units:"",interpolate:!0,color:m(0,0,0,255),length:0,min:0,max:0,subranges:[],isValid:!1,percentageValues:!1,formatter:(t,i)=>fe(t,i.min,i.max)}),pe=t=>{const{steps:i}=t,s=i.length;i.sort(ve);const[e,r]=s>0?[i[0].value,i[s-1].value]:[0,0],h=s>0?s-1:0,n=Array(h);for(let t=0;t<h;t+=1)n[t]={min:i[t],max:i[t+1]};return{min:e,max:r,length:s,steps:i,subranges:n,isValid:s>0&&e!==r}};class me extends ye{constructor(t){super(((t,i)=>({steps:t.steps,title:t.title,units:t.units,interpolate:t.interpolate,percentageValues:t.percentageValues,color:t.color,formatter:t.formatter,length:i.length,min:i.min,max:i.max,subranges:i.subranges,isValid:i.isValid}))(t,pe(t)))}toString(){return`LUT:interpolate=${this.interpolate},steps=${this.steps.length},percentage=${this.percentageValues}`}setSteps(t){return this.merge(pe({...this,steps:t}))}getSteps(){return this.get("steps")}setTitle(t){return this.set("title",t)}getTitle(){return this.get("title")}setUnits(t){return this.set("units",t)}getUnits(){return this.get("units")}setInterpolation(t){return this.set("interpolate",t)}getInterpolation(){return this.get("interpolate")}setFallbackColor(t){return this.set("color",t)}getFallbackCo