UNPKG

@lightningchart/lcjs

Version:

A high-performance charting library.

2 lines 1.75 MB
/* LightningChart JS v8.2.0 */ "use strict";Object.defineProperty(exports,"u",{value:!0});var t=require("immutable"),i=require("earcut");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function r(t){if(t&&t.u)return t;var i=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(i,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),i.default=t,Object.freeze(i)}var e,o,s,a=r(t),u=n(i),h=(e=function(t,i){return e=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])},e(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}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}),f=function(){function t(){this.S=!0}return t.prototype.M=function(){return this.S},t}(),c=function(t){function i(i,n){var r=t.call(this)||this;return r._=i,r.C=i,r.S=n,r}return h(i,t),i.prototype.T=function(t){return t!==this._&&(this.C=this._,this._=t,this.S=!0),this},i.prototype.O=function(){return this._},i.prototype.M=function(){return t.prototype.M.call(this)},i}(f),l=function(t,i){return{x:t,y:i}},v=function(t,i){return{x:t,y:i}},d=function(t,i,n){return{position:t,high:i,low:n}},y=function(t,i,n){return{x:t,y:i,z:n}},A=function(t){var i=Array(0),n=Array(0);return t.length>0&&t.forEach((function(t){i.push(l(t.position,t.high)),n.push(l(t.position,t.low))})),[i,n]},p=function(t,i){return{min:t,max:i}},b=function(t,i,n,r){return{x:t,y:i,width:n,height:r}},m=function(t,i){return void 0===i&&(i=!0),new c(t,i)},x=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}},g=x,S=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}},w=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)}}(),M=function(t){function i(i){return t.call(this,i)||this}return w(i,t),i.prototype.toUint32=function(){return void 0!==this.I||(this.I=B(this.getR(),this.getG(),this.getB(),this.getA())),this.I},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.F||(this.F=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.F},i.prototype.getLighter=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.getDarker=function(){return this.D||(this.D=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.D},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}(t.Record({type:"color",r:1,g:1,b:1,a:1})),_=function(t){return!(!t||"object"!=typeof t||!("type"in t)||"color"!==t.type)},C=function(t,i,n,r){return void 0===r&&(r=255),new M({r:t/255,g:i/255,b:n/255,a:r/255})},k=function(t){var i=t.startsWith("#")?t.substring(1):t.startsWith("0x")?t.substr(2):t;switch(i.length){case 8:return new M({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 M({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 M({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 M({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))}},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 M({r:r,g:e,b:o})},O=function(t){return C(255&t,255&(t>>=8),255&(t>>=8),255&(t>>=8))},I={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"},F=new M({}),j=C(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(){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)}}(),L=function(t){function i(i){return t.call(this,i)||this}return D(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}(t.Record({type:"font",size:14,family:"Arial",weight:"normal",style:"normal",variant:!1})),P=function(t){return!(!t||"object"!=typeof t||!("type"in t)||"font"!==t.type)},E=new L,z=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)}}();exports.GradientShape=void 0,(o=exports.GradientShape||(exports.GradientShape={})).circle="circle",o.ellipse="ellipse",exports.GradientExtent=void 0,(s=exports.GradientExtent||(exports.GradientExtent={})).closestSide="closest-side",s.closestCorner="closest-corner",s.farthestSide="farthest-side",s.farthestCorner="farthest-corner";var N,R=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 z(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}(t.Record({type:"fillstyle",fillType:"radial-gradient",ditheringEnabled:!0,stops:[{color:k("#f00"),offset:0},{color:k("#0f0"),offset:1}],position:l(.5,.5),shape:exports.GradientShape.ellipse,extent:exports.GradientExtent.farthestCorner})),V=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"radial-gradient"===t.fillType)},G=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 z(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?tr(this.get("angle")):this.get("angle")},i}(t.Record({type:"fillstyle",fillType:"linear-gradient",stops:[{color:k("#f00"),offset:0},{color:k("#0f0"),offset:1}],angle:0})),U=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"linear-gradient"===t.fillType)},W=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)}}(),Y=function(){return Y=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},Y.apply(this,arguments)},X=function(){function t(t,i,n,r){var e=this;this.L=new _t,this.cellIndex=t,this.cellSpan=i,this.cellsAmount=n,this.observedAmount=r,this.x=new H,this.y=new H,this.z=new H;var o=Y({},t),s=Y({},i);if(r){var a=function(t){var i=t.value;e.cellsAmount.x=i.reduce(Tn,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.L.P("cellresize",{})};r.x.N("change",a),a({value:r.x.O()});var u=function(t){var i=t.value;e.cellsAmount.y=i.reduce(Tn,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.L.P("cellresize",{})};r.y.N("change",u),u({value:r.y.O()}),this.R=function(){r.x.V("change",a),r.y.V("change",u)}}}return t.prototype.G=function(){return this.R&&(this.R(),this.R=void 0),this},t.prototype.addEventListener=function(t,i,n){this.L.addEventListener(t,i,n)},t.prototype.removeEventListener=function(t,i){this.L.removeEventListener(t,i)},t}(),H=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.U=0,i.W=10,i.Y=1,i.X=!1,i}return W(i,t),i.prototype.H=function(){return!1},i.prototype.Z=function(){return this.S=!1,this},i.prototype.J=function(){return this.S=!0,this},i.prototype.getInnerStart=function(){return this.U},i.prototype.getInnerEnd=function(){return this.W},i.prototype.getInnerInterval=function(){return Math.abs(this.getInnerEnd()-this.getInnerStart())},i.prototype.K=function(t,i){return this.U=t,this.W=i,this.q(),this},i.prototype.$=function(t){return this.Y=t,this.q(),this},i.prototype.tt=function(t){return t/this.Y},i.prototype.q=function(){var t=this.tt(this.W-this.U),i=this.Y;void 0!==this.it&&!1!==oi(t,this.it)||(this.S=!0,this.nt=i,this.it=t);var n=this.U;this.W;var r=0;this.X&&(n=0,this.W,this.U,r=this.U);var e=t,o=n+.5*e*i;this.rt={displacement:o,scaling:e,highPrecisionOffset:r}},i.prototype.et=function(){return this.it},i.prototype.ot=function(){return this.W<this.U},i.prototype.st=function(){return this.rt},i.prototype.ut=function(t,i){return!0},i}(f),Z=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)}}(),J=function(t){function i(i,n,r,e){var o=t.call(this)||this;if(o.ht=!0,o.ft=!0,o.ct=[0,0],o.vt=!0,o.dt=i,o.yt=n,o.At=r,o.bt=i,o.xt=n,e){var s=function(t){o.St(t.value)};e.N("change",s),o.St(e.O()),o.wt=function(){return e.V("change",s)}}return o}return Z(i,t),i.prototype.H=function(){return this.ft},i.prototype.$=function(t){return this.Y=t,this.ft=!0,this},i.prototype.Mt=function(t){return this.ct=t.map(Math.abs),this.vt=!0,this},i.prototype._t=function(){return this.dt/this.At*this.Y+this.ct[0]},i.prototype.Ct=function(){return(this.dt+this.yt)/this.At*this.Y-this.ct[1]},i.prototype.kt=function(){return this.getCellSize()-this.Tt()},i.prototype.Ot=function(){return this.Y},i.prototype.getCellSize=function(){return this.It(this.Y)},i.prototype.Tt=function(){return this.ct[0]+this.ct[1]},i.prototype.Ft=function(){return this.ct},i.prototype.St=function(t){var i=this;this.At=t.reduce(Tn,0),this.dt=t.reduce((function(t,n,r){return r>=i.bt?t:t+n}),0),this.yt=t.reduce((function(t,n,r){return r>=i.bt&&r<i.bt+i.xt?t+n:t}),0),this.ht=!0,this.jt()},i.prototype.It=function(t){return t*this.yt/this.At},i.prototype.Z=function(){return t.prototype.Z.call(this),this.ft=!1,this.vt=!1,this.ht=!1,this},i.prototype.J=function(){return t.prototype.J.call(this),this.ft=!0,this.vt=!0,this.ht=!0,this},i}(function(){function t(){this.Bt=!0}return t.prototype.getInnerStart=function(){return this.U},t.prototype.getInnerEnd=function(){return this.W},t.prototype.getInnerInterval=function(){return Math.abs(this.W-this.U)},t.prototype.K=function(t,i){return t===this.U&&i===this.W||(this.Bt=!0),this.U=t,this.W=i,this},t.prototype.Z=function(){return this.Bt=!1,this},t.prototype.J=function(){return this.Bt=!0,this},t}()),Q=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)}}(),K=function(t){function i(i,n,r,e){var o=t.call(this,i,n,r,e)||this;return o.X=!1,o.Dt=!1,o.Lt=0,o.Y=1e3,o.K(0,10),o.q(),o}return Q(i,t),i.prototype.Pt=function(){return this.Dt},i.prototype.ut=function(t,i,n,r,e){if(t===i)return!1;var o=Math.abs(r-n),s=Math.abs(i-t);if(!this.X){var a=Li(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.jt=function(){this.q()},i.prototype.Et=function(t){return this._t()+(t-this.U)/(this.W-this.U)*(this.Ct()-this._t())},i.prototype.zt=function(t){return this.U+(t-this._t())/(this.Ct()-this._t())*(this.W-this.U)},i.prototype.K=function(i,n){return t.prototype.K.call(this,i,n),this.q(),this},i.prototype.Mt=function(i){return t.prototype.Mt.call(this,i),this.q(),this},i.prototype.$=function(i){return t.prototype.$.call(this,i),this.Nt=q(this.W-this.U,this.ct,this.Y,this.yt,this.At),this.q(),this},i.prototype.Rt=function(){return this.X=!0,this},i.prototype.Vt=function(){return this.X},i.prototype.Gt=function(){return Math.abs(this.Ut)},i.prototype.Wt=function(){return this.Gt()/this.Nt},i.prototype.Yt=function(){return this.Xt},i.prototype.Ht=function(){return this.Zt},i.prototype.getPixelSize=function(){return this.Nt},i.prototype.st=function(){return this.rt},i.prototype.J=function(){return t.prototype.J.call(this),this.Dt=!0,this},i.prototype.Z=function(){return t.prototype.Z.call(this),this.Dt=!1,this},i.prototype.Jt=function(t,i){return void 0===i&&(i=dr.Numeric),i(t,{start:this.U,end:this.W})},i.prototype.Qt=function(){var t=Math.abs(this.getInnerEnd()).toString().length,i=Math.abs(this.getInnerStart()).toString().length;return t>i?t:i},i.prototype.Kt=function(t){return q(t,this.ct,this.Y,this.yt,this.At)},i.prototype.q=function(){var t=this.U,i=this.W,n=0;this.X&&(t=0,i=this.W-this.U,n=this.U);var r=i-t,e=q(r,this.ct,this.Y,this.yt,this.At);this.Zt=this.U-this.ct[0]*e,this.Xt=this.W+this.ct[1]*e;var o=t-this.ct[0]*e,s=i+this.ct[1]*e-o,a=s-this.Ut,u=Math.abs(a/e),h=r-this.Lt,f=Math.abs(h/e);(!this.rt||u>=.4||f>=.4)&&(this.Lt=r,this.Ut=s,this.Nt=e,this.Dt=!0);var c=this.Ut*this.At/(2*this.yt),l=-(o-this.Ut*this.dt/this.yt)-c,v=2*this._t()/this.Y-1,d=2*this.Ct()/this.Y-1-v;this.rt={displacement:l,scaling:c,highPrecisionOffset:n,viewportStart:v,viewportSize:d,scaleStartLog:0,scaleIntervalLog:0}},i.prototype.qt=function(t,i){return t+this.Nt*i},i}(J),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]))},$=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)}}(),tt=function(){function t(){}return t.prototype.$t=function(t,i){return"x"in t?(this.x=t.x,this.y=t.y):(this.x=t,this.y=i),this},t.prototype.Z=function(){return this.x.Z(),this.y.Z(),this},t.prototype.J=function(){return this.x.J(),this.y.J(),this},t.prototype.$=function(t,i){return"object"==typeof t?(this.x.$(t.x),this.y.$(t.y)):(this.x.$(t),this.y.$(i)),this},t.prototype.Ot=function(){return l(this.x.Ot(),this.y.Ot())},t.prototype.ti=function(t){return this.x.Mt(t),this},t.prototype.ii=function(t){return this.y.Mt(t),this},t.prototype.Tt=function(){return l(this.x.Tt(),this.y.Tt())},t.prototype.ni=function(t,i){return this.x.K(t,i),this},t.prototype.ri=function(t,i){return this.y.K(t,i),this},t.prototype.getInnerIntervalPixels=function(){var t=this.x.getCellSize(),i=this.y.getCellSize();return{x:t-this.x.Tt(),y:i-this.y.Tt()}},t.prototype.ei=function(){return this.x.Pt()||this.y.Pt()},t}(),it=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.oi="LinearScaleXY",i}return $(i,t),i.prototype.si=function(t,i,n,r){return this.x=new K(t.x,i.x,n.x,r?r.x:void 0),this.y=new K(t.y,i.y,n.y,r?r.y:void 0),this},i.prototype.Vt=function(){return this.x.Vt()||this.y.Vt()},i.prototype.ai=function(){return l(this.x.getPixelSize(),this.y.getPixelSize())},i.prototype.st=function(){return{x:this.x.st(),y:this.y.st()}},i.prototype.qt=function(t,i){var n=this.ai();return{x:t.x+i.x*n.x,y:t.y+i.y*n.y}},i.prototype.ui=function(t,i,n,r){var e=this.ai(),o=Wn(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}(tt),nt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.oi="MixedScaleXY",i}return $(i,t),i.prototype.Vt=function(){return!1},i.prototype.qt=function(t,i){var n=this.x.Et(t.x),r=this.y.Et(t.y),e={x:n+i.x,y:r+i.y};return{x:this.x.zt(e.x),y:this.y.zt(e.y)}},i.prototype.ui=function(t,i,n,r){var e={x:this.x.Et(t.x),y:this.y.Et(t.y)},o={x:this.x.Et(i.x),y:this.y.Et(i.y)},s=Un(Zn(o,e)),a=Wn(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.zt(u.x),y:this.y.zt(u.y)}},i.prototype.st=function(){var t=this.x.st(),i=this.y.st();return{uScaleStart:[this.x.U,this.y.U],uScaleInterval:[this.x.W-this.x.U,this.y.W-this.y.U],uScaleStartLog:[t.scaleStartLog,i.scaleStartLog],uScaleIntervalLog:[t.scaleIntervalLog,i.scaleIntervalLog],uViewportStart:[t.viewportStart,i.viewportStart],uViewportSize:[t.viewportSize,i.viewportSize]}},i}(tt),rt=function(){return rt=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},rt.apply(this,arguments)},et={d1:function(t){return new t.scale1DConstructor(0,1,1,void 0)},d2:function(t){return(new t.scaleXYConstructor).si({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0)},d3:function(){return new X({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0)}},ot=function(t,i,n){return i===n?t:n.zt(i.Et(t))},st=function(t,i,n){if(i===n)return t;var r=i instanceof tt?i.x:i.x instanceof tt?i.x.x:i.x.hi,e=i instanceof tt?i.y:i.y instanceof tt?i.y.y:i.y.hi,o=n instanceof tt?n.x:n.x instanceof tt?n.x.x:n.x.hi,s=n instanceof tt?n.y:n.y instanceof tt?n.y.y:n.y.hi;return rt(rt({},t),{x:ot(t.x,r,o),y:ot(t.y,e,s)})},at=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(0===t.length)return{remove:ei};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.fi(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])}))}}},ut=function(t){return t&&"object"==typeof t&&"column"in t&&"row"in t},ht=function(t){return t&&"object"==typeof t&&"z"in t&&"column"in t&&"row"in t},ft=function(t){return t&&"object"==typeof t&&"annulus"in t&&"sector"in t},ct=function(t){return t&&"object"==typeof t&&"index"in t},lt=function(t){return t&&"object"==typeof t&&"x"in t&&"y"in t},vt=function(t,i,n,r){return n<0?t:n>1?i:C(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"}(N||(N={}));var dt,yt=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===N.Nearest)return At(t,i,o,s,c,l);if(n===N.NearestX||n===N.NearestY){if("boolean"==typeof h&&("x"===u&&n===N.NearestX||"y"===u&&n===N.NearestY))return mt(t,st(i,s,o),u,h,c,l);if(n===N.NearestX)return pt(t,st(i,s,o),a,c,l);if(n===N.NearestY)return bt(t,st(i,s,o),a,c,l)}}},At=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=st(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},pt=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}},bt=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}},mt=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,p=-1;;){var b=a-(s?t[y].x:t[y].y);if(b*(r?-1:1)>0)d=Math.min(y+1,A),p=Math.floor((d+A)/2);else{if(0===Math.abs(b))return y;A=Math.max(y-1,d),p=Math.floor((d+A)/2)}if(p===y){var m=y>e?Math.abs(a-(s?t[y-1].x:t[y-1].y)):mn,x=y<o?Math.abs(a-(s?t[y+1].x:t[y+1].y)):mn,g=Math.abs(b);switch(Math.min(g,m,x)){case m:return y-1;case x:return y+1;default:return y}}else y=p}},xt=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,p=-1;;){var b=a-(s?t[y].x:t[y].y);if(b*(r?-1:1)>0)d=Math.min(y+1,A),p=Math.floor((d+A)/2);else{if(0===Math.abs(b))return{a:y,b:y,lerpAmount:0};A=Math.max(y-1,d),p=Math.floor((d+A)/2)}if(p===y){if(b*(r?-1:1)<0&&y>e){var m=t[y-1],x=t[y];return{a:y-1,b:y,lerpAmount:s?(i.x-m.x)/(x.x-m.x):(i.y-m.y)/(x.y-m.y)}}return y<o?(m=t[y],x=t[y+1],{a:y,b:y+1,lerpAmount:s?(i.x-m.x)/(x.x-m.x):(i.y-m.y)/(x.y-m.y)}):{a:y,b:y,lerpAmount:0}}y=p}},gt=0,St=function(){function t(t,i,n){this.ci=m(!0),this.li=!1,this.di=!0,this.yi=!1,this.Ai=void 0,this.pi=0,this.L=new _t,this.bi=t,this.mi=i,this.xi=n,this.gi=gt,gt+=1,this.Si=t.wi.highlightColorOffset}return t.prototype.Mi=function(){var t;return this._i("DataPattern",(function(i){return t=i.pattern,!0})),"ProgressiveX"===t||"RegressiveX"===t?N.NearestX:"ProgressiveY"===t||"RegressiveY"===t?N.NearestY:N.Nearest},t.prototype.Ci=function(){},t.prototype.addEventListener=function(t,i,n){this.L.addEventListener(t,i,n)},t.prototype.P=function(t,i,n,r){this.L.P(t,i,{collectionMember:n,info:r})},t.prototype.removeEventListener=function(t,i){this.L.removeEventListener(t,i)},t.prototype.ki=function(t){return void 0!==this.xi.find((function(i){return i.type===t}))},t.prototype._i=function(t,i){var n;return!!this.ki(t)&&!0===i(null===(n=this.xi.find((function(i){return i.type===t})))||void 0===n?void 0:n.args)},t.prototype.dispose=function(){return this.li||(this.bi.Ti(this),this.li=!0,this.mi(this),this.L.P("dispose",{})),this},t.prototype.isDisposed=function(){return this.li},t.prototype.setVisible=function(t){var i=this.di;return this.di=t,!t&&i&&this.ci.O()&&this.bi.Ti(this),this},t.prototype.getVisible=function(){return this.di},t.prototype.setPointerEvents=function(t){var i=this.ci.O();return this.ci.T(t),t||i&&this.bi.Ti(this),this},t.prototype.getPointerEvents=function(){return this.ci.O()},t.prototype.Oi=function(t){return this.Ai=t,this},t.prototype.Ii=function(){return this.Ai?this.Ai:wt},t.prototype.Fi=function(t){return this.pi=t,this},t.prototype.ji=function(){return this.pi},t.prototype.Bi=function(t){return this.Si=t,this},t.prototype.Di=function(){return this.Si},t}(),wt=p(l(0,0),l(0,0)),Mt={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},_t=function(){function t(){this.Li=new Array,this.Pi=[],this.ci=!0,this.Ei=!1,this.zi=new Map}return t.prototype.setPointerEvents=function(t){this.ci=t,this.Pi.forEach((function(i){return i.setPointerEvents(t)}))},t.prototype.getPointerEvents=function(){return this.ci},t.prototype.addEventListener=function(t,i,n){this.Li.push({listener:i,key:t,options:n||{}})},t.prototype.removeEventListener=function(t,i){var n=this.Li.findIndex((function(t){return t.listener===i}));n>=0&&this.Li.splice(n,1)},Object.defineProperty(t.prototype,"draggable",{get:function(){return this.Ei},set:function(t){this.Ei=t,this.Pi.forEach((function(i){i.yi=t}))},enumerable:!1,configurable:!0}),t.prototype.P=function(t,i,n){void 0===n&&(n=void 0);for(var r=this.Li.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.Ni=function(t,i){var n=this,r=[];Object.keys(Mt).forEach((function(e){var o=function(t,r){var o=Ct(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.P(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.Pi.push(t);var e=function(){var i=n.Pi.indexOf(t);i>=0&&n.Pi.splice(i,1),r.forEach((function(t){return t()}))};t.addEventListener("dispose",e),r.push((function(){return t.removeEventListener("dispose",e)})),this.zi.set(t,(function(){r.forEach((function(t){return t()}))})),t.yi=this.Ei,t.setPointerEvents(this.ci)},t.prototype.Ri=function(){this.zi.forEach((function(t){return t()})),this.zi.clear(),this.Pi.length=0},t.prototype.Vi=function(t,i){var n=this,r=[];Object.keys(Mt).forEach((function(e){var o=function(t,r){var o=i(r.collectionMember);o&&n.P(e,t,o)};t.addEventListener(e,o),r.push((function(){return t.removeEventListener(e,o)}))})),this.Pi.push(t);var e=function(){var i=n.Pi.indexOf(t);i>=0&&n.Pi.splice(i,1),r.forEach((function(t){return t()}))};t.addEventListener("dispose",e),r.push((function(){return t.removeEventListener("dispose",e)})),this.zi.set(t,(function(){r.forEach((function(t){return t()}))})),t.setPointerEvents(this.ci),t.yi=this.Ei},t.prototype.Gi=function(t){var i=this;Object.keys(Mt).forEach((function(n){t.addEventListener(n,(function(t,r){i.P(n,t,r)}))})),t.setPointerEvents(this.ci),t.draggable=this.Ei},t}(),Ct=function(t){return!(!t||"object"!=typeof t||!("touches"in t))},kt={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=Ei(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}}}},Tt=function(){function t(t,i,n,r,e){void 0===r&&(r=kt.linear);var o=this;this.delta=0,this.nextAnimations=new Array,this.Ui=!1,this.easing=kt.linear,this.isOver=function(){return(o.delta===o.duration||o.Ui)&&0===o.nextAnimations.length},this.L=new _t,this.values=t,this.action=i,this.duration=n,this.easing=r,this.Wi=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.Yi=function(){this.L.P("start",{})},t.prototype.start=function(){return this.Wi.includes(this)||this.Wi.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.Wi);return this.nextAnimations.push(o),o},t.prototype.finish=function(t){if(void 0===t&&(t=!0),this.Ui=!0,this.Wi.splice(this.Wi.indexOf(this),1),this.nextAnimations.length>0){var i=this.nextAnimations[0];return t&&this.L.Li.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.L.P("end",{nextAnimation:i}),this.L.P("everyAnimationEnd",{nextAnimation:i})),i}t&&(this.L.P("end",{nextAnimation:void 0}),this.L.P("everyAnimationEnd",{nextAnimation:void 0}),this.L.P("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(ni):this.values.map(ni)},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.L.addEventListener(t,i,n)},t.prototype.removeEventListener=function(t,i){this.L.removeEventListener(t,i)},t}(),Ot=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.Yi(),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=$t.requestAnimationFrame(s):(n=void 0,r=void 0)};return function(t,i){return void 0===t&&(t=1e3),void 0===i&&(i=kt.linear),function(r,o,a){void 0===a&&(a=t);var u=new Tt(r,o,a,i,e).start();return n||(n=$t.requestAnimationFrame(s)),u}}},It=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)}}();exports.ImageFitMode=void 0,(dt=exports.ImageFitMode||(exports.ImageFitMode={}))[dt.Fill=0]="Fill",dt[dt.Fit=1]="Fit",dt[dt.Stretch=2]="Stretch",dt[dt.Center=3]="Center",dt[dt.Tile=4]="Tile";var Ft,jt,Bt,Dt,Lt=function(t){function i(i){return t.call(this,i)||this}return It(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 _(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 _(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}(t.Record({type:"fillstyle",fillType:"image",source:void 0,surroundingColor:C(0,0,0,0),sourceMissingColor:C(0,0,0,0),fitMode:exports.ImageFitMode.Fill})),Pt=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"image"===t.fillType)},Et=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)}}(),zt=new(function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.thickness=0,i}return Et(i,t),i.prototype.setThickness=function(t){return this},i.prototype.getThickness=function(){return 0},i.prototype.Xi=function(){return 0},i.prototype.setFillStyle=function(t){return this},i.prototype.getFillStyle=function(){return Tr},i}(t.Record({type:"linestyle",lineType:"empty"}))),Nt=function(t){return!(!t||"object"!=typeof t||!("lineType"in t)||"empty"!==t.lineType)},Rt=-34028234663852886e22,Vt="-340282346638528859811704183484516925440.0";exports.UISpace=void 0,(Ft=exports.UISpace||(exports.UISpace={}))[Ft.Content=0]="Content",Ft[Ft.PaddedContent=1]="PaddedContent",Ft[Ft.PaddedBackground=2]="PaddedBackground",Ft[Ft.Everything=3]="Everything",exports.UIVisibilityModes=void 0,(jt=exports.UIVisibilityModes||(exports.UIVisibilityModes={}))[jt.never=0]="never",jt[jt.always=1]="always",jt[jt.whenHovered=2]="whenHovered",jt[jt.whenDragged=3]="whenDragged",jt[jt.whenNotDragged=4]="whenNotDragged",jt[jt.whenHoveredOrDragged=5]="whenHoveredOrDragged",exports.UIDraggingModes=void 0,(Bt=exports.UIDraggingModes||(exports.UIDraggingModes={}))[Bt.notDraggable=0]="notDraggable",Bt[Bt.draggable=1]="draggable",Bt[Bt.onlyHorizontal=2]="onlyHorizontal",Bt[Bt.onlyVertical=3]="onlyVertical",exports.UIDirections=void 0,(Dt=exports.UIDirections||(exports.UIDirections={}))[Dt.Up=0]="Up",Dt[Dt.Right=1]="Right",Dt[Dt.Down=2]="Down",Dt[Dt.Left=3]="Left";var Gt,Ut,Wt=function(t){return"getHighlight"in t&&"setHighlight"in t},Yt=function(){return Yt=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},Yt.apply(this,arguments)},Xt=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.")},Ht=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},Zt=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)},Jt=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]=Jt(e,o):t[r]=o})),t):t}),{})},Qt=function(t){if(t.resourcesBaseUrl){var i=t.styleFactory(t.resourcesBaseUrl),n=Pt(i)&&i.getSource(),r=n&&n instanceof Image?n:void 0;return null==r||r.addEventListener("error",(function(){on(t.resourcesBaseUrl,r.src,"Theme resource",{shouldCrash:!1})})),i}var e="".concat($t.location.origin,"/resources"),o=t.styleFactory(e);if(Pt(o)){var s=o.getSource();s instanceof Image&&s.addEventListener("error",(function(){var i=t.styleFactory("https://lcjs-resources.lightningchart.com/v1"),n=Pt(i)&&i.getSource(),r=n&&n instanceof Image?n:void 0;$t.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(){on(t.resourcesBaseUrl,s.src,"Theme resource",{shouldCrash:!1})}))}))}return o},Kt=0,qt=function(){var t=Date.now().toString(36),i=(1048575&Kt++).toString(36),n=Math.floor(4294967295*Math.random()).toString(36);return"".concat(t,"-").concat(n,"-").concat(i)},$t="undefined"!=typeof window?window:"undefined"!=typeof global&&global._lcjs?global._lcjs:{},ti=function(t,i){return t.x===i.x&&t.y===i.y},ii=function(t){return t!==mn&&t!==xn&&!Number.isNaN(t)&&Number.isFinite(t)&&t!==1/0&&t!==-1/0},ni=function(t){return t[1]},ri=function(t){return t.dispose()},ei=function(){},oi=function(t,i){return t===i},si=function(t,i,n){return n>i?Math.min(Math.max(t,i),n):Math.min(Math.max(t,n),i)},ai=function(t){return Array.prototype.concat.apply([],t)},ui=function(t,i){return void 0===t||Number.isNaN(t)?i:t},hi=function(t){return t.Hi()},fi=function(t){return t.Zi()},ci=function(t){return t.Ji()},li=function(t){return t.Qi()},vi=function(t){return t.min.x},di=function(t){return t.max.x},yi=function(t){return t.min.y},Ai=function(t){return t.max.y},pi=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)},bi=l(0,1),mi=l(1,0),xi=l(0,-1),gi=l(-1,0),Si=l(0,0),wi=function(t){switch(t){case exports.UIDirections.Up:return bi;case exports.UIDirections.Right:return mi;case exports.UIDirections.Down:return xi;case exports.UIDirections.Left:return gi;default:return Si}},Mi=function(t){return t===exports.UIDirections.Left||t===exports.UIDirections.Right},_i=function(t){t.stopPropagation(),t.preventDefault()},Ci=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},ki=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},Ti=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},Oi=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(p=0;p<h;p+=1){var v=o[p],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 p=0;p<h;p+=1){var b=o[p];f[l+0]=b.x,f[l+1]=b.y,f[l+2]=b.z,l+=u}c+=3}if(t){var m=a&&Dr(a)&&a.getFallbackColor()||F;for(l=c,p=0;p<h;p+=1){var x=(b=o[p]).color||m;f[l+0]=x.r,f[l+1]=x.g,f[l+2]=x.b,f[l+3]=x.a,l+=u}c+=4}if(i){var g=1;for("number"==typeof(w=s&&s.getSize())&&(g=w),l=c,p=0;p<h;p+=1){var S=void 0!==(b=o[p]).size?b.size:g;f[l+0]=S,l+=u}c+=1}if(n){for(l=c,p=0;p<h;p+=1)b=o[p],f[l+0]=void 0!==b.value?b.value:Rt,l+=u;c+=1}if(r){var w;for(g={x:1,y:1,z:1},"object"==typeof(w=s&&s.getSize())&&(g=w),l=c,p=0;p<h;p+=1){var M=void 0!==(b=o[p]).sizeAxisX?b.sizeAxisX:g.x,_=void 0!==b.sizeAxisY?b.sizeAxisY:g.y,C=void 0!==b.sizeAxisZ?b.sizeAxisZ:g.z;f[l+0]=M,f[l+1]=_,f[l+2]=C,l+=u}c+=3}return f}:function(t,i,n){return Ii(t,i)}:function(t,i,n){return Bi(t)}:function(t,i,n){return ji(t,i)}:function(t,i,n){return Fi(t,n)}:function(t,i,n){return Ti(t,e)}},Ii=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},Fi=function(t,i){for(var n=i&&Dr(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},ji=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},Bi=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:Rt,e+=4}return n},Di=function(t){return function(i){var n=t.indexOf(i);n>=0&&t.splice(n,1)}},Li=function(t,i,n){var r=function(t,i){if(i<mn&&i>xn&&t<mn&&t>xn){var n=Math.abs(t/Math.pow(2,23)),r=Math.abs(i/Math.pow(2,23)),e=Math.min(n,r);return Math.pow(10,Math.floor(Math.log10(e)))}}(t,i);if(void 0!==r)return r*n},Pi=function(t){for(var i=t.length,n=0;n<i-1;n+=1)t[n].x===t[n+1].x&&t[n].y===t[n+1].y&&(t.splice(n,1),n-=1,i-=1);return t},Ei=function(t){var i=Math.log(t);return function(t){return Math.log(t)/i}},zi=Ei(Math.E),Ni=function(t,i){var n=i[t];return n?n():void 0},Ri=function(t,i){var n;if(i)n=i;else{for(var r={x:0,y:0},e=0;e<t.length;e+=1)r.x+=t[e].x/t.length,r.y+=t[e].y/t.length;n=r}return t.sort((function(t,i){return ir(Zn(t,n))-ir(Zn(i,n))}))},Vi=function(t,i,n){if(0===t.length)return!1===n.canReturnB?i.slice():i;var r=i.length;if(r<1e5)return t.push.apply(t,i),t;for(var e=0;e<r;e+=1)t.push(i[e]);return t},Gi=function(t){return 255===t.getA()?t:t.setA(255)},Ui=(Gt=C(0,0,0),function(t){return t=Gi(t),new G({angle:180,stops:[{offset:0,color:t},{offset:1,color:vt(t,Gt,.5)}]})}),Wi=(Ut=function(t,i){var n;if(t){if(jr(t)){if(0===t.getColor().getA())return;return t.getColor()}if(V(t)||U(t)){var r=t.getColorStops();return 2===r.length?r[1].color:null===(n=r[0])||void 0===n?void 0:n.color}return Pr(t)&&void 0!==i?t.lut.getColors(i,void 0):void 0}},function(t,i,n){var r,e,o,s,a=[];if(n.fill&&a.push(n.fill),n.fill2&&a.push(n.fill2),n.stroke){var u=n.stroke.getFillStyle();u!==Tr&&("stroke"===(null===(r=n.behavior)||void 0===r?void 0:r.priority)?a.unshift(u):a.push(u))}if(n.point3D){var h=n.point3D;a.push(h.getFillStyle())}if(n.behavior&&!0===n.behavior.colorStep){var f=Ht(a.reduce((fun