@lightningchart/lcjs
Version:
A high-performance charting library.
2 lines • 1.74 MB
JavaScript
/* LightningChart JS v8.2.0 */
import*as t from"immutable";import{Record as i}from"immutable";import n from"earcut";var r,e,o,s=(r=function(t,i){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},r(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}r(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}),a=function(){function t(){this.u=!0}return t.prototype.S=function(){return this.u},t}(),u=function(t){function i(i,n){var r=t.call(this)||this;return r.M=i,r._=i,r.u=n,r}return s(i,t),i.prototype.C=function(t){return t!==this.M&&(this._=this.M,this.M=t,this.u=!0),this},i.prototype.T=function(){return this.M},i.prototype.S=function(){return t.prototype.S.call(this)},i}(a),h=function(t,i){return{x:t,y:i}},f=function(t,i){return{x:t,y:i}},c=function(t,i,n){return{position:t,high:i,low:n}},l=function(t,i,n){return{x:t,y:i,z:n}},v=function(t){var i=Array(0),n=Array(0);return t.length>0&&t.forEach((function(t){i.push(h(t.position,t.high)),n.push(h(t.position,t.low))})),[i,n]},d=function(t,i){return{min:t,max:i}},y=function(t,i,n,r){return{x:t,y:i,width:n,height:r}},A=function(t,i){return void 0===i&&(i=!0),new u(t,i)},b=function(t,i,n,r){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),{left:t,top:i,right:n,bottom:r}},p=b,m=function(t,i){return{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}},g=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(t){function i(i){return t.call(this,i)||this}return g(i,t),i.prototype.toUint32=function(){return void 0!==this.O||(this.O=B(this.getR(),this.getG(),this.getB(),this.getA())),this.O},i.prototype.toString=function(){return"color:".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.a)},i.prototype.setA=function(t){return this.set("a",t/255)},i.prototype.setR=function(t){return this.set("r",t/255)},i.prototype.setG=function(t){return this.set("g",t/255)},i.prototype.setB=function(t){return this.set("b",t/255)},i.prototype.getA=function(){return 255*this.get("a")},i.prototype.getR=function(){return 255*this.get("r")},i.prototype.getG=function(){return 255*this.get("g")},i.prototype.getB=function(){return 255*this.get("b")},i.prototype.getHighlight=function(){return this.I||(this.I=new i({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},i.prototype.getLighter=function(){return this.F||(this.F=new i({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.F},i.prototype.getDarker=function(){return this.j||(this.j=new i({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.j},i.prototype.toRGBAString=function(){return"rgba(".concat((255*this.r).toFixed(0),",").concat((255*this.g).toFixed(0),",").concat((255*this.b).toFixed(0),",").concat(this.a,")")},i}(i({type:"color",r:1,g:1,b:1,a:1})),x=function(t){return!(!t||"object"!=typeof t||!("type"in t)||"color"!==t.type)},w=function(t,i,n,r){return void 0===r&&(r=255),new S({r:t/255,g:i/255,b:n/255,a:r/255})},M=function(t){var i=t.startsWith("#")?t.substring(1):t.startsWith("0x")?t.substr(2):t;switch(i.length){case 8:return new S({r:Number("0x".concat(i.substring(0,2)))/255,g:Number("0x".concat(i.substring(2,4)))/255,b:Number("0x".concat(i.substring(4,6)))/255,a:Number("0x".concat(i.substring(6,8)))/255});case 6:return new S({r:Number("0x".concat(i.substring(0,2)))/255,g:Number("0x".concat(i.substring(2,4)))/255,b:Number("0x".concat(i.substring(4,6)))/255});case 4:return new S({r:Number("0x".concat(i.charAt(0)).concat(i.charAt(0)))/255,g:Number("0x".concat(i.charAt(1)).concat(i.charAt(1)))/255,b:Number("0x".concat(i.charAt(2)).concat(i.charAt(2)))/255,a:Number("0x".concat(i.charAt(3)).concat(i.charAt(3)))/255});case 3:return new S({r:Number("0x".concat(i.charAt(0)).concat(i.charAt(0)))/255,g:Number("0x".concat(i.charAt(1)).concat(i.charAt(1)))/255,b:Number("0x".concat(i.charAt(2)).concat(i.charAt(2)))/255});default:throw new Error("ColorHEX parsing error | input: ".concat(t))}},_=function(t,i,n){var r,e,o;void 0===i&&(i=1),void 0===n&&(n=1),t/=360;var s=Math.floor(6*t),a=6*t-s,u=n*(1-i),h=n*(1-a*i),f=n*(1-(1-a)*i);switch(s%6){case 0:r=n,e=f,o=u;break;case 1:r=h,e=n,o=u;break;case 2:r=u,e=n,o=f;break;case 3:r=u,e=h,o=n;break;case 4:r=f,e=u,o=n;break;default:r=n,e=u,o=h}return new S({r:r,g:e,b:o})},C=function(t){try{if(t.startsWith("rgba")){var i=t.substr(5).slice(0,-1),n=JSON.parse("[".concat(i,"]"));return w(n[0],n[1],n[2],255*n[3])}if(t.startsWith("rgb"))return i=t.substr(4).slice(0,-1),n=JSON.parse("[".concat(i,"]")),w(n[0],n[1],n[2]);if(t.startsWith("hsl")){n=t.substr(4).slice(0,-1).split(",").map(parseFloat);var r=T(n[0],n[1],n[2]);return w(r[0],r[1],r[2])}return t.startsWith("#")||t.startsWith("0x")?M(t):M(I(t))}catch(t){}return console.warn("ColorCSS parsing error: ".concat(t)),M("#fff")},k=function(t){return w(255&t,255&(t>>=8),255&(t>>=8),255&(t>>=8))},T=function(t,i,n){i/=100,n/=100;var r=(1-Math.abs(2*n-1))*i,e=t/60,o=r*(1-Math.abs(e%2-1)),s=[];isNaN(t)?s=[0,0,0]:e<=1?s=[r,o,0]:e<=2?s=[o,r,0]:e<=3?s=[0,r,o]:e<=4?s=[0,o,r]:e<=5?s=[o,0,r]:e<=6&&(s=[r,0,o]);var a=n-.5*r;return[Math.round(255*(s[0]+a)),Math.round(255*(s[1]+a)),Math.round(255*(s[2]+a))]},O={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"},I=function(t){var i=O[t.toLowerCase()];if(i)return i;throw new Error("Unknown color code: ".concat(t))},F=new S({}),j=w(0,0,0,0),B=function(t,i,n,r){return void 0===r&&(r=255),(r<<24|n<<16|i<<8|t)>>>0},D=function(t){return B(255*t.r,255*t.g,255*t.b,255*t.a)},L=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(t){function i(i){return t.call(this,i)||this}return L(i,t),i.prototype.setSize=function(t){return this.set("size",t)},i.prototype.setFamily=function(t){return this.set("family",t)},i.prototype.setWeight=function(t){return this.set("weight",t)},i.prototype.setStyle=function(t){return this.set("style",t)},i.prototype.setVariant=function(t){return this.set("variant",t)},i.prototype.getSize=function(){return this.get("size")},i.prototype.getFamily=function(){return this.get("family")},i.prototype.getWeight=function(){return this.get("weight")},i.prototype.getStyle=function(){return this.get("style")},i.prototype.getVariant=function(){return this.get("variant")},i}(i({type:"font",size:14,family:"Arial",weight:"normal",style:"normal",variant:!1})),E=function(t){return!(!t||"object"!=typeof t||!("type"in t)||"font"!==t.type)},z=new P,N=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new 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"}(o||(o={}));var R,V=function(t){function i(i){var n=t.call(this,i)||this;if(null===i||i&&null===i.stops||i&&i.stops&&!Array.isArray(i.stops)||i&&i.stops&&Array.isArray(i.stops)&&i.stops.length<2)throw new Error("RadialGradientFill requires minimum two color stops to be defined.");return n}return N(i,t),i.prototype.toString=function(){return"radialGradientFill:".concat(this.shape,",").concat(this.ditheringEnabled,",").concat(this.extent,",").concat(this.position.x,",").concat(this.position.y,",").concat(this.stops.map((function(t){return"".concat(t.offset,",").concat(t.color.toString())})).join(","))},i.prototype.toCSS=function(){return"radial-gradient(".concat(this.shape," ").concat(this.extent," at ").concat(100*this.position.x,"% ").concat(100*this.position.y,"%, ").concat(this.stops.map((function(t){return"".concat(t.color.toString()," ").concat(100*t.offset,"%")})).join(", "),")")},i.prototype.setColorStops=function(t){if(t.length<2)throw new Error("Minimum of two color stops required");return this.set("stops",t)},i.prototype.getColorStops=function(){return this.get("stops")},i.prototype.setPosition=function(t){return this.set("position",t)},i.prototype.getPosition=function(){return this.get("position")},i.prototype.setShape=function(t){return this.set("shape",t)},i.prototype.getShape=function(){return this.get("shape")},i.prototype.setExtent=function(t){return this.set("extent",t)},i.prototype.getExtent=function(){return this.get("extent")},i.prototype.setDitheringEnabled=function(t){return this.set("ditheringEnabled",t)},i.prototype.getDitheringEnabled=function(){return this.get("ditheringEnabled")},i}(i({type:"fillstyle",fillType:"radial-gradient",ditheringEnabled:!0,stops:[{color:M("#f00"),offset:0},{color:M("#0f0"),offset:1}],position:h(.5,.5),shape:e.ellipse,extent:o.farthestCorner})),G=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"radial-gradient"===t.fillType)},U=function(t){function i(i){var n=t.call(this,i)||this;if(null===i||i&&null===i.stops||i&&i.stops&&!Array.isArray(i.stops)||i&&i.stops&&Array.isArray(i.stops)&&i.stops.length<2)throw new Error("LinearGradientFill requires minimum two color stops to be defined.");return n}return N(i,t),i.prototype.toString=function(){return"linearGradientFill:".concat(this.angle,",").concat(this.stops.map((function(t){return"".concat(t.offset,",").concat(t.color.toString())})).join(","))},i.prototype.toCSS=function(){return"linear-gradient(".concat(this.angle,"deg, ").concat(this.stops.map((function(t){return"".concat(t.color.toString()," ").concat(100*t.offset,"%")})).join(", "),")")},i.prototype.setColorStops=function(t){if(t.length<2)throw new Error("Minimum of two color stops required");var i=t.sort((function(t,i){return t.offset-i.offset}));return this.set("stops",i)},i.prototype.getColorStops=function(){return this.get("stops")},i.prototype.setAngle=function(t,i){return this.set("angle",i?function(t){return 180*t/Math.PI}(t):t)},i.prototype.getAngle=function(t){return t?dr(this.get("angle")):this.get("angle")},i}(i({type:"fillstyle",fillType:"linear-gradient",stops:[{color:M("#f00"),offset:0},{color:M("#0f0"),offset:1}],angle:0})),W=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"linear-gradient"===t.fillType)},Y=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),X=function(){return X=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},X.apply(this,arguments)},H=function(){function t(t,i,n,r){var e=this;this.D=new Nt,this.cellIndex=t,this.cellSpan=i,this.cellsAmount=n,this.observedAmount=r,this.x=new Z,this.y=new Z,this.z=new Z;var o=X({},t),s=X({},i);if(r){var a=function(t){var i=t.value;e.cellsAmount.x=i.reduce(Gn,0),e.cellIndex.x=i.reduce((function(t,i,n){return n>=o.x?t:t+i}),0),e.cellSpan.x=i.reduce((function(t,i,n){return n>=o.x&&n<o.x+s.x?t+i:t}),0),e.D.L("cellresize",{})};r.x.P("change",a),a({value:r.x.T()});var u=function(t){var i=t.value;e.cellsAmount.y=i.reduce(Gn,0),e.cellIndex.y=i.reduce((function(t,i,n){return n>=o.y?t:t+i}),0),e.cellSpan.y=i.reduce((function(t,i,n){return n>=o.y&&n<o.y+s.y?t+i:t}),0),e.D.L("cellresize",{})};r.y.P("change",u),u({value:r.y.T()}),this.N=function(){r.x.R("change",a),r.y.R("change",u)}}}return t.prototype.V=function(){return this.N&&(this.N(),this.N=void 0),this},t.prototype.addEventListener=function(t,i,n){this.D.addEventListener(t,i,n)},t.prototype.removeEventListener=function(t,i){this.D.removeEventListener(t,i)},t}(),Z=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.G=0,i.U=10,i.W=1,i.Y=!1,i}return Y(i,t),i.prototype.X=function(){return!1},i.prototype.H=function(){return this.u=!1,this},i.prototype.Z=function(){return this.u=!0,this},i.prototype.getInnerStart=function(){return this.G},i.prototype.getInnerEnd=function(){return this.U},i.prototype.getInnerInterval=function(){return Math.abs(this.getInnerEnd()-this.getInnerStart())},i.prototype.J=function(t,i){return this.G=t,this.U=i,this.K(),this},i.prototype.q=function(t){return this.W=t,this.K(),this},i.prototype.$=function(t){return t/this.W},i.prototype.K=function(){var t=this.$(this.U-this.G),i=this.W;void 0!==this.tt&&!1!==mi(t,this.tt)||(this.u=!0,this.it=i,this.tt=t);var n=this.G;this.U;var r=0;this.Y&&(n=0,this.U,this.G,r=this.G);var e=t,o=n+.5*e*i;this.nt={displacement:o,scaling:e,highPrecisionOffset:r}},i.prototype.rt=function(){return this.tt},i.prototype.et=function(){return this.U<this.G},i.prototype.ot=function(){return this.nt},i.prototype.st=function(t,i){return!0},i}(a),J=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(t){function i(i,n,r,e){var o=t.call(this)||this;if(o.ut=!0,o.ht=!0,o.ft=[0,0],o.ct=!0,o.vt=i,o.dt=n,o.yt=r,o.At=i,o.bt=n,e){var s=function(t){o.St(t.value)};e.P("change",s),o.St(e.T()),o.xt=function(){return e.R("change",s)}}return o}return J(i,t),i.prototype.X=function(){return this.ht},i.prototype.q=function(t){return this.W=t,this.ht=!0,this},i.prototype.wt=function(t){return this.ft=t.map(Math.abs),this.ct=!0,this},i.prototype.Mt=function(){return this.vt/this.yt*this.W+this.ft[0]},i.prototype._t=function(){return(this.vt+this.dt)/this.yt*this.W-this.ft[1]},i.prototype.Ct=function(){return this.getCellSize()-this.kt()},i.prototype.Tt=function(){return this.W},i.prototype.getCellSize=function(){return this.Ot(this.W)},i.prototype.kt=function(){return this.ft[0]+this.ft[1]},i.prototype.It=function(){return this.ft},i.prototype.St=function(t){var i=this;this.yt=t.reduce(Gn,0),this.vt=t.reduce((function(t,n,r){return r>=i.At?t:t+n}),0),this.dt=t.reduce((function(t,n,r){return r>=i.At&&r<i.At+i.bt?t+n:t}),0),this.ut=!0,this.Ft()},i.prototype.Ot=function(t){return t*this.dt/this.yt},i.prototype.H=function(){return t.prototype.H.call(this),this.ht=!1,this.ct=!1,this.ut=!1,this},i.prototype.Z=function(){return t.prototype.Z.call(this),this.ht=!0,this.ct=!0,this.ut=!0,this},i}(function(){function t(){this.jt=!0}return t.prototype.getInnerStart=function(){return this.G},t.prototype.getInnerEnd=function(){return this.U},t.prototype.getInnerInterval=function(){return Math.abs(this.U-this.G)},t.prototype.J=function(t,i){return t===this.G&&i===this.U||(this.jt=!0),this.G=t,this.U=i,this},t.prototype.H=function(){return this.jt=!1,this},t.prototype.Z=function(){return this.jt=!0,this},t}()),K=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),q=function(t){function i(i,n,r,e){var o=t.call(this,i,n,r,e)||this;return o.Y=!1,o.Bt=!1,o.Dt=0,o.W=1e3,o.J(0,10),o.K(),o}return K(i,t),i.prototype.Lt=function(){return this.Bt},i.prototype.st=function(t,i,n,r,e){if(t===i)return!1;var o=Math.abs(r-n),s=Math.abs(i-t);if(!this.Y){var a=Ji(t,i,this.getCellSize());if(void 0===a)return!1;if(s>a)return!0;var u=(i+t)/2,h=(e?a/2:o/2)*(t>i?-1:1);return{start:u-h,end:u+h}}var f=Math.pow(10,-(12-Math.log10(Math.max(Math.abs(t),1))));if(s>f)return!0;var c=(i+t)/2,l=(e?f/2:o/2)*(t>i?-1:1);return{start:c-l,end:c+l}},i.prototype.Ft=function(){this.K()},i.prototype.Pt=function(t){return this.Mt()+(t-this.G)/(this.U-this.G)*(this._t()-this.Mt())},i.prototype.Et=function(t){return this.G+(t-this.Mt())/(this._t()-this.Mt())*(this.U-this.G)},i.prototype.J=function(i,n){return t.prototype.J.call(this,i,n),this.K(),this},i.prototype.wt=function(i){return t.prototype.wt.call(this,i),this.K(),this},i.prototype.q=function(i){return t.prototype.q.call(this,i),this.zt=$(this.U-this.G,this.ft,this.W,this.dt,this.yt),this.K(),this},i.prototype.Nt=function(){return this.Y=!0,this},i.prototype.Rt=function(){return this.Y},i.prototype.Vt=function(){return Math.abs(this.Gt)},i.prototype.Ut=function(){return this.Vt()/this.zt},i.prototype.Wt=function(){return this.Yt},i.prototype.Xt=function(){return this.Ht},i.prototype.getPixelSize=function(){return this.zt},i.prototype.ot=function(){return this.nt},i.prototype.Z=function(){return t.prototype.Z.call(this),this.Bt=!0,this},i.prototype.H=function(){return t.prototype.H.call(this),this.Bt=!1,this},i.prototype.Zt=function(t,i){return void 0===i&&(i=Tr.Numeric),i(t,{start:this.G,end:this.U})},i.prototype.Jt=function(){var t=Math.abs(this.getInnerEnd()).toString().length,i=Math.abs(this.getInnerStart()).toString().length;return t>i?t:i},i.prototype.Qt=function(t){return $(t,this.ft,this.W,this.dt,this.yt)},i.prototype.K=function(){var t=this.G,i=this.U,n=0;this.Y&&(t=0,i=this.U-this.G,n=this.G);var r=i-t,e=$(r,this.ft,this.W,this.dt,this.yt);this.Ht=this.G-this.ft[0]*e,this.Yt=this.U+this.ft[1]*e;var o=t-this.ft[0]*e,s=i+this.ft[1]*e-o,a=s-this.Gt,u=Math.abs(a/e),h=r-this.Dt,f=Math.abs(h/e);(!this.nt||u>=.4||f>=.4)&&(this.Dt=r,this.Gt=s,this.zt=e,this.Bt=!0);var c=this.Gt*this.yt/(2*this.dt),l=-(o-this.Gt*this.vt/this.dt)-c,v=2*this.Mt()/this.W-1,d=2*this._t()/this.W-1-v;this.nt={displacement:l,scaling:c,highPrecisionOffset:n,viewportStart:v,viewportSize:d,scaleStartLog:0,scaleIntervalLog:0}},i.prototype.Kt=function(t,i){return t+this.zt*i},i}(Q),$=function(t,i,n,r,e){return void 0===r&&(r=1),void 0===e&&(e=1),t/(n*r/e-(i[0]+i[1]))},tt=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=function(){function t(){}return t.prototype.qt=function(t,i){return"x"in t?(this.x=t.x,this.y=t.y):(this.x=t,this.y=i),this},t.prototype.H=function(){return this.x.H(),this.y.H(),this},t.prototype.Z=function(){return this.x.Z(),this.y.Z(),this},t.prototype.q=function(t,i){return"object"==typeof t?(this.x.q(t.x),this.y.q(t.y)):(this.x.q(t),this.y.q(i)),this},t.prototype.Tt=function(){return h(this.x.Tt(),this.y.Tt())},t.prototype.$t=function(t){return this.x.wt(t),this},t.prototype.ti=function(t){return this.y.wt(t),this},t.prototype.kt=function(){return h(this.x.kt(),this.y.kt())},t.prototype.ii=function(t,i){return this.x.J(t,i),this},t.prototype.ni=function(t,i){return this.y.J(t,i),this},t.prototype.getInnerIntervalPixels=function(){var t=this.x.getCellSize(),i=this.y.getCellSize();return{x:t-this.x.kt(),y:i-this.y.kt()}},t.prototype.ri=function(){return this.x.Lt()||this.y.Lt()},t}(),nt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.ei="LinearScaleXY",i}return tt(i,t),i.prototype.oi=function(t,i,n,r){return this.x=new q(t.x,i.x,n.x,r?r.x:void 0),this.y=new q(t.y,i.y,n.y,r?r.y:void 0),this},i.prototype.Rt=function(){return this.x.Rt()||this.y.Rt()},i.prototype.si=function(){return h(this.x.getPixelSize(),this.y.getPixelSize())},i.prototype.ot=function(){return{x:this.x.ot(),y:this.y.ot()}},i.prototype.Kt=function(t,i){var n=this.si();return{x:t.x+i.x*n.x,y:t.y+i.y*n.y}},i.prototype.ai=function(t,i,n,r){var e=this.si(),o=er(t,i);return o.x*=r,o.y*=r,{x:t.x+n*e.x*o.x,y:t.y+n*e.y*o.y}},i}(it),rt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.ei="MixedScaleXY",i}return tt(i,t),i.prototype.Rt=function(){return!1},i.prototype.Kt=function(t,i){var n=this.x.Pt(t.x),r=this.y.Pt(t.y),e={x:n+i.x,y:r+i.y};return{x:this.x.Et(e.x),y:this.y.Et(e.y)}},i.prototype.ai=function(t,i,n,r){var e={x:this.x.Pt(t.x),y:this.y.Pt(t.y)},o={x:this.x.Pt(i.x),y:this.y.Pt(i.y)},s=rr(ur(o,e)),a=er(o,e),u={x:e.x+s.x*r+a.x*n,y:e.y+s.y*r+a.y*n};return{x:this.x.Et(u.x),y:this.y.Et(u.y)}},i.prototype.ot=function(){var t=this.x.ot(),i=this.y.ot();return{uScaleStart:[this.x.G,this.y.G],uScaleInterval:[this.x.U-this.x.G,this.y.U-this.y.G],uScaleStartLog:[t.scaleStartLog,i.scaleStartLog],uScaleIntervalLog:[t.scaleIntervalLog,i.scaleIntervalLog],uViewportStart:[t.viewportStart,i.viewportStart],uViewportSize:[t.viewportSize,i.viewportSize]}},i}(it),et=function(){return et=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},et.apply(this,arguments)},ot={d1:function(t){return new t.scale1DConstructor(0,1,1,void 0)},d2:function(t){return(new t.scaleXYConstructor).oi({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0)},d3:function(){return new H({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0)}},st=function(t,i,n){return i===n?t:n.Et(i.Pt(t))},at=function(t,i,n){if(i===n)return t;var r=i instanceof it?i.x:i.x instanceof it?i.x.x:i.x.ui,e=i instanceof it?i.y:i.y instanceof it?i.y.y:i.y.ui,o=n instanceof it?n.x:n.x instanceof it?n.x.x:n.x.ui,s=n instanceof it?n.y:n.y instanceof it?n.y.y:n.y.ui;return et(et({},t),{x:st(t.x,r,o),y:st(t.y,e,s)})},ut=function(t,i,n){var r=t(i,n);return function(t){return new Yr({color:r(t)})}},ht=function(t,i,n){var r=t(i+1,n);return function(t){return new V({stops:[{offset:0,color:r(t)},{offset:1,color:r(t).getDarker()}]})}},ft=function(t,i,n,r){var e=t(i+1,r);return function(t){return new U({stops:[{offset:0,color:e(t).getDarker()},{offset:.5,color:e(t)},{offset:1,color:e(t).getDarker()}],angle:n||90})}},ct=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(0===t.length)return{remove:pi};var n=!1,r=t.map((function(i){var r=function(r){!function(i,r,e){n||(n=!0,t.filter((function(t){return t!==i})).forEach((function(t){return t.hi(r,e,!1,i.getStopped(),"synchronizedAxis")})),n=!1)}(i,r.start,r.end)};return i.addEventListener("intervalchange",r),r})),e=!1,o=t.map((function(i){var n=function(n){!function(i,n){e||(e=!0,t.filter((function(t){return t!==i})).forEach((function(t){return t.setStopped(n)})),e=!1)}(i,n.isStopped)};return i.addEventListener("stoppedchange",n),n}));return{remove:function(){t.forEach((function(t,i){t.removeEventListener("intervalchange",r[i]),t.removeEventListener("stoppedchange",o[i])}))}}},lt=function(t,i,n,r){if(!n||0===n.length)throw new Error("Invalid use regularColorSteps 'colorPalette' is undefined or empty");var e=null==r?void 0:r.formatLabels,o=null==r?void 0:r.alpha;return n.map((function(r,s){var a=t+s/(n.length-1)*(i-t);return{color:void 0!==o?r.setA(o):r,value:a,label:e?e(a):void 0}}))},vt=function(t,i){var n=null!=i?i:function(t){return t};return{levels:t.steps.map((function(t){return n({value:t.value},t)}))}},dt=function(t){return t&&"object"==typeof t&&"column"in t&&"row"in t},yt=function(t){return t&&"object"==typeof t&&"z"in t&&"column"in t&&"row"in t},At=function(t){return t&&"object"==typeof t&&"position"in t&&"open"in t&&"high"in t&&"isPacked"in t},bt=function(t){return t&&"object"==typeof t&&"annulus"in t&&"sector"in t},pt=function(t){return t&&"object"==typeof t&&"index"in t},mt=function(t){return t&&"object"==typeof t&&"xSize"in t&&"ySize"in t&&"zSize"in t},gt=function(t){return t&&"object"==typeof t&&"figure"in t&&"positionAndSize"in t},St=function(t){return t&&"object"==typeof t&&"figure"in t&&"start"in t&&"end"in t&&"median"in t&&"upperQuartile"in t},xt=function(t){return t&&"object"==typeof t&&"figure"in t&&"x"in t&&"radiusX"in t&&"radiusY"in t},wt=function(t){return t&&"object"==typeof t&&"figure"in t&&"x"in t&&"coordinates"in t},Mt=function(t){return t&&"object"==typeof t&&"figure"in t&&"startX"in t&&"endX"in t},_t=function(t){return t&&"object"==typeof t&&"x"in t&&"y"in t},Ct=function(t){return!0===t.isLcjsArtificialEvent},kt=function(t,i,n,r){return n<0?t:n>1?i:w(t.getR()+n*(i.getR()-t.getR()),t.getG()+n*(i.getG()-t.getG()),t.getB()+n*(i.getB()-t.getB()),void 0===r?t.getA()+n*(i.getA()-t.getA()):r)};!function(t){t[t.Nearest=0]="Nearest",t[t.NearestX=1]="NearestX",t[t.NearestY=2]="NearestY"}(R||(R={}));var Tt,Ot=function(t,i,n,r,e,o,s,a,u,h){var f=t.length;if(0!==f){var c=r?1:0,l=f-(e?2:1);if(n===R.Nearest)return It(t,i,o,s,c,l);if(n===R.NearestX||n===R.NearestY){if("boolean"==typeof h&&("x"===u&&n===R.NearestX||"y"===u&&n===R.NearestY))return Bt(t,at(i,s,o),u,h,c,l);if(n===R.NearestX)return Ft(t,at(i,s,o),a,c,l);if(n===R.NearestY)return jt(t,at(i,s,o),a,c,l)}}},It=function(t,i,n,r,e,o){for(var s,a=Number.MAX_VALUE,u=e;u<=o;u+=1){var h=t[u];if(!Number.isNaN(h.x)&&!Number.isNaN(h.y)){var f=at(h,n,r),c=Math.pow(f.x-i.x,2)+Math.pow(f.y-i.y,2);c<a&&(a=c,s=u)}}return s},Ft=function(t,i,n,r,e){if(!(i.x<n.min.x||i.x>n.max.x)){for(var o,s=Number.MAX_VALUE,a=r;a<=e;a+=1){var u=t[a],h=u.x>i.x?u.x-i.x:i.x-u.x;h<s&&!Number.isNaN(u.x)&&!Number.isNaN(u.y)&&(s=h,o=a)}return o}},jt=function(t,i,n,r,e){if(!(i.y<n.min.y||i.y>n.max.y)){for(var o,s=Number.MAX_VALUE,a=r;a<=e;a+=1){var u=t[a],h=u.y>i.y?u.y-i.y:i.y-u.y;h<s&&!Number.isNaN(u.x)&&!Number.isNaN(u.y)&&(s=h,o=a)}return o}},Bt=function(t,i,n,r,e,o){var s="x"===n,a=s?i.x:i.y,u=t[e],h=t[o],f=u.x<h.x?u.x:h.x,c=u.y<h.y?u.y:h.y,l=u.x>h.x?u.x:h.x,v=u.y>h.y?u.y:h.y;if(!(s&&(a<f||a>l)||!s&&(a<c||a>v)))for(var d=e,y=Math.floor((e+o)/2),A=o,b=-1;;){var p=a-(s?t[y].x:t[y].y);if(p*(r?-1:1)>0)d=Math.min(y+1,A),b=Math.floor((d+A)/2);else{if(0===Math.abs(p))return y;A=Math.max(y-1,d),b=Math.floor((d+A)/2)}if(b===y){var m=y>e?Math.abs(a-(s?t[y-1].x:t[y-1].y)):Bn,g=y<o?Math.abs(a-(s?t[y+1].x:t[y+1].y)):Bn,S=Math.abs(p);switch(Math.min(S,m,g)){case m:return y-1;case g:return y+1;default:return y}}else y=b}},Dt=function(t,i,n,r,e,o){var s="x"===n,a=s?i.x:i.y,u=t[e],h=t[o],f=u.x<h.x?u.x:h.x,c=u.y<h.y?u.y:h.y,l=u.x>h.x?u.x:h.x,v=u.y>h.y?u.y:h.y;if(!(s&&(a<f||a>l)||!s&&(a<c||a>v)))for(var d=e,y=Math.floor((e+o)/2),A=o,b=-1;;){var p=a-(s?t[y].x:t[y].y);if(p*(r?-1:1)>0)d=Math.min(y+1,A),b=Math.floor((d+A)/2);else{if(0===Math.abs(p))return{a:y,b:y,lerpAmount:0};A=Math.max(y-1,d),b=Math.floor((d+A)/2)}if(b===y){if(p*(r?-1:1)<0&&y>e){var m=t[y-1],g=t[y];return{a:y-1,b:y,lerpAmount:s?(i.x-m.x)/(g.x-m.x):(i.y-m.y)/(g.y-m.y)}}return y<o?(m=t[y],g=t[y+1],{a:y,b:y+1,lerpAmount:s?(i.x-m.x)/(g.x-m.x):(i.y-m.y)/(g.y-m.y)}):{a:y,b:y,lerpAmount:0}}y=b}},Lt=0,Pt=function(){function t(t,i,n){this.fi=A(!0),this.ci=!1,this.li=!0,this.di=!1,this.yi=void 0,this.Ai=0,this.D=new Nt,this.bi=t,this.pi=i,this.mi=n,this.gi=Lt,Lt+=1,this.Si=t.xi.highlightColorOffset}return t.prototype.wi=function(){var t;return this.Mi("DataPattern",(function(i){return t=i.pattern,!0})),"ProgressiveX"===t||"RegressiveX"===t?R.NearestX:"ProgressiveY"===t||"RegressiveY"===t?R.NearestY:R.Nearest},t.prototype._i=function(){},t.prototype.addEventListener=function(t,i,n){this.D.addEventListener(t,i,n)},t.prototype.L=function(t,i,n,r){this.D.L(t,i,{collectionMember:n,info:r})},t.prototype.removeEventListener=function(t,i){this.D.removeEventListener(t,i)},t.prototype.Ci=function(t){return void 0!==this.mi.find((function(i){return i.type===t}))},t.prototype.Mi=function(t,i){var n;return!!this.Ci(t)&&!0===i(null===(n=this.mi.find((function(i){return i.type===t})))||void 0===n?void 0:n.args)},t.prototype.dispose=function(){return this.ci||(this.bi.ki(this),this.ci=!0,this.pi(this),this.D.L("dispose",{})),this},t.prototype.isDisposed=function(){return this.ci},t.prototype.setVisible=function(t){var i=this.li;return this.li=t,!t&&i&&this.fi.T()&&this.bi.ki(this),this},t.prototype.getVisible=function(){return this.li},t.prototype.setPointerEvents=function(t){var i=this.fi.T();return this.fi.C(t),t||i&&this.bi.ki(this),this},t.prototype.getPointerEvents=function(){return this.fi.T()},t.prototype.Ti=function(t){return this.yi=t,this},t.prototype.Oi=function(){return this.yi?this.yi:Et},t.prototype.Ii=function(t){return this.Ai=t,this},t.prototype.Fi=function(){return this.Ai},t.prototype.ji=function(t){return this.Si=t,this},t.prototype.Bi=function(){return this.Si},t}(),Et=d(h(0,0),h(0,0)),zt={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},Nt=function(){function t(){this.Di=new Array,this.Li=[],this.fi=!0,this.Pi=!1,this.Ei=new Map}return t.prototype.setPointerEvents=function(t){this.fi=t,this.Li.forEach((function(i){return i.setPointerEvents(t)}))},t.prototype.getPointerEvents=function(){return this.fi},t.prototype.addEventListener=function(t,i,n){this.Di.push({listener:i,key:t,options:n||{}})},t.prototype.removeEventListener=function(t,i){var n=this.Di.findIndex((function(t){return t.listener===i}));n>=0&&this.Di.splice(n,1)},Object.defineProperty(t.prototype,"draggable",{get:function(){return this.Pi},set:function(t){this.Pi=t,this.Li.forEach((function(i){i.di=t}))},enumerable:!1,configurable:!0}),t.prototype.L=function(t,i,n){void 0===n&&(n=void 0);for(var r=this.Di.slice(),e=r.length-1;e>=0;e-=1){var o=r[e];o.key===t&&(o.listener(i,n),!0===o.options.once&&this.removeEventListener(t,o.listener))}},t.prototype.zi=function(t,i){var n=this,r=[];Object.keys(zt).forEach((function(e){var o=function(t,r){var o=Rt(t)?{clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY}:t,s=(null==i?void 0:i.getExtraData)&&void 0!==o.clientX?i.getExtraData(o,r.collectionMember,r.info):{};n.L(e,t,s),!t.defaultPrevented&&(null==i?void 0:i.continueIfNotPrevented)&&i.continueIfNotPrevented(e,t,s)};t.addEventListener(e,o),r.push((function(){return t.removeEventListener(e,o)}))})),this.Li.push(t);var e=function(){var i=n.Li.indexOf(t);i>=0&&n.Li.splice(i,1),r.forEach((function(t){return t()}))};t.addEventListener("dispose",e),r.push((function(){return t.removeEventListener("dispose",e)})),this.Ei.set(t,(function(){r.forEach((function(t){return t()}))})),t.di=this.Pi,t.setPointerEvents(this.fi)},t.prototype.Ni=function(){this.Ei.forEach((function(t){return t()})),this.Ei.clear(),this.Li.length=0},t.prototype.Ri=function(t,i){var n=this,r=[];Object.keys(zt).forEach((function(e){var o=function(t,r){var o=i(r.collectionMember);o&&n.L(e,t,o)};t.addEventListener(e,o),r.push((function(){return t.removeEventListener(e,o)}))})),this.Li.push(t);var e=function(){var i=n.Li.indexOf(t);i>=0&&n.Li.splice(i,1),r.forEach((function(t){return t()}))};t.addEventListener("dispose",e),r.push((function(){return t.removeEventListener("dispose",e)})),this.Ei.set(t,(function(){r.forEach((function(t){return t()}))})),t.setPointerEvents(this.fi),t.di=this.Pi},t.prototype.Vi=function(t){var i=this;Object.keys(zt).forEach((function(n){t.addEventListener(n,(function(t,r){i.L(n,t,r)}))})),t.setPointerEvents(this.fi),t.draggable=this.Pi},t}(),Rt=function(t){return!(!t||"object"!=typeof t||!("touches"in t))},Vt={linear:function(t,i,n){var r=i-t;return function(e){return e<n?t+r/n*e:i}},easeIn:function(t,i,n){return function(r){return r<n?t+Math.abs(2*Math.pow(Math.sqrt(.5)*r/n,2))*(i-t):i}},easeOut:function(t,i,n){return function(r){return r<n?t+Math.abs(1-2*Math.pow(Math.sqrt(.5)*(1-r/n),2))*(i-t):i}},ease:function(t,i,n){return function(r){return r<n?t+(r<n/2?.5*Math.pow(r/n*2,2.5):.5+.5*(1-Math.pow(1-2*(r/n-.5),2.5)))*(i-t):i}},logarithmic:function(t){var i=Ki(t);return function(n,r,e){var o=i(n),s=i(r);return function(i){return i<e?Math.pow(t,o+Math.abs(1-2*Math.pow(Math.sqrt(.5)*(1-i/e),2))*(s-o)):r}}}},Gt=function(){function t(t,i,n,r,e){void 0===r&&(r=Vt.linear);var o=this;this.delta=0,this.nextAnimations=new Array,this.Gi=!1,this.easing=Vt.linear,this.isOver=function(){return(o.delta===o.duration||o.Gi)&&0===o.nextAnimations.length},this.D=new Nt,this.values=t,this.action=i,this.duration=n,this.easing=r,this.Ui=e,this.eases=t.map((function(t){var i=function(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,o=n.call(t),s=[];try{for(;(void 0===i||i-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return s}(t,2),e=i[0],o=i[1];return r(e,o,n)}))}return t.prototype.Wi=function(){this.D.L("start",{})},t.prototype.start=function(){return this.Ui.includes(this)||this.Ui.push(this),this},t.prototype.addNextAnimations=function(t){var i=this;return t instanceof Array?t.forEach((function(t){return i.nextAnimations.push(t)})):this.nextAnimations.push(t),this},t.prototype.NextAnimation=function(i,n,r,e){void 0===r&&(r=this.duration),void 0===e&&(e=this.easing);var o=new t(i,n,r,e,this.Ui);return this.nextAnimations.push(o),o},t.prototype.finish=function(t){if(void 0===t&&(t=!0),this.Gi=!0,this.Ui.splice(this.Ui.indexOf(this),1),this.nextAnimations.length>0){var i=this.nextAnimations[0];return t&&this.D.Di.forEach((function(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.L("end",{nextAnimation:i}),this.D.L("everyAnimationEnd",{nextAnimation:i})),i}t&&(this.D.L("end",{nextAnimation:void 0}),this.D.L("everyAnimationEnd",{nextAnimation:void 0}),this.D.L("allAnimationEnd",{}))},t.prototype.finishAll=function(t){void 0===t&&(t=!0);for(var i=this;i;)i=i.finish(t)},t.prototype.getFinalValues=function(){return this.nextAnimations.length>0?this.nextAnimations[this.nextAnimations.length-1].values.map(Ai):this.values.map(Ai)},t.prototype.getTimeUntilFinish=function(){for(var t=this.duration-this.delta,i=0;i<this.nextAnimations.length;i+=1)t+=this.nextAnimations[i].duration-this.nextAnimations[i].delta;return t},t.prototype.addEventListener=function(t,i,n){this.D.addEventListener(t,i,n)},t.prototype.removeEventListener=function(t,i){this.D.removeEventListener(t,i)},t}(),Ut=function(t,i){void 0===i&&(i=60),i>60&&console.log("Note: Animator FPS is usually capped at 60 by the browser!");var n,r,e=[],o=0,s=function(){n=void 0;var a=Date.now();(o=a-(r=r||a))/1e3>=1/i&&(r=Date.now()-o%(1e3/i),e.forEach((function(t){0===t.delta&&t.Wi(),t.delta+=o-o%(1e3/i),t.delta>t.duration&&(t.delta=t.duration),t.action(t.eases.map((function(i){return i(t.delta)}))),t.delta===t.duration&&t.finish()})),t()),e.length>0?n=vi.requestAnimationFrame(s):(n=void 0,r=void 0)};return function(t,i){return void 0===t&&(t=1e3),void 0===i&&(i=Vt.linear),function(r,o,a){void 0===a&&(a=t);var u=new Gt(r,o,a,i,e).start();return n||(n=vi.requestAnimationFrame(s)),u}}},Wt=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!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"}(Tt||(Tt={}));var Yt,Xt,Ht,Zt,Jt=function(t){function i(i){return t.call(this,i)||this}return Wt(i,t),i.prototype.setSource=function(t){return this.set("source",t)},i.prototype.getSource=function(){return this.get("source")},i.prototype.setSurroundingColor=function(t){return x(t)?this.set("surroundingColor",t):this.set("surroundingColor",t(this.get("surroundingColor")))},i.prototype.getSurroundingColor=function(){return this.get("surroundingColor")},i.prototype.setSourceMissingColor=function(t){return x(t)?this.set("sourceMissingColor",t):this.set("sourceMissingColor",t(this.get("sourceMissingColor")))},i.prototype.getSourceMissingColor=function(){return this.get("sourceMissingColor")},i.prototype.setFitMode=function(t){return this.set("fitMode",t)},i.prototype.getFitMode=function(){return this.get("fitMode")},i.prototype.toString=function(){return"imagefill:".concat(this.fitMode)},i.prototype.toCSS=function(){var t=this.getSource();return"url(".concat(t.src,")")},i}(i({type:"fillstyle",fillType:"image",source:void 0,surroundingColor:w(0,0,0,0),sourceMissingColor:w(0,0,0,0),fitMode:Tt.Fill})),Qt=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"image"===t.fillType)},Kt=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qt=new(function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.thickness=0,i}return Kt(i,t),i.prototype.setThickness=function(t){return this},i.prototype.getThickness=function(){return 0},i.prototype.Yi=function(){return 0},i.prototype.setFillStyle=function(t){return this},i.prototype.getFillStyle=function(){return Gr},i}(i({type:"linestyle",lineType:"empty"}))),$t=function(t){return!(!t||"object"!=typeof t||!("lineType"in t)||"empty"!==t.lineType)},ti=-34028234663852886e22,ii="-340282346638528859811704183484516925440.0";!function(t){t[t.Content=0]="Content",t[t.PaddedContent=1]="PaddedContent",t[t.PaddedBackground=2]="PaddedBackground",t[t.Everything=3]="Everything"}(Yt||(Yt={})),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"}(Xt||(Xt={})),function(t){t[t.notDraggable=0]="notDraggable",t[t.draggable=1]="draggable",t[t.onlyHorizontal=2]="onlyHorizontal",t[t.onlyVertical=3]="onlyVertical"}(Ht||(Ht={})),function(t){t[t.Up=0]="Up",t[t.Right=1]="Right",t[t.Down=2]="Down",t[t.Left=3]="Left"}(Zt||(Zt={}));var ni,ri,ei=function(t){return"getHighlight"in t&&"setHighlight"in t},oi=function(){return oi=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},oi.apply(this,arguments)},si=function(t){var i="function"==typeof Symbol&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},ai=function(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,o=n.call(t),s=[];try{for(;(void 0===i||i-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return s},ui=function(t,i,n){return void 0===t||"number"==typeof t||"string"==typeof t?t:Array.isArray(t)?t.slice(i,n):t.subarray(i,n)},hi=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=function(t){return t&&"object"==typeof t&&!Array.isArray(t)};return t.reduce((function(t,i){return i?(Object.keys(i).forEach((function(r){var e=t[r],o=i[r];n(e)&&n(o)?t[r]=hi(e,o):t[r]=o})),t):t}),{})},fi=function(t){if(t.resourcesBaseUrl){var i=t.styleFactory(t.resourcesBaseUrl),n=Qt(i)&&i.getSource(),r=n&&n instanceof Image?n:void 0;return null==r||r.addEventListener("error",(function(){mn(t.resourcesBaseUrl,r.src,"Theme resource",{shouldCrash:!1})})),i}var e="".concat(vi.location.origin,"/resources"),o=t.styleFactory(e);if(Qt(o)){var s=o.getSource();s instanceof Image&&s.addEventListener("error",(function(){var i=t.styleFactory("https://lcjs-resources.lightningchart.com/v1"),n=Qt(i)&&i.getSource(),r=n&&n instanceof Image?n:void 0;vi.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",(function(){t.apply(i)})),null==r||r.addEventListener("error",(function(){mn(t.resourcesBaseUrl,s.src,"Theme resource",{shouldCrash:!1})}))}))}return o},ci=0,li=function(){var t=Date.now().toString(36),i=(1048575&ci++).toString(36),n=Math.floor(4294967295*Math.random()).toString(36);return"".concat(t,"-").concat(n,"-").concat(i)},vi="undefined"!=typeof window?window:"undefined"!=typeof global&&global._lcjs?global._lcjs:{},di=function(t,i){return t.x===i.x&&t.y===i.y},yi=function(t){return t!==Bn&&t!==Dn&&!Number.isNaN(t)&&Number.isFinite(t)&&t!==1/0&&t!==-1/0},Ai=function(t){return t[1]},bi=function(t){return t.dispose()},pi=function(){},mi=function(t,i){return t===i},gi=function(t,i,n){return n>i?Math.min(Math.max(t,i),n):Math.min(Math.max(t,n),i)},Si=function(t){return Array.prototype.concat.apply([],t)},xi=function(t,i){return void 0===t||Number.isNaN(t)?i:t},wi=function(t){return t.Xi()},Mi=function(t){return t.Hi()},_i=function(t){return t.Zi()},Ci=function(t){return t.Ji()},ki=function(t){return t.min.x},Ti=function(t){return t.max.x},Oi=function(t){return t.min.y},Ii=function(t){return t.max.y},Fi=function(t,i,n,r,e){if(t.length>0){for(var o=e?r(e):void 0,s=0;s<t.length;s+=1){var a=i(t[s]);void 0!==a&&(o=void 0!==o?n(o,a):a)}return o}if(e)return r(e)},ji=h(0,1),Bi=h(1,0),Di=h(0,-1),Li=h(-1,0),Pi=h(0,0),Ei=function(t){switch(t){case Zt.Up:return ji;case Zt.Right:return Bi;case Zt.Down:return Di;case Zt.Left:return Li;default:return Pi}},zi=function(t){return t===Zt.Left||t===Zt.Right},Ni=function(t){t.stopPropagation(),t.preventDefault()},Ri=function(t,i){if(!i)return t;for(var n=t.length,r=new Float32Array(2*n),e=0,o=0;o<n;o+=1){var s=t[o],a=Math.fround(s);r[e+0]=a,r[e+1]=s-a,e+=2}return r},Vi=function(t,i,n){if(void 0===n&&(n=Float32Array),!i){for(var r=t.length,e=new n(2*r),o=0,s=0;s<r;s+=1){var a=t[s];e[o+0]=a.x,e[o+1]=a.y,o+=2}return e}var u=t.length,h=new n(4*u),f=0;for(s=0;s<u;s+=1){a=t[s];var c=Math.fround(a.x),l=Math.fround(a.y);h[f+0]=c,h[f+1]=l,h[f+2]=a.x-c,h[f+3]=a.y-l,f+=4}return h},Gi=function(t,i){if(!i){for(var n=t.length,r=new Float32Array(3*n),e=0,o=0;o<n;o+=1){var s=t[o];r[e+0]=s.x,r[e+1]=s.y,r[e+2]=s.z,e+=3}return r}var a=t.length,u=new Float32Array(6*a),h=0;for(o=0;o<a;o+=1){s=t[o];var f=Math.fround(s.x),c=Math.fround(s.y),l=Math.fround(s.z);u[h+0]=f,u[h+1]=c,u[h+2]=l,u[h+3]=s.x-f,u[h+4]=s.y-c,u[h+5]=s.z-l,h+=6}return u},Ui=function(t,i,n,r,e){return t||i||n||r?!t||i||n||r||e?t||!i||n||r||e?t||i||!n||r||e?t||i||n||!r||e?function(o,s,a){var u=3+(e?3:0)+(t?4:0)+(i?1:0)+(n?1:0)+(r?3:0),h=o.length,f=new Float32Array(h*u),c=0,l=c;if(e){for(b=0;b<h;b+=1){var v=o[b],d=Math.fround(v.x),y=Math.fround(v.y),A=Math.fround(v.z);f[l+0]=d,f[l+1]=y,f[l+2]=A,f[l+3]=v.x-d,f[l+4]=v.y-y,f[l+5]=v.z-A,l+=u}c+=6}else{for(var b=0;b<h;b+=1){var p=o[b];f[l+0]=p.x,f[l+1]=p.y,f[l+2]=p.z,l+=u}c+=3}if(t){var m=a&&Zr(a)&&a.getFallbackColor()||F;for(l=c,b=0;b<h;b+=1){var g=(p=o[b]).color||m;f[l+0]=g.r,f[l+1]=g.g,f[l+2]=g.b,f[l+3]=g.a,l+=u}c+=4}if(i){var S=1;for("number"==typeof(w=s&&s.getSize())&&(S=w),l=c,b=0;b<h;b+=1){var x=void 0!==(p=o[b]).size?p.size:S;f[l+0]=x,l+=u}c+=1}if(n){for(l=c,b=0;b<h;b+=1)p=o[b],f[l+0]=void 0!==p.value?p.value:ti,l+=u;c+=1}if(r){var w;for(S={x:1,y:1,z:1},"object"==typeof(w=s&&s.getSize())&&(S=w),l=c,b=0;b<h;b+=1){var M=void 0!==(p=o[b]).sizeAxisX?p.sizeAxisX:S.x,_=void 0!==p.sizeAxisY?p.sizeAxisY:S.y,C=void 0!==p.sizeAxisZ?p.sizeAxisZ:S.z;f[l+0]=M,f[l+1]=_,f[l+2]=C,l+=u}c+=3}return f}:function(t,i,n){return Wi(t,i)}:function(t,i,n){return Hi(t)}:function(t,i,n){return Xi(t,i)}:function(t,i,n){return Yi(t,n)}:function(t,i,n){return Gi(t,e)}},Wi=function(t,i){var n=i&&i.getSize(),r={x:1,y:1,z:1};"object"==typeof n&&(r=n);for(var e=t.length,o=new Float32Array(6*e),s=0,a=0;a<e;a+=1){var u=t[a];o[s+0]=u.x,o[s+1]=u.y,o[s+2]=u.z;var h=void 0!==u.sizeAxisX?u.sizeAxisX:r.x,f=void 0!==u.sizeAxisY?u.sizeAxisY:r.y,c=void 0!==u.sizeAxisZ?u.sizeAxisZ:r.z;o[s+3]=h,o[s+4]=f,o[s+5]=c,s+=6}return o},Yi=function(t,i){for(var n=i&&Zr(i)&&i.getFallbackColor()||F,r=t.length,e=new Float32Array(7*r),o=0,s=0;o<r;o+=1){var a=t[o];e[s+0]=a.x,e[s+1]=a.y,e[s+2]=a.z;var u=a.color||n;e[s+3]=u.r,e[s+4]=u.g,e[s+5]=u.b,e[s+6]=u.a,s+=7}return e},Xi=function(t,i){var n=i&&i.getSize(),r=1;"number"==typeof n&&(r=n);for(var e=t.length,o=new Float32Array(4*e),s=0,a=0;s<e;s+=1){var u=t[s];o[a+0]=u.x,o[a+1]=u.y,o[a+2]=u.z;var h=void 0!==u.size?u.size:r;o[a+3]=h,a+=4}return o},Hi=function(t){for(var i=t.length,n=new Float32Array(4*i),r=0,e=0;r<i;r+=1){var o=t[r];n[e+0]=o.x,n[e+1]=o.y,n[e+2]=o.z,n[e+3]=void 0!==o.value?o.value:ti,e+=4}return n},Zi=function(t){return function(i){var n=t.indexOf(i);n>=0&&t.splice(n,1)}},Ji=function(t,i,n){var r=function(t,i){if(i<Bn&&i>Dn&&t<Bn&&t>Dn){var n=Math.abs(t/Math.pow(2,23)),r=Math.abs(i/Math.pow(