"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5306],{49090:function(t,i,e){e.d(i,{If:function(){return y},_6:function(){return f},lb:function(){return l},og:function(){return c},zT:function(){return a}});var n,r,s,o=e(31412);e(96434).Buffer,Object.freeze({643:"RUB",840:"USD",978:"EURO"});let h=Object.freeze({RUB:"₽",USD:"$",EURO:"€"}),a="dd.MM.yy";(n=r||(r={})).Pending="pending",n.Success="success";let u={decimalCount:2,decimalSeparator:",",thousandsSeparator:"\xa0",decimalIsWithoutZeros:!1,preventLargeNumbers:!1};function l(t,i){try{var e;let n;let{hasCurrencySymbol:r=!0,currencyCode:s,decimalCount:o=u.decimalCount,decimalSeparator:a=u.decimalSeparator,thousandsSeparator:l=u.thousandsSeparator,decimalIsWithoutZeros:c=u.decimalIsWithoutZeros,preventLargeNumbers:f=u.preventLargeNumbers}=i||{},p=t;if("string"==typeof p&&(p=p.replace(/\s+/g,"").replace(",",".")),p=Number(p)||0,f&&(n=(e=p)/1e9>=1?Math.floor(e/1e9)+l+"млрд":e/1e6>=1?Math.floor(e/1e6)+l+"млн":e),!f||f&&"number"==typeof n){let t=function(t){let i=Math.abs(Number(t));return Number.isNaN(i)?u.decimalCount:i}(o),i=Math.abs(p).toFixed(t),e=parseInt(i,10);n=function({money:t,moneyInt:i,thousandsSeparator:e}){let n=i.toString(),r=RegExp(n.length>4?"(\\d{3})(?=\\d)":"(\\d{4})(?=\\d)","g"),s=n.length>4?n.length%3:0,o=s?n.substr(0,s)+e:"";return(t<0?"-":"")+o+n.substr(s).replace(r,`$1${e}`)}({money:p,moneyInt:e,thousandsSeparator:l})+function({money:t,moneyInt:i,decimalCount:e,decimalSeparator:n,decimalIsWithoutZeros:r}){let s=Math.abs(t-i).toFixed(e);return!e||0===(Number(t)||0)||r&&0===parseFloat(s)?"":n+s.slice(2)}({money:Number(i),moneyInt:e,decimalCount:t,decimalSeparator:a,decimalIsWithoutZeros:c})}return n+(r?`\xa0${h[s]||h.RUB}`:"")}catch(t){return console.log(t),""}}function c(t){let i=t;return"string"==typeof i&&(i=i.replace(",",".")),i=(Number(i)||0).toString().replace(".",","),`${i}%`}function f(t,i,e=!1){if(!Array.isArray(i))throw Error("Plurals must be type of Array<String>");let[n,r,s]=i,o=Math.abs(+t);return(o%=100)>=5&&o<=20?e?s:`${t} ${s}`:1==(o%=10)?e?n:`${t} ${n}`:o>=2&&o<=4?e?r:`${t} ${r}`:e?s:`${t} ${s}`}class p{constructor(){this.type=null,this.title=null,this.provider=null,this.label=null,this.params=[]}setType(t){let i=["deposit","credit","bond","account"];if(!i.includes(t))throw Error(`Invalid product type given "${t}", allowed types: ${i.join(", ")}`);return this.type=t,this}setTitle(t){return this.title=t,this}setProvider(t,i,e){if("bank"!==t)throw Error("Invalid product's provider type given");return this.provider={type:t,title:i,code:e},this}setLabel(t){return this.label=t,this}addParam(t,i){return this.params.push({title:t,value:i}),this}toJSON(){return{type:this.type,title:this.title,provider:this.provider,label:this.label,params:this.params}}}class v{constructor(){this.step=null,this.title=null,this.subtitle=null,this.total=null}setStep(t){if(t<1)throw Error("Step must be greater than 0");return this.step=t,this}setTotalSteps(t){if(t<1)throw Error("Total steps must be greater than 0");if("number"==typeof this.step&&this.step>t)throw Error("Total steps must be greater than step or equal");return this.total=t,this}setTitle(t){return this.title=t,this}setSubTitle(t){return this.subtitle=t,this}toJSON(){return JSON.stringify({step:this.step,total:this.total,title:this.title,subtitle:this.subtitle})}}class d{constructor(){this.context=null,this.stepper=null,this.product=null,this.authState=null,this.context=null,this.product=null,this.authState=null,this.simpleLoginDisabled=null,this.skipLoginScreen=null}setContext(t){return this.context=t,this}setStepper(t){return console.warn("DEPRICATION WARNING: no longer used"),this.stepper=t(new v),this}setProduct(t){return this.product=t(new p),this}setAuthState(t){return this.authState=t,this}disableSimpleLogin(){return this.simpleLoginDisabled=!0,this}enableSkipLoginScreen(){return this.skipLoginScreen=!0,this}toJSON(){var t,i;return{product:(null===(t=this.product)||void 0===t?void 0:t.toJSON())||null,stepper:(null===(i=this.stepper)||void 0===i?void 0:i.toJSON())||null,simpleLoginDisabled:this.simpleLoginDisabled,skipLoginScreen:this.skipLoginScreen,authState:this.authState,context:this.context}}encode(){return(0,o.j_)(JSON.stringify(this.toJSON()))}}function y(){return new d}(s||(s={})).PERSISTENT_STATE="persistentState"},97988:function(t,i,e){e.d(i,{Z:function(){return o}});var n=e(99735),r=e(7656);function s(t){(0,r.Z)(1,arguments);var i=(0,n.Z)(t);return i.setHours(0,0,0,0),i}function o(t,i){(0,r.Z)(2,arguments);var e=s(t),n=s(i);return e.getTime()===n.getTime()}},72526:function(t,i,e){e.d(i,{Z:function(){return s}});var n=e(97988),r=e(7656);function s(t){return(0,r.Z)(1,arguments),(0,n.Z)(t,Date.now())}},4105:function(t,i,e){e.d(i,{Z:function(){return h}});var n=e(97988),r=e(47869),s=e(99735),o=e(7656);function h(t){return(0,o.Z)(1,arguments),(0,n.Z)(t,function(t,i){return(0,o.Z)(2,arguments),function(t,i){(0,o.Z)(2,arguments);var e=(0,s.Z)(t),n=(0,r.Z)(i);return isNaN(n)?new Date(NaN):(n&&e.setDate(e.getDate()+n),e)}(t,-(0,r.Z)(i))}(Date.now(),1))}},59918:function(t,i,e){e.d(i,{Z:function(){return o}});var n=e(68845),r=e(7656),s=e(47869);function o(t,i){(0,r.Z)(1,arguments);var e,o,d,y=(0,s.Z)(null!==(e=null==i?void 0:i.additionalDigits)&&void 0!==e?e:2);if(2!==y&&1!==y&&0!==y)throw RangeError("additionalDigits must be 0, 1 or 2");if(!("string"==typeof t||"[object String]"===Object.prototype.toString.call(t)))return new Date(NaN);var g=function(t){var i,e={},n=t.split(h.dateTimeDelimiter);if(n.length>2)return e;if(/:/.test(n[0])?i=n[0]:(e.date=n[0],i=n[1],h.timeZoneDelimiter.test(e.date)&&(e.date=t.split(h.timeZoneDelimiter)[0],i=t.substr(e.date.length,t.length))),i){var r=h.timezone.exec(i);r?(e.time=i.replace(r[1],""),e.timezone=r[1]):e.time=i}return e}(t);if(g.date){var m=function(t,i){var e=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+i)+"})|(\\d{2}|[+-]\\d{"+(2+i)+"})$)"),n=t.match(e);if(!n)return{year:NaN,restDateString:""};var r=n[1]?parseInt(n[1]):null,s=n[2]?parseInt(n[2]):null;return{year:null===s?r:100*s,restDateString:t.slice((n[1]||n[2]).length)}}(g.date,y);o=function(t,i){if(null===i)return new Date(NaN);var e,n,r=t.match(a);if(!r)return new Date(NaN);var s=!!r[4],o=c(r[1]),h=c(r[2])-1,u=c(r[3]),l=c(r[4]),f=c(r[5])-1;if(s)return l>=1&&l<=53&&f>=0&&f<=6?((e=new Date(0)).setUTCFullYear(i,0,4),n=e.getUTCDay()||7,e.setUTCDate(e.getUTCDate()+((l-1)*7+f+1-n)),e):new Date(NaN);var d=new Date(0);return h>=0&&h<=11&&u>=1&&u<=(p[h]||(v(i)?29:28))&&o>=1&&o<=(v(i)?366:365)?(d.setUTCFullYear(i,h,Math.max(o,u)),d):new Date(NaN)}(m.restDateString,m.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var w=o.getTime(),b=0;if(g.time&&isNaN(b=function(t){var i=t.match(u);if(!i)return NaN;var e=f(i[1]),r=f(i[2]),s=f(i[3]);return(24===e?0===r&&0===s:s>=0&&s<60&&r>=0&&r<60&&e>=0&&e<25)?e*n.vh+r*n.yJ+1e3*s:NaN}(g.time)))return new Date(NaN);if(g.timezone){if(isNaN(d=function(t){if("Z"===t)return 0;var i=t.match(l);if(!i)return 0;var e="+"===i[1]?-1:1,r=parseInt(i[2]),s=i[3]&&parseInt(i[3])||0;return s>=0&&s<=59?e*(r*n.vh+s*n.yJ):NaN}(g.timezone)))return new Date(NaN)}else{var M=new Date(w+b),_=new Date(0);return _.setFullYear(M.getUTCFullYear(),M.getUTCMonth(),M.getUTCDate()),_.setHours(M.getUTCHours(),M.getUTCMinutes(),M.getUTCSeconds(),M.getUTCMilliseconds()),_}return new Date(w+b+d)}var h={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},a=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,u=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,l=/^([+-])(\d{2})(?::?(\d{2}))?$/;function c(t){return t?parseInt(t):1}function f(t){return t&&parseFloat(t.replace(",","."))||0}var p=[31,null,31,30,31,30,31,31,30,31,30,31];function v(t){return t%400==0||t%4==0&&t%100!=0}},91978:function(t,i,e){e.d(i,{Mr:function(){return tZ},TD:function(){return H},B8:function(){return tm},C2:function(){return e1}});var n,r={allowDownsampling:!0},s=function(){function t(t,i){var e=this;this._resolutionMediaQueryList=null,this._resolutionListener=function(t){return e._onResolutionChanged()},this._canvasConfiguredListeners=[],this.canvas=t,this._canvasSize={width:this.canvas.clientWidth,height:this.canvas.clientHeight},this._options=i,this._configureCanvas(),this._installResolutionListener()}return t.prototype.destroy=function(){this._canvasConfiguredListeners.length=0,this._uninstallResolutionListener(),this.canvas=null},Object.defineProperty(t.prototype,"canvasSize",{get:function(){return{width:this._canvasSize.width,height:this._canvasSize.height}},enumerable:!0,configurable:!0}),t.prototype.resizeCanvas=function(t){this._canvasSize={width:t.width,height:t.height},this._configureCanvas()},Object.defineProperty(t.prototype,"pixelRatio",{get:function(){var t=this.canvas.ownerDocument.defaultView;if(null==t)throw Error("No window is associated with the canvas");return t.devicePixelRatio>1||this._options.allowDownsampling?t.devicePixelRatio:1},enumerable:!0,configurable:!0}),t.prototype.subscribeCanvasConfigured=function(t){this._canvasConfiguredListeners.push(t)},t.prototype.unsubscribeCanvasConfigured=function(t){this._canvasConfiguredListeners=this._canvasConfiguredListeners.filter(function(i){return i!=t})},t.prototype._configureCanvas=function(){var t=this.pixelRatio;this.canvas.style.width=this._canvasSize.width+"px",this.canvas.style.height=this._canvasSize.height+"px",this.canvas.width=this._canvasSize.width*t,this.canvas.height=this._canvasSize.height*t,this._emitCanvasConfigured()},t.prototype._emitCanvasConfigured=function(){var t=this;this._canvasConfiguredListeners.forEach(function(i){return i.call(t)})},t.prototype._installResolutionListener=function(){if(null!==this._resolutionMediaQueryList)throw Error("Resolution listener is already installed");var t=this.canvas.ownerDocument.defaultView;if(null==t)throw Error("No window is associated with the canvas");var i=t.devicePixelRatio;this._resolutionMediaQueryList=t.matchMedia("all and (resolution: "+i+"dppx)"),this._resolutionMediaQueryList.addListener(this._resolutionListener)},t.prototype._uninstallResolutionListener=function(){null!==this._resolutionMediaQueryList&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},t.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},t.prototype._onResolutionChanged=function(){this._configureCanvas(),this._reinstallResolutionListener()},t}();function o(t,i){var e,n=((e={})[0]=[],e[1]=[t.lineWidth,t.lineWidth],e[2]=[2*t.lineWidth,2*t.lineWidth],e[3]=[6*t.lineWidth,6*t.lineWidth],e[4]=[t.lineWidth,4*t.lineWidth],e)[i];t.setLineDash(n)}function h(t,i,e,n){t.beginPath();var r=t.lineWidth%2?.5:0;t.moveTo(e,i+r),t.lineTo(n,i+r),t.stroke()}(V=q||(q={}))[V.Simple=0]="Simple",V[V.WithSteps=1]="WithSteps",(Z=H||(H={}))[Z.Solid=0]="Solid",Z[Z.Dotted=1]="Dotted",Z[Z.Dashed=2]="Dashed",Z[Z.LargeDashed=3]="LargeDashed",Z[Z.SparseDotted=4]="SparseDotted";var a=function(t,i){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])})(t,i)};function u(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function e(){this.constructor=t}a(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}var l=function(){return(l=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var r in i=arguments[e])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)};function c(t,i,e){if(e||2==arguments.length)for(var n,r=0,s=i.length;r<s;r++)!n&&r in i||(n||(n=Array.prototype.slice.call(i,0,r)),n[r]=i[r]);return t.concat(n||Array.prototype.slice.call(i))}function f(t,i){if(!t)throw Error("Assertion failed"+(i?": "+i:""))}function p(t){if(void 0===t)throw Error("Value is undefined");return t}function v(t){if(null===t)throw Error("Value is null");return t}function d(t){return v(p(t))}function y(t){for(var i=[],e=1;e<arguments.length;e++)i[e-1]=arguments[e];for(var n=0;n<i.length;n++){var r=i[n];for(var s in r)void 0!==r[s]&&("object"!=typeof r[s]||void 0===t[s]?t[s]=r[s]:y(t[s],r[s]))}return t}function g(t){return"number"==typeof t&&isFinite(t)}function m(t){return"number"==typeof t&&t%1==0}function w(t){return"string"==typeof t}function b(t){return"boolean"==typeof t}function M(t){var i,e,n;if(!t||"object"!=typeof t)return t;for(e in i=Array.isArray(t)?[]:{},t)t.hasOwnProperty(e)&&(n=t[e],i[e]=n&&"object"==typeof n?M(n):n);return i}function _(t){return null!==t}function S(t){return null===t?void 0:t}var k=function(){function t(){this.t=[]}return t.prototype.i=function(t){this.t=t},t.prototype.h=function(t,i,e,n){this.t.forEach(function(r){t.save(),r.h(t,i,e,n),t.restore()})},t}(),x=function(){function t(){}return t.prototype.h=function(t,i,e,n){t.save(),t.scale(i,i),this.u(t,e,n),t.restore()},t.prototype.o=function(t,i,e,n){t.save(),t.scale(i,i),this.l(t,e,n),t.restore()},t.prototype.l=function(t,i,e){},t}(),C=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.v=null,i}return u(i,t),i.prototype._=function(t){this.v=t},i.prototype.u=function(t){if(null!==this.v&&null!==this.v.M){var i=this.v.M,e=this.v,n=function(n){t.beginPath();for(var r=i.to-1;r>=i.from;--r){var s=e.m[r];t.moveTo(s.p,s.g),t.arc(s.p,s.g,n,0,2*Math.PI)}t.fill()};t.fillStyle=e.k,n(e.C+2),t.fillStyle=e.N,n(e.C)}},i}(x);function L(){return{m:[{p:0,g:0,S:0,D:0}],N:"",k:"",C:0,M:null}}var T={from:0,to:1},D=function(){function t(t,i){this.A=new k,this.T=[],this.B=[],this.L=!0,this.F=t,this.V=i,this.A.i(this.T)}return t.prototype.O=function(t){var i=this.F.W();i.length!==this.T.length&&(this.B=i.map(L),this.T=this.B.map(function(t){var i=new C;return i._(t),i}),this.A.i(this.T)),this.L=!0},t.prototype.P=function(t,i,e){return this.L&&(this.R(t),this.L=!1),this.A},t.prototype.R=function(t){var i=this,e=this.F.W(),n=this.V.I(),r=this.F.j();e.forEach(function(e,s){var o,h=i.B[s],a=e.q(n);if(null!==a&&e.U()){var u=v(e.H());h.N=a.Y,h.C=a.C,h.m[0].D=a.D,h.m[0].g=e.$().K(a.D,u.X),h.k=null!==(o=a.Z)&&void 0!==o?o:i.F.J(h.m[0].g/t),h.m[0].S=n,h.m[0].p=r.G(n),h.M=T}else h.M=null})},t}(),N=function(){function t(t){this.tt=t}return t.prototype.h=function(t,i,e,n){if(null!==this.tt){var r=this.tt.it.U,s=this.tt.nt.U;if(r||s){t.save();var a=Math.round(this.tt.p*i),u=Math.round(this.tt.g*i),l=Math.ceil(this.tt.st*i),c=Math.ceil(this.tt.ht*i);t.lineCap="butt",r&&a>=0&&(t.lineWidth=Math.floor(this.tt.it.rt*i),t.strokeStyle=this.tt.it.et,t.fillStyle=this.tt.it.et,o(t,this.tt.it.ut),function(t,i,e,n){t.beginPath();var r=t.lineWidth%2?.5:0;t.moveTo(i+r,0),t.lineTo(i+r,n),t.stroke()}(t,a,0,c)),s&&u>=0&&(t.lineWidth=Math.floor(this.tt.nt.rt*i),t.strokeStyle=this.tt.nt.et,t.fillStyle=this.tt.nt.et,o(t,this.tt.nt.ut),h(t,u,0,l)),t.restore()}}},t}(),E=function(){function t(t){this.L=!0,this.at={it:{rt:1,ut:0,et:"",U:!1},nt:{rt:1,ut:0,et:"",U:!1},st:0,ht:0,p:0,g:0},this.ot=new N(this.at),this.lt=t}return t.prototype.O=function(){this.L=!0},t.prototype.P=function(t,i){return this.L&&(this.R(),this.L=!1),this.ot},t.prototype.R=function(){var t=this.lt.U(),i=v(this.lt.ft()),e=i.vt().ct().crosshair,n=this.at;n.nt.U=t&&this.lt._t(i),n.it.U=t&&this.lt.dt(),n.nt.rt=e.horzLine.width,n.nt.ut=e.horzLine.style,n.nt.et=e.horzLine.color,n.it.rt=e.vertLine.width,n.it.ut=e.vertLine.style,n.it.et=e.vertLine.color,n.st=i.wt(),n.ht=i.Mt(),n.p=this.lt.bt(),n.g=this.lt.gt()},t}(),P={khaki:"#f0e68c",azure:"#f0ffff",aliceblue:"#f0f8ff",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",gray:"#808080",green:"#008000",honeydew:"#f0fff0",floralwhite:"#fffaf0",lightblue:"#add8e6",lightcoral:"#f08080",lemonchiffon:"#fffacd",hotpink:"#ff69b4",lightyellow:"#ffffe0",greenyellow:"#adff2f",lightgoldenrodyellow:"#fafad2",limegreen:"#32cd32",linen:"#faf0e6",lightcyan:"#e0ffff",magenta:"#f0f",maroon:"#800000",olive:"#808000",orange:"#ffa500",oldlace:"#fdf5e6",mediumblue:"#0000cd",transparent:"#0000",lime:"#0f0",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",midnightblue:"#191970",orchid:"#da70d6",mediumorchid:"#ba55d3",mediumturquoise:"#48d1cc",orangered:"#ff4500",royalblue:"#4169e1",powderblue:"#b0e0e6",red:"#f00",coral:"#ff7f50",turquoise:"#40e0d0",white:"#fff",whitesmoke:"#f5f5f5",wheat:"#f5deb3",teal:"#008080",steelblue:"#4682b4",bisque:"#ffe4c4",aquamarine:"#7fffd4",aqua:"#0ff",sienna:"#a0522d",silver:"#c0c0c0",springgreen:"#00ff7f",antiquewhite:"#faebd7",burlywood:"#deb887",brown:"#a52a2a",beige:"#f5f5dc",chocolate:"#d2691e",chartreuse:"#7fff00",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cadetblue:"#5f9ea0",tomato:"#ff6347",fuchsia:"#f0f",blue:"#00f",salmon:"#fa8072",blanchedalmond:"#ffebcd",slateblue:"#6a5acd",slategray:"#708090",thistle:"#d8bfd8",tan:"#d2b48c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",blueviolet:"#8a2be2",black:"#000",darkmagenta:"#8b008b",darkslateblue:"#483d8b",darkkhaki:"#bdb76b",darkorchid:"#9932cc",darkorange:"#ff8c00",darkgreen:"#006400",darkred:"#8b0000",dodgerblue:"#1e90ff",darkslategray:"#2f4f4f",dimgray:"#696969",deepskyblue:"#00bfff",firebrick:"#b22222",forestgreen:"#228b22",indigo:"#4b0082",ivory:"#fffff0",lavenderblush:"#fff0f5",feldspar:"#d19275",indianred:"#cd5c5c",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightskyblue:"#87cefa",lightslategray:"#789",lightslateblue:"#8470ff",snow:"#fffafa",lightseagreen:"#20b2aa",lightsalmon:"#ffa07a",darksalmon:"#e9967a",darkviolet:"#9400d3",mediumpurple:"#9370d8",mediumaquamarine:"#66cdaa",skyblue:"#87ceeb",lavender:"#e6e6fa",lightsteelblue:"#b0c4de",mediumvioletred:"#c71585",mintcream:"#f5fffa",navajowhite:"#ffdead",navy:"#000080",olivedrab:"#6b8e23",palevioletred:"#d87093",violetred:"#d02090",yellow:"#ff0",yellowgreen:"#9acd32",lawngreen:"#7cfc00",pink:"#ffc0cb",paleturquoise:"#afeeee",palegoldenrod:"#eee8aa",darkolivegreen:"#556b2f",darkseagreen:"#8fbc8f",darkturquoise:"#00ced1",peachpuff:"#ffdab9",deeppink:"#ff1493",violet:"#ee82ee",palegreen:"#98fb98",mediumseagreen:"#3cb371",peru:"#cd853f",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",purple:"#800080",seagreen:"#2e8b57",seashell:"#fff5ee",papayawhip:"#ffefd5",mediumslateblue:"#7b68ee",plum:"#dda0dd",mediumspringgreen:"#00fa9a"};function O(t){return t<0?0:t>255?255:Math.round(t)||0}function j(t){return t<=0||t>0?t<0?0:t>1?1:Math.round(1e4*t)/1e4:0}var z=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,$=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,F=/^rgb\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*\)$/,U=/^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?[\d]{0,10}(?:\.\d+)?)\s*\)$/;function R(t){var i;if((t=t.toLowerCase())in P&&(t=P[t]),i=U.exec(t)||F.exec(t))return[O(parseInt(i[1],10)),O(parseInt(i[2],10)),O(parseInt(i[3],10)),j(i.length<5?1:parseFloat(i[4]))];if(i=$.exec(t))return[O(parseInt(i[1],16)),O(parseInt(i[2],16)),O(parseInt(i[3],16)),1];if(i=z.exec(t))return[O(17*parseInt(i[1],16)),O(17*parseInt(i[2],16)),O(17*parseInt(i[3],16)),1];throw Error("Cannot parse color: "+t)}function A(t){var i=R(t);return{yt:"rgb("+i[0]+", "+i[1]+", "+i[2]+")",kt:.199*i[0]+.687*i[1]+.114*i[2]>160?"black":"white"}}function B(t,i,e){t.save(),t.scale(i,i),e(),t.restore()}function I(t,i,e,n,r,s){t.save(),t.globalCompositeOperation="copy",t.fillStyle=s,t.fillRect(i,e,n,r),t.restore()}function W(t,i,e,n,r,s,o){t.save(),t.globalCompositeOperation="copy";var h=t.createLinearGradient(0,0,0,r);h.addColorStop(0,s),h.addColorStop(1,o),t.fillStyle=h,t.fillRect(i,e,n,r),t.restore()}var V,Z,q,H,X,G=function(){function t(t,i){this._(t,i)}return t.prototype._=function(t,i){this.tt=t,this.Ct=i},t.prototype.h=function(t,i,e,n,r,s){if(this.tt.U){t.font=i.Nt;var o=this.tt.xt||!this.tt.St?i.Dt:0,h=i.At,a=i.Tt,u=i.Bt,l=i.Lt,c=i.Ft,f=this.tt.Et,p=Math.ceil(e.Vt(t,f)),v=i.Ot,d=i.Wt+a+u,y=Math.ceil(.5*d),g=h+p+l+c+o,m=this.Ct.zt;this.Ct.Pt&&(m=this.Ct.Pt);var w,b,M=(m=Math.round(m))-y,_=M+d,S="right"===r,k=S?n:0,x=Math.ceil(n*s),C=k;if(t.fillStyle=this.Ct.yt,t.lineWidth=1,t.lineCap="butt",f){S?(w=k-o,b=(C=k-g)+c):(C=k+g,w=k+o,b=k+h+o+l);var L=Math.max(1,Math.floor(s)),T=Math.max(1,Math.floor(h*s)),D=S?x:0,N=Math.round(M*s),E=Math.round(C*s),P=Math.round(m*s)-Math.floor(.5*s),O=P+L+(P-N),j=Math.round(w*s);t.save(),t.beginPath(),t.moveTo(D,N),t.lineTo(E,N),t.lineTo(E,O),t.lineTo(D,O),t.fill(),t.fillStyle=this.tt.Z,t.fillRect(S?x-T:0,N,T,O-N),this.tt.xt&&(t.fillStyle=this.Ct.et,t.fillRect(D,P,j-D,L)),t.textAlign="left",t.fillStyle=this.Ct.et,B(t,s,function(){t.fillText(f,b,_-u-v)}),t.restore()}}},t.prototype.Mt=function(t,i){return this.tt.U?t.Wt+t.Tt+t.Bt:0},t}(),J=function(){function t(t){this.Rt={zt:0,et:"#FFF",yt:"#000"},this.It={Et:"",U:!1,xt:!0,St:!1,Z:""},this.jt={Et:"",U:!1,xt:!1,St:!0,Z:""},this.L=!0,this.qt=new(t||G)(this.It,this.Rt),this.Ut=new(t||G)(this.jt,this.Rt)}return t.prototype.Et=function(){return this.It.Et},t.prototype.zt=function(){return this.Ht(),this.Rt.zt},t.prototype.O=function(){this.L=!0},t.prototype.Mt=function(t,i){return void 0===i&&(i=!1),Math.max(this.qt.Mt(t,i),this.Ut.Mt(t,i))},t.prototype.Yt=function(){return this.Rt.Pt||0},t.prototype.Kt=function(t){this.Rt.Pt=t},t.prototype.$t=function(){return this.Ht(),this.It.U||this.jt.U},t.prototype.Xt=function(){return this.Ht(),this.It.U},t.prototype.P=function(t){return this.Ht(),this.It.xt=this.It.xt&&t.ct().drawTicks,this.jt.xt=this.jt.xt&&t.ct().drawTicks,this.qt._(this.It,this.Rt),this.Ut._(this.jt,this.Rt),this.qt},t.prototype.Zt=function(){return this.Ht(),this.qt._(this.It,this.Rt),this.Ut._(this.jt,this.Rt),this.Ut},t.prototype.Ht=function(){this.L&&(this.It.xt=!0,this.jt.xt=!1,this.Jt(this.It,this.jt,this.Rt))},t}(),Y=function(t){function i(i,e,n){var r=t.call(this)||this;return r.lt=i,r.Gt=e,r.Qt=n,r}return u(i,t),i.prototype.Jt=function(t,i,e){t.U=!1;var n=this.lt.ct().horzLine;if(n.labelVisible){var r=this.Gt.H();if(this.lt.U()&&!this.Gt.ti()&&null!==r){var s=A(n.labelBackgroundColor);e.yt=s.yt,e.et=s.kt;var o=this.Qt(this.Gt);e.zt=o.zt,t.Et=this.Gt.ii(o.D,r),t.U=!0}}},i}(J),Q=/[1-9]/g,K=function(){function t(){this.tt=null}return t.prototype._=function(t){this.tt=t},t.prototype.h=function(t,i,e){var n=this;if(null!==this.tt&&!1!==this.tt.U&&0!==this.tt.Et.length){t.font=i.Nt;var r=Math.round(i.ni.Vt(t,this.tt.Et,Q));if(!(r<=0)){t.save();var s=i.si,o=r+2*s,h=o/2,a=this.tt.wt,u=this.tt.zt,l=Math.floor(u-h)+.5;l<0?(u+=Math.abs(0-l),l=Math.floor(u-h)+.5):l+o>a&&(u-=Math.abs(a-(l+o)),l=Math.floor(u-h)+.5);var c=l+o,f=0+i.At+i.Tt+i.Wt+i.Bt;t.fillStyle=this.tt.yt;var p=Math.round(l*e),d=Math.round(0*e),y=Math.round(c*e),g=Math.round(f*e);t.fillRect(p,d,y-p,g-d);var m=Math.round(this.tt.zt*e),w=Math.round((d+i.At+i.Dt)*e);t.fillStyle=this.tt.et;var b=Math.max(1,Math.floor(e)),M=Math.floor(.5*e);t.fillRect(m-M,d,b,w-d);var _=f-i.Ot-i.Bt;t.textAlign="left",t.fillStyle=this.tt.et,B(t,e,function(){t.fillText(v(n.tt).Et,l+s,_)}),t.restore()}}},t}(),tt=function(){function t(t,i,e){this.L=!0,this.ot=new K,this.at={U:!1,yt:"#4c525e",et:"white",Et:"",wt:0,zt:NaN},this.V=t,this.hi=i,this.Qt=e}return t.prototype.O=function(){this.L=!0},t.prototype.P=function(){return this.L&&(this.R(),this.L=!1),this.ot._(this.at),this.ot},t.prototype.R=function(){var t=this.at;t.U=!1;var i=this.V.ct().vertLine;if(i.labelVisible){var e=this.hi.j();if(!e.ti()){var n=e.ri(this.V.I());t.wt=e.wt();var r=this.Qt();if(r.S){t.zt=r.zt,t.Et=e.ei(v(n)),t.U=!0;var s=A(i.labelBackgroundColor);t.yt=s.yt,t.et=s.kt}}}},t}(),ti=function(){function t(){this.ui=null,this.ai=0}return t.prototype.oi=function(){return this.ai},t.prototype.li=function(t){this.ai=t},t.prototype.$=function(){return this.ui},t.prototype.fi=function(t){this.ui=t},t.prototype.ci=function(){return[]},t.prototype.U=function(){return!0},t}();(tg=X||(X={}))[tg.Normal=0]="Normal",tg[tg.Magnet=1]="Magnet";var te=function(t){function i(i,e){var n,r,s,o,h=t.call(this)||this;h.vi=null,h._i=NaN,h.di=0,h.wi=!0,h.Mi=new Map,h.bi=!1,h.mi=NaN,h.pi=NaN,h.gi=NaN,h.yi=NaN,h.hi=i,h.ki=e,h.Ci=new D(i,h),h.Ni=(s=function(){return h._i},o=function(){return h.pi},function(t){var i=o(),e=s();if(t===v(h.vi).xi())return{D:e,zt:i};var n=v(t.H());return{D:t.Si(i,n),zt:i}});var a=(n=function(){return h.di},r=function(){return h.bt()},function(){return{S:h.hi.j().ri(n()),zt:r()}});return h.Di=new tt(h,i,a),h.Ai=new E(h),h}return u(i,t),i.prototype.ct=function(){return this.ki},i.prototype.Ti=function(t,i){this.gi=t,this.yi=i},i.prototype.Bi=function(){this.gi=NaN,this.yi=NaN},i.prototype.Li=function(){return this.gi},i.prototype.Fi=function(){return this.yi},i.prototype.Ei=function(t,i,e){this.bi||(this.bi=!0),this.wi=!0,this.Vi(t,i,e)},i.prototype.I=function(){return this.di},i.prototype.bt=function(){return this.mi},i.prototype.gt=function(){return this.pi},i.prototype.U=function(){return this.wi},i.prototype.Oi=function(){this.wi=!1,this.Wi(),this._i=NaN,this.mi=NaN,this.pi=NaN,this.vi=null,this.Bi()},i.prototype.zi=function(t){return null!==this.vi?[this.Ai,this.Ci]:[]},i.prototype._t=function(t){return t===this.vi&&this.ki.horzLine.visible},i.prototype.dt=function(){return this.ki.vertLine.visible},i.prototype.Pi=function(t,i){this.wi&&this.vi===t||this.Mi.clear();var e=[];return this.vi===t&&e.push(this.Ri(this.Mi,i,this.Ni)),e},i.prototype.ci=function(){return this.wi?[this.Di]:[]},i.prototype.ft=function(){return this.vi},i.prototype.Ii=function(){this.Ai.O(),this.Mi.forEach(function(t){return t.O()}),this.Di.O(),this.Ci.O()},i.prototype.ji=function(t){return t&&!t.xi().ti()?t.xi():null},i.prototype.Vi=function(t,i,e){this.qi(t,i,e)&&this.Ii()},i.prototype.qi=function(t,i,e){var n=this.mi,r=this.pi,s=this._i,o=this.di,h=this.vi,a=this.ji(e);this.di=t,this.mi=isNaN(t)?NaN:this.hi.j().G(t),this.vi=e;var u=null!==a?a.H():null;return null!==a&&null!==u?(this._i=i,this.pi=a.K(i,u)):(this._i=NaN,this.pi=NaN),n!==this.mi||r!==this.pi||o!==this.di||s!==this._i||h!==this.vi},i.prototype.Wi=function(){var t=this.hi.W().map(function(t){return t.Hi().Ui()}).filter(_),i=0===t.length?null:Math.max.apply(Math,t);this.di=null!==i?i:NaN},i.prototype.Ri=function(t,i,e){var n=t.get(i);return void 0===n&&(n=new Y(this,i,e),t.set(i,n)),n},i}(ti);function tn(t,i){if(!g(t))return"n/a";if(!m(i)||i<0||i>16)throw TypeError("invalid length");return 0===i?t.toString():("0000000000000000"+t.toString()).slice(-i)}var tr=function(){function t(t,i){if(i||(i=1),g(t)&&m(t)||(t=100),t<0)throw TypeError("invalid base");this.Gt=t,this.Yi=i,this.Ki()}return t.prototype.format=function(t){var i=t<0?"−":"";return t=Math.abs(t),i+this.$i(t)},t.prototype.Ki=function(){if(this.Xi=0,this.Gt>0&&this.Yi>0)for(var t=this.Gt;t>1;)t/=10,this.Xi++},t.prototype.$i=function(t){var i=this.Gt/this.Yi,e=Math.floor(t),n="",r=void 0!==this.Xi?this.Xi:NaN;if(i>1){var s=+(Math.round(t*i)-e*i).toFixed(this.Xi);s>=i&&(s-=i,e+=1),n="."+tn(+s.toFixed(this.Xi)*this.Yi,r)}else e=Math.round(e*i)/i,r>0&&(n="."+tn(0,r));return e.toFixed(0)+n},t}(),ts=function(t){function i(i){return void 0===i&&(i=100),t.call(this,i)||this}return u(i,t),i.prototype.format=function(i){return t.prototype.format.call(this,i)+"%"},i}(tr),to=function(){function t(){this.Zi=[]}return t.prototype.Ji=function(t,i,e){this.Zi.push({Gi:t,Qi:i,tn:!0===e})},t.prototype.nn=function(t){var i=this.Zi.findIndex(function(i){return t===i.Gi});i>-1&&this.Zi.splice(i,1)},t.prototype.sn=function(t){this.Zi=this.Zi.filter(function(i){return i.Qi===t})},t.prototype.hn=function(t,i){var e=c([],this.Zi,!0);this.Zi=this.Zi.filter(function(t){return!t.tn}),e.forEach(function(e){return e.Gi(t,i)})},t.prototype.rn=function(){return this.Zi.length>0},t.prototype.en=function(){this.Zi=[]},t}(),th=function(){function t(t,i){this.un=t,this.an=i}return t.prototype.on=function(t){return null!==t&&this.un===t.un&&this.an===t.an},t.prototype.ln=function(){return new t(this.un,this.an)},t.prototype.fn=function(){return this.un},t.prototype.cn=function(){return this.an},t.prototype.vn=function(){return this.an-this.un},t.prototype.ti=function(){return this.an===this.un||Number.isNaN(this.an)||Number.isNaN(this.un)},t.prototype._n=function(i){return null===i?this:new t(Math.min(this.fn(),i.fn()),Math.max(this.cn(),i.cn()))},t.prototype.dn=function(t){if(g(t)&&0!=this.an-this.un){var i=.5*(this.an+this.un),e=this.an-i,n=this.un-i;e*=t,n*=t,this.an=i+e,this.un=i+n}},t.prototype.wn=function(t){g(t)&&(this.an+=t,this.un+=t)},t.prototype.Mn=function(){return{minValue:this.un,maxValue:this.an}},t.bn=function(i){return null===i?null:new t(i.minValue,i.maxValue)},t}();function ta(t,i,e){return Math.min(Math.max(t,i),e)}function tu(t){return t<=0?NaN:Math.log(t)/Math.log(10)}function tl(t){var i=Math.ceil(t);return i%2!=0?i-1:i}function tc(t){var i=Math.ceil(t);return i%2==0?i-1:i}function tf(t,i){var e=100*(t-i)/i;return i<0?-e:e}function tp(t,i){var e=100*(t-i)/i+100;return i<0?-e:e}function tv(t){var i=Math.abs(t);if(i<1e-8)return 0;var e=tu(i+1e-4)+4;return t<0?-e:e}function td(t){var i=Math.abs(t);if(i<1e-8)return 0;var e=Math.pow(10,i-4)-1e-4;return t<0?-e:e}function ty(t){return null===t?null:new th(tv(t.fn()),tv(t.cn()))}var tg,tm,tw=function(){function t(t,i){if(this.mn=t,this.pn=i,function(t){if(t<0)return!1;for(var i=t;i>1;i/=10)if(i%10!=0)return!1;return!0}(this.mn))this.gn=[2,2.5,2];else{this.gn=[];for(var e=this.mn;1!==e;){if(e%2==0)this.gn.push(2),e/=2;else{if(e%5!=0)throw Error("unexpected base");this.gn.push(2,2.5),e/=5}if(this.gn.length>100)throw Error("something wrong with base")}}}return t.prototype.yn=function(t,i,e){for(var n=0===this.mn?0:1/this.mn,r=Math.pow(10,Math.max(0,Math.ceil(tu(t-i)))),s=0,o=this.pn[0];;){var h=n-r<=1e-14&&r>n+1e-14,a=e*o-r<=1e-14,u=1-r<=1e-14;if(!(h&&a&&u))break;r/=o,o=this.pn[++s%this.pn.length]}if(r<=n+1e-14&&(r=n),r=Math.max(1,r),this.gn.length>0&&1e-14>Math.abs(r-1))for(s=0,o=this.gn[0];e*o-r<=1e-14&&r>n+1e-14;)r/=o,o=this.gn[++s%this.gn.length];return r},t}(),tb=function(){function t(t,i,e,n){this.kn=[],this.Gt=t,this.mn=i,this.Cn=e,this.Nn=n}return t.prototype.yn=function(t,i){if(t<i)throw Error("high < low");var e=this.Gt.Mt(),n=(t-i)*this.xn()/e,r=new tw(this.mn,[2,2.5,2]),s=new tw(this.mn,[2,2,2.5]),o=new tw(this.mn,[2.5,2,2]),h=[];return h.push(r.yn(t,i,n),s.yn(t,i,n),o.yn(t,i,n)),function(t){if(t.length<1)throw Error("array is empty");for(var i=t[0],e=1;e<t.length;++e)t[e]<i&&(i=t[e]);return i}(h)},t.prototype.Sn=function(){var t=this.Gt,i=t.H();if(null!==i){var e=t.Mt(),n=this.Cn(e-1,i),r=this.Cn(0,i),s=this.Gt.ct().entireTextOnly?this.Dn()/2:0,o=e-1-s,h=Math.max(n,r),a=Math.min(n,r);if(h!==a){for(var u=this.yn(h,a),l=h%u,c=h>=a?1:-1,f=null,p=0,v=h-(l+=l<0?u:0);v>a;v-=u){var d=this.Nn(v,i,!0);null!==f&&Math.abs(d-f)<this.xn()||d<s||d>o||(p<this.kn.length?(this.kn[p].An=d,this.kn[p].Tn=t.Bn(v)):this.kn.push({An:d,Tn:t.Bn(v)}),p++,f=d,t.Ln()&&(u=this.yn(v*c,a)))}this.kn.length=p}else this.kn=[]}else this.kn=[]},t.prototype.Fn=function(){return this.kn},t.prototype.Dn=function(){return this.Gt.Wt()},t.prototype.xn=function(){return Math.ceil(2.5*this.Dn())},t}();function tM(t){return t.slice().sort(function(t,i){return v(t.oi())-v(i.oi())})}(t_=tm||(tm={}))[t_.Normal=0]="Normal",t_[t_.Logarithmic=1]="Logarithmic",t_[t_.Percentage=2]="Percentage",t_[t_.IndexedTo100=3]="IndexedTo100";var t_,tS,tk,tx=new ts,tC=new tr(100,1),tL=function(){function t(t,i,e,n){this.En=0,this.Vn=null,this.On=null,this.Wn=null,this.zn={Pn:!1,Rn:null},this.In=0,this.jn=0,this.qn=new to,this.Un=new to,this.Hn=[],this.Yn=null,this.Kn=null,this.$n=null,this.Xn=null,this.Zn=tC,this.Jn=t,this.ki=i,this.Gn=e,this.Qn=n,this.ts=new tb(this,100,this.ns.bind(this),this.ss.bind(this))}return t.prototype.hs=function(){return this.Jn},t.prototype.ct=function(){return this.ki},t.prototype.rs=function(t){if(y(this.ki,t),this.es(),void 0!==t.mode&&this.us({os:t.mode}),void 0!==t.scaleMargins){var i=p(t.scaleMargins.top),e=p(t.scaleMargins.bottom);if(i<0||i>1)throw Error("Invalid top margin - expect value between 0 and 1, given="+i);if(e<0||e>1||i+e>1)throw Error("Invalid bottom margin - expect value between 0 and 1, given="+e);if(i+e>1)throw Error("Invalid margins - sum of margins must be less than 1, given="+(i+e));this.ls(),this.Kn=null}},t.prototype.fs=function(){return this.ki.autoScale},t.prototype.Ln=function(){return 1===this.ki.mode},t.prototype.cs=function(){return 2===this.ki.mode},t.prototype.vs=function(){return 3===this.ki.mode},t.prototype.os=function(){return{_s:this.ki.autoScale,ds:this.ki.invertScale,os:this.ki.mode}},t.prototype.us=function(t){var i,e=this.os(),n=null;void 0!==t._s&&(this.ki.autoScale=t._s),void 0!==t.os&&(this.ki.mode=t.os,2!==t.os&&3!==t.os||(this.ki.autoScale=!0),this.zn.Pn=!1),1===e.os&&t.os!==e.os&&(function(t){if(null===t)return!1;var i=td(t.fn()),e=td(t.cn());return isFinite(i)&&isFinite(e)}(this.On)?null!==(n=null===(i=this.On)?null:new th(td(i.fn()),td(i.cn())))&&this.ws(n):this.ki.autoScale=!0),1===t.os&&t.os!==e.os&&null!==(n=ty(this.On))&&this.ws(n);var r=e.os!==this.ki.mode;r&&(2===e.os||this.cs())&&this.es(),r&&(3===e.os||this.vs())&&this.es(),void 0!==t.ds&&e.ds!==t.ds&&(this.ki.invertScale=t.ds,this.Ms()),this.Un.hn(e,this.os())},t.prototype.bs=function(){return this.Un},t.prototype.Wt=function(){return this.Gn.fontSize},t.prototype.Mt=function(){return this.En},t.prototype.ps=function(t){this.En!==t&&(this.En=t,this.ls(),this.Kn=null)},t.prototype.gs=function(){if(this.Vn)return this.Vn;var t=this.Mt()-this.ys()-this.ks();return this.Vn=t,t},t.prototype.Cs=function(){return this.Ns(),this.On},t.prototype.ws=function(t,i){var e=this.On;(i||null===e&&null!==t||null!==e&&!e.on(t))&&(this.Kn=null,this.On=t)},t.prototype.ti=function(){return this.Ns(),0===this.En||!this.On||this.On.ti()},t.prototype.xs=function(t){return this.ds()?t:this.Mt()-1-t},t.prototype.K=function(t,i){return this.cs()?t=tf(t,i):this.vs()&&(t=tp(t,i)),this.ss(t,i)},t.prototype.Ss=function(t,i,e){this.Ns();for(var n=this.ks(),r=v(this.Cs()),s=r.fn(),o=r.cn(),h=this.gs()-1,a=this.ds(),u=h/(o-s),l=void 0===e?0:e.from,c=void 0===e?t.length:e.to,f=this.Ds(),p=l;p<c;p++){var d=t[p],y=d.D;if(!isNaN(y)){var g=y;null!==f&&(g=f(d.D,i));var m=n+u*(g-s),w=a?m:this.En-1-m;d.g=w}}},t.prototype.As=function(t,i,e){this.Ns();for(var n=this.ks(),r=v(this.Cs()),s=r.fn(),o=r.cn(),h=this.gs()-1,a=this.ds(),u=h/(o-s),l=void 0===e?0:e.from,c=void 0===e?t.length:e.to,f=this.Ds(),p=l;p<c;p++){var d=t[p],y=d.open,g=d.high,m=d.low,w=d.close;null!==f&&(y=f(d.open,i),g=f(d.high,i),m=f(d.low,i),w=f(d.close,i));var b=n+u*(y-s),M=a?b:this.En-1-b;d.Ts=M,b=n+u*(g-s),M=a?b:this.En-1-b,d.Bs=M,b=n+u*(m-s),M=a?b:this.En-1-b,d.Ls=M,b=n+u*(w-s),M=a?b:this.En-1-b,d.Fs=M}},t.prototype.Si=function(t,i){var e=this.ns(t,i);return this.Es(e,i)},t.prototype.Es=function(t,i){var e,n,r=t;return this.cs()?(e=r,i<0&&(e=-e),r=e/100*i+i):this.vs()&&(n=r-100,i<0&&(n=-n),r=n/100*i+i),r},t.prototype.Vs=function(){return this.Hn},t.prototype.Os=function(){if(this.Yn)return this.Yn;for(var t=[],i=0;i<this.Hn.length;i++){var e=this.Hn[i];null===e.oi()&&e.li(i+1),t.push(e)}return t=tM(t),this.Yn=t,this.Yn},t.prototype.Ws=function(t){-1===this.Hn.indexOf(t)&&(this.Hn.push(t),this.es(),this.zs())},t.prototype.Ps=function(t){var i=this.Hn.indexOf(t);if(-1===i)throw Error("source is not attached to scale");this.Hn.splice(i,1),0===this.Hn.length&&(this.us({_s:!0}),this.ws(null)),this.es(),this.zs()},t.prototype.H=function(){for(var t=null,i=0,e=this.Hn;i<e.length;i++){var n=e[i].H();null!==n&&(null===t||n.Rs<t.Rs)&&(t=n)}return null===t?null:t.X},t.prototype.ds=function(){return this.ki.invertScale},t.prototype.Fn=function(){return this.Kn||(this.ts.Sn(),this.Kn=this.ts.Fn(),this.qn.hn()),this.Kn},t.prototype.Is=function(){return this.qn},t.prototype.js=function(t){this.cs()||this.vs()||null===this.$n&&null===this.Wn&&(this.ti()||(this.$n=this.En-t,this.Wn=v(this.Cs()).ln()))},t.prototype.qs=function(t){if(!this.cs()&&!this.vs()&&null!==this.$n){this.us({_s:!1}),(t=this.En-t)<0&&(t=0);var i=(this.$n+.2*(this.En-1))/(t+.2*(this.En-1)),e=v(this.Wn).ln();i=Math.max(i,.1),e.dn(i),this.ws(e)}},t.prototype.Us=function(){this.cs()||this.vs()||(this.$n=null,this.Wn=null)},t.prototype.Hs=function(t){this.fs()||null===this.Xn&&null===this.Wn&&(this.ti()||(this.Xn=t,this.Wn=v(this.Cs()).ln()))},t.prototype.Ys=function(t){if(!this.fs()&&null!==this.Xn){var i=v(this.Cs()).vn()/(this.gs()-1),e=t-this.Xn;this.ds()&&(e*=-1);var n=e*i,r=v(this.Wn).ln();r.wn(n),this.ws(r,!0),this.Kn=null}},t.prototype.Ks=function(){this.fs()||null!==this.Xn&&(this.Xn=null,this.Wn=null)},t.prototype.$s=function(){return this.Zn||this.es(),this.Zn},t.prototype.ii=function(t,i){switch(this.ki.mode){case 2:return this.$s().format(tf(t,i));case 3:return this.$s().format(tp(t,i));default:return this.Xs(t)}},t.prototype.Bn=function(t){switch(this.ki.mode){case 2:case 3:return this.$s().format(t);default:return this.Xs(t)}},t.prototype.Zs=function(t){return this.Xs(t,v(this.Js()).$s())},t.prototype.Gs=function(t,i){return t=tf(t,i),tx.format(t)},t.prototype.Qs=function(){return this.Hn},t.prototype.th=function(t){this.zn={Rn:t,Pn:!1}},t.prototype.Ii=function(){this.Hn.forEach(function(t){return t.Ii()})},t.prototype.es=function(){this.Kn=null;var t=this.Js(),i=100;null!==t&&(i=Math.round(1/t.ih())),this.Zn=tC,this.cs()?(this.Zn=tx,i=100):this.vs()?(this.Zn=new tr(100,1),i=100):null!==t&&(this.Zn=t.$s()),this.ts=new tb(this,i,this.ns.bind(this),this.ss.bind(this)),this.ts.Sn()},t.prototype.zs=function(){this.Yn=null},t.prototype.Js=function(){return this.Hn[0]||null},t.prototype.ys=function(){return this.ds()?this.ki.scaleMargins.bottom*this.Mt()+this.jn:this.ki.scaleMargins.top*this.Mt()+this.In},t.prototype.ks=function(){return this.ds()?this.ki.scaleMargins.top*this.Mt()+this.In:this.ki.scaleMargins.bottom*this.Mt()+this.jn},t.prototype.Ns=function(){this.zn.Pn||(this.zn.Pn=!0,this.nh())},t.prototype.ls=function(){this.Vn=null},t.prototype.ss=function(t,i){if(this.Ns(),this.ti())return 0;t=this.Ln()&&t?tv(t):t;var e=v(this.Cs()),n=this.ks()+(this.gs()-1)*(t-e.fn())/e.vn();return this.xs(n)},t.prototype.ns=function(t,i){if(this.Ns(),this.ti())return 0;var e=this.xs(t),n=v(this.Cs()),r=n.fn()+n.vn()*((e-this.ks())/(this.gs()-1));return this.Ln()?td(r):r},t.prototype.Ms=function(){this.Kn=null,this.ts.Sn()},t.prototype.nh=function(){var t=this.zn.Rn;if(null!==t){for(var i=null,e=0,n=0,r=0,s=this.Qs();r<s.length;r++){var o=s[r];if(o.U()){var h=o.H();if(null!==h){var a=o.sh(t.hh(),t.rh()),u=a&&a.Cs();if(null!==u){switch(this.ki.mode){case 1:u=ty(u);break;case 2:l=u,c=h.X,u=new th(tf(l.fn(),c),tf(l.cn(),c));break;case 3:f=u,p=h.X,u=new th(tp(f.fn(),p),tp(f.cn(),p))}if(i=null===i?u:i._n(v(u)),null!==a){var l,c,f,p,d=a.eh();null!==d&&(n=Math.max(e=Math.max(e,d.above),d.below))}}}}}if(e===this.In&&n===this.jn||(this.In=e,this.jn=n,this.Kn=null,this.ls()),null!==i){if(i.fn()===i.cn()){var y=this.Js(),g=5*(null===y||this.cs()||this.vs()?1:y.ih());i=new th(i.fn()-g,i.cn()+g)}this.ws(i)}else null===this.On&&this.ws(new th(-.5,.5));this.zn.Pn=!0}},t.prototype.Ds=function(){return this.cs()?tf:this.vs()?tp:this.Ln()?tv:null},t.prototype.Xs=function(t,i){return void 0===this.Qn.priceFormatter?(void 0===i&&(i=this.$s()),i.format(t)):this.Qn.priceFormatter(t)},t}();function tT(t){void 0!==t.borderColor&&(t.borderUpColor=t.borderColor,t.borderDownColor=t.borderColor),void 0!==t.wickColor&&(t.wickUpColor=t.wickColor,t.wickDownColor=t.wickColor)}(tR=tS||(tS={}))[tR.Disabled=0]="Disabled",tR[tR.Continuous=1]="Continuous",tR[tR.OnDataUpdate=2]="OnDataUpdate",(tA=tk||(tk={}))[tA.LastBar=0]="LastBar",tA[tA.LastVisible=1]="LastVisible";var tD=function(t){return t.getUTCFullYear()},tN=function(){function t(t,i){void 0===t&&(t="yyyy-MM-dd"),void 0===i&&(i="default"),this.uh=t,this.ah=i}return t.prototype.oh=function(t){var i,e,n;return i=t,e=this.uh,n=this.ah,e.replace(/yyyy/g,tn(tD(i),4)).replace(/yy/g,tn(tD(i)%100,2)).replace(/MMMM/g,new Date(i.getUTCFullYear(),i.getUTCMonth(),1).toLocaleString(n,{month:"long"})).replace(/MMM/g,new Date(i.getUTCFullYear(),i.getUTCMonth(),1).toLocaleString(n,{month:"short"})).replace(/MM/g,tn(i.getUTCMonth()+1,2)).replace(/dd/g,tn(i.getUTCDate(),2))},t}(),tE=function(){function t(t){this.lh=t||"%h:%m:%s"}return t.prototype.oh=function(t){return this.lh.replace("%h",tn(t.getUTCHours(),2)).replace("%m",tn(t.getUTCMinutes(),2)).replace("%s",tn(t.getUTCSeconds(),2))},t}(),tP={fh:"yyyy-MM-dd",_h:"%h:%m:%s",dh:" ",wh:"default"},tO=function(){function t(t){void 0===t&&(t={});var i=l(l({},tP),t);this.Mh=new tN(i.fh,i.wh),this.bh=new tE(i._h),this.mh=i.dh}return t.prototype.oh=function(t){return""+this.Mh.oh(t)+this.mh+this.bh.oh(t)},t}();function tj(t,i,e,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);for(var s=r-n;0<s;){var o=s>>1,h=n+o;e(t[h],i)?(n=h+1,s-=o+1):s=o}return n}function tz(t,i,e,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);for(var s=r-n;0<s;){var o=s>>1,h=n+o;e(i,t[h])?s=o:(n=h+1,s-=o+1)}return n}var t$=function(){function t(t,i){void 0===i&&(i=50),this.ph=0,this.gh=1,this.yh=1,this.kh=new Map,this.Ch=new Map,this.Nh=t,this.xh=i}return t.prototype.oh=function(t){var i=void 0===t.Sh?new Date(1e3*t.Dh).getTime():new Date(Date.UTC(t.Sh.year,t.Sh.month-1,t.Sh.day)).getTime(),e=this.kh.get(i);if(void 0!==e)return e.Ah;if(this.ph===this.xh){var n=this.Ch.get(this.yh);this.Ch.delete(this.yh),this.kh.delete(p(n)),this.yh++,this.ph--}var r=this.Nh(t);return this.kh.set(i,{Ah:r,Th:this.gh}),this.Ch.set(this.gh,i),this.ph++,this.gh++,r},t}(),tF=function(){function t(t,i){f(t<=i,"right should be >= left"),this.Bh=t,this.Lh=i}return t.prototype.hh=function(){return this.Bh},t.prototype.rh=function(){return this.Lh},t.prototype.Fh=function(){return this.Lh-this.Bh+1},t.prototype.Eh=function(t){return this.Bh<=t&&t<=this.Lh},t.prototype.on=function(t){return this.Bh===t.hh()&&this.Lh===t.rh()},t}();function tU(t,i){return null===t||null===i?t===i:t.on(i)}var tR,tA,tB,tI=function(){function t(){this.Vh=new Map,this.kh=null}return t.prototype.Oh=function(t,i){this.Wh(i),this.kh=null;for(var e=i;e<t.length;++e){var n=t[e],r=this.Vh.get(n.zh);void 0===r&&(r=[],this.Vh.set(n.zh,r)),r.push({Ph:e,S:n.S,Rh:n.zh})}},t.prototype.Ih=function(t,i){var e=Math.ceil(i/t);return null!==this.kh&&this.kh.jh===e||(this.kh={Fn:this.qh(e),jh:e}),this.kh.Fn},t.prototype.Wh=function(t){if(0!==t){var i=[];this.Vh.forEach(function(e,n){t<=e[0].Ph?i.push(n):e.splice(tj(e,t,function(i){return i.Ph<t}),1/0)});for(var e=0;e<i.length;e++){var n=i[e];this.Vh.delete(n)}}else this.Vh.clear()},t.prototype.qh=function(t){for(var i=[],e=0,n=Array.from(this.Vh.keys()).sort(function(t,i){return i-t});e<n.length;e++){var r=n[e];if(this.Vh.get(r)){var s=i;i=[];for(var o=s.length,h=0,a=p(this.Vh.get(r)),u=a.length,l=1/0,c=-1/0,f=0;f<u;f++){for(var v=a[f],d=v.Ph;h<o;){var y=s[h],g=y.Ph;if(!(g<d)){l=g;break}h++,i.push(y),c=g,l=1/0}l-d>=t&&d-c>=t&&(i.push(v),c=d)}for(;h<o;h++)i.push(s[h])}}return i},t}(),tW=function(){function t(t){this.Uh=t}return t.prototype.Hh=function(){return null===this.Uh?null:new tF(Math.floor(this.Uh.hh()),Math.ceil(this.Uh.rh()))},t.prototype.Yh=function(){return this.Uh},t.Kh=function(){return new t(null)},t}();(tV=tB||(tB={}))[tV.Year=0]="Year",tV[tV.Month=1]="Month",tV[tV.DayOfMonth=2]="DayOfMonth",tV[tV.Time=3]="Time",tV[tV.TimeWithSeconds=4]="TimeWithSeconds";var tV,tZ,tq=function(){function t(t,i,e){this.$h=0,this.Xh=null,this.Zh=[],this.Xn=null,this.$n=null,this.Jh=new tI,this.Gh=new Map,this.Qh=tW.Kh(),this.tr=!0,this.ir=new to,this.nr=new to,this.sr=new to,this.hr=null,this.rr=null,this.er=[],this.ki=i,this.Qn=e,this.ur=i.rightOffset,this.ar=i.barSpacing,this.hi=t,this.lr()}return t.prototype.ct=function(){return this.ki},t.prototype.cr=function(t){y(this.Qn,t),this.vr(),this.lr()},t.prototype.rs=function(t,i){var e;y(this.ki,t),this.ki.fixLeftEdge&&this._r(),this.ki.fixRightEdge&&this.dr(),void 0!==t.barSpacing&&this.hi.wr(t.barSpacing),void 0!==t.rightOffset&&this.hi.Mr(t.rightOffset),void 0!==t.minBarSpacing&&this.hi.wr(null!==(e=t.barSpacing)&&void 0!==e?e:this.ar),this.vr(),this.lr(),this.sr.hn()},t.prototype.ri=function(t){var i;return(null===(i=this.Zh[t])||void 0===i?void 0:i.S)||null},t.prototype.br=function(t,i){if(this.Zh.length<1)return null;if(t.Dh>this.Zh[this.Zh.length-1].S.Dh)return i?this.Zh.length-1:null;var e=tj(this.Zh,t.Dh,function(t,i){return t.S.Dh<i});return t.Dh<this.Zh[e].S.Dh?i?e:null:e},t.prototype.ti=function(){return 0===this.$h||0===this.Zh.length},t.prototype.mr=function(){return this.pr(),this.Qh.Hh()},t.prototype.gr=function(){return this.pr(),this.Qh.Yh()},t.prototype.yr=function(){var t=this.mr();if(null===t)return null;var i={from:t.hh(),to:t.rh()};return this.kr(i)},t.prototype.kr=function(t){var i=Math.round(t.from),e=Math.round(t.to),n=v(this.Cr()),r=v(this.Nr());return{from:v(this.ri(Math.max(n,i))),to:v(this.ri(Math.min(r,e)))}},t.prototype.Sr=function(t){return{from:v(this.br(t.from,!0)),to:v(this.br(t.to,!0))}},t.prototype.wt=function(){return this.$h},t.prototype.Dr=function(t){if(isFinite(t)&&!(t<=0)&&this.$h!==t){if(this.ki.lockVisibleTimeRangeOnResize&&this.$h){var i=this.ar*t/this.$h;this.ar=i}if(this.ki.fixLeftEdge){var e=this.mr();if(null!==e&&0>=e.hh()){var n=this.$h-t;this.ur-=Math.round(n/this.ar)+1}}this.$h=t,this.tr=!0,this.Ar(),this.Tr()}},t.prototype.G=function(t){if(this.ti()||!m(t))return 0;var i=this.Br()+this.ur-t;return this.$h-(i+.5)*this.ar-1},t.prototype.Lr=function(t,i){for(var e=this.Br(),n=void 0===i?0:i.from,r=void 0===i?t.length:i.to,s=n;s<r;s++){var o=t[s].S,h=e+this.ur-o,a=this.$h-(h+.5)*this.ar-1;t[s].p=a}},t.prototype.Fr=function(t){return Math.ceil(this.Er(t))},t.prototype.Mr=function(t){this.tr=!0,this.ur=t,this.Tr(),this.hi.Vr(),this.hi.Or()},t.prototype.Wr=function(){return this.ar},t.prototype.wr=function(t){this.zr(t),this.Tr(),this.hi.Vr(),this.hi.Or()},t.prototype.Pr=function(){return this.ur},t.prototype.Fn=function(){if(this.ti())return null;if(null!==this.rr)return this.rr;for(var t=this.ar,i=5*(this.hi.ct().layout.fontSize+4),e=Math.round(i/t),n=v(this.mr()),r=Math.max(n.hh(),n.hh()-e),s=Math.max(n.rh(),n.rh()-e),o=this.Jh.Ih(t,i),h=this.Cr()+e,a=this.Nr()-e,u=0,l=0;l<o.length;l++){var c=o[l];if(r<=c.Ph&&c.Ph<=s){var f=void 0;u<this.er.length?((f=this.er[u]).An=this.G(c.Ph),f.Tn=this.Rr(c.S,c.Rh),f.Rh=c.Rh):(f={Ir:!1,An:this.G(c.Ph),Tn:this.Rr(c.S,c.Rh),Rh:c.Rh},this.er.push(f)),this.ar>i/2?f.Ir=!1:f.Ir=this.ki.fixLeftEdge&&c.Ph<=h||this.ki.fixRightEdge&&c.Ph>=a,u++}}return this.er.length=u,this.rr=this.er,this.er},t.prototype.jr=function(){this.tr=!0,this.wr(this.ki.barSpacing),this.Mr(this.ki.rightOffset)},t.prototype.qr=function(t){this.tr=!0,this.Xh=t,this.Tr(),this._r()},t.prototype.Ur=function(t,i){var e=this.Er(t),n=this.Wr();this.wr(n+n/10*i),this.ki.rightBarStaysOnScroll||this.Mr(this.Pr()+(e-this.Er(t)))},t.prototype.js=function(t){this.Xn&&this.Ks(),null===this.$n&&null===this.hr&&(this.ti()||(this.$n=t,this.Hr()))},t.prototype.qs=function(t){if(null!==this.hr){var i=ta(this.$h-t,0,this.$h),e=ta(this.$h-v(this.$n),0,this.$h);0!==i&&0!==e&&this.wr(this.hr.Wr*i/e)}},t.prototype.Us=function(){null!==this.$n&&(this.$n=null,this.Yr())},t.prototype.Hs=function(t){null===this.Xn&&null===this.hr&&(this.ti()||(this.Xn=t,this.Hr()))},t.prototype.Ys=function(t){if(null!==this.Xn){var i=(this.Xn-t)/this.Wr();this.ur=v(this.hr).Pr+i,this.tr=!0,this.Tr()}},t.prototype.Ks=function(){null!==this.Xn&&(this.Xn=null,this.Yr())},t.prototype.Kr=function(){this.$r(this.ki.rightOffset)},t.prototype.$r=function(t,i){var e=this;if(void 0===i&&(i=400),!isFinite(t))throw RangeError("offset is required and must be finite number");if(!isFinite(i)||i<=0)throw RangeError("animationDuration (optional) must be finite positive number");var n=this.ur,r=performance.now(),s=function(){var o=(performance.now()-r)/i,h=o>=1;e.Mr(h?t:n+(t-n)*o),h||setTimeout(s,20)};s()},t.prototype.O=function(t,i){this.tr=!0,this.Zh=t,this.Jh.Oh(t,i),this.Tr()},t.prototype.Xr=function(){return this.ir},t.prototype.Zr=function(){return this.nr},t.prototype.Jr=function(){return this.sr},t.prototype.Br=function(){return this.Xh||0},t.prototype.Gr=function(t){var i=t.Fh();this.zr(this.$h/i),this.ur=t.rh()-this.Br(),this.Tr(),this.tr=!0,this.hi.Vr(),this.hi.Or()},t.prototype.Qr=function(){var t=this.Cr(),i=this.Nr();null!==t&&null!==i&&this.Gr(new tF(t,i+this.ki.rightOffset))},t.prototype.te=function(t){var i=new tF(t.from,t.to);this.Gr(i)},t.prototype.ei=function(t){return void 0!==this.Qn.timeFormatter?this.Qn.timeFormatter(t.Sh||t.Dh):this.ie.oh(new Date(1e3*t.Dh))},t.prototype.Cr=function(){return 0===this.Zh.length?null:0},t.prototype.Nr=function(){return 0===this.Zh.length?null:this.Zh.length-1},t.prototype.ne=function(t){return(this.$h-1-t)/this.ar},t.prototype.Er=function(t){var i=this.ne(t);return Math.round(1e6*(this.Br()+this.ur-i))/1e6},t.prototype.zr=function(t){var i=this.ar;this.ar=t,this.Ar(),i!==this.ar&&(this.tr=!0,this.se())},t.prototype.pr=function(){if(this.tr){if(this.tr=!1,this.ti())this.he(tW.Kh());else{var t=this.Br(),i=this.$h/this.ar,e=this.ur+t,n=new tF(e-i+1,e);this.he(new tW(n))}}},t.prototype.Ar=function(){var t=this.re();if(this.ar<t&&(this.ar=t,this.tr=!0),0!==this.$h){var i=.5*this.$h;this.ar>i&&(this.ar=i,this.tr=!0)}},t.prototype.re=function(){return this.ki.fixLeftEdge&&this.ki.fixRightEdge&&0!==this.Zh.length?this.$h/this.Zh.length:this.ki.minBarSpacing},t.prototype.Tr=function(){var t=this.ee();this.ur>t&&(this.ur=t,this.tr=!0);var i=this.ue();null!==i&&this.ur<i&&(this.ur=i,this.tr=!0)},t.prototype.ue=function(){var t=this.Cr(),i=this.Xh;return null===t||null===i?null:t-i-1+(this.ki.fixLeftEdge?this.$h/this.ar:Math.min(2,this.Zh.length))},t.prototype.ee=function(){return this.ki.fixRightEdge?0:this.$h/this.ar-Math.min(2,this.Zh.length)},t.prototype.Hr=function(){this.hr={Wr:this.Wr(),Pr:this.Pr()}},t.prototype.Yr=function(){this.hr=null},t.prototype.Rr=function(t,i){var e=this,n=this.Gh.get(i);return void 0===n&&(n=new t$(function(t){return e.ae(t,i)}),this.Gh.set(i,n)),n.oh(t)},t.prototype.ae=function(t,i){var e,n=function(t,i,e){switch(t){case 0:case 10:return i?e?4:3:2;case 20:case 21:case 22:case 30:case 31:case 32:case 33:return i?3:2;case 50:return 2;case 60:return 1;case 70:return 0}}(i,this.ki.timeVisible,this.ki.secondsVisible);return void 0!==this.ki.tickMarkFormatter?this.ki.tickMarkFormatter(null!==(e=t.Sh)&&void 0!==e?e:t.Dh,n,this.Qn.locale):function(t,i,e){var n={};switch(i){case 0:n.year="numeric";break;case 1:n.month="short";break;case 2:n.day="numeric";break;case 3:n.hour12=!1,n.hour="2-digit",n.minute="2-digit";break;case 4:n.hour12=!1,n.hour="2-digit",n.minute="2-digit",n.second="2-digit"}var r=new Date(void 0===t.Sh?1e3*t.Dh:Date.UTC(t.Sh.year,t.Sh.month-1,t.Sh.day));return new Date(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()).toLocaleString(e,n)}(t,n,this.Qn.locale)},t.prototype.he=function(t){var i=this.Qh;this.Qh=t,tU(i.Hh(),this.Qh.Hh())||this.ir.hn(),tU(i.Yh(),this.Qh.Yh())||this.nr.hn(),this.se()},t.prototype.se=function(){this.rr=null},t.prototype.vr=function(){this.se(),this.Gh.clear()},t.prototype.lr=function(){var t=this.Qn.dateFormat;this.ki.timeVisible?this.ie=new tO({fh:t,_h:this.ki.secondsVisible?"%h:%m:%s":"%h:%m",dh:"   ",wh:this.Qn.locale}):this.ie=new tN(t,this.Qn.locale)},t.prototype._r=function(){if(this.ki.fixLeftEdge){var t=this.Cr();if(null!==t){var i=this.mr();if(null!==i){var e=i.hh()-t;if(e<0){var n=this.ur-e-1;this.Mr(n)}this.Ar()}}}},t.prototype.dr=function(){this.Tr(),this.Ar()},t}();function tH(t){return!g(t)&&!w(t)}(n=tZ||(tZ={})).Solid="solid",n.VerticalGradient="gradient";var tX="'Trebuchet MS', Roboto, Ubuntu, sans-serif";function tG(t,i,e){return void 0!==e?e+=" ":e="",void 0===i&&(i=tX),""+e+t+"px "+i}var tJ=function(){function t(t){this.oe={At:1,Dt:4,Wt:NaN,Nt:"",le:"",et:"",Bt:0,Lt:0,Ft:0,Tt:0,Ot:0},this.F=t}return t.prototype.ct=function(){var t=this.oe,i=this.fe(),e=this.ce();return t.Wt===i&&t.le===e||(t.Wt=i,t.le=e,t.Nt=tG(i,e),t.Tt=Math.floor(i/3.5),t.Bt=t.Tt,t.Lt=Math.max(Math.ceil(i/2-t.Dt/2),0),t.Ft=Math.ceil(i/2+t.Dt/2),t.Ot=Math.round(i/10)),t.et=this.ve(),this.oe},t.prototype.ve=function(){return this.F.ct().layout.textColor},t.prototype.fe=function(){return this.F.ct().layout.fontSize},t.prototype.ce=function(){return this.F.ct().layout.fontFamily},t}();function tY(t){return"left"===t||"right"===t}var tQ=function(){function t(t){this._e=new Map,this.de=!1,this.we=[],this.Me=t}return t.prototype.be=function(t,i){var e,n=void 0===(e=this._e.get(t))?i:{me:Math.max(e.me,i.me),_s:e._s||i._s};this._e.set(t,n)},t.prototype.pe=function(){return this.Me},t.prototype.ge=function(t){var i=this._e.get(t);return void 0===i?{me:this.Me}:{me:Math.max(this.Me,i.me),_s:i._s}},t.prototype.ye=function(){this.we=[{ke:0}]},t.prototype.Ce=function(t){this.we=[{ke:1,X:t}]},t.prototype.Ne=function(){this.we=[{ke:4}]},t.prototype.wr=function(t){this.we.push({ke:2,X:t})},t.prototype.Mr=function(t){this.we.push({ke:3,X:t})},t.prototype.xe=function(){return this.we},t.prototype._n=function(t){var i=this;this.de=this.de||t.de,this.we=this.we.concat(t.we);for(var e=0,n=t.we;e<n.length;e++){var r=n[e];this.Se(r)}this.Me=Math.max(this.Me,t.Me),t._e.forEach(function(t,e){i.be(e,t)})},t.prototype.Se=function(t){switch(t.ke){case 0:this.ye();break;case 1:this.Ce(t.X);break;case 2:this.wr(t.X);break;case 3:this.Mr(t.X);break;case 4:this.Ne()}},t}(),tK=function(){function t(t){this.De=t}return t.prototype.format=function(t){var i="";return t<0&&(i="-",t=-t),t<995?i+this.Ae(t):t<999995?i+this.Ae(t/1e3)+"K":t<999999995?(t=1e3*Math.round(t/1e3),i+this.Ae(t/1e6)+"M"):(t=1e6*Math.round(t/1e6),i+this.Ae(t/1e9)+"B")},t.prototype.Ae=function(t){var i=Math.pow(10,this.De);return((t=Math.round(t*i)/i)>=1e-15&&t<1?t.toFixed(this.De).replace(/\.?0+$/,""):String(t)).replace(/(\.[1-9]*)0+$/,function(t,i){return i})},t}();function t0(t,i,e,n){if(0!==i.length){var r=i[n.from].p,s=i[n.from].g;t.moveTo(r,s);for(var o=n.from+1;o<n.to;++o){var h=i[o];if(1===e){var a=i[o-1].g,u=h.p;t.lineTo(u,a)}t.lineTo(h.p,h.g)}}}var t1=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.v=null,i}return u(i,t),i.prototype._=function(t){this.v=t},i.prototype.u=function(t){if(null!==this.v&&0!==this.v.m.length&&null!==this.v.M){if(t.lineCap="butt",t.lineJoin="round",t.lineWidth=this.v.rt,o(t,this.v.ut),t.lineWidth=1,t.beginPath(),1===this.v.m.length){var i=this.v.m[0],e=this.v.Te/2;t.moveTo(i.p-e,this.v.Be),t.lineTo(i.p-e,i.g),t.lineTo(i.p+e,i.g),t.lineTo(i.p+e,this.v.Be)}else t.moveTo(this.v.m[this.v.M.from].p,this.v.Be),t.lineTo(this.v.m[this.v.M.from].p,this.v.m[this.v.M.from].g),t0(t,this.v.m,this.v.Le,this.v.M),this.v.M.to>this.v.M.from&&(t.lineTo(this.v.m[this.v.M.to-1].p,this.v.Be),t.lineTo(this.v.m[this.v.M.from].p,this.v.Be));t.closePath(),t.fillStyle=this.Fe(t),t.fill()}},i}(x),t2=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return u(i,t),i.prototype.Fe=function(t){var i=this.v,e=t.createLinearGradient(0,0,0,i.Ee);return e.addColorStop(0,i.Ve),e.addColorStop(1,i.Oe),e},i}(t1),t3=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.v=null,i}return u(i,t),i.prototype._=function(t){this.v=t},i.prototype.u=function(t){if(null!==this.v&&0!==this.v.m.length&&null!==this.v.M){if(t.lineCap="butt",t.lineWidth=this.v.rt,o(t,this.v.ut),t.strokeStyle=this.We(t),t.lineJoin="round",t.beginPath(),1===this.v.m.length){var i=this.v.m[0];t.moveTo(i.p-this.v.Te/2,i.g),t.lineTo(i.p+this.v.Te/2,i.g)}else t0(t,this.v.m,this.v.Le,this.v.M);t.stroke()}},i}(x),t5=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return u(i,t),i.prototype.We=function(){return this.v.N},i}(t3);function t4(t,i){return t.S<i}function t6(t,i){return t<i.S}function t8(t,i,e){var n=i.hh(),r=i.rh(),s=tj(t,n,t4),o=tz(t,r,t6);if(!e)return{from:s,to:o};var h=s,a=o;return s>0&&s<t.length&&t[s].S>=n&&(h=s-1),o>0&&o<t.length&&t[o-1].S<=r&&(a=o+1),{from:h,to:a}}var t7=function(){function t(t,i,e){this.ze=!0,this.Pe=!0,this.Re=!0,this.Ie=[],this.je=null,this.qe=t,this.Ue=i,this.He=e}return t.prototype.O=function(t){this.ze=!0,"data"===t&&(this.Pe=!0),"options"===t&&(this.Re=!0)},t.prototype.Ye=function(){this.Pe&&(this.Ke(),this.Pe=!1),this.ze&&(this.$e(),this.ze=!1),this.Re&&(this.Xe(),this.Re=!1)},t.prototype.Ze=function(){this.je=null},t.prototype.$e=function(){var t=this.qe.$(),i=this.Ue.j();if(this.Ze(),!i.ti()&&!t.ti()){var e=i.mr();if(null!==e&&0!==this.qe.Hi().Je()){var n=this.qe.H();null!==n&&(this.je=t8(this.Ie,e,this.He),this.Ge(t,i,n.X))}}},t}(),t9=function(t){function i(i,e){return t.call(this,i,e,!0)||this}return u(i,t),i.prototype.Ge=function(t,i,e){i.Lr(this.Ie,S(this.je)),t.Ss(this.Ie,e,S(this.je))},i.prototype.Qe=function(t,i){return{S:t,D:i,p:NaN,g:NaN}},i.prototype.Xe=function(){},i.prototype.Ke=function(){var t=this,i=this.qe.tu();this.Ie=this.qe.Hi().iu().map(function(e){var n=e.X[3];return t.nu(e.Ph,n,i)})},i}(t7),it=function(t){function i(i,e){var n=t.call(this,i,e)||this;return n.ot=new k,n.su=new t2,n.hu=new t5,n.ot.i([n.su,n.hu]),n}return u(i,t),i.prototype.P=function(t,i){if(!this.qe.U())return null;var e=this.qe.ct();return this.Ye(),this.su._({Le:e.lineType,m:this.Ie,ut:e.lineStyle,rt:e.lineWidth,Ve:e.topColor,Oe:e.bottomColor,Be:t,Ee:t,M:this.je,Te:this.Ue.j().Wr()}),this.hu._({Le:e.lineType,m:this.Ie,N:e.lineColor,ut:e.lineStyle,rt:e.lineWidth,M:this.je,Te:this.Ue.j().Wr()}),this.ot},i.prototype.nu=function(t,i){return this.Qe(t,i)},i}(t9),ii=function(){function t(){this.tt=null,this.ru=0,this.eu=0}return t.prototype._=function(t){this.tt=t},t.prototype.h=function(t,i,e,n){if(null!==this.tt&&0!==this.tt.Hi.length&&null!==this.tt.M){this.ru=this.uu(i),this.ru>=2&&Math.max(1,Math.floor(i))%2!=this.ru%2&&this.ru--,this.eu=this.tt.au?Math.min(this.ru,Math.floor(i)):this.ru;for(var r=null,s=this.eu<=this.ru&&this.tt.Wr>=Math.floor(1.5*i),o=this.tt.M.from;o<this.tt.M.to;++o){var h=this.tt.Hi[o];r!==h.et&&(t.fillStyle=h.et,r=h.et);var a=Math.floor(.5*this.eu),u=Math.round(h.p*i),l=u-a,c=this.eu,f=l+c-1,p=Math.min(h.Bs,h.Ls),v=Math.max(h.Bs,h.Ls),d=Math.round(p*i)-a,y=Math.max(Math.round(v*i)+a-d,this.eu);t.fillRect(l,d,c,y);var g=Math.ceil(1.5*this.ru);if(s){if(this.tt.ou){var m=u-g,w=Math.max(d,Math.round(h.Ts*i)-a),b=w+c-1;b>d+y-1&&(w=(b=d+y-1)-c+1),t.fillRect(m,w,l-m,b-w+1)}var M=u+g,_=Math.max(d,Math.round(h.Fs*i)-a),S=_+c-1;S>d+y-1&&(_=(S=d+y-1)-c+1),t.fillRect(f+1,_,M-f,S-_+1)}}}},t.prototype.uu=function(t){return Math.max(Math.floor(t),Math.floor(Math.floor(.3*v(this.tt).Wr*t)))},t}(),ie=function(t){function i(i,e){return t.call(this,i,e,!1)||this}return u(i,t),i.prototype.Ge=function(t,i,e){i.Lr(this.Ie,S(this.je)),t.As(this.Ie,e,S(this.je))},i.prototype.lu=function(t,i,e){return{S:t,open:i.X[0],high:i.X[1],low:i.X[2],close:i.X[3],p:NaN,Ts:NaN,Bs:NaN,Ls:NaN,Fs:NaN}},i.prototype.Ke=function(){var t=this,i=this.qe.tu();this.Ie=this.qe.Hi().iu().map(function(e){return t.nu(e.Ph,e,i)})},i}(t7),ir=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.ot=new ii,i}return u(i,t),i.prototype.P=function(t,i){if(!this.qe.U())return null;var e=this.qe.ct();this.Ye();var n={Hi:this.Ie,Wr:this.Ue.j().Wr(),ou:e.openVisible,au:e.thinBars,M:this.je};return this.ot._(n),this.ot},i.prototype.Xe=function(){var t=this;this.Ie.forEach(function(i){i.et=t.qe.tu().cu(i.S).fu})},i.prototype.nu=function(t,i,e){return l(l({},this.lu(t,i,e)),{et:e.cu(t).fu})},i}(ie),is=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return u(i,t),i.prototype.Fe=function(t){var i=this.v,e=t.createLinearGradient(0,0,0,i.Ee),n=ta(i.Be/i.Ee,0,1);return e.addColorStop(0,i.vu),e.addColorStop(n,i._u),e.addColorStop(n,i.du),e.addColorStop(1,i.wu),e},i}(t1),io=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return u(i,t),i.prototype.We=function(t){var i=this.v,e=t.createLinearGradient(0,0,0,i.Ee),n=ta(i.Be/i.Ee,0,1);return e.addColorStop(0,i.Ve),e.addColorStop(n,i.Ve),e.addColorStop(n,i.Oe),e.addColorStop(1,i.Oe),e},i}(t3),ih=function(t){function i(i,e){var n=t.call(this,i,e)||this;return n.Mu=new is,n.bu=new io,n.A=new k,n.A.i([n.Mu,n.bu]),n}return u(i,t),i.prototype.P=function(t,i){if(!this.qe.U())return null;var e=this.qe.H();if(null===e)return null;var n=this.qe.ct();this.Ye();var r=this.qe.$().K(n.baseValue.price,e.X),s=this.Ue.j().Wr();return this.Mu._({m:this.Ie,vu:n.topFillColor1,_u:n.topFillColor2,du:n.bottomFillColor1,wu:n.bottomFillColor2,rt:n.lineWidth,ut:n.lineStyle,Le:0,Be:r,Ee:t,M:this.je,Te:s}),this.bu._({m:this.Ie,Ve:n.topLineColor,Oe:n.bottomLineColor,rt:n.lineWidth,ut:n.lineStyle,Le:0,Be:r,Ee:t,M:this.je,Te:s}),this.A},i.prototype.nu=function(t,i){return this.Qe(t,i)},i}(t9),ia=function(){function t(){this.tt=null,this.ru=0}return t.prototype._=function(t){this.tt=t},t.prototype.h=function(t,i,e,n){if(null!==this.tt&&0!==this.tt.Hi.length&&null!==this.tt.M){this.ru=function(t,i){if(t>=2.5&&t<=4)return Math.floor(3*i);var e=1-.2*Math.atan(Math.max(4,t)-4)/(.5*Math.PI),n=Math.min(Math.floor(t*e*i),Math.floor(t*i));return Math.max(Math.floor(i),n)}(this.tt.Wr,i),this.ru>=2&&Math.floor(i)%2!=this.ru%2&&this.ru--;var r=this.tt.Hi;this.tt.mu&&this.pu(t,r,this.tt.M,i),this.tt.gu&&this.yu(t,r,this.tt.M,this.tt.Wr,i);var s=this.ku(i);(!this.tt.gu||this.ru>2*s)&&this.Cu(t,r,this.tt.M,i)}},t.prototype.pu=function(t,i,e,n){if(null!==this.tt){var r="",s=Math.min(Math.floor(n),Math.floor(this.tt.Wr*n));s=Math.max(Math.floor(n),Math.min(s,this.ru));for(var o=Math.floor(.5*s),h=null,a=e.from;a<e.to;a++){var u=i[a];u.Nu!==r&&(t.fillStyle=u.Nu,r=u.Nu);var l=Math.round(Math.min(u.Ts,u.Fs)*n),c=Math.round(Math.max(u.Ts,u.Fs)*n),f=Math.round(u.Bs*n),p=Math.round(u.Ls*n),v=Math.round(n*u.p)-o,d=v+s-1;null!==h&&(v=Math.min(v=Math.max(h+1,v),d));var y=d-v+1;t.fillRect(v,f,y,l-f),t.fillRect(v,c+1,y,p-c),h=d}}},t.prototype.ku=function(t){var i=Math.floor(1*t);this.ru<=2*i&&(i=Math.floor(.5*(this.ru-1)));var e=Math.max(Math.floor(t),i);return this.ru<=2*e?Math.max(Math.floor(t),Math.floor(1*t)):e},t.prototype.yu=function(t,i,e,n,r){if(null!==this.tt)for(var s="",o=this.ku(r),h=null,a=e.from;a<e.to;a++){var u,l,c,f=i[a];f.Z!==s&&(t.fillStyle=f.Z,s=f.Z);var p=Math.round(f.p*r)-Math.floor(.5*this.ru),v=p+this.ru-1,d=Math.round(Math.min(f.Ts,f.Fs)*r),y=Math.round(Math.max(f.Ts,f.Fs)*r);if(null!==h&&(p=Math.min(p=Math.max(h+1,p),v)),this.tt.Wr*r>2*o)u=p,l=v-p+1,c=y-d+1,t.fillRect(u+o,d,l-2*o,o),t.fillRect(u+o,d+c-o,l-2*o,o),t.fillRect(u,d,o,c),t.fillRect(u+l-o,d,o,c);else{var g=v-p+1;t.fillRect(p,d,g,y-d+1)}h=v}},t.prototype.Cu=function(t,i,e,n){if(null!==this.tt)for(var r="",s=this.ku(n),o=e.from;o<e.to;o++){var h=i[o],a=Math.round(Math.min(h.Ts,h.Fs)*n),u=Math.round(Math.max(h.Ts,h.Fs)*n),l=Math.round(h.p*n)-Math.floor(.5*this.ru),c=l+this.ru-1;if(h.et!==r){var f=h.et;t.fillStyle=f,r=f}this.tt.gu&&(l+=s,a+=s,c-=s,u-=s),a>u||t.fillRect(l,a,c-l+1,u-a+1)}},t}(),iu=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.ot=new ia,i}return u(i,t),i.prototype.P=function(t,i){if(!this.qe.U())return null;var e=this.qe.ct();this.Ye();var n={Hi:this.Ie,Wr:this.Ue.j().Wr(),mu:e.wickVisible,gu:e.borderVisible,M:this.je};return this.ot._(n),this.ot},i.prototype.Xe=function(){var t=this;this.Ie.forEach(function(i){var e=t.qe.tu().cu(i.S);i.et=e.fu,i.Nu=e.xu,i.Z=e.Su})},i.prototype.nu=function(t,i,e){var n=e.cu(t);return l(l({},this.lu(t,i,e)),{et:n.fu,Nu:n.xu,Z:n.Su})},i}(ie),il=function(){function t(){this.tt=null,this.Du=[]}return t.prototype._=function(t){this.tt=t,this.Du=[]},t.prototype.h=function(t,i,e,n){if(null!==this.tt&&0!==this.tt.m.length&&null!==this.tt.M){this.Du.length||this.Au(i);for(var r=Math.max(1,Math.floor(i)),s=Math.round(this.tt.Tu*i)-Math.floor(r/2),o=s+r,h=this.tt.M.from;h<this.tt.M.to;h++){var a=this.tt.m[h],u=this.Du[h-this.tt.M.from],l=Math.round(a.g*i);t.fillStyle=a.et;var c=void 0,f=void 0;l<=s?(c=l,f=o):(c=s,f=l-Math.floor(r/2)+r),t.fillRect(u.hh,c,u.rh-u.hh+1,f-c)}}},t.prototype.Au=function(t){if(null!==this.tt&&0!==this.tt.m.length&&null!==this.tt.M){var i=1>=Math.ceil(this.tt.Wr*t)?0:Math.max(1,Math.floor(t)),e=Math.round(this.tt.Wr*t)-i;this.Du=Array(this.tt.M.to-this.tt.M.from);for(var n=this.tt.M.from;n<this.tt.M.to;n++){var r,s=this.tt.m[n],o=Math.round(s.p*t),h=void 0,a=void 0;e%2?(h=o-(r=(e-1)/2),a=o+r):(h=o-(r=e/2),a=o+r-1),this.Du[n-this.tt.M.from]={hh:h,rh:a,Bu:o,Lu:s.p*t,S:s.S}}for(n=this.tt.M.from+1;n<this.tt.M.to;n++){var u=this.Du[n-this.tt.M.from],l=this.Du[n-this.tt.M.from-1];u.S===l.S+1&&u.hh-l.rh!==i+1&&(l.Bu>l.Lu?l.rh=u.hh-i-1:u.hh=l.rh+i+1)}var c=Math.ceil(this.tt.Wr*t);for(n=this.tt.M.from;n<this.tt.M.to;n++){(u=this.Du[n-this.tt.M.from]).rh<u.hh&&(u.rh=u.hh);var f=u.rh-u.hh+1;c=Math.min(f,c)}if(i>0&&c<4)for(n=this.tt.M.from;n<this.tt.M.to;n++)(f=(u=this.Du[n-this.tt.M.from]).rh-u.hh+1)>c&&(u.Bu>u.Lu?u.rh-=1:u.hh+=1)}else this.Du=[]},t}();function ic(t){return{m:[],Wr:t,Tu:NaN,M:null}}var ip=function(t){function i(i,e){var n=t.call(this,i,e,!1)||this;return n.A=new k,n.Fu=ic(0),n.ot=new il,n}return u(i,t),i.prototype.P=function(t,i){return this.qe.U()?(this.Ye(),this.A):null},i.prototype.Ke=function(){var t=this.Ue.j().Wr();this.Fu=ic(t);for(var i=0,e=0,n=this.qe.ct().color,r=0,s=this.qe.Hi().iu();r<s.length;r++){var o=s[r],h=o.X[3],a=void 0!==o.et?o.et:n,u={S:o.Ph,D:h,p:NaN,g:NaN,et:a};++i<this.Fu.m.length?this.Fu.m[i]=u:this.Fu.m.push(u),this.Ie[e++]={S:o.Ph,p:0}}this.ot._(this.Fu),this.A.i([this.ot])},i.prototype.Xe=function(){},i.prototype.Ze=function(){t.prototype.Ze.call(this),this.Fu.M=null},i.prototype.Ge=function(t,i,e){if(null!==this.je){var n=i.Wr(),r=v(i.mr()),s=t.K(this.qe.ct().base,e);i.Lr(this.Fu.m),t.Ss(this.Fu.m,e),this.Fu.Tu=s,this.Fu.M=t8(this.Fu.m,r,!1),this.Fu.Wr=n,this.ot._(this.Fu)}},i}(t7),iv=function(t){function i(i,e){var n=t.call(this,i,e)||this;return n.hu=new t5,n}return u(i,t),i.prototype.P=function(t,i){if(!this.qe.U())return null;var e=this.qe.ct();this.Ye();var n={m:this.Ie,N:e.color,ut:e.lineStyle,Le:e.lineType,rt:e.lineWidth,M:this.je,Te:this.Ue.j().Wr()};return this.hu._(n),this.hu},i.prototype.nu=function(t,i){return this.Qe(t,i)},i}(t9),id=/[2-9]/g,iy=function(){function t(t){void 0===t&&(t=50),this.kh=new Map,this.Eu=0,this.Vu=Array.from(Array(t))}return t.prototype.Ou=function(){this.kh.clear(),this.Vu.fill(void 0)},t.prototype.Vt=function(t,i,e){var n=String(i).replace(e||id,"0"),r=this.kh.get(n);if(void 0===r){if(0===(r=t.measureText(n).width)&&0!==i.length)return 0;var s=this.Vu[this.Eu];void 0!==s&&this.kh.delete(s),this.Vu[this.Eu]=n,this.Eu=(this.Eu+1)%this.Vu.length,this.kh.set(n,r)}return r},t}(),ig=function(){function t(t){this.Wu=null,this.oe=null,this.zu="right",this.$h=0,this.Pu=t}return t.prototype.Ru=function(t,i,e,n){this.Wu=t,this.oe=i,this.$h=e,this.zu=n},t.prototype.h=function(t,i){null!==this.oe&&null!==this.Wu&&this.Wu.h(t,this.oe,this.Pu,this.$h,this.zu,i)},t}(),im=function(){function t(t,i,e){this.Iu=t,this.Pu=new iy(50),this.ju=i,this.F=e,this.fe=-1,this.ot=new ig(this.Pu)}return t.prototype.P=function(t,i){var e=this.F.qu(this.ju);if(null===e)return null;var n=e.Uu(this.ju)?e.xi():this.ju.$();if(null===n)return null;var r=e.Hu(n);if("overlay"===r)return null;var s=this.F.Yu();return s.Wt!==this.fe&&(this.fe=s.Wt,this.Pu.Ou()),this.ot.Ru(this.Iu.Zt(),s,i,r),this.ot},t}(),iw=function(){function t(){this.tt=null}return t.prototype._=function(t){this.tt=t},t.prototype.h=function(t,i,e,n){if(null!==this.tt&&!1!==this.tt.U){var r=Math.round(this.tt.g*i);if(!(r<0||r>Math.ceil(this.tt.Mt*i))){var s=Math.ceil(this.tt.wt*i);t.lineCap="butt",t.strokeStyle=this.tt.et,t.lineWidth=Math.floor(this.tt.rt*i),o(t,this.tt.ut),h(t,r,0,s)}}},t}(),ib=function(){function t(t){this.Ku={wt:0,Mt:0,g:0,et:"rgba(0, 0, 0, 0)",rt:1,ut:0,U:!1},this.$u=new iw,this.L=!0,this.qe=t,this.Ue=t.vt(),this.$u._(this.Ku)}return t.prototype.O=function(){this.L=!0},t.prototype.P=function(t,i){return this.qe.U()?(this.L&&(this.Xu(t,i),this.L=!1),this.$u):null},t}(),iM=function(t){function i(i){return t.call(this,i)||this}return u(i,t),i.prototype.Xu=function(t,i){this.Ku.U=!1;var e=this.qe.$(),n=e.os().os;if(2===n||3===n){var r=this.qe.ct();if(r.baseLineVisible&&this.qe.U()){var s=this.qe.H();null!==s&&(this.Ku.U=!0,this.Ku.g=e.K(s.X,s.X),this.Ku.wt=i,this.Ku.Mt=t,this.Ku.et=r.baseLineColor,this.Ku.rt=r.baseLineWidth,this.Ku.ut=r.baseLineStyle)}}},i}(ib),i_=function(){function t(){this.tt=null}return t.prototype._=function(t){this.tt=t},t.prototype.Zu=function(){return this.tt},t.prototype.h=function(t,i,e,n){var r=this.tt;if(null!==r){t.save();var s=Math.max(1,Math.floor(i)),o=s%2/2,h=Math.round(r.Lu.x*i)+o,a=r.Lu.y*i;t.fillStyle=r.Ju,t.beginPath();var u=Math.max(2,1.5*r.Gu)*i;t.arc(h,a,u,0,2*Math.PI,!1),t.fill(),t.fillStyle=r.Qu,t.beginPath(),t.arc(h,a,r.C*i,0,2*Math.PI,!1),t.fill(),t.lineWidth=s,t.strokeStyle=r.ta,t.beginPath(),t.arc(h,a,r.C*i+s/2,0,2*Math.PI,!1),t.stroke(),t.restore()}},t}(),iS=[{ia:0,na:.25,sa:4,ha:10,ra:.25,ea:0,ua:.4,aa:.8},{ia:.25,na:.525,sa:10,ha:14,ra:0,ea:0,ua:.8,aa:0},{ia:.525,na:1,sa:14,ha:14,ra:0,ea:0,ua:0,aa:0}];function ik(t,i,e,n){return function(t,i){if("transparent"===t)return t;var e=R(t),n=e[3];return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+i*n+")"}(t,e+(n-e)*i)}function ix(t,i){for(var e,n=t%2600/2600,r=0;r<iS.length;r++){var s=iS[r];if(n>=s.ia&&n<=s.na){e=s;break}}f(void 0!==e,"Last price animation internal logic error");var o,h=(n-e.ia)/(e.na-e.ia);return{Qu:ik(i,h,e.ra,e.ea),ta:ik(i,h,e.ua,e.aa),C:(o=e.sa)+(e.ha-o)*h}}var iC=function(){function t(t){this.ot=new i_,this.L=!0,this.oa=!0,this.la=performance.now(),this.fa=this.la-1,this.ca=t}return t.prototype.O=function(t){if(this.L=!0,"data"===t&&2===this.ca.ct().lastPriceAnimation){var i=performance.now(),e=this.fa-i;if(e>0)return void(e<650&&(this.fa+=2600));this.la=i,this.fa=i+2600}},t.prototype.va=function(){this.oa=!0},t.prototype.U=function(){return 0!==this.ca.ct().lastPriceAnimation},t.prototype._a=function(){switch(this.ca.ct().lastPriceAnimation){case 0:return!1;case 1:return!0;case 2:return performance.now()<=this.fa}},t.prototype.P=function(t,i){return this.L?(this.R(t,i),this.L=!1,this.oa=!1):this.oa&&(this.da(),this.oa=!1),this.ot},t.prototype.R=function(t,i){this.ot._(null);var e=this.ca.vt().j(),n=e.mr(),r=this.ca.H();if(null!==n&&null!==r){var s=this.ca.wa(!0);if(!s.Ma&&n.Eh(s.Ph)){var o={x:e.G(s.Ph),y:this.ca.$().K(s.D,r.X)},h=s.et,a=this.ca.ct().lineWidth,u=ix(this.ba(),h);this.ot._({Ju:h,Gu:a,Qu:u.Qu,ta:u.ta,C:u.C,Lu:o})}}},t.prototype.da=function(){var t=this.ot.Zu();if(null!==t){var i=ix(this.ba(),t.Ju);t.Qu=i.Qu,t.ta=i.ta,t.C=i.C}},t.prototype.ba=function(){return this._a()?performance.now()-this.la:2599},t}();function iL(t,i){return tc(Math.min(Math.max(t,12),30)*i)}function iT(t,i){switch(t){case"arrowDown":case"arrowUp":return iL(i,1);case"circle":return iL(i,.8);case"square":return iL(i,.7)}}function iD(t){return Math.max(iL(t,.1),3)}function iN(t,i,e,n,r){var s=iT("square",e),o=(s-1)/2,h=t-o,a=i-o;return n>=h&&n<=h+s&&r>=a&&r<=a+s}function iE(t,i,e,n,r){var s=(iT("arrowUp",r)-1)/2,o=(tc(r/2)-1)/2;i.beginPath(),t?(i.moveTo(e-s,n),i.lineTo(e,n-s),i.lineTo(e+s,n),i.lineTo(e+o,n),i.lineTo(e+o,n+s),i.lineTo(e-o,n+s)):(i.moveTo(e-s,n),i.lineTo(e,n+s),i.lineTo(e+s,n),i.lineTo(e+o,n),i.lineTo(e+o,n-s),i.lineTo(e-o,n-s)),i.lineTo(e-o,n),i.fill()}var iP=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.tt=null,i.Pu=new iy,i.fe=-1,i.ce="",i.ma="",i}return u(i,t),i.prototype._=function(t){this.tt=t},i.prototype.Ru=function(t,i){this.fe===t&&this.ce===i||(this.fe=t,this.ce=i,this.ma=tG(t,i),this.Pu.Ou())},i.prototype.pa=function(t,i){if(null===this.tt||null===this.tt.M)return null;for(var e=this.tt.M.from;e<this.tt.M.to;e++){var n=this.tt.m[e];if(function(t,i,e){var n,r,s,o;return!(void 0===t.Et||(n=t.p,r=t.Et.g,s=t.Et.wt,o=t.Et.Mt/2,!(i>=n)||!(i<=n+s)||!(e>=r-o)||!(e<=r+o)))||function(t,i,e){var n,r,s,o,h,a;if(0===t.Je)return!1;switch(t.Na){case"arrowDown":case"arrowUp":return n=t.p,iN(n,t.g,t.Je,i,e);case"circle":return r=t.p,s=t.g,o=2+iT("circle",t.Je)/2,Math.sqrt((h=r-i)*h+(a=s-e)*a)<=o;case"square":return iN(t.p,t.g,t.Je,i,e)}}(t,i,e)}(n,t,i))return{ga:n.ya,ka:n.ka}}return null},i.prototype.u=function(t,i,e){if(null!==this.tt&&null!==this.tt.M){t.textBaseline="middle",t.font=this.ma;for(var n=this.tt.M.from;n<this.tt.M.to;n++){var r=this.tt.m[n];void 0!==r.Et&&(r.Et.wt=this.Pu.Vt(t,r.Et.Ca),r.Et.Mt=this.fe),t.fillStyle=r.et,void 0!==r.Et&&function(t,i,e,n){t.fillText(i,e,n)}(t,r.Et.Ca,r.p-r.Et.wt/2,r.Et.g),function(t,i){if(0!==t.Je){switch(t.Na){case"arrowDown":return void iE(!1,i,t.p,t.g,t.Je);case"arrowUp":return void iE(!0,i,t.p,t.g,t.Je);case"circle":var e,n,r;return void(e=t.p,n=t.g,r=(iT("circle",t.Je)-1)/2,i.beginPath(),i.arc(e,n,r,0,2*Math.PI,!1),i.fill());case"square":return void function(t,i,e,n){var r=iT("square",n),s=(r-1)/2;t.fillRect(i-s,e-s,r,r)}(i,t.p,t.g,t.Je)}t.Na}}(r,t)}}},i}(x),iO=function(){function t(t,i){this.L=!0,this.Da=!0,this.Aa=!0,this.Ta=null,this.ot=new iP,this.ca=t,this.hi=i,this.tt={m:[],M:null}}return t.prototype.O=function(t){this.L=!0,this.Aa=!0,"data"===t&&(this.Da=!0)},t.prototype.P=function(t,i,e){if(!this.ca.U())return null;this.L&&this.Ye();var n=this.hi.ct().layout;return this.ot.Ru(n.fontSize,n.fontFamily),this.ot._(this.tt),this.ot},t.prototype.Ba=function(){if(this.Aa){if(this.ca.La().length>0){var t=this.hi.j().Wr(),i=iD(t),e=1.5*tl(iL(t,1))+2*i;this.Ta={above:e,below:e}}else this.Ta=null;this.Aa=!1}return this.Ta},t.prototype.Ye=function(){var t=this.ca.$(),i=this.hi.j(),e=this.ca.La();this.Da&&(this.tt.m=e.map(function(t){return{S:t.time,p:0,g:0,Je:0,Na:t.shape,et:t.color,ya:t.ya,ka:t.id,Et:void 0}}),this.Da=!1);var n=this.hi.ct().layout;this.tt.M=null;var r=i.mr();if(null!==r){var s=this.ca.H();if(null!==s&&0!==this.tt.m.length){var o=NaN,h=iD(i.Wr()),a={xa:h,Sa:h};this.tt.M=t8(this.tt.m,r,!0);for(var u=this.tt.M.from;u<this.tt.M.to;u++){var l=e[u];l.time!==o&&(a.xa=h,a.Sa=h,o=l.time);var c=this.tt.m[u];c.p=i.G(l.time),void 0!==l.text&&l.text.length>0&&(c.Et={Ca:l.text,g:0,wt:0,Mt:0});var f=this.ca.Fa(l.time);null!==f&&function(t,i,e,n,r,s,o,h,a){var u=g(e)?e:e.close,l=g(e)?e:e.high,c=g(e)?e:e.low,f=g(i.size)?Math.max(i.size,0):1,p=tl(iL(h.Wr(),1))*f,v=p/2;switch(t.Je=p,i.position){case"inBar":return t.g=o.K(u,a),void(void 0!==t.Et&&(t.Et.g=t.g+v+s+.6*r));case"aboveBar":return t.g=o.K(l,a)-v-n.xa,void 0!==t.Et&&(t.Et.g=t.g-v-.6*r,n.xa+=1.2*r),void(n.xa+=p+s);case"belowBar":return t.g=o.K(c,a)+v+n.Sa,void 0!==t.Et&&(t.Et.g=t.g+v+s+.6*r,n.Sa+=1.2*r),void(n.Sa+=p+s)}i.position}(c,l,f,a,n.fontSize,h,t,i,s.X)}this.L=!1}}},t}(),ij=function(t){function i(i){return t.call(this,i)||this}return u(i,t),i.prototype.Xu=function(t,i){var e=this.Ku;e.U=!1;var n=this.qe.ct();if(n.priceLineVisible&&this.qe.U()){var r=this.qe.wa(0===n.priceLineSource);r.Ma||(e.U=!0,e.g=r.zt,e.et=this.qe.Ea(r.et),e.wt=i,e.Mt=t,e.rt=n.priceLineWidth,e.ut=n.priceLineStyle)}},i}(ib),iz=function(t){function i(i){var e=t.call(this)||this;return e.lt=i,e}return u(i,t),i.prototype.Jt=function(t,i,e){t.U=!1,i.U=!1;var n=this.lt;if(n.U()){var r=n.ct(),s=r.lastValueVisible,o=""!==n.Va(),h=0===r.seriesLastValueMode,a=n.wa(!1);if(!a.Ma){s&&(t.Et=this.Oa(a,s,h),t.U=0!==t.Et.length),(o||h)&&(i.Et=this.Wa(a,s,o,h),i.U=i.Et.length>0);var u=n.Ea(a.et),l=A(u);e.yt=l.yt,e.et=l.kt,e.zt=a.zt,i.Z=n.vt().J(a.zt/n.$().Mt()),t.Z=u}}},i.prototype.Wa=function(t,i,e,n){var r="",s=this.lt.Va();return e&&0!==s.length&&(r+=s+" "),i&&n&&(r+=this.lt.$().cs()?t.za:t.Pa),r.trim()},i.prototype.Oa=function(t,i,e){return i?e?this.lt.$().cs()?t.Pa:t.za:t.Et:""},i}(J),i$=function(){function t(t,i){this.On=t,this.Ra=i||null}return t.prototype.Cs=function(){return this.On},t.prototype.eh=function(){return this.Ra},t.prototype.Mn=function(){return null===this.On?null:{priceRange:this.On.Mn(),margins:this.Ra||void 0}},t.bn=function(i){return null===i?null:new t(th.bn(i.priceRange),i.margins)},t}(),iF=function(t){function i(i,e){var n=t.call(this,i)||this;return n.Ia=e,n}return u(i,t),i.prototype.Xu=function(t,i){var e=this.Ku;if(e.U=!1,this.qe.U()){var n=this.Ia.ja();if(null!==n){var r=this.Ia.ct();e.U=!0,e.g=n,e.et=r.color,e.wt=i,e.Mt=t,e.rt=r.lineWidth,e.ut=r.lineStyle}}},i}(ib),iU=function(t){function i(i,e){var n=t.call(this)||this;return n.ca=i,n.Ia=e,n}return u(i,t),i.prototype.Jt=function(t,i,e){t.U=!1,i.U=!1;var n=this.Ia.ct(),r=n.axisLabelVisible,s=""!==n.title,o=this.ca;if(r&&o.U()){var h=this.Ia.ja();if(null!==h){s&&(i.Et=n.title,i.U=!0),i.Z=o.vt().J(h/o.$().Mt()),t.Et=o.$().Zs(n.price),t.U=!0;var a=A(n.color);e.yt=a.yt,e.et=a.kt,e.zt=h}}},i}(J),iR=function(){function t(t,i){this.ca=t,this.ki=i,this.qa=new iF(t,this),this.Iu=new iU(t,this),this.Ua=new im(this.Iu,t,t.vt())}return t.prototype.rs=function(t){y(this.ki,t),this.O(),this.ca.vt().Or()},t.prototype.ct=function(){return this.ki},t.prototype.zi=function(){return[this.qa,this.Ua]},t.prototype.Ha=function(){return this.Iu},t.prototype.O=function(){this.qa.O(),this.Iu.O()},t.prototype.ja=function(){var t=this.ca,i=t.$();if(t.vt().j().ti()||i.ti())return null;var e=t.H();return null===e?null:i.K(this.ki.price,e.X)},t}(),iA=function(t){function i(i){var e=t.call(this)||this;return e.hi=i,e}return u(i,t),i.prototype.vt=function(){return this.hi},i}(ti),iB={fu:"",Su:"",xu:""},iI=function(){function t(t){this.ca=t}return t.prototype.cu=function(t,i){var e=this.ca.Ya(),n=this.ca.ct();switch(e){case"Line":return this.Ka(n);case"Area":return this.$a(n);case"Baseline":return this.Xa(n,t,i);case"Bar":return this.Za(n,t,i);case"Candlestick":return this.Ja(n,t,i);case"Histogram":return this.Ga(n,t,i)}throw Error("Unknown chart style")},t.prototype.Za=function(t,i,e){var n=l({},iB),r=t.upColor,s=t.downColor,o=v(this.Qa(i,e)),h=d(o.X[0])<=d(o.X[3]);return n.fu=h?r:s,n.Su=h?r:s,n},t.prototype.Ja=function(t,i,e){var n=l({},iB),r=t.upColor,s=t.downColor,o=t.borderUpColor,h=t.borderDownColor,a=t.wickUpColor,u=t.wickDownColor,c=v(this.Qa(i,e)),f=d(c.X[0])<=d(c.X[3]);return n.fu=f?r:s,n.Su=f?o:h,n.xu=f?a:u,n},t.prototype.$a=function(t){return l(l({},iB),{fu:t.lineColor})},t.prototype.Xa=function(t,i,e){var n=v(this.Qa(i,e)).X[3]>=t.baseValue.price;return l(l({},iB),{fu:n?t.topLineColor:t.bottomLineColor})},t.prototype.Ka=function(t){return l(l({},iB),{fu:t.color})},t.prototype.Ga=function(t,i,e){var n=l({},iB),r=v(this.Qa(i,e));return n.fu=void 0!==r.et?r.et:t.color,n},t.prototype.Qa=function(t,i){return void 0!==i?i.X:this.ca.Hi().io(t)},t}(),iW=function(){function t(){this.no=[],this.so=new Map,this.ho=new Map}return t.prototype.ro=function(){return this.Je()>0?this.no[this.no.length-1]:null},t.prototype.eo=function(){return this.Je()>0?this.uo(0):null},t.prototype.Ui=function(){return this.Je()>0?this.uo(this.no.length-1):null},t.prototype.Je=function(){return this.no.length},t.prototype.ti=function(){return 0===this.Je()},t.prototype.Eh=function(t){return null!==this.ao(t,0)},t.prototype.io=function(t){return this.oo(t)},t.prototype.oo=function(t,i){void 0===i&&(i=0);var e=this.ao(t,i);return null===e?null:l(l({},this.lo(e)),{Ph:this.uo(e)})},t.prototype.iu=function(){return this.no},t.prototype.fo=function(t,i,e){if(this.ti())return null;for(var n=null,r=0;r<e.length;r++){var s=e[r];n=iV(n,this.co(t,i,s))}return n},t.prototype._=function(t){this.ho.clear(),this.so.clear(),this.no=t},t.prototype.uo=function(t){return this.no[t].Ph},t.prototype.lo=function(t){return this.no[t]},t.prototype.ao=function(t,i){var e=this.vo(t);if(null===e&&0!==i)switch(i){case -1:return this._o(t);case 1:return this.do(t);default:throw TypeError("Unknown search mode")}return e},t.prototype._o=function(t){var i=this.wo(t);return i>0&&(i-=1),i!==this.no.length&&this.uo(i)<t?i:null},t.prototype.do=function(t){var i=this.Mo(t);return i!==this.no.length&&t<this.uo(i)?i:null},t.prototype.vo=function(t){var i=this.wo(t);return i===this.no.length||t<this.no[i].Ph?null:i},t.prototype.wo=function(t){return tj(this.no,t,function(t,i){return t.Ph<i})},t.prototype.Mo=function(t){return tz(this.no,t,function(t,i){return i.Ph>t})},t.prototype.bo=function(t,i,e){for(var n=null,r=t;r<i;r++){var s=this.no[r].X[e];Number.isNaN(s)||(null===n?n={mo:s,po:s}:(s<n.mo&&(n.mo=s),s>n.po&&(n.po=s)))}return n},t.prototype.co=function(t,i,e){if(this.ti())return null;var n=null,r=v(this.eo()),s=v(this.Ui()),o=Math.max(t,r),h=Math.min(i,s),a=30*Math.ceil(o/30),u=Math.max(a,30*Math.floor(h/30)),l=this.wo(o),c=this.Mo(Math.min(h,a,i));n=iV(n,this.bo(l,c,e));var f=this.so.get(e);void 0===f&&(f=new Map,this.so.set(e,f));for(var p=Math.max(a+1,o);p<u;p+=30){var d=Math.floor(p/30),y=f.get(d);if(void 0===y){var g=this.wo(30*d),m=this.Mo(30*(d+1)-1);y=this.bo(g,m,e),f.set(d,y)}n=iV(n,y)}return l=this.wo(u),c=this.Mo(h),iV(n,this.bo(l,c,e))},t}();function iV(t,i){return null===t?i:null===i?t:{mo:Math.min(t.mo,i.mo),po:Math.max(t.po,i.po)}}var iZ=function(t){function i(i,e,n){var r=t.call(this,i)||this;r.tt=new iW,r.qa=new ij(r),r.yo=[],r.ko=new iM(r),r.Co=null,r.No=null,r.xo=[],r.So=[],r.Do=null,r.ki=e,r.Ao=n;var s=new iz(r);return r.Mi=[s],r.Ua=new im(s,r,i),"Area"!==n&&"Line"!==n&&"Baseline"!==n||(r.Co=new iC(r)),r.To(),r.Bo(),r}return u(i,t),i.prototype.en=function(){null!==this.Do&&clearTimeout(this.Do)},i.prototype.Ea=function(t){return this.ki.priceLineColor||t},i.prototype.wa=function(t){var i={Ma:!0},e=this.$();if(this.vt().j().ti()||e.ti()||this.tt.ti())return i;var n,r,s=this.vt().j().mr(),o=this.H();if(null===s||null===o)return i;if(t){var h=this.tt.ro();if(null===h)return i;n=h,r=h.Ph}else{var a=this.tt.oo(s.rh(),-1);if(null===a||null===(n=this.tt.io(a.Ph)))return i;r=a.Ph}var u=n.X[3],l=this.tu().cu(r,{X:n}),c=e.K(u,o.X);return{Ma:!1,D:u,Et:e.ii(u,o.X),za:e.Zs(u),Pa:e.Gs(u,o.X),et:l.fu,zt:c,Ph:r}},i.prototype.tu=function(){return null!==this.No||(this.No=new iI(this)),this.No},i.prototype.ct=function(){return this.ki},i.prototype.rs=function(t){var i=t.priceScaleId;void 0!==i&&i!==this.ki.priceScaleId&&this.vt().Lo(this,i),y(this.ki,t),null!==this.ui&&void 0!==t.scaleMargins&&this.ui.rs({scaleMargins:t.scaleMargins}),void 0!==t.priceFormat&&this.To(),this.vt().Fo(this),this.vt().Eo(),this.Ai.O("options")},i.prototype._=function(t){this.tt._(t),this.Vo(),this.Ai.O("data"),this.Ci.O("data"),null===(i=this.Co)||void 0===i||i.O("data");var i,e=this.vt().qu(this);this.vt().Oo(e),this.vt().Fo(this),this.vt().Eo(),this.vt().Or()},i.prototype.Wo=function(t){this.xo=t.map(function(t){return l({},t)}),this.Vo();var i=this.vt().qu(this);this.Ci.O("data"),this.vt().Oo(i),this.vt().Fo(this),this.vt().Eo(),this.vt().Or()},i.prototype.La=function(){return this.So},i.prototype.zo=function(t){var i=new iR(this,t);return this.yo.push(i),this.vt().Fo(this),i},i.prototype.Po=function(t){var i=this.yo.indexOf(t);-1!==i&&this.yo.splice(i,1),this.vt().Fo(this)},i.prototype.Ya=function(){return this.Ao},i.prototype.H=function(){var t=this.Ro();return null===t?null:{X:t.X[3],Rs:t.S}},i.prototype.Ro=function(){var t=this.vt().j().mr();if(null===t)return null;var i=t.hh();return this.tt.oo(i,1)},i.prototype.Hi=function(){return this.tt},i.prototype.Fa=function(t){var i=this.tt.io(t);return null===i?null:"Bar"===this.Ao||"Candlestick"===this.Ao?{open:i.X[0],high:i.X[1],low:i.X[2],close:i.X[3]}:i.X[3]},i.prototype.Io=function(t){var i=this,e=this.Co;return null!==e&&e.U()?(null===this.Do&&e._a()&&(this.Do=setTimeout(function(){i.Do=null,i.vt().jo()},0)),e.va(),[e]):[]},i.prototype.zi=function(){var t=[];this.qo()||t.push(this.ko);for(var i=0,e=this.yo;i<e.length;i++){var n=e[i];t.push.apply(t,n.zi())}return t.push(this.Ai,this.qa,this.Ua,this.Ci),t},i.prototype.Pi=function(t,i){if(i!==this.ui&&!this.qo())return[];for(var e=c([],this.Mi,!0),n=0,r=this.yo;n<r.length;n++){var s=r[n];e.push(s.Ha())}return e},i.prototype.sh=function(t,i){var e=this;if(void 0!==this.ki.autoscaleInfoProvider){var n=this.ki.autoscaleInfoProvider(function(){var n=e.Uo(t,i);return null===n?null:n.Mn()});return i$.bn(n)}return this.Uo(t,i)},i.prototype.ih=function(){return this.ki.priceFormat.minMove},i.prototype.$s=function(){return this.Zn},i.prototype.Ii=function(){var t;this.Ai.O(),this.Ci.O();for(var i=0,e=this.Mi;i<e.length;i++)e[i].O();for(var n=0,r=this.yo;n<r.length;n++)r[n].O();this.qa.O(),this.ko.O(),null===(t=this.Co)||void 0===t||t.O()},i.prototype.$=function(){return v(t.prototype.$.call(this))},i.prototype.q=function(t){if(!(("Line"===this.Ao||"Area"===this.Ao||"Baseline"===this.Ao)&&this.ki.crosshairMarkerVisible))return null;var i=this.tt.io(t);return null===i?null:{D:i.X[3],C:this.Ho(),Z:this.Yo(),Y:this.Ko(t)}},i.prototype.Va=function(){return this.ki.title},i.prototype.U=function(){return this.ki.visible},i.prototype.qo=function(){return!tY(this.$().hs())},i.prototype.Uo=function(t,i){if(!m(t)||!m(i)||this.tt.ti())return null;var e="Line"===this.Ao||"Area"===this.Ao||"Baseline"===this.Ao||"Histogram"===this.Ao?[3]:[2,1],n=this.tt.fo(t,i,e),r=null!==n?new th(n.mo,n.po):null;if("Histogram"===this.Ya()){var s=this.ki.base,o=new th(s,s);r=null!==r?r._n(o):o}return new i$(r,this.Ci.Ba())},i.prototype.Ho=function(){switch(this.Ao){case"Line":case"Area":case"Baseline":return this.ki.crosshairMarkerRadius}return 0},i.prototype.Yo=function(){switch(this.Ao){case"Line":case"Area":case"Baseline":var t=this.ki.crosshairMarkerBorderColor;if(0!==t.length)return t}return null},i.prototype.Ko=function(t){switch(this.Ao){case"Line":case"Area":case"Baseline":var i=this.ki.crosshairMarkerBackgroundColor;if(0!==i.length)return i}return this.tu().cu(t).fu},i.prototype.To=function(){switch(this.ki.priceFormat.type){case"custom":this.Zn={format:this.ki.priceFormat.formatter};break;case"volume":this.Zn=new tK(this.ki.priceFormat.precision);break;case"percent":this.Zn=new ts(this.ki.priceFormat.precision);break;default:var t=Math.pow(10,this.ki.priceFormat.precision);this.Zn=new tr(t,this.ki.priceFormat.minMove*t)}null!==this.ui&&this.ui.es()},i.prototype.Vo=function(){var t=this,i=this.vt().j();if(i.ti()||0===this.tt.Je())this.So=[];else{var e=v(this.tt.eo());this.So=this.xo.map(function(n,r){var s=v(i.br(n.time,!0));return{time:v(t.tt.oo(s,s<e?1:-1)).Ph,position:n.position,shape:n.shape,color:n.color,id:n.id,ya:r,text:n.text,size:n.size}})}},i.prototype.Bo=function(){switch(this.Ci=new iO(this,this.vt()),this.Ao){case"Bar":this.Ai=new ir(this,this.vt());break;case"Candlestick":this.Ai=new iu(this,this.vt());break;case"Line":this.Ai=new iv(this,this.vt());break;case"Area":this.Ai=new it(this,this.vt());break;case"Baseline":this.Ai=new ih(this,this.vt());break;case"Histogram":this.Ai=new ip(this,this.vt());break;default:throw Error("Unknown chart style assigned: "+this.Ao)}},i}(iA),iq=function(){function t(t){this.ki=t}return t.prototype.$o=function(t,i,e){if(0===this.ki.mode)return t;var n=e.xi(),r=n.H();if(null===r)return t;var s=n.K(t,r),o=e.Vs().filter(function(t){return t instanceof iZ}).reduce(function(t,n){if(e.Uu(n)||!n.U())return t;var r=n.$(),s=n.Hi();if(r.ti()||!s.Eh(i))return t;var o=s.io(i);if(null===o)return t;var h=d(n.H());return t.concat([r.K(o.X[3],h.X)])},[]);if(0===o.length)return t;o.sort(function(t,i){return Math.abs(t-s)-Math.abs(i-s)});var h=o[0];return n.Si(h,r)},t}(),iH=function(){function t(){this.tt=null}return t.prototype._=function(t){this.tt=t},t.prototype.h=function(t,i,e,n){var r=this;if(null!==this.tt){var s,h=Math.max(1,Math.floor(i));t.lineWidth=h;var a=Math.ceil(this.tt.ht*i),u=Math.ceil(this.tt.st*i);s=function(){var e=v(r.tt);if(e.Xo){t.strokeStyle=e.Zo,o(t,e.Jo),t.beginPath();for(var n=0,s=e.Go;n<s.length;n++){var l=Math.round(s[n].An*i);t.moveTo(l,-h),t.lineTo(l,a+h)}t.stroke()}if(e.Qo){t.strokeStyle=e.tl,o(t,e.il),t.beginPath();for(var c=0,f=e.nl;c<f.length;c++){var p=Math.round(f[c].An*i);t.moveTo(-h,p),t.lineTo(u+h,p)}t.stroke()}},t.save(),t.lineWidth%2&&t.translate(.5,.5),s(),t.restore()}},t}(),iX=function(){function t(t){this.ot=new iH,this.L=!0,this.vi=t}return t.prototype.O=function(){this.L=!0},t.prototype.P=function(t,i){if(this.L){var e=this.vi.vt().ct().grid,n={ht:t,st:i,Qo:e.horzLines.visible,Xo:e.vertLines.visible,tl:e.horzLines.color,Zo:e.vertLines.color,il:e.horzLines.style,Jo:e.vertLines.style,nl:this.vi.xi().Fn(),Go:this.vi.vt().j().Fn()||[]};this.ot._(n),this.L=!1}return this.ot},t}(),iG=function(){function t(t){this.Ai=new iX(t)}return t.prototype.sl=function(){return this.Ai},t}(),iJ=function(){function t(t,i){this.Hn=[],this.hl=new Map,this.En=0,this.$h=0,this.rl=1e3,this.Yn=null,this.el=new to,this.ul=t,this.hi=i,this.al=new iG(this);var e=i.ct();this.ol=this.ll("left",e.leftPriceScale),this.fl=this.ll("right",e.rightPriceScale),this.ol.bs().Ji(this.cl.bind(this,this.ol),this),this.fl.bs().Ji(this.cl.bind(this,this.ol),this),this.vl(e)}return t.prototype.vl=function(t){if(t.leftPriceScale&&this.ol.rs(t.leftPriceScale),t.rightPriceScale&&this.fl.rs(t.rightPriceScale),t.localization&&(this.ol.es(),this.fl.es()),t.overlayPriceScales)for(var i=0,e=Array.from(this.hl.values());i<e.length;i++){var n=v(e[i][0].$());n.rs(t.overlayPriceScales),t.localization&&n.es()}},t.prototype._l=function(t){switch(t){case"left":return this.ol;case"right":return this.fl}return this.hl.has(t)?p(this.hl.get(t))[0].$():null},t.prototype.en=function(){this.vt().dl().sn(this),this.ol.bs().sn(this),this.fl.bs().sn(this),this.Hn.forEach(function(t){t.en&&t.en()}),this.el.hn()},t.prototype.wl=function(){return this.rl},t.prototype.Ml=function(t){this.rl=t},t.prototype.vt=function(){return this.hi},t.prototype.wt=function(){return this.$h},t.prototype.Mt=function(){return this.En},t.prototype.Dr=function(t){this.$h=t,this.bl()},t.prototype.ps=function(t){var i=this;this.En=t,this.ol.ps(t),this.fl.ps(t),this.Hn.forEach(function(e){if(i.Uu(e)){var n=e.$();null!==n&&n.ps(t)}}),this.bl()},t.prototype.Vs=function(){return this.Hn},t.prototype.Uu=function(t){var i=t.$();return null===i||this.ol!==i&&this.fl!==i},t.prototype.Ws=function(t,i,e){var n=void 0!==e?e:this.pl().ml+1;this.gl(t,i,n)},t.prototype.Ps=function(t){var i=this.Hn.indexOf(t);f(-1!==i,"removeDataSource: invalid data source"),this.Hn.splice(i,1);var e=v(t.$()).hs();if(this.hl.has(e)){var n=p(this.hl.get(e)),r=n.indexOf(t);-1!==r&&(n.splice(r,1),0===n.length&&this.hl.delete(e))}var s=t.$();s&&s.Vs().indexOf(t)>=0&&s.Ps(t),null!==s&&(s.zs(),this.yl(s)),this.Yn=null},t.prototype.Hu=function(t){return t===this.ol?"left":t===this.fl?"right":"overlay"},t.prototype.kl=function(){return this.ol},t.prototype.Cl=function(){return this.fl},t.prototype.Nl=function(t,i){t.js(i)},t.prototype.xl=function(t,i){t.qs(i),this.bl()},t.prototype.Sl=function(t){t.Us()},t.prototype.Dl=function(t,i){t.Hs(i)},t.prototype.Al=function(t,i){t.Ys(i),this.bl()},t.prototype.Tl=function(t){t.Ks()},t.prototype.bl=function(){this.Hn.forEach(function(t){t.Ii()})},t.prototype.xi=function(){var t=null;return this.hi.ct().rightPriceScale.visible&&0!==this.fl.Vs().length?t=this.fl:this.hi.ct().leftPriceScale.visible&&0!==this.ol.Vs().length?t=this.ol:0!==this.Hn.length&&(t=this.Hn[0].$()),null===t&&(t=this.fl),t},t.prototype.yl=function(t){null!==t&&t.fs()&&this.Bl(t)},t.prototype.Ll=function(t){var i=this.ul.mr();t.us({_s:!0}),null!==i&&t.th(i),this.bl()},t.prototype.Fl=function(){this.Bl(this.ol),this.Bl(this.fl)},t.prototype.El=function(){var t=this;this.yl(this.ol),this.yl(this.fl),this.Hn.forEach(function(i){t.Uu(i)&&t.yl(i.$())}),this.bl(),this.hi.Or()},t.prototype.Os=function(){return null===this.Yn&&(this.Yn=tM(this.Hn)),this.Yn},t.prototype.Vl=function(){return this.el},t.prototype.Ol=function(){return this.al},t.prototype.Bl=function(t){var i=t.Qs();if(i&&i.length>0&&!this.ul.ti()){var e=this.ul.mr();null!==e&&t.th(e)}t.Ii()},t.prototype.pl=function(){var t=this.Os();if(0===t.length)return{Wl:0,ml:0};for(var i=0,e=0,n=0;n<t.length;n++){var r=t[n].oi();null!==r&&(r<i&&(i=r),r>e&&(e=r))}return{Wl:i,ml:e}},t.prototype.gl=function(t,i,e){var n=this._l(i);if(null===n&&(n=this.ll(i,this.hi.ct().overlayPriceScales)),this.Hn.push(t),!tY(i)){var r=this.hl.get(i)||[];r.push(t),this.hl.set(i,r)}n.Ws(t),t.fi(n),t.li(e),this.yl(n),this.Yn=null},t.prototype.cl=function(t,i,e){i.os!==e.os&&this.Bl(t)},t.prototype.ll=function(t,i){var e=new tL(t,l({visible:!0,autoScale:!0},M(i)),this.hi.ct().layout,this.hi.ct().localization);return e.ps(this.Mt()),e},t}(),iY=function(t){function i(i){var e=t.call(this)||this;return e.zl=new Map,e.tt=i,e}return u(i,t),i.prototype.u=function(t){},i.prototype.l=function(t){if(this.tt.U){t.save();for(var i=0,e=0,n=this.tt.Pl;e<n.length;e++)if(0!==(a=n[e]).Et.length){t.font=a.Nt;var r=this.Rl(t,a.Et);r>this.tt.wt?a.Ur=this.tt.wt/r:a.Ur=1,i+=a.Il*a.Ur}var s=0;switch(this.tt.jl){case"top":s=0;break;case"center":s=Math.max((this.tt.Mt-i)/2,0);break;case"bottom":s=Math.max(this.tt.Mt-i,0)}t.fillStyle=this.tt.et;for(var o=0,h=this.tt.Pl;o<h.length;o++){var a=h[o];t.save();var u=0;switch(this.tt.ql){case"left":t.textAlign="left",u=a.Il/2;break;case"center":t.textAlign="center",u=this.tt.wt/2;break;case"right":t.textAlign="right",u=this.tt.wt-1-a.Il/2}t.translate(u,s),t.textBaseline="top",t.font=a.Nt,t.scale(a.Ur,a.Ur),t.fillText(a.Et,0,a.Ul),t.restore(),s+=a.Il*a.Ur}t.restore()}},i.prototype.Rl=function(t,i){var e=this.Hl(t.font),n=e.get(i);return void 0===n&&(n=t.measureText(i).width,e.set(i,n)),n},i.prototype.Hl=function(t){var i=this.zl.get(t);return void 0===i&&(i=new Map,this.zl.set(t,i)),i},i}(x),iQ=function(){function t(t){this.L=!0,this.at={U:!1,et:"",Mt:0,wt:0,Pl:[],jl:"center",ql:"center"},this.ot=new iY(this.at),this.lt=t}return t.prototype.O=function(){this.L=!0},t.prototype.P=function(t,i){return this.L&&(this.R(t,i),this.L=!1),this.ot},t.prototype.R=function(t,i){var e=this.lt.ct(),n=this.at;n.U=e.visible,n.U&&(n.et=e.color,n.wt=i,n.Mt=t,n.ql=e.horzAlign,n.jl=e.vertAlign,n.Pl=[{Et:e.text,Nt:tG(e.fontSize,e.fontFamily,e.fontStyle),Il:1.2*e.fontSize,Ul:0,Ur:0}])},t}(),iK=function(t){function i(i,e){var n=t.call(this)||this;return n.ki=e,n.Ai=new iQ(n),n}return u(i,t),i.prototype.Pi=function(){return[]},i.prototype.zi=function(){return[this.Ai]},i.prototype.ct=function(){return this.ki},i.prototype.Ii=function(){this.Ai.O()},i}(ti),i0=function(){function t(t,i){this.Yl=[],this.Kl=[],this.$h=0,this.$l=null,this.Xl=null,this.Zl=new to,this.Jl=new to,this.Gl=null,this.Ql=t,this.ki=i,this.tf=new tJ(this),this.ul=new tq(this,i.timeScale,this.ki.localization),this.V=new te(this,i.crosshair),this.if=new iq(i.crosshair),this.nf=new iK(this,i.watermark),this.sf(),this.Yl[0].Ml(2e3),this.hf=this.rf(0),this.ef=this.rf(1)}return t.prototype.uf=function(){this.af(new tQ(3))},t.prototype.Or=function(){this.af(new tQ(2))},t.prototype.jo=function(){this.af(new tQ(1))},t.prototype.Fo=function(t){var i=this.lf(t);this.af(i)},t.prototype.ff=function(){return this.Xl},t.prototype.cf=function(t){var i=this.Xl;this.Xl=t,null!==i&&this.Fo(i.vf),null!==t&&this.Fo(t.vf)},t.prototype.ct=function(){return this.ki},t.prototype.rs=function(t){y(this.ki,t),this.Yl.forEach(function(i){return i.vl(t)}),void 0!==t.timeScale&&this.ul.rs(t.timeScale),void 0!==t.localization&&this.ul.cr(t.localization),(t.leftPriceScale||t.rightPriceScale)&&this.Zl.hn(),this.hf=this.rf(0),this.ef=this.rf(1),this.uf()},t.prototype._f=function(t,i){var e=this.df(t);null!==e&&(e.$.rs(i),this.Zl.hn())},t.prototype.df=function(t){for(var i=0,e=this.Yl;i<e.length;i++){var n=e[i],r=n._l(t);if(null!==r)return{ft:n,$:r}}return null},t.prototype.j=function(){return this.ul},t.prototype.wf=function(){return this.Yl},t.prototype.Mf=function(){return this.nf},t.prototype.bf=function(){return this.V},t.prototype.mf=function(){return this.Jl},t.prototype.pf=function(t,i){t.ps(i),this.Vr()},t.prototype.Dr=function(t){this.$h=t,this.ul.Dr(this.$h),this.Yl.forEach(function(i){return i.Dr(t)}),this.Vr()},t.prototype.sf=function(t){var i=new iJ(this.ul,this);void 0!==t?this.Yl.splice(t,0,i):this.Yl.push(i);var e=void 0===t?this.Yl.length-1:t,n=new tQ(3);return n.be(e,{me:0,_s:!0}),this.af(n),i},t.prototype.Nl=function(t,i,e){t.Nl(i,e)},t.prototype.xl=function(t,i,e){t.xl(i,e),this.Eo(),this.af(this.gf(t,2))},t.prototype.Sl=function(t,i){t.Sl(i),this.af(this.gf(t,2))},t.prototype.Dl=function(t,i,e){i.fs()||t.Dl(i,e)},t.prototype.Al=function(t,i,e){i.fs()||(t.Al(i,e),this.Eo(),this.af(this.gf(t,2)))},t.prototype.Tl=function(t,i){i.fs()||(t.Tl(i),this.af(this.gf(t,2)))},t.prototype.Ll=function(t,i){t.Ll(i),this.af(this.gf(t,2))},t.prototype.yf=function(t){this.ul.js(t)},t.prototype.kf=function(t,i){var e=this.j();e.ti()||0===i||(t=Math.max(1,Math.min(t,e.wt())),e.Ur(t,i),this.Vr())},t.prototype.Cf=function(t){this.Nf(0),this.xf(t),this.Sf()},t.prototype.Df=function(t){this.ul.qs(t),this.Vr()},t.prototype.Af=function(){this.ul.Us(),this.Or()},t.prototype.Nf=function(t){this.$l=t,this.ul.Hs(t)},t.prototype.xf=function(t){var i=!1;return null!==this.$l&&Math.abs(t-this.$l)>20&&(this.$l=null,i=!0),this.ul.Ys(t),this.Vr(),i},t.prototype.Sf=function(){this.ul.Ks(),this.Or(),this.$l=null},t.prototype.W=function(){return this.Kl},t.prototype.Tf=function(t,i,e){this.V.Ti(t,i);var n=NaN,r=this.ul.Fr(t),s=this.ul.mr();null!==s&&(r=Math.min(Math.max(s.hh(),r),s.rh()));var o=e.xi(),h=o.H();null!==h&&(n=o.Si(i,h)),n=this.if.$o(n,r,e),this.V.Ei(r,n,e),this.jo(),this.Jl.hn(this.V.I(),{x:t,y:i})},t.prototype.Bf=function(){this.bf().Oi(),this.jo(),this.Jl.hn(null,null)},t.prototype.Eo=function(){var t=this.V.ft();if(null!==t){var i=this.V.Li(),e=this.V.Fi();this.Tf(i,e,t)}this.V.Ii()},t.prototype.Lf=function(t,i,e){var n=this.ul.ri(0);void 0!==i&&void 0!==e&&this.ul.O(i,e);var r=this.ul.ri(0),s=this.ul.Br(),o=this.ul.mr();if(null!==o&&null!==n&&null!==r){var h=o.Eh(s),a=n.Dh>r.Dh,u=null!==t&&t>s&&!a,l=h&&this.ul.ct().shiftVisibleRangeOnNewBar;if(u&&!l){var c=t-s;this.ul.Mr(this.ul.Pr()-c)}}this.ul.qr(t)},t.prototype.Oo=function(t){null!==t&&t.El()},t.prototype.qu=function(t){var i=this.Yl.find(function(i){return i.Os().includes(t)});return void 0===i?null:i},t.prototype.Vr=function(){this.nf.Ii(),this.Yl.forEach(function(t){return t.El()}),this.Eo()},t.prototype.en=function(){this.Yl.forEach(function(t){return t.en()}),this.Yl.length=0,this.ki.localization.priceFormatter=void 0,this.ki.localization.timeFormatter=void 0},t.prototype.Ff=function(){return this.tf},t.prototype.Yu=function(){return this.tf.ct()},t.prototype.dl=function(){return this.Zl},t.prototype.Ef=function(t,i){var e=this.Yl[0],n=this.Vf(i,t,e);return this.Kl.push(n),1===this.Kl.length?this.uf():this.Or(),n},t.prototype.Of=function(t){var i=this.qu(t),e=this.Kl.indexOf(t);f(-1!==e,"Series not found"),this.Kl.splice(e,1),v(i).Ps(t),t.en&&t.en()},t.prototype.Lo=function(t,i){var e=v(this.qu(t));e.Ps(t);var n=this.df(i);if(null===n){var r=t.oi();e.Ws(t,i,r)}else r=n.ft===e?t.oi():void 0,n.ft.Ws(t,i,r)},t.prototype.Qr=function(){var t=new tQ(2);t.ye(),this.af(t)},t.prototype.Wf=function(t){var i=new tQ(2);i.Ce(t),this.af(i)},t.prototype.Ne=function(){var t=new tQ(2);t.Ne(),this.af(t)},t.prototype.wr=function(t){var i=new tQ(2);i.wr(t),this.af(i)},t.prototype.Mr=function(t){var i=new tQ(2);i.Mr(t),this.af(i)},t.prototype.zf=function(){return this.ki.rightPriceScale.visible?"right":"left"},t.prototype.Pf=function(){return this.ef},t.prototype.Rf=function(){return this.hf},t.prototype.J=function(t){var i,e,n,r,s,o,h,a,u,l,c,f,p=this.ef,v=this.hf;if(p===v)return p;if(t=Math.max(0,Math.min(100,Math.round(100*t))),null===this.Gl||this.Gl.Ve!==v||this.Gl.Oe!==p)this.Gl={Ve:v,Oe:p,If:new Map};else{var d=this.Gl.If.get(t);if(void 0!==d)return d}var y=(i=t/100,n=(e=R(v))[0],r=e[1],s=e[2],o=e[3],a=(h=R(p))[0],u=h[1],l=h[2],c=h[3],"rgba("+(f=[O(n+i*(a-n)),O(r+i*(u-r)),O(s+i*(l-s)),j(o+i*(c-o))])[0]+", "+f[1]+", "+f[2]+", "+f[3]+")");return this.Gl.If.set(t,y),y},t.prototype.gf=function(t,i){var e=new tQ(i);if(null!==t){var n=this.Yl.indexOf(t);e.be(n,{me:i})}return e},t.prototype.lf=function(t,i){return void 0===i&&(i=2),this.gf(this.qu(t),i)},t.prototype.af=function(t){this.Ql&&this.Ql(t),this.Yl.forEach(function(t){return t.Ol().sl().O()})},t.prototype.Vf=function(t,i,e){var n=new iZ(this,t,i),r=void 0!==t.priceScaleId?t.priceScaleId:this.zf();return e.Ws(n,r),tY(r)||n.rs(t),n},t.prototype.rf=function(t){var i=this.ki.layout;return"gradient"===i.background.type?0===t?i.background.topColor:i.background.bottomColor:i.background.color},t}(),i1=function(){function t(t,i){this.st=t,this.ht=i}return t.prototype.on=function(t){return this.st===t.st&&this.ht===t.ht},t}();function i2(t){return t.ownerDocument&&t.ownerDocument.defaultView&&t.ownerDocument.defaultView.devicePixelRatio||1}function i3(t){var i=v(t.getContext("2d"));return i.setTransform(1,0,0,1,0,0),i}function i5(t,i){var e=t.createElement("canvas"),n=i2(e);return e.style.width=i.st+"px",e.style.height=i.ht+"px",e.width=i.st*n,e.height=i.ht*n,e}function i4(t,i){var e,n=v(t.ownerDocument).createElement("canvas");t.appendChild(n);var o=(void 0===e&&(e=r),new s(n,e));return o.resizeCanvas({width:i.st,height:i.ht}),o}function i6(t,i,e){var n=(t.jf-i.jf)/(t.S-i.S);return Math.sign(n)*Math.min(Math.abs(n),e)}var i8=function(){function t(t,i,e,n){this.qf=null,this.Uf=null,this.Hf=null,this.Yf=null,this.Kf=null,this.$f=0,this.Xf=0,this.Zf=!1,this.Jf=t,this.Gf=i,this.Qf=e,this.Yi=n}return t.prototype.tc=function(t,i){if(null!==this.qf){if(this.qf.S===i)return void(this.qf.jf=t);if(Math.abs(this.qf.jf-t)<this.Yi)return}this.Yf=this.Hf,this.Hf=this.Uf,this.Uf=this.qf,this.qf={S:i,jf:t}},t.prototype.ia=function(t,i){if(null!==this.qf&&null!==this.Uf&&!(i-this.qf.S>50)){var e=0,n=i6(this.qf,this.Uf,this.Gf),r=(l=this.qf,c=this.Uf,l.jf-c.jf),s=[n],o=[r];if(e+=r,null!==this.Hf){var h=i6(this.Uf,this.Hf,this.Gf);if(Math.sign(h)===Math.sign(n)){var a=(f=this.Uf,p=this.Hf,f.jf-p.jf);if(s.push(h),o.push(a),e+=a,null!==this.Yf){var u=i6(this.Hf,this.Yf,this.Gf);if(Math.sign(u)===Math.sign(n)){var l,c,f,p,v,d,y=(v=this.Hf,d=this.Yf,v.jf-d.jf);s.push(u),o.push(y),e+=y}}}}for(var g,m,w=0,b=0;b<s.length;++b)w+=o[b]/e*s[b];Math.abs(w)<this.Jf||(this.Kf={jf:t,S:i},this.Xf=w,this.$f=(g=Math.abs(w),Math.log(-(1*(m=Math.log(this.Qf))/g))/m))}},t.prototype.ic=function(t){var i=v(this.Kf),e=t-i.S;return i.jf+this.Xf*(Math.pow(this.Qf,e)-1)/Math.log(this.Qf)},t.prototype.nc=function(t){return null===this.Kf||this.sc(t)===this.$f},t.prototype.hc=function(){return this.Zf},t.prototype.rc=function(){this.Zf=!0},t.prototype.sc=function(t){return Math.min(t-v(this.Kf).S,this.$f)},t}(),i7="undefined"!=typeof window,i9=function(){if(!i7)return!1;var t=!!navigator.maxTouchPoints||!!navigator.msMaxTouchPoints||!!i7&&("ontouchstart"in window||!!(window.DocumentTouch&&document instanceof window.DocumentTouch));return"onorientationchange"in window&&t}(),et=function(){if(!i7)return!1;var t=/Android/i.test(navigator.userAgent),i=/iPhone|iPad|iPod|AppleWebKit.+Mobile/i.test(navigator.userAgent);return t||i}(),ei=function(){function t(t,i,e){this.ec=0,this.uc=null,this.ac=null,this.oc=!1,this.lc=null,this.fc=!1,this.cc=!1,this.vc=null,this._c=null,this.dc=null,this.wc=null,this.Mc=0,this.bc=!1,this.mc=!1,this.gc=!1,this.yc=t,this.kc=i,this.ki=e,this.Cc()}return t.prototype.en=function(){null!==this.vc&&(this.vc(),this.vc=null),null!==this._c&&(this._c(),this._c=null),null!==this.dc&&(this.dc(),this.dc=null),this.Nc(),this.xc()},t.prototype.Sc=function(t){var i=this;this._c&&this._c();var e=this.Dc.bind(this);this._c=function(){i.yc.removeEventListener("mousemove",e)},this.yc.addEventListener("mousemove",e),er(t)&&this.Dc(t);var n=this.Ac(t);this.Tc(n,this.kc.Bc)},t.prototype.xc=function(){null!==this.uc&&clearTimeout(this.uc),this.ec=0,this.uc=null},t.prototype.Dc=function(t){if(!this.gc||er(t)){var i=this.Ac(t);this.Tc(i,this.kc.Lc)}},t.prototype.Fc=function(t){if((!("button"in t)||0===t.button)&&null===this.wc){var i=er(t);if(!this.mc||!i){this.bc=!0;var e=this.Ac(t),n=d(this.lc),r=Math.abs(n.p-e.Ec),s=Math.abs(n.g-e.Vc),o=r+s>5;if(o||!i){if(o&&!this.fc&&i){var h=.5*r,a=s>=h&&!this.ki.Oc,u=h>s&&!this.ki.Wc;a||u||(this.mc=!0)}o&&(this.fc=!0,this.cc=!0,i&&this.Nc()),this.mc||(this.Tc(e,this.kc.zc),i&&es(t))}}}},t.prototype.Pc=function(t){if(!("button"in t)||0===t.button){var i=this.Ac(t);this.Nc(),this.lc=null,this.gc=!1,this.dc&&(this.dc(),this.dc=null),er(t)&&this.Rc(t),this.Tc(i,this.kc.Ic),++this.ec,this.uc&&this.ec>1?(this.Tc(i,this.kc.jc),this.xc()):this.cc||this.Tc(i,this.kc.qc),er(t)&&(es(t),this.Rc(t),0===t.touches.length&&(this.oc=!1))}},t.prototype.Nc=function(){null!==this.ac&&(clearTimeout(this.ac),this.ac=null)},t.prototype.Uc=function(t){if(!("button"in t)||0===t.button){var i=this.Ac(t);this.cc=!1,this.fc=!1,this.mc=!1,er(t)&&this.Sc(t),this.lc={p:i.Ec,g:i.Vc},this.dc&&(this.dc(),this.dc=null);var e=this.Fc.bind(this),n=this.Pc.bind(this),r=this.yc.ownerDocument.documentElement;this.dc=function(){r.removeEventListener("touchmove",e),r.removeEventListener("touchend",n),r.removeEventListener("mousemove",e),r.removeEventListener("mouseup",n)},r.addEventListener("touchmove",e,{passive:!1}),r.addEventListener("touchend",n,{passive:!1}),this.Nc(),er(t)&&1===t.touches.length?this.ac=setTimeout(this.Hc.bind(this,t),240):(r.addEventListener("mousemove",e),r.addEventListener("mouseup",n)),this.gc=!0,this.Tc(i,this.kc.Yc),this.uc||(this.ec=0,this.uc=setTimeout(this.xc.bind(this),500))}},t.prototype.Cc=function(){var t=this;this.yc.addEventListener("mouseenter",this.Sc.bind(this)),this.yc.addEventListener("touchcancel",this.Nc.bind(this));var i=this.yc.ownerDocument,e=function(i){t.kc.Kc&&(i.composed&&t.yc.contains(i.composedPath()[0])||i.target&&t.yc.contains(i.target)||t.kc.Kc())};this.vc=function(){i.removeEventListener("mousedown",e),i.removeEventListener("touchstart",e)},i.addEventListener("mousedown",e),i.addEventListener("touchstart",e,{passive:!0}),this.yc.addEventListener("mouseleave",this.Rc.bind(this)),this.yc.addEventListener("touchstart",this.Uc.bind(this),{passive:!0}),i9||this.yc.addEventListener("mousedown",this.Uc.bind(this)),this.$c(),this.yc.addEventListener("touchmove",function(){},{passive:!1})},t.prototype.$c=function(){var t=this;void 0===this.kc.Xc&&void 0===this.kc.Zc&&void 0===this.kc.Jc||(this.yc.addEventListener("touchstart",function(i){return t.Gc(i.touches)},{passive:!0}),this.yc.addEventListener("touchmove",function(i){if(2===i.touches.length&&null!==t.wc&&void 0!==t.kc.Zc){var e=en(i.touches[0],i.touches[1])/t.Mc;t.kc.Zc(t.wc,e),es(i)}},{passive:!1}),this.yc.addEventListener("touchend",function(i){t.Gc(i.touches)}))},t.prototype.Gc=function(t){1===t.length&&(this.bc=!1),2!==t.length||this.bc||this.oc?this.Qc():this.tv(t)},t.prototype.tv=function(t){var i=ee(this.yc);this.wc={p:(t[0].clientX-i.left+(t[1].clientX-i.left))/2,g:(t[0].clientY-i.top+(t[1].clientY-i.top))/2},this.Mc=en(t[0],t[1]),void 0!==this.kc.Xc&&this.kc.Xc(),this.Nc()},t.prototype.Qc=function(){null!==this.wc&&(this.wc=null,void 0!==this.kc.Jc&&this.kc.Jc())},t.prototype.Rc=function(t){this._c&&this._c();var i=this.Ac(t);this.Tc(i,this.kc.iv)},t.prototype.Hc=function(t){var i=this.Ac(t);this.Tc(i,this.kc.nv),this.cc=!0,this.oc=!0},t.prototype.Tc=function(t,i){i&&i.call(this.kc,t)},t.prototype.Ac=function(t){i="touches"in t&&t.touches.length?t.touches[0]:"changedTouches"in t&&t.changedTouches.length?t.changedTouches[0]:t;var i,e=ee(this.yc);return{sv:i.clientX,hv:i.clientY,Ec:i.pageX,Vc:i.pageY,rv:i.screenX,ev:i.screenY,uv:i.clientX-e.left,av:i.clientY-e.top,ov:t.ctrlKey,lv:t.altKey,fv:t.shiftKey,cv:t.metaKey,ke:t.type.startsWith("mouse")?"mouse":"touch",vv:t.view}},t}();function ee(t){return t.getBoundingClientRect()||{left:0,top:0}}function en(t,i){var e=t.clientX-i.clientX,n=t.clientY-i.clientY;return Math.sqrt(e*e+n*n)}function er(t){return!!t.touches}function es(t){t.cancelable&&t.preventDefault()}var eo=function(){function t(t,i,e,n){this.Pu=new iy(200),this.fe=0,this._v="",this.ma="",this.Vu=[],this.dv=new Map,this.fe=t,this._v=i,this.ma=tG(t,e,n)}return t.prototype.en=function(){this.Pu.Ou(),this.Vu=[],this.dv.clear()},t.prototype.wv=function(t,i,e,n,r){var s=this.Mv(t,i);if("left"!==r){var o=i2(t.canvas);e-=Math.floor(s.bv*o)}n-=Math.floor(s.Mt/2),t.drawImage(s.mv,e,n,s.wt,s.Mt)},t.prototype.Mv=function(t,i){var e,n=this;if(this.dv.has(i))e=p(this.dv.get(i));else{if(this.Vu.length>=200){var r=p(this.Vu.shift());this.dv.delete(r)}var s=i2(t.canvas),o=Math.ceil(this.fe/4.5),h=Math.round(this.fe/10),a=Math.ceil(this.Pu.Vt(t,i)),u=tl(Math.round(a+2*o)),l=tl(this.fe+2*o),c=i5(document,new i1(u,l));e={Et:i,bv:Math.round(Math.max(1,a)),wt:Math.ceil(u*s),Mt:Math.ceil(l*s),mv:c},0!==a&&(this.Vu.push(e.Et),this.dv.set(e.Et,e)),B(t=i3(e.mv),s,function(){t.font=n.ma,t.fillStyle=n._v,t.fillText(i,0,l-o-h)})}return e},t}(),eh=function(){function t(t,i,e,n){var r=this;this.Gt=null,this.pv=null,this.gv=null,this.yv=!1,this.kv=new iy(50),this.Cv=new eo(11,"#000"),this._v=null,this.ma=null,this.Nv=0,this.xv=function(){r.Sv(r.tf.ct()),r.vi.Dv().vt().Or()},this.Av=function(){r.vi.Dv().vt().Or()},this.vi=t,this.ki=i,this.tf=e,this.Tv="left"===n,this.Bv=document.createElement("div"),this.Bv.style.height="100%",this.Bv.style.overflow="hidden",this.Bv.style.width="25px",this.Bv.style.left="0",this.Bv.style.position="relative",this.Lv=i4(this.Bv,new i1(16,16)),this.Lv.subscribeCanvasConfigured(this.xv);var s=this.Lv.canvas;s.style.position="absolute",s.style.zIndex="1",s.style.left="0",s.style.top="0",this.Fv=i4(this.Bv,new i1(16,16)),this.Fv.subscribeCanvasConfigured(this.Av);var o=this.Fv.canvas;o.style.position="absolute",o.style.zIndex="2",o.style.left="0",o.style.top="0";var h={Yc:this.Ev.bind(this),zc:this.Vv.bind(this),Kc:this.Ov.bind(this),Ic:this.Wv.bind(this),jc:this.zv.bind(this),Bc:this.Pv.bind(this),iv:this.Rv.bind(this)};this.Iv=new ei(this.Fv.canvas,h,{Oc:!1,Wc:!0})}return t.prototype.en=function(){this.Iv.en(),this.Fv.unsubscribeCanvasConfigured(this.Av),this.Fv.destroy(),this.Lv.unsubscribeCanvasConfigured(this.xv),this.Lv.destroy(),null!==this.Gt&&this.Gt.Is().sn(this),this.Gt=null,null!==this.gv&&(clearTimeout(this.gv),this.gv=null),this.Cv.en()},t.prototype.jv=function(){return this.Bv},t.prototype.N=function(){return v(this.Gt).ct().borderColor},t.prototype.qv=function(){return this.ki.textColor},t.prototype.Wt=function(){return this.ki.fontSize},t.prototype.Uv=function(){return tG(this.Wt(),this.ki.fontFamily)},t.prototype.Hv=function(){var t=this.tf.ct(),i=this._v!==t.et,e=this.ma!==t.Nt;return(i||e)&&(this.Sv(t),this._v=t.et),e&&(this.kv.Ou(),this.ma=t.Nt),t},t.prototype.Yv=function(){if(null===this.Gt)return 0;var t=34,i=this.Hv(),e=i3(this.Lv.canvas),n=this.Gt.Fn();e.font=this.Uv(),n.length>0&&(t=Math.max(this.kv.Vt(e,n[0].Tn),this.kv.Vt(e,n[n.length-1].Tn)));for(var r=this.Kv(),s=r.length;s--;){var o=this.kv.Vt(e,r[s].Et());o>t&&(t=o)}var h=this.Gt.H();if(null!==h&&null!==this.pv){var a=this.Gt.Si(1,h),u=this.Gt.Si(this.pv.ht-2,h);t=Math.max(t,this.kv.Vt(e,this.Gt.ii(Math.floor(Math.min(a,u))+.11111111111111,h)),this.kv.Vt(e,this.Gt.ii(Math.ceil(Math.max(a,u))-.11111111111111,h)))}var l=Math.ceil(i.At+i.Dt+i.Lt+i.Ft+t);return l+l%2},t.prototype.$v=function(t){if(t.st<0||t.ht<0)throw Error("Try to set invalid size to PriceAxisWidget "+JSON.stringify(t));null!==this.pv&&this.pv.on(t)||(this.pv=t,this.Lv.resizeCanvas({width:t.st,height:t.ht}),this.Fv.resizeCanvas({width:t.st,height:t.ht}),this.Bv.style.width=t.st+"px",this.Bv.style.height=t.ht+"px",this.Bv.style.minWidth=t.st+"px")},t.prototype.Xv=function(){return v(this.pv).st},t.prototype.fi=function(t){this.Gt!==t&&(null!==this.Gt&&this.Gt.Is().sn(this),this.Gt=t,t.Is().Ji(this.qn.bind(this),this))},t.prototype.$=function(){return this.Gt},t.prototype.Ou=function(){var t=this.vi.Zv();this.vi.Dv().vt().Ll(t,v(this.$()))},t.prototype.Jv=function(t){if(null!==this.pv){if(1!==t){var i=i3(this.Lv.canvas);this.Gv(),this.Qv(i,this.Lv.pixelRatio),this.yu(i,this.Lv.pixelRatio),this.t_(i,this.Lv.pixelRatio),this.i_(i,this.Lv.pixelRatio)}var e=i3(this.Fv.canvas),n=this.pv.st,r=this.pv.ht;B(e,this.Fv.pixelRatio,function(){e.clearRect(0,0,n,r)}),this.n_(e,this.Fv.pixelRatio)}},t.prototype.s_=function(){return this.Lv.canvas},t.prototype.Ev=function(t){if(null!==this.Gt&&!this.Gt.ti()&&this.vi.Dv().ct().handleScale.axisPressedMouseMove.price){var i=this.vi.Dv().vt(),e=this.vi.Zv();this.yv=!0,i.Nl(e,this.Gt,t.av)}},t.prototype.Vv=function(t){if(null!==this.Gt&&this.vi.Dv().ct().handleScale.axisPressedMouseMove.price){var i=this.vi.Dv().vt(),e=this.vi.Zv(),n=this.Gt;i.xl(e,n,t.av)}},t.prototype.Ov=function(){if(null!==this.Gt&&this.vi.Dv().ct().handleScale.axisPressedMouseMove.price){var t=this.vi.Dv().vt(),i=this.vi.Zv(),e=this.Gt;this.yv&&(this.yv=!1,t.Sl(i,e))}},t.prototype.Wv=function(t){if(null!==this.Gt&&this.vi.Dv().ct().handleScale.axisPressedMouseMove.price){var i=this.vi.Dv().vt(),e=this.vi.Zv();this.yv=!1,i.Sl(e,this.Gt)}},t.prototype.zv=function(t){this.vi.Dv().ct().handleScale.axisDoubleClickReset&&this.Ou()},t.prototype.Pv=function(t){null!==this.Gt&&(!this.vi.Dv().vt().ct().handleScale.axisPressedMouseMove.price||this.Gt.cs()||this.Gt.vs()||this.h_(1))},t.prototype.Rv=function(t){this.h_(0)},t.prototype.Kv=function(){var t=this,i=[],e=null===this.Gt?void 0:this.Gt;return function(n){for(var r=0;r<n.length;++r)for(var s=n[r].Pi(t.vi.Zv(),e),o=0;o<s.length;o++)i.push(s[o])}(this.vi.Zv().Os()),i},t.prototype.Qv=function(t,i){var e=this;if(null!==this.pv){var n=this.pv.st,r=this.pv.ht;B(t,i,function(){var i=e.vi.Zv().vt(),s=i.Rf(),o=i.Pf();s===o?I(t,0,0,n,r,s):W(t,0,0,n,r,s,o)})}},t.prototype.yu=function(t,i){if(null!==this.pv&&null!==this.Gt&&this.Gt.ct().borderVisible){t.save(),t.fillStyle=this.N();var e,n=Math.max(1,Math.floor(this.Hv().At*i));e=this.Tv?Math.floor(this.pv.st*i)-n:0,t.fillRect(e,0,n,Math.ceil(this.pv.ht*i)),t.restore()}},t.prototype.t_=function(t,i){if(null!==this.pv&&null!==this.Gt){var e=this.Gt.Fn();t.save(),t.strokeStyle=this.N(),t.font=this.Uv(),t.fillStyle=this.N();var n=this.Hv(),r=this.Gt.ct().borderVisible&&this.Gt.ct().drawTicks,s=this.Tv?Math.floor((this.pv.st-n.Dt)*i-n.At*i):Math.floor(n.At*i),o=this.Tv?Math.round(s-n.Lt*i):Math.round(s+n.Dt*i+n.Lt*i),h=this.Tv?"right":"left",a=Math.max(1,Math.floor(i)),u=Math.floor(.5*i);if(r){var l=Math.round(n.Dt*i);t.beginPath();for(var c=0;c<e.length;c++){var f=e[c];t.rect(s,Math.round(f.An*i)-u,l,a)}t.fill()}t.fillStyle=this.qv();for(var p=0;p<e.length;p++)f=e[p],this.Cv.wv(t,f.Tn,o,Math.round(f.An*i),h);t.restore()}},t.prototype.Gv=function(){if(null!==this.pv&&null!==this.Gt){var t=this.pv.ht/2,i=[],e=this.Gt.Os().slice(),n=this.vi.Zv(),r=this.Hv();this.Gt===n.xi()&&this.vi.Zv().Os().forEach(function(t){n.Uu(t)&&e.push(t)});var s=this.Gt.Vs()[0],o=this.Gt;e.forEach(function(e){var r=e.Pi(n,o);r.forEach(function(t){t.Kt(null),t.$t()&&i.push(t)}),s===e&&r.length>0&&(t=r[0].zt())});var h=i.filter(function(i){return i.zt()<=t}),a=i.filter(function(i){return i.zt()>t});if(h.sort(function(t,i){return i.zt()-t.zt()}),h.length&&a.length&&a.push(h[0]),a.sort(function(t,i){return t.zt()-i.zt()}),i.forEach(function(t){return t.Kt(t.zt())}),this.Gt.ct().alignLabels){for(var u,l,c=1;c<h.length;c++){var f=h[c],p=(u=h[c-1]).Mt(r,!1);f.zt()>(l=u.Yt())-p&&f.Kt(l-p)}for(var v=1;v<a.length;v++)f=a[v],p=(u=a[v-1]).Mt(r,!0),f.zt()<(l=u.Yt())+p&&f.Kt(l+p)}}},t.prototype.i_=function(t,i){var e=this;if(null!==this.pv){t.save();var n=this.pv,r=this.Kv(),s=this.Hv(),o=this.Tv?"right":"left";r.forEach(function(r){if(r.Xt()){var h=r.P(v(e.Gt));t.save(),h.h(t,s,e.kv,n.st,o,i),t.restore()}}),t.restore()}},t.prototype.n_=function(t,i){var e=this;if(null!==this.pv&&null!==this.Gt){t.save();var n=this.pv,r=this.vi.Dv().vt(),s=[],o=this.vi.Zv(),h=r.bf().Pi(o,this.Gt);h.length&&s.push(h);var a=this.Hv(),u=this.Tv?"right":"left";s.forEach(function(r){r.forEach(function(r){t.save(),r.P(v(e.Gt)).h(t,a,e.kv,n.st,u,i),t.restore()})}),t.restore()}},t.prototype.h_=function(t){this.Bv.style.cursor=1===t?"ns-resize":"default"},t.prototype.qn=function(){var t=this,i=this.Yv();if(this.Nv<i){var e=this.vi.Dv();null===this.gv&&(this.gv=setTimeout(function(){e&&e.vt().uf(),t.gv=null},100))}this.Nv=i},t.prototype.Sv=function(t){this.Cv.en(),this.Cv=new eo(t.Wt,t.et,t.le)},t}();function ea(t,i,e,n,r){t.o&&t.o(i,e,n,r)}function eu(t,i,e,n,r){t.h(i,e,n,r)}function el(t,i){return t.zi(i)}function ec(t,i){return void 0!==t.Io?t.Io(i):[]}var ef=function(){function t(t,i){var e=this;this.pv=new i1(0,0),this.r_=null,this.e_=null,this.u_=null,this.a_=!1,this.o_=new to,this.l_=0,this.f_=!1,this.c_=null,this.v_=!1,this.__=null,this.d_=null,this.xv=function(){return e.w_&&e.hi().Or()},this.Av=function(){return e.w_&&e.hi().Or()},this.M_=t,this.w_=i,this.w_.Vl().Ji(this.b_.bind(this),this,!0),this.m_=document.createElement("td"),this.m_.style.padding="0",this.m_.style.position="relative";var n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.position="relative",n.style.overflow="hidden",this.p_=document.createElement("td"),this.p_.style.padding="0",this.g_=document.createElement("td"),this.g_.style.padding="0",this.m_.appendChild(n),this.Lv=i4(n,new i1(16,16)),this.Lv.subscribeCanvasConfigured(this.xv);var r=this.Lv.canvas;r.style.position="absolute",r.style.zIndex="1",r.style.left="0",r.style.top="0",this.Fv=i4(n,new i1(16,16)),this.Fv.subscribeCanvasConfigured(this.Av);var s=this.Fv.canvas;s.style.position="absolute",s.style.zIndex="2",s.style.left="0",s.style.top="0",this.y_=document.createElement("tr"),this.y_.appendChild(this.p_),this.y_.appendChild(this.m_),this.y_.appendChild(this.g_),this.k_();var o=this.Dv().ct().handleScroll;this.Iv=new ei(this.Fv.canvas,this,{Oc:!o.vertTouchDrag,Wc:!o.horzTouchDrag})}return t.prototype.en=function(){null!==this.r_&&this.r_.en(),null!==this.e_&&this.e_.en(),this.Fv.unsubscribeCanvasConfigured(this.Av),this.Fv.destroy(),this.Lv.unsubscribeCanvasConfigured(this.xv),this.Lv.destroy(),null!==this.w_&&this.w_.Vl().sn(this),this.Iv.en()},t.prototype.Zv=function(){return v(this.w_)},t.prototype.C_=function(i){null!==this.w_&&this.w_.Vl().sn(this),this.w_=i,null!==this.w_&&this.w_.Vl().Ji(t.prototype.b_.bind(this),this,!0),this.k_()},t.prototype.Dv=function(){return this.M_},t.prototype.jv=function(){return this.y_},t.prototype.k_=function(){if(null!==this.w_&&(this.N_(),0!==this.hi().W().length)){if(null!==this.r_){var t=this.w_.kl();this.r_.fi(v(t))}if(null!==this.e_){var i=this.w_.Cl();this.e_.fi(v(i))}}},t.prototype.wl=function(){return null!==this.w_?this.w_.wl():0},t.prototype.Ml=function(t){this.w_&&this.w_.Ml(t)},t.prototype.Bc=function(t){if(this.w_){var i=t.uv,e=t.av;i9||this.x_(i,e)}},t.prototype.Yc=function(t){if(this.f_=!1,this.v_=null!==this.c_,this.w_){if(this.S_(),document.activeElement!==document.body&&document.activeElement!==document.documentElement)v(document.activeElement).blur();else{var i=document.getSelection();null!==i&&i.removeAllRanges()}var e=this.hi();if(!this.w_.xi().ti()&&!e.j().ti()){if(null!==this.c_){var n=e.bf();this.__={x:n.bt(),y:n.gt()},this.c_={x:t.uv,y:t.av}}i9||this.x_(t.uv,t.av)}}},t.prototype.Lc=function(t){if(this.w_){var i=t.uv,e=t.av;if(this.D_()&&this.A_(),!i9){this.x_(i,e);var n=this.pa(i,e);this.hi().cf(n&&{vf:n.vf,T_:n.T_})}}},t.prototype.qc=function(t){if(null!==this.w_){var i=t.uv,e=t.av;if(this.o_.rn()){var n=this.hi().bf().I();this.o_.hn(n,{x:i,y:e})}this.B_()}},t.prototype.zc=function(t){if(null!==this.w_){var i=this.hi(),e=t.uv,n=t.av;if(null!==this.c_){this.v_=!1;var r=v(this.__),s=r.x+(e-this.c_.x),o=r.y+(n-this.c_.y);this.x_(s,o)}else this.D_()||this.x_(e,n);if(!i.j().ti()){var h=this.M_.ct(),a=h.handleScroll,u=h.kineticScroll;if(a.pressedMouseMove&&"touch"!==t.ke||(a.horzTouchDrag||a.vertTouchDrag)&&"mouse"!==t.ke){var l=this.w_.xi(),c=performance.now();null!==this.u_||this.L_()||(this.u_={x:t.sv,y:t.hv,Dh:c,uv:t.uv,av:t.av}),null!==this.d_&&this.d_.tc(t.uv,c),null===this.u_||this.a_||this.u_.x===t.sv&&this.u_.y===t.hv||(null===this.d_&&("touch"===t.ke&&u.touch||"mouse"===t.ke&&u.mouse)&&(this.d_=new i8(.2,7,.997,15),this.d_.tc(this.u_.uv,this.u_.Dh),this.d_.tc(t.uv,c)),l.ti()||i.Dl(this.w_,l,t.av),i.Nf(t.uv),this.a_=!0),this.a_&&(l.ti()||i.Al(this.w_,l,t.av),i.xf(t.uv))}}}},t.prototype.Ic=function(t){null!==this.w_&&(this.f_=!1,this.F_(t))},t.prototype.nv=function(t){if(this.f_=!0,null===this.c_&&et){var i={x:t.uv,y:t.av};this.E_(i,i)}},t.prototype.iv=function(t){null!==this.w_&&(this.w_.vt().cf(null),et||this.A_())},t.prototype.V_=function(){return this.o_},t.prototype.Xc=function(){this.l_=1,this.S_()},t.prototype.Zc=function(t,i){if(this.M_.ct().handleScale.pinch){var e=5*(i-this.l_);this.l_=i,this.hi().kf(t.p,e)}},t.prototype.pa=function(t,i){var e=this.w_;if(null===e)return null;for(var n=0,r=e.Os();n<r.length;n++){var s=r[n],o=this.O_(s.zi(e),t,i);if(null!==o)return{vf:s,vv:o.vv,T_:o.T_}}return null},t.prototype.W_=function(t,i){v("left"===i?this.r_:this.e_).$v(new i1(t,this.pv.ht))},t.prototype.z_=function(){return this.pv},t.prototype.$v=function(t){if(t.st<0||t.ht<0)throw Error("Try to set invalid size to PaneWidget "+JSON.stringify(t));this.pv.on(t)||(this.pv=t,this.Lv.resizeCanvas({width:t.st,height:t.ht}),this.Fv.resizeCanvas({width:t.st,height:t.ht}),this.m_.style.width=t.st+"px",this.m_.style.height=t.ht+"px")},t.prototype.P_=function(){var t=v(this.w_);t.yl(t.kl()),t.yl(t.Cl());for(var i=0,e=t.Vs();i<e.length;i++){var n=e[i];if(t.Uu(n)){var r=n.$();null!==r&&t.yl(r),n.Ii()}}},t.prototype.s_=function(){return this.Lv.canvas},t.prototype.Jv=function(t){if(0!==t&&null!==this.w_){if(t>1&&this.P_(),null!==this.r_&&this.r_.Jv(t),null!==this.e_&&this.e_.Jv(t),1!==t){var i=i3(this.Lv.canvas);i.save(),this.Qv(i,this.Lv.pixelRatio),this.w_&&(this.R_(i,this.Lv.pixelRatio),this.I_(i,this.Lv.pixelRatio),this.j_(i,this.Lv.pixelRatio,el)),i.restore()}var e=i3(this.Fv.canvas);e.clearRect(0,0,Math.ceil(this.pv.st*this.Fv.pixelRatio),Math.ceil(this.pv.ht*this.Fv.pixelRatio)),this.j_(e,this.Lv.pixelRatio,ec),this.q_(e,this.Fv.pixelRatio)}},t.prototype.U_=function(){return this.r_},t.prototype.H_=function(){return this.e_},t.prototype.b_=function(){null!==this.w_&&this.w_.Vl().sn(this),this.w_=null},t.prototype.Qv=function(t,i){var e=this;B(t,i,function(){var i=e.hi(),n=i.Rf(),r=i.Pf();n===r?I(t,0,0,e.pv.st,e.pv.ht,r):W(t,0,0,e.pv.st,e.pv.ht,n,r)})},t.prototype.R_=function(t,i){var e=v(this.w_),n=e.Ol().sl().P(e.Mt(),e.wt());null!==n&&(t.save(),n.h(t,i,!1),t.restore())},t.prototype.I_=function(t,i){var e=this.hi().Mf();this.Y_(t,i,el,ea,e),this.Y_(t,i,el,eu,e)},t.prototype.q_=function(t,i){this.Y_(t,i,el,eu,this.hi().bf())},t.prototype.j_=function(t,i,e){for(var n=v(this.w_).Os(),r=0;r<n.length;r++){var s=n[r];this.Y_(t,i,e,ea,s)}for(var o=0;o<n.length;o++)s=n[o],this.Y_(t,i,e,eu,s)},t.prototype.Y_=function(t,i,e,n,r){for(var s=v(this.w_),o=e(r,s),h=s.Mt(),a=s.wt(),u=s.vt().ff(),l=null!==u&&u.vf===r,c=null!==u&&l&&void 0!==u.T_?u.T_.ga:void 0,f=0;f<o.length;f++){var p=o[f].P(h,a);null!==p&&(t.save(),n(p,t,i,l,c),t.restore())}},t.prototype.O_=function(t,i,e){for(var n=0;n<t.length;n++){var r=t[n],s=r.P(this.pv.ht,this.pv.st);if(null!==s&&s.pa){var o=s.pa(i,e);if(null!==o)return{vv:r,T_:o}}}return null},t.prototype.N_=function(){if(null!==this.w_){var t=this.M_,i=this.w_.kl().ct().visible,e=this.w_.Cl().ct().visible;i||null===this.r_||(this.p_.removeChild(this.r_.jv()),this.r_.en(),this.r_=null),e||null===this.e_||(this.g_.removeChild(this.e_.jv()),this.e_.en(),this.e_=null);var n=t.vt().Ff();i&&null===this.r_&&(this.r_=new eh(this,t.ct().layout,n,"left"),this.p_.appendChild(this.r_.jv())),e&&null===this.e_&&(this.e_=new eh(this,t.ct().layout,n,"right"),this.g_.appendChild(this.e_.jv()))}},t.prototype.D_=function(){return et&&null===this.c_},t.prototype.L_=function(){return et&&this.f_||null!==this.c_},t.prototype.K_=function(t){return Math.max(0,Math.min(t,this.pv.st-1))},t.prototype.X_=function(t){return Math.max(0,Math.min(t,this.pv.ht-1))},t.prototype.x_=function(t,i){this.hi().Tf(this.K_(t),this.X_(i),v(this.w_))},t.prototype.A_=function(){this.hi().Bf()},t.prototype.B_=function(){this.v_&&(this.c_=null,this.A_())},t.prototype.E_=function(t,i){this.c_=t,this.v_=!1,this.x_(i.x,i.y);var e=this.hi().bf();this.__={x:e.bt(),y:e.gt()}},t.prototype.hi=function(){return this.M_.vt()},t.prototype.Z_=function(){var t=this.hi(),i=this.Zv(),e=i.xi();t.Tl(i,e),t.Sf(),this.u_=null,this.a_=!1},t.prototype.F_=function(t){var i=this;if(this.a_){var e=performance.now();if(null!==this.d_&&this.d_.ia(t.uv,e),null===this.d_||this.d_.nc(e))this.Z_();else{var n=this.hi(),r=n.j(),s=this.d_,o=function(){if(!s.hc()){var t=performance.now(),e=s.nc(t);if(!s.hc()){var h=r.Pr();n.xf(s.ic(t)),h===r.Pr()&&(e=!0,i.d_=null)}e?i.Z_():requestAnimationFrame(o)}};requestAnimationFrame(o)}}},t.prototype.S_=function(){var t=performance.now(),i=null===this.d_||this.d_.nc(t);null!==this.d_&&(i||this.Z_()),null!==this.d_&&(this.d_.rc(),this.d_=null)},t}(),ep=function(){function t(t,i,e,n,r){var s=this;this.L=!0,this.pv=new i1(0,0),this.xv=function(){return s.Jv(3)},this.Tv="left"===t,this.tf=e.Ff,this.ki=i,this.J_=n,this.G_=r,this.Bv=document.createElement("div"),this.Bv.style.width="25px",this.Bv.style.height="100%",this.Bv.style.overflow="hidden",this.Lv=i4(this.Bv,new i1(16,16)),this.Lv.subscribeCanvasConfigured(this.xv)}return t.prototype.en=function(){this.Lv.unsubscribeCanvasConfigured(this.xv),this.Lv.destroy()},t.prototype.jv=function(){return this.Bv},t.prototype.z_=function(){return this.pv},t.prototype.$v=function(t){if(t.st<0||t.ht<0)throw Error("Try to set invalid size to PriceAxisStub "+JSON.stringify(t));this.pv.on(t)||(this.pv=t,this.Lv.resizeCanvas({width:t.st,height:t.ht}),this.Bv.style.width=t.st+"px",this.Bv.style.minWidth=t.st+"px",this.Bv.style.height=t.ht+"px",this.L=!0)},t.prototype.Jv=function(t){if((!(t<3)||this.L)&&0!==this.pv.st&&0!==this.pv.ht){this.L=!1;var i=i3(this.Lv.canvas);this.Qv(i,this.Lv.pixelRatio),this.yu(i,this.Lv.pixelRatio)}},t.prototype.s_=function(){return this.Lv.canvas},t.prototype.yu=function(t,i){if(this.J_()){var e=this.pv.st;t.save(),t.fillStyle=this.ki.timeScale.borderColor;var n=Math.floor(this.tf.ct().At*i),r=this.Tv?Math.round(e*i)-n:0;t.fillRect(r,0,n,n),t.restore()}},t.prototype.Qv=function(t,i){var e=this;B(t,i,function(){I(t,0,0,e.pv.st,e.pv.ht,e.G_())})},t}();function ev(t,i){return t.Rh>i.Rh?t:i}var ed=function(){function t(t){var i=this;this.Q_=null,this.td=null,this.oe=null,this.nd=!1,this.pv=new i1(0,0),this.sd=new to,this.kv=new iy(5),this.xv=function(){return i.M_.vt().Or()},this.Av=function(){return i.M_.vt().Or()},this.M_=t,this.ki=t.ct().layout,this.hd=document.createElement("tr"),this.rd=document.createElement("td"),this.rd.style.padding="0",this.ed=document.createElement("td"),this.ed.style.padding="0",this.Bv=document.createElement("td"),this.Bv.style.height="25px",this.Bv.style.padding="0",this.ud=document.createElement("div"),this.ud.style.width="100%",this.ud.style.height="100%",this.ud.style.position="relative",this.ud.style.overflow="hidden",this.Bv.appendChild(this.ud),this.Lv=i4(this.ud,new i1(16,16)),this.Lv.subscribeCanvasConfigured(this.xv);var e=this.Lv.canvas;e.style.position="absolute",e.style.zIndex="1",e.style.left="0",e.style.top="0",this.Fv=i4(this.ud,new i1(16,16)),this.Fv.subscribeCanvasConfigured(this.Av);var n=this.Fv.canvas;n.style.position="absolute",n.style.zIndex="2",n.style.left="0",n.style.top="0",this.hd.appendChild(this.rd),this.hd.appendChild(this.Bv),this.hd.appendChild(this.ed),this.ad(),this.M_.vt().dl().Ji(this.ad.bind(this),this),this.Iv=new ei(this.Fv.canvas,this,{Oc:!0,Wc:!1})}return t.prototype.en=function(){this.Iv.en(),null!==this.Q_&&this.Q_.en(),null!==this.td&&this.td.en(),this.Fv.unsubscribeCanvasConfigured(this.Av),this.Fv.destroy(),this.Lv.unsubscribeCanvasConfigured(this.xv),this.Lv.destroy()},t.prototype.jv=function(){return this.hd},t.prototype.od=function(){return this.Q_},t.prototype.ld=function(){return this.td},t.prototype.Yc=function(t){if(!this.nd){this.nd=!0;var i=this.M_.vt();!i.j().ti()&&this.M_.ct().handleScale.axisPressedMouseMove.time&&i.yf(t.uv)}},t.prototype.Kc=function(){var t=this.M_.vt();!t.j().ti()&&this.nd&&(this.nd=!1,this.M_.ct().handleScale.axisPressedMouseMove.time&&t.Af())},t.prototype.zc=function(t){var i=this.M_.vt();!i.j().ti()&&this.M_.ct().handleScale.axisPressedMouseMove.time&&i.Df(t.uv)},t.prototype.Ic=function(t){this.nd=!1;var i=this.M_.vt();i.j().ti()&&!this.M_.ct().handleScale.axisPressedMouseMove.time||i.Af()},t.prototype.jc=function(){this.M_.ct().handleScale.axisDoubleClickReset&&this.M_.vt().Ne()},t.prototype.Bc=function(t){this.M_.vt().ct().handleScale.axisPressedMouseMove.time&&this.h_(1)},t.prototype.iv=function(t){this.h_(0)},t.prototype.z_=function(){return this.pv},t.prototype.fd=function(){return this.sd},t.prototype.vd=function(t,i,e){this.pv&&this.pv.on(t)||(this.pv=t,this.Lv.resizeCanvas({width:t.st,height:t.ht}),this.Fv.resizeCanvas({width:t.st,height:t.ht}),this.Bv.style.width=t.st+"px",this.Bv.style.height=t.ht+"px",this.sd.hn(t)),null!==this.Q_&&this.Q_.$v(new i1(i,t.ht)),null!==this.td&&this.td.$v(new i1(e,t.ht))},t.prototype._d=function(){var t=this.dd();return Math.ceil(t.At+t.Dt+t.Wt+t.Tt+t.Bt)},t.prototype.O=function(){this.M_.vt().j().Fn()},t.prototype.s_=function(){return this.Lv.canvas},t.prototype.Jv=function(t){if(0!==t){if(1!==t){var i=i3(this.Lv.canvas);this.Qv(i,this.Lv.pixelRatio),this.yu(i,this.Lv.pixelRatio),this.t_(i,this.Lv.pixelRatio),null!==this.Q_&&this.Q_.Jv(t),null!==this.td&&this.td.Jv(t)}var e=i3(this.Fv.canvas),n=this.Fv.pixelRatio;e.clearRect(0,0,Math.ceil(this.pv.st*n),Math.ceil(this.pv.ht*n)),this.wd([this.M_.vt().bf()],e,n)}},t.prototype.Qv=function(t,i){var e=this;B(t,i,function(){I(t,0,0,e.pv.st,e.pv.ht,e.M_.vt().Pf())})},t.prototype.yu=function(t,i){if(this.M_.ct().timeScale.borderVisible){t.save(),t.fillStyle=this.Md();var e=Math.max(1,Math.floor(this.dd().At*i));t.fillRect(0,0,Math.ceil(this.pv.st*i),e),t.restore()}},t.prototype.t_=function(t,i){var e=this,n=this.M_.vt().j().Fn();if(n&&0!==n.length){var r=n.reduce(ev,n[0]).Rh;r>30&&r<50&&(r=30),t.save(),t.strokeStyle=this.Md();var s=this.dd(),o=s.At+s.Dt+s.Tt+s.Wt-s.Ot;t.textAlign="center",t.fillStyle=this.Md();var h=Math.floor(this.dd().At*i),a=Math.max(1,Math.floor(i)),u=Math.floor(.5*i);if(this.M_.vt().j().ct().borderVisible){t.beginPath();for(var l=Math.round(s.Dt*i),c=n.length;c--;){var f=Math.round(n[c].An*i);t.rect(f-u,h,a,l)}t.fill()}t.fillStyle=this.ve(),B(t,i,function(){t.font=e.bd();for(var i,s=0;s<n.length;s++)if((i=n[s]).Rh<r){var h=i.Ir?e.md(t,i.An,i.Tn):i.An;t.fillText(i.Tn,h,o)}t.font=e.pd();for(var a=0;a<n.length;a++)(i=n[a]).Rh>=r&&(h=i.Ir?e.md(t,i.An,i.Tn):i.An,t.fillText(i.Tn,h,o))})}},t.prototype.md=function(t,i,e){var n=this.kv.Vt(t,e),r=Math.floor(i-n/2)+.5;return r<0?i+=Math.abs(0-r):r+n>this.pv.st&&(i-=Math.abs(this.pv.st-(r+n))),i},t.prototype.wd=function(t,i,e){for(var n=this.dd(),r=0;r<t.length;r++)for(var s=0,o=t[r].ci();s<o.length;s++){var h=o[s];i.save(),h.P().h(i,n,e),i.restore()}},t.prototype.Md=function(){return this.M_.ct().timeScale.borderColor},t.prototype.ve=function(){return this.ki.textColor},t.prototype.fe=function(){return this.ki.fontSize},t.prototype.bd=function(){return tG(this.fe(),this.ki.fontFamily)},t.prototype.pd=function(){return tG(this.fe(),this.ki.fontFamily,"bold")},t.prototype.dd=function(){null===this.oe&&(this.oe={At:1,Ot:NaN,Tt:NaN,Bt:NaN,si:NaN,Dt:3,Wt:NaN,Nt:"",ni:new iy});var t=this.oe,i=this.bd();if(t.Nt!==i){var e=this.fe();t.Wt=e,t.Nt=i,t.Tt=Math.ceil(e/2.5),t.Bt=t.Tt,t.si=Math.ceil(e/2),t.Ot=Math.round(this.fe()/5),t.ni.Ou()}return this.oe},t.prototype.h_=function(t){this.Bv.style.cursor=1===t?"ew-resize":"default"},t.prototype.ad=function(){var t=this.M_.vt(),i=t.ct();i.leftPriceScale.visible||null===this.Q_||(this.rd.removeChild(this.Q_.jv()),this.Q_.en(),this.Q_=null),i.rightPriceScale.visible||null===this.td||(this.ed.removeChild(this.td.jv()),this.td.en(),this.td=null);var e={Ff:this.M_.vt().Ff()},n=function(){return i.leftPriceScale.borderVisible&&t.j().ct().borderVisible},r=function(){return t.Pf()};i.leftPriceScale.visible&&null===this.Q_&&(this.Q_=new ep("left",i,e,n,r),this.rd.appendChild(this.Q_.jv())),i.rightPriceScale.visible&&null===this.td&&(this.td=new ep("right",i,e,n,r),this.ed.appendChild(this.td.jv()))},t}(),ey=function(){function t(t,i){this.gd=[],this.yd=0,this.En=0,this.$h=0,this.kd=0,this.Cd=0,this.Nd=null,this.xd=!1,this.o_=new to,this.Jl=new to,this.ki=i,this.hd=document.createElement("div"),this.hd.classList.add("tv-lightweight-charts"),this.hd.style.overflow="hidden",this.hd.style.width="100%",this.hd.style.height="100%",(e=this.hd).style.userSelect="none",e.style.webkitUserSelect="none",e.style.msUserSelect="none",e.style.MozUserSelect="none",e.style.webkitTapHighlightColor="transparent",this.Sd=document.createElement("table"),this.Sd.setAttribute("cellspacing","0"),this.hd.appendChild(this.Sd),this.Dd=this.Ad.bind(this),this.hd.addEventListener("wheel",this.Dd,{passive:!1}),this.hi=new i0(this.Ql.bind(this),this.ki),this.vt().mf().Ji(this.Td.bind(this),this),this.Bd=new ed(this),this.Sd.appendChild(this.Bd.jv());var e,n=this.ki.width,r=this.ki.height;if(0===n||0===r){var s=t.getBoundingClientRect();0===n&&(n=Math.floor(s.width),n-=n%2),0===r&&(r=Math.floor(s.height),r-=r%2)}this.Ld(n,r),this.Fd(),t.appendChild(this.hd),this.Ed(),this.hi.j().Jr().Ji(this.hi.uf.bind(this.hi),this),this.hi.dl().Ji(this.hi.uf.bind(this.hi),this)}return t.prototype.vt=function(){return this.hi},t.prototype.ct=function(){return this.ki},t.prototype.Vd=function(){return this.gd},t.prototype.Od=function(){return this.Bd},t.prototype.en=function(){this.hd.removeEventListener("wheel",this.Dd),0!==this.yd&&window.cancelAnimationFrame(this.yd),this.hi.mf().sn(this),this.hi.j().Jr().sn(this),this.hi.dl().sn(this),this.hi.en();for(var t=0,i=this.gd;t<i.length;t++){var e=i[t];this.Sd.removeChild(e.jv()),e.V_().sn(this),e.en()}this.gd=[],v(this.Bd).en(),null!==this.hd.parentElement&&this.hd.parentElement.removeChild(this.hd),this.Jl.en(),this.o_.en()},t.prototype.Ld=function(t,i,e){if(void 0===e&&(e=!1),this.En!==i||this.$h!==t){this.En=i,this.$h=t;var n=i+"px",r=t+"px";v(this.hd).style.height=n,v(this.hd).style.width=r,this.Sd.style.height=n,this.Sd.style.width=r,e?this.Wd(new tQ(3)):this.hi.uf()}},t.prototype.Jv=function(t){void 0===t&&(t=new tQ(3));for(var i=0;i<this.gd.length;i++)this.gd[i].Jv(t.ge(i).me);this.ki.timeScale.visible&&this.Bd.Jv(t.pe())},t.prototype.rs=function(t){this.hi.rs(t),this.Ed();var i=t.width||this.$h,e=t.height||this.En;this.Ld(i,e)},t.prototype.V_=function(){return this.o_},t.prototype.mf=function(){return this.Jl},t.prototype.zd=function(){var t=this;null!==this.Nd&&(this.Wd(this.Nd),this.Nd=null);var i=this.gd[0],e=i5(document,new i1(this.$h,this.En)),n=i3(e);return B(n,i2(e),function(){var e=0,r=0,s=function(i){for(var s=0;s<t.gd.length;s++){var o=t.gd[s],h=o.z_().ht,a=v("left"===i?o.U_():o.H_()),u=a.s_();n.drawImage(u,e,r,a.Xv(),h),r+=h}};t.Pd()&&(s("left"),e=v(i.U_()).Xv()),r=0;for(var o=0;o<t.gd.length;o++){var h=t.gd[o],a=h.z_(),u=h.s_();n.drawImage(u,e,r,a.st,a.ht),r+=a.ht}e+=i.z_().st,t.Rd()&&(r=0,s("right"));var l=function(i){var s=v("left"===i?t.Bd.od():t.Bd.ld()),o=s.z_(),h=s.s_();n.drawImage(h,e,r,o.st,o.ht)};if(t.ki.timeScale.visible){e=0,t.Pd()&&(l("left"),e=v(i.U_()).Xv());var c=t.Bd.z_();u=t.Bd.s_(),n.drawImage(u,e,r,c.st,c.ht),t.Rd()&&(e+=i.z_().st,l("right"),n.restore())}}),e},t.prototype.Id=function(t){return"none"===t?0:("left"!==t||this.Pd())&&("right"!==t||this.Rd())?0===this.gd.length?0:v("left"===t?this.gd[0].U_():this.gd[0].H_()).Xv():0},t.prototype.jd=function(){for(var t=0,i=0,e=0,n=0,r=this.gd;n<r.length;n++){var s=r[n];this.Pd()&&(i=Math.max(i,v(s.U_()).Yv())),this.Rd()&&(e=Math.max(e,v(s.H_()).Yv())),t+=s.wl()}var o=this.$h,h=this.En,a=Math.max(o-i-e,0),u=this.ki.timeScale.visible,l=u?this.Bd._d():0;l%2&&(l+=1);for(var c=0+l,f=h<c?0:h-c,p=f/t,d=0,y=0;y<this.gd.length;++y){(s=this.gd[y]).C_(this.hi.wf()[y]);var g,m=0;m=y===this.gd.length-1?f-d:Math.round(s.wl()*p),d+=g=Math.max(m,2),s.$v(new i1(a,g)),this.Pd()&&s.W_(i,"left"),this.Rd()&&s.W_(e,"right"),s.Zv()&&this.hi.pf(s.Zv(),g)}this.Bd.vd(new i1(u?a:0,l),u?i:0,u?e:0),this.hi.Dr(a),this.kd!==i&&(this.kd=i),this.Cd!==e&&(this.Cd=e)},t.prototype.Ad=function(t){var i=t.deltaX/100,e=-t.deltaY/100;if(0!==i&&this.ki.handleScroll.mouseWheel||0!==e&&this.ki.handleScale.mouseWheel){switch(t.cancelable&&t.preventDefault(),t.deltaMode){case t.DOM_DELTA_PAGE:i*=120,e*=120;break;case t.DOM_DELTA_LINE:i*=32,e*=32}if(0!==e&&this.ki.handleScale.mouseWheel){var n=Math.sign(e)*Math.min(1,Math.abs(e)),r=t.clientX-this.hd.getBoundingClientRect().left;this.vt().kf(r,n)}0!==i&&this.ki.handleScroll.mouseWheel&&this.vt().Cf(-80*i)}},t.prototype.Wd=function(t){var i=t.pe();if(3===i&&this.qd(),3===i||2===i){for(var e=this.hi.wf(),n=0;n<e.length;n++)t.ge(n)._s&&e[n].Fl();for(var r=t.xe(),s=0;s<r.length;s++){var o=r[s];this.Se(o)}r.length>0&&(this.hi.Vr(),this.hi.Eo(),this.hi.Or()),this.Bd.O()}this.Jv(t)},t.prototype.Se=function(t){var i=this.hi.j();switch(t.ke){case 0:i.Qr();break;case 1:i.te(t.X);break;case 2:i.wr(t.X);break;case 3:i.Mr(t.X);break;case 4:i.jr()}},t.prototype.Ql=function(t){var i=this;null!==this.Nd?this.Nd._n(t):this.Nd=t,this.xd||(this.xd=!0,this.yd=window.requestAnimationFrame(function(){i.xd=!1,i.yd=0,null!==i.Nd&&(i.Wd(i.Nd),i.Nd=null)}))},t.prototype.qd=function(){this.Fd()},t.prototype.Fd=function(){for(var t=this.hi.wf(),i=t.length,e=this.gd.length,n=i;n<e;n++){var r=p(this.gd.pop());this.Sd.removeChild(r.jv()),r.V_().sn(this),r.en()}for(n=e;n<i;n++)(r=new ef(this,t[n])).V_().Ji(this.Ud.bind(this),this),this.gd.push(r),this.Sd.insertBefore(r.jv(),this.Bd.jv());for(n=0;n<i;n++){var s=t[n];(r=this.gd[n]).Zv()!==s?r.C_(s):r.k_()}this.Ed(),this.jd()},t.prototype.Hd=function(t,i){var e,n=new Map;if(null!==t&&this.hi.W().forEach(function(i){var e=i.Fa(t);null!==e&&n.set(i,e)}),null!==t){var r=this.hi.j().ri(t);null!==r&&(e=r)}var s=this.vt().ff();return{S:e,Yd:i||void 0,Kd:null!==s&&s.vf instanceof iZ?s.vf:void 0,$d:n,Xd:null!==s&&void 0!==s.T_?s.T_.ka:void 0}},t.prototype.Ud=function(t,i){var e=this;this.o_.hn(function(){return e.Hd(t,i)})},t.prototype.Td=function(t,i){var e=this;this.Jl.hn(function(){return e.Hd(t,i)})},t.prototype.Ed=function(){var t=this.ki.timeScale.visible?"":"none";this.Bd.jv().style.display=t},t.prototype.Pd=function(){return this.gd[0].Zv().kl().ct().visible},t.prototype.Rd=function(){return this.gd[0].Zv().Cl().ct().visible},t}();function eg(t,i,e){var n=e.value,r={Ph:i,S:t,X:[n,n,n,n]};return"color"in e&&void 0!==e.color&&(r.et=e.color),r}function em(t,i,e){return{Ph:i,S:t,X:[e.open,e.high,e.low,e.close]}}function ew(t){return void 0!==t.X}function eb(t){return function(i,e,n){return void 0===n.open&&void 0===n.value?{S:i,Ph:e}:t(i,e,n)}}var eM={Candlestick:eb(em),Bar:eb(em),Area:eb(eg),Baseline:eb(eg),Histogram:eb(eg),Line:eb(eg)};function e_(t){return 60*t*6e4}function eS(t){return 60*t*1e3}var ek=[{Zd:1e3,Rh:10},{Zd:eS(1),Rh:20},{Zd:eS(5),Rh:21},{Zd:eS(30),Rh:22},{Zd:e_(1),Rh:30},{Zd:e_(3),Rh:31},{Zd:e_(6),Rh:32},{Zd:e_(12),Rh:33}];function ex(t,i){if(t.getUTCFullYear()!==i.getUTCFullYear())return 70;if(t.getUTCMonth()!==i.getUTCMonth())return 60;if(t.getUTCDate()!==i.getUTCDate())return 50;for(var e=ek.length-1;e>=0;--e)if(Math.floor(i.getTime()/ek[e].Zd)!==Math.floor(t.getTime()/ek[e].Zd))return ek[e].Rh;return 0}function eC(t,i){if(void 0===i&&(i=0),0!==t.length){for(var e=0===i?null:t[i-1].S.Dh,n=null!==e?new Date(1e3*e):null,r=0,s=i;s<t.length;++s){var o=t[s],h=new Date(1e3*o.S.Dh);null!==n&&(o.zh=ex(h,n)),r+=o.S.Dh-(e||o.S.Dh),e=o.S.Dh,n=h}if(0===i&&t.length>1){var a=Math.ceil(r/(t.length-1)),u=new Date(1e3*(t[0].S.Dh-a));t[0].zh=ex(new Date(1e3*t[0].S.Dh),u)}}}function eL(t){if(!tH(t))throw Error("time must be of type BusinessDay");return{Dh:Math.round(new Date(Date.UTC(t.year,t.month-1,t.day,0,0,0,0)).getTime()/1e3),Sh:t}}function eT(t){if(!g(t))throw Error("time must be of type isUTCTimestamp");return{Dh:t}}function eD(t){return 0===t.length?null:tH(t[0].time)?eL:eT}function eN(t){return g(t)?eT(t):tH(t)?eL(t):eL(eE(t))}function eE(t){var i=new Date(t);if(isNaN(i.getTime()))throw Error("Invalid date string="+t+", expected format=yyyy-mm-dd");return{day:i.getUTCDate(),month:i.getUTCMonth()+1,year:i.getUTCFullYear()}}function eP(t){w(t.time)&&(t.time=eE(t.time))}function eO(t){return{Ph:0,Jd:new Map,Rs:t}}var ej=function(){function t(){this.Gd=new Map,this.Qd=new Map,this.tw=new Map,this.iw=[]}return t.prototype.en=function(){this.Gd.clear(),this.Qd.clear(),this.tw.clear(),this.iw=[]},t.prototype.nw=function(t,i){var e=this,n=0!==this.Gd.size,r=!1;if(this.Qd.has(t)){if(1===this.Qd.size)n=!1,r=!0,this.Gd.clear();else for(var s=0,o=this.iw;s<o.length;s++)o[s].pointData.Jd.delete(t)&&(r=!0)}var h=[];if(0!==i.length){!function(t){t.forEach(eP)}(i);var a=v(eD(i)),u=eM[t.Ya()];h=i.map(function(i){var n=a(i.time),s=e.Gd.get(n.Dh);void 0===s&&(s=eO(n),e.Gd.set(n.Dh,s),r=!0);var o=u(n,s.Ph,i);return s.Jd.set(t,o),o})}n&&this.sw(),this.hw(t,h);var l=-1;if(r){var c=[];this.Gd.forEach(function(t){c.push({zh:0,S:t.Rs,pointData:t})}),c.sort(function(t,i){return t.S.Dh-i.S.Dh}),l=this.rw(c)}return this.ew(t,l)},t.prototype.Of=function(t){return this.nw(t,[])},t.prototype.uw=function(t,i){eP(i);var e=v(eD([i]))(i.time),n=this.tw.get(t);if(void 0!==n&&e.Dh<n.Dh)throw Error("Cannot update oldest data, last time="+n.Dh+", new time="+e.Dh);var r=this.Gd.get(e.Dh),s=void 0===r;void 0===r&&(r=eO(e),this.Gd.set(e.Dh,r));var o=eM[t.Ya()](e,r.Ph,i);if(r.Jd.set(t,o),this.aw(t,o),!s)return this.ew(t,-1);var h={zh:0,S:r.Rs,pointData:r},a=tj(this.iw,h.S.Dh,function(t,i){return t.S.Dh<i});this.iw.splice(a,0,h);for(var u=a;u<this.iw.length;++u)ez(this.iw[u].pointData,u);return eC(this.iw,a),this.ew(t,a)},t.prototype.aw=function(t,i){var e=this.Qd.get(t);void 0===e&&(e=[],this.Qd.set(t,e));var n=0!==e.length?e[e.length-1]:null;null===n||i.S.Dh>n.S.Dh?ew(i)&&e.push(i):ew(i)?e[e.length-1]=i:e.splice(-1,1),this.tw.set(t,i.S)},t.prototype.hw=function(t,i){0!==i.length?(this.Qd.set(t,i.filter(ew)),this.tw.set(t,i[i.length-1].S)):(this.Qd.delete(t),this.tw.delete(t))},t.prototype.sw=function(){for(var t=0,i=this.iw;t<i.length;t++){var e=i[t];0===e.pointData.Jd.size&&this.Gd.delete(e.S.Dh)}},t.prototype.rw=function(t){for(var i=-1,e=0;e<this.iw.length&&e<t.length;++e){var n=this.iw[e],r=t[e];if(n.S.Dh!==r.S.Dh){i=e;break}r.zh=n.zh,ez(r.pointData,e)}if(-1===i&&this.iw.length!==t.length&&(i=Math.min(this.iw.length,t.length)),-1===i)return -1;for(e=i;e<t.length;++e)ez(t[e].pointData,e);return eC(t,i),this.iw=t,i},t.prototype.ow=function(){if(0===this.Qd.size)return null;var t=0;return this.Qd.forEach(function(i){0!==i.length&&(t=Math.max(t,i[i.length-1].Ph))}),t},t.prototype.ew=function(t,i){var e={lw:new Map,j:{Br:this.ow()}};if(-1!==i)this.Qd.forEach(function(t,i){e.lw.set(i,{Zu:t})}),this.Qd.has(t)||e.lw.set(t,{Zu:[]}),e.j.fw=this.iw,e.j.cw=i;else{var n=this.Qd.get(t);e.lw.set(t,{Zu:n||[]})}return e},t}();function ez(t,i){t.Ph=i,t.Jd.forEach(function(t){t.Ph=i})}var e$={color:"#FF0000",price:0,lineStyle:2,lineWidth:1,axisLabelVisible:!0,title:""},eF=function(){function t(t){this.Ia=t}return t.prototype.applyOptions=function(t){this.Ia.rs(t)},t.prototype.options=function(){return this.Ia.ct()},t.prototype._w=function(){return this.Ia},t}();function eU(t){var i=t.overlay,e=function(t,i){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>i.indexOf(n)&&(e[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)0>i.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(e[n[r]]=t[n[r]])}return e}(t,["overlay"]);return i&&(e.priceScaleId=""),e}var eR=function(){function t(t,i,e){this.qe=t,this.dw=i,this.ww=e}return t.prototype.priceFormatter=function(){return this.qe.$s()},t.prototype.priceToCoordinate=function(t){var i=this.qe.H();return null===i?null:this.qe.$().K(t,i.X)},t.prototype.coordinateToPrice=function(t){var i=this.qe.H();return null===i?null:this.qe.$().Si(t,i.X)},t.prototype.barsInLogicalRange=function(t){if(null===t)return null;var i=new tW(new tF(t.from,t.to)).Hh(),e=this.qe.Hi();if(e.ti())return null;var n=e.oo(i.hh(),1),r=e.oo(i.rh(),-1),s=v(e.eo()),o=v(e.Ui());if(null!==n&&null!==r&&n.Ph>r.Ph)return{barsBefore:t.from-s,barsAfter:o-t.to};var h={barsBefore:null===n||n.Ph===s?t.from-s:n.Ph-s,barsAfter:null===r||r.Ph===o?o-t.to:o-r.Ph};return null!==n&&null!==r&&(h.from=n.S.Sh||n.S.Dh,h.to=r.S.Sh||r.S.Dh),h},t.prototype.setData=function(t){this.qe.Ya(),this.dw.Mw(this.qe,t)},t.prototype.update=function(t){this.qe.Ya(),this.dw.bw(this.qe,t)},t.prototype.setMarkers=function(t){var i=t.map(function(t){return l(l({},t),{time:eN(t.time)})});this.qe.Wo(i)},t.prototype.applyOptions=function(t){var i=eU(t);this.qe.rs(i)},t.prototype.options=function(){return M(this.qe.ct())},t.prototype.priceScale=function(){return this.ww.priceScale(this.qe.$().hs())},t.prototype.createPriceLine=function(t){var i=y(M(e$),t);return new eF(this.qe.zo(i))},t.prototype.removePriceLine=function(t){this.qe.Po(t._w())},t.prototype.seriesType=function(){return this.qe.Ya()},t}(),eA=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return u(i,t),i.prototype.applyOptions=function(i){tT(i),t.prototype.applyOptions.call(this,i)},i}(eR),eB={autoScale:!0,mode:0,invertScale:!1,alignLabels:!0,borderVisible:!0,borderColor:"#2B2B43",entireTextOnly:!1,visible:!1,drawTicks:!0,scaleMargins:{bottom:.1,top:.2}},eI={width:0,height:0,layout:{background:{type:"solid",color:"#FFFFFF"},textColor:"#191919",fontSize:11,fontFamily:tX},crosshair:{vertLine:{color:"#758696",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#4c525e"},horzLine:{color:"#758696",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#4c525e"},mode:1},grid:{vertLines:{color:"#D6DCDE",style:0,visible:!0},horzLines:{color:"#D6DCDE",style:0,visible:!0}},overlayPriceScales:l({},eB),leftPriceScale:l(l({},eB),{visible:!1}),rightPriceScale:l(l({},eB),{visible:!0}),timeScale:{rightOffset:0,barSpacing:6,minBarSpacing:.5,fixLeftEdge:!1,fixRightEdge:!1,lockVisibleTimeRangeOnResize:!1,rightBarStaysOnScroll:!1,borderVisible:!0,borderColor:"#2B2B43",visible:!0,timeVisible:!1,secondsVisible:!0,shiftVisibleRangeOnNewBar:!0},watermark:{color:"rgba(0, 0, 0, 0)",visible:!1,fontSize:48,fontFamily:tX,fontStyle:"",text:"",horzAlign:"center",vertAlign:"center"},localization:{locale:i7?navigator.language:"",dateFormat:"dd MMM 'yy"},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0},handleScale:{axisPressedMouseMove:{time:!0,price:!0},axisDoubleClickReset:!0,mouseWheel:!0,pinch:!0},kineticScroll:{mouse:!1,touch:!0}},eW={upColor:"#26a69a",downColor:"#ef5350",wickVisible:!0,borderVisible:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},eV={upColor:"#26a69a",downColor:"#ef5350",openVisible:!0,thinBars:!0},eZ={color:"#2196f3",lineStyle:0,lineWidth:3,lineType:0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBackgroundColor:"",lastPriceAnimation:0},eq={topColor:"rgba( 46, 220, 135, 0.4)",bottomColor:"rgba( 40, 221, 100, 0)",lineColor:"#33D778",lineStyle:0,lineWidth:3,lineType:0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBackgroundColor:"",lastPriceAnimation:0},eH={baseValue:{type:"price",price:0},topFillColor1:"rgba(38, 166, 154, 0.28)",topFillColor2:"rgba(38, 166, 154, 0.05)",topLineColor:"rgba(38, 166, 154, 1)",bottomFillColor1:"rgba(239, 83, 80, 0.05)",bottomFillColor2:"rgba(239, 83, 80, 0.28)",bottomLineColor:"rgba(239, 83, 80, 1)",lineWidth:3,lineStyle:0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBackgroundColor:"",lastPriceAnimation:0},eX={color:"#26a69a",base:0},eG={title:"",visible:!0,lastValueVisible:!0,priceLineVisible:!0,priceLineSource:0,priceLineWidth:1,priceLineColor:"",priceLineStyle:2,baseLineVisible:!0,baseLineWidth:1,baseLineColor:"#B2B5BE",baseLineStyle:0,priceFormat:{type:"price",precision:2,minMove:.01}},eJ=function(){function t(t,i){this.mw=t,this.pw=i}return t.prototype.applyOptions=function(t){this.mw.vt()._f(this.pw,t)},t.prototype.options=function(){return this.Gt().ct()},t.prototype.width=function(){return tY(this.pw)?this.mw.Id("left"===this.pw?"left":"right"):0},t.prototype.Gt=function(){return v(this.mw.vt().df(this.pw)).$},t}(),eY=function(){function t(t,i){this.gw=new to,this.nr=new to,this.sd=new to,this.hi=t,this.ul=t.j(),this.Bd=i,this.ul.Xr().Ji(this.yw.bind(this)),this.ul.Zr().Ji(this.kw.bind(this)),this.Bd.fd().Ji(this.Cw.bind(this))}return t.prototype.en=function(){this.ul.Xr().sn(this),this.ul.Zr().sn(this),this.Bd.fd().sn(this),this.gw.en(),this.nr.en(),this.sd.en()},t.prototype.scrollPosition=function(){return this.ul.Pr()},t.prototype.scrollToPosition=function(t,i){i?this.ul.$r(t,1e3):this.hi.Mr(t)},t.prototype.scrollToRealTime=function(){this.ul.Kr()},t.prototype.getVisibleRange=function(){var t,i,e=this.ul.yr();return null===e?null:{from:null!==(t=e.from.Sh)&&void 0!==t?t:e.from.Dh,to:null!==(i=e.to.Sh)&&void 0!==i?i:e.to.Dh}},t.prototype.setVisibleRange=function(t){var i={from:eN(t.from),to:eN(t.to)},e=this.ul.Sr(i);this.hi.Wf(e)},t.prototype.getVisibleLogicalRange=function(){var t=this.ul.gr();return null===t?null:{from:t.hh(),to:t.rh()}},t.prototype.setVisibleLogicalRange=function(t){f(t.from<=t.to,"The from index cannot be after the to index."),this.hi.Wf(t)},t.prototype.resetTimeScale=function(){this.hi.Ne()},t.prototype.fitContent=function(){this.hi.Qr()},t.prototype.logicalToCoordinate=function(t){var i=this.hi.j();return i.ti()?null:i.G(t)},t.prototype.coordinateToLogical=function(t){return this.ul.ti()?null:this.ul.Fr(t)},t.prototype.timeToCoordinate=function(t){var i=eN(t),e=this.ul.br(i,!1);return null===e?null:this.ul.G(e)},t.prototype.coordinateToTime=function(t){var i,e=this.hi.j(),n=e.Fr(t),r=e.ri(n);return null===r?null:null!==(i=r.Sh)&&void 0!==i?i:r.Dh},t.prototype.width=function(){return this.Bd.z_().st},t.prototype.height=function(){return this.Bd.z_().ht},t.prototype.subscribeVisibleTimeRangeChange=function(t){this.gw.Ji(t)},t.prototype.unsubscribeVisibleTimeRangeChange=function(t){this.gw.nn(t)},t.prototype.subscribeVisibleLogicalRangeChange=function(t){this.nr.Ji(t)},t.prototype.unsubscribeVisibleLogicalRangeChange=function(t){this.nr.nn(t)},t.prototype.subscribeSizeChange=function(t){this.sd.Ji(t)},t.prototype.unsubscribeSizeChange=function(t){this.sd.nn(t)},t.prototype.applyOptions=function(t){this.ul.rs(t)},t.prototype.options=function(){return M(this.ul.ct())},t.prototype.yw=function(){this.gw.rn()&&this.gw.hn(this.getVisibleRange())},t.prototype.kw=function(){this.nr.rn()&&this.nr.hn(this.getVisibleLogicalRange())},t.prototype.Cw=function(t){this.sd.hn(t.st,t.ht)},t}();function eQ(t){void 0!==t&&"custom"!==t.type&&void 0!==t.minMove&&void 0===t.precision&&(t.precision=function(t){if(t>=1)return 0;for(var i=0;i<8&&!(1e-8>Math.abs(Math.round(t)-t));i++)t*=10;return i}(t.minMove))}function eK(t){return function(t){if(b(t.handleScale)){var i=t.handleScale;t.handleScale={axisDoubleClickReset:i,axisPressedMouseMove:{time:i,price:i},mouseWheel:i,pinch:i}}else if(void 0!==t.handleScale&&b(t.handleScale.axisPressedMouseMove)){var e=t.handleScale.axisPressedMouseMove;t.handleScale.axisPressedMouseMove={time:e,price:e}}var n=t.handleScroll;b(n)&&(t.handleScroll={horzTouchDrag:n,vertTouchDrag:n,mouseWheel:n,pressedMouseMove:n})}(t),function(t){if(t.priceScale){t.leftPriceScale=t.leftPriceScale||{},t.rightPriceScale=t.rightPriceScale||{};var i=t.priceScale.position;delete t.priceScale.position,t.leftPriceScale=y(t.leftPriceScale,t.priceScale),t.rightPriceScale=y(t.rightPriceScale,t.priceScale),"left"===i&&(t.leftPriceScale.visible=!0,t.rightPriceScale.visible=!1),"right"===i&&(t.leftPriceScale.visible=!1,t.rightPriceScale.visible=!0),"none"===i&&(t.leftPriceScale.visible=!1,t.rightPriceScale.visible=!1),t.overlayPriceScales=t.overlayPriceScales||{},void 0!==t.priceScale.invertScale&&(t.overlayPriceScales.invertScale=t.priceScale.invertScale),void 0!==t.priceScale.scaleMargins&&(t.overlayPriceScales.scaleMargins=t.priceScale.scaleMargins)}}(t),t.layout&&t.layout.backgroundColor&&!t.layout.background&&(t.layout.background={type:"solid",color:t.layout.backgroundColor}),t}var e0=function(){function t(t,i){var e=this;this.Nw=new ej,this.xw=new Map,this.Sw=new Map,this.Dw=new to,this.Aw=new to;var n=void 0===i?M(eI):y(M(eI),eK(i));this.mw=new ey(t,n),this.mw.V_().Ji(function(t){e.Dw.rn()&&e.Dw.hn(e.Tw(t()))},this),this.mw.mf().Ji(function(t){e.Aw.rn()&&e.Aw.hn(e.Tw(t()))},this);var r=this.mw.vt();this.Bw=new eY(r,this.mw.Od())}return t.prototype.remove=function(){this.mw.V_().sn(this),this.mw.mf().sn(this),this.Bw.en(),this.mw.en(),this.xw.clear(),this.Sw.clear(),this.Dw.en(),this.Aw.en(),this.Nw.en()},t.prototype.resize=function(t,i,e){this.mw.Ld(t,i,e)},t.prototype.addAreaSeries=function(t){void 0===t&&(t={}),eQ((t=eU(t)).priceFormat);var i=y(M(eG),eq,t),e=this.mw.vt().Ef("Area",i),n=new eR(e,this,this);return this.xw.set(n,e),this.Sw.set(e,n),n},t.prototype.addBaselineSeries=function(t){void 0===t&&(t={}),eQ((t=eU(t)).priceFormat);var i=y(M(eG),eH,t),e=this.mw.vt().Ef("Baseline",i),n=new eR(e,this,this);return this.xw.set(n,e),this.Sw.set(e,n),n},t.prototype.addBarSeries=function(t){void 0===t&&(t={}),eQ((t=eU(t)).priceFormat);var i=y(M(eG),eV,t),e=this.mw.vt().Ef("Bar",i),n=new eR(e,this,this);return this.xw.set(n,e),this.Sw.set(e,n),n},t.prototype.addCandlestickSeries=function(t){void 0===t&&(t={}),tT(t=eU(t)),eQ(t.priceFormat);var i=y(M(eG),eW,t),e=this.mw.vt().Ef("Candlestick",i),n=new eA(e,this,this);return this.xw.set(n,e),this.Sw.set(e,n),n},t.prototype.addHistogramSeries=function(t){void 0===t&&(t={}),eQ((t=eU(t)).priceFormat);var i=y(M(eG),eX,t),e=this.mw.vt().Ef("Histogram",i),n=new eR(e,this,this);return this.xw.set(n,e),this.Sw.set(e,n),n},t.prototype.addLineSeries=function(t){void 0===t&&(t={}),eQ((t=eU(t)).priceFormat);var i=y(M(eG),eZ,t),e=this.mw.vt().Ef("Line",i),n=new eR(e,this,this);return this.xw.set(n,e),this.Sw.set(e,n),n},t.prototype.removeSeries=function(t){var i=p(this.xw.get(t)),e=this.Nw.Of(i);this.mw.vt().Of(i),this.Lw(e),this.xw.delete(t),this.Sw.delete(i)},t.prototype.Mw=function(t,i){this.Lw(this.Nw.nw(t,i))},t.prototype.bw=function(t,i){this.Lw(this.Nw.uw(t,i))},t.prototype.subscribeClick=function(t){this.Dw.Ji(t)},t.prototype.unsubscribeClick=function(t){this.Dw.nn(t)},t.prototype.subscribeCrosshairMove=function(t){this.Aw.Ji(t)},t.prototype.unsubscribeCrosshairMove=function(t){this.Aw.nn(t)},t.prototype.priceScale=function(t){return void 0===t&&(t=this.mw.vt().zf()),new eJ(this.mw,t)},t.prototype.timeScale=function(){return this.Bw},t.prototype.applyOptions=function(t){this.mw.rs(eK(t))},t.prototype.options=function(){return this.mw.ct()},t.prototype.takeScreenshot=function(){return this.mw.zd()},t.prototype.Lw=function(t){var i=this.mw.vt();i.Lf(t.j.Br,t.j.fw,t.j.cw),t.lw.forEach(function(t,i){return i._(t.Zu)}),i.Vr()},t.prototype.Fw=function(t){return p(this.Sw.get(t))},t.prototype.Tw=function(t){var i=this,e=new Map;t.$d.forEach(function(t,n){e.set(i.Fw(n),t)});var n=void 0===t.Kd?void 0:this.Fw(t.Kd);return{time:t.S&&(t.S.Sh||t.S.Dh),point:t.Yd,hoveredSeries:n,hoveredMarkerId:t.Xd,seriesPrices:e}},t}();function e1(t,i){var e;if(w(t)){var n=document.getElementById(t);f(null!==n,"Cannot find element in DOM with id="+t),e=n}else e=t;return new e0(e,i)}},33145:function(t,i,e){e.d(i,{default:function(){return r.a}});var n=e(48461),r=e.n(n)},99376:function(t,i,e){e.r(i);var n=e(35475),r={};for(var s in n)"default"!==s&&(r[s]=(function(t){return n[t]}).bind(0,s));e.d(i,r)},48461:function(t,i,e){Object.defineProperty(i,"__esModule",{value:!0}),function(t,i){for(var e in i)Object.defineProperty(t,e,{enumerable:!0,get:i[e]})}(i,{default:function(){return a},getImageProps:function(){return h}});let n=e(47043),r=e(55346),s=e(65878),o=n._(e(5084));function h(t){let{props:i}=(0,r.getImgProps)(t,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/invest/funds/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[t,e]of Object.entries(i))void 0===e&&delete i[t];return{props:i}}let a=s.Image},29245:function(t,i,e){e.d(i,{B:function(){return o},C:function(){return M},D:function(){return O},F:function(){return $},H:function(){return A},P:function(){return g},R:function(){return Q},S:function(){return d},T:function(){return tn},a:function(){return h},b:function(){return u},c:function(){return v},d:function(){return f},e:function(){return a},g:function(){return p},h:function(){return k},i:function(){return c},j:function(){return L},k:function(){return N},l:function(){return X},m:function(){return ti},p:function(){return l}});var n=e(57437),r=e(61994),s=e(2265);let o=Object.freeze({xs:Object.freeze({maxWidth:599}),s:Object.freeze({minWidth:600,maxWidth:767}),m:Object.freeze({minWidth:768,maxWidth:1023}),l:Object.freeze({minWidth:1024,maxWidth:1279}),xl:Object.freeze({minWidth:1280,maxWidth:1439}),"2xl":Object.freeze({minWidth:1440,maxWidth:1919}),"3xl":Object.freeze({minWidth:1920})}),h=Object.freeze(Object.keys(o)),a=Object.freeze(h.filter(t=>"xs"!==t)),u=(Object.freeze(h.filter(t=>"3xl"!==t)),(t,i=!0)=>i?t:void 0),l=(t,i,e,n)=>{let r=[i,e,n];return r[t%100>4&&t%100<20?2:[2,0,1,1,1,2][t%10<5?t%10:5]]||r[0]};function c(t){return"u">typeof t}let f=t=>null==t;function p(t){return`finkit-${t}`}function v(t){return s.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("defs",null,s.createElement("clipPath",{id:"a"},s.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),s.createElement("g",{clipPath:"url(#a)"},s.createElement("path",{d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm1.5 0a8.5 8.5 0 1 1 17 0 8.5 8.5 0 0 1-17 0Zm12.28-1.72-4.25 4.25a.722.722 0 0 1-.53.22.722.722 0 0 1-.53-.22l-2.25-2.25a.743.743 0 0 1 0-1.06.743.743 0 0 1 1.06 0L11 12.94l3.72-3.72a.743.743 0 0 1 1.06 0 .743.743 0 0 1 0 1.06Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})))}function d(t){return s.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("path",{d:"M12.617 2.035a4.736 4.736 0 0 0-1.232 0c-1.28.167-2.263 1.01-3.216 2.25-.944 1.231-1.97 3.005-3.284 5.28l-.06.105c-1.316 2.277-2.342 4.053-2.937 5.487-.6 1.447-.838 2.72-.344 3.912.159.382.366.74.617 1.069.785 1.024 2.007 1.454 3.56 1.659 1.539.202 3.59.202 6.22.202h.12c2.63 0 4.681 0 6.22-.202 1.553-.204 2.775-.635 3.56-1.66a4.75 4.75 0 0 0 .617-1.068c.494-1.192.256-2.465-.344-3.912-.595-1.434-1.621-3.21-2.937-5.487l-.06-.105c-1.315-2.275-2.34-4.049-3.285-5.28-.952-1.24-1.935-2.083-3.215-2.25ZM11.58 3.522a3.23 3.23 0 0 1 .844 0c.678.089 1.343.535 2.22 1.677.877 1.143 1.854 2.83 3.205 5.169 1.352 2.34 2.328 4.031 2.88 5.364.552 1.331.606 2.13.344 2.762-.108.261-.25.507-.422.731-.415.543-1.135.897-2.564 1.085-1.43.188-3.382.189-6.085.189s-4.655-.001-6.085-.19c-1.43-.187-2.149-.54-2.564-1.084a3.249 3.249 0 0 1-.422-.73c-.262-.632-.208-1.432.344-2.763.552-1.333 1.528-3.023 2.88-5.364 1.351-2.338 2.328-4.026 3.205-5.17.877-1.141 1.543-1.587 2.22-1.676Zm1.173 5.227a.75.75 0 0 0-1.5 0v5.5a.75.75 0 1 0 1.5 0v-5.5Zm-1.75 8.253a1 1 0 1 1 2-.005 1 1 0 0 1-2 .005Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}let y=Object.freeze({privateIcon:p("private-icon")}),g=({children:t,className:i,style:e,...s})=>(0,n.jsx)("span",{className:(0,r.Z)(y.privateIcon,i),style:e,...s,children:t});g.displayName="PrivateIcon";let m={display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden"},w=p("caption"),b=Object.freeze({caption:w,captionWithIcon:`${w}--with-icon`,content:`${w}__content`,icon:`${w}__icon`,text:`${w}__text`,size:{s:`${w}--s`,m:`${w}--m`},states:{success:`${w}--success`,error:`${w}--error`,warning:`${w}--warning`}});function M({as:t,children:i,state:e="default",size:s="m",text:o,withoutIcon:h=!1,lineClamp:a,role:u,dataQa:l,dataId:c,className:f,style:p,...y}){let w=o||i,M=!h&&["success","error","warning"].includes(e),_="success"===e?v:d,S=(0,r.Z)(f,b.caption,b.size[s],{[b.captionWithIcon]:M,[b.states.success]:"success"===e,[b.states.error]:"error"===e,[b.states.warning]:"warning"===e});return(0,n.jsx)(t||"div",{className:S,style:p,role:u,...y,"data-id":c,"data-qa":l,children:(0,n.jsxs)("div",{className:b.content,children:[M&&w&&(0,n.jsx)(g,{className:b.icon,children:(0,n.jsx)(_,{})}),(0,n.jsx)("span",{className:(0,r.Z)(b.text),style:{...a?{WebkitLineClamp:a,lineClamp:a,...m}:void 0},children:w})]})})}M.displayName="Caption";let _=p("card"),S={card:_,variants:{primary:`${_}--primary`,secondary:`${_}--secondary`}},k=({as:t,className:i,style:e,children:s,variant:o="primary",dataQa:h,dataId:a,...u})=>(0,n.jsx)(t||"div",{className:(0,r.Z)(i,S.card,S.variants[o]),style:e,...u,"data-id":a,"data-qa":h,children:s});k.displayName="Card";let x=p("col"),C=Object.freeze({col:x,state:{size:(t,i)=>!0===i?`${x}--${t}`:`${x}--${t}-${i}`,offsetLeft:(t,i)=>`${x}--${t}-offset-left-${i}`,offsetRight:(t,i)=>`${x}--${t}-offset-right-${i}`}}),L=({as:t,className:i="",size:e={},offsetLeft:s={},offsetRight:o={},children:h,...a})=>{let u=Object.entries(e).reduce((t,[i,e])=>[...t,C.state.size(i,e)],[]).join(" "),l=Object.entries(s).reduce((t,[i,e])=>[...t,C.state.offsetLeft(i,e)],[]).join(" "),c=Object.entries(o).reduce((t,[i,e])=>[...t,C.state.offsetRight(i,e)],[]).join(" ");return(0,n.jsx)(t||"div",{className:(0,r.Z)(C.col,i,u,l,c),...a,children:h})};L.displayName="Col";let T=p("container"),D=Object.freeze({container:T,states:{narrow:`${T}--narrow`}}),N=({children:t,as:i,fluid:e=!1,className:s="",...o})=>(0,n.jsx)(i||"div",{className:(0,r.Z)(D.container,s,{[D.states.narrow]:!e}),...o,children:t});N.displayName="Container";let E=p("divider"),P=Object.freeze({divider:E,content:`${E}__content`}),O=({content:t,className:i,style:e,dataQa:s,dataId:o,...h})=>(0,n.jsx)("div",{className:(0,r.Z)(P.divider,i),style:e,...h,"data-id":o,"data-qa":s,children:t&&(0,n.jsx)("div",{className:P.content,children:t})});O.displayName="Divider";let j=p("form-field"),z=Object.freeze({formField:j,labelWrapper:`${j}__label-wrapper`,label:`${j}__label`,description:`${j}__description`}),$=({label:t,description:i,caption:e,captionState:s,children:o,hasCaption:h,className:a,style:u,dataQa:l,dataId:c,...f})=>(0,n.jsxs)("div",{className:(0,r.Z)(z.formField,a),style:u,...f,"data-id":c,"data-qa":l,children:[(t||i)&&(0,n.jsxs)("div",{className:z.labelWrapper,children:[(0,n.jsx)("span",{className:z.label,children:t}),(0,n.jsx)("span",{className:z.description,children:i})]}),o,(h||e)&&(0,n.jsx)(M,{text:e,state:s})]});$.displayName="FormField";let F={display:"h1",hero:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},U=p("heading"),R=Object.freeze({heading:U,states:Object.freeze({display:`${U}--display`,hero:`${U}--hero`,h1:`${U}--h1`,h2:`${U}--h2`,h3:`${U}--h3`,h4:`${U}--h4`,h5:`${U}--h5`,h6:`${U}--h6`})}),A=({as:t,children:i,weight:e,type:s,lineClamp:o,className:h,style:a,dataQa:u,dataId:l,...c})=>{var f;let p=t||F[s]||"div",v=/^h[1-6]$/.test(p),d=(null==(f=s.match(/\d+/))?void 0:f[0])||1;return(0,n.jsx)(p,{className:(0,r.Z)(R.heading,R.states[s],h),style:{...e?{fontWeight:`var(--font-weight-${e})`}:void 0,...o?{WebkitLineClamp:o,lineClamp:o,...m}:void 0,...a},role:v?null:"heading","aria-level":v?null:d,...c,"data-id":l,"data-qa":u,children:i})};A.displayName="Heading";let B=p("loader");Object.freeze({loader:B,variant:{primary:`${B}--primary`,purple:`${B}--purple`,accent:`${B}--accent`,white:`${B}--white`},size:{s:`${B}--s`,m:`${B}--m`,l:`${B}--l`}});let I=p("progress-bar"),W=Object.freeze({progressBar:I,rounded:`${I}-rounded`,indicator:`${I}__indicator`,text:`${I}__text`,animationCircle:`${I}__animation-circle`}),V={default:"var(--color-black-500)",error:"var(--color-red-500)",warning:"var(--color-orange-500)",success:"var(--color-green-600)",purple:"var(--color-purple-600)",blue:"var(--color-blue-500)",pink:"var(--color-pink-400)"},Z={low:"173.9999px",nearlyFull:"8.22px",full:"0px"};function q(t){return Math.max(Math.min(t,100),0)}let H=({value:t=0,variant:i="default",noBackground:e=!1})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("svg",{width:"60",height:"60",viewBox:"0 0 60 60",version:"1.1",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(-85deg)"},children:[!e&&(0,n.jsx)("circle",{r:"27.5",cx:"30",cy:"30",fill:"transparent",stroke:"var(--color-gray-400)",strokeWidth:"5"}),(0,n.jsx)("circle",{r:"27.5",cx:"30",cy:"30",stroke:V[i],strokeWidth:"5",strokeLinecap:"round",strokeDashoffset:function(t){let i=q(t);return i<=3?Z.low:100===i?Z.full:i>=97?Z.nearlyFull:`${177-1.74*i}px`}(t),fill:"transparent",strokeDasharray:"174px",className:W.animationCircle})]}),(0,n.jsxs)("span",{className:W.text,children:[q(t),"%"]})]});H.displayName="ProgressBarCircle";let X=({value:t=0,variant:i="default",rounded:e=!1,noBackground:s=!1,className:o,style:h,dataQa:a,dataId:u,...l})=>(0,n.jsx)("div",{className:(0,r.Z)({[W.progressBar]:!e,[W.rounded]:e},o),role:"progressbar","aria-valuemin":0,"aria-valuenow":t,"aria-valuemax":100,style:h,...l,"data-id":u,"data-qa":a,children:e?(0,n.jsx)(H,{noBackground:s,value:t,variant:i}):(0,n.jsx)("div",{className:(0,r.Z)(W.indicator),style:{width:`${q(t)}%`,backgroundColor:V[i],boxSizing:"content-box"}})});X.displayName="ProgressBar";let G=p("row"),J=(t,i,e)=>`${G}--gutter-${t}-${i}-${e}`,Y=Object.freeze({row:G,state:{reverse:`${G}--reverse`,gutter:(t,i="xs")=>Array.isArray(t)?[J(i,t[0],"h"),J(i,t[1],"v")].join(" "):J(i,t,"h")}});function Q({as:t,className:i="",reverse:e=!1,gutters:s={},children:o,...h}){let a=Object.entries(s).map(([t,i])=>Y.state.gutter(i,t)).join(" ");return(0,n.jsx)(t||"div",{...h,className:(0,r.Z)(Y.row,i,a,{[Y.state.reverse]:e}),children:o})}Q.displayName="Row";let K=p("skeleton"),tt=Object.freeze({skeleton:K,states:{inline:`${K}--inline`,rounded:`${K}--rounded`,inverted:`${K}--inverted`,suspend:`${K}--suspend`}});function ti({as:t,className:i="",width:e,height:s,inline:o=!1,rounded:h=!1,inverted:a=!1,suspend:u=!1,children:l,style:c,...f}){let p={...e&&{width:`${e}px`},...s&&{height:`${s}px`},...c};return(0,n.jsx)(t||"div",{className:(0,r.Z)(tt.skeleton,i,{[tt.states.inline]:o,[tt.states.rounded]:h,[tt.states.inverted]:a,[tt.states.suspend]:u}),style:p,"aria-hidden":"true",...f,children:l})}ti.displayName="Skeleton";let te=Object.freeze({text:p("text")});function tn({as:t,className:i,style:e,children:s,size:o,weight:h,lineClamp:a,dataQa:u,dataId:l,...c}){return(0,n.jsx)(t||"span",{className:(0,r.Z)(te.text,i),style:{...o&&{fontSize:`var(--font-size-${o})`,lineHeight:`var(--font-line-height-${o})`},...h&&{fontWeight:`var(--font-weight-${h})`},...a&&{WebkitLineClamp:a,lineClamp:a,...m},...e},...c,"data-id":l,"data-qa":u,children:s})}tn.displayName="Text"},35563:function(t,i,e){e.d(i,{JX:function(){return n.j},Od:function(){return n.m},W2:function(){return n.k},X2:function(){return n.R},X6:function(){return n.H},YS:function(){return n.C},Zb:function(){return n.h},iz:function(){return n.D},ko:function(){return n.l},xv:function(){return n.T}});var n=e(29245)},31412:function(t,i,e){let n;e.d(i,{j_:function(){return w}});var r=e(96434).Buffer;let s="function"==typeof r;"function"==typeof TextDecoder&&new TextDecoder;let o="function"==typeof TextEncoder?new TextEncoder:void 0,h=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),a=(n={},h.forEach((t,i)=>n[t]=i),n),u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,l=String.fromCharCode.bind(String);"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);let c=t=>t.replace(/=/g,"").replace(/[+\/]/g,t=>"+"==t?"-":"_"),f="function"==typeof btoa?t=>btoa(t):s?t=>r.from(t,"binary").toString("base64"):t=>{let i,e,n,r,s="",o=t.length%3;for(let o=0;o<t.length;){if((e=t.charCodeAt(o++))>255||(n=t.charCodeAt(o++))>255||(r=t.charCodeAt(o++))>255)throw TypeError("invalid character found");s+=h[(i=e<<16|n<<8|r)>>18&63]+h[i>>12&63]+h[i>>6&63]+h[63&i]}return o?s.slice(0,o-3)+"===".substring(o):s},p=s?t=>r.from(t).toString("base64"):t=>{let i=[];for(let e=0,n=t.length;e<n;e+=4096)i.push(l.apply(null,t.subarray(e,e+4096)));return f(i.join(""))},v=t=>{if(t.length<2){var i=t.charCodeAt(0);return i<128?t:i<2048?l(192|i>>>6)+l(128|63&i):l(224|i>>>12&15)+l(128|i>>>6&63)+l(128|63&i)}var i=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return l(240|i>>>18&7)+l(128|i>>>12&63)+l(128|i>>>6&63)+l(128|63&i)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,y=t=>t.replace(d,v),g=s?t=>r.from(t,"utf8").toString("base64"):o?t=>p(o.encode(t)):t=>f(y(t)),m=(t,i=!1)=>i?c(g(t)):g(t),w=t=>m(t,!0);"function"==typeof atob||s||(t=>{if(t=t.replace(/\s+/g,""),!u.test(t))throw TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let i,e="",n,r;for(let s=0;s<t.length;)i=a[t.charAt(s++)]<<18|a[t.charAt(s++)]<<12|(n=a[t.charAt(s++)])<<6|(r=a[t.charAt(s++)]),e+=64===n?l(i>>16&255):64===r?l(i>>16&255,i>>8&255):l(i>>16&255,i>>8&255,255&i);return e})},64131:function(t,i){function e(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var n in e)t[n]=e[n]}return t}var n=function t(i,n){function r(t,r,s){if("undefined"!=typeof document){"number"==typeof(s=e({},n,s)).expires&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var h in s)s[h]&&(o+="; "+h,!0!==s[h]&&(o+="="+s[h].split(";")[0]));return document.cookie=t+"="+i.write(r,t)+o}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var e=document.cookie?document.cookie.split("; "):[],n={},r=0;r<e.length;r++){var s=e[r].split("="),o=s.slice(1).join("=");try{var h=decodeURIComponent(s[0]);if(n[h]=i.read(o,h),t===h)break}catch(t){}}return t?n[t]:n}},remove:function(t,i){r(t,"",e({},i,{expires:-1}))},withAttributes:function(i){return t(this.converter,e({},this.attributes,i))},withConverter:function(i){return t(e({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(i)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});i.Z=n}}]);