diff --git a/dist-esm/billboard.js b/dist-esm/billboard.js index ef2fe1a6f..e83b8e648 100644 --- a/dist-esm/billboard.js +++ b/dist-esm/billboard.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */ import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format'; import { pointer, select, namespaces, selectAll } from 'd3-selection'; @@ -4074,7 +4074,7 @@ var data$1 = { * @private */ getMaxDataCount: function () { - return Math.max.apply(Math, this.data.targets.map(function (t) { return t.values.length; })); + return Math.max.apply(Math, __spreadArray(__spreadArray([], this.data.targets.map(function (t) { return t.values.length; }), false), [0], false)); }, getMaxDataCountTarget: function () { var target = this.filterTargetsToShow() || []; @@ -22854,7 +22854,7 @@ var zoomModule = function () { var defaults = {}; /** * @namespace bb - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */ var bb = { /** @@ -22864,7 +22864,7 @@ var bb = { * bb.version; // "1.0.0" * @memberof bb */ - version: "3.9.3-nightly-20230819004547", + version: "3.9.3-nightly-20230822004557", /** * Generate chart * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: diff --git a/dist-esm/plugin/billboardjs-plugin-bubblecompare.js b/dist-esm/plugin/billboardjs-plugin-bubblecompare.js index 123ef4df7..8e8dae004 100644 --- a/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +++ b/dist-esm/plugin/billboardjs-plugin-bubblecompare.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ @@ -104,7 +104,7 @@ var Plugin = /** @class */ (function () { delete _this[key]; }); }; - Plugin.version = "3.9.3-nightly-20230819004547"; + Plugin.version = "3.9.3-nightly-20230822004557"; return Plugin; }()); var Plugin$1 = Plugin; diff --git a/dist-esm/plugin/billboardjs-plugin-sparkline.js b/dist-esm/plugin/billboardjs-plugin-sparkline.js index 8a3cfb3b3..bc47000d8 100644 --- a/dist-esm/plugin/billboardjs-plugin-sparkline.js +++ b/dist-esm/plugin/billboardjs-plugin-sparkline.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ @@ -279,7 +279,7 @@ var Plugin = /** @class */ (function () { delete _this[key]; }); }; - Plugin.version = "3.9.3-nightly-20230819004547"; + Plugin.version = "3.9.3-nightly-20230822004557"; return Plugin; }()); var Plugin$1 = Plugin; diff --git a/dist-esm/plugin/billboardjs-plugin-stanford.js b/dist-esm/plugin/billboardjs-plugin-stanford.js index 13196ed31..02a9cfbb0 100644 --- a/dist-esm/plugin/billboardjs-plugin-stanford.js +++ b/dist-esm/plugin/billboardjs-plugin-stanford.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ @@ -487,7 +487,7 @@ var Plugin = /** @class */ (function () { delete _this[key]; }); }; - Plugin.version = "3.9.3-nightly-20230819004547"; + Plugin.version = "3.9.3-nightly-20230822004557"; return Plugin; }()); var Plugin$1 = Plugin; diff --git a/dist-esm/plugin/billboardjs-plugin-tableview.js b/dist-esm/plugin/billboardjs-plugin-tableview.js index 6019cb748..6f5acef4c 100644 --- a/dist-esm/plugin/billboardjs-plugin-tableview.js +++ b/dist-esm/plugin/billboardjs-plugin-tableview.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ @@ -121,7 +121,7 @@ var Plugin = /** @class */ (function () { delete _this[key]; }); }; - Plugin.version = "3.9.3-nightly-20230819004547"; + Plugin.version = "3.9.3-nightly-20230822004557"; return Plugin; }()); var Plugin$1 = Plugin; diff --git a/dist-esm/plugin/billboardjs-plugin-textoverlap.js b/dist-esm/plugin/billboardjs-plugin-textoverlap.js index 94349a3d0..e37563d1d 100644 --- a/dist-esm/plugin/billboardjs-plugin-textoverlap.js +++ b/dist-esm/plugin/billboardjs-plugin-textoverlap.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ @@ -263,7 +263,7 @@ var Plugin = /** @class */ (function () { delete _this[key]; }); }; - Plugin.version = "3.9.3-nightly-20230819004547"; + Plugin.version = "3.9.3-nightly-20230822004557"; return Plugin; }()); var Plugin$1 = Plugin; diff --git a/dist/billboard.css b/dist/billboard.css index 4e29c4c64..6b019a421 100644 --- a/dist/billboard.css +++ b/dist/billboard.css @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */ /*-- Chart --*/ .bb svg { diff --git a/dist/billboard.js b/dist/billboard.js index e21db8405..771648ec5 100644 --- a/dist/billboard.js +++ b/dist/billboard.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') @@ -4769,7 +4769,7 @@ function getDataKeyForJson(keysParam, config) { return Math.max.apply(Math, this.data.targets.map(function (t) { _newArrowCheck(this, _this17); return t.values.length; - }.bind(this))); + }.bind(this)).concat([0])); }, getMaxDataCountTarget: function getMaxDataCountTarget() { var _this18 = this; @@ -25365,7 +25365,7 @@ let _defaults = {}; /** * @namespace bb - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */ const bb = { /** @@ -25375,7 +25375,7 @@ const bb = { * bb.version; // "1.0.0" * @memberof bb */ - version: "3.9.3-nightly-20230819004547", + version: "3.9.3-nightly-20230822004557", /** * Generate chart * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: diff --git a/dist/billboard.min.css b/dist/billboard.min.css index a8dc0c6d2..a498d0568 100644 --- a/dist/billboard.min.css +++ b/dist/billboard.min.css @@ -5,5 +5,5 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */.bb svg{-webkit-tap-highlight-color:rgba(0,0,0,0);font:10px sans-serif}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value,.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-axis{shape-rendering:crispEdges}.bb-grid{pointer-events:none}.bb-grid line{stroke:#aaa}.bb-grid text{fill:#aaa}.bb-xgrid,.bb-ygrid{stroke-dasharray:3 3}.bb-text.bb-empty{fill:grey;font-size:2em}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:1px;stroke:#fff}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region rect{fill:#4682b4;fill-opacity:.1}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font:14px sans-serif}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border-collapse:collapse;border-spacing:0;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9;white-space:nowrap}.bb-tooltip tr{border:1px solid #ccc}.bb-tooltip th{background-color:#aaa;color:#fff;font-size:14px;padding:2px 5px;text-align:left}.bb-tooltip td{background-color:#fff;border-left:1px dotted #999;font-size:13px;padding:3px 6px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:10px;margin-right:6px;width:10px}.bb-tooltip.value{text-align:right}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;font-size:11px;padding:5px} \ No newline at end of file diff --git a/dist/billboard.min.js b/dist/billboard.min.js index ba8e50677..bc79daab5 100644 --- a/dist/billboard.min.js +++ b/dist/billboard.min.js @@ -5,6 +5,6 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("d3-axis"),require("d3-brush"),require("d3-drag"),require("d3-dsv"),require("d3-ease"),require("d3-hierarchy"),require("d3-interpolate"),require("d3-scale"),require("d3-selection"),require("d3-shape"),require("d3-time-format"),require("d3-transition"),require("d3-zoom"));else if("function"==typeof define&&define.amd)define(["d3-axis","d3-brush","d3-drag","d3-dsv","d3-ease","d3-hierarchy","d3-interpolate","d3-scale","d3-selection","d3-shape","d3-time-format","d3-transition","d3-zoom"],e);else{var i="object"==typeof exports?e(require("d3-axis"),require("d3-brush"),require("d3-drag"),require("d3-dsv"),require("d3-ease"),require("d3-hierarchy"),require("d3-interpolate"),require("d3-scale"),require("d3-selection"),require("d3-shape"),require("d3-time-format"),require("d3-transition"),require("d3-zoom")):e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3);for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(this,(function(t,e,i,n,s,a,r,o,c,l,d,u,h){return function(){"use strict";var g=[,,function(t){t.exports=c},function(t){t.exports=e},function(t){t.exports=d},function(t){t.exports=n},function(t){t.exports=o},function(t){t.exports=i},function(t){t.exports=u},function(t){t.exports=l},function(e){e.exports=t},function(t){t.exports=s},function(t){t.exports=r},function(t){t.exports=a},function(t){t.exports=h}],f={};function p(t){var e=f[t];if(void 0!==e)return e.exports;var i=f[t]={exports:{}};return g[t](i,i.exports,p),i.exports}p.d=function(t,e){for(var i in e)p.o(e,i)&&!p.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},p.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},p.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var x={};return function(){p.r(x),p.d(x,{bb:function(){return Ns},default:function(){return Ns}});var t={};p.r(t),p.d(t,{area:function(){return es},areaLineRange:function(){return is},areaSpline:function(){return ns},areaSplineRange:function(){return ss},areaStep:function(){return as},bar:function(){return fs},bubble:function(){return ps},candlestick:function(){return xs},donut:function(){return ls},gauge:function(){return ds},line:function(){return rs},pie:function(){return us},polar:function(){return hs},radar:function(){return gs},scatter:function(){return bs},spline:function(){return os},step:function(){return cs},treemap:function(){return ms}});var e={};function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}p.r(e),p.d(e,{selection:function(){return Xs},subchart:function(){return $s},zoom:function(){return Fs}});var n=p(4),s=p(2),a=void 0;const r=function(){i(this,a);return"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)(),o="function"==typeof r.requestAnimationFrame,c="function"==typeof r.requestIdleCallback,l=o?r.requestAnimationFrame:function(t){return i(this,a),setTimeout(t,1)}.bind(void 0),d=o?r.cancelAnimationFrame:function(t){return i(this,a),clearTimeout(t)}.bind(void 0),u=c?r.requestIdleCallback:l,h=(c&&r.cancelIdleCallback,null==r?void 0:r.document),g={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},f={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},b={Area:[g.AREA,g.AREA_SPLINE,g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE,g.AREA_STEP],AreaRange:[g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE],Arc:[g.PIE,g.DONUT,g.GAUGE,g.POLAR,g.RADAR],Line:[g.LINE,g.SPLINE,g.AREA,g.AREA_SPLINE,g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE,g.STEP,g.AREA_STEP],Step:[g.STEP,g.AREA_STEP],Spline:[g.SPLINE,g.AREA_SPLINE,g.AREA_SPLINE_RANGE]};function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function _(t){var e=function(t,e){if("object"!==m(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===m(e)?e:String(e)}function v(t,e,i){return(e=_(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var y=p(3),T=void 0;function w(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function A(t){for(var e,i=1;i2?n-2:0),a=2;a/gi,">"):t}function V(t,e,n,s){var a=this;if(void 0===n&&(n=[-1,1]),void 0===s&&(s=!1),t&&C(e))if(-1===e.indexOf("\n"))t.text(e);else{const r=[t.text(),e].map(function(t){return i(this,a),t.replace(/[\s\n]/g,"")}.bind(this));if(r[0]!==r[1]){const r=e.split("\n"),o=s?r.length-1:1;t.html(""),r.forEach(function(e,s){i(this,a),t.append("tspan").attr("x",0).attr("dy",(0===s?n[0]*o:n[1])+"em").text(e)}.bind(this))}}}function Y(t){const e=t.getBBox(),i=e.x,n=e.y,s=e.width,a=e.height;return[{x:i,y:n+a},{x:i,y:n},{x:i+s,y:n},{x:i+s,y:n+a}]}function H(t,e){var n,a=this;const r=t&&(null==(n=t.touches||t.sourceEvent&&t.sourceEvent.touches)?void 0:n[0]);return(0,s.pointer)(r||t,e).map(function(t){return i(this,a),isNaN(t)?0:t}.bind(this))}function W(t){const e=t.event,i=t.$el,n=i.subchart.main||i.main;let s;return e&&"brush"===e.type?s=e.selection:n&&(s=n.select(".bb-brush").node())&&(s=(0,y.brushSelection)(s)),s}function U(t){return!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width")?t.rect=t.getBoundingClientRect():t.rect}function Z(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=0),void 0===i&&(i=1e4);const n=r.crypto||r.msCrypto,s=n?e+n.getRandomValues(new Uint32Array(1))[0]%(i-e+1):Math.floor(Math.random()*(i-e)+e);return t?s+"":s}function q(t,e,i,n,s){if(i>n)return-1;const a=Math.floor((i+n)/2);let r=t[a],o=r.x,c=r.w,l=void 0===c?0:c;return s&&(o=t[a].y,l=t[a].h),e>=o&&e<=o+l?a:e1?n-1:0),a=1;ae?-1:t{=TITLE}",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_padding:0,legend_position:"bottom",legend_show:!0,legend_usePoint:!1},Jt={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},Qt=void 0,te={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){i(this,Qt)}.bind(void 0),tooltip_onhide:function(){i(this,Qt)}.bind(void 0),tooltip_onshown:function(){i(this,Qt)}.bind(void 0),tooltip_onhidden:function(){i(this,Qt)}.bind(void 0),tooltip_order:null};function ee(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ie(t){for(var e,i=1;i0){if(void 0===e[s-1]&&(e[s-1]={}),void 0===t)throw new Error("Source data is missing a component at ("+i+", "+s+")!");e[s-1][n]=t}}))})),e}function Te(t){const e=t[0],i=[];return t.forEach((function(t,n){if(n>0){const s={};t.forEach((function(t,i){if(void 0===t)throw new Error("Source data is missing a component at ("+n+", "+i+")!");s[e[i]]=t})),i.push(s)}})),i}function we(t,e){const i=[];let n,s;if(Array.isArray(t)){const a=function(t,e){if(void 0!==t[e])return t[e];const i=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let n=t;return i.some((function(t){return!(n=n&&t in n?n[t]:void 0)})),n};n=e.x?e.value.concat(e.x):e.value,i.push(n),t.forEach((function(t){const e=n.map((function(e){let i=a(t,e);return void 0===i&&(i=null),i}));i.push(e)})),s=Te(i)}else Object.keys(t).forEach((function(e){const n=t[e].concat();null==n.unshift||n.unshift(e),i.push(n)})),s=ye(i);return s}function Ae(t,e){var n=this;const s=t.rows(e);let a;return 1===s.length?(a=[{}],s[0].forEach(function(t){i(this,n),a[0][t]=null}.bind(this))):a=t.parse(e),a}function Se(t){return Ae({rows:ve.csvParseRows,parse:ve.csvParse},t)}function ke(t){return Ae({rows:ve.tsvParseRows,parse:ve.tsvParse},t)}function Ce(t,e){const i=t||(null==e?void 0:e.data_keys);return null!=i&&i.x&&(e.data_x=i.x),i}var Re={convertData:function(t,e){var n=this;const s=this.config,a=s.boost_useWorker;let r=t;if(t.bindto&&(r={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(e){i(this,n);const s="data_"+e;s in t&&(r[e]=t[s])}.bind(this))),r.url&&e)!function(t,e,i,n,s){void 0===e&&(e="csv");const a=new XMLHttpRequest,r={csv:Se,tsv:ke,json:we};a.open("GET",t),i&&Object.keys(i).forEach((function(t){a.setRequestHeader(t,i[t])})),a.onreadystatechange=function(){if(4===a.readyState){if(200!==a.status)throw new Error(t+": Something went wrong loading!");{const t=a.responseText;t&&s.call(this,r[e]("json"===e?JSON.parse(t):t,n))}}},a.send()}(r.url,r.mimeType,r.headers,Ce(r.keys,s),e);else if(r.json)_e(a,we,e,[ye,Te])(r.json,Ce(r.keys,s));else if(r.rows)_e(a,Te,e)(r.rows);else if(r.columns)_e(a,ye,e)(r.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets:function(t,e){var n=this;const s=this,a=s.axis,r=s.config,o=s.state,c=r.data_type;let l=!1,d=!1,u=!1;a&&(l=a.isCategorized(),d=a.isTimeSeries(),u=a.isCustomX());const h=Object.keys(t[0]||{}),g=h.length?h.filter(s.isNotX,s):[],f=h.length?h.filter(s.isX,s):[];let p;g.forEach(function(a){var o=this;i(this,n);const c=this.getXKey(a);u||d?f.indexOf(c)>=0?p=(e&&s.data.xs[a]||[]).concat(t.map(function(t){return i(this,o),t[c]}.bind(this)).filter(S).map(function(t,e){return i(this,o),s.generateTargetX(t,a,e)}.bind(this))):r.data_x?p=this.getOtherTargetXs():X(r.data_xs)&&(p=s.getXValuesOfXKey(c,s.data.targets)):p=t.map(function(t,e){return i(this,o),e}.bind(this)),p&&(this.data.xs[a]=p)}.bind(this)),g.forEach(function(t){if(i(this,n),!this.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}.bind(this));const x=g.map(function(e,a){var c=this;i(this,n);const d=r.data_idConverter.bind(s.api)(e),h=s.getXKey(e),g=u&&l,f=g&&t.map(function(t){return i(this,c),t.x}.bind(this)).every(function(t){return i(this,c),r.axis_x_categories.indexOf(t)>-1}.bind(this)),p=t.__append__,x=null===h&&p?s.api.data.values(e).length:0;return{id:d,id_org:e,values:t.map(function(t,n){i(this,c);const l=t[h];let u,b=t[e];return b=null===b||isNaN(b)||F(b)?$(b)||F(b)?b:null:+b,!g&&!o.hasRadar||0!==a||E(l)?u=s.generateTargetX(l,e,x+n):(f||0!==a||0!==n||p||(r.axis_x_categories=[]),u=r.axis_x_categories.indexOf(l),-1===u&&(u=r.axis_x_categories.length,r.axis_x_categories.push(l))),(E(b)||s.data.xs[e].length<=n)&&(u=void 0),{x:u,value:b,id:d,index:-1}}.bind(this)).filter(function(t){return i(this,c),O(t.x)}.bind(this))}}.bind(this));if(x.forEach(function(t){var e,a=this;i(this,n),r.data_xSort&&(t.values=t.values.sort(function(t,e){i(this,a);return(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)}.bind(this))),t.values.forEach(function(t,e){return i(this,a),t.index=e}.bind(this)),null==(e=s.data.xs[t.id])||e.sort(function(t,e){return i(this,a),t-e}.bind(this))}.bind(this)),o.hasNegativeValue=s.hasNegativeValueInTargets(x),o.hasPositiveValue=s.hasPositiveValueInTargets(x),c&&s.isValidChartType(c)){const t=s.mapToIds(x).filter(function(t){return i(this,n),!(t in r.data_types)||!s.isValidChartType(r.data_types[t])}.bind(this));s.setTargetType(t,c)}return x.forEach(function(t){return i(this,n),s.cache.add(t.id_org,t,!0)}.bind(this)),x}},Ee={isX:function(t){const e=this.config,n=e.data_x&&t===e.data_x,s=X(e.data_xs)&&function(t,e){var n=this;let s=!1;return Object.keys(t).forEach(function(a){return i(this,n),t[a]===e&&(s=!0)}.bind(this)),s}(e.data_xs,t);return n||s},isNotX:function(t){return!this.isX(t)},isStackNormalized:function(){const t=this.config;return!(!t.data_stack_normalize||!t.data_groups.length)},isGrouped:function(t){var e=this;const n=this.config.data_groups;return t?n.some(function(n){return i(this,e),n.indexOf(t)>=0&&n.length>1}.bind(this)):n.length>0},getXKey:function(t){const e=this.config;return e.data_x?e.data_x:X(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n=this;const s=this;let a;return(e&&X(e)?s.mapToIds(e):[]).forEach(function(e){i(this,n),s.getXKey(e)===t&&(a=s.data.xs[e])}.bind(this)),a},getIndexByX:function(t,e){return e?e.indexOf(C(t)?t:+t):(this.filterByX(this.data.targets,t)[0]||{index:null}).index},getXValue:function(t,e){const i=this;return t in i.data.xs&&i.data.xs[t]&&S(i.data.xs[t][e])?i.data.xs[t][e]:e},getOtherTargetXs:function(){const t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function(t){const e=this.getOtherTargetXs();return e&&t1?(e=e.map(function(e){return i(this,t),e.values}.bind(this)).reduce(function(e,n){return i(this,t),e.concat(n)}.bind(this)).map(function(e){return i(this,t),e.x}.bind(this)),e=at(it(e)).map(function(e,n,a){return i(this,t),{x:e,index:s?a.length-n-1:n}}.bind(this))):n&&(e=e[0].values.concat()),e},mapToIds:function(t){var e=this;return t.map(function(t){return i(this,e),t.id}.bind(this))},mapToTargetIds:function(t){return t?$(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function(t,e){const i=this.mapToIds(t);for(let t,n=0;t=i[n];n++)if(t===e)return!0;return!1},isTargetToShow:function(t){return this.state.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function(t){return this.state.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function(t){var e=this;const n=this;return(t||n.data.targets).filter(function(t){return i(this,e),n.isTargetToShow(t.id)}.bind(this))},mapTargetsToUniqueXs:function(t){var e=this;const n=this.axis;let s=[];return null!=t&&t.length&&(s=it(nt(t.map(function(t){var n=this;return i(this,e),t.values.map(function(t){return i(this,n),+t.x}.bind(this))}.bind(this)))),s=null!=n&&n.isTimeSeries()?s.map(function(t){return i(this,e),new Date(+t)}.bind(this)):s.map(Number)),at(s)},addTargetIds:function(t,e){var n=this;const s=this.state;($(e)?e:[e]).forEach(function(e){i(this,n),s[t].indexOf(e)<0&&s[t].push(e)}.bind(this))},removeTargetIds:function(t,e){var n=this;const s=this.state;($(e)?e:[e]).forEach(function(e){i(this,n);const a=s[t].indexOf(e);a>=0&&s[t].splice(a,1)}.bind(this))},addHiddenTargetIds:function(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds:function(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds:function(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds:function(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed:function(t){var e=this;const n=this,s=n.state.hasAxis,a={},r=n.isMultipleX(),o=r?n.mapTargetsToUniqueXs(t).map(function(t){return i(this,e),C(t)?t:+t}.bind(this)):null;return t.forEach(function(t){var c=this;i(this,e);const l=[];t.values.filter(function(t){let e=t.value;return i(this,c),S(e)||null===e}.bind(this)).forEach(function(t){i(this,c);let e=t.value;null!==e&&n.isCandlestickType(t)&&(e=$(e)?e.slice(0,4):[e.open,e.high,e.low,e.close]),$(e)?l.push.apply(l,e):F(e)&&"high"in e?l.push.apply(l,Object.values(e)):n.isBubbleZType(t)?l.push(s&&n.getBubbleZData(e,"y")):r?l[n.getIndexByX(t.x,o)]=e:l.push(e)}.bind(this)),a[t.id]=l}.bind(this)),a},checkValueInTargets:function(t,e){const i=Object.keys(t);let n;for(let s=0;s1},hasNegativeValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return i(this,e),t<0}.bind(this))},hasPositiveValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return i(this,e),t>0}.bind(this))},orderTargets:function(t){const e=[].concat(t),i=this.getSortCompareFn();return i&&e.sort(i),e},getSortCompareFn:function(t){var e=this;void 0===t&&(t=!1);const n=this,s=n.config.data_order,a=/asc/i.test(s),r=/desc/i.test(s);let o;if(a||r){const n=function(t,n){return i(this,e),t+Math.abs(n.value)}.bind(this);o=function(s,r){i(this,e);const o="values"in s?s.values.reduce(n,0):s.value,c="values"in r?r.values.reduce(n,0):r.value;return t?a?o-c:c-o:a?c-o:o-c}.bind(this)}else k(s)&&(o=s.bind(n.api));return o||null},filterByX:function(t,e){var n=this;return nt(t.map(function(t){return i(this,n),t.values}.bind(this))).filter(function(t){return i(this,n),t.x-e==0}.bind(this))},filterRemoveNull:function(t){var e=this;return t.filter(function(t){return i(this,e),S(this.getBaseValue(t))}.bind(this))},filterByXDomain:function(t,e){var n=this;return t.map(function(t){var s=this;return i(this,n),{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return i(this,s),e[0]<=t.x&&t.x<=e[1]}.bind(this))}}.bind(this))},hasDataLabel:function(){const t=this.config.data_labels;return L(t)&&t||z(t)&&X(t)},getDataIndexFromEvent:function(t){const e=this.config,i=this.state,n=i.hasRadar,a=i.inputType,r=i.eventReceiver,o=r.coords,c=r.rect;let l;if(n){let e=t.target;/tspan/i.test(e.tagName)&&(e=e.parentNode);const i=(0,s.select)(e).datum();l=i&&1===Object.keys(i).length?i.index:void 0}else{const i=e.axis_rotated,n="touch"===a&&t.changedTouches?t.changedTouches[0]:t;l=q(o,i?n.clientY-c.top:n.clientX-c.left,0,o.length-1,i)}return l},getDataLabelLength:function(t,e,n){var s=this;const a=this,r=[0,0];return a.$el.chart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return i(this,s),a.dataLabelFormat(t.id)(t)}.bind(this)).each((function(t,e){r[e]=1.3*this.getBoundingClientRect()[n]})).remove(),r},isNoneArc:function(t){return this.hasTarget(this.data.targets,t.id)},isArc:function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function(t,e){const i=t[e].x,n=[];let s;for(s=e-1;s>=0&&i===t[s].x;s--)n.push(t[s]);for(s=e;s=0&&n?n[t]:void 0}return n?n[e]:n},setRatioForGroupedData:function(t){var e=this;const n=this;if(n.config.data_groups.length&&t.some(function(t){return i(this,e),n.isGrouped(t.id)}.bind(this))){const s=function(t){return i(this,e),n.getRatio("index",t,!0)}.bind(this);t.forEach(function(t){i(this,e),"values"in t?t.values.forEach(s):s(t)}.bind(this))}},getRatio:function(t,e,n){var s=this;void 0===n&&(n=!1);const a=this,r=a.config,o=a.state,c=a.api;let l=0;if(e&&c.data.shown().length)if(l=e.ratio||e.value,"arc"===t)if(a.pie.padAngle()())l=e.value/a.getTotalDataSum(!0);else{const t=r.gauge_fullCircle?a.getArcLength():-2*a.getGaugeStartAngle(),i=a.hasType("gauge")?t:2*Math.PI;l=(e.endAngle-e.startAngle)/i}else if("index"===t){const t=c.data.values.bind(c);let n=this.getTotalPerIndex();if(o.hiddenTargetIds.length){let e=t(o.hiddenTargetIds,!1);e.length&&(e=e.reduce(function(t,e){var n=this;return i(this,s),t.map(function(t,s){return i(this,n),(R(t)?t:0)+e[s]}.bind(this))}.bind(this)),n=n.map(function(t,n){return i(this,s),t-e[n]}.bind(this)))}const a=n[e.index];e.ratio=R(e.value)&&n&&a?e.value/a:0,l=e.ratio}else if("radar"===t)l=parseFloat(Math.max(e.value,0)+"")/o.current.dataMax*r.radar_size_ratio;else if("bar"===t){const t=a.getYScaleById.bind(a)(e.id).domain().reduce(function(t,e){return i(this,s),e-t}.bind(this));l=0===t?0:Math.abs(e.value)/t}else"treemap"===t&&(l/=a.getTotalDataSum(!0));return n&&l?100*l:l},updateDataIndexByX:function(t){var e=this;const n=t.reduce(function(t,n,s){return i(this,e),t[+n.x]=s,t}.bind(this),{});this.data.targets.forEach(function(t){var s=this;i(this,e),t.values.forEach(function(t,e){i(this,s);let a=n[+t.x];void 0===a&&(a=e),t.index=a}.bind(this))}.bind(this))},isBubbleZType:function(t){return this.isBubbleType(t)&&(F(t.value)&&("z"in t.value||"y"in t.value)||$(t.value)&&t.value.length>=2)},isBarRangeType:function(t){var e=this;const n=t.value;return this.isBarType(t)&&$(n)&&n.length>=2&&n.every(function(t){return i(this,e),R(t)}.bind(this))},getDataById:function(t){var e;const i=this.cache.get(t)||this.api.data(t);return null!=(e=null==i?void 0:i[0])?e:i}};function Oe(t,e){void 0===e&&(e=!1);const i=this.api;e&&this.api.flush(!0),null==t||t.call(i)}var Le={load:function(t,e){var n=this;const s=this,a=s.data,r=e.append;let o=t;o&&(e.filter&&(o=o.filter(e.filter)),(e.type||e.types)&&o.forEach(function(t){var a;i(this,n);const r=(null==(a=e.types)?void 0:a[t.id])||e.type;s.setTargetType(t.id,r)}.bind(this)),a.targets.forEach(function(t){i(this,n);for(let e=0;e=0?jt.focused:"")},classDefocused:function(t){return" "+(this.state.defocusedTargetIds.indexOf(t.id)>=0?jt.defocused:"")},getTargetSelectorSuffix:function(t){return(t||0===t?"-"+t:"").replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g,"-")},selectorTarget:function(t,e,i){void 0===e&&(e=""),void 0===i&&(i="");const n=this.getTargetSelectorSuffix(t);return e+"."+(jt.target+n)+" "+i+", "+e+"."+(jt.circles+n)+" "+i},selectorTargets:function(t,e){var n=this;const s=t||[];return s.length?s.map(function(t){return i(this,n),this.selectorTarget(t,e)}.bind(this)):null},selectorLegend:function(t){return"."+(jt.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return null!=t&&t.length?t.map(function(t){return i(this,e),this.selectorLegend(t)}.bind(this)):null}},ze=p(6);const Me=function(t,e,n){i(this,undefined);const a=(0,s.select)(t.cloneNode(!0));return a.attr("id",n).insert("rect",":first-child").attr("width",a.attr("width")).attr("height",a.attr("height")).style("fill",e),{id:n,node:a.node()}}.bind(void 0);const Xe=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var $e={generateColor:function(){var t=this;const e=this,n=e.$el,s=e.config,a=s.data_colors,r=s.data_color,o=[];let c=X(s.color_pattern)?s.color_pattern:(0,ze.scaleOrdinal)(function(t){var e=this;const n=ae,s=h.body;let a=s[n];if(!a){const r=t.classed(wt.colorPattern,!0).style("background-image");t.classed(wt.colorPattern,!1),r.indexOf(";")>-1&&(a=r.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(t){return i(this,e),t.trim().replace(/[\"'\s]/g,"")}.bind(this)).filter(Boolean),s[n]=a)}return a}(n.chart)||Xe).range();const l=c;if(k(s.color_tiles)){const n=s.color_tiles.bind(e.api)(),a=c.map(function(s,a){i(this,t);const r=s.replace(/[#\(\)\s,]/g,""),o=e.state.datetimeId+"-pattern-"+r+"-"+a;return Me(n[a%n.length],s,o)}.bind(this));c=a.map(function(e){return i(this,t),"url(#"+e.id+")"}.bind(this)),e.patterns=a}return function(t){var i;const n=t.id||(null==(i=t.data)?void 0:i.id)||t,d=e.isTypeOf(n,["line","spline","step"])||!s.data_types[n];let u;return k(a[n])?u=a[n].bind(e.api)(t):a[n]?u=a[n]:(o.indexOf(n)<0&&o.push(n),u=d?l[o.indexOf(n)%l.length]:c[o.indexOf(n)%c.length],a[n]=u),k(r)?r.bind(e.api)(u,t):u}},generateLevelColor:function(){const t=this.config,e=t.color_pattern,i=t.color_threshold,n="value"===i.unit,s=i.max||100,a=i.values&&i.values.length?i.values:[];return X(i)?function(t){const i=n?t:100*t/s;let r=e[e.length-1];for(let t=0,n=a.length;t')}.bind(this))}},getGradienColortUrl:function(t){return"url(#"+this.state.datetimeId+"-gradient"+this.getTargetSelectorSuffix(t)+")"},updateLinearGradient:function(){var t=this;const e=this,n=e.config,s=e.data.targets,a=e.state.datetimeId,r=e.$el.defs;s.forEach(function(s){var o=this;i(this,t);const c=a+"-gradient"+e.getTargetSelectorSuffix(s.id),l=e.isAreaType(s)?"area":e.isBarType(s)&&"bar",d=n.axis_rotated;if(l&&r.select("#"+c).empty()){const t=e.color(s),a=n[l+"_linearGradient"],u=a.x,h=void 0===u?d?[1,0]:[0,0]:u,g=a.y,f=void 0===g?d?[0,0]:[0,1]:g,p=a.stops,x=void 0===p?[[0,t,1],[1,t,0]]:p,b=r.append("linearGradient").attr("id",""+c).attr("x1",h[0]).attr("x2",h[1]).attr("y1",f[0]).attr("y2",f[1]);x.forEach(function(n){i(this,o);const a=k(n[1])?n[1].bind(e.api)(s.id):n[1];b.append("stop").attr("offset",n[0]).attr("stop-color",a||t).attr("stop-opacity",n[2])}.bind(this))}}.bind(this))},setOverColor:function(t,e){var n=this;const s=this,a=s.config,r=s.$el.main,o=a.color_onover;let c=t?o:s.color;F(c)?c=function(t){let e=t.id;return i(this,n),e in o?o[e]:s.color(e)}.bind(this):C(c)?c=function(){return i(this,n),o}.bind(this):k(o)&&(c=c.bind(s.api)),r.selectAll(F(e)?"."+bt.arc+s.getTargetSelectorSuffix(e.id):"."+Mt.shape+"-"+e).style("fill",c)}},Fe={getYDomainMinMax:function(t,e){var n=this;const s=this,a=s.axis,r=s.config,o="min"===e,c=r.data_groups,l=s.mapToIds(t),d=s.getValuesAsIdKeyed(t);if(c.length>0){const e=s["has"+(o?"Negative":"Positive")+"ValueInTargets"](t);c.forEach(function(t){var s=this;i(this,n);const r=t.filter(function(t){return i(this,s),l.indexOf(t)>=0}.bind(this));if(r.length){const t=r[0],n=a.getId(t);e&&d[t]&&(d[t]=d[t].map(function(t){return i(this,s),(o?t<0:t>0)?t:0}.bind(this))),r.filter(function(t,e){return i(this,s),e>0}.bind(this)).forEach(function(r){var c=this;if(i(this,s),d[r]){const s=a.getId(r);d[r].forEach(function(a,r){i(this,c);const l=+a;s!==n||e&&(o?l>0:l<0)||(d[t][r]+=l)}.bind(this))}}.bind(this))}}.bind(this))}return rt(e,Object.keys(d).map(function(t){return i(this,n),rt(e,d[t])}.bind(this)))},isHiddenTargetWithYDomain:function(t){var e=this;const n=this;return n.state.hiddenTargetIds.some(function(s){return i(this,e),n.axis.getId(s)===t}.bind(this))},getYDomain:function(t,e,n){var s=this;const a=this,r=a.axis,o=a.config,c=a.scale,l="axis_"+e;if(a.isStackNormalized())return[0,100];const d=(null==c?void 0:c[e])&&"log"===c[e].type,u=t.filter(function(t){return i(this,s),r.getId(t.id)===e}.bind(this)),h=n?a.filterByXDomain(u,n):u;if(0===h.length)return a.isHiddenTargetWithYDomain(e)?c[e].domain():"y2"===e?c.y.domain():a.getYDomain(t,"y2",n);const f=o[l+"_min"],p=o[l+"_max"],x=o[l+"_center"],m=o[l+"_inverted"],_=a.hasDataLabel()&&o.axis_rotated,v=a.hasDataLabel()&&!o.axis_rotated;let y=a.getYDomainMinMax(h,"min"),T=a.getYDomainMinMax(h,"max"),w=[g.BAR,g.BUBBLE,g.SCATTER].concat(b.Line).some(function(t){i(this,s);const e=t.indexOf("area")>-1?"area":t;return a.hasType(t,h,!0)&&o[e+"_zerobased"]}.bind(this));y=S(f)?f:S(p)?y<=p?y:p-10:y,T=S(p)?p:S(f)?f<=T?T:f+10:T,isNaN(y)&&(y=0),isNaN(T)&&(T=y),y===T&&(y<0?T=0:y=0);const A=y>=0&&T>=0,k=y<=0&&T<=0;(S(f)&&A||S(p)&&k)&&(w=!1),w&&(A&&(y=0),k&&(T=0));const C=Math.abs(T-y);let R={top:.1*C,bottom:.1*C};if(O(x)){const t=Math.max(Math.abs(y),Math.abs(T));T=x+t,y=x-t}if(_){const t=D(c.y.range()),e=a.getDataLabelLength(y,T,"width").map(function(e){return i(this,s),e/t}.bind(this));["bottom","top"].forEach(function(t,n){i(this,s),R[t]+=C*(e[n]/(1-e[0]-e[1]))}.bind(this))}else if(v){const t=a.getDataLabelLength(y,T,"height");["bottom","top"].forEach(function(e,n){i(this,s),R[e]+=a.convertPixelToScale("y",t[n],C)}.bind(this))}R=a.getResettedPadding(R);const E=o[l+"_padding"];X(E)&&["bottom","top"].forEach(function(t){i(this,s),R[t]=r.getPadding(E,t,R[t],C)}.bind(this)),w&&(A&&(R.bottom=y),k&&(R.top=-T));const L=d?[y,T].map(function(t){return i(this,s),t<0?0:t}.bind(this)):[y-R.bottom,T+R.top];return m?L.reverse():L},getXDomainMinMax:function(t,e){var n,s=this;const a=this.config["axis_x_"+e],r=rt(e,t.map(function(t){var n=this;return i(this,s),rt(e,t.values.map(function(t){return i(this,n),t.x}.bind(this)))}.bind(this)));let o=F(a)?a.value:a;return o=O(o)&&null!=(n=this.axis)&&n.isTimeSeries()?dt.bind(this)(o):o,F(a)&&a.fit&&("min"===e&&or)&&(o=void 0),O(o)?o:r},getXDomainPadding:function(t,e){const i=this,n=i.axis,s=i.config.axis_x_padding,a=n.isTimeSeries()&&e,r=D(t);let o;if(n.isCategorized()||a)o=0;else if(i.hasType("bar")){const t=i.getMaxDataCount();o=t>1?r/(t-1)/2:.5}else o=i.getResettedPadding(.01*r);let c=R(s)?{left:s,right:s}:s,l=c.left,d=void 0===l?o:l,u=c.right,h=void 0===u?o:u;if("px"===s.unit){const t=Math.abs(r+.2*r);d=n.getPadding(s,"left",o,t),h=n.getPadding(s,"right",o,t)}else{const t=r+d+h;if(a&&t){const i=r/e/t;d=d/t/i,h=h/t/i}}return{left:d,right:h}},getXDomain:function(t){const e=this,i=e.axis,n=e.config,s=e.scale.x,a=n.axis_x_inverted,r=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let o=r[0],c=void 0===o?0:o,l=r[1],d=void 0===l?0:l;if("log"!==s.type){const t=i.isCategorized(),n=i.isTimeSeries(),s=e.getXDomainPadding(r);let a=r[0],o=r[1];a-o!=0||t||(n?(a=new Date(.5*a.getTime()),o=new Date(1.5*o.getTime())):(a=0===a?1:.5*a,o=0===o?-1:1.5*o)),(a||0===a)&&(c=n?new Date(a.getTime()-s.left):a-s.left),(o||0===o)&&(d=n?new Date(o.getTime()+s.right):o+s.right)}return a?[d,c]:[c,d]},updateXDomain:function(t,e,i,n,s){const a=this,r=a.config,o=a.org,c=a.scale,l=c.x,d=c.subX,u=r.zoom_enabled;var h;i&&(l.domain(s||at(a.getXDomain(t),!r.axis_x_inverted)),o.xDomain=l.domain(),u&&a.zoom.updateScaleExtent(),d.domain(l.domain()),null==(h=a.brush)||h.scale(d));if(e){const t=s||!a.brush||K(a)?o.xDomain:W(a).map(d.invert);l.domain(t),u&&a.zoom.updateScaleExtent()}return n&&l.domain(a.trimXDomain(l.orgDomain())),l.domain()},trimXDomain:function(t){const e=this.config.axis_x_inverted,i=this.getZoomDomain(),n=i[0],s=i[1];return(e?t[0]>=n:t[0]<=n)&&(t[0]=n,t[1]=+t[1]+(n-t[0])),(e?t[1]<=s:t[1]>=s)&&(t[0]=+t[0]-(t[1]-s),t[1]=s),t},getZoomDomain:function(t,e){void 0===t&&(t="zoom"),void 0===e&&(e=!1);const i=this,n=i.config,s=i.scale,a=i.org;let r=e&&s[t]?s[t].domain():a.xDomain,o=r[0],c=r[1];return"zoom"===t&&(O(n.zoom_x_min)&&(o=rt("min",[o,n.zoom_x_min])),O(n.zoom_x_max)&&(c=rt("max",[c,n.zoom_x_max]))),[o,c]},convertPixelToScale:function(t,e,i){const n=this.config,s=this.state,a=n.axis_rotated;let r;return r="x"===t?a?"height":"width":a?"width":"height",i*(e/s[r])},withinRange:function(t,e,n){var s=this;const a=this.config.axis_x_inverted,r=n,o=r[0],c=r[1];if(Array.isArray(t)){const n=[].concat(t);if(a&&n.reverse(),n[0]=o:a?+n>=c:+n<=c)&&!t.every(function(t,n){return i(this,l),t===e[n]}.bind(this))}.bind(this))}return!1}};function Be(t,e,i){const n=t.config,s="axis_"+e+"_tick_format";return(n[s]?n[s]:t.defaultValueFormat).call(t.api,i)}var Ne={yFormat:function(t){return Be(this,"y",t)},y2Format:function(t){return Be(this,"y2",t)},getDefaultValueFormat:function(){const t=this,e=t.defaultArcValueFormat,i=t.yFormat,n=t.y2Format,s=t.hasArcType(null,["gauge","polar","radar"]);return function(a,r,o){return(s?e:t.axis&&"y2"===t.axis.getId(o)?n:i).call(t,a,r)}},defaultValueFormat:function(t){return S(t)?+t:""},defaultArcValueFormat:function(t,e){return(100*e).toFixed(1)+"%"},defaultPolarValueFormat:function(t){return""+t},dataLabelFormat:function(t){var e=this;const n=this.config.data_labels,s=function(t){return i(this,e),S(t)?+t:""}.bind(this);let a=s;return k(n.format)?a=n.format:z(n.format)&&(a=n.format[t]?!0===n.format[t]?s:n.format[t]:function(){return i(this,e),""}.bind(this)),a.bind(this.api)}};function je(t){const e=this,i=e.getDataById(t);return e.levelColor?e.levelColor(i.values[0].value):e.color(i)}var Ge={initLegend:function(){const t=this,e=t.config,i=t.$el;t.legendItemTextBox={},t.state.legendHasRendered=!1,e.legend_show?(e.legend_contents_bindto||(i.legend=t.$el.svg.append("g").classed(kt.legend,!0).attr("transform",t.getTranslate("legend"))),t.updateLegend()):t.state.hiddenLegendIds=t.mapToIds(t.data.targets)},updateLegend:function(t,e,i){var n;const s=this,a=s.config,r=s.state,o=s.scale,c=s.$el,l=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};l.withTransition=B(l,"withTransition",!0),l.withTransitionForTransform=B(l,"withTransitionForTransform",!0),a.legend_contents_bindto&&a.legend_contents_template?s.updateLegendTemplate():r.hasTreemap||s.updateLegendElement(t||s.mapToIds(s.data.targets),l,i),null==(n=c.legend)||n.selectAll("."+kt.legendItem).classed(kt.legendItemHidden,(function(t){const e=!s.isTargetToShow(t);return e&&(this.style.opacity=null),e})),s.updateScales(!1,!o.zoom),s.updateSvgSize(),s.transformAll(l.withTransitionForTransform,i),r.legendHasRendered=!0},updateLegendTemplate:function(){var t=this;const e=this,n=e.config,a=e.$el,r=(0,s.select)(n.legend_contents_bindto),o=n.legend_contents_template;if(!r.empty()){const n=e.mapToIds(e.data.targets),s=[];let c="";n.forEach(function(n){i(this,t);const a=k(o)?o.bind(e.api)(n,e.color(n),e.api.data(n)[0].values):lt(o,{COLOR:e.color(n),TITLE:n});a&&(s.push(n),c+=a)}.bind(this));const l=r.html(c).selectAll((function(){return this.childNodes})).data(s);e.setLegendItem(l),a.legend=r}},updateSizeForLegend:function(t){const e=this,i=e.config,n=e.state,s=n.isLegendTop,a=n.isLegendLeft,r=n.isLegendRight,o=n.isLegendInset,c=n.current,l=t.width,d=t.height,u={top:s?e.getCurrentPaddingTop()+i.legend_inset_y+5.5:c.height-d-e.getCurrentPaddingBottom()-i.legend_inset_y,left:a?e.getCurrentPaddingLeft()+i.legend_inset_x+.5:c.width-l-e.getCurrentPaddingRight()-i.legend_inset_x+.5};e.state.margin3={top:r?0:o?u.top:c.height-d,right:NaN,bottom:0,left:r?c.width-l:o?u.left:0}},transformLegend:function(t){const e=this,i=e.$el.legend;(0,e.$T)(i,t).attr("transform",e.getTranslate("legend"))},updateLegendStep:function(t){this.state.legendStep=t},updateLegendItemWidth:function(t){this.state.legendItemWidth=t},updateLegendItemHeight:function(t){this.state.legendItemHeight=t},updateLegendItemColor:function(t,e){const i=this.$el.legend;i&&i.select("."+kt.legendItem+"-"+t+" line").style("stroke",e)},getLegendWidth:function(){const t=this.state,e=t.current.width,i=t.isLegendRight,n=t.isLegendInset,s=t.legendItemWidth,a=t.legendStep;return this.config.legend_show?i||n?s*(a+1):e:0},getLegendHeight:function(){var t;const e=this,i=e.state,n=i.current,s=i.isLegendRight,a=i.legendItemHeight,r=i.legendStep,o="fit"===(null==(t=e.config.padding)?void 0:t.mode);return e.config.legend_show?s?n.height:(o?10:Math.max(20,a))*(r+1):0},opacityForUnfocusedLegend:function(t){return t.classed(kt.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this;const a=this,r=a.$el.legend,o=a.$T,c=a.mapToTargetIds(t);r&&o(r.selectAll("."+kt.legendItem).filter(function(t){return i(this,n),c.indexOf(t)>=0}.bind(this)).classed(Et.legendItemFocused,e)).style("opacity",(function(){return e?null:a.opacityForUnfocusedLegend.call(a,(0,s.select)(this))}))},revertLegend:function(){const t=this.$el.legend,e=this.$T;t&&e(t.selectAll("."+kt.legendItem).classed(Et.legendItemFocused,!1)).style("opacity",null)},showLegend:function(t){const e=this,i=e.config,n=e.$el,s=e.$T;i.legend_show||(i.legend_show=!0,n.legend?n.legend.style("visibility",null):e.initLegend(),e.state.legendHasRendered||e.updateLegend()),e.removeHiddenLegendIds(t),s(n.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend:function(t){const e=this,i=e.config,n=e.$el.legend;i.legend_show&&M(t)&&(i.legend_show=!1,n.style("visibility","hidden")),e.addHiddenLegendIds(t),n.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox:function(t,e){const i=this,n=i.cache,s=i.state;let a;const r=le;return t&&(a=!s.redrawing&&n.get(r)||{},a[t]||(a[t]=i.getTextRect(e,kt.legendItem),n.add(r,a)),a=a[t]),a},setLegendItem:function(t){var e=this;const n=this,a=n.$el,r=n.api,o=n.config,c=n.state,l="touch"===c.inputType,d=n.hasType("gauge"),u=o.boost_useCssRule,h=o.legend_item_interaction;t.attr("class",(function(t){const e=(0,s.select)(this);return(!e.empty()&&e.attr("class")||"")+n.generateClass(kt.legendItem,t)})).style("visibility",function(t){return i(this,e),n.isLegendToShow(t)?null:"hidden"}.bind(this)),o.interaction_enabled&&(u&&[["."+kt.legendItem,"cursor:pointer"],["."+kt.legendItem+" text","pointer-events:none"],["."+kt.legendItemPoint+" text","pointer-events:none"],["."+kt.legendItemTile,"pointer-events:none"],["."+kt.legendItemEvent,"fill-opacity:0"]].forEach(function(t){i(this,e);const s=t[0],r=t[1];n.setCssRule(!1,s,[r])(a.legend)}.bind(this)),t.on(h.dblclick?"dblclick":"click",h||k(o.legend_item_onclick)?function(t,e){if(!N(o.legend_item_onclick,r,e)){const i=t.altKey,n=t.target;"dblclick"===t.type||i?c.hiddenTargetIds.length&&-1===n.parentNode.getAttribute("class").indexOf(kt.legendItemHidden)?r.show():(r.hide(),r.show(e)):(r.toggle(e),(0,s.select)(this).classed(Et.legendItemFocused,!1))}l&&n.hideTooltip()}:null),l||t.on("mouseout",h||k(o.legend_item_onout)?function(t,e){N(o.legend_item_onout,r,e)||((0,s.select)(this).classed(Et.legendItemFocused,!1),d&&n.undoMarkOverlapped(n,"."+St.gaugeValue),n.api.revert())}:null).on("mouseover",h||k(o.legend_item_onover)?function(t,e){N(o.legend_item_onover,r,e)||((0,s.select)(this).classed(Et.legendItemFocused,!0),d&&n.markOverlapped(e,n,"."+St.gaugeValue),!c.transiting&&n.isTargetToShow(e)&&r.focus(e))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",n.getStylePropValue("pointer")))},updateLegendElement:function(t,e){var n=this;const s=this,a=s.config,r=s.state,o=s.$el.legend,c=s.$T,l="circle"!==a.legend_item_tile_type,d=a.legend_item_tile_r,u={width:l?a.legend_item_tile_width:2*d,height:l?a.legend_item_tile_height:2*d},h={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:u.width+5,totalLength:0},g={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let f,p,x;const b=t.filter(function(t){return i(this,n),!O(a.data_names[t])||null!==a.data_names[t]}.bind(this)),m=e.withTransition,_=s.getUpdateLegendPositions(b,h,g);r.isLegendInset&&(h.step=a.legend_inset_step?a.legend_inset_step:b.length,s.updateLegendStep(h.step)),r.isLegendRight?(f=function(t){return i(this,n),h.max.width*g.steps[t]}.bind(this),p=function(t){return i(this,n),g.margins[g.steps[t]]+g.offsets[t]}.bind(this)):r.isLegendInset?(f=function(t){return i(this,n),h.max.width*g.steps[t]+10}.bind(this),p=function(t){return i(this,n),g.margins[g.steps[t]]+g.offsets[t]}.bind(this)):(f=function(t){return i(this,n),g.margins[g.steps[t]]+g.offsets[t]}.bind(this),p=function(t){return i(this,n),h.max.height*g.steps[t]}.bind(this));const v={xText:function(t,e){return i(this,n),f(t,e)+4+u.width}.bind(this),xRect:function(t,e){return i(this,n),f(t,e)}.bind(this),x1Tile:function(t,e){return i(this,n),f(t,e)-2}.bind(this),x2Tile:function(t,e){return i(this,n),f(t,e)-2+u.width}.bind(this),yText:function(t,e){return i(this,n),p(t,e)+9}.bind(this),yRect:function(t,e){return i(this,n),p(t,e)-5}.bind(this),yTile:function(t,e){return i(this,n),p(t,e)+4}.bind(this)};s.generateLegendItem(b,u,_,v),x=o.select("."+kt.legendBackground+" rect"),r.isLegendInset&&h.max.width>0&&0===x.size()&&(x=o.insert("g","."+kt.legendItem).attr("class",kt.legendBackground).append("rect"));c(o.selectAll("text").data(b).text(function(t){return i(this,n),O(a.data_names[t])?a.data_names[t]:t}.bind(this)).each((function(t,e){_(this,t,e)})),m).attr("x",v.xText).attr("y",v.yText);c(o.selectAll("rect."+kt.legendItemEvent).data(b),m).attr("width",function(t){return i(this,n),g.widths[t]}.bind(this)).attr("height",function(t){return i(this,n),g.heights[t]}.bind(this)).attr("x",v.xRect).attr("y",v.yRect),s.updateLegendItemPos(b,m,v),x&&c(x,m).attr("height",s.getLegendHeight()-12).attr("width",h.max.width*(h.step+1)+10),s.updateLegendItemWidth(h.max.width),s.updateLegendItemHeight(h.max.height),s.updateLegendStep(h.step)},getUpdateLegendPositions:function(t,e,n){const s=this,a=s.config,r=s.state,o=r.isLegendRight||r.isLegendInset;return function(c,l,d){var u=this;const h=d===t.length-1,g=s.getLegendItemTextBox(l,c),f=g.width+e.tileWidth+(h&&!o?0:e.padding.right)+a.legend_padding,p=g.height+e.padding.top,x=o?p:f,b=o?s.getLegendHeight():s.getLegendWidth();let m;const _=function(t,i){i||(m=(b-e.totalLength-x)/2,m=e.max.width)&&(e.max.width=f),(!e.max.height||p>=e.max.height)&&(e.max.height=p);const v=o?e.max.height:e.max.width;a.legend_equally?(Object.keys(n.widths).forEach(function(t){return i(this,u),n.widths[t]=e.max.width}.bind(this)),Object.keys(n.heights).forEach(function(t){return i(this,u),n.heights[t]=e.max.height}.bind(this)),m=(b-v*t.length)/2,m1&&d&&(o&&(f+=d*o),g>2?f-=(g-1)*d/2:2===g&&(f-=d/2)),f}.bind(this)},getShapeY:function(t){var e=this;const n=this,s=n.isStackNormalized();return function(a){i(this,e);let r=a.value;return R(a)?r=a:s?r=n.getRatio("index",a,!0):n.isBubbleZType(a)?r=n.getBubbleZData(a.value,"y"):n.isBarRangeType(a)&&(r=r[1]),n.getYScaleById(a.id,t)(r)}.bind(this)},getShapeYMin:function(t){const e=this,i=e.axis.getId(t),n=e.scale[i].domain()[0],s=e.config["axis_"+i+"_inverted"];return!e.isGrouped(t)&&!s&&n>0?n:0},getShapeOffsetData:function(t){var e=this;const n=this,s=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),a=n.isStackNormalized(),r=s.map(function(t){var s=this;i(this,e);let r=t.values;const o={};n.isStepType(t)&&(r=n.convertValuesToStep(r));const c=r.reduce(function(t,e){i(this,s);const r=+e.x;return t[r]=e,o[r]=a?n.getRatio("index",e,!0):e.value,t}.bind(this),{});return{id:t.id,rowValues:r,rowValueMapByXValue:c,values:o}}.bind(this));return{indexMapByTargetId:s.reduce(function(t,n,s){let a=n.id;return i(this,e),t[a]=s,t}.bind(this),{}),shapeOffsetTargets:r}},getShapeOffset:function(t,e,n){var s=this;const a=this,r=a.getShapeOffsetData(t),o=r.shapeOffsetTargets,c=r.indexMapByTargetId,l=a.config.data_groupsZeroAs;return function(t,r){var d=this;i(this,s);const u=t.id,h=t.value,g=t.x,f=a.getIndices(e,t),p=a.getYScaleById(u,n);if(a.isBarRangeType(t))return p(h[0]);const x=+g,b=p("zero"===l?0:a.getShapeYMin(u));let m=b;return o.filter(function(t){return i(this,d),t.id!==u&&f[t.id]===f[u]}.bind(this)).forEach(function(t){i(this,d);const e=t.id,n=t.rowValueMapByXValue,s=t.rowValues,a=t.values;if(c[e]=0&&R(t)){(0!==h||("positive"===l&&t>0||"negative"===l&&t<0))&&(m+=p(t)-b)}}}.bind(this)),m}.bind(this)},getBarW:function(t,e,n){var s=this;const a=this,r=a.config,o=a.org,c=a.scale,l=a.getMaxDataCount(),d="bar"===t&&r.data_groups.length,u=t+"_width",h=c.zoom&&!a.axis.isCategorized()?o.xDomain.map(function(t){return i(this,s),c.zoom(t)}.bind(this)).reduce(function(t,e){return i(this,s),Math.abs(t)+e}.bind(this))/l:e.tickInterval(l),g=function(t){i(this,s);const e=t?r[u][t]:r[u],a=t?e.ratio:r[u+"_ratio"],o=t?e.max:r[u+"_max"],c=R(e)?e:n?h*a/n:0;return o&&c>o?o:c}.bind(this);let f=g();return!d&&z(r[u])&&(f={_$width:f,_$total:[]},a.filterTargetsToShow(a.data.targets).forEach(function(t){i(this,s),r[u][t.id]&&(f[t.id]=g(t.id),f._$total.push(f[t.id]||f._$width))}.bind(this))),f},getShapeByIndex:function(t,e,n){var s=this;const a=this,r=a.$el,o=S(e)?"-"+e:"";let c=r[t];return c=c&&!c.empty()?c.filter(function(t){return i(this,s),!n||t.id===n}.bind(this)).filter(function(t){return i(this,s),!S(e)||t.index===e}.bind(this)):(n?r.main.selectAll("."+jt[t+"s"]+a.getTargetSelectorSuffix(n)):r.main).selectAll("."+jt[t]+o),c},isWithinShape:function(t,e){const i=this,n=(0,s.select)(t);let a;return i.isTargetToShow(e.id)?null!=i.hasValidPointType&&i.hasValidPointType(t.nodeName)?a=i.isStepType(e)?i.isWithinStep(t,i.getYScaleById(e.id)(e.value)):i.isWithinCircle(t,i.isBubbleType(e)?1.5*i.pointSelectR(e):0):"path"===t.nodeName&&(a=!n.classed(jt.bar)||i.isWithinBar(t)):a=!1,a},getInterpolate:function(t){const e=this.getInterpolateType(t);return{basis:Ue.curveBasis,"basis-closed":Ue.curveBasisClosed,"basis-open":Ue.curveBasisOpen,bundle:Ue.curveBundle,cardinal:Ue.curveCardinal,"cardinal-closed":Ue.curveCardinalClosed,"cardinal-open":Ue.curveCardinalOpen,"catmull-rom":Ue.curveCatmullRom,"catmull-rom-closed":Ue.curveCatmullRomClosed,"catmull-rom-open":Ue.curveCatmullRomOpen,"monotone-x":Ue.curveMonotoneX,"monotone-y":Ue.curveMonotoneY,natural:Ue.curveNatural,"linear-closed":Ue.curveLinearClosed,linear:Ue.curveLinear,step:Ue.curveStep,"step-after":Ue.curveStepAfter,"step-before":Ue.curveStepBefore}[e]},getInterpolateType:function(t){const e=this,i=e.config,n=i.spline_interpolation_type,s=e.isInterpolationType(n)?n:"cardinal";return e.isSplineType(t)?s:e.isStepType(t)?i.line_step_type:"linear"},isWithinBar:function(t){const e=H(this.state.event,t),i=Y(t),n=i[0],s=i[1],a=Math.min(n.x,s.x),r=Math.min(n.y,s.y),o=this.config.bar_sensitivity,c=t.getBBox(),l=c.width,d=c.height;return a-o0?i:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getCurrentPaddingTop:function(){const t=this,e=t.config,i=t.state.hasAxis,n=t.$el,s=i?e.axis_y2_axes.length:0;let a=S(e.padding_top)?e.padding_top:0;return n.title&&n.title.node()&&(a+=t.getTitlePadding()),s&&e.axis_rotated&&(a+=t.getHorizontalAxisHeight("y2")*s),a},getCurrentPaddingBottom:function(){const t=this,e=t.config,i=t.state.hasAxis,n=e.axis_rotated?"y":"x",s=i?e["axis_"+n+"_axes"].length:0;return(S(e.padding_bottom)?e.padding_bottom:0)+(s?t.getHorizontalAxisHeight(n)*s:0)},getCurrentPaddingLeft:function(t){var e;const i=this,n=i.config,s=i.state.hasAxis,a=n.axis_rotated,r="fit"===(null==(e=n.padding)?void 0:e.mode),o=a?"x":"y",c=s?n["axis_"+o+"_axes"].length:0;let l=s?i.getAxisWidthByAxisId(o,t):0;r||(l=P(l));let d=n["axis_"+o+"_inner"]||!n["axis_"+o+"_show"]?0:l;return S(n.padding_left)?d=n.padding_left+(r&&a?l:0):s&&a&&(d=n.axis_x_show?r?l:Math.max(l,40):1),s&&(r||n["axis_"+o+"_inner"])&&n["axis_"+o+"_label"].text&&(d+=i.axis.getAxisLabelPosition("y").isOuter?20:0),d+l*c},getCurrentPaddingRight:function(t){var e,i;void 0===t&&(t=!1);const n=this,s=n.config,a=n.state.hasAxis,r=s.axis_rotated,o="fit"===(null==(e=s.padding)?void 0:e.mode),c=o?2:10,l=n.state.isLegendRight?n.getLegendWidth()+20:0,d=a?s.axis_y2_axes.length:0,u=null!=(i=n.axis)&&i.getAxisLabelPosition("y2").isOuter?20:0,h=t?n.axis.getXAxisTickTextY2Overflow(c):0;let g=a&&!s.axis_y2_inner?n.getAxisWidthByAxisId("y2"):1;o||(g=P(g));let f=r?0:Math.max(g+l,h);return S(s.padding_right)?f=s.padding_right+(o&&(r||!s.axis_y2_show?c:f))+(a&&!o?1:0):n.axis&&r?f=c+l:!n.axis||s.axis_y2_show&&!s.axis_y2_inner||(f=Math.max((o&&!s.axis_y2_show?2:1)+l+u,h)),a&&!r&&o&&s.axis_y2_show&&!s.axis_y2_inner&&s.axis_y2_label.text&&(f+=u),f+g*d},getParentRectValue:function(t){const e="offset"+Q(t);let i=this.$el.chart.node(),n=0;for(;n<30&&i&&"BODY"!==i.tagName;){try{n=i.getBoundingClientRect()[t]}catch(t){e in i&&(n=i[e])}i=i.parentNode}const s=h.body[e];return n>s&&(n=s),n},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft:function(t){const e=this,i=e.config,n=e.$el,s=i.axis_rotated||!i.axis_rotated&&!i.axis_y_inner,a=i.axis_rotated?_t.axisX:_t.axisY,r=n.main.select("."+a).node(),o=r&&s?r.getBoundingClientRect():{right:0},c=n.chart.node().getBoundingClientRect(),l=e.hasArcType(),d=o.right-c.left-(l?0:e.getCurrentPaddingLeft(t));return d>0?d:0},updateDimension:function(t){const e=this,i=e.config,n=e.state.hasAxis,s=e.$el;var a;n&&!t&&e.axis.x&&i.axis_rotated&&(null==(a=e.axis.subX)||a.create(s.axis.subX));e.updateScales(t),e.updateSvgSize(),e.transformAll(!1)},updateSvgSize:function(){const t=this,e=t.state,i=e.clip,n=e.current,s=e.hasAxis,a=e.width,r=e.height,o=t.$el.svg;if(o.attr("width",n.width).attr("height",n.height),s){const e=o.select("."+Xt.brush+" .overlay"),n={width:0,height:0};e.size()&&(n.width=+e.attr("width"),n.height=+e.attr("height")),o.selectAll(["#"+i.id,"#"+i.idGrid]).select("rect").attr("width",a).attr("height",r),o.select("#"+i.idXAxis).select("rect").call(t.setXAxisClipPath.bind(t)),o.select("#"+i.idYAxis).select("rect").call(t.setYAxisClipPath.bind(t)),i.idSubchart&&o.select("#"+i.idSubchart).select("rect").attr("width",a).attr("height",n.height)}},getCurrentPadding:function(){const t=this;return{top:t.getCurrentPaddingTop(),bottom:t.getCurrentPaddingBottom(),left:t.getCurrentPaddingLeft(),right:t.getCurrentPaddingRight()}},getResettedPadding:function(t){var e=this;const n=this.config,s=R(t);let a=s?0:{};return!1===n.padding?s||Object.keys(t).forEach(function(s){i(this,e),a[s]=M(n.data_labels)||!1===n.data_labels||"top"!==s?0:t[s]}.bind(this)):a=t,a},updateSizes:function(t){var e;const i=this,n=i.config,s=i.state,a=i.$el.legend,r=n.axis_rotated,o=i.hasArcType()||s.hasTreemap,c="fit"===(null==(e=n.padding)?void 0:e.mode);t||i.setContainerSize();const l={width:a?i.getLegendWidth():0,height:a?i.getLegendHeight():0};!o&&n.axis_x_show&&n.axis_x_tick_autorotate&&i.updateXAxisTickClip();const d=s.isLegendRight||s.isLegendInset?0:l.height,u=r||o?0:i.getHorizontalAxisHeight("x"),h=n.subchart_axis_x_show&&n.subchart_axis_x_tick_text_show?u:30,g=n.subchart_show&&!o?n.subchart_size_height+h:0,f=i.hasType("gauge")&&n.arc_needle_show&&!n.gauge_fullCircle&&!n.gauge_label_show?10:0,p=i.getCurrentPadding();if(s.margin=!o&&r?{top:i.getHorizontalAxisHeight("y2")+p.top,right:o?0:i.getCurrentPaddingRight(!0),bottom:i.getHorizontalAxisHeight("y")+d+p.bottom,left:g+(o?0:p.left)}:{top:(c?0:4)+p.top,right:o?0:i.getCurrentPaddingRight(!0),bottom:f+u+g+d+p.bottom,left:o?0:p.left},s.margin=i.getResettedPadding(s.margin),s.margin2=r?{top:s.margin.top,right:NaN,bottom:20+d,left:i.state.rotatedPadding.left}:{top:s.current.height-g-d,right:NaN,bottom:h+d,left:s.margin.left},s.margin3={top:0,right:NaN,bottom:0,left:0},null==i.updateSizeForLegend||i.updateSizeForLegend(l),s.width=s.current.width-s.margin.left-s.margin.right,s.height=s.current.height-s.margin.top-s.margin.bottom,s.width<0&&(s.width=0),s.height<0&&(s.height=0),s.width2=r?s.margin.left-s.rotatedPadding.left-s.rotatedPadding.right:s.width,s.height2=r?s.height:s.current.height-s.margin2.top-s.margin2.bottom,s.width2<0&&(s.width2=0),s.height2<0&&(s.height2=0),i.hasArcType()){const t=i.hasType("gauge"),e=n.legend_show&&s.isLegendRight;s.arcWidth=s.width-(e?l.width+10:0),s.arcHeight=s.height-(e&&!t?0:10),t&&!n.gauge_fullCircle&&(s.arcHeight+=s.height-i.getPaddingBottomForGauge()),null==i.updateRadius||i.updateRadius()}s.isLegendRight&&o&&(s.margin3.left=s.arcWidth/2+1.1*s.radiusExpanded)}},Ke={setCssRule:function(t,e,n,s){var a=this;const r=this,o=r.config,c=r.state,l=c.cssRule,d=c.style;return o.boost_useCssRule?function(o){var c=this;i(this,a),o.each(function(a){var o=this;i(this,c);const u=s&&(null==s?void 0:s.call(r,a)),h=(t?"."+(Mt.shapes+r.getTargetSelectorSuffix(a.id)):"")+e;e in l&&d.sheet.deleteRule(l[h]),r.state.cssRule[h]=function(t,e,n){var s=this;const a=t.rootSelctor,r=t.sheet,o=a+" "+function(t){return i(this,s),t.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,".")}.bind(this)(e)+" {"+n.join(";")+"}";return r[r.insertRule?"insertRule":"addRule"](o,r.cssRules.length)}(d,h,n.filter(Boolean).map(function(t){return i(this,o),C(u)&&-1===t.indexOf(":")?t+": "+u:t||""}.bind(this)))}.bind(this))}.bind(this):function(){i(this,a)}.bind(this)},getStylePropValue:function(t){return this.config.boost_useCssRule?null:k(t)?t.bind(this):t}};function Je(t,e,i,n,s){var a;const r=t.value,o=this.isCandlestickType(t),c=R(r)&&r<0||o&&!(null!=(a=this.getCandlestickData(t))&&a._isUp);let l=e.x,d=e.y;return n?"start"===i?(l+=c?0:8,d+=4):"middle"===i?(l+=8,d-=8):"end"===i&&(c&&(l-=8),d+=4):("start"===i?(l+=4,c&&(d+=16)):"middle"===i?d-=8:"end"===i&&(l-=4,c&&(d+=16)),s&&(d+=c?-17:o?13:7)),{x:l,y:d}}function Qe(t,e){var i;const n=this.config.data_labels_position,s=t.id,a=t.index,r=t.value;return null!=(i=k(n)?n.bind(this.api)(e,r,s,a,this.$el.text):(s in n?n[s]:n)[e])?i:0}var ti={opacityForText:function(t){const e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?null:"0"},initText:function(){const t=this.$el;t.main.select("."+xt.chart).append("g").attr("class",$t.chartTexts).style("pointer-events",t.treemap?"none":null)},updateTargetsForText:function(t){var e=this;const n=this,s=n.getChartClass("Text"),a=n.getClass("texts","id"),r=n.classFocus.bind(n);n.$el.main.select("."+$t.chartTexts).selectAll("."+$t.chartText).data(t).attr("class",function(t){return i(this,e),(""+s(t)+r(t)).trim()}.bind(this)).enter().append("g").style("opacity","0").attr("class",s).call(n.setCssRule(!0," ."+$t.text,["fill","pointer-events:none"],n.updateTextColor)).append("g").attr("class",a)},updateText:function(){var t=this;const e=this,n=e.$el,a=e.$T,r=e.config,o=e.axis,c=e.getClass("text","index"),l=r.data_labels.centered,d=n.main.selectAll("."+$t.texts).selectAll("."+$t.text).data(e.labelishData.bind(e));a(d.exit()).style("fill-opacity","0").remove(),n.text=d.enter().append("text").merge(d).attr("class",c).attr("text-anchor",function(n){i(this,t);let s=r["axis_"+(null==o?void 0:o.getId(n.id))+"_inverted"]?n.value>0:n.value<0;if(e.isCandlestickType(n)){const t=e.getCandlestickData(n);s=!(null!=t&&t._isUp)}else if(e.isTreemapType(n))return l?"middle":"start";return r.axis_rotated?s?"end":"start":"middle"}.bind(this)).style("fill",e.getStylePropValue(e.updateTextColor)).style("fill-opacity","0").each((function(t,i,n){const a=(0,s.select)(this);let r=t.value;if(e.isBubbleZType(t))r=e.getBubbleZData(r,"z");else if(e.isCandlestickType(t)){const i=e.getCandlestickData(t);i&&(r=i.close)}r=e.isTreemapType(t)?e.treemapDataLabelFormat(t)(a):e.dataLabelFormat(t.id)(r,t.id,i,n),R(r)?this.textContent=r:V(a,r)}))},updateTextColor:function(t){const e=this,i=e.config,n=i.data_labels_colors,s=e.isArcType(t)&&!e.isRadarType(t)||e.isTreemapType(t)?null:e.color(t);let a;if(C(n))a=n;else if(F(n)){a=n[(t.data||t).id]}else k(n)&&(a=n.bind(e.api)(s,t));if(e.isCandlestickType(t)&&!k(n)){const n=e.getCandlestickData(t);if(null==n||!n._isUp){const e=i.candlestick_color_down;a=F(e)?e[t.id]:e}}return a||s},updateTextBacgroundColor:function(t){const e=this,i=e.$el,n=e.config.data_labels_backgroundColors;let s="";if(C(n)||F(n)){const a=C(n)?"":e.getTargetSelectorSuffix("id"in t?t.id:t.data.id),r=i.defs.select(["filter[id*='labels-bg","']"].join(a));r.size()&&(s="url(#"+r.attr("id")+")")}return s||null},redrawText:function(t,e,i,n){const s=this,a=s.$T,r=s.axis,o=s.config,c=s.state.hasTreemap,l=Z(!0),d=o.axis_rotated,u=o.data_labels.rotate,h=function(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}(u),g=u?"rotate("+u+")":"";return s.$el.text.style("fill",s.getStylePropValue(s.updateTextColor)).attr("filter",s.updateTextBacgroundColor.bind(s)).style("fill-opacity",i?0:s.opacityForText.bind(s)).each((function(i,f){const p=a(c&&this.childElementCount?this.parentNode:this,!(!n||!this.getAttribute("x")),l),x=o["axis_"+(null==r?void 0:r.getId(i.id))+"_inverted"];let b={x:t.bind(this)(i,f),y:e.bind(this)(i,f)};u&&(b=Je.bind(s)(i,b,h,d,x),p.attr("text-anchor",h)),this.childElementCount||u?p.attr("transform","translate("+b.x+" "+b.y+") "+g):p.attr("x",b.x).attr("y",b.y)})),!0},getTextRect:function(t,e){var n=this;const a=this;let r=t.node?t.node():t;/text/i.test(r.tagName)||(r=r.querySelector("text"));const o=r.textContent,c=ge+"-"+o.replace(/\W/g,"_");let l=a.cache.get(c);return l||(a.$el.svg.append("text").style("visibility","hidden").style("font",(0,s.select)(r).style("font")).classed(e,!0).text(o).call(function(t){i(this,n),l=U(t.node())}.bind(this)).remove(),a.cache.add(c,l)),l},generateXYForText:function(t,e){var n=this;const s=this,a=s.state,r=a.hasRadar,o=a.hasTreemap,c=Object.keys(t),l={},d=e?s.getXForText:s.getYForText;return r&&c.push("radar"),o&&c.push("treemap"),c.forEach(function(e){i(this,n),l[e]=s["generateGet"+Q(e)+"Points"](t[e],!1)}.bind(this)),function(t,e){const i=(s.isAreaType(t)?"area":s.isBarType(t)&&"bar")||s.isCandlestickType(t)&&"candlestick"||s.isRadarType(t)&&"radar"||s.isTreemapType(t)&&"treemap"||"line";return d.call(s,l[i](t,e),t,this)}},getCenteredTextPos:function(t,e,i,n){const s=this,a=s.config,r=a.axis_rotated,o=s.isBarType(t),c=s.isTreemapType(t);if(a.data_labels.centered&&(o||c)){const s=U(i);if(o){const i=t.value>=0;if(r){const t=(i?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+s.width/2;return i?-t-3:t+2}{const t=(i?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+s.height/2;return i?t:-t-2}}if(c)return"x"===n?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2+s.height/2}return 0},getXForText:function(t,e,i){const n=this,s=n.config,a=n.state,r=s.axis_rotated,o=n.isTreemapType(e);let c=t[0][0];var l;if(n.isCandlestickType(e))r?c=null!=(l=n.getCandlestickData(e))&&l._isUp?t[2][2]+4:t[2][1]-4:c+=(t[1][0]-c)/2;else if(o)c+=s.data_labels.centered?0:5;else if(r){const i=s["axis_"+n.axis.getId(e.id)+"_inverted"],a=n.isBarType(e)?4:6,r=e.value;c=t[2][1],i?c-=a*(r>0?1:-1):c+=a*(r<0?-1:1)}else c=n.hasType("bar")?(t[2][0]+t[0][0])/2:c;if(null===e.value)if(c>a.width){const t=U(i).width;c=a.width-t}else c<0&&(c=4);return(r||o)&&(c+=n.getCenteredTextPos(e,t,i,"x")),c+Qe.call(this,e,"x")},getYForText:function(t,e,i){const n=this,s=n.axis,a=n.config,r=n.state,o=a.axis_rotated,c=a["axis_"+(null==s?void 0:s.getId(e.id))+"_inverted"],l=n.isBarType(e),d=n.isTreemapType(e),u=a.point_r,h=U(i);let g,f=e.value,p=3;if(n.isCandlestickType(e))f=n.getCandlestickData(e),o?(g=t[0][0],g+=(t[1][0]-g)/2+p):(g=f&&f._isUp?t[2][2]-p:t[2][1]+4*p,c&&(g+=15*(f._isUp?1:-1)));else if(d)g=t[0][1]+(a.data_labels.centered?0:h.height+5);else if(o)g=(t[0][0]+t[2][0]+.6*h.height)/2;else if(g=t[2][1],R(u)&&u>5&&(n.isLineType(e)||n.isScatterType(e))&&(p+=a.point_r/2.3),f<0||0===f&&!r.hasPositiveValue&&r.hasNegativeValue)g+=c?l?-3:-5:h.height+(l?-p:p);else{let t=2*-p;l?t=-p:n.isBubbleType(e)&&(t=p),c&&(t=l?10:15),g+=t}if(null===e.value&&!o){const t=h.height;gr.height&&(g=r.height-4)}return o&&!d||(g+=n.getCenteredTextPos(e,t,i,"y")),g+Qe.call(this,e,"y")},markOverlapped:function(t,e,n){var a=this;const r=e.$el.arcs.selectAll(n),o=r.filter(function(e){return i(this,a),e.data.id!==t}.bind(this)),c=r.filter(function(e){return i(this,a),e.data.id===t}.bind(this)),l=et(c.node()),d=function(t,e){return i(this,a),Math.sqrt(Math.pow(t,2)+Math.pow(e,2))}.bind(this);c.node()&&o.each((function(){const t=et(this),e=(0,s.select)(this),i=d(l.e,l.f)>d(t.e,t.f)?c:e,n=Math.ceil(Math.abs(l.e-t.e))=(this.config[e+"_label_threshold"]||0)}};function ei(t,e){void 0===t&&(t="left");const i=R(e);let n;return n=t.indexOf("center")>-1?i?e/2:"middle":t.indexOf("right")>-1?i?e:"end":i?0:"start",n}var ii={initTitle:function(){const t=this.config,e=this.$el;if(t.title_text){e.title=e.svg.append("g");V(e.title.append("text").style("text-anchor",ei(t.title_position)).attr("class",$t.title),t.title_text,[.3,1.5])}},redrawTitle:function(){const t=this,e=t.config,i=t.state.current,n=t.$el.title;if(n){const s=t.yForTitle.call(t);/g/i.test(n.node().tagName)?n.attr("transform","translate("+ei(e.title_position,i.width)+", "+s+")"):n.attr("x",t.xForTitle.call(t)).attr("y",s)}},xForTitle:function(){const t=this,e=t.config,i=t.state.current,n=e.title_position||"left",s=t.getTextRect(t.$el.title,$t.title).width;let a;return/(right|center)/.test(n)?(a=i.width-s,n.indexOf("right")>=0?a=i.width-s-e.title_padding.right:n.indexOf("center")>=0&&(a=(i.width-s)/2)):a=e.title_padding.left||0,a},yForTitle:function(){const t=this;return(t.config.title_padding.top||0)+t.getTextRect(t.$el.title,$t.title).height},getTitlePadding:function(){return this.yForTitle()+(this.config.title_padding.bottom||0)}},ni={initTooltip:function(){const t=this,e=t.config,i=t.$el;i.tooltip=(0,s.select)(e.tooltip_contents.bindto),i.tooltip.empty()&&(i.tooltip=i.chart.append("div").attr("class",Ft.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip:function(){var t=this;const e=this,n=e.config,s=e.$el,a=e.state,r=a.hasAxis,o=a.hasRadar;if(n.tooltip_init_show){var c,l;const a=!(r&&o);if(null!=(c=e.axis)&&c.isTimeSeries()&&C(n.tooltip_init_x)){const t=e.data.targets[0];let i,s;for(n.tooltip_init_x=dt.call(e,n.tooltip_init_x),i=0;(s=t.values[i])&&s.x-n.tooltip_init_x!=0;i++);n.tooltip_init_x=i}let d=e.data.targets.map(function(s){i(this,t);const r=a?0:n.tooltip_init_x;return e.addName(s.values[r])}.bind(this));a&&(d=[d[n.tooltip_init_x]]),s.tooltip.html(e.getTooltipHTML(d,null==(l=e.axis)?void 0:l.getXAxisTickFormat(),e.getDefaultValueFormat(),e.color)),n.tooltip_contents.bindto||s.tooltip.style("top",n.tooltip_init_position.top).style("left",n.tooltip_init_position.left).style("display",null)}},getTooltipHTML:function(){const t=this,e=t.api,i=t.config;return k(i.tooltip_contents)?i.tooltip_contents.bind(e).apply(void 0,arguments):t.getTooltipContent.apply(t,arguments)},getTooltipContent:function(t,e,n,s){var a=this;const r=this,o=r.api,c=r.config,l=r.state,d=r.$el;let u=["title","name","value"].map(function(t){i(this,a);const e=c["tooltip_format_"+t];return k(e)?e.bind(o):e}.bind(this)),h=u[0],g=u[1],f=u[2];h=h||e,g=g||function(t){return i(this,a),t}.bind(this),f=f||(l.hasTreemap||r.isStackNormalized()?function(t,e){return i(this,a),(100*e).toFixed(2)+"%"}.bind(this):n);const p=c.tooltip_order,x=function(t){return i(this,a),r.axis&&r.isBubbleZType(t)?r.getBubbleZData(t.value,"z"):r.getBaseValue(t)}.bind(this),b=r.levelColor?function(t){return i(this,a),r.levelColor(t.value)}.bind(this):function(t){return i(this,a),s(t)}.bind(this),m=c.tooltip_contents,_=m.template,v=r.mapToTargetIds();if(null===p&&c.data_groups.length){const e=r.orderTargets(r.data.targets).map(function(t){return i(this,a),t.id}.bind(this)).reverse();t.sort(function(t,n){i(this,a);let s=t?t.value:null,r=n?n.value:null;return s>0&&r>0&&(s=t.id?e.indexOf(t.id):null,r=n.id?e.indexOf(n.id):null),s-r}.bind(this))}else/^(asc|desc)$/.test(p)?t.sort(function(t,e){i(this,a);const n=t?x(t):null,s=e?x(e):null;return"asc"===p?n-s:s-n}.bind(this)):k(p)&&t.sort(p.bind(o));const y=r.getTooltipContentTemplate(_),T=t.length;let w,A,C,R,O;for(O=0;O'+t+"":""})}if(!A.ratio&&d.arcs&&(C=["arc",r.$el.arcs.select("path."+bt.arc+"-"+A.id).data()[0]],A.ratio=r.getRatio.apply(r,C)),C=[A.ratio,A.id,A.index,t],R=G(f.apply(void 0,[x(A)].concat(C))),r.isAreaRangeType(A)){const t=["high","low"].map(function(t){return i(this,a),G(f.apply(void 0,[r.getRangedData(A,t)].concat(C)))}.bind(this));R="Mid: "+R+" High: "+t[0]+" Low: "+t[1]}else if(r.isCandlestickType(A)){const t=["open","high","low","close","volume"].map(function(t){return i(this,a),G(f.apply(void 0,[r.getRangedData(A,t,"candlestick")].concat(C)))}.bind(this)),e=t[0],n=t[1],s=t[2],o=t[3],c=t[4];R="Open: "+e+" High: "+n+" Low: "+s+" Close: "+o+(c?" Volume: "+c:"")}else if(r.isBarRangeType(A)){const t=A.value,e=t[0],i=t[1];R=f(e)+" ~ "+f(i)}if(void 0!==R){if(null===A.name)continue;const t=G(g.apply(void 0,[A.name].concat(C))),e=b(A),n={CLASS_TOOLTIP_NAME:Ft.tooltipName+r.getTargetSelectorSuffix(A.id),COLOR:_||!r.patterns?e:'',NAME:t,VALUE:R};if(_&&F(m.text)){const t=v.indexOf(A.id);Object.keys(m.text).forEach(function(e){i(this,a),n[e]=m.text[e][t]}.bind(this))}w+=lt(y[1],n)}}return w+""},getTooltipContentTemplate:function(t){return(t||'\n\t\t\t\t{=TITLE}\n\t\t\t\t{{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}}\n\t\t\t
'+(this.patterns?"{=COLOR}":'')+'{=NAME}{=VALUE}
').replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},setTooltipPosition:function(t,e){var n=this;const s=this,a=s.config,r=s.scale,o=s.state,c=s.$el,l=c.eventRect,d=c.tooltip,u=a.tooltip_contents.bindto,h=d.datum();if(!u&&h){var g,f;const c=H(o.event,null!=e?e:null==l?void 0:l.node()),u={x:c[0],y:c[1]};r.x&&h&&"x"in h&&(u.xAxis=r.x(h.x));const p=h.width,x=void 0===p?0:p,b=h.height,m=void 0===b?0:b,_=null!=(g=null==(f=a.tooltip_position)?void 0:f.bind(s.api)(null!=t?t:JSON.parse(h.current),x,m,null==l?void 0:l.node(),u))?g:s.getTooltipPosition.bind(s)(x,m,u);["top","left"].forEach(function(t){i(this,n);const e=_[t];d.style(t,e+"px"),"left"!==t||h.xPosInPercent||(h.xPosInPercent=e/o.current.width*100)}.bind(this))}},getTooltipPosition:function(t,e,n){var s=this;const a=this,r=a.config,o=a.scale,c=a.state,l=c,d=l.width,u=l.height,h=l.current,g=l.isLegendRight,f=l.inputType,p=a.hasType("gauge")&&!r.gauge_fullCircle,x=c.hasTreemap,b=r.axis_rotated,m=a.getSvgLeft(!0);let _=m+h.width-a.getCurrentPaddingRight();const v=a.getCurrentPaddingLeft(!0);let y=n.x,T=n.y;if(a.hasArcType()){"touch"===f||a.hasType("radar")||(T+=p?u:u/2,y+=(d-(g?a.getLegendWidth():0))/2)}else x||(b?(T=n.xAxis+20,y+=m,_-=m):(T-=5,y=m+v+20+(o.zoom?y:n.xAxis)));if(y+t+15>_&&(y-=b?t-v:t+(x?0:v)),T+e>h.height){T-=p?3*e:e+(x?0:30)}const w={top:T,left:y};return Object.keys(w).forEach(function(t){i(this,s),w[t]<0&&(w[t]=0)}.bind(this)),w},showTooltip:function(t,e){var n=this;const s=this,a=s.config,r=s.$el.tooltip,o=t.filter(function(t){return i(this,n),t&&S(s.getBaseValue(t))}.bind(this));if(!r||0===o.length||!a.tooltip_show)return;let c=r.datum();const l=JSON.stringify(t);if(!c||c.current!==l){const e=t.concat().sort()[0],i=e.index,n=e.x;N(a.tooltip_onshow,s.api,t),r.html(s.getTooltipHTML(t,s.axis?s.axis.getXAxisTickFormat():s.categoryName.bind(s),s.getDefaultValueFormat(),s.color)).style("display",null).style("visibility",null).datum(c={index:i,x:n,current:l,width:r.property("offsetWidth"),height:r.property("offsetHeight")}),N(a.tooltip_onshown,s.api,t),s._handleLinkedCharts(!0,i)}s.setTooltipPosition(o,e)},bindTooltipResizePos:function(){var t=this;const e=this,n=e.resizeFunction,s=e.state,a=e.$el.tooltip;n.add(function(){if(i(this,t),"block"===a.style("display")){const t=s.current,e=a.datum(),i=e.width,n=e.xPosInPercent;let r=t.width/100*n;const o=t.width-(r+i);o<0&&(r+=o),a.style("left",r+"px")}}.bind(this))},hideTooltip:function(t){const e=this,i=e.api,n=e.config,s=e.$el.tooltip;if(s&&"none"!==s.style("display")&&(!n.tooltip_doNotHide||t)){const t=JSON.parse(s.datum().current);N(n.tooltip_onhide,i,t),s.style("display","none").style("visibility","hidden").datum(null),N(n.tooltip_onhidden,i,t)}},_handleLinkedCharts:function(t,e){var n=this;const s=this,a=s.charts,r=s.config,o=s.state.event;if(null!=o&&o.isTrusted&&r.tooltip_linked&&a.length>1){const o=r.tooltip_linked_name;a.filter(function(t){return i(this,n),t!==s.api}.bind(this)).forEach(function(s){i(this,n);const a=s.internal,r=a.config,c=a.$el,l=r.tooltip_linked,d=r.tooltip_linked_name,u=h.body.contains(c.chart.node());if(l&&o===d&&u){const i=c.tooltip.data()[0],n=e!==(null==i?void 0:i.index);try{s.tooltip[t&&n?"show":"hide"]({index:e})}catch(t){}}}.bind(this))}},updateTooltipOnRedraw:function(t,e){var n=this;const a=this,r=a.config,o=a.$el,c=o.eventRect,l=o.svg,d=o.tooltip,u=a.state,g=u.event,f=u.hasAxis,p=u.hasRadar,x=u.hasTreemap;if("block"===(null==d?void 0:d.style("display"))&&g){var b;const o=null!=t?t:null==(b=p?l:c)?void 0:b.node();if(f||p)if(a.isMultipleX())a.selectRectForMultipleXs(o,!1);else{const t=null!=e?e:a.getDataIndexFromEvent(g);-1===e?a.api.tooltip.hide():(a.selectRectForSingle(o,t),a.setExpand(t,null,!0))}else{const t=g.clientX,e=g.clientY;setTimeout(function(){i(this,n);let r=h.elementFromPoint(t,e);const o=(0,s.select)(r).datum();if(o){const t=a.hasArcType()?a.convertToArcData(a.updateAngle(o)):null==o?void 0:o.data;x&&(r=l.node()),t&&a.showTooltip([t],r)}else a.api.tooltip.hide()}.bind(this),r.transition_duration)}}}},si={getTranslate:function(t,e){void 0===e&&(e=0);const i=this,n=i.config,s=i.state,a=n.axis_rotated;let r,o,c=0;if(e&&/^(x|y2?)$/.test(t)&&(c=i.getAxisSize(t)*e),"main"===t)r=I(s.margin.left),o=I(s.margin.top);else if("context"===t)r=I(s.margin2.left),o=I(s.margin2.top);else if("legend"===t)r=s.margin3.left,o=s.margin3.top;else if("x"===t)r=a?-c:0,o=a?0:s.height+c;else if("y"===t)r=a?0:-c,o=a?s.height+c:0;else if("y2"===t)r=a?0:s.width+c,o=a&&c?1-c:0;else if("subX"===t)r=0,o=a?0:s.height2;else if("arc"===t)r=s.arcWidth/2,o=s.arcHeight/2;else if("polar"===t)r=s.arcWidth/2,o=s.arcHeight/2;else if("radar"===t){const t=i.getRadarSize()[0];r=s.width/2-t,o=I(s.margin.top)}return"translate("+r+", "+o+")"},transformMain:function(t,e){const i=this,n=i.$el.main,s=i.$T,a=null!=e&&e.axisX?e.axisX:s(n.select("."+_t.axisX),t),r=null!=e&&e.axisY?e.axisY:s(n.select("."+_t.axisY),t),o=null!=e&&e.axisY2?e.axisY2:s(n.select("."+_t.axisY2),t);s(n,t).attr("transform",i.getTranslate("main")),a.attr("transform",i.getTranslate("x")),r.attr("transform",i.getTranslate("y")),o.attr("transform",i.getTranslate("y2")),n.select("."+bt.chartArcs).attr("transform",i.getTranslate("arc"))},transformAll:function(t,e){const i=this,n=i.config,s=i.state,a=s.hasAxis,r=s.hasTreemap,o=i.$el;r||i.transformMain(t,e),a&&n.subchart_show&&i.transformContext(t,e),o.legend&&i.transformLegend(t)}},ai={isValidChartType:function(t){return!!(t&&Object.values(g).indexOf(t)>-1)},setTargetType:function(t,e){var n=this;const s=this,a=s.config,r=s.state.withoutFadeIn;s.mapToTargetIds(t).forEach(function(t){i(this,n),r[t]=e===a.data_types[t],a.data_types[t]=e}.bind(this)),t||(a.data_type=e)},updateTypesElements:function(){var t=this;const e=this,n=e.state.current;Object.keys(g).forEach(function(s){i(this,t);const a=g[s],r=e.hasType(a,null,!0),o=n.types.indexOf(a);-1===o&&r?n.types.push(a):o>-1&&!r&&n.types.splice(o,1)}.bind(this)),e.setChartElements()},hasType:function(t,e,n){var s,a=this;void 0===n&&(n=!1);const r=this,o=r.config,c=r.state.current,l=o.data_types,d=e||r.data.targets;let u=!1;return!n&&(null==(s=c.types)?void 0:s.indexOf(t))>-1?u=!0:null!=d&&d.length?d.forEach(function(e){i(this,a);const n=l[e.id];(n===t||!n&&"line"===t)&&(u=!0)}.bind(this)):Object.keys(l).length?Object.keys(l).forEach(function(e){i(this,a),l[e]===t&&(u=!0)}.bind(this)):u=o.data_type===t,u},hasTypeOf:function(t,e,n){var s=this;return void 0===n&&(n=[]),t in b&&!b[t].filter(function(t){return i(this,s),-1===n.indexOf(t)}.bind(this)).every(function(t){return i(this,s),!this.hasType(t,e)}.bind(this))},isTypeOf:function(t,e){const i=C(t)?t:t.id,n=this.config.data_types[i]||this.config.data_type;return $(e)?e.indexOf(n)>=0:n===e},hasPointType:function(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType:function(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge:function(){return this.hasType("gauge")&&"multi"===this.config.gauge_type},isLineType:function(t){const e=C(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,b.Line)},isStepType:function(t){return this.isTypeOf(t,b.Step)},isSplineType:function(t){return this.isTypeOf(t,b.Spline)},isAreaType:function(t){return this.isTypeOf(t,b.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,b.AreaRange)},isBarType:function(t){return this.isTypeOf(t,"bar")},isBubbleType:function(t){return this.isTypeOf(t,"bubble")},isCandlestickType:function(t){return this.isTypeOf(t,"candlestick")},isScatterType:function(t){return this.isTypeOf(t,"scatter")},isTreemapType:function(t){return this.isTypeOf(t,"treemap")},isPieType:function(t){return this.isTypeOf(t,"pie")},isGaugeType:function(t){return this.isTypeOf(t,"gauge")},isDonutType:function(t){return this.isTypeOf(t,"donut")},isPolarType:function(t){return this.isTypeOf(t,"polar")},isRadarType:function(t){return this.isTypeOf(t,"radar")},isArcType:function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint:function(t){const e=this.config,i=e.point_pattern;let n=!1;return n="circle"===(null==t?void 0:t.tagName)||"circle"===e.point_type&&(!i||$(i)&&0===i.length),n},lineData:function(t){return this.isLineType(t)?[t]:[]},arcData:function(t){return this.isArcType(t.data)?[t]:[]},labelishData:function(t){var e=this;return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(function(t){return i(this,e),R(t.value)||!!t.value}.bind(this)):[]},barLineBubbleData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}};let ri=function(){function t(t){this.api=void 0,this.config=void 0,this.cache=void 0,this.$el=void 0,this.state=void 0,this.charts=void 0,this.data={xs:{},targets:[]},this.axis=void 0,this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.color=void 0,this.patterns=void 0,this.levelColor=void 0,this.point=void 0,this.brush=void 0,this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};const e=this;e.api=t,e.config=new ne,e.cache=new fe;const i=new Vt;e.$el=i.getStore("element"),e.state=i.getStore("state"),e.$T=e.$T.bind(e)}var e=t.prototype;return e.$T=function(t,e,i){const n=this.config,a=this.state,r=n.transition_duration,o=n.subchart_show;let c=t;if(c){"tagName"in c&&(c=(0,s.select)(c));c=(!1!==e&&r||e)&&(!a.zooming||a.dragging)&&!a.resizing&&a.rendered&&!o?c.transition(i).duration(r):c}return c},e.beforeInit=function(){const t=this;t.callPluginHook("$beforeInit"),N(t.config.onbeforeinit,t.api)},e.afterInit=function(){const t=this;t.callPluginHook("$afterInit"),N(t.config.onafterinit,t.api)},e.init=function(){const t=this,e=t.config,i=t.state,n=t.$el,a=e.boost_useCssRule;if(gt(t),i.hasRadar=!i.hasAxis&&t.hasType("radar"),i.hasTreemap=!i.hasAxis&&t.hasType("treemap"),i.hasAxis=!t.hasArcType()&&!i.hasTreemap,i.datetimeId="bb-"+ +new Date*Z(),a){const t=h.createElement("style");t.type="text/css",h.head.appendChild(t),i.style={rootSelctor:"."+i.datetimeId,sheet:t.sheet},n.style=t}const r={element:e.bindto,classname:"bb"};F(e.bindto)&&(r.element=e.bindto.element||"#chart",r.classname=e.bindto.classname||r.classname),n.chart=k(r.element.node)?e.bindto.element:(0,s.select)(r.element||[]),n.chart.empty()&&(n.chart=(0,s.select)(h.body.appendChild(h.createElement("div")))),n.chart.html("").classed(r.classname,!0).classed(i.datetimeId,a).style("position","relative"),t.initParams(),t.initToRender()},e.initToRender=function(t){var e=this;const n=this,s=n.config,a=n.state,o=n.$el.chart,c=function(){return i(this,e),"none"===o.style("display")||"hidden"===o.style("visibility")}.bind(this),l=s.render.lazy||c(),d=r.MutationObserver;l&&d&&!1!==s.render.observe&&!t&&new d(function(t,s){i(this,e),c()||(s.disconnect(),a.rendered||n.initToRender(!0))}.bind(this)).observe(o.node(),{attributes:!0,attributeFilter:["class","style"]}),l&&!t||n.convertData(s,function(t){i(this,e),n.initWithData(t),n.afterInit()}.bind(this))},e.initParams=function(){var t=this;const e=this,s=e.config,a=e.format,o=e.state,c=s.axis_rotated;if(e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),!1===s.padding&&(s.axis_x_show=!1,s.axis_y_show=!1,s.axis_y2_show=!1,s.subchart_show=!1),e.hasPointType()&&(e.point=e.generatePoint()),o.hasAxis){e.initClip(),a.extraLineClasses=e.generateExtraLineClass(),a.dataTime=s.data_xLocaltime?n.timeParse:n.utcParse,a.axisTime=s.axis_x_localtime?n.timeFormat:n.utcFormat;const r=e.config.zoom_enabled&&"drag"===e.config.zoom_type;a.defaultAxisTime=function(n){i(this,t);const s=e.scale,o=s.x,c=s.zoom,l=r?c:c&&o.orgDomain().toString()!==c.domain().toString(),d=(n.getMilliseconds()?".%L":n.getSeconds()&&".:%S")||n.getMinutes()&&"%I:%M"||n.getHours()&&"%I %p"||1!==n.getDate()&&"%b %d"||l&&1===n.getDate()&&"%b'%y"||n.getMonth()&&"%-m/%-d"||"%Y";return a.axisTime(d)(n)}.bind(this)}o.isLegendRight="right"===s.legend_position,o.isLegendInset="inset"===s.legend_position,o.isLegendTop="top-left"===s.legend_inset_anchor||"top-right"===s.legend_inset_anchor,o.isLegendLeft="top-left"===s.legend_inset_anchor||"bottom-left"===s.legend_inset_anchor,o.rotatedPadding.top=e.getResettedPadding(o.rotatedPadding.top),o.rotatedPadding.right=c&&!s.axis_x_show?0:30,o.inputType=function(t,e){var n=this;const s=r.DocumentTouch,a=r.matchMedia,o=r.navigator;let c=!1;if(e)if(o&&"maxTouchPoints"in o)c=o.maxTouchPoints>0;else if("ontouchmove"in r||s&&h instanceof s)c=!0;else if(null!=a&&a("(pointer:coarse)").matches)c=!0;else{const t=o.userAgent;c=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(t)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(t)}return(t&&["any-hover:hover","any-pointer:fine"].some(function(t){return i(this,n),null==a?void 0:a("("+t+")").matches}.bind(this))?"mouse":c&&"touch")||"mouse"}(s.interaction_inputType_mouse,s.interaction_inputType_touch)},e.initWithData=function(t){var e=this;const n=this,s=n.config,a=n.scale,r=n.state,o=n.$el,c=n.org,l=r,d=l.hasAxis,u=l.hasTreemap,h=s.interaction_enabled,g=n.hasType("polar");if(d&&(n.axis=n.getAxisInstance(),s.zoom_enabled&&n.initZoom()),n.data.xs={},n.data.targets=n.convertDataToTargets(t),s.data_filter&&(n.data.targets=n.data.targets.filter(s.data_filter.bind(n.api))),s.data_hide&&n.addHiddenTargetIds(!0===s.data_hide?n.mapToIds(n.data.targets):s.data_hide),s.legend_hide&&n.addHiddenLegendIds(!0===s.legend_hide?n.mapToIds(n.data.targets):s.legend_hide),n.updateSizes(),n.updateScales(!0),d){const t=a.x,e=a.y,i=a.y2,r=a.subX,o=a.subY,l=a.subY2;t&&(t.domain(at(n.getXDomain(n.data.targets),!s.axis_x_inverted)),r.domain(t.domain()),c.xDomain=t.domain()),e&&(e.domain(n.getYDomain(n.data.targets,"y")),o.domain(e.domain())),i&&(i.domain(n.getYDomain(n.data.targets,"y2")),l&&l.domain(i.domain()))}if(o.svg=o.chart.append("svg").style("overflow","hidden").style("display","block"),h&&r.inputType){const t="touch"===r.inputType,e=s.onclick,i=s.onover,a=s.onout;o.svg.on("click",(null==e?void 0:e.bind(n.api))||null).on(t?"touchstart":"mouseenter",(null==i?void 0:i.bind(n.api))||null).on(t?"touchend":"mouseleave",(null==a?void 0:a.bind(n.api))||null)}s.svg_classname&&o.svg.attr("class",s.svg_classname);const f=k(s.color_tiles)&&n.patterns;(d||f||g||u||s.data_labels_backgroundColors)&&(o.defs=o.svg.append("defs"),d&&["id","idXAxis","idYAxis","idGrid"].forEach(function(t){i(this,e),n.appendClip(o.defs,r.clip[t])}.bind(this)),n.generateDataLabelBackgroundColorFilter(),f&&n.patterns.forEach(function(t){var n=this;return i(this,e),o.defs.append(function(){return i(this,n),t.node}.bind(this))}.bind(this))),n.updateSvgSize(),n.bindResize();const p=o.svg.append("g").classed(xt.main,!0).attr("transform",u?null:n.getTranslate("main"));var x;(o.main=p,s.subchart_show&&n.initSubchart(),s.tooltip_show&&n.initTooltip(),s.title_text&&n.initTitle(),!u&&s.legend_show&&n.initLegend(),s.data_empty_label_text&&p.append("text").attr("class",$t.text+" "+xt.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),d&&(s.regions.length&&n.initRegion(),s.clipPath||n.axis.init()),p.append("g").classed(xt.chart,!0).attr("clip-path",d?r.clip.path:null),n.callPluginHook("$init"),n.initChartElements(),d)&&(h&&(null==n.initEventRect||n.initEventRect()),n.initGrid(),s.clipPath&&(null==(x=n.axis)||x.init()));if(n.updateTargets(n.data.targets),n.updateDimension(),N(s.oninit,n.api),n.setBackground(),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),s.data_onmin||s.data_onmax){const t=n.getMinMaxData();N(s.data_onmin,n.api,t.min),N(s.data_onmax,n.api,t.max)}s.tooltip_show&&n.initShowTooltip(),r.rendered=!0},e.initChartElements=function(){var t=this;const e=this,n=e.state,s=n.hasAxis,a=n.hasRadar,r=n.hasTreemap,o=[];if(s){const n=["bar","bubble","candlestick","line"];e.config.bar_front&&n.push(n.shift()),n.forEach(function(n){i(this,t);const s=Q(n);("line"===n&&e.hasTypeOf(s)||e.hasType(n))&&o.push(s)}.bind(this))}else if(r)o.push("Treemap");else{const t=e.hasType("polar");a||o.push("Arc","Pie"),e.hasType("gauge")?o.push("Gauge"):a?o.push("Radar"):t&&o.push("Polar")}o.forEach(function(n){i(this,t),e["init"+n]()}.bind(this)),X(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()},e.setChartElements=function(){const t=this.$el,e=t.chart,i=t.svg,n=t.defs,s=t.main,a=t.tooltip,r=t.legend,o=t.title,c=t.grid,l=t.needle,d=t.arcs,u=t.circle,h=t.bar,g=t.candlestick,f=t.line,p=t.area,x=t.text;this.api.$={chart:e,svg:i,defs:n,main:s,tooltip:a,legend:r,title:o,grid:c,arc:d,circles:u,bar:{bars:h},candlestick:g,line:{lines:f,areas:p},needle:l,text:{texts:x}}},e.setBackground=function(){const t=this,e=t.config.background,i=t.state,n=t.$el.svg;if(X(e)){const t=n.select("g").insert(e.imgUrl?"image":"rect",":first-child");e.imgUrl?t.attr("href",e.imgUrl):e.color&&t.style("fill",e.color).attr("clip-path",i.clip.path),t.attr("class",e.class||null).attr("width","100%").attr("height","100%")}},e.updateTargets=function(t){var e=this;const n=this,s=n.state,a=s.hasAxis,r=s.hasRadar,o=s.hasTreemap,c=function(s){return i(this,e),n["updateTargetsFor"+s](t.filter(n["is"+s+"Type"].bind(n)))}.bind(this);if(n.updateTargetsForText(t),a)["bar","candlestick","line"].forEach(function(t){i(this,e);const s=Q(t);("line"===t&&n.hasTypeOf(s)||n.hasType(t))&&c(s)}.bind(this)),n.updateTargetsForSubchart&&n.updateTargetsForSubchart(t);else if(n.hasArcType(t)){let t="Arc";r?t="Radar":n.hasType("polar")&&(t="Polar"),c(t)}else o&&c("Treemap");const l=n.hasType("bubble")||n.hasType("scatter");l&&(null==n.updateTargetForCircle||n.updateTargetForCircle()),n.filterTargetsToShowAtInit(l)},e.filterTargetsToShowAtInit=function(t){var e=this;void 0===t&&(t=!1);const n=this,s=n.$el.svg,a=n.$T;let r="."+xt.target;t&&(r+=", ."+Tt.chartCircles+" > ."+Tt.circles),a(s.selectAll(r).filter(function(t){return i(this,e),n.isTargetToShow(t.id)}.bind(this))).style("opacity",null)},e.getWithOption=function(t){var e=this;const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};return Object.keys(n).forEach(function(s){i(this,e);let a=n[s];C(a)&&(a=n[a]),n[s]=B(t,"with"+s,a)}.bind(this)),n},e.initialOpacity=function(t){const e=this.state.withoutFadeIn;return null!==this.getBaseValue(t)&&e[t.id]?null:"0"},e.bindResize=function(){var t=this;const e=this,n=e.config,s=e.state,a=function(t){var e=this;const n=[];let s;const a=function(){var e=this;a.clear(),!1===t?u(function(){var t=this;i(this,e),n.forEach(function(e){return i(this,t),e()}.bind(this))}.bind(this),{timeout:200}):s=pe(function(){var t=this;i(this,e),n.forEach(function(e){return i(this,t),e()}.bind(this))}.bind(this),R(t)?t:200)};return a.clear=function(){i(this,e),s&&(xe(s),s=null)}.bind(this),a.add=function(t){return i(this,e),n.push(t)}.bind(this),a.remove=function(t){return i(this,e),n.splice(n.indexOf(t),1)}.bind(this),a}(n.resize_timer),o=[];o.push(function(){return i(this,t),N(n.onresize,e.api)}.bind(this)),n.resize_auto&&o.push(function(){i(this,t),s.resizing=!0,n.legend_show&&(e.updateSizes(),e.updateLegend()),e.api.flush(!1)}.bind(this)),o.push(function(){i(this,t),N(n.onresized,e.api),s.resizing=!1}.bind(this)),o.forEach(function(e){return i(this,t),a.add(e)}.bind(this)),e.resizeFunction=a,r.addEventListener("resize",e.resizeFunction=a)},e.callPluginHook=function(t){for(var e=this,n=arguments.length,s=Array(n>1?n-1:0),a=1;a\n\t\t\t\n\t\t\t\t'+x+"\n\t\t\t\t"+f.replace(/(url\()[^#]+/g,"$1")+"\n\t\t\t";return"data:image/svg+xml;base64,"+ui(b)}function gi(t){var e=this;const n=t.getBoundingClientRect(),s=n.left,a=n.top,o=function(t){return i(this,e),t.textContent||t.childElementCount}.bind(this),c=[];return tt(t.querySelectorAll("text")).filter(o).forEach(function(t){var n=this;i(this,e);const l=function(t){var e;i(this,n);const o=r.getComputedStyle(t),c=o.fill,l=o.fontFamily,d=o.fontSize,u=o.textAnchor,h=o.transform,g=function(t,e){const i=e.top,n=e.left,s=t.getBBox(),a=s.x,r=s.y,o=t.getScreenCTM(),c=o.a,l=o.b,d=o.c,u=o.d,h=o.e,g=o.f,f=t.getBoundingClientRect(),p=f.width,x=f.height;return{x:c*a+d*r+h-n,y:l*a+u*r+g-i+(x-Math.round(x/4)),width:p,height:x}}(t,{left:s,top:a}),f=g.x,p=g.y,x=g.width,b=g.height;return(e={})[t.textContent]={x:f,y:p,width:x,height:b,fill:c,fontFamily:l,fontSize:d,textAnchor:u,transform:h},e}.bind(this);if(t.childElementCount>1)return tt(t.querySelectorAll("tspan")).filter(o).forEach(function(t){i(this,n),c.push(l(t))}.bind(this)),[];c.push(l(t))}.bind(this)),c}var fi={export:function(t,e){var n=this;const s=this.internal,a=s.state,r=s.$el,o=r.chart,c=r.svg,l=a.current,d=l.width,u=l.height,g=st({width:d,height:u,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t),f=hi(o.node(),g,{width:d,height:u}),p=g.preserveFontStyle?gi(c.node()):[];if(e&&k(e)){const t=new Image;t.crossOrigin="Anonymous",t.onload=function(){i(this,n);const s=h.createElement("canvas"),a=s.getContext("2d");s.width=g.width||d,s.height=g.height||u,a.drawImage(t,0,0),p.length&&(!function(t,e){var n=this;e.forEach(function(e){var s=this;i(this,n),Object.keys(e).forEach(function(n){var a=this;i(this,s);const r=e[n],o=r.x,c=r.y,l=r.width,d=r.height,u=r.fill,h=r.fontFamily,g=r.fontSize,f=r.transform;if(t.save(),t.font=g+" "+h,t.fillStyle=u,"none"===f)t.fillText(n,o,c);else{const e=f.replace(/(matrix|\(|\))/g,"").split(",");e.splice(4).every(function(t){return i(this,a),0==+t}.bind(this))?(e.push(o+l-l/4),e.push(c-d+d/3)):(e.push(o),e.push(c)),t.transform.apply(t,e),t.fillText(n,0,0)}t.restore()}.bind(this))}.bind(this))}(a,p),p.length=0),e.bind(this)(s.toDataURL(g.mimeType))}.bind(this),t.src=f}return f}},pi={focus:function(t){var e=this;const n=this.internal,s=n.state,a=n.mapToTargetIds(t),r=n.$el.svg.selectAll(n.selectorTargets(a.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),r.classed(Et.focused,!0).classed(Et.defocused,!1),n.hasArcType()&&!s.hasRadar&&(n.expandArc(a),n.hasType("gauge")&&n.markOverlapped(t,n,"."+St.gaugeValue)),n.toggleFocusLegend(a,!0),s.focusedTargetIds=a,s.defocusedTargetIds=s.defocusedTargetIds.filter(function(t){return i(this,e),a.indexOf(t)<0}.bind(this))},defocus:function(t){var e=this;const n=this.internal,s=n.state,a=n.mapToTargetIds(t);n.$el.svg.selectAll(n.selectorTargets(a.filter(n.isTargetToShow,n))).classed(Et.focused,!1).classed(Et.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(a),n.hasType("gauge")&&n.undoMarkOverlapped(n,"."+St.gaugeValue)),n.toggleFocusLegend(a,!1),s.focusedTargetIds=s.focusedTargetIds.filter(function(t){return i(this,e),a.indexOf(t)<0}.bind(this)),s.defocusedTargetIds=a},revert:function(t){const e=this.internal,i=e.config,n=e.state,a=e.$el,r=e.mapToTargetIds(t);a.svg.selectAll(e.selectorTargets(r)).classed(Et.focused,!1).classed(Et.defocused,!1),e.hasArcType(null,["polar"])&&e.unexpandArc(r),i.legend_show&&(e.showLegend(r.filter(e.isLegendToShow.bind(e))),a.legend.selectAll(e.selectorLegends(r)).filter((function(){return(0,s.select)(this).classed(Et.legendItemFocused)})).classed(Et.legendItemFocused,!1)),n.focusedTargetIds=[],n.defocusedTargetIds=[]}};var xi={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},bi={load:function(t){var e=this;const n=this.internal,s=n.config;t.xs&&n.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(n){i(this,e),s.data_classes[n]=t.classes[n]}.bind(this)),"categories"in t&&n.axis.isCategorized()&&(s.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(n){i(this,e),s.data_axes[n]=t.axes[n]}.bind(this)),"colors"in t&&Object.keys(t.colors).forEach(function(n){i(this,e),s.data_colors[n]=t.colors[n]}.bind(this)),"unload"in t&&!1!==t.unload?n.unload(n.mapToTargetIds(!0===t.unload?null:t.unload),function(){var s=this;i(this,e),u(function(){return i(this,s),n.loadFromArgs(t)}.bind(this))}.bind(this)):n.loadFromArgs(t)},unload:function(t){var e=this;const n=this.internal;let s=t||{};M(s)&&this.tooltip.hide(),$(s)?s={ids:s}:C(s)&&(s={ids:[s]});const a=n.mapToTargetIds(s.ids);n.unload(a,function(){i(this,e),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.cache.remove(a),Oe.call(n,s.done,s.resizeAfter)}.bind(this))}};function mi(t,e,n){var s=this;const a=this.internal,r=a.mapToTargetIds(e),o=a.state.hiddenTargetIds.map(function(t){return i(this,s),r.indexOf(t)>-1&&t}.bind(this)).filter(Boolean);a.state.toggling=!0,a[(t?"remove":"add")+"HiddenTargetIds"](r);const c=a.$el.svg.selectAll(a.selectorTargets(r)),l=t?null:"0";t&&o.length&&(c.style("display",null),N(a.config.data_onshown,this,o)),a.$T(c).style("opacity",l,"important").call(j,function(){i(this,s),t||0!==o.length||(c.style("display","none"),N(a.config.data_onhidden,this,r)),c.style("opacity",l)}.bind(this)),n.withLegend&&a[(t?"show":"hide")+"Legend"](r),a.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),a.state.toggling=!1}var _i={show:function(t,e){void 0===e&&(e={}),mi.call(this,!0,t,e)},hide:function(t,e){void 0===e&&(e={}),mi.call(this,!1,t,e)},toggle:function(t,e){var n=this;void 0===e&&(e={});const s=this.internal,a={show:[],hide:[]};s.mapToTargetIds(t).forEach(function(t){return i(this,n),a[s.isTargetToShow(t)?"hide":"show"].push(t)}.bind(this)),a.show.length&&this.show(a.show,e),a.hide.length&&setTimeout(function(){return i(this,n),this.hide(a.hide,e)}.bind(this),0)}};const vi={show:function(t){var e=this;const n=this.internal,s=n.$el,a=n.config,r=n.state,o=r.eventReceiver,c=r.hasTreemap,l=r.inputType;let d,u;if(t.mouse&&(u=t.mouse),t.data){var h;const e=t.data,i=null==(h=n.getYScaleById(e.id))?void 0:h(e.value);if(c&&e.id)o.rect=s.main.select(""+n.selectorTarget(e.id,void 0,"rect"));else if(n.isMultipleX())u=[n.xx(e),i];else{var g,f;a.tooltip_grouped||(u=[0,i]),d=null!=(g=e.index)?g:n.hasArcType()&&e.id?null==(f=n.getArcElementByIdOrIndex(e.id))?void 0:f.datum().index:n.getIndexByX(e.x)}}else O(t.x)?d=n.getIndexByX(t.x):O(t.index)&&(d=t.index);("mouse"===l?["mouseover","mousemove"]:["touchstart"]).forEach(function(t){i(this,e),n.dispatchEvent(t,d,u)}.bind(this))},hide:function(){var t=this;const e=this.internal,n=e.state.inputType,s=e.$el.tooltip,a=null==s?void 0:s.datum();if(a){const s=JSON.parse(a.current)[0].index;("mouse"===n?["mouseout"]:["touchend"]).forEach(function(n){i(this,t),e.dispatchEvent(n,s)}.bind(this))}"touch"===n&&e.callOverOutForTouch(),e.hideTooltip(!0),null==e.hideGridFocus||e.hideGridFocus(),null==e.unexpandCircles||e.unexpandCircles(),null==e.expandBarTypeShapes||e.expandBarTypeShapes(!1)}};var yi={tooltip:vi};let Ti=function t(e){this.plugins=[],this.internal=void 0;const n=new ri(this);this.internal=n,function t(e,n,s){var a=this;Object.keys(e).forEach(function(r){i(this,a);const o=k(e[r]),c=n!==s,l=X(e[r]),d=l&&Object.keys(e[r]).length>0;n[r]=o&&(!c&&d||c)?e[r].bind(s):l&&!o?{}:e[r],d&&t(e[r],n[r],s)}.bind(this))}(t.prototype,this,this),oi.call(n,e),n.beforeInit(),n.init()};function wi(t,e,n){var s=this;const a=t.config,r=function(t,n){i(this,s);const r=R(n)?n:!1===n?void 0:null;null!==r&&(a["axis_"+t+"_"+e]=r)}.bind(this);O(n)&&(z(n)?Object.keys(n).forEach(function(t){i(this,s),r(t,n[t])}.bind(this)):(R(n)||!1===n)&&["y","y2"].forEach(function(t){i(this,s),r(t,n)}.bind(this)),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function Ai(t,e){const i=t.config;return{x:i["axis_x_"+e],y:i["axis_y_"+e],y2:i["axis_y2_"+e]}}J(Ti.prototype,[ci,{color:function(t){return this.internal.color(t)}},di,fi,pi,xi,bi,_i,yi]);const Si={labels:function(t){var e=this;const n=this.internal;let s;return t&&(Object.keys(t).forEach(function(s){i(this,e),n.axis.setLabelText(s,t[s])}.bind(this)),n.axis.updateLabels()),["x","y","y2"].forEach(function(t){i(this,e);const a=n.axis.getLabelText(t);a&&(s||(s={}),s[t]=a)}.bind(this)),s},min:function(t){const e=this.internal;return S(t)||!1===t?wi(e,"min",t):Ai(e,"min")},max:function(t){const e=this.internal;return S(t)||!1===t?wi(e,"max",t):Ai(e,"max")},range:function(t){const e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};{const i=t.min,n=t.max;O(n)&&e.max(n),O(i)&&e.min(i)}}};var ki={axis:Si};function Ci(t,e){const i=this.internal,n=i.config,s=n.transition_duration&&ut(),a="grid_"+e+"_lines";return t?(n[a]=t,i.updateGrid(),i.redrawGrid(s),n[a]):n[a]}function Ri(t,e){return Ci.bind(this)(this.internal.config["grid_"+e+"_lines"].concat(t||[]),e)}function Ei(t,e){this.internal.removeGridLines(t,e)}const Oi=function(t){return Ci.bind(this)(t,"x")};J(Oi,{add:function(t){return Ri.bind(this)(t,"x")},remove:function(t){return Ei.bind(this)(t,!0)}});const Li=function(t){return Ci.bind(this)(t,"y")};J(Li,{add:function(t){return Ri.bind(this)(t,"y")},remove:function(t){return Ei.bind(this)(t,!1)}});var Pi={xgrids:Oi,ygrids:Li},Ii={groups:function(t){const e=this.internal,i=e.config;return E(t)||(i.data_groups=t,e.redraw()),i.data_groups}};function Di(t,e){void 0===e&&(e=!1);const i=this.internal,n=i.config,s=n.transition_duration&&ut();return t?(n.regions=e?n.regions.concat(t):t,i.updateRegion(),i.redrawRegion(s),e?n.regions:t):n.regions}const zi=function(t){return Di.bind(this)(t)};J(zi,{add:function(t){return Di.bind(this)(t,!0)},remove:function(t){var e=this;const n=this.internal,s=n.config,a=n.$T,r=t||{},o=B(r,"classes",[Dt.region]);let c=n.$el.main.select("."+Dt.regions).selectAll(o.map(function(t){return i(this,e),"."+t}.bind(this)));return a(c).style("opacity","0").remove(),c=s.regions,Object.keys(r).length?(c=c.filter(function(t){var n=this;i(this,e);let s=!1;return!t.class||(t.class.split(" ").forEach(function(t){i(this,n),o.indexOf(t)>=0&&(s=!0)}.bind(this)),!s)}.bind(this)),s.regions=c):s.regions=[],c}});var Mi={regions:zi},Xi={x:function(t){const e=this.internal,i=e.axis,n=e.data,s=i.isCustomX()&&i.isCategorized();return $(t)&&(s?this.categories(t):(e.updateTargetX(n.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),s?this.categories():n.xs},xs:function(t){const e=this.internal;return F(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},$i={flow:function(t){var e=this;const n=this.internal;let s;(t.json||t.rows||t.columns)&&n.convertData(t,function(a){i(this,e),s=a,function(){var e=this;let a,r,o,c=0,l=0;if(n.state.redrawing||!s||!ut())return;const d=[],u=n.getMaxDataCount(),h=n.convertDataToTargets(s,!0),g=n.axis.isTimeSeries();n.data.targets.forEach(function(t){i(this,e);let n=!1;for(let e=0;e1?f.values[f.values.length-1].x-p.x:p.x-n.getXDomain(n.data.targets)[0]:1,a=[p.x-r,p.x]);a&&n.updateXDomain(null,!0,!0,!1,a),n.updateTargets(n.data.targets),n.redraw({flow:{index:p.index,length:c,duration:S(t.duration)?t.duration:n.config.transition_duration,done:t.done,orgDataCount:u},withLegend:!0,withTransition:u>1,withTrimXDomain:!1,withUpdateXAxis:!0})}()}.bind(this))}},Fi=p(10);let Bi=function(){function t(t){this.owner=void 0,this.config=void 0,this.scale=void 0;const e=He(),i=t.config,n=t.params;this.owner=t,this.config=i,this.scale=e,!i.noTransition&&n.config.transition_duration||(i.withoutTransition=!0),i.range=this.scaleExtent((n.orgXScale||e).range())}t.getSizeFor1Char=function(t){var e=this;const n={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call(function(t){i(this,e);try{const e=t.node().getBBox(),i=e.width,s=e.height;i&&s&&(n.w=i,n.h=s)}catch(t){}finally{t.text("")}}.bind(this)),this.getSizeFor1Char=function(){return i(this,e),n}.bind(this),n};var e=t.prototype;return e.getTickTransformSetter=function(t){var e=this;const n=this.config,s="x"===t?function(t){return i(this,e),"translate("+(t+n.tickOffset)+",0)"}.bind(this):function(t){return i(this,e),"translate(0,"+t+")"}.bind(this);return function(t,n){var a=this;i(this,e),t.attr("transform",function(t){return i(this,a),S(t)?s(Math.ceil(n(t))):null}.bind(this))}.bind(this)},e.scaleExtent=function(t){const e=t[0],i=t[t.length-1];return e0?r:1,o]).range(t.range());c=e.ticks();for(let t=o.toFixed().length;c.length>15;t--)c=e.ticks(t);c.splice(0,1,r),c.splice(c.length-1,1,o)}c=c.map(function(t){i(this,n);return C(t)&&R(t)&&!isNaN(t)&&Math.round(10*t)/10||t}.bind(this))}else{for(let t=Math.ceil(r);t0&&c[0]>0&&c.unshift(c[0]-(c[1]-c[0]))}return c},e.copyScale=function(){const t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t.type=this.scale.type,t},e.textFormatted=function(t){const e=this.config.tickFormat,i=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,n=e?e(i):i;return O(n)?n:""},e.transitionise=function(t){const e=this.config;let i=t;if(e.withoutTransition)i=t.interrupt();else if(e.transition||!this.owner.params.noTransition)try{i=t.transition(e.transition)}catch(t){}return i},t}(),Ni=function(){function t(t){void 0===t&&(t={}),this.helper=void 0,this.config=void 0,this.params=void 0,this.g=void 0,this.generatedTicks=void 0;const e={innerTickSize:6,outerTickSize:t.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:t.noTransition};e.tickLength=Math.max(e.innerTickSize,0)+e.tickPadding,this.config=e,this.params=t,this.helper=new Bi(this)}var e=t.prototype;return e.create=function(t){const e=this,n=e.config,a=e.helper,r=e.params,o=a.scale,c=n.orient,l=this.splitTickText.bind(e),d=/^(left|right)$/.test(c),u=/^(top|bottom)$/.test(c),h=a.getTickTransformSetter(u?"x":"y"),g=h===a.axisX?"y":"x",f=/^(top|left)$/.test(c)?-1:1,p=r.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():a.scaleExtent((r.orgXScale||o).range());const x=n.innerTickSize,b=n.tickLength,m=n.range,_=r.id,v=_&&/^(x|y|y2)$/.test(_)?r.config["axis_"+_+"_tick_text_position"]:{x:0,y:0},y="subX"===_?"subchart_axis_x":"axis_"+_,T=r.config[y+"_show"],w=!!T&&r.config[y+"_tick_show"],A=!!T&&r.config[y+"_tick_text_show"];let S;t.each((function(){var t=this;const _=(0,s.select)(this);let y=this.__chart__||o,T=a.copyScale();S=_,this.__chart__=T,n.tickOffset=r.isCategory?Math.ceil((T(1)-T(0))/2):0;const k=_.selectAll(".domain").data([0]);if(k.enter().append("path").attr("class","domain").merge(k).attr("d",function(){i(this,t);const e=n.outerTickSize*f;return u?"M"+m[0]+","+e+"V0H"+m[1]+"V"+e:"M"+e+","+m[0]+"H0V"+m[1]+"H"+e}.bind(this)),w||A){const s=n.tickValues||a.generateTicks(T,d);e.generatedTicks=s;let o=_.selectAll(".tick").data(s,T);const m=o.enter().insert("g",".domain").attr("class","tick"),S=o.exit().remove();o=m.merge(o),w&&m.append("line"),A&&m.append("text");const k=Bi.getSizeFor1Char(o),C=[];let E=o.select("text").selectAll("tspan").data(function(e,n){var o=this;i(this,t);const c=r.tickMultiline?l(e,T,s,d,k.w):$(a.textFormatted(e))?a.textFormatted(e).concat():[a.textFormatted(e)];return C[n]=c.length,c.map(function(t){return i(this,o),{index:n,splitted:t}}.bind(this))}.bind(this));E.exit().remove(),E=E.enter().append("tspan").merge(E).text(function(e){return i(this,t),e.splitted}.bind(this)),E.attr("x",u?0:b*f).attr("dx",function(){i(this,t);let e=0;return/(top|bottom)/.test(c)&&p&&(e=8*Math.sin(Math.PI*(p/180))*("top"===c?-1:1)),e+(v.x||0)}.bind(this)()).attr("dy",function(e,n){i(this,t);let s=0;return"top"!==c&&(s=k.h,0===n&&(s=d?-((C[e.index]-1)*(k.h/2)-3):0===v.y?".71em":0)),R(s)&&v.y?s+v.y:s||".71em"}.bind(this));const O=o.select("line"),L=o.select("text");if(m.select("line").attr(g+"2",x*f),m.select("text").attr(g,b*f),e.setTickLineTextPosition(O,L),r.tickTitle){const e=L.select("title");(e.empty()?L.append("title"):e).text(function(e){return i(this,t),r.tickTitle[e]}.bind(this))}if(T.bandwidth){const e=T,n=e.bandwidth()/2;y=function(s){return i(this,t),e(s)+n}.bind(this),T=y}else y.bandwidth?y=T:h(S,T);o=r.owner.state.flowing?a.transitionise(o):r.owner.$T(o),h(m,y),h(o.style("opacity",null),T)}})),this.g=S},e.getGeneratedTicks=function(t){var e,n=this;const s=(null==(e=this.generatedTicks)?void 0:e.length)-1;let a=this.generatedTicks;if(s>t){const e=Math.round(s/t+.1);a=this.generatedTicks.map(function(t,s){return i(this,n),s%e==0?t:null}.bind(this)).filter(function(t){return i(this,n),null!==t}.bind(this)).splice(0,t)}return a},e.getTickXY=function(){const t=this.config,e={x:0,y:0};return this.params.isCategory&&(e.x=t.tickCentered?0:t.tickOffset,e.y=t.tickCentered?t.tickOffset:0),e},e.getTickSize=function(t){const e=this.helper.scale,i=this.config,n=i,s=n.innerTickSize,a=n.range,r=e(t)+(i.tickCentered?0:i.tickOffset);return a[0]0?0:1]:"middle"}.bind(this),h=function(t){return i(this,n),t?"rotate("+t+")":null}.bind(this),g=function(t){i(this,n);return t?11.5-2.5*(t/("bottom"===o?15:23))*(t>0?1:-1):c}.bind(this);switch(o){case"bottom":t.attr("x1",s.x).attr("x2",s.x).attr("y2",this.getTickSize.bind(this)),e.attr("x",0).attr("y",g(d)).style("text-anchor",u(d)).attr("transform",h(d));break;case"top":t.attr("x2",0).attr("y2",-r),e.attr("x",0).attr("y",2*-g(d)).style("text-anchor",u(d)).attr("transform",h(d));break;case"left":t.attr("x2",-r).attr("y1",s.y).attr("y2",s.y),e.attr("x",-c).attr("y",l).style("text-anchor","end");break;case"right":t.attr("x2",r).attr("y2",0),e.attr("x",c).attr("y",0).style("text-anchor","start")}},e.splitTickText=function(t,e,i,n,s){const a=this.params,r=this.helper.textFormatted(t),o=C(r)&&r.indexOf("\n")>-1?r.split("\n"):[];if(o.length)return o;if($(r))return r;let c=a.tickWidth;return(!c||c<=0)&&(c=n?95:a.isCategory?Math.ceil(a.isInverted?e(i[0])-e(i[1]):e(i[1])-e(i[0]))-12:110),function t(e,i){let n,a,r;for(let o=1;o=0||i.hasRadar},e.isCustomX=function(){const t=this.owner.config;return!this.isTimeSeries()&&(t.data_x||X(t.data_xs))},e.isTimeSeries=function(t){return void 0===t&&(t="x"),"timeseries"===this.owner.config["axis_"+t+"_type"]},e.isLog=function(t){return void 0===t&&(t="x"),"log"===this.owner.config["axis_"+t+"_type"]},e.isTimeSeriesY=function(){return this.isTimeSeries("y")},e.getAxisType=function(t){void 0===t&&(t="x");let e="linear";return this.isTimeSeries(t)?e=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(t)&&(e="log"),e},e.init=function(){var t=this;const e=this.owner,n=e.config,s=e.$el,a=s.main,r=s.axis,o=e.state.clip,c=n.axis_rotated,l=["x","y"];n.axis_y2_show&&l.push("y2"),l.forEach(function(s){var l=this;i(this,t);const d=this.getAxisClassName(s),u=_t["axis"+s.toUpperCase()+"Label"];r[s]=a.append("g").attr("class",d).attr("clip-path",function(){i(this,l);let t=null;return"x"===s?t=o.pathXAxis:"y"===s&&(t=o.pathYAxis),t}.bind(this)).attr("transform",e.getTranslate(s)).style("visibility",n["axis_"+s+"_show"]?null:"hidden"),r[s].append("text").attr("class",u).attr("transform",["rotate(-90)",null]["x"===s?+!c:+c]).style("text-anchor",function(){return i(this,l),this.textAnchorForAxisLabel(s)}.bind(this)),this.generateAxes(s)}.bind(this))},e.setOrient=function(){const t=this.owner.config,e=t.axis_rotated,i=t.axis_y_inner,n=t.axis_y2_inner;this.orient={x:e?"left":"bottom",y:e?i?"top":"bottom":i?"right":"left",y2:e?n?"bottom":"top":n?"left":"right",subX:e?"left":"bottom"}},e.generateAxes=function(t){var e=this;const n=this.owner,s=n.config,a=[],r=s["axis_"+t+"_axes"],o=s.axis_rotated;let c;"x"===t?c=o?Fi.axisLeft:Fi.axisBottom:"y"===t?c=o?Fi.axisBottom:Fi.axisLeft:"y2"===t&&(c=o?Fi.axisTop:Fi.axisRight),r.length&&r.forEach(function(s){var r=this;i(this,e);const o=s.tick||{},l=n.scale[t].copy();s.domain&&l.domain(s.domain),a.push(c(l).ticks(o.count).tickFormat(k(o.format)?o.format.bind(n.api):function(t){return i(this,r),t}.bind(this)).tickValues(o.values).tickSizeOuter(!1===o.outer?0:6))}.bind(this)),this.axesList[t]=a},e.updateAxes=function(){var t=this;const e=this.owner,n=e.config,s=e.$el.main,a=e.$T;Object.keys(this.axesList).forEach(function(r){var o=this;i(this,t);const c=n["axis_"+r+"_axes"],l=e.scale[r].copy(),d=l.range();this.axesList[r].forEach(function(t,u){var h=this;i(this,o);const g=t.scale().range();d.every(function(t,e){return i(this,h),t===g[e]}.bind(this))||t.scale().range(d);const f=this.getAxisClassName(r)+"-"+(u+1);let p=s.select("."+f.replace(/\s/,"."));p.empty()?p=s.append("g").attr("class",f).style("visibility",n["axis_"+r+"_show"]?null:"hidden").call(t):(c[u].domain&&l.domain(c[u].domain),a(p).call(t.scale(l))),p.attr("transform",e.getTranslate(r,u+1))}.bind(this))}.bind(this))},e.setAxis=function(t,e,i,n){const s=this.owner;"subX"!==t&&(this.tick[t]=this.getTickValues(t)),this[t]=this.getAxis(t,e,i,!("x"!==t||!(s.scale.zoom||s.config.subchart_show||s.state.resizing))||n)},e.getAxis=function(t,e,n,s,a){var r=this;const o=this.owner,c=o.config,l=/^(x|subX)$/.test(t),d=l?"x":t,u=l&&this.isCategorized(),h=this.orient[t],g=a?0:o.getAxisTickRotate(d);let f;if(l)f="subX"===t?o.format.subXAxisTick:o.format.xAxisTick;else{const e=c["axis_"+t+"_tick_format"];k(e)&&(f=e.bind(o.api))}let p=this.tick[d];const x=st({outerTick:n,noTransition:s,config:c,id:t,tickTextRotate:g,owner:o},l&&{isCategory:u,isInverted:c.axis_x_inverted,tickMultiline:c.axis_x_tick_multiline,tickWidth:c.axis_x_tick_width,tickTitle:u&&c.axis_x_tick_tooltip&&o.api.categories(),orgXScale:o.scale.x});l||(x.tickStepSize=c["axis_"+d+"_tick_stepSize"]);const b=new Ni(x).scale(l&&o.scale.zoom||e).orient(h);if(l&&this.isTimeSeries()&&p&&!k(p)){const t=dt.bind(o);p=p.map(function(e){return i(this,r),t(e)}.bind(this))}else!l&&this.isTimeSeriesY()&&(b.ticks(c.axis_y_tick_time_value),p=null);p&&b.tickValues(p),b.tickFormat(f||!l&&o.isStackNormalized()&&function(t){return i(this,r),t+"%"}.bind(this)),u&&(b.tickCentered(c.axis_x_tick_centered),M(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1));const m=c["axis_"+d+"_tick_count"];return m&&b.ticks(m),b},e.updateXAxisTickValues=function(t,e){const i=this.owner,n=i.config,s=n.axis_x_tick_fit;let a,r=n.axis_x_tick_count;if((s||r&&s)&&(a=i.mapTargetsToUniqueXs(t),this.isCategorized()&&r>a.length&&(r=a.length),a=this.generateTickValues(a,r,this.isTimeSeries())),e)e.tickValues(a);else if(this.x){var o;this.x.tickValues(a),null==(o=this.subX)||o.tickValues(a)}return a},e.getId=function(t){const e=this.owner,i=e.config,n=e.scale;let s=i.data_axes[t];return s&&n[s]||(s="y"),s},e.getXAxisTickFormat=function(t){var e=this;const n=this.owner,s=n.config,a=n.format,r=t&&s.subchart_axis_x_tick_format||s.axis_x_tick_format,o=this.isTimeSeries(),c=this.isCategorized();let l;return r?k(r)?l=r.bind(n.api):o&&(l=function(t){return i(this,e),t?a.axisTime(r)(t):""}.bind(this)):l=o?a.defaultAxisTime:c?n.categoryName:function(t){return i(this,e),t<0?t.toFixed(0):t}.bind(this),k(l)?function(t){return i(this,e),l.apply(n,c?[t,n.categoryName(t)]:[t])}.bind(this):l},e.getTickValues=function(t){const e=this.owner,i=e.config["axis_"+t+"_tick_values"],n=e[t+"Axis"];return(k(i)?i.call(e.api):i)||(n?n.tickValues():void 0)},e.getLabelOptionByAxisId=function(t){return this.owner.config["axis_"+t+"_label"]},e.getLabelText=function(t){const e=this.getLabelOptionByAxisId(t);return C(e)?e:e?e.text:null},e.setLabelText=function(t,e){const i=this.owner.config,n=this.getLabelOptionByAxisId(t);C(n)?i["axis_"+t+"_label"]=e:n&&(n.text=e)},e.getLabelPosition=function(t,e){var n=this;const s=this.owner.config.axis_rotated,a=this.getLabelOptionByAxisId(t),r=z(a)&&a.position?a.position:e[+!s],o=function(t){return i(this,n),!!~r.indexOf(t)}.bind(this);return{isInner:o("inner"),isOuter:o("outer"),isLeft:o("left"),isCenter:o("center"),isRight:o("right"),isTop:o("top"),isMiddle:o("middle"),isBottom:o("bottom")}},e.getAxisLabelPosition=function(t){return this.getLabelPosition(t,"x"===t?["inner-top","inner-right"]:["inner-right","inner-top"])},e.getLabelPositionById=function(t){return this.getAxisLabelPosition(t)},e.xForAxisLabel=function(t){const e=this.owner,i=e.state,n=i.width,s=i.height,a=this.getAxisLabelPosition(t);let r=a.isMiddle?-s/2:0;return this.isHorizontal(e,"x"!==t)?r=a.isLeft?0:a.isCenter?n/2:n:a.isBottom&&(r=-s),r},e.dxForAxisLabel=function(t){const e=this.owner,i=this.getAxisLabelPosition(t);let n=i.isBottom?"0.5em":"0";return this.isHorizontal(e,"x"!==t)?n=i.isLeft?"0.5em":i.isRight?"-0.5em":"0":i.isTop&&(n="-0.5em"),n},e.textAnchorForAxisLabel=function(t){const e=this.owner,i=this.getAxisLabelPosition(t);let n=i.isMiddle?"middle":"end";return this.isHorizontal(e,"x"!==t)?n=i.isLeft?"start":i.isCenter?"middle":"end":i.isBottom&&(n="start"),n},e.dyForAxisLabel=function(t){const e=this.owner,i=e.config,n=i.axis_rotated,s=this.getAxisLabelPosition(t).isInner,a=i["axis_"+t+"_tick_rotate"]?e.getHorizontalAxisHeight(t):0,r=this.getMaxTickWidth(t);let o;if("x"===t){const t=i.axis_x_height;o=n?s?"1.2em":-25-r:s?"-0.5em":t?t-10:a?a-10:"3em"}else o={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[t],o=n?s?o[0]:a?a*("y2"===t?-1:1)-o[1]:o[2]:s?o[3]:(o[4]+(i["axis_"+t+"_inner"]?0:r+o[4]))*("y"===t?-1:1);return o},e.getMaxTickWidth=function(t,e){var n=this;const s=this.owner,a=s.config,r=s.state.current,o=s.$el,c=o.svg,l=o.chart,d=r.maxTickWidths[t];let u=0;if(e||!a["axis_"+t+"_show"]||d.size>0&&0===s.filterTargetsToShow().length)return d.size;if(c){const e=/^y2?$/.test(t),r=s.filterTargetsToShow(s.data.targets),o=s.scale[t].copy().domain(s["get"+(e?"Y":"X")+"Domain"](r,t)),c=o.domain(),h=c[0]===c[1]&&c.every(function(t){return i(this,n),t>0}.bind(this)),g=$(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(function(t){return i(this,n),t>0}.bind(this));if(h||g)return d.size;d.domain=c,e||d.ticks.splice(0);const f=this.getAxis(t,o,!1,!1,!0),p=a["axis_"+t+"_tick_count"];!a["axis_"+t+"_tick_values"]&&p&&f.tickValues(this.generateTickValues(c,p,e?this.isTimeSeriesY():this.isTimeSeries())),e||this.updateXAxisTickValues(r,f);const x=l.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0");f.create(x),x.selectAll("text").each((function(t,i){const n=this.getBoundingClientRect().width;u=Math.max(u,n),e||(d.ticks[i]=n)})),x.remove()}return u>0&&(d.size=u),d.size},e.getXAxisTickTextY2Overflow=function(t){const e=this.owner,i=e.axis,n=e.config,s=e.state,a=e.getAxisTickRotate("x");if((i.isCategorized()||i.isTimeSeries())&&n.axis_x_tick_fit&&!n.axis_x_tick_culling&&!n.axis_x_tick_multiline&&a>0&&a<90){const i=s.current.width-e.getCurrentPaddingLeft(),n=this.getXAxisTickMaxOverflow(a,i-t),r=Math.max(0,n)+t;return Math.min(r,i/2)}return 0},e.getXAxisTickMaxOverflow=function(t,e){const i=this.owner,n=i.axis,s=i.config,a=i.state,r=n.isTimeSeries(),o=a.current.maxTickWidths.x.ticks,c=o.length,l=a.axis.x.padding,d=l.left,u=l.right;let h=0;const g=c-(r&&s.axis_x_tick_fit?.5:0);for(let i=0;i2){const e=this.isCategorized(),s=i-2,r=t[0],o=t[t.length-1];let c;a=[r];for(let t=0;t=h)&&(g=!0,e.preventDefault())}.bind(this);r.on("touchstart",function(n){i(this,t),s.event=n,e.updateEventRect()}.bind(this)).on("touchstart.eventRect touchmove.eventRect",function(n){if(i(this,t),s.event=n,!r.empty()&&r.classed(Rt.eventRect)){if(s.dragging||s.flowing||e.hasArcType()||n.touches.length>1)return;f(n),c(r.node())}else l()}.bind(this),!0).on("touchend.eventRect",function(n){i(this,t),s.event=n,!r.empty()&&r.classed(Rt.eventRect)&&(e.hasArcType()||!e.toggleShape||s.cancelClick)&&s.cancelClick&&(s.cancelClick=!1)}.bind(this),!0),o.on("touchstart",function(e){i(this,t),s.event=e;const n=e.target;n&&n!==r.node()&&l()}.bind(this))},updateEventRect:function(t,e){var n=this;void 0===e&&(e=!1);const s=this.state,a=this.$el,r=s,o=r.eventReceiver,c=r.width,l=r.height,d=r.rendered,u=r.resizing,h=t||a.eventRect,g=function(){i(this,n),o&&(o.rect=h.node().getBoundingClientRect())}.bind(this);(!d||u||e)&&(h.attr("x",0).attr("y",0).attr("width",c).attr("height",l),d&&!e||h.classed(Rt.eventRect,!0)),g()},updateEventRectData:function(){var t=this;const e=this,n=e.config,s=e.scale,a=e.state,r=s.zoom||s.x,o=n.axis_rotated;let c,l,d,u;if(e.isMultipleX())c=0,l=0,d=a.width,u=a.height;else{let n,s;if(e.axis.isCategorized())n=e.getEventRectWidth(),s=function(e){return i(this,t),r(e.x)-n/2}.bind(this);else{const c=function(n){let s=n.index;return i(this,t),{prev:e.getPrevX(s),next:e.getNextX(s)}}.bind(this);n=function(e){var n=this;i(this,t);const s=c(e),l=r.domain();let d;return null===s.prev&&null===s.next?d=o?a.height:a.width:null===s.prev?d=(r(s.next)+r(e.x))/2:null===s.next?d=r(l[1])-(r(s.prev)+r(e.x))/2:(Object.keys(s).forEach(function(t,e){var a;i(this,n),s[t]=null!=(a=s[t])?a:l[e]}.bind(this)),d=Math.max(0,(r(s.next)-r(s.prev))/2)),d}.bind(this),s=function(e){i(this,t);const n=c(e);let s;return s=null===n.prev&&null===n.next?0:null===n.prev?r(r.domain()[0]):(r(e.x)+r(n.prev))/2,s}.bind(this)}c=o?0:s,l=o?s:0,d=o?a.width:n,u=o?n:a.height}const h=a.eventReceiver,g=function(e,n){return i(this,t),k(e)?e(n):e}.bind(this);h.coords.splice(h.data.length),h.data.forEach(function(e,n){i(this,t),h.coords[n]={x:g(c,e),y:g(l,e),w:g(d,e),h:g(u,e)}}.bind(this))},selectRectForSingle:function(t,e){var n=this;const s=this,a=s.config,r=s.$el,o=r.main,c=r.circle,l=a.data_selection_enabled,d=a.data_selection_grouped,u=a.data_selection_isselectable,h=a.tooltip_grouped,g=s.getAllValuesOnIndex(e);if(h&&(s.showTooltip(g,t),null==s.showGridFocus||s.showGridFocus(g),!l||d))return;c||o.selectAll("."+xt.EXPANDED+":not(."+Mt.shape+"-"+e+")").classed(xt.EXPANDED,!1);const f=o.selectAll("."+Mt.shape+"-"+e).classed(xt.EXPANDED,!0).style("cursor",u?"pointer":null).filter((function(t){return s.isWithinShape(this,t)}));f.empty()&&!h&&(null==s.hideGridFocus||s.hideGridFocus(),s.hideTooltip(),d||s.setExpand(e)),f.call(function(a){var r=this;i(this,n);const o=a.data();l&&(d||null!=u&&u.bind(s.api)(o))&&(t.style.cursor="pointer"),h||(s.showTooltip(o,t),null==s.showGridFocus||s.showGridFocus(o),null==s.unexpandCircles||s.unexpandCircles(),a.each(function(t){return i(this,r),s.setExpand(e,t.id)}.bind(this)))}.bind(this))},selectRectForMultipleXs:function(t,e){var n=this;void 0===e&&(e=!0);const s=this,a=s.config,r=s.state,o=s.filterTargetsToShow(s.data.targets);if(r.dragging||s.hasArcType(o))return;const c=H(r.event,t),l=s.findClosestFromTargets(o,c);if(!e||!r.mouseover||l&&l.id===r.mouseover.id||(a.data_onout.call(s.api,r.mouseover),r.mouseover=void 0),!l)return void s.unselectRect();const d=(s.isBubbleType(l)||s.isScatterType(l)||!a.tooltip_grouped?[l]:s.filterByX(o,l.x)).map(function(t){return i(this,n),s.addName(t)}.bind(this));s.showTooltip(d,t),s.setExpand(l.index,l.id,!0),s.showGridFocus(d);const u=s.dist(l,c);(s.isBarType(l.id)||u-1?r.data[s]:null}.bind(this);o.on("mouseover",function(t){i(this,e),a.event=t,n.updateEventRect()}.bind(this)).on("mousemove",(function(e){const i=t(e);if(a.event=e,!i)return;let o=i.index;const c=s.line_step_type;if(s.line_step_tooltipMatch&&n.hasType("step")&&/^step\-(before|after)$/.test(c)){const t=n.scale.zoom||n.scale.x,i=n.axis.xs[o],s=t.invert(H(e,this)[0]);"step-after"===c&&si&&(o+=1)}const l=s.tooltip_grouped&&o===r.currentIdx;a.dragging||a.flowing||n.hasArcType()||l?l&&n.setTooltipPosition():(o!==r.currentIdx&&(n.setOverOut(!1,r.currentIdx),r.currentIdx=o),-1===o?n.unselectRect():n.selectRectForSingle(this,o),n.setOverOut(-1!==o,o))})).on("mouseout",function(t){i(this,e),a.event=t,s&&!n.hasArcType()&&-1!==r.currentIdx&&(n.unselectRect(),n.setOverOut(!1,r.currentIdx),r.currentIdx=-1)}.bind(this))}return o},clickHandlerForSingleX:function(t,e){const i=e,n=i.config,s=i.state,a=i.$el.main;if(!t||i.hasArcType()||s.cancelClick)return void(s.cancelClick&&(s.cancelClick=!1));const r=t.index;a.selectAll("."+Mt.shape+"-"+r).each((function(t){(n.data_selection_grouped||i.isWithinShape(this,t))&&(null==i.toggleShape||i.toggleShape(this,t,r),n.data_onclick.bind(i.api)(t,this))}))},generateEventRectsForMultipleXs:function(t){var e=this;const n=this,s=n.state;t.on("click",(function(t){s.event=t,n.clickHandlerForMultipleXS.bind(this)(n)})),"mouse"===s.inputType&&t.on("mouseover mousemove",(function(t){s.event=t,n.selectRectForMultipleXs(this)})).on("mouseout",function(t){i(this,e),s.event=t,n.config&&!n.hasArcType()&&n.unselectRect()}.bind(this))},clickHandlerForMultipleXS:function(t){const e=t,i=e.config,n=e.state,s=e.filterTargetsToShow(e.data.targets);if(e.hasArcType(s))return;const a=H(n.event,this),r=e.findClosestFromTargets(s,a);r&&(e.isBarType(r.id)||e.dist(r,a)1&&(s=s[n[1]]),null!=(e=s)&&e.size()&&(c[t]=s)}.bind(this)),e.hideGridFocus(),e.setFlowList(c,t)}},setFlowList:function(t,e){var n=this;const s=this,a=e.flow,r=e.targets,o=a,c=o.duration,l=void 0===c?e.duration:c,d=o.index,u=o.length,h=o.orgDataCount,g=s.getFlowTransform(r,h,d,u),f=be();let p;f.add(Object.keys(t).map(function(e){var a=this;return i(this,n),p=t[e].transition().ease(Yi.easeLinear).duration(l),p="axis.x"===e?p.call(function(t){i(this,a),s.axis.x.setTransition(t).create(t)}.bind(this)):"region.list"===e?p.filter(s.isRegionOnX).attr("transform",g):p.attr("transform",g),p}.bind(this))),p.call(f,function(){i(this,n),s.cleanUpFlow(t,e)}.bind(this))},cleanUpFlow:function(t,e){var n=this;const s=this,a=s.config,r=s.state,o=s.$el.svg,c=a.axis_rotated,l=e.flow,d=e.shape,u=e.xv,h=d.pos,g=h.cx,f=h.cy,p=h.xForText,x=h.yForText,b=l,m=b.done,_=void 0===m?function(){i(this,n)}.bind(this):m,v=b.length;v&&(["circle","text","shape","eventRect"].forEach(function(t){i(this,n);const e=[];for(let i=0;i=0?"":h.URL.split("#")[0])+"#"+t+")"},appendClip:function(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath:function(t){const e=this.config,i=this.state,n=i.margin,s=i.width,a=i.height,r=e.axis_rotated,o=Math.max(30,n.left)-(r?0:20),c=r?-(1+o):-(o-1),l=-Math.max(15,n.top),d=r?n.left+20:s+10+o,u=(r?n.top+a+10:n.bottom)+20;t.attr("x",c).attr("y",l).attr("width",d).attr("height",u)},setYAxisClipPath:function(t){var e;const i=this.config,n=this.state,s=n.margin,a=n.width,r=n.height,o=i.axis_rotated,c=Math.max(30,s.left)-(o?20:0),l=i.axis_y_inner,d=l&&!o?i.axis_y_label.text?-20:-1:o?-(1+c):-(c-1),u=-(o?20:s.top),h=(o?a+15+c:s.left+20)+(l?20:0),g=(o?s.bottom+("fit"===(null==(e=i.padding)?void 0:e.mode)?10:0):s.top+r)+10;t.attr("x",d).attr("y",u).attr("width",h).attr("height",g)},updateXAxisTickClip:function(){const t=this,e=t.config,i=t.state,n=i.clip,s=i.xAxisHeight,a=t.$el.defs,r=t.getHorizontalAxisHeight("x");if(a&&!n.idXAxisTickTexts){const e=n.id+"-xaxisticktexts";t.appendClip(a,e),n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts),n.idXAxisTickTexts=e}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&r!==s&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=r},setXAxisTickClipWidth:function(){const t=this,e=t.config,i=t.state.current.maxTickWidths,n=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&n){const e=Math.sin(Math.PI/180*Math.abs(n));i.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/e}else i.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){const t=this.state,e=t.clip,i=t.current,n=this.$el.svg;n&&n.select("#"+e.idXAxisTickTexts+" rect").attr("width",i.maxTickWidths.x.clipPath).attr("height",30)}},Ui=void 0;const Zi=function(t){return i(this,Ui),S(t.position)||"end"}.bind(void 0),qi=function(t){return i(this,Ui),"start"===t.position?4:"middle"===t.position?0:-4}.bind(void 0);function Ki(t,e,n){var s=this;return function(a){i(this,s);let r=t?0:e;return"start"===a.position?r=t?-n:0:"middle"===a.position&&(r=(t?-n:e)/2),r}.bind(this)}function Ji(t,e){"grid"===e&&t.each((function(){var t=this;const e=(0,s.select)(this);["x1","x2","y1","y2"].forEach(function(n){return i(this,t),e.attr(n,Math.ceil(+e.attr(n)))}.bind(this))}))}var Qi={hasGrid:function(){var t=this;const e=this.config;return["x","y"].some(function(n){return i(this,t),e["grid_"+n+"_show"]||e["grid_"+n+"_lines"].length}.bind(this))},initGrid:function(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines:function(){const t=this,e=t.config,i=t.state.clip,n=t.$el;(e.grid_x_lines.length||e.grid_y_lines.length)&&(n.gridLines.main=n.main.insert("g","."+xt.chart+(e.grid_lines_front?" + *":"")).attr("clip-path",i.pathGrid).attr("class",Ot.grid+" "+Ot.gridLines),n.gridLines.main.append("g").attr("class",Ot.xgridLines),n.gridLines.main.append("g").attr("class",Ot.ygridLines),n.gridLines.x=(0,s.selectAll)([]))},updateXGrid:function(t){var e=this;const n=this,a=n.config,r=n.scale,o=n.state,c=n.$el,l=c.main,d=c.grid,u=a.axis_rotated,h=n.generateGridData(a.grid_x_type,r.x),g=n.axis.isCategorized()?n.axis.x.tickOffset():0,f=function(t){return i(this,e),(r.zoom||r.x)(t)+g*(u?-1:1)}.bind(this);o.xgridAttr=u?{x1:0,x2:o.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:o.height},d.x=l.select("."+Ot.xgrids).selectAll("."+Ot.xgrid).data(h),d.x.exit().remove(),d.x=d.x.enter().append("line").attr("class",Ot.xgrid).merge(d.x),t||d.x.each((function(){var t=this;const e=(0,s.select)(this);Object.keys(o.xgridAttr).forEach(function(n){var s=this;i(this,t),e.attr(n,o.xgridAttr[n]).style("opacity",function(){return i(this,s),e.attr(u?"y1":"x1")===(u?o.height:0)?"0":null}.bind(this))}.bind(this))}))},updateYGrid:function(){var t=this;const e=this,n=e.axis,s=e.config,a=e.scale,r=e.state,o=e.$el,c=o.grid,l=o.main,d=s.axis_rotated,u=function(e){return i(this,t),Math.ceil(a.y(e))}.bind(this),h=n.y.getGeneratedTicks(s.grid_y_ticks)||e.scale.y.ticks(s.grid_y_ticks);c.y=l.select("."+Ot.ygrids).selectAll("."+Ot.ygrid).data(h),c.y.exit().remove(),c.y=c.y.enter().append("line").attr("class",Ot.ygrid).merge(c.y),c.y.attr("x1",d?u:0).attr("x2",d?u:r.width).attr("y1",d?0:u).attr("y2",d?r.height:u),Ji(c.y,"grid")},updateGrid:function(){const t=this,e=t.$el,i=e.grid;e.gridLines.main||t.initGridLines(),i.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines:function(t){var e=this;const n=this,a=n.config,r=n.$el,o=r.gridLines,c=r.main,l=n.$T,d=a.axis_rotated;a["grid_"+t+"_show"]&&n["update"+t.toUpperCase()+"Grid"]();let u=c.select("."+Ot[t+"gridLines"]).selectAll("."+Ot[t+"gridLine"]).data(a["grid_"+t+"_lines"]);l(u.exit()).style("opacity","0").remove();const h=u.enter().append("g");h.append("line").style("opacity","0"),u=h.merge(u),u.each((function(t){const e=(0,s.select)(this);e.select("text").empty()&&t.text&&e.append("text").style("opacity","0")})),l(u.attr("class",function(n){return i(this,e),(Ot[t+"gridLine"]+" "+(n.class||"")).trim()}.bind(this)).select("text").attr("text-anchor",Zi).attr("transform",function(){return i(this,e),"x"===t?d?null:"rotate(-90)":d?"rotate(-90)":null}.bind(this)).attr("dx",qi).attr("dy",-5)).text((function(t){var e;return null!=(e=t.text)?e:this.remove()})),o[t]=u},redrawGrid:function(t){const e=this,i=e.config.axis_rotated,n=e.state,s=n.width,a=n.height,r=e.$el.gridLines,o=e.$T,c=e.xv.bind(e),l=e.yv.bind(e);let d=r.x.select("line"),u=r.x.select("text"),h=r.y.select("line"),g=r.y.select("text");return d=o(d,t).attr("x1",i?0:c).attr("x2",i?s:c).attr("y1",i?c:0).attr("y2",i?c:a),u=o(u,t).attr("x",Ki(!i,s,a)).attr("y",c),h=o(h,t).attr("x1",i?l:0).attr("x2",i?l:s).attr("y1",i?0:l).attr("y2",i?a:l),g=o(g,t).attr("x",Ki(i,s,a)).attr("y",l),[d.style("opacity",null),u.style("opacity",null),h.style("opacity",null),g.style("opacity",null)]},initFocusGrid:function(){const t=this,e=t.config,i=t.state.clip,n=t.$el,s=e.grid_front,a="."+(s&&n.gridLines.main?Ot.gridLines:xt.chart)+(s?" + *":""),r=n.main.insert("g",a).attr("clip-path",i.pathGrid).attr("class",Ot.grid);n.grid.main=r,e.grid_x_show&&r.append("g").attr("class",Ot.xgrids),e.grid_y_show&&r.append("g").attr("class",Ot.ygrids),e.interaction_enabled&&e.grid_focus_show&&(r.append("g").attr("class",Et.xgridFocus).append("line").attr("class",Et.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&r.append("g").attr("class",Et.ygridFocus).append("line").attr("class",Et.ygridFocus))},showGridFocus:function(t){var e=this;const n=this,a=n.config,r=n.state,o=r.width,c=r.height,l=a.axis_rotated,d=n.$el.main.selectAll("line."+Et.xgridFocus+", line."+Et.ygridFocus),u=(t||[d.datum()]).filter(function(t){return i(this,e),t&&S(n.getBaseValue(t))}.bind(this));if(!a.tooltip_show||0===u.length||n.hasType("bubble")||n.hasArcType())return;const h=a.grid_focus_edge&&!a.tooltip_grouped,g=n.xx.bind(n);d.style("visibility",null).data(u.concat(u)).each((function(t){var e=this;const a=(0,s.select)(this),r={x:g(t),y:n.getYScaleById(t.id)(t.value)};let d;if(a.classed(Et.xgridFocus))d=l?[null,r.x,h?r.y:o,r.x]:[r.x,h?r.y:null,r.x,c];else{const e="y2"===n.axis.getId(t.id);d=l?[r.y,h&&!e?r.x:null,r.y,h&&e?r.x:c]:[h&&e?r.x:null,r.y,h&&!e?r.x:o,r.y]}["x1","y1","x2","y2"].forEach(function(t,n){return i(this,e),a.attr(t,d[n])}.bind(this))})),Ji(d,"grid"),null==n.showCircleFocus||n.showCircleFocus(t)},hideGridFocus:function(){const t=this,e=t.state,i=e.inputType,n=e.resizing,s=t.$el.main;"mouse"!==i&&n||(s.selectAll("line."+Et.xgridFocus+", line."+Et.ygridFocus).style("visibility","hidden"),null==t.hideCircleFocus||t.hideCircleFocus())},updateGridFocus:function(){const t=this,e=t.state,i=e.inputType,n=e.width,s=e.height,a=e.resizing,r=t.$el.grid.main.select("line."+Et.xgridFocus);if("touch"===i)r.empty()?a&&(null==t.showCircleFocus||t.showCircleFocus()):t.showGridFocus();else{const e=t.config.axis_rotated;r.attr("x1",e?0:-10).attr("x2",e?n:-10).attr("y1",e?-10:0).attr("y2",e?-10:s)}return!0},generateGridData:function(t,e){var n=this;const s=this,a=s.$el.main.select("."+_t.axisX).selectAll(".tick").size();let r=[];if("year"===t){const t=s.getXDomain().map(function(t){return i(this,n),t.getFullYear()}.bind(this)),e=t[0],a=t[1];for(let t=e;t<=a;t++)r.push(new Date(t+"-01-01 00:00:00"))}else r=e.ticks(10),r.length>a&&(r=r.filter(function(t){return i(this,n),(t+"").indexOf(".")<0}.bind(this)));return r},getGridFilterToRemove:function(t){var e=this;return t?function(n){var s=this;i(this,e);let a=!1;return($(t)?t.concat():[t]).forEach(function(t){i(this,s),("value"in t&&n.value===t.value||"class"in t&&n.class===t.class)&&(a=!0)}.bind(this)),a}.bind(this):function(){return i(this,e),!0}.bind(this)},removeGridLines:function(t,e){var n=this;const s=this,a=s.config,r=s.$T,o=s.getGridFilterToRemove(t),c=function(t){return i(this,n),!o(t)}.bind(this),l=e?Ot.xgridLines:Ot.ygridLines,d=e?Ot.xgridLine:Ot.ygridLine;r(s.$el.main.select("."+l).selectAll("."+d).filter(o)).style("opacity","0").remove();const u="grid_"+(e?"x":"y")+"_lines";a[u]=a[u].filter(c)}},tn={initRegion:function(){const t=this.$el;t.region.main=t.main.insert("g",":first-child").attr("clip-path",this.state.clip.path).attr("class",Dt.regions)},updateRegion:function(){const t=this,e=t.config,i=t.$el.region,n=t.$T;i.main||t.initRegion(),i.main.style("visibility",t.hasArcType()?"hidden":null);const a=i.main.selectAll("."+Dt.region).data(e.regions);n(a.exit()).style("opacity","0").remove();const r=a.enter().append("g");r.append("rect").style("fill-opacity","0"),i.list=r.merge(a).attr("class",t.classRegion.bind(t)),i.list.each((function(t){var e;(0,s.select)(this).select("text").empty()&&null!=(e=t.label)&&e.text&&(0,s.select)(this).append("text").style("opacity","0")}))},redrawRegion:function(t){var e=this;const n=this,a=n.$el.region,r=n.$T;let o=a.list.select("rect"),c=a.list.selectAll("text");return o=r(o,t).attr("x",n.regionX.bind(n)).attr("y",n.regionY.bind(n)).attr("width",n.regionWidth.bind(n)).attr("height",n.regionHeight.bind(n)),c=r(c,t).attr("transform",function(t){var s;i(this,e);const a=null!=(s=t.label)?s:{},r=a.x,o=void 0===r?0:r,c=a.y,l=void 0===c?0:c,d=a.rotated,u=void 0!==d&&d;return"translate("+(n.regionX.bind(n)(t)+o)+", "+(n.regionY.bind(n)(t)+l)+")"+(u?" rotate(-90)":"")}.bind(this)).attr("text-anchor",function(t){var n;return i(this,e),null!=(n=t.label)&&n.rotated?"end":null}.bind(this)).attr("dy","1em").style("fill",function(t){var n,s;return i(this,e),null!=(n=null==(s=t.label)?void 0:s.color)?n:null}.bind(this)).text(function(t){var n;return i(this,e),null==(n=t.label)?void 0:n.text}.bind(this)),[o.style("fill-opacity",function(t){return i(this,e),S(t.opacity)?t.opacity:null}.bind(this)).on("end",(function(){(0,s.select)(this.parentNode).selectAll("rect:not([x])").remove()})),c.style("opacity",null)]},getRegionXY:function(t,e){const i=this,n=i.config,s=i.scale,a=n.axis_rotated,r="x"===t;let o,c="start",l=0;return"y"===e.axis||"y2"===e.axis?(r||(c="end"),(r?a:!a)&&c in e&&(o=s[e.axis],l=o(e[c]))):(r?!a:a)&&c in e&&(o=s.zoom||s.x,l=o(i.axis.isTimeSeries()?dt.call(i,e[c]):e[c])),l},regionX:function(t){return this.getRegionXY("x",t)},regionY:function(t){return this.getRegionXY("y",t)},getRegionSize:function(t,e){const i=this,n=i.config,s=i.scale,a=i.state,r=n.axis_rotated,o="width"===t,c=i[o?"regionX":"regionY"](e);let l,d="end",u=a[t];return"y"===e.axis||"y2"===e.axis?(o||(d="start"),(o?r:!r)&&d in e&&(l=s[e.axis],u=l(e[d]))):(o?!r:r)&&d in e&&(l=s.zoom||s.x,u=l(i.axis.isTimeSeries()?dt.call(i,e[d]):e[d])),ur.height/2&&(f=r.height/2)),f+(n.axis.getLabelPositionById(t).isInner?0:10)+("y2"!==t||d?0:-10)},getEventRectWidth:function(){const t=this.config,e=this.axis,i=t.axis_x_inverted,n=e.x.tickInterval();return Math.max(0,i?Math.abs(n):n)},getAxisTickRotate:function(t){const e=this,i=e.axis,n=e.config,s=e.state,a=e.$el;let r=n["axis_"+t+"_tick_rotate"];if("x"===t){const t=i.isCategorized()||i.isTimeSeries();if(n.axis_x_tick_fit&&t){const t=n.axis_x_tick_count,i=s.current.maxTickWidths.x.ticks.length;let a=0;if(t?a=t>i?i:t:i&&(a=i),a!==s.axis.x.tickCount){const t=e.data.targets;s.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")],a)}s.axis.x.tickCount=a}a.svg&&n.axis_x_tick_fit&&!n.axis_x_tick_multiline&&!n.axis_x_tick_culling&&n.axis_x_tick_autorotate&&t&&(r=e.needToRotateXAxisTickTexts()?n.axis_x_tick_rotate:0)}return r},needToRotateXAxisTickTexts:function(){const t=this,e=t.state,i=e.axis,n=e.current.width-t.getCurrentPaddingLeft(!1)-t.getCurrentPaddingRight(),s=i.x.tickCount+i.x.padding.left+i.x.padding.right;return t.axis.getMaxTickWidth("x")>(s?n/s:0)}},nn={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},sn={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]};function an(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function rn(t){for(var e,i=1;i1&&(n.axis_x_categories[t]=e,i.redraw()),n.axis_x_categories[t]},categories:function(t){const e=this.internal,i=e.config;return arguments.length?(i.axis_x_categories=t,e.redraw(),i.axis_x_categories):i.axis_x_categories}},$i,Pi,Ii,Mi,Xi],ln=[ji,Wi,Vi,Hi,Qi,tn,en],dn=[{data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},on,{grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0}];var un=p(12);function hn(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function gn(t){for(var e,i=1;i360&&(e=2),e*Math.PI},getGaugeStartAngle:function(){const t=this.config,e=t.gauge_fullCircle,i=-1*Math.PI/2,n=Math.PI/2;let s=t.gauge_startingAngle;return!e&&s<=i?s=i:!e&&s>=n?s=n:(s>Math.PI||s<-1*Math.PI)&&(s=Math.PI),s},updateAngle:function(t){var e=this;const n=this,s=n.config,a=n.state;let r=n.pie,o=t,c=!1;if(!s)return null;const l=n.getGaugeStartAngle(),d=s.gauge_fullCircle?n.getArcLength():-2*l;if(o.data&&n.isGaugeType(o.data)&&!n.hasMultiArcGauge()){const t=s.gauge_min,e=s.gauge_max,i=n.getTotalDataSum(a.rendered);r=r.startAngle(l).endAngle(d*((i-t)/(e-t))+l)}if(r(n.filterTargetsToShow()).forEach(function(t,n){var s;i(this,e),c||t.data.id!==(null==(s=o.data)?void 0:s.id)||(c=!0,o=t,o.index=n)}.bind(this)),isNaN(o.startAngle)&&(o.startAngle=0),isNaN(o.endAngle)&&(o.endAngle=o.startAngle),o.data&&n.hasMultiArcGauge()){const t=s.gauge_min,e=s.gauge_max,i=o.value1){var c;let a=n.getRadius(t).outerRadius;n.hasType("polar")&&(a=n.getPolarOuterRadius(t,a));const l=this.svgArc.centroid(r).map(function(t){return i(this,e),isNaN(t)?0:t}.bind(this)),d=l[0],u=l[1],h=Math.sqrt(d*d+u*u);let g=null==(c=["donut","pie","polar"].filter(n.hasType.bind(n)).map(function(t){return i(this,e),s[t+"_label_ratio"]}.bind(this)))?void 0:c[0];g=g?k(g)?g.bind(n.api)(t,a,h):g:a&&(h?(36/a>.375?1.175-36/a:.8)*a/h:0),o="translate("+d*g+","+u*g+")"}return o},convertToArcData:function(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function(t){const e=this,i=e.hasType("gauge");e.shouldShowArcLabel()&&t.style("fill",e.updateTextColor.bind(e)).attr("filter",e.updateTextBacgroundColor.bind(e)).each((function(t){var n;const a=(0,s.select)(this),r=e.updateAngle(t),o=e.getRatio("arc",r);if(e.meetsLabelThreshold(o,null==(n=["donut","gauge","pie","polar"].filter(e.hasType.bind(e)))?void 0:n[0])){const n=(r||t).value;V(a,(e.getArcLabelFormat()||e.defaultArcValueFormat)(n,o,t.data.id).toString(),[-1,1],i)}else a.text("")}))},expandArc:function(t){var e=this;const n=this,a=n.state.transiting,r=n.$el;if(a){const s=setInterval(function(){i(this,e),a||(clearInterval(s),r.legend.selectAll("."+Et.legendItemFocused).size()>0&&n.expandArc(t))}.bind(this),10);return}const o=n.mapToTargetIds(t);r.svg.selectAll(n.selectorTargets(o,"."+bt.chartArc)).each((function(t){if(!n.shouldExpand(t.data.id))return;const e=n.getExpandConfig(t.data.id,"duration"),i=n.getSvgArcExpanded(n.getExpandConfig(t.data.id,"rate"));(0,s.select)(this).selectAll("path").transition().duration(e).attrTween("d",pn(n.svgArcExpanded.bind(n))).transition().duration(2*e).attrTween("d",pn(i.bind(n)))}))},unexpandArc:function(t){var e=this;const n=this,s=n.state.transiting,a=n.$el.svg;if(s)return;const r=n.mapToTargetIds(t);a.selectAll(n.selectorTargets(r,"."+bt.chartArc)).selectAll("path").transition().duration(function(t){return i(this,e),n.getExpandConfig(t.data.id,"duration")}.bind(this)).attrTween("d",pn(n.svgArc.bind(n))),a.selectAll(""+bt.arc).style("opacity",null)},getExpandConfig:function(t,e){const i=this,n=i.config;let s;return i.isDonutType(t)?s="donut":i.isGaugeType(t)?s="gauge":i.isPieType(t)&&(s="pie"),s?n[s+"_expand_"+e]:{duration:50,rate:.98}[e]},shouldExpand:function(t){const e=this,i=e.config;return e.isDonutType(t)&&i.donut_expand||e.isGaugeType(t)&&i.gauge_expand||e.isPieType(t)&&i.pie_expand},shouldShowArcLabel:function(){var t=this;const e=this,n=e.config;return["donut","gauge","pie","polar"].some(function(s){return i(this,t),e.hasType(s)&&n[s+"_label_show"]}.bind(this))},getArcLabelFormat:function(){var t=this;const e=this,n=e.config;let s=function(e){return i(this,t),e}.bind(this);return["donut","gauge","pie","polar"].filter(e.hasType.bind(e)).forEach(function(e){i(this,t),s=n[e+"_label_format"]}.bind(this)),k(s)?s.bind(e.api):s},updateTargetsForArc:function(t){var e=this;const n=this,s=n.$el,a=n.hasType("gauge"),r=n.getChartClass("Arc"),o=n.getClass("arcs",!0),c=n.classFocus.bind(n),l=s.main.select("."+bt.chartArcs),d=l.selectAll("."+bt.chartArc).data(n.pie(t)).attr("class",function(t){return i(this,e),r(t)+c(t.data)}.bind(this)),u=d.enter().append("g").attr("class",r).call(this.setCssRule(!1,"."+bt.chartArcs+" text",["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",o).merge(d),u.append("text").attr("dy",a&&!n.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor",n.getStylePropValue("middle")).style("pointer-events",n.getStylePropValue("none")),s.text=l.selectAll("."+xt.target+" text")},initArc:function(){const t=this,e=t.$el;e.arcs=e.main.select("."+xt.chart).append("g").attr("class",bt.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle:function(t){const e=this,i=t||e.getArcTitle(),n=e.hasType("gauge");if(i){const t=n?St.chartArcsGaugeTitle:bt.chartArcsTitle;let s=e.$el.arcs.select("."+t);s.empty()&&(s=e.$el.arcs.append("text").attr("class",t).style("text-anchor","middle")),n&&s.attr("dy","-0.3em"),V(s,i,n?void 0:[-.6,1.35],!0)}},getArcTitle:function(){const t=this,e=t.hasType("donut")?"donut":t.hasType("gauge")&&"gauge";return e?t.config[e+"_title"]:""},getArcTitleWithNeedleValue:function(){const t=this,e=t.config,i=t.state,n=t.getArcTitle();if(n&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(n)){let t=i.current.needle;return R(t)||(t=e.arc_needle_value),lt(n,{NEEDLE_VALUE:R(t)?t:0})}return!1},redrawArc:function(t,e,n){var a=this;const r=this,o=r.config,c=r.state,l=r.$el.main,d=o.interaction_enabled,u=d&&o.data_selection_isselectable;let h=l.selectAll("."+bt.arcs).selectAll("."+bt.arc).data(r.arcData.bind(r));h.exit().transition().duration(e).style("opacity","0").remove(),h=h.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",function(t){return i(this,a),r.color(t.data)}.bind(this)).style("cursor",function(t){return i(this,a),null!=u&&null!=u.bind&&u.bind(r.api)(t)?"pointer":null}.bind(this)).style("opacity","0").each((function(t){r.isGaugeType(t.data)&&(t.startAngle=o.gauge_startingAngle,t.endAngle=o.gauge_startingAngle),this._current=t})).merge(h),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawMultiArcGauge()),h.attr("transform",function(t){return i(this,a),!r.isGaugeType(t.data)&&n?"scale(0)":""}.bind(this)).style("opacity",(function(t){return t===this._current?"0":null})).each(function(){i(this,a),c.transiting=!0}.bind(this)).transition().duration(t).attrTween("d",(function(t){var e=this;const n=r.updateAngle(t);if(!n)return function(){return i(this,e),"M 0 0"}.bind(this);isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const s=(0,un.interpolate)(this._current,n);return this._current=s(0),function(e){const i=s(e);return i.data=t.data,r.getArc(i,!0)}})).attr("transform",n?"scale(1)":"").style("fill",function(t){let e;return i(this,a),r.levelColor?(e=r.levelColor(t.data.values[0].value),o.data_colors[t.data.id]=e):e=r.color(t.data),e}.bind(this)).style("opacity",null).call(j,(function(){if(r.levelColor){const t=(0,s.select)(this),e=t.datum(this._current);r.updateLegendItemColor(e.data.id,t.style("fill"))}c.transiting=!1,N(o.onrendered,r.api)})),d&&r.bindArcEvent(h),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),o.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t)},redrawNeedle:function(){var t=this;const e=this,n=e.$el,s=e.config,a=e.state,r=a.hiddenTargetIds,o=(a.radius-1)/100*s.arc_needle_length,c=r.length!==e.data.targets.length;let l=e.$el.arcs.select("."+bt.needle);const d=s.arc_needle_path,u=s.arc_needle_bottom_width/2,h=s.arc_needle_top_width/2,g=s.arc_needle_top_rx,f=s.arc_needle_top_ry,p=s.arc_needle_bottom_len,x=s.arc_needle_bottom_rx,b=s.arc_needle_bottom_ry,m=e.getNeedleAngle(),_=function(){i(this,t);const n=e.getArcTitleWithNeedleValue();n&&e.setArcTitle(n)}.bind(this);if(_(),l.empty()&&(l=n.arcs.append("path").classed(bt.needle,!0),n.needle=l,n.needle.updateHelper=function(a,r){var o=this;void 0===r&&(r=!1),i(this,t),"none"!==n.needle.style("display")&&e.$T(n.needle).style("transform","rotate("+e.getNeedleAngle(a)+"deg)").call(j,function(){i(this,o),r&&(s.arc_needle_value=a),_()}.bind(this))}.bind(this)),c){const t=k(d)?d.call(e,o):"M-"+u+" "+p+" A"+x+" "+b+" 0 0 0 "+u+" "+p+" L"+h+" -"+o+" A"+g+" "+f+" 0 0 0 -"+h+" -"+o+" L-"+u+" "+p+" Z";e.$T(l).attr("d",t).style("fill",s.arc_needle_color).style("display",null).style("transform","rotate("+m+"deg)")}else l.style("display","none")},getNeedleAngle:function(t){const e=this,i=e.config,n=e.state,s=e.getArcLength(),a=e.hasType("gauge"),r=e.getTotalDataSum(!0);let o=O(t)?t:i.arc_needle_value,c=i[i.data_type+"_startingAngle"]||0,l=0;if(R(o)||(o=a&&1===e.data.targets.length?r:0),n.current.needle=o,a){c=e.getGaugeStartAngle();const t=i.gauge_fullCircle?s:-2*c,n=i.gauge_min;l=t*((o-n)/(i.gauge_max-n))}else l=s*(o/r);return(c+l)*(180/Math.PI)},redrawBackgroundArcs:function(){var t=this;const e=this,n=e.config,s=e.state,a=e.hasMultiArcGauge(),r=n.gauge_fullCircle,o=0===e.filterTargetsToShow(e.data.targets).length&&!!n.data_empty_label_text,c=e.getGaugeStartAngle(),l=r?c+e.getArcLength():-1*c;let d=e.$el.arcs.select((a?"g":"")+"."+bt.chartArcsBackground);if(a){let a=0;d=d.selectAll("path."+bt.chartArcsBackground).data(e.data.targets),d.enter().append("path").attr("class",function(e,n){return i(this,t),bt.chartArcsBackground+" "+bt.chartArcsBackground+"-"+n}.bind(this)).merge(d).style("fill",n.gauge_background||null).attr("d",function(r){let d=r.id;if(i(this,t),o||s.hiddenTargetIds.indexOf(d)>=0)return"M 0 0";const u={data:[{value:n.gauge_max}],startAngle:c,endAngle:l,index:a++};return e.getArc(u,!0,!0)}.bind(this)),d.exit().remove()}else d.attr("d",o?"M 0 0":function(){i(this,t);const s={data:[{value:n.gauge_max}],startAngle:c,endAngle:l};return e.getArc(s,!0,!0)}.bind(this))},bindArcEvent:function(t){var e=this;const n=this,a=n.config,r=n.state,o="touch"===r.inputType,c="mouse"===r.inputType;function l(t,e,i){n.expandArc(i),n.api.focus(i),n.toggleFocusLegend(i,!0),n.showTooltip([e],t)}function d(t){const e=(null==t?void 0:t.id)||void 0;n.unexpandArc(e),n.api.revert(),n.revertLegend(),n.hideTooltip()}if(t.on("click",(function(t,e,i){const s=n.updateAngle(e);let r;s&&(r=n.convertToArcData(s),null==n.toggleShape||n.toggleShape(this,r,i),a.data_onclick.bind(n.api)(r,this))})),c&&t.on("mouseover",(function(t,e){var i;if(r.transiting)return;r.event=t;const s=n.updateAngle(e),a=s?n.convertToArcData(s):null;l(this,a,(null==(i=a)?void 0:i.id)||void 0),n.setOverOut(!0,a)})).on("mouseout",function(t,s){if(i(this,e),r.transiting)return;r.event=t;const a=n.updateAngle(s),o=a?n.convertToArcData(a):null;d(),n.setOverOut(!1,o)}.bind(this)).on("mousemove",(function(t,e){const i=n.updateAngle(e),s=i?n.convertToArcData(i):null;r.event=t,n.showTooltip([s],this)})),o&&n.hasArcType()&&!n.radars){const t=function(t){i(this,e);const n=t.changedTouches[0];return(0,s.select)(h.elementFromPoint(n.clientX,n.clientY))}.bind(this);n.$el.svg.on("touchstart touchmove",(function(e){var i,s;if(r.transiting)return;r.event=e;const a=t(e).datum(),o=null!=(i=a)&&i.data&&a.data.id?n.updateAngle(a):null,c=o?n.convertToArcData(o):null,u=(null==(s=c)?void 0:s.id)||void 0;n.callOverOutForTouch(c),E(u)?d():l(this,c,u)}))}},redrawArcText:function(t){var e=this;const n=this,s=n.config,a=n.state,r=n.$el,o=r.main,c=r.arcs,l=n.hasType("gauge"),d=n.hasMultiArcGauge();let u;if(l&&1===n.data.targets.length&&s.gauge_title||(u=o.selectAll("."+bt.chartArc).select("text").style("opacity","0").attr("class",function(t){return i(this,e),n.isGaugeType(t.data)?St.gaugeValue:null}.bind(this)).call(n.textForArcLabel.bind(n)).attr("transform",n.transformForArcLabel.bind(n)).style("font-size",function(t){return i(this,e),n.isGaugeType(t.data)&&1===n.data.targets.length&&!d?Math.round(a.radius/5)+"px":null}.bind(this)).transition().duration(t).style("opacity",function(t){return i(this,e),n.isTargetToShow(t.data.id)&&n.isArcType(t.data)?null:"0"}.bind(this)),d&&u.attr("dy","-.1em")),o.select("."+bt.chartArcsTitle).style("opacity",n.hasType("donut")||l?null:"0"),l){var h;const t=s.gauge_fullCircle;t&&(null==(h=u)||h.attr("dy",""+(d?0:Math.round(a.radius/14)))),s.gauge_label_show&&(c.select("."+St.chartArcsGaugeUnit).attr("dy",(t?1.5:.75)+"em").text(s.gauge_units),c.select("."+St.chartArcsGaugeMin).attr("dx",-1*(a.innerRadius+(a.radius-a.innerRadius)/(t?1:2))+"px").attr("dy","1.2em").text(n.textForGaugeMinMax(s.gauge_min,!1)),t||c.select("."+St.chartArcsGaugeMax).attr("dx",a.innerRadius+(a.radius-a.innerRadius)/2+"px").attr("dy","1.2em").text(n.textForGaugeMinMax(s.gauge_max,!0)))}},getArcElementByIdOrIndex:function(t){var e=this;const n=this.$el.arcs,s=R(t)?function(n){return i(this,e),n.index===t}.bind(this):function(n){return i(this,e),n.data.id===t}.bind(this);return null==n?void 0:n.selectAll("."+xt.target+" path").filter(s)}},bn={initArea:function(t){const e=this.config;t.insert("g","."+(e.area_front?Tt.circles:Ct.lines)).attr("class",this.getClass("areas",!0))},updateAreaColor:function(t){const e=this;return e.config.area_linearGradient?e.getGradienColortUrl(t.id):e.color(t)},updateArea:function(t,e){void 0===e&&(e=!1);const i=this,n=i.config,a=i.state,r=i.$el,o=i.$T,c=e?r.subchart:r;n.area_linearGradient&&i.updateLinearGradient();const l=c.main.selectAll("."+mt.areas).selectAll("."+mt.area).data(i.lineData.bind(i));o(l.exit(),t).style("opacity","0").remove(),c.area=l.enter().append("path").attr("class",i.getClass("area",!0)).style("fill",i.updateAreaColor.bind(i)).style("opacity",(function(){return a.orgAreaOpacity=(0,s.select)(this).style("opacity"),"0"})).merge(l),l.style("opacity",a.orgAreaOpacity),i.setRatioForGroupedData(c.area.data())},redrawArea:function(t,e,n){var s=this;void 0===n&&(n=!1);const a=this,r=(n?this.$el.subchart:this.$el).area,o=a.state.orgAreaOpacity;return[a.$T(r,e,Z()).attr("d",t).style("fill",a.updateAreaColor.bind(a)).style("opacity",function(t){return i(this,s),(a.isAreaRangeType(t)?o/1.75:o)+""}.bind(this))]},generateDrawArea:function(t,e){var n=this;const s=this,a=s.config,r=a.line_connectNull,o=a.axis_rotated,c=s.generateGetAreaPoints(t,e),l=s.getYScaleById.bind(s),d=function(t){return i(this,n),(e?s.subxx:s.xx).call(s,t)}.bind(this),u=function(t,a){return i(this,n),s.isGrouped(t.id)?c(t,a)[0][1]:l(t.id,e)(s.isAreaRangeType(t)?s.getRangedData(t,"high"):s.getShapeYMin(t.id))}.bind(this),h=function(t,a){return i(this,n),s.isGrouped(t.id)?c(t,a)[1][1]:l(t.id,e)(s.isAreaRangeType(t)?s.getRangedData(t,"low"):t.value)}.bind(this);return function(t){var e=this;i(this,n);let c,l=r?s.filterRemoveNull(t.values):t.values,g=0,f=0;if(s.isAreaType(t)){let n=(0,Ue.area)();n=o?n.y(d).x0(u).x1(h):n.x(d).y0(a.area_above?0:a.area_below?s.state.height:u).y1(h),r||(n=n.defined(function(t){return i(this,e),null!==s.getBaseValue(t)}.bind(this))),s.isStepType(t)&&(l=s.convertValuesToStep(l)),c=n.curve(s.getCurve(t))(l)}else l[0]&&(g=s.scale.x(l[0].x),f=s.getYScaleById(t.id)(l[0].value)),c=o?"M "+f+" "+g:"M "+g+" "+f;return c||"M 0 0"}.bind(this)},generateGetAreaPoints:function(t,e){const i=this,n=i.config,s=i.getShapeX(0,t,e),a=i.getShapeY(!!e),r=i.getShapeOffset(i.isAreaType,t,e),o=i.getYScaleById.bind(i);return function(t,c){const l=o.call(i,t.id,e)(i.getShapeYMin(t.id)),d=r(t,c)||l,u=s(t),h=t.value;let g=a(t);return n.axis_rotated&&(h>0&&g0?function(){return i(this,n),c}.bind(this):R(l)?function(t){return i(this,n),t*l}.bind(this):null;return function(t,e){i(this,n);const c=r(t,e),l=+o,u=+!l,h=t.value<0,g=a["axis_"+s.axis.getId(t.id)+"_inverted"],f=!g&&h||g&&!h,p=["",""];let x=0;const b=s.isGrouped(t.id),m=!(!d||!b)&&s.isStackingRadiusData(t);if(d){const t=o?u:l,e=c[2][t]-c[0][t];x=!b||m?d(e):0;const i="a"+x+","+x+" "+(f?"1 0 0":"0 0 1")+" ";p[+!o]=""+i+x+","+x,p[+o]=""+i+[-x,x][o?"sort":"reverse"](),f&&p.reverse()}const _=o?"H"+(c[1][l]+(f?x:-x))+" "+p[0]+"V"+(c[2][u]-x)+" "+p[1]+"H"+c[3][l]:"V"+(c[1][u]+(f?-x:x))+" "+p[0]+"H"+(c[2][l]-x)+" "+p[1]+"V"+c[3][u];return"M"+c[0][l]+","+c[0][u]+_+"z"}.bind(this)},isStackingRadiusData:function(t){var e=this;const n=this,s=n.$el,a=n.config,r=n.data,o=n.state,c=t.id,l=t.index,d=t.value;if(o.hiddenTargetIds.indexOf(c)>-1){const t=s.bar.filter(function(t){return i(this,e),t.id===c&&t.value===d}.bind(this));return!t.empty()&&/a\d+/i.test(t.attr("d"))}const u=a.data_groups.find(function(t){return i(this,e),t.indexOf(c)>-1}.bind(this)),h=n.orderTargets(n.filterTargetsToShow(r.targets.filter(n.isBarType,n))).filter(function(t){return i(this,e),u.indexOf(t.id)>-1}.bind(this)).map(function(t){var n=this;return i(this,e),t.values.filter(function(t){return i(this,n),t.index===l&&(R(d)&&d>0?t.value>0:t.value<0)}.bind(this))[0]}.bind(this)).filter(Boolean).map(function(t){return i(this,e),t.id}.bind(this));return 0!==d&&h.indexOf(c)===h.length-1},generateGetBarPoints:function(t,e){var n=this;const s=this,a=s.config,r=e?s.axis.subX:s.axis.x,o=s.getIndicesMax(t)+1,c=s.getBarW("bar",r,o),l=s.getShapeX(c,t,!!e),d=s.getShapeY(!!e),u=s.getShapeOffset(s.isBarType,t,!!e),h=s.getYScaleById.bind(s);return function(t,r){i(this,n);const o=t.id,g=h.call(s,o,e)(s.getShapeYMin(o)),f=u(t,r)||g,p=R(c)?c:c[t.id]||c._$width,x=a["axis_"+s.axis.getId(o)+"_inverted"],b=t.value,m=l(t);let _=d(t);a.axis_rotated&&!x&&(b>0&&_0&&i.start=e.open),e||null}},yn={initGauge:function(){var t=this;const e=this,n=e.config,s=e.$el.arcs,a=function(e){i(this,t),s.append("text").attr("class",e).style("text-anchor","middle").style("pointer-events","none")}.bind(this);if(e.hasType("gauge")){const t=e.hasMultiArcGauge();s.append(t?"g":"path").attr("class",bt.chartArcsBackground).style("fill",!t&&n.gauge_background||null),n.gauge_units&&a(St.chartArcsGaugeUnit),n.gauge_label_show&&(a(St.chartArcsGaugeMin),n.gauge_fullCircle||a(St.chartArcsGaugeMax))}},updateGaugeMax:function(){const t=this,e=t.config,i=t.state,n=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(i.rendered);n+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=n-e.gauge_min)},redrawMultiArcGauge:function(){var t=this;const e=this,n=e.config,a=e.state,r=e.$el,o=e.state.hiddenTargetIds,c=r.main.selectAll("."+bt.arcs).selectAll("."+bt.arcLabelLine).data(e.arcData.bind(e));c.enter().append("rect").attr("class",function(e){return i(this,t),bt.arcLabelLine+" "+xt.target+" "+xt.target+"-"+e.data.id}.bind(this)).merge(c).style("fill",function(n){return i(this,t),e.levelColor?e.levelColor(n.data.values[0].value):e.color(n.data)}.bind(this)).style("display",n.gauge_label_show?null:"none").each((function(t){let i=0,n=0,r=0,c="";if(o.indexOf(t.data.id)<0){const s=e.updateAngle(t),o=a.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length*(s.index+1),l=s.endAngle-Math.PI/2,d=a.radius-o,u=l-(0===d?0:1/d);i=a.radiusExpanded-a.radius+o,n=Math.cos(u)*d,r=Math.sin(u)*d,c="rotate("+180*l/Math.PI+", "+n+", "+r+")"}(0,s.select)(this).attr("x",n).attr("y",r).attr("width",i).attr("height",2).attr("transform",c).style("stroke-dasharray","0, "+(i+2)+", 0")}))},textForGaugeMinMax:function(t,e){const i=this.config.gauge_label_extents;return k(i)?i.bind(this.api)(t,e):t},getGaugeLabelHeight:function(){const t=this.config;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge:function(){return this.getGaugeLabelHeight()*(this.config.gauge_label_show?2:2.5)}},Tn={initBubble:function(){const t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle")},getBaseLength:function(){const t=this,e=t.state,i=e.width,n=e.height,s=se;let a=t.cache.get(s);return a||t.cache.add(s,a=rt("min",[i,n])),a},getBubbleR:function(t){var e=this;const n=this;let s=n.config.bubble_maxR;k(s)?s=s.bind(n.api)(t):R(s)||(s=n.getBaseLength()/(2*n.getMaxDataCount())+12);const a=rt("max",n.getMinMaxData().max.map(function(t){return i(this,e),n.isBubbleZType(t)?n.getBubbleZData(t.value,"y"):F(t.value)?t.value.mid:t.value}.bind(this))),r=s*s*Math.PI,o=(n.isBubbleZType(t)?n.getBubbleZData(t.value,"z"):t.value)*(r/a);return Math.sqrt(o/Math.PI)},getBubbleZData:function(t,e){return F(t)?t[e]:t["y"===e?0:1]}},wn={initLine:function(){const t=this.$el;t.line=t.main.select("."+xt.chart).append("g").attr("class",Ct.chartLines).call(this.setCssRule(!1,"."+Ct.chartLines,["pointer-events:none"]))},updateTargetsForLine:function(t){var e=this;const n=this,s=n.$el,a=s.area,r=s.line,o=s.main,c=n.getChartClass("Line"),l=n.getClass("lines",!0),d=n.classFocus.bind(n);r||n.initLine();const u=t.filter(function(t){return i(this,e),!(n.isScatterType(t)||n.isBubbleType(t))}.bind(this)),h=o.select("."+Ct.chartLines).selectAll("."+Ct.chartLine).data(u).attr("class",function(t){return i(this,e),c(t)+d(t)}.bind(this)),g=h.enter().append("g").attr("class",c).style("opacity","0").style("pointer-events",n.getStylePropValue("none"));if(g.append("g").attr("class",l),n.hasTypeOf("Area")){const t=(!a&&g.empty()?h:g).filter(n.isAreaType.bind(n));n.initArea(t)}n.updateTargetForCircle(u,g)},updateLine:function(t,e){var n=this;void 0===e&&(e=!1);const s=this,a=s.format.extraLineClasses,r=s.$el,o=s.$T,c=e?r.subchart:r,l=c.main.selectAll("."+Ct.lines).selectAll("."+Ct.line).data(s.lineData.bind(s));o(l.exit(),t).style("opacity","0").remove(),c.line=l.enter().append("path").attr("class",function(t){return i(this,n),s.getClass("line",!0)(t)+" "+(a(t)||"")}.bind(this)).style("stroke",s.color).merge(l).style("opacity",s.initialOpacity.bind(s)).attr("transform",null)},redrawLine:function(t,e,i){void 0===i&&(i=!1);const n=this.$el;return[(0,this.$T)((i?n.subchart:n).line,e,Z()).attr("d",t).style("stroke",this.color).style("opacity",null)]},getCurve:function(t){var e=this;const n=this;return n.config.axis_rotated&&n.isStepType(t)?function(s){i(this,e);const a=n.getInterpolate(t)(s);return a.orgPoint=a.point,a.pointRotated=function(t,e){1===this._point&&(this._point=2);const i=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,i),this._context.lineTo(t,i),this._x=t,this._y=e},a.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},a}.bind(this):n.getInterpolate(t)},generateDrawLine:function(t,e){var n=this;const s=this,a=s.config,r=s.scale,o=a.line_connectNull,c=a.axis_rotated,l=s.generateGetLinePoints(t,e),d=s.getYScaleById.bind(s),u=function(t){return i(this,n),(e?s.subxx:s.xx).call(s,t)}.bind(this),h=function(t,a){return i(this,n),s.isGrouped(t.id)?l(t,a)[0][1]:d(t.id,e)(s.getBaseValue(t))}.bind(this);let g=(0,Ue.line)();g=c?g.x(h).y(u):g.x(u).y(h),o||(g=g.defined(function(t){return i(this,n),null!==s.getBaseValue(t)}.bind(this)));const f=e?r.subX:r.x;return function(t){i(this,n);const l=d(t.id,e);let u,h=o?s.filterRemoveNull(t.values):t.values,p=0,x=0;if(s.isLineType(t)){const e=a.data_regions[t.id];e?u=s.lineWithRegions(h,r.zoom||f,l,e):(s.isStepType(t)&&(h=s.convertValuesToStep(h)),u=g.curve(s.getCurve(t))(h))}else h[0]&&(p=f(h[0].x),x=l(h[0].value)),u=c?"M "+x+" "+p:"M "+p+" "+x;return u||"M 0 0"}.bind(this)},lineWithRegions:function(t,e,n,s){var a=this;const r=this,o=r.config.axis_rotated,c=r.axis.isTimeSeries(),l=[];let d,u,h,g;if(O(s)){const e=function(t,e){return i(this,a),E(t)?e:c?dt.call(r,t):t}.bind(this);for(let i,n=0;i=s[n];n++){const s=e(i.start,t[0].x),a=e(i.end,t[t.length-1].x),r=i.style||{dasharray:"2 2"};l[n]={start:s,end:a,style:r}}}const f=o?function(t){return i(this,a),n(t.value)}.bind(this):function(t){return i(this,a),e(t.x)}.bind(this),p=o?function(t){return i(this,a),e(t.x)}.bind(this):function(t){return i(this,a),n(t.value)}.bind(this),x=function(t){return i(this,a),"M"+t[0][0]+","+t[0][1]+"L"+t[1][0]+","+t[1][1]}.bind(this),b=c?function(t,s,r,c){i(this,a);const l=t.x.getTime(),d=s.x-t.x,g=new Date(l+d*r),f=new Date(l+d*(r+c)),p=o?[[n(u(r)),e(g)],[n(u(r+h)),e(f)]]:[[e(g),n(u(r))],[e(f),n(u(r+h))]];return x(p)}.bind(this):function(t,s,r,c){i(this,a);const l=o?[[n(u(r),!0),e(d(r))],[n(u(r+c),!0),e(d(r+c))]]:[[e(d(r),!0),n(u(r))],[e(d(r+c),!0),n(u(r+c))]];return x(l)}.bind(this),m={x:r.axis.getAxisType("x"),y:r.axis.getAxisType("y")};let _="";for(let i,s=0;i=t[s];s++){const a=t[s-1],o=a&&S(a.value);let c=r.isWithinRegions(i.x,l);if(S(i.value))if(!E(l)&&c&&o){if(o){try{c=c.dasharray.split(" ")}catch(t){c="2 2".split(" ")}d=He(m.x,a.x,i.x),u=He(m.y,a.value,i.value);const t=e(i.x)-e(a.x),s=n(i.value)-n(a.value),r=Math.sqrt(Math.pow(t,2)+Math.pow(s,2));h=c[0]/r,g=h*c[1];for(let t=h;t<=1;t+=g)_+=b(a,i,t,h),t+g>=1&&(_+=b(a,i,1,0))}}else _+=(s&&o?"L":"M")+f(i)+","+p(i)}return _},isWithinRegions:function(t,e){for(let i,n=0;i=e[n];n++)if(i.start-1?"0":null})),l&&h.forEach(function(t){var e=this;i(this,n),c.main.selectAll("."+zt.selectedCircles+a.getTargetSelectorSuffix(t.id)).selectAll(""+zt.selectedCircle).each(function(n){i(this,e),n.value=t.values[n.index].value}.bind(this))}.bind(this))},updateCircle:function(t){var e=this;void 0===t&&(t=!1);const n=this,s=n.config,a=n.state,r=n.$el,o=s.point_focus_only,c=t?r.subchart:r;if(s.point_show&&!a.toggling){const t=c.main.selectAll("."+Tt.circles).selectAll("."+Tt.circle).data(function(t){return i(this,e),n.isLineType(t)&&n.shouldDrawPointsForLine(t)||n.isBubbleType(t)||n.isRadarType(t)||n.isScatterType(t)?o?[t.values[0]]:t.values:[]}.bind(this));t.exit().remove(),t.enter().filter(Boolean).append(n.point("create",this,n.pointR.bind(n),n.getStylePropValue(n.color))),c.circle=c.main.selectAll("."+Tt.circles+" ."+Tt.circle).style("stroke",n.getStylePropValue(n.color)).style("opacity",n.initialOpacityForCircle.bind(n))}},redrawCircle:function(t,e,i,n,s){void 0===s&&(s=!1);const a=this,r=a.state.rendered,o=a.$el,c=a.$T,l=s?o.subchart:o,d=l.main.selectAll("."+zt.selectedCircle);if(!a.config.point_show)return[];const u=a.point("update",a,t,e,a.getStylePropValue(a.color),i,n,d),h=a.isCirclePoint()?"c":"",g=Z(),f=a.opacityForCircle.bind(a),p=[];return l.circle.each((function(t){let e=u.bind(this)(t);e=c(e,i||!r,g).style("opacity",f),p.push(e)})),[p,c(d,i).attr(h+"x",t).attr(h+"y",e)]},showCircleFocus:function(t){const e=this,n=e.config,a=e.state,r=a.hasRadar,o=a.resizing,c=a.toggling,l=a.transiting;let d=e.$el.circle;if(!1===l&&n.point_focus_only&&d){const n=(r?e.radarCircleX:e.circleX).bind(e),a=(r?e.radarCircleY:e.circleY).bind(e),l=c||E(t),u=e.point("update",e,n,a,e.getStylePropValue(e.color),!o&&l);t&&(d=d.filter((function(e){var n=this;const a=null==t.filter?void 0:t.filter(function(t){return i(this,n),t.id===e.id}.bind(this));return!!a.length&&(0,s.select)(this).datum(a[0])}))),d.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each((function(t){const i=t.id,n=t.index,s=t.value;let a="hidden";S(s)&&(u.bind(this)(t),e.expandCircles(n,i),a=""),this.style.visibility=a}))}},hideCircleFocus:function(){const t=this,e=t.config,i=t.$el.circle;e.point_focus_only&&i&&(t.unexpandCircles(),i.style("visibility","hidden"))},circleX:function(t){return this.xx(t)},updateCircleY:function(t){var e=this;void 0===t&&(t=!1);const n=this,s=n.generateGetLinePoints(n.getShapeIndices(n.isLineType),t);return function(a,r){i(this,e);const o=a.id;return n.isGrouped(o)?s(a,r)[0][1]:n.getYScaleById(o,t)(n.getBaseValue(a))}.bind(this)},expandCircles:function(t,e,i){const n=this,a=n.pointExpandedR.bind(n);i&&n.unexpandCircles();const r=n.getShapeByIndex("circle",t,e).classed(xt.EXPANDED,!0),o=a(r)/n.config.point_r,c=1-o;n.isCirclePoint()?r.attr("r",a):r.each((function(){const t=(0,s.select)(this);if("circle"===this.tagName)t.attr("r",a);else{const e=this.getBBox(),i=e.width,n=e.height,s=c*(+t.attr("x")+i/2),a=c*(+t.attr("y")+n/2);t.attr("transform","translate("+s+" "+a+") scale("+o+")")}}))},unexpandCircles:function(t){const e=this,i=e.pointR.bind(e),n=e.getShapeByIndex("circle",t).filter((function(){return(0,s.select)(this).classed(xt.EXPANDED)})).classed(xt.EXPANDED,!1);if(n.attr("r",i),!e.isCirclePoint()){const t=i(n)/e.config.point_r;n.attr("transform",1!==t?"scale("+t+")":null)}},pointR:function(t){const e=this,i=e.config.point_r;let n=i;return e.isBubbleType(t)?n=e.getBubbleR(t):k(i)&&(n=i.bind(e.api)(t)),t.r=n,n},pointExpandedR:function(t){const e=this,i=e.config,n=e.isBubbleType(t)?1.15:1.75;return i.point_focus_expand_enabled?i.point_focus_expand_r||e.pointR(t)*n:e.pointR(t)},pointSelectR:function(t){const e=this.config.point_select_r;return k(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function(t,e){const i=H(this.state.event,t),n=(0,s.select)(t),a=this.isCirclePoint(t)?"c":"";let r=+n.attr(a+"x"),o=+n.attr(a+"y");if(!r&&!o&&1===t.nodeType){const e=U(t);r=e.x,o=e.y}return Math.sqrt(Math.pow(r-i[0],2)+Math.pow(o-i[1],2))<(e||this.config.point_sensitivity)},getPointSensitivity:function(t){const e=this;let i=e.config.point_sensitivity;return k(i)?i=i.call(e.api,t):"radius"===i&&(i=t.r),i},insertPointInfoDefs:function(t,e){var n,a=this;const r=function(t,e){i(this,a);const n=t.attributes;for(let i,s=0;i=n[s];s++)i=i.name,e.setAttribute(i,t.getAttribute(i))}.bind(this),o=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,c=h.createElementNS(s.namespaces.svg,o.nodeName.toLowerCase());if(c.id=e,c.style.fill="inherit",c.style.stroke="inherit",r(o,c),null!=(n=o.childNodes)&&n.length){const t=(0,s.select)(c);"innerHTML"in c?t.html(o.innerHTML):tt(o.childNodes).forEach(function(e){i(this,a),r(e,t.append(e.tagName).node())}.bind(this))}this.$el.defs.node().appendChild(c)},pointFromDefs:function(t){return this.$el.defs.select("#"+t)},updatePointClass:function(t){const e=this,i=e.$el.circle;let n=!1;return(F(t)||i)&&(n=!0===t?i.each((function(t){let i=e.getClass("circle",!0)(t);this.getAttribute("class").indexOf(xt.EXPANDED)>-1&&(i+=" "+xt.EXPANDED),this.setAttribute("class",i)})):e.getClass("circle",!0)(t)),n},generateGetLinePoints:function(t,e){var n=this;const s=this,a=s.config,r=s.getShapeX(0,t,e),o=s.getShapeY(e),c=s.getShapeOffset(s.isLineType,t,e),l=s.getYScaleById.bind(s);return function(t,d){i(this,n);const u=l.call(s,t.id,e)(s.getShapeYMin(t.id)),h=c(t,d)||u,g=r(t);let f=o(t);a.axis_rotated&&(t.value>0&&f2?o-2:0),l=2;li&&(i=e),i}var Cn={initPolar:function(){const t=this,e=t.$el.arcs,i=t.config,n=i.polar_level_text_show,s=i.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",Pt),n&&s&&t.generateDataLabelBackgroundColorFilter(s)},getPolarOuterRadius:function(t,e){var i;const n=kn(this);return(null!=(i=null==t?void 0:t.data.values[0].value)?i:0)/n*e},updateTargetsForPolar:function(t){this.updateTargetsForArc(t)},redrawPolar:function(){this.config.polar_level_show&&this.updatePolarLevel()},updatePolarLevel:function(){var t=this;const e=this,n=e.config,s=e.state,a=e.$el.arcs.levels,r=n.polar_level_depth,o=kn(e),c=ot(0,r),l=s.radius,d=c.map(function(e){return i(this,t),l*((e+1)/r)}.bind(this)),u=(n.polar_level_text_format||function(){}).bind(e.api),h=a.selectAll("."+Lt).data(c);h.exit().remove();const g=h.enter().append("g").attr("class",function(e,n){return i(this,t),Lt+" "+Lt+"-"+n}.bind(this));if(g.append("circle"),g.merge(h).selectAll("circle").style("visibility",n.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",function(e){return i(this,t),d[e]}.bind(this)),n.polar_level_text_show){const a=n.polar_level_text_backgroundColor,r="#"+s.datetimeId+"-labels-bg"+e.getTargetSelectorSuffix(a);g.append("text").style("text-anchor","middle"),g.merge(h).selectAll("text").attr("dy",function(e){return i(this,t),5-d[e]}.bind(this)).attr("filter",a?"url("+r+")":null).text(function(e){return i(this,t),u(o/c.length*(e+1))}.bind(this))}}};const Rn=de;var En={initRadar:function(){const t=this,e=t.config,i=t.state.current,n=t.$el;t.hasType("radar")&&(n.radar=n.main.select("."+xt.chart).append("g").attr("class",It.chartRadars),n.radar.levels=n.radar.append("g").attr("class",Pt),n.radar.axes=n.radar.append("g").attr("class",_t.axis),n.radar.shapes=n.radar.append("g").attr("class",Mt.shapes),i.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function(){const t=this.config,e=this.state,i=e.arcWidth,n=e.arcHeight,s=t.axis_x_categories.length<4?-20:10,a=(Math.min(i,n)-s)/2;return[a,a]},updateTargetsForRadar:function(t){var e=this;const n=this.config;M(n.axis_x_categories)&&(n.axis_x_categories=ot(0,rt("max",t.map(function(t){return i(this,e),t.values.length}.bind(this))))),this.generateRadarPoints()},getRadarPosition:function(t,e,n,s){var a=this;const r=this.config,o=this.getRadarSize(),c=o[0],l=o[1],d=r.axis_x_categories.length,u=r.radar_direction_clockwise,h=tt(t).map(function(o){return i(this,a),function(t,e,i,n,s,a){const r=t&&n>0?i-n:n,o=2*Math.PI;return s*(1-a*("x"===e?Math.sin:Math.cos)(r*o/i))}(u,o,d,e,O(n)?n:"x"===t?c:l,R(s)?s:r.radar_size_ratio)}.bind(this));return 1===h.length?h[0]:h},generateRadarPoints:function(){var t=this;const e=this,n=e.data.targets,s=e.getRadarSize(),a=s[0],r=s[1],o=e.cache.get(Rn)||{},c=o._size;(!c||c.width!==a&&c.height!==r)&&(n.forEach(function(n){var s=this;i(this,t),o[n.id]=n.values.map(function(t,n){return i(this,s),e.getRadarPosition(["x","y"],n,void 0,e.getRatio("radar",t))}.bind(this))}.bind(this)),o._size={width:a,height:r},e.cache.add(Rn,o))},redrawRadar:function(){const t=this,e=t.$el,i=e.radar,n=e.main,s=t.getTranslate("radar");s&&(i.attr("transform",s),n.select("."+$t.chartTexts).attr("transform",s),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints:function(){var t=this;const e=this.cache.get(Rn);return function(n,s){i(this,t);const a=e[n.id][s];return[a,a,a,a]}.bind(this)},updateRadarLevel:function(){var t=this;const e=this,n=e.config,s=e.state,a=e.$el.radar,r=e.getRadarSize(),o=r[0],c=r[1],l=n.radar_level_depth,d=n.axis_x_categories.length,u=n.radar_level_text_show,h=a.levels,g=ot(0,l),f=n.radar_size_ratio*Math.min(o,c),p=g.map(function(e){return i(this,t),f*((e+1)/l)}.bind(this)),x=(n.radar_level_text_format||function(){}).bind(e.api),b=g.map(function(n){var s=this;i(this,t);const a=p[n];return ot(0,d).map(function(t){return i(this,s),e.getRadarPosition(["x","y"],t,a,1).join(",")}.bind(this)).join(" ")}.bind(this)),m=h.selectAll("."+Lt).data(g);m.exit().remove();const _=m.enter().append("g").attr("class",function(e,n){return i(this,t),Lt+" "+Lt+"-"+n}.bind(this));_.append("polygon").style("visibility",n.radar_level_show?null:"hidden"),u&&(h.select("text").empty()&&h.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return i(this,t),x(0)}.bind(this)),_.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(e){return i(this,t),x(s.current.dataMax/g.length*(e+1))}.bind(this))),_.merge(m).attr("transform",function(e){return i(this,t),"translate("+(o-p[e])+", "+(c-p[e])+")"}.bind(this)).selectAll("polygon").attr("points",function(e){return i(this,t),b[e]}.bind(this)),u&&h.selectAll("text").attr("x",function(e){return i(this,t),E(e)?o:b[e].split(",")[0]}.bind(this)).attr("y",function(e){return i(this,t),E(e)?c:0}.bind(this))},updateRadarAxes:function(){var t=this;const e=this,n=e.config,a=e.$el.radar,r=e.getRadarSize(),o=r[0],c=r[1],l=n.axis_x_categories;let d=a.axes.selectAll("g").data(l);d.exit().remove();const u=d.enter().append("g").attr("class",function(e,n){return i(this,t),_t.axis+"-"+n}.bind(this));if(n.radar_axis_line_show&&u.append("line"),n.radar_axis_text_show&&u.append("text"),d=u.merge(d),n.radar_axis_line_show&&d.select("line").attr("x1",o).attr("y1",c).attr("x2",function(n,s){return i(this,t),e.getRadarPosition("x",s)}.bind(this)).attr("y2",function(n,s){return i(this,t),e.getRadarPosition("y",s)}.bind(this)),n.radar_axis_text_show){const a=n.radar_axis_text_position,r=a.x,l=void 0===r?0:r,u=a.y,h=void 0===u?0:u;d.select("text").style("text-anchor","middle").attr("dy",".5em").call(function(e){i(this,t),e.each((function(t){V((0,s.select)(this),t+"",[-.6,1.2])}))}.bind(this)).datum(function(e,n){return i(this,t),{index:n}}.bind(this)).attr("transform",(function(t){E(this.width)&&(this.width=this.getBoundingClientRect().width/2);let i=e.getRadarPosition("x",t.index,void 0,1),n=Math.round(e.getRadarPosition("y",t.index,void 0,1));return i>o?i+=this.width+l:Math.round(i)c?(n/2===c&&"tspan"===this.firstChild.tagName&&this.firstChild.setAttribute("dy","0em"),n+=h):n=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Pn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i=0,p=!i||i.indexOf(h)>=0,x=o.classed(zt.SELECTED);o.classed(Ct.line)||o.classed(mt.area)||(t?f&&p&&l(r)&&!x?g(!0,o.classed(zt.SELECTED,!0),r,h):O(n)&&n&&x&&g(!1,o.classed(zt.SELECTED,!1),r,h):f&&p&&l(r)&&x&&g(!1,o.classed(zt.SELECTED,!1),r,h))}))}var vs={selected:function(t){var e=this;const n=this.internal,a=[];return n.$el.main.selectAll("."+(Mt.shapes+n.getTargetSelectorSuffix(t))).selectAll("."+Mt.shape).filter((function(){return(0,s.select)(this).classed(zt.SELECTED)})).each(function(t){return i(this,e),a.push(t)}.bind(this)),a},select:function(t,e,i){const n=this.internal;_s.bind(n)(!0,t,e,i)},unselect:function(t,e){const i=this.internal;_s.bind(i)(!1,t,e)}};const ys=function(t){var e=this;const n=this.internal,s=n.axis,a=n.brush,r=n.config,o=n.scale,c=o.x,l=o.subX,d=n.state;let u;if(r.subchart_show)if(u=t,Array.isArray(u)){s.isTimeSeries()&&(u=u.map(function(t){return i(this,e),dt.bind(n)(t)}.bind(this)));n.withinRange(u,n.getZoomDomain("subX",!0),n.getZoomDomain("subX"))&&(d.domain=u,a.move(a.getSelection(),u.map(l)))}else{var h;u=null!=(h=d.domain)?h:c.orgDomain()}return u};J(ys,{show:function(){const t=this.internal,e=t.$el.subchart,i=t.config,n=i.subchart_show;if(!n){var s,a;t.unbindZoomEvent(),i.subchart_show=!n,e.main||t.initSubchart();let o=e.main.selectAll("."+xt.target);var r;if(t.data.targets.length!==o.size())t.updateSizes(),t.updateTargetsForSubchart(t.data.targets),o=null==(r=e.main)?void 0:r.selectAll("."+xt.target);null==(s=o)||s.style("opacity",null),null==(a=e.main)||a.style("display",null),this.resize()}},hide:function(){const t=this.internal,e=t.$el.subchart.main,i=t.config;i.subchart_show&&"none"!==(null==e?void 0:e.style("display"))&&(i.subchart_show=!1,e.style("display","none"),this.resize())},toggle:function(){const t=this.internal.config;this.subchart[t.subchart_show?"hide":"show"]()},reset:function(){const t=this.internal.brush;t.clear(t.getSelection())}});var Ts={subchart:ys},ws=p(14);const As=function(t){var e,n=this;const s=this.internal,a=s.$el,r=s.axis,o=s.config,c=s.org,l=s.scale,d=s.state,u=o.axis_rotated,h=r.isCategorized();let g;if(o.zoom_enabled)if(g=t,Array.isArray(g)){r.isTimeSeries()&&(g=g.map(function(t){return i(this,n),dt.bind(s)(t)}.bind(this)));if(s.withinRange(g,s.getZoomDomain("zoom",!0),s.getZoomDomain("zoom"))){if(d.domain=g,h&&(g=g.map(function(t,e){return i(this,n),+t+(0===e?0:1)}.bind(this))),s.api.tooltip.hide(),o.subchart_show){const t=l.zoom||l.x;s.brush.getSelection().call(s.brush.move,g.map(t))}else{var f;const t=h?l.x.orgScale():c.xScale||l.x,e=[-t(g[0]),0],i=(f=ws.zoomIdentity.scale(t.range()[1]/(t(g[1])-t(g[0])))).translate.apply(f,u?e.reverse():e);a.eventRect.call(s.zoom.transform,i)}s.setZoomResetButton()}}else g=s.zoom.getDomain();return null!=(e=d.domain)?e:g};J(As,{enable:function(t){const e=this.internal,i=e.config;/^(drag|wheel)$/.test(t)&&(i.zoom_type=t),i.zoom_enabled=!!t,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function(t){const e=this.internal,i=e.config,n=e.org.xDomain;return(0===t||t)&&(i.zoom_x_max=rt("max",[n[1],t])),i.zoom_x_max},min:function(t){const e=this.internal,i=e.config,n=e.org.xDomain;return(0===t||t)&&(i.zoom_x_min=rt("min",[n[0],t])),i.zoom_x_min},range:function(t){const e=this.zoom;if(F(t)){const i=t.min,n=t.max;O(i)&&e.min(i),O(n)&&e.max(n)}return{min:e.min(),max:e.max()}}});var Ss={zoom:As,unzoom:function(){const t=this.internal,e=t.config,i=t.$el,n=i.eventRect,s=i.zoomResetBtn,a=t.state;t.scale.zoom&&(e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(ws.zoomIdentity),t.updateZoom(!0),null==s||s.style("display","none"),(0,ws.zoomTransform)(n.node())!==ws.zoomIdentity&&t.zoom.transform(n,ws.zoomIdentity),a.domain=void 0)}},ks={drag:function(t){var e=this;const n=this,a=n.config,r=n.state,o=n.$el.main,c=a.data_selection_grouped,l=a.interaction_enabled&&a.data_selection_isselectable;if(n.hasArcType()||!a.data_selection_enabled||a.zoom_enabled&&!n.zoom.altDomain||!a.data_selection_multiple)return;const d=r.dragStart||[0,0],u=d[0],h=d[1],g=t[0],f=t[1],p=Math.min(u,g),x=Math.max(u,g),b=c?r.margin.top:Math.min(h,f),m=c?r.height:Math.max(h,f);o.select("."+At.dragarea).attr("x",p).attr("y",b).attr("width",x-p).attr("height",m-b),o.selectAll("."+Mt.shapes).selectAll("."+Mt.shape).filter(function(t){return i(this,e),null==l?void 0:l.bind(n.api)(t)}.bind(this)).each((function(t,e){const i=(0,s.select)(this),a=i.classed(zt.SELECTED),r=i.classed(At.INCLUDED);let o,c=!1;if(i.classed(Tt.circle)){const t=1*+i.attr("cx"),e=1*+i.attr("cy");o=n.togglePoint,c=p0?a:e]}.bind(this))),c&&r[1].reverse(),this.extent(r),this.update()},e.brush.getSelection=function(){return i(this,t),r.main?r.main.select("."+jt.brush):(0,s.select)([])}.bind(this)},initSubchart:function(){var t=this;const e=this,n=e.config,s=e.state,a=s.clip,r=s.hasAxis,o=e.$el,c=o.defs,l=o.svg,d=o.subchart,u=o.axis;if(!r)return;const h=n.subchart_show?null:"hidden",g=a.id+"-subchart",f=e.getClipPath(g);a.idSubchart=g,e.appendClip(c,g),e.initBrush(),d.main=l.append("g").classed(jt.subchart,!0).attr("transform",e.getTranslate("context"));const p=d.main;p.style("visibility",h),p.append("g").attr("clip-path",f).attr("class",jt.chart),["bar","line","bubble","candlestick","scatter"].forEach(function(n){i(this,t);const s=Q(/^(bubble|scatter)$/.test(n)?"circle":n);if(e.hasType(n)||e.hasTypeOf(s)){const t=p.select("."+jt.chart),e=jt["chart"+s+"s"];t.select("."+e).empty()&&t.append("g").attr("class",e)}}.bind(this));const x=p.append("g").attr("clip-path",f).attr("class",jt.brush).call(e.brush);n.subchart_showHandle&&e.addBrushHandle(x),u.subX=p.append("g").attr("class",jt.axisX).attr("transform",e.getTranslate("subX")).attr("clip-path",n.axis_rotated?"":a.pathXAxis).style("visibility",n.subchart_axis_x_show?h:"hidden")},addBrushHandle:function(t){var e=this;const n=this.config,s=n.axis_rotated,a=n.subchart_init_range,r=s?["M 5.2491724,29.749209 a 6,6 0 0 0 -5.50000003,-6.5 H -5.7508276 a 6,6 0 0 0 -6.0000004,6.5 z m -5.00000003,-2 H -6.7508276 m 6.99999997,-2 H -6.7508276Z","M 5.2491724,23.249172 a 6,-6 0 0 1 -5.50000003,6.5 H -5.7508276 a 6,-6 0 0 1 -6.0000004,-6.5 z m -5.00000003,2 H -6.7508276 m 6.99999997,2 H -6.7508276Z"]:["M 0 18 A 6 6 0 0 0 -6.5 23.5 V 29 A 6 6 0 0 0 0 35 Z M -2 23 V 30 M -4 23 V 30Z","M 0 18 A 6 6 0 0 1 6.5 23.5 V 29 A 6 6 0 0 1 0 35 Z M 2 23 V 30 M 4 23 V 30Z"];this.brush.handle=t.selectAll(".handle--custom").data(s?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class","handle--custom").attr("cursor",(s?"ns":"ew")+"-resize").attr("d",function(t){return i(this,e),r[+/[se]/.test(t.type)]}.bind(this)).attr("display",a?null:"none")},updateTargetsForSubchart:function(t){var e=this;const n=this,s=n.config,a=n.state,r=n.$el.subchart.main;s.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter(function(t){return i(this,e),n.hasType(t)||n.hasTypeOf(Q(t))}.bind(this)).forEach(function(s){i(this,e);const a=/^(bubble|scatter)$/.test(s),o=Q(a?"circle":s),c=n.getChartClass(o,!0),l=n.getClass(a?"circles":s+"s",!0),d=r.select("."+jt["chart"+o+"s"]);if(a){const e=d.selectAll("."+jt.circles).data(t.filter(n["is"+Q(s)+"Type"].bind(n))).attr("class",l);e.exit().remove(),e.enter().append("g").attr("class",l)}else{const e=d.selectAll("."+jt["chart"+o]).attr("class",c).data(t.filter(n["is"+o+"Type"].bind(n))),i=e.enter().append("g").style("opacity","0").attr("class",c).append("g").attr("class",l);e.exit().remove(),"line"===s&&n.hasTypeOf("Area")&&i.append("g").attr("class",n.getClass("areas",!0))}}.bind(this)),r.selectAll("."+jt.brush+" rect").attr(s.axis_rotated?"width":"height",s.axis_rotated?a.width2:a.height2))},redrawSubchart:function(t,e,n){var s=this;const a=this,r=a.config,o=a.$el.subchart.main,c=a.state,l=!!e;var d;if((o.style("visibility",r.subchart_show?null:"hidden"),r.subchart_show)&&("zoom"===(null==(d=c.event)?void 0:d.type)&&a.brush.update(),t)){const t=r.subchart_init_range;if(K(a)||a.brush.update(),Object.keys(n.type).forEach(function(t){i(this,s);const e=Q(t),r=a["generateDraw"+e](n.indices[t],!0);a["update"+e](l,!0),a["redraw"+e](r,l,!0)}.bind(this)),a.hasType("bubble")||a.hasType("scatter")){const t=n.pos.cx,e=a.updateCircleY(!0);a.updateCircle(!0),a.redrawCircle(t,e,l,void 0,!0)}!c.rendered&&t&&(c.domain=t,a.brush.move(a.brush.getSelection(),t.map(a.scale.x)))}},redrawForBrush:function(t){var e;void 0===t&&(t=!0);const i=this,n=i.config,s=n.subchart_onbrush,a=n.zoom_rescale,r=i.scale,o=i.state;i.redraw({withTransition:!1,withY:a,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&o.rendered&&s.bind(i.api)(null!=(e=o.domain)?e:r.x.orgDomain())},transformContext:function(t,e){const i=this,n=i.$el.subchart,s=i.$T,a=null!=e&&e.axisSubX?e.axisSubX:s(n.main.select("."+jt.axisX),t);n.main.attr("transform",i.getTranslate("context")),a.attr("transform",i.getTranslate("subX"))},getExtent:function(){var t=this;const e=this,n=e.config,s=e.scale;let a=n.axis_x_extent;if(a)if(k(a))a=a.bind(e.api)(e.getXDomain(e.data.targets),s.subX);else if(e.axis.isTimeSeries()&&a.every(isNaN)){const n=dt.bind(e);a=a.map(function(e){return i(this,t),s.subX(n(e))}.bind(this))}return a}},Ls={initZoom:function(){const t=this;t.scale.zoom=null,t.generateZoom(),t.initZoomBehaviour()},bindZoomEvent:function(t){void 0===t&&(t=!0);const e=this,i=e.config;i.zoom_enabled&&t?i.subchart_show||e.bindZoomOnEventRect():!1===t&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom:function(){var t=this;const e=this,n=e.config,s=e.org,a=e.scale,r=(0,ws.zoom)().duration(0).on("start",e.onZoomStart.bind(e)).on("zoom",e.onZoom.bind(e)).on("end",e.onZoomEnd.bind(e));r.orgScaleExtent=function(){i(this,t);const s=n.zoom_extent||[1,10];return[s[0],Math.max(e.getMaxDataCount()/s[1],s[1])]}.bind(this),r.updateScaleExtent=function(){const t=D(e.scale.x.orgDomain())/D(e.getZoomDomain()),i=this.orgScaleExtent();return this.scaleExtent([i[0]*t,i[1]*t]),this},r.updateTransformScale=function(r,o){var c;i(this,t);const l=n.axis_rotated;null==(c=s.xScale)||c.range(a.x.range());const d=r[l?"rescaleY":"rescaleX"](s.xScale||a.x),u=e.trimXDomain(d.domain()),h=n.zoom_rescale;if(d.domain(u,s.xDomain),o){const t=d(a.x.domain()[0]),i=l?r.x:t,n=l?t:r.y;e.$el.eventRect.property("__zoom",ws.zoomIdentity.translate(i,n).scale(r.k))}e.state.xTickOffset||(e.state.xTickOffset=e.axis.x.tickOffset()),a.zoom=e.getCustomizedXScale(d),e.axis.x.scale(a.zoom),h&&(s.xScale||(s.xScale=a.x.copy()),a.x.domain(u))}.bind(this),r.getDomain=function(){i(this,t);const n=a[a.zoom?"zoom":"subX"].domain();return e.axis.isCategorized()&&(n[1]-=2),n}.bind(this),e.zoom=r},onZoomStart:function(t){const e=this,i=t.sourceEvent;i&&(e.zoom.startEvent=i,e.state.zooming=!0,N(e.config.zoom_onzoomstart,e.api,t))},onZoom:function(t){var e,n=this;const s=this,a=s.config,r=s.scale,o=s.state,c=s.org,l=t.sourceEvent,d=(null==t?void 0:t.transform)===ws.zoomIdentity;if(!a.zoom_enabled||0===s.filterTargetsToShow(s.data.targets).length||!r.zoom&&(null==l?void 0:l.type.indexOf("touch"))>-1&&1===(null==l?void 0:l.touches.length))return;t.sourceEvent&&(o.zooming=!0,o.domain=void 0);const u="mousemove"===(null==l?void 0:l.type),h=(null==l?void 0:l.wheelDelta)<0,g=t.transform;!u&&h&&r.x.domain().every(function(t,e){return i(this,n),t!==c.xDomain[e]}.bind(this))&&r.x.domain(c.xDomain),s.zoom.updateTransformScale(g,"wheel"===a.zoom_type&&l);const f=a.transition_duration>0&&!a.subchart_show&&(o.dragging||d||!t.sourceEvent);s.redraw({withTransition:f,withY:a.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),s.state.cancelClick=u,d||N(a.zoom_onzoom,s.api,null!=(e=s.state.domain)?e:s.zoom.getDomain())},onZoomEnd:function(t){var e,i;const n=this,s=n.config,a=n.state;let r=n.zoom.startEvent,o=null==t?void 0:t.sourceEvent;const c=(null==t?void 0:t.transform)===ws.zoomIdentity;var l;(null==(e=r)?void 0:e.type.indexOf("touch"))>-1&&(r=r.changedTouches[0],o=null==(l=o)||null==(l=l.changedTouches)?void 0:l[0]);"drag"===s.zoom_type&&o&&r.clientX===o.clientX&&r.clientY===o.clientY||(n.redrawEventRect(),n.updateZoom(),a.zooming=!1,!c&&(o||a.dragging)&&N(s.zoom_onzoomend,n.api,null!=(i=n.state.domain)?i:n.zoom.getDomain()))},updateZoom:function(t){const e=this,i=e.scale,n=i.subX,s=i.x,a=i.zoom;if(a){const i=a.domain(),r=n.domain(),o=.015,c=e.config.axis_x_inverted?(i[0]>=r[0]||i[0]+o>=r[0])&&(r[1]>=i[1]||r[1]>=i[1]+o):(i[0]<=r[0]||i[0]-o<=r[0])&&(r[1]<=i[1]||r[1]<=i[1]-o);(t||c)&&(e.axis.x.scale(n),s.domain(n.orgDomain()),e.scale.zoom=null)}},bindZoomOnEventRect:function(){var t=this;const e=this,n=e.config,s=e.$el.eventRect,a="drag"===n.zoom_type?e.zoomBehaviour:e.zoom;e.$el.svg.on("wheel",function(){i(this,t)}.bind(this)),s.call(a).on("dblclick.zoom",null)},initZoomBehaviour:function(){var t=this;const e=this,n=e.config,s=e.state,a=n.axis_rotated;let r,o=0,c=0;const l={axis:a?"y":"x",attr:a?"height":"width",index:a?1:0};e.zoomBehaviour=(0,Pe.drag)().clickDistance(4).on("start",(function(t){s.event=t,e.setDragStatus(!0),e.unselectRect(),r||(r=e.$el.main.append("rect").attr("clip-path",s.clip.path).attr("class",Nt.zoomBrush).attr("width",a?s.width:0).attr("height",a?0:s.height)),o=H(t,this)[l.index],c=o,r.attr(l.axis,o).attr(l.attr,0),e.onZoomStart(t)})).on("drag",(function(t){c=H(t,this)[l.index],r.attr(l.axis,Math.min(o,c)).attr(l.attr,Math.abs(c-o))})).on("end",function(n){var a=this;i(this,t);const d=e.scale.zoom||e.scale.x;if(s.event=n,r.attr(l.axis,0).attr(l.attr,0),o>c){var u=[c,o];o=u[0],c=u[1]}o<0&&(c+=Math.abs(o),o=0),o!==c&&e.api.zoom([o,c].map(function(t){return i(this,a),d.invert(t)}.bind(this))),e.setDragStatus(!1)}.bind(this))},setZoomResetButton:function(){const t=this,e=t.config,i=t.$el,n=e.zoom_resetButton;n&&"drag"===e.zoom_type&&(i.zoomResetBtn?i.zoomResetBtn.style("display",null):i.zoomResetBtn=t.$el.chart.append("div").classed(xt.button,!0).append("span").on("click",(function(){k(n.onclick)&&n.onclick.bind(t.api)(this),t.api.unzoom()})).classed(Nt.buttonZoomReset,!0).text(n.text||"Reset Zoom"))}},Ps=void 0,Is={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return i(this,Ps),!0}.bind(void 0),data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:function(){i(this,Ps)}.bind(void 0),data_onunselected:function(){i(this,Ps)}.bind(void 0)},Ds={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:function(){i(this,undefined)}.bind(void 0)},zs={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0},Ms=void 0;let Xs=function(){var t=this;return i(this,Ms),J(ri.prototype,Es),J(Ti.prototype,vs),ne.setOptions([Is]),(Xs=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),$s=function(){var t=this;return i(this,Ms),J(ri.prototype,Os),J(Ti.prototype,Ts),ne.setOptions([Ds]),($s=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),Fs=function(){var t=this;return i(this,Ms),J(ri.prototype,Ls),J(Ti.prototype,Ss),ne.setOptions([zs]),(Fs=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),Bs={};const Ns={version:"3.9.3-nightly-20230819004547",generate:function(t){const e=st({},Bs,t),i=new Ti(e);return i.internal.charts=this.instance,this.instance.push(i),i},defaults:function(t){return F(t)&&(Bs=t),Bs},instance:[],plugin:{}};var js=void 0;Object.keys(t).forEach(function(e){return i(this,js),t[e]()}.bind(void 0)),Object.keys(e).forEach(function(t){return i(this,js),e[t]()}.bind(void 0))}(),x}()})); \ No newline at end of file +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("d3-axis"),require("d3-brush"),require("d3-drag"),require("d3-dsv"),require("d3-ease"),require("d3-hierarchy"),require("d3-interpolate"),require("d3-scale"),require("d3-selection"),require("d3-shape"),require("d3-time-format"),require("d3-transition"),require("d3-zoom"));else if("function"==typeof define&&define.amd)define(["d3-axis","d3-brush","d3-drag","d3-dsv","d3-ease","d3-hierarchy","d3-interpolate","d3-scale","d3-selection","d3-shape","d3-time-format","d3-transition","d3-zoom"],e);else{var i="object"==typeof exports?e(require("d3-axis"),require("d3-brush"),require("d3-drag"),require("d3-dsv"),require("d3-ease"),require("d3-hierarchy"),require("d3-interpolate"),require("d3-scale"),require("d3-selection"),require("d3-shape"),require("d3-time-format"),require("d3-transition"),require("d3-zoom")):e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3);for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(this,(function(t,e,i,n,s,a,r,o,c,l,d,u,h){return function(){"use strict";var g=[,,function(t){t.exports=c},function(t){t.exports=e},function(t){t.exports=d},function(t){t.exports=n},function(t){t.exports=o},function(t){t.exports=i},function(t){t.exports=u},function(t){t.exports=l},function(e){e.exports=t},function(t){t.exports=s},function(t){t.exports=r},function(t){t.exports=a},function(t){t.exports=h}],f={};function p(t){var e=f[t];if(void 0!==e)return e.exports;var i=f[t]={exports:{}};return g[t](i,i.exports,p),i.exports}p.d=function(t,e){for(var i in e)p.o(e,i)&&!p.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},p.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},p.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var x={};return function(){p.r(x),p.d(x,{bb:function(){return Ns},default:function(){return Ns}});var t={};p.r(t),p.d(t,{area:function(){return es},areaLineRange:function(){return is},areaSpline:function(){return ns},areaSplineRange:function(){return ss},areaStep:function(){return as},bar:function(){return fs},bubble:function(){return ps},candlestick:function(){return xs},donut:function(){return ls},gauge:function(){return ds},line:function(){return rs},pie:function(){return us},polar:function(){return hs},radar:function(){return gs},scatter:function(){return bs},spline:function(){return os},step:function(){return cs},treemap:function(){return ms}});var e={};function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}p.r(e),p.d(e,{selection:function(){return Xs},subchart:function(){return $s},zoom:function(){return Fs}});var n=p(4),s=p(2),a=void 0;const r=function(){i(this,a);return"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)(),o="function"==typeof r.requestAnimationFrame,c="function"==typeof r.requestIdleCallback,l=o?r.requestAnimationFrame:function(t){return i(this,a),setTimeout(t,1)}.bind(void 0),d=o?r.cancelAnimationFrame:function(t){return i(this,a),clearTimeout(t)}.bind(void 0),u=c?r.requestIdleCallback:l,h=(c&&r.cancelIdleCallback,null==r?void 0:r.document),g={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},f={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},b={Area:[g.AREA,g.AREA_SPLINE,g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE,g.AREA_STEP],AreaRange:[g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE],Arc:[g.PIE,g.DONUT,g.GAUGE,g.POLAR,g.RADAR],Line:[g.LINE,g.SPLINE,g.AREA,g.AREA_SPLINE,g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE,g.STEP,g.AREA_STEP],Step:[g.STEP,g.AREA_STEP],Spline:[g.SPLINE,g.AREA_SPLINE,g.AREA_SPLINE_RANGE]};function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function _(t){var e=function(t,e){if("object"!==m(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===m(e)?e:String(e)}function v(t,e,i){return(e=_(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var y=p(3),T=void 0;function w(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function A(t){for(var e,i=1;i2?n-2:0),a=2;a/gi,">"):t}function V(t,e,n,s){var a=this;if(void 0===n&&(n=[-1,1]),void 0===s&&(s=!1),t&&C(e))if(-1===e.indexOf("\n"))t.text(e);else{const r=[t.text(),e].map(function(t){return i(this,a),t.replace(/[\s\n]/g,"")}.bind(this));if(r[0]!==r[1]){const r=e.split("\n"),o=s?r.length-1:1;t.html(""),r.forEach(function(e,s){i(this,a),t.append("tspan").attr("x",0).attr("dy",(0===s?n[0]*o:n[1])+"em").text(e)}.bind(this))}}}function Y(t){const e=t.getBBox(),i=e.x,n=e.y,s=e.width,a=e.height;return[{x:i,y:n+a},{x:i,y:n},{x:i+s,y:n},{x:i+s,y:n+a}]}function H(t,e){var n,a=this;const r=t&&(null==(n=t.touches||t.sourceEvent&&t.sourceEvent.touches)?void 0:n[0]);return(0,s.pointer)(r||t,e).map(function(t){return i(this,a),isNaN(t)?0:t}.bind(this))}function W(t){const e=t.event,i=t.$el,n=i.subchart.main||i.main;let s;return e&&"brush"===e.type?s=e.selection:n&&(s=n.select(".bb-brush").node())&&(s=(0,y.brushSelection)(s)),s}function U(t){return!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width")?t.rect=t.getBoundingClientRect():t.rect}function Z(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=0),void 0===i&&(i=1e4);const n=r.crypto||r.msCrypto,s=n?e+n.getRandomValues(new Uint32Array(1))[0]%(i-e+1):Math.floor(Math.random()*(i-e)+e);return t?s+"":s}function q(t,e,i,n,s){if(i>n)return-1;const a=Math.floor((i+n)/2);let r=t[a],o=r.x,c=r.w,l=void 0===c?0:c;return s&&(o=t[a].y,l=t[a].h),e>=o&&e<=o+l?a:e1?n-1:0),a=1;ae?-1:t{=TITLE}",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_padding:0,legend_position:"bottom",legend_show:!0,legend_usePoint:!1},Jt={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},Qt=void 0,te={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){i(this,Qt)}.bind(void 0),tooltip_onhide:function(){i(this,Qt)}.bind(void 0),tooltip_onshown:function(){i(this,Qt)}.bind(void 0),tooltip_onhidden:function(){i(this,Qt)}.bind(void 0),tooltip_order:null};function ee(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ie(t){for(var e,i=1;i0){if(void 0===e[s-1]&&(e[s-1]={}),void 0===t)throw new Error("Source data is missing a component at ("+i+", "+s+")!");e[s-1][n]=t}}))})),e}function Te(t){const e=t[0],i=[];return t.forEach((function(t,n){if(n>0){const s={};t.forEach((function(t,i){if(void 0===t)throw new Error("Source data is missing a component at ("+n+", "+i+")!");s[e[i]]=t})),i.push(s)}})),i}function we(t,e){const i=[];let n,s;if(Array.isArray(t)){const a=function(t,e){if(void 0!==t[e])return t[e];const i=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let n=t;return i.some((function(t){return!(n=n&&t in n?n[t]:void 0)})),n};n=e.x?e.value.concat(e.x):e.value,i.push(n),t.forEach((function(t){const e=n.map((function(e){let i=a(t,e);return void 0===i&&(i=null),i}));i.push(e)})),s=Te(i)}else Object.keys(t).forEach((function(e){const n=t[e].concat();null==n.unshift||n.unshift(e),i.push(n)})),s=ye(i);return s}function Ae(t,e){var n=this;const s=t.rows(e);let a;return 1===s.length?(a=[{}],s[0].forEach(function(t){i(this,n),a[0][t]=null}.bind(this))):a=t.parse(e),a}function Se(t){return Ae({rows:ve.csvParseRows,parse:ve.csvParse},t)}function ke(t){return Ae({rows:ve.tsvParseRows,parse:ve.tsvParse},t)}function Ce(t,e){const i=t||(null==e?void 0:e.data_keys);return null!=i&&i.x&&(e.data_x=i.x),i}var Re={convertData:function(t,e){var n=this;const s=this.config,a=s.boost_useWorker;let r=t;if(t.bindto&&(r={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(e){i(this,n);const s="data_"+e;s in t&&(r[e]=t[s])}.bind(this))),r.url&&e)!function(t,e,i,n,s){void 0===e&&(e="csv");const a=new XMLHttpRequest,r={csv:Se,tsv:ke,json:we};a.open("GET",t),i&&Object.keys(i).forEach((function(t){a.setRequestHeader(t,i[t])})),a.onreadystatechange=function(){if(4===a.readyState){if(200!==a.status)throw new Error(t+": Something went wrong loading!");{const t=a.responseText;t&&s.call(this,r[e]("json"===e?JSON.parse(t):t,n))}}},a.send()}(r.url,r.mimeType,r.headers,Ce(r.keys,s),e);else if(r.json)_e(a,we,e,[ye,Te])(r.json,Ce(r.keys,s));else if(r.rows)_e(a,Te,e)(r.rows);else if(r.columns)_e(a,ye,e)(r.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets:function(t,e){var n=this;const s=this,a=s.axis,r=s.config,o=s.state,c=r.data_type;let l=!1,d=!1,u=!1;a&&(l=a.isCategorized(),d=a.isTimeSeries(),u=a.isCustomX());const h=Object.keys(t[0]||{}),g=h.length?h.filter(s.isNotX,s):[],f=h.length?h.filter(s.isX,s):[];let p;g.forEach(function(a){var o=this;i(this,n);const c=this.getXKey(a);u||d?f.indexOf(c)>=0?p=(e&&s.data.xs[a]||[]).concat(t.map(function(t){return i(this,o),t[c]}.bind(this)).filter(S).map(function(t,e){return i(this,o),s.generateTargetX(t,a,e)}.bind(this))):r.data_x?p=this.getOtherTargetXs():X(r.data_xs)&&(p=s.getXValuesOfXKey(c,s.data.targets)):p=t.map(function(t,e){return i(this,o),e}.bind(this)),p&&(this.data.xs[a]=p)}.bind(this)),g.forEach(function(t){if(i(this,n),!this.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}.bind(this));const x=g.map(function(e,a){var c=this;i(this,n);const d=r.data_idConverter.bind(s.api)(e),h=s.getXKey(e),g=u&&l,f=g&&t.map(function(t){return i(this,c),t.x}.bind(this)).every(function(t){return i(this,c),r.axis_x_categories.indexOf(t)>-1}.bind(this)),p=t.__append__,x=null===h&&p?s.api.data.values(e).length:0;return{id:d,id_org:e,values:t.map(function(t,n){i(this,c);const l=t[h];let u,b=t[e];return b=null===b||isNaN(b)||F(b)?$(b)||F(b)?b:null:+b,!g&&!o.hasRadar||0!==a||E(l)?u=s.generateTargetX(l,e,x+n):(f||0!==a||0!==n||p||(r.axis_x_categories=[]),u=r.axis_x_categories.indexOf(l),-1===u&&(u=r.axis_x_categories.length,r.axis_x_categories.push(l))),(E(b)||s.data.xs[e].length<=n)&&(u=void 0),{x:u,value:b,id:d,index:-1}}.bind(this)).filter(function(t){return i(this,c),O(t.x)}.bind(this))}}.bind(this));if(x.forEach(function(t){var e,a=this;i(this,n),r.data_xSort&&(t.values=t.values.sort(function(t,e){i(this,a);return(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)}.bind(this))),t.values.forEach(function(t,e){return i(this,a),t.index=e}.bind(this)),null==(e=s.data.xs[t.id])||e.sort(function(t,e){return i(this,a),t-e}.bind(this))}.bind(this)),o.hasNegativeValue=s.hasNegativeValueInTargets(x),o.hasPositiveValue=s.hasPositiveValueInTargets(x),c&&s.isValidChartType(c)){const t=s.mapToIds(x).filter(function(t){return i(this,n),!(t in r.data_types)||!s.isValidChartType(r.data_types[t])}.bind(this));s.setTargetType(t,c)}return x.forEach(function(t){return i(this,n),s.cache.add(t.id_org,t,!0)}.bind(this)),x}},Ee={isX:function(t){const e=this.config,n=e.data_x&&t===e.data_x,s=X(e.data_xs)&&function(t,e){var n=this;let s=!1;return Object.keys(t).forEach(function(a){return i(this,n),t[a]===e&&(s=!0)}.bind(this)),s}(e.data_xs,t);return n||s},isNotX:function(t){return!this.isX(t)},isStackNormalized:function(){const t=this.config;return!(!t.data_stack_normalize||!t.data_groups.length)},isGrouped:function(t){var e=this;const n=this.config.data_groups;return t?n.some(function(n){return i(this,e),n.indexOf(t)>=0&&n.length>1}.bind(this)):n.length>0},getXKey:function(t){const e=this.config;return e.data_x?e.data_x:X(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n=this;const s=this;let a;return(e&&X(e)?s.mapToIds(e):[]).forEach(function(e){i(this,n),s.getXKey(e)===t&&(a=s.data.xs[e])}.bind(this)),a},getIndexByX:function(t,e){return e?e.indexOf(C(t)?t:+t):(this.filterByX(this.data.targets,t)[0]||{index:null}).index},getXValue:function(t,e){const i=this;return t in i.data.xs&&i.data.xs[t]&&S(i.data.xs[t][e])?i.data.xs[t][e]:e},getOtherTargetXs:function(){const t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function(t){const e=this.getOtherTargetXs();return e&&t1?(e=e.map(function(e){return i(this,t),e.values}.bind(this)).reduce(function(e,n){return i(this,t),e.concat(n)}.bind(this)).map(function(e){return i(this,t),e.x}.bind(this)),e=at(it(e)).map(function(e,n,a){return i(this,t),{x:e,index:s?a.length-n-1:n}}.bind(this))):n&&(e=e[0].values.concat()),e},mapToIds:function(t){var e=this;return t.map(function(t){return i(this,e),t.id}.bind(this))},mapToTargetIds:function(t){return t?$(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function(t,e){const i=this.mapToIds(t);for(let t,n=0;t=i[n];n++)if(t===e)return!0;return!1},isTargetToShow:function(t){return this.state.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function(t){return this.state.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function(t){var e=this;const n=this;return(t||n.data.targets).filter(function(t){return i(this,e),n.isTargetToShow(t.id)}.bind(this))},mapTargetsToUniqueXs:function(t){var e=this;const n=this.axis;let s=[];return null!=t&&t.length&&(s=it(nt(t.map(function(t){var n=this;return i(this,e),t.values.map(function(t){return i(this,n),+t.x}.bind(this))}.bind(this)))),s=null!=n&&n.isTimeSeries()?s.map(function(t){return i(this,e),new Date(+t)}.bind(this)):s.map(Number)),at(s)},addTargetIds:function(t,e){var n=this;const s=this.state;($(e)?e:[e]).forEach(function(e){i(this,n),s[t].indexOf(e)<0&&s[t].push(e)}.bind(this))},removeTargetIds:function(t,e){var n=this;const s=this.state;($(e)?e:[e]).forEach(function(e){i(this,n);const a=s[t].indexOf(e);a>=0&&s[t].splice(a,1)}.bind(this))},addHiddenTargetIds:function(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds:function(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds:function(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds:function(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed:function(t){var e=this;const n=this,s=n.state.hasAxis,a={},r=n.isMultipleX(),o=r?n.mapTargetsToUniqueXs(t).map(function(t){return i(this,e),C(t)?t:+t}.bind(this)):null;return t.forEach(function(t){var c=this;i(this,e);const l=[];t.values.filter(function(t){let e=t.value;return i(this,c),S(e)||null===e}.bind(this)).forEach(function(t){i(this,c);let e=t.value;null!==e&&n.isCandlestickType(t)&&(e=$(e)?e.slice(0,4):[e.open,e.high,e.low,e.close]),$(e)?l.push.apply(l,e):F(e)&&"high"in e?l.push.apply(l,Object.values(e)):n.isBubbleZType(t)?l.push(s&&n.getBubbleZData(e,"y")):r?l[n.getIndexByX(t.x,o)]=e:l.push(e)}.bind(this)),a[t.id]=l}.bind(this)),a},checkValueInTargets:function(t,e){const i=Object.keys(t);let n;for(let s=0;s1},hasNegativeValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return i(this,e),t<0}.bind(this))},hasPositiveValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return i(this,e),t>0}.bind(this))},orderTargets:function(t){const e=[].concat(t),i=this.getSortCompareFn();return i&&e.sort(i),e},getSortCompareFn:function(t){var e=this;void 0===t&&(t=!1);const n=this,s=n.config.data_order,a=/asc/i.test(s),r=/desc/i.test(s);let o;if(a||r){const n=function(t,n){return i(this,e),t+Math.abs(n.value)}.bind(this);o=function(s,r){i(this,e);const o="values"in s?s.values.reduce(n,0):s.value,c="values"in r?r.values.reduce(n,0):r.value;return t?a?o-c:c-o:a?c-o:o-c}.bind(this)}else k(s)&&(o=s.bind(n.api));return o||null},filterByX:function(t,e){var n=this;return nt(t.map(function(t){return i(this,n),t.values}.bind(this))).filter(function(t){return i(this,n),t.x-e==0}.bind(this))},filterRemoveNull:function(t){var e=this;return t.filter(function(t){return i(this,e),S(this.getBaseValue(t))}.bind(this))},filterByXDomain:function(t,e){var n=this;return t.map(function(t){var s=this;return i(this,n),{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return i(this,s),e[0]<=t.x&&t.x<=e[1]}.bind(this))}}.bind(this))},hasDataLabel:function(){const t=this.config.data_labels;return L(t)&&t||z(t)&&X(t)},getDataIndexFromEvent:function(t){const e=this.config,i=this.state,n=i.hasRadar,a=i.inputType,r=i.eventReceiver,o=r.coords,c=r.rect;let l;if(n){let e=t.target;/tspan/i.test(e.tagName)&&(e=e.parentNode);const i=(0,s.select)(e).datum();l=i&&1===Object.keys(i).length?i.index:void 0}else{const i=e.axis_rotated,n="touch"===a&&t.changedTouches?t.changedTouches[0]:t;l=q(o,i?n.clientY-c.top:n.clientX-c.left,0,o.length-1,i)}return l},getDataLabelLength:function(t,e,n){var s=this;const a=this,r=[0,0];return a.$el.chart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return i(this,s),a.dataLabelFormat(t.id)(t)}.bind(this)).each((function(t,e){r[e]=1.3*this.getBoundingClientRect()[n]})).remove(),r},isNoneArc:function(t){return this.hasTarget(this.data.targets,t.id)},isArc:function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function(t,e){const i=t[e].x,n=[];let s;for(s=e-1;s>=0&&i===t[s].x;s--)n.push(t[s]);for(s=e;s=0&&n?n[t]:void 0}return n?n[e]:n},setRatioForGroupedData:function(t){var e=this;const n=this;if(n.config.data_groups.length&&t.some(function(t){return i(this,e),n.isGrouped(t.id)}.bind(this))){const s=function(t){return i(this,e),n.getRatio("index",t,!0)}.bind(this);t.forEach(function(t){i(this,e),"values"in t?t.values.forEach(s):s(t)}.bind(this))}},getRatio:function(t,e,n){var s=this;void 0===n&&(n=!1);const a=this,r=a.config,o=a.state,c=a.api;let l=0;if(e&&c.data.shown().length)if(l=e.ratio||e.value,"arc"===t)if(a.pie.padAngle()())l=e.value/a.getTotalDataSum(!0);else{const t=r.gauge_fullCircle?a.getArcLength():-2*a.getGaugeStartAngle(),i=a.hasType("gauge")?t:2*Math.PI;l=(e.endAngle-e.startAngle)/i}else if("index"===t){const t=c.data.values.bind(c);let n=this.getTotalPerIndex();if(o.hiddenTargetIds.length){let e=t(o.hiddenTargetIds,!1);e.length&&(e=e.reduce(function(t,e){var n=this;return i(this,s),t.map(function(t,s){return i(this,n),(R(t)?t:0)+e[s]}.bind(this))}.bind(this)),n=n.map(function(t,n){return i(this,s),t-e[n]}.bind(this)))}const a=n[e.index];e.ratio=R(e.value)&&n&&a?e.value/a:0,l=e.ratio}else if("radar"===t)l=parseFloat(Math.max(e.value,0)+"")/o.current.dataMax*r.radar_size_ratio;else if("bar"===t){const t=a.getYScaleById.bind(a)(e.id).domain().reduce(function(t,e){return i(this,s),e-t}.bind(this));l=0===t?0:Math.abs(e.value)/t}else"treemap"===t&&(l/=a.getTotalDataSum(!0));return n&&l?100*l:l},updateDataIndexByX:function(t){var e=this;const n=t.reduce(function(t,n,s){return i(this,e),t[+n.x]=s,t}.bind(this),{});this.data.targets.forEach(function(t){var s=this;i(this,e),t.values.forEach(function(t,e){i(this,s);let a=n[+t.x];void 0===a&&(a=e),t.index=a}.bind(this))}.bind(this))},isBubbleZType:function(t){return this.isBubbleType(t)&&(F(t.value)&&("z"in t.value||"y"in t.value)||$(t.value)&&t.value.length>=2)},isBarRangeType:function(t){var e=this;const n=t.value;return this.isBarType(t)&&$(n)&&n.length>=2&&n.every(function(t){return i(this,e),R(t)}.bind(this))},getDataById:function(t){var e;const i=this.cache.get(t)||this.api.data(t);return null!=(e=null==i?void 0:i[0])?e:i}};function Oe(t,e){void 0===e&&(e=!1);const i=this.api;e&&this.api.flush(!0),null==t||t.call(i)}var Le={load:function(t,e){var n=this;const s=this,a=s.data,r=e.append;let o=t;o&&(e.filter&&(o=o.filter(e.filter)),(e.type||e.types)&&o.forEach(function(t){var a;i(this,n);const r=(null==(a=e.types)?void 0:a[t.id])||e.type;s.setTargetType(t.id,r)}.bind(this)),a.targets.forEach(function(t){i(this,n);for(let e=0;e=0?jt.focused:"")},classDefocused:function(t){return" "+(this.state.defocusedTargetIds.indexOf(t.id)>=0?jt.defocused:"")},getTargetSelectorSuffix:function(t){return(t||0===t?"-"+t:"").replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g,"-")},selectorTarget:function(t,e,i){void 0===e&&(e=""),void 0===i&&(i="");const n=this.getTargetSelectorSuffix(t);return e+"."+(jt.target+n)+" "+i+", "+e+"."+(jt.circles+n)+" "+i},selectorTargets:function(t,e){var n=this;const s=t||[];return s.length?s.map(function(t){return i(this,n),this.selectorTarget(t,e)}.bind(this)):null},selectorLegend:function(t){return"."+(jt.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return null!=t&&t.length?t.map(function(t){return i(this,e),this.selectorLegend(t)}.bind(this)):null}},ze=p(6);const Me=function(t,e,n){i(this,undefined);const a=(0,s.select)(t.cloneNode(!0));return a.attr("id",n).insert("rect",":first-child").attr("width",a.attr("width")).attr("height",a.attr("height")).style("fill",e),{id:n,node:a.node()}}.bind(void 0);const Xe=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var $e={generateColor:function(){var t=this;const e=this,n=e.$el,s=e.config,a=s.data_colors,r=s.data_color,o=[];let c=X(s.color_pattern)?s.color_pattern:(0,ze.scaleOrdinal)(function(t){var e=this;const n=ae,s=h.body;let a=s[n];if(!a){const r=t.classed(wt.colorPattern,!0).style("background-image");t.classed(wt.colorPattern,!1),r.indexOf(";")>-1&&(a=r.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(t){return i(this,e),t.trim().replace(/[\"'\s]/g,"")}.bind(this)).filter(Boolean),s[n]=a)}return a}(n.chart)||Xe).range();const l=c;if(k(s.color_tiles)){const n=s.color_tiles.bind(e.api)(),a=c.map(function(s,a){i(this,t);const r=s.replace(/[#\(\)\s,]/g,""),o=e.state.datetimeId+"-pattern-"+r+"-"+a;return Me(n[a%n.length],s,o)}.bind(this));c=a.map(function(e){return i(this,t),"url(#"+e.id+")"}.bind(this)),e.patterns=a}return function(t){var i;const n=t.id||(null==(i=t.data)?void 0:i.id)||t,d=e.isTypeOf(n,["line","spline","step"])||!s.data_types[n];let u;return k(a[n])?u=a[n].bind(e.api)(t):a[n]?u=a[n]:(o.indexOf(n)<0&&o.push(n),u=d?l[o.indexOf(n)%l.length]:c[o.indexOf(n)%c.length],a[n]=u),k(r)?r.bind(e.api)(u,t):u}},generateLevelColor:function(){const t=this.config,e=t.color_pattern,i=t.color_threshold,n="value"===i.unit,s=i.max||100,a=i.values&&i.values.length?i.values:[];return X(i)?function(t){const i=n?t:100*t/s;let r=e[e.length-1];for(let t=0,n=a.length;t')}.bind(this))}},getGradienColortUrl:function(t){return"url(#"+this.state.datetimeId+"-gradient"+this.getTargetSelectorSuffix(t)+")"},updateLinearGradient:function(){var t=this;const e=this,n=e.config,s=e.data.targets,a=e.state.datetimeId,r=e.$el.defs;s.forEach(function(s){var o=this;i(this,t);const c=a+"-gradient"+e.getTargetSelectorSuffix(s.id),l=e.isAreaType(s)?"area":e.isBarType(s)&&"bar",d=n.axis_rotated;if(l&&r.select("#"+c).empty()){const t=e.color(s),a=n[l+"_linearGradient"],u=a.x,h=void 0===u?d?[1,0]:[0,0]:u,g=a.y,f=void 0===g?d?[0,0]:[0,1]:g,p=a.stops,x=void 0===p?[[0,t,1],[1,t,0]]:p,b=r.append("linearGradient").attr("id",""+c).attr("x1",h[0]).attr("x2",h[1]).attr("y1",f[0]).attr("y2",f[1]);x.forEach(function(n){i(this,o);const a=k(n[1])?n[1].bind(e.api)(s.id):n[1];b.append("stop").attr("offset",n[0]).attr("stop-color",a||t).attr("stop-opacity",n[2])}.bind(this))}}.bind(this))},setOverColor:function(t,e){var n=this;const s=this,a=s.config,r=s.$el.main,o=a.color_onover;let c=t?o:s.color;F(c)?c=function(t){let e=t.id;return i(this,n),e in o?o[e]:s.color(e)}.bind(this):C(c)?c=function(){return i(this,n),o}.bind(this):k(o)&&(c=c.bind(s.api)),r.selectAll(F(e)?"."+bt.arc+s.getTargetSelectorSuffix(e.id):"."+Mt.shape+"-"+e).style("fill",c)}},Fe={getYDomainMinMax:function(t,e){var n=this;const s=this,a=s.axis,r=s.config,o="min"===e,c=r.data_groups,l=s.mapToIds(t),d=s.getValuesAsIdKeyed(t);if(c.length>0){const e=s["has"+(o?"Negative":"Positive")+"ValueInTargets"](t);c.forEach(function(t){var s=this;i(this,n);const r=t.filter(function(t){return i(this,s),l.indexOf(t)>=0}.bind(this));if(r.length){const t=r[0],n=a.getId(t);e&&d[t]&&(d[t]=d[t].map(function(t){return i(this,s),(o?t<0:t>0)?t:0}.bind(this))),r.filter(function(t,e){return i(this,s),e>0}.bind(this)).forEach(function(r){var c=this;if(i(this,s),d[r]){const s=a.getId(r);d[r].forEach(function(a,r){i(this,c);const l=+a;s!==n||e&&(o?l>0:l<0)||(d[t][r]+=l)}.bind(this))}}.bind(this))}}.bind(this))}return rt(e,Object.keys(d).map(function(t){return i(this,n),rt(e,d[t])}.bind(this)))},isHiddenTargetWithYDomain:function(t){var e=this;const n=this;return n.state.hiddenTargetIds.some(function(s){return i(this,e),n.axis.getId(s)===t}.bind(this))},getYDomain:function(t,e,n){var s=this;const a=this,r=a.axis,o=a.config,c=a.scale,l="axis_"+e;if(a.isStackNormalized())return[0,100];const d=(null==c?void 0:c[e])&&"log"===c[e].type,u=t.filter(function(t){return i(this,s),r.getId(t.id)===e}.bind(this)),h=n?a.filterByXDomain(u,n):u;if(0===h.length)return a.isHiddenTargetWithYDomain(e)?c[e].domain():"y2"===e?c.y.domain():a.getYDomain(t,"y2",n);const f=o[l+"_min"],p=o[l+"_max"],x=o[l+"_center"],m=o[l+"_inverted"],_=a.hasDataLabel()&&o.axis_rotated,v=a.hasDataLabel()&&!o.axis_rotated;let y=a.getYDomainMinMax(h,"min"),T=a.getYDomainMinMax(h,"max"),w=[g.BAR,g.BUBBLE,g.SCATTER].concat(b.Line).some(function(t){i(this,s);const e=t.indexOf("area")>-1?"area":t;return a.hasType(t,h,!0)&&o[e+"_zerobased"]}.bind(this));y=S(f)?f:S(p)?y<=p?y:p-10:y,T=S(p)?p:S(f)?f<=T?T:f+10:T,isNaN(y)&&(y=0),isNaN(T)&&(T=y),y===T&&(y<0?T=0:y=0);const A=y>=0&&T>=0,k=y<=0&&T<=0;(S(f)&&A||S(p)&&k)&&(w=!1),w&&(A&&(y=0),k&&(T=0));const C=Math.abs(T-y);let R={top:.1*C,bottom:.1*C};if(O(x)){const t=Math.max(Math.abs(y),Math.abs(T));T=x+t,y=x-t}if(_){const t=D(c.y.range()),e=a.getDataLabelLength(y,T,"width").map(function(e){return i(this,s),e/t}.bind(this));["bottom","top"].forEach(function(t,n){i(this,s),R[t]+=C*(e[n]/(1-e[0]-e[1]))}.bind(this))}else if(v){const t=a.getDataLabelLength(y,T,"height");["bottom","top"].forEach(function(e,n){i(this,s),R[e]+=a.convertPixelToScale("y",t[n],C)}.bind(this))}R=a.getResettedPadding(R);const E=o[l+"_padding"];X(E)&&["bottom","top"].forEach(function(t){i(this,s),R[t]=r.getPadding(E,t,R[t],C)}.bind(this)),w&&(A&&(R.bottom=y),k&&(R.top=-T));const L=d?[y,T].map(function(t){return i(this,s),t<0?0:t}.bind(this)):[y-R.bottom,T+R.top];return m?L.reverse():L},getXDomainMinMax:function(t,e){var n,s=this;const a=this.config["axis_x_"+e],r=rt(e,t.map(function(t){var n=this;return i(this,s),rt(e,t.values.map(function(t){return i(this,n),t.x}.bind(this)))}.bind(this)));let o=F(a)?a.value:a;return o=O(o)&&null!=(n=this.axis)&&n.isTimeSeries()?dt.bind(this)(o):o,F(a)&&a.fit&&("min"===e&&or)&&(o=void 0),O(o)?o:r},getXDomainPadding:function(t,e){const i=this,n=i.axis,s=i.config.axis_x_padding,a=n.isTimeSeries()&&e,r=D(t);let o;if(n.isCategorized()||a)o=0;else if(i.hasType("bar")){const t=i.getMaxDataCount();o=t>1?r/(t-1)/2:.5}else o=i.getResettedPadding(.01*r);let c=R(s)?{left:s,right:s}:s,l=c.left,d=void 0===l?o:l,u=c.right,h=void 0===u?o:u;if("px"===s.unit){const t=Math.abs(r+.2*r);d=n.getPadding(s,"left",o,t),h=n.getPadding(s,"right",o,t)}else{const t=r+d+h;if(a&&t){const i=r/e/t;d=d/t/i,h=h/t/i}}return{left:d,right:h}},getXDomain:function(t){const e=this,i=e.axis,n=e.config,s=e.scale.x,a=n.axis_x_inverted,r=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let o=r[0],c=void 0===o?0:o,l=r[1],d=void 0===l?0:l;if("log"!==s.type){const t=i.isCategorized(),n=i.isTimeSeries(),s=e.getXDomainPadding(r);let a=r[0],o=r[1];a-o!=0||t||(n?(a=new Date(.5*a.getTime()),o=new Date(1.5*o.getTime())):(a=0===a?1:.5*a,o=0===o?-1:1.5*o)),(a||0===a)&&(c=n?new Date(a.getTime()-s.left):a-s.left),(o||0===o)&&(d=n?new Date(o.getTime()+s.right):o+s.right)}return a?[d,c]:[c,d]},updateXDomain:function(t,e,i,n,s){const a=this,r=a.config,o=a.org,c=a.scale,l=c.x,d=c.subX,u=r.zoom_enabled;var h;i&&(l.domain(s||at(a.getXDomain(t),!r.axis_x_inverted)),o.xDomain=l.domain(),u&&a.zoom.updateScaleExtent(),d.domain(l.domain()),null==(h=a.brush)||h.scale(d));if(e){const t=s||!a.brush||K(a)?o.xDomain:W(a).map(d.invert);l.domain(t),u&&a.zoom.updateScaleExtent()}return n&&l.domain(a.trimXDomain(l.orgDomain())),l.domain()},trimXDomain:function(t){const e=this.config.axis_x_inverted,i=this.getZoomDomain(),n=i[0],s=i[1];return(e?t[0]>=n:t[0]<=n)&&(t[0]=n,t[1]=+t[1]+(n-t[0])),(e?t[1]<=s:t[1]>=s)&&(t[0]=+t[0]-(t[1]-s),t[1]=s),t},getZoomDomain:function(t,e){void 0===t&&(t="zoom"),void 0===e&&(e=!1);const i=this,n=i.config,s=i.scale,a=i.org;let r=e&&s[t]?s[t].domain():a.xDomain,o=r[0],c=r[1];return"zoom"===t&&(O(n.zoom_x_min)&&(o=rt("min",[o,n.zoom_x_min])),O(n.zoom_x_max)&&(c=rt("max",[c,n.zoom_x_max]))),[o,c]},convertPixelToScale:function(t,e,i){const n=this.config,s=this.state,a=n.axis_rotated;let r;return r="x"===t?a?"height":"width":a?"width":"height",i*(e/s[r])},withinRange:function(t,e,n){var s=this;const a=this.config.axis_x_inverted,r=n,o=r[0],c=r[1];if(Array.isArray(t)){const n=[].concat(t);if(a&&n.reverse(),n[0]=o:a?+n>=c:+n<=c)&&!t.every(function(t,n){return i(this,l),t===e[n]}.bind(this))}.bind(this))}return!1}};function Be(t,e,i){const n=t.config,s="axis_"+e+"_tick_format";return(n[s]?n[s]:t.defaultValueFormat).call(t.api,i)}var Ne={yFormat:function(t){return Be(this,"y",t)},y2Format:function(t){return Be(this,"y2",t)},getDefaultValueFormat:function(){const t=this,e=t.defaultArcValueFormat,i=t.yFormat,n=t.y2Format,s=t.hasArcType(null,["gauge","polar","radar"]);return function(a,r,o){return(s?e:t.axis&&"y2"===t.axis.getId(o)?n:i).call(t,a,r)}},defaultValueFormat:function(t){return S(t)?+t:""},defaultArcValueFormat:function(t,e){return(100*e).toFixed(1)+"%"},defaultPolarValueFormat:function(t){return""+t},dataLabelFormat:function(t){var e=this;const n=this.config.data_labels,s=function(t){return i(this,e),S(t)?+t:""}.bind(this);let a=s;return k(n.format)?a=n.format:z(n.format)&&(a=n.format[t]?!0===n.format[t]?s:n.format[t]:function(){return i(this,e),""}.bind(this)),a.bind(this.api)}};function je(t){const e=this,i=e.getDataById(t);return e.levelColor?e.levelColor(i.values[0].value):e.color(i)}var Ge={initLegend:function(){const t=this,e=t.config,i=t.$el;t.legendItemTextBox={},t.state.legendHasRendered=!1,e.legend_show?(e.legend_contents_bindto||(i.legend=t.$el.svg.append("g").classed(kt.legend,!0).attr("transform",t.getTranslate("legend"))),t.updateLegend()):t.state.hiddenLegendIds=t.mapToIds(t.data.targets)},updateLegend:function(t,e,i){var n;const s=this,a=s.config,r=s.state,o=s.scale,c=s.$el,l=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};l.withTransition=B(l,"withTransition",!0),l.withTransitionForTransform=B(l,"withTransitionForTransform",!0),a.legend_contents_bindto&&a.legend_contents_template?s.updateLegendTemplate():r.hasTreemap||s.updateLegendElement(t||s.mapToIds(s.data.targets),l,i),null==(n=c.legend)||n.selectAll("."+kt.legendItem).classed(kt.legendItemHidden,(function(t){const e=!s.isTargetToShow(t);return e&&(this.style.opacity=null),e})),s.updateScales(!1,!o.zoom),s.updateSvgSize(),s.transformAll(l.withTransitionForTransform,i),r.legendHasRendered=!0},updateLegendTemplate:function(){var t=this;const e=this,n=e.config,a=e.$el,r=(0,s.select)(n.legend_contents_bindto),o=n.legend_contents_template;if(!r.empty()){const n=e.mapToIds(e.data.targets),s=[];let c="";n.forEach(function(n){i(this,t);const a=k(o)?o.bind(e.api)(n,e.color(n),e.api.data(n)[0].values):lt(o,{COLOR:e.color(n),TITLE:n});a&&(s.push(n),c+=a)}.bind(this));const l=r.html(c).selectAll((function(){return this.childNodes})).data(s);e.setLegendItem(l),a.legend=r}},updateSizeForLegend:function(t){const e=this,i=e.config,n=e.state,s=n.isLegendTop,a=n.isLegendLeft,r=n.isLegendRight,o=n.isLegendInset,c=n.current,l=t.width,d=t.height,u={top:s?e.getCurrentPaddingTop()+i.legend_inset_y+5.5:c.height-d-e.getCurrentPaddingBottom()-i.legend_inset_y,left:a?e.getCurrentPaddingLeft()+i.legend_inset_x+.5:c.width-l-e.getCurrentPaddingRight()-i.legend_inset_x+.5};e.state.margin3={top:r?0:o?u.top:c.height-d,right:NaN,bottom:0,left:r?c.width-l:o?u.left:0}},transformLegend:function(t){const e=this,i=e.$el.legend;(0,e.$T)(i,t).attr("transform",e.getTranslate("legend"))},updateLegendStep:function(t){this.state.legendStep=t},updateLegendItemWidth:function(t){this.state.legendItemWidth=t},updateLegendItemHeight:function(t){this.state.legendItemHeight=t},updateLegendItemColor:function(t,e){const i=this.$el.legend;i&&i.select("."+kt.legendItem+"-"+t+" line").style("stroke",e)},getLegendWidth:function(){const t=this.state,e=t.current.width,i=t.isLegendRight,n=t.isLegendInset,s=t.legendItemWidth,a=t.legendStep;return this.config.legend_show?i||n?s*(a+1):e:0},getLegendHeight:function(){var t;const e=this,i=e.state,n=i.current,s=i.isLegendRight,a=i.legendItemHeight,r=i.legendStep,o="fit"===(null==(t=e.config.padding)?void 0:t.mode);return e.config.legend_show?s?n.height:(o?10:Math.max(20,a))*(r+1):0},opacityForUnfocusedLegend:function(t){return t.classed(kt.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this;const a=this,r=a.$el.legend,o=a.$T,c=a.mapToTargetIds(t);r&&o(r.selectAll("."+kt.legendItem).filter(function(t){return i(this,n),c.indexOf(t)>=0}.bind(this)).classed(Et.legendItemFocused,e)).style("opacity",(function(){return e?null:a.opacityForUnfocusedLegend.call(a,(0,s.select)(this))}))},revertLegend:function(){const t=this.$el.legend,e=this.$T;t&&e(t.selectAll("."+kt.legendItem).classed(Et.legendItemFocused,!1)).style("opacity",null)},showLegend:function(t){const e=this,i=e.config,n=e.$el,s=e.$T;i.legend_show||(i.legend_show=!0,n.legend?n.legend.style("visibility",null):e.initLegend(),e.state.legendHasRendered||e.updateLegend()),e.removeHiddenLegendIds(t),s(n.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend:function(t){const e=this,i=e.config,n=e.$el.legend;i.legend_show&&M(t)&&(i.legend_show=!1,n.style("visibility","hidden")),e.addHiddenLegendIds(t),n.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox:function(t,e){const i=this,n=i.cache,s=i.state;let a;const r=le;return t&&(a=!s.redrawing&&n.get(r)||{},a[t]||(a[t]=i.getTextRect(e,kt.legendItem),n.add(r,a)),a=a[t]),a},setLegendItem:function(t){var e=this;const n=this,a=n.$el,r=n.api,o=n.config,c=n.state,l="touch"===c.inputType,d=n.hasType("gauge"),u=o.boost_useCssRule,h=o.legend_item_interaction;t.attr("class",(function(t){const e=(0,s.select)(this);return(!e.empty()&&e.attr("class")||"")+n.generateClass(kt.legendItem,t)})).style("visibility",function(t){return i(this,e),n.isLegendToShow(t)?null:"hidden"}.bind(this)),o.interaction_enabled&&(u&&[["."+kt.legendItem,"cursor:pointer"],["."+kt.legendItem+" text","pointer-events:none"],["."+kt.legendItemPoint+" text","pointer-events:none"],["."+kt.legendItemTile,"pointer-events:none"],["."+kt.legendItemEvent,"fill-opacity:0"]].forEach(function(t){i(this,e);const s=t[0],r=t[1];n.setCssRule(!1,s,[r])(a.legend)}.bind(this)),t.on(h.dblclick?"dblclick":"click",h||k(o.legend_item_onclick)?function(t,e){if(!N(o.legend_item_onclick,r,e)){const i=t.altKey,n=t.target;"dblclick"===t.type||i?c.hiddenTargetIds.length&&-1===n.parentNode.getAttribute("class").indexOf(kt.legendItemHidden)?r.show():(r.hide(),r.show(e)):(r.toggle(e),(0,s.select)(this).classed(Et.legendItemFocused,!1))}l&&n.hideTooltip()}:null),l||t.on("mouseout",h||k(o.legend_item_onout)?function(t,e){N(o.legend_item_onout,r,e)||((0,s.select)(this).classed(Et.legendItemFocused,!1),d&&n.undoMarkOverlapped(n,"."+St.gaugeValue),n.api.revert())}:null).on("mouseover",h||k(o.legend_item_onover)?function(t,e){N(o.legend_item_onover,r,e)||((0,s.select)(this).classed(Et.legendItemFocused,!0),d&&n.markOverlapped(e,n,"."+St.gaugeValue),!c.transiting&&n.isTargetToShow(e)&&r.focus(e))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",n.getStylePropValue("pointer")))},updateLegendElement:function(t,e){var n=this;const s=this,a=s.config,r=s.state,o=s.$el.legend,c=s.$T,l="circle"!==a.legend_item_tile_type,d=a.legend_item_tile_r,u={width:l?a.legend_item_tile_width:2*d,height:l?a.legend_item_tile_height:2*d},h={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:u.width+5,totalLength:0},g={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let f,p,x;const b=t.filter(function(t){return i(this,n),!O(a.data_names[t])||null!==a.data_names[t]}.bind(this)),m=e.withTransition,_=s.getUpdateLegendPositions(b,h,g);r.isLegendInset&&(h.step=a.legend_inset_step?a.legend_inset_step:b.length,s.updateLegendStep(h.step)),r.isLegendRight?(f=function(t){return i(this,n),h.max.width*g.steps[t]}.bind(this),p=function(t){return i(this,n),g.margins[g.steps[t]]+g.offsets[t]}.bind(this)):r.isLegendInset?(f=function(t){return i(this,n),h.max.width*g.steps[t]+10}.bind(this),p=function(t){return i(this,n),g.margins[g.steps[t]]+g.offsets[t]}.bind(this)):(f=function(t){return i(this,n),g.margins[g.steps[t]]+g.offsets[t]}.bind(this),p=function(t){return i(this,n),h.max.height*g.steps[t]}.bind(this));const v={xText:function(t,e){return i(this,n),f(t,e)+4+u.width}.bind(this),xRect:function(t,e){return i(this,n),f(t,e)}.bind(this),x1Tile:function(t,e){return i(this,n),f(t,e)-2}.bind(this),x2Tile:function(t,e){return i(this,n),f(t,e)-2+u.width}.bind(this),yText:function(t,e){return i(this,n),p(t,e)+9}.bind(this),yRect:function(t,e){return i(this,n),p(t,e)-5}.bind(this),yTile:function(t,e){return i(this,n),p(t,e)+4}.bind(this)};s.generateLegendItem(b,u,_,v),x=o.select("."+kt.legendBackground+" rect"),r.isLegendInset&&h.max.width>0&&0===x.size()&&(x=o.insert("g","."+kt.legendItem).attr("class",kt.legendBackground).append("rect"));c(o.selectAll("text").data(b).text(function(t){return i(this,n),O(a.data_names[t])?a.data_names[t]:t}.bind(this)).each((function(t,e){_(this,t,e)})),m).attr("x",v.xText).attr("y",v.yText);c(o.selectAll("rect."+kt.legendItemEvent).data(b),m).attr("width",function(t){return i(this,n),g.widths[t]}.bind(this)).attr("height",function(t){return i(this,n),g.heights[t]}.bind(this)).attr("x",v.xRect).attr("y",v.yRect),s.updateLegendItemPos(b,m,v),x&&c(x,m).attr("height",s.getLegendHeight()-12).attr("width",h.max.width*(h.step+1)+10),s.updateLegendItemWidth(h.max.width),s.updateLegendItemHeight(h.max.height),s.updateLegendStep(h.step)},getUpdateLegendPositions:function(t,e,n){const s=this,a=s.config,r=s.state,o=r.isLegendRight||r.isLegendInset;return function(c,l,d){var u=this;const h=d===t.length-1,g=s.getLegendItemTextBox(l,c),f=g.width+e.tileWidth+(h&&!o?0:e.padding.right)+a.legend_padding,p=g.height+e.padding.top,x=o?p:f,b=o?s.getLegendHeight():s.getLegendWidth();let m;const _=function(t,i){i||(m=(b-e.totalLength-x)/2,m=e.max.width)&&(e.max.width=f),(!e.max.height||p>=e.max.height)&&(e.max.height=p);const v=o?e.max.height:e.max.width;a.legend_equally?(Object.keys(n.widths).forEach(function(t){return i(this,u),n.widths[t]=e.max.width}.bind(this)),Object.keys(n.heights).forEach(function(t){return i(this,u),n.heights[t]=e.max.height}.bind(this)),m=(b-v*t.length)/2,m1&&d&&(o&&(f+=d*o),g>2?f-=(g-1)*d/2:2===g&&(f-=d/2)),f}.bind(this)},getShapeY:function(t){var e=this;const n=this,s=n.isStackNormalized();return function(a){i(this,e);let r=a.value;return R(a)?r=a:s?r=n.getRatio("index",a,!0):n.isBubbleZType(a)?r=n.getBubbleZData(a.value,"y"):n.isBarRangeType(a)&&(r=r[1]),n.getYScaleById(a.id,t)(r)}.bind(this)},getShapeYMin:function(t){const e=this,i=e.axis.getId(t),n=e.scale[i].domain()[0],s=e.config["axis_"+i+"_inverted"];return!e.isGrouped(t)&&!s&&n>0?n:0},getShapeOffsetData:function(t){var e=this;const n=this,s=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),a=n.isStackNormalized(),r=s.map(function(t){var s=this;i(this,e);let r=t.values;const o={};n.isStepType(t)&&(r=n.convertValuesToStep(r));const c=r.reduce(function(t,e){i(this,s);const r=+e.x;return t[r]=e,o[r]=a?n.getRatio("index",e,!0):e.value,t}.bind(this),{});return{id:t.id,rowValues:r,rowValueMapByXValue:c,values:o}}.bind(this));return{indexMapByTargetId:s.reduce(function(t,n,s){let a=n.id;return i(this,e),t[a]=s,t}.bind(this),{}),shapeOffsetTargets:r}},getShapeOffset:function(t,e,n){var s=this;const a=this,r=a.getShapeOffsetData(t),o=r.shapeOffsetTargets,c=r.indexMapByTargetId,l=a.config.data_groupsZeroAs;return function(t,r){var d=this;i(this,s);const u=t.id,h=t.value,g=t.x,f=a.getIndices(e,t),p=a.getYScaleById(u,n);if(a.isBarRangeType(t))return p(h[0]);const x=+g,b=p("zero"===l?0:a.getShapeYMin(u));let m=b;return o.filter(function(t){return i(this,d),t.id!==u&&f[t.id]===f[u]}.bind(this)).forEach(function(t){i(this,d);const e=t.id,n=t.rowValueMapByXValue,s=t.rowValues,a=t.values;if(c[e]=0&&R(t)){(0!==h||("positive"===l&&t>0||"negative"===l&&t<0))&&(m+=p(t)-b)}}}.bind(this)),m}.bind(this)},getBarW:function(t,e,n){var s=this;const a=this,r=a.config,o=a.org,c=a.scale,l=a.getMaxDataCount(),d="bar"===t&&r.data_groups.length,u=t+"_width",h=c.zoom&&!a.axis.isCategorized()?o.xDomain.map(function(t){return i(this,s),c.zoom(t)}.bind(this)).reduce(function(t,e){return i(this,s),Math.abs(t)+e}.bind(this))/l:e.tickInterval(l),g=function(t){i(this,s);const e=t?r[u][t]:r[u],a=t?e.ratio:r[u+"_ratio"],o=t?e.max:r[u+"_max"],c=R(e)?e:n?h*a/n:0;return o&&c>o?o:c}.bind(this);let f=g();return!d&&z(r[u])&&(f={_$width:f,_$total:[]},a.filterTargetsToShow(a.data.targets).forEach(function(t){i(this,s),r[u][t.id]&&(f[t.id]=g(t.id),f._$total.push(f[t.id]||f._$width))}.bind(this))),f},getShapeByIndex:function(t,e,n){var s=this;const a=this,r=a.$el,o=S(e)?"-"+e:"";let c=r[t];return c=c&&!c.empty()?c.filter(function(t){return i(this,s),!n||t.id===n}.bind(this)).filter(function(t){return i(this,s),!S(e)||t.index===e}.bind(this)):(n?r.main.selectAll("."+jt[t+"s"]+a.getTargetSelectorSuffix(n)):r.main).selectAll("."+jt[t]+o),c},isWithinShape:function(t,e){const i=this,n=(0,s.select)(t);let a;return i.isTargetToShow(e.id)?null!=i.hasValidPointType&&i.hasValidPointType(t.nodeName)?a=i.isStepType(e)?i.isWithinStep(t,i.getYScaleById(e.id)(e.value)):i.isWithinCircle(t,i.isBubbleType(e)?1.5*i.pointSelectR(e):0):"path"===t.nodeName&&(a=!n.classed(jt.bar)||i.isWithinBar(t)):a=!1,a},getInterpolate:function(t){const e=this.getInterpolateType(t);return{basis:Ue.curveBasis,"basis-closed":Ue.curveBasisClosed,"basis-open":Ue.curveBasisOpen,bundle:Ue.curveBundle,cardinal:Ue.curveCardinal,"cardinal-closed":Ue.curveCardinalClosed,"cardinal-open":Ue.curveCardinalOpen,"catmull-rom":Ue.curveCatmullRom,"catmull-rom-closed":Ue.curveCatmullRomClosed,"catmull-rom-open":Ue.curveCatmullRomOpen,"monotone-x":Ue.curveMonotoneX,"monotone-y":Ue.curveMonotoneY,natural:Ue.curveNatural,"linear-closed":Ue.curveLinearClosed,linear:Ue.curveLinear,step:Ue.curveStep,"step-after":Ue.curveStepAfter,"step-before":Ue.curveStepBefore}[e]},getInterpolateType:function(t){const e=this,i=e.config,n=i.spline_interpolation_type,s=e.isInterpolationType(n)?n:"cardinal";return e.isSplineType(t)?s:e.isStepType(t)?i.line_step_type:"linear"},isWithinBar:function(t){const e=H(this.state.event,t),i=Y(t),n=i[0],s=i[1],a=Math.min(n.x,s.x),r=Math.min(n.y,s.y),o=this.config.bar_sensitivity,c=t.getBBox(),l=c.width,d=c.height;return a-o0?i:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getCurrentPaddingTop:function(){const t=this,e=t.config,i=t.state.hasAxis,n=t.$el,s=i?e.axis_y2_axes.length:0;let a=S(e.padding_top)?e.padding_top:0;return n.title&&n.title.node()&&(a+=t.getTitlePadding()),s&&e.axis_rotated&&(a+=t.getHorizontalAxisHeight("y2")*s),a},getCurrentPaddingBottom:function(){const t=this,e=t.config,i=t.state.hasAxis,n=e.axis_rotated?"y":"x",s=i?e["axis_"+n+"_axes"].length:0;return(S(e.padding_bottom)?e.padding_bottom:0)+(s?t.getHorizontalAxisHeight(n)*s:0)},getCurrentPaddingLeft:function(t){var e;const i=this,n=i.config,s=i.state.hasAxis,a=n.axis_rotated,r="fit"===(null==(e=n.padding)?void 0:e.mode),o=a?"x":"y",c=s?n["axis_"+o+"_axes"].length:0;let l=s?i.getAxisWidthByAxisId(o,t):0;r||(l=P(l));let d=n["axis_"+o+"_inner"]||!n["axis_"+o+"_show"]?0:l;return S(n.padding_left)?d=n.padding_left+(r&&a?l:0):s&&a&&(d=n.axis_x_show?r?l:Math.max(l,40):1),s&&(r||n["axis_"+o+"_inner"])&&n["axis_"+o+"_label"].text&&(d+=i.axis.getAxisLabelPosition("y").isOuter?20:0),d+l*c},getCurrentPaddingRight:function(t){var e,i;void 0===t&&(t=!1);const n=this,s=n.config,a=n.state.hasAxis,r=s.axis_rotated,o="fit"===(null==(e=s.padding)?void 0:e.mode),c=o?2:10,l=n.state.isLegendRight?n.getLegendWidth()+20:0,d=a?s.axis_y2_axes.length:0,u=null!=(i=n.axis)&&i.getAxisLabelPosition("y2").isOuter?20:0,h=t?n.axis.getXAxisTickTextY2Overflow(c):0;let g=a&&!s.axis_y2_inner?n.getAxisWidthByAxisId("y2"):1;o||(g=P(g));let f=r?0:Math.max(g+l,h);return S(s.padding_right)?f=s.padding_right+(o&&(r||!s.axis_y2_show?c:f))+(a&&!o?1:0):n.axis&&r?f=c+l:!n.axis||s.axis_y2_show&&!s.axis_y2_inner||(f=Math.max((o&&!s.axis_y2_show?2:1)+l+u,h)),a&&!r&&o&&s.axis_y2_show&&!s.axis_y2_inner&&s.axis_y2_label.text&&(f+=u),f+g*d},getParentRectValue:function(t){const e="offset"+Q(t);let i=this.$el.chart.node(),n=0;for(;n<30&&i&&"BODY"!==i.tagName;){try{n=i.getBoundingClientRect()[t]}catch(t){e in i&&(n=i[e])}i=i.parentNode}const s=h.body[e];return n>s&&(n=s),n},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft:function(t){const e=this,i=e.config,n=e.$el,s=i.axis_rotated||!i.axis_rotated&&!i.axis_y_inner,a=i.axis_rotated?_t.axisX:_t.axisY,r=n.main.select("."+a).node(),o=r&&s?r.getBoundingClientRect():{right:0},c=n.chart.node().getBoundingClientRect(),l=e.hasArcType(),d=o.right-c.left-(l?0:e.getCurrentPaddingLeft(t));return d>0?d:0},updateDimension:function(t){const e=this,i=e.config,n=e.state.hasAxis,s=e.$el;var a;n&&!t&&e.axis.x&&i.axis_rotated&&(null==(a=e.axis.subX)||a.create(s.axis.subX));e.updateScales(t),e.updateSvgSize(),e.transformAll(!1)},updateSvgSize:function(){const t=this,e=t.state,i=e.clip,n=e.current,s=e.hasAxis,a=e.width,r=e.height,o=t.$el.svg;if(o.attr("width",n.width).attr("height",n.height),s){const e=o.select("."+Xt.brush+" .overlay"),n={width:0,height:0};e.size()&&(n.width=+e.attr("width"),n.height=+e.attr("height")),o.selectAll(["#"+i.id,"#"+i.idGrid]).select("rect").attr("width",a).attr("height",r),o.select("#"+i.idXAxis).select("rect").call(t.setXAxisClipPath.bind(t)),o.select("#"+i.idYAxis).select("rect").call(t.setYAxisClipPath.bind(t)),i.idSubchart&&o.select("#"+i.idSubchart).select("rect").attr("width",a).attr("height",n.height)}},getCurrentPadding:function(){const t=this;return{top:t.getCurrentPaddingTop(),bottom:t.getCurrentPaddingBottom(),left:t.getCurrentPaddingLeft(),right:t.getCurrentPaddingRight()}},getResettedPadding:function(t){var e=this;const n=this.config,s=R(t);let a=s?0:{};return!1===n.padding?s||Object.keys(t).forEach(function(s){i(this,e),a[s]=M(n.data_labels)||!1===n.data_labels||"top"!==s?0:t[s]}.bind(this)):a=t,a},updateSizes:function(t){var e;const i=this,n=i.config,s=i.state,a=i.$el.legend,r=n.axis_rotated,o=i.hasArcType()||s.hasTreemap,c="fit"===(null==(e=n.padding)?void 0:e.mode);t||i.setContainerSize();const l={width:a?i.getLegendWidth():0,height:a?i.getLegendHeight():0};!o&&n.axis_x_show&&n.axis_x_tick_autorotate&&i.updateXAxisTickClip();const d=s.isLegendRight||s.isLegendInset?0:l.height,u=r||o?0:i.getHorizontalAxisHeight("x"),h=n.subchart_axis_x_show&&n.subchart_axis_x_tick_text_show?u:30,g=n.subchart_show&&!o?n.subchart_size_height+h:0,f=i.hasType("gauge")&&n.arc_needle_show&&!n.gauge_fullCircle&&!n.gauge_label_show?10:0,p=i.getCurrentPadding();if(s.margin=!o&&r?{top:i.getHorizontalAxisHeight("y2")+p.top,right:o?0:i.getCurrentPaddingRight(!0),bottom:i.getHorizontalAxisHeight("y")+d+p.bottom,left:g+(o?0:p.left)}:{top:(c?0:4)+p.top,right:o?0:i.getCurrentPaddingRight(!0),bottom:f+u+g+d+p.bottom,left:o?0:p.left},s.margin=i.getResettedPadding(s.margin),s.margin2=r?{top:s.margin.top,right:NaN,bottom:20+d,left:i.state.rotatedPadding.left}:{top:s.current.height-g-d,right:NaN,bottom:h+d,left:s.margin.left},s.margin3={top:0,right:NaN,bottom:0,left:0},null==i.updateSizeForLegend||i.updateSizeForLegend(l),s.width=s.current.width-s.margin.left-s.margin.right,s.height=s.current.height-s.margin.top-s.margin.bottom,s.width<0&&(s.width=0),s.height<0&&(s.height=0),s.width2=r?s.margin.left-s.rotatedPadding.left-s.rotatedPadding.right:s.width,s.height2=r?s.height:s.current.height-s.margin2.top-s.margin2.bottom,s.width2<0&&(s.width2=0),s.height2<0&&(s.height2=0),i.hasArcType()){const t=i.hasType("gauge"),e=n.legend_show&&s.isLegendRight;s.arcWidth=s.width-(e?l.width+10:0),s.arcHeight=s.height-(e&&!t?0:10),t&&!n.gauge_fullCircle&&(s.arcHeight+=s.height-i.getPaddingBottomForGauge()),null==i.updateRadius||i.updateRadius()}s.isLegendRight&&o&&(s.margin3.left=s.arcWidth/2+1.1*s.radiusExpanded)}},Ke={setCssRule:function(t,e,n,s){var a=this;const r=this,o=r.config,c=r.state,l=c.cssRule,d=c.style;return o.boost_useCssRule?function(o){var c=this;i(this,a),o.each(function(a){var o=this;i(this,c);const u=s&&(null==s?void 0:s.call(r,a)),h=(t?"."+(Mt.shapes+r.getTargetSelectorSuffix(a.id)):"")+e;e in l&&d.sheet.deleteRule(l[h]),r.state.cssRule[h]=function(t,e,n){var s=this;const a=t.rootSelctor,r=t.sheet,o=a+" "+function(t){return i(this,s),t.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,".")}.bind(this)(e)+" {"+n.join(";")+"}";return r[r.insertRule?"insertRule":"addRule"](o,r.cssRules.length)}(d,h,n.filter(Boolean).map(function(t){return i(this,o),C(u)&&-1===t.indexOf(":")?t+": "+u:t||""}.bind(this)))}.bind(this))}.bind(this):function(){i(this,a)}.bind(this)},getStylePropValue:function(t){return this.config.boost_useCssRule?null:k(t)?t.bind(this):t}};function Je(t,e,i,n,s){var a;const r=t.value,o=this.isCandlestickType(t),c=R(r)&&r<0||o&&!(null!=(a=this.getCandlestickData(t))&&a._isUp);let l=e.x,d=e.y;return n?"start"===i?(l+=c?0:8,d+=4):"middle"===i?(l+=8,d-=8):"end"===i&&(c&&(l-=8),d+=4):("start"===i?(l+=4,c&&(d+=16)):"middle"===i?d-=8:"end"===i&&(l-=4,c&&(d+=16)),s&&(d+=c?-17:o?13:7)),{x:l,y:d}}function Qe(t,e){var i;const n=this.config.data_labels_position,s=t.id,a=t.index,r=t.value;return null!=(i=k(n)?n.bind(this.api)(e,r,s,a,this.$el.text):(s in n?n[s]:n)[e])?i:0}var ti={opacityForText:function(t){const e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?null:"0"},initText:function(){const t=this.$el;t.main.select("."+xt.chart).append("g").attr("class",$t.chartTexts).style("pointer-events",t.treemap?"none":null)},updateTargetsForText:function(t){var e=this;const n=this,s=n.getChartClass("Text"),a=n.getClass("texts","id"),r=n.classFocus.bind(n);n.$el.main.select("."+$t.chartTexts).selectAll("."+$t.chartText).data(t).attr("class",function(t){return i(this,e),(""+s(t)+r(t)).trim()}.bind(this)).enter().append("g").style("opacity","0").attr("class",s).call(n.setCssRule(!0," ."+$t.text,["fill","pointer-events:none"],n.updateTextColor)).append("g").attr("class",a)},updateText:function(){var t=this;const e=this,n=e.$el,a=e.$T,r=e.config,o=e.axis,c=e.getClass("text","index"),l=r.data_labels.centered,d=n.main.selectAll("."+$t.texts).selectAll("."+$t.text).data(e.labelishData.bind(e));a(d.exit()).style("fill-opacity","0").remove(),n.text=d.enter().append("text").merge(d).attr("class",c).attr("text-anchor",function(n){i(this,t);let s=r["axis_"+(null==o?void 0:o.getId(n.id))+"_inverted"]?n.value>0:n.value<0;if(e.isCandlestickType(n)){const t=e.getCandlestickData(n);s=!(null!=t&&t._isUp)}else if(e.isTreemapType(n))return l?"middle":"start";return r.axis_rotated?s?"end":"start":"middle"}.bind(this)).style("fill",e.getStylePropValue(e.updateTextColor)).style("fill-opacity","0").each((function(t,i,n){const a=(0,s.select)(this);let r=t.value;if(e.isBubbleZType(t))r=e.getBubbleZData(r,"z");else if(e.isCandlestickType(t)){const i=e.getCandlestickData(t);i&&(r=i.close)}r=e.isTreemapType(t)?e.treemapDataLabelFormat(t)(a):e.dataLabelFormat(t.id)(r,t.id,i,n),R(r)?this.textContent=r:V(a,r)}))},updateTextColor:function(t){const e=this,i=e.config,n=i.data_labels_colors,s=e.isArcType(t)&&!e.isRadarType(t)||e.isTreemapType(t)?null:e.color(t);let a;if(C(n))a=n;else if(F(n)){a=n[(t.data||t).id]}else k(n)&&(a=n.bind(e.api)(s,t));if(e.isCandlestickType(t)&&!k(n)){const n=e.getCandlestickData(t);if(null==n||!n._isUp){const e=i.candlestick_color_down;a=F(e)?e[t.id]:e}}return a||s},updateTextBacgroundColor:function(t){const e=this,i=e.$el,n=e.config.data_labels_backgroundColors;let s="";if(C(n)||F(n)){const a=C(n)?"":e.getTargetSelectorSuffix("id"in t?t.id:t.data.id),r=i.defs.select(["filter[id*='labels-bg","']"].join(a));r.size()&&(s="url(#"+r.attr("id")+")")}return s||null},redrawText:function(t,e,i,n){const s=this,a=s.$T,r=s.axis,o=s.config,c=s.state.hasTreemap,l=Z(!0),d=o.axis_rotated,u=o.data_labels.rotate,h=function(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}(u),g=u?"rotate("+u+")":"";return s.$el.text.style("fill",s.getStylePropValue(s.updateTextColor)).attr("filter",s.updateTextBacgroundColor.bind(s)).style("fill-opacity",i?0:s.opacityForText.bind(s)).each((function(i,f){const p=a(c&&this.childElementCount?this.parentNode:this,!(!n||!this.getAttribute("x")),l),x=o["axis_"+(null==r?void 0:r.getId(i.id))+"_inverted"];let b={x:t.bind(this)(i,f),y:e.bind(this)(i,f)};u&&(b=Je.bind(s)(i,b,h,d,x),p.attr("text-anchor",h)),this.childElementCount||u?p.attr("transform","translate("+b.x+" "+b.y+") "+g):p.attr("x",b.x).attr("y",b.y)})),!0},getTextRect:function(t,e){var n=this;const a=this;let r=t.node?t.node():t;/text/i.test(r.tagName)||(r=r.querySelector("text"));const o=r.textContent,c=ge+"-"+o.replace(/\W/g,"_");let l=a.cache.get(c);return l||(a.$el.svg.append("text").style("visibility","hidden").style("font",(0,s.select)(r).style("font")).classed(e,!0).text(o).call(function(t){i(this,n),l=U(t.node())}.bind(this)).remove(),a.cache.add(c,l)),l},generateXYForText:function(t,e){var n=this;const s=this,a=s.state,r=a.hasRadar,o=a.hasTreemap,c=Object.keys(t),l={},d=e?s.getXForText:s.getYForText;return r&&c.push("radar"),o&&c.push("treemap"),c.forEach(function(e){i(this,n),l[e]=s["generateGet"+Q(e)+"Points"](t[e],!1)}.bind(this)),function(t,e){const i=(s.isAreaType(t)?"area":s.isBarType(t)&&"bar")||s.isCandlestickType(t)&&"candlestick"||s.isRadarType(t)&&"radar"||s.isTreemapType(t)&&"treemap"||"line";return d.call(s,l[i](t,e),t,this)}},getCenteredTextPos:function(t,e,i,n){const s=this,a=s.config,r=a.axis_rotated,o=s.isBarType(t),c=s.isTreemapType(t);if(a.data_labels.centered&&(o||c)){const s=U(i);if(o){const i=t.value>=0;if(r){const t=(i?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+s.width/2;return i?-t-3:t+2}{const t=(i?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+s.height/2;return i?t:-t-2}}if(c)return"x"===n?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2+s.height/2}return 0},getXForText:function(t,e,i){const n=this,s=n.config,a=n.state,r=s.axis_rotated,o=n.isTreemapType(e);let c=t[0][0];var l;if(n.isCandlestickType(e))r?c=null!=(l=n.getCandlestickData(e))&&l._isUp?t[2][2]+4:t[2][1]-4:c+=(t[1][0]-c)/2;else if(o)c+=s.data_labels.centered?0:5;else if(r){const i=s["axis_"+n.axis.getId(e.id)+"_inverted"],a=n.isBarType(e)?4:6,r=e.value;c=t[2][1],i?c-=a*(r>0?1:-1):c+=a*(r<0?-1:1)}else c=n.hasType("bar")?(t[2][0]+t[0][0])/2:c;if(null===e.value)if(c>a.width){const t=U(i).width;c=a.width-t}else c<0&&(c=4);return(r||o)&&(c+=n.getCenteredTextPos(e,t,i,"x")),c+Qe.call(this,e,"x")},getYForText:function(t,e,i){const n=this,s=n.axis,a=n.config,r=n.state,o=a.axis_rotated,c=a["axis_"+(null==s?void 0:s.getId(e.id))+"_inverted"],l=n.isBarType(e),d=n.isTreemapType(e),u=a.point_r,h=U(i);let g,f=e.value,p=3;if(n.isCandlestickType(e))f=n.getCandlestickData(e),o?(g=t[0][0],g+=(t[1][0]-g)/2+p):(g=f&&f._isUp?t[2][2]-p:t[2][1]+4*p,c&&(g+=15*(f._isUp?1:-1)));else if(d)g=t[0][1]+(a.data_labels.centered?0:h.height+5);else if(o)g=(t[0][0]+t[2][0]+.6*h.height)/2;else if(g=t[2][1],R(u)&&u>5&&(n.isLineType(e)||n.isScatterType(e))&&(p+=a.point_r/2.3),f<0||0===f&&!r.hasPositiveValue&&r.hasNegativeValue)g+=c?l?-3:-5:h.height+(l?-p:p);else{let t=2*-p;l?t=-p:n.isBubbleType(e)&&(t=p),c&&(t=l?10:15),g+=t}if(null===e.value&&!o){const t=h.height;gr.height&&(g=r.height-4)}return o&&!d||(g+=n.getCenteredTextPos(e,t,i,"y")),g+Qe.call(this,e,"y")},markOverlapped:function(t,e,n){var a=this;const r=e.$el.arcs.selectAll(n),o=r.filter(function(e){return i(this,a),e.data.id!==t}.bind(this)),c=r.filter(function(e){return i(this,a),e.data.id===t}.bind(this)),l=et(c.node()),d=function(t,e){return i(this,a),Math.sqrt(Math.pow(t,2)+Math.pow(e,2))}.bind(this);c.node()&&o.each((function(){const t=et(this),e=(0,s.select)(this),i=d(l.e,l.f)>d(t.e,t.f)?c:e,n=Math.ceil(Math.abs(l.e-t.e))=(this.config[e+"_label_threshold"]||0)}};function ei(t,e){void 0===t&&(t="left");const i=R(e);let n;return n=t.indexOf("center")>-1?i?e/2:"middle":t.indexOf("right")>-1?i?e:"end":i?0:"start",n}var ii={initTitle:function(){const t=this.config,e=this.$el;if(t.title_text){e.title=e.svg.append("g");V(e.title.append("text").style("text-anchor",ei(t.title_position)).attr("class",$t.title),t.title_text,[.3,1.5])}},redrawTitle:function(){const t=this,e=t.config,i=t.state.current,n=t.$el.title;if(n){const s=t.yForTitle.call(t);/g/i.test(n.node().tagName)?n.attr("transform","translate("+ei(e.title_position,i.width)+", "+s+")"):n.attr("x",t.xForTitle.call(t)).attr("y",s)}},xForTitle:function(){const t=this,e=t.config,i=t.state.current,n=e.title_position||"left",s=t.getTextRect(t.$el.title,$t.title).width;let a;return/(right|center)/.test(n)?(a=i.width-s,n.indexOf("right")>=0?a=i.width-s-e.title_padding.right:n.indexOf("center")>=0&&(a=(i.width-s)/2)):a=e.title_padding.left||0,a},yForTitle:function(){const t=this;return(t.config.title_padding.top||0)+t.getTextRect(t.$el.title,$t.title).height},getTitlePadding:function(){return this.yForTitle()+(this.config.title_padding.bottom||0)}},ni={initTooltip:function(){const t=this,e=t.config,i=t.$el;i.tooltip=(0,s.select)(e.tooltip_contents.bindto),i.tooltip.empty()&&(i.tooltip=i.chart.append("div").attr("class",Ft.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip:function(){var t=this;const e=this,n=e.config,s=e.$el,a=e.state,r=a.hasAxis,o=a.hasRadar;if(n.tooltip_init_show){var c,l;const a=!(r&&o);if(null!=(c=e.axis)&&c.isTimeSeries()&&C(n.tooltip_init_x)){const t=e.data.targets[0];let i,s;for(n.tooltip_init_x=dt.call(e,n.tooltip_init_x),i=0;(s=t.values[i])&&s.x-n.tooltip_init_x!=0;i++);n.tooltip_init_x=i}let d=e.data.targets.map(function(s){i(this,t);const r=a?0:n.tooltip_init_x;return e.addName(s.values[r])}.bind(this));a&&(d=[d[n.tooltip_init_x]]),s.tooltip.html(e.getTooltipHTML(d,null==(l=e.axis)?void 0:l.getXAxisTickFormat(),e.getDefaultValueFormat(),e.color)),n.tooltip_contents.bindto||s.tooltip.style("top",n.tooltip_init_position.top).style("left",n.tooltip_init_position.left).style("display",null)}},getTooltipHTML:function(){const t=this,e=t.api,i=t.config;return k(i.tooltip_contents)?i.tooltip_contents.bind(e).apply(void 0,arguments):t.getTooltipContent.apply(t,arguments)},getTooltipContent:function(t,e,n,s){var a=this;const r=this,o=r.api,c=r.config,l=r.state,d=r.$el;let u=["title","name","value"].map(function(t){i(this,a);const e=c["tooltip_format_"+t];return k(e)?e.bind(o):e}.bind(this)),h=u[0],g=u[1],f=u[2];h=h||e,g=g||function(t){return i(this,a),t}.bind(this),f=f||(l.hasTreemap||r.isStackNormalized()?function(t,e){return i(this,a),(100*e).toFixed(2)+"%"}.bind(this):n);const p=c.tooltip_order,x=function(t){return i(this,a),r.axis&&r.isBubbleZType(t)?r.getBubbleZData(t.value,"z"):r.getBaseValue(t)}.bind(this),b=r.levelColor?function(t){return i(this,a),r.levelColor(t.value)}.bind(this):function(t){return i(this,a),s(t)}.bind(this),m=c.tooltip_contents,_=m.template,v=r.mapToTargetIds();if(null===p&&c.data_groups.length){const e=r.orderTargets(r.data.targets).map(function(t){return i(this,a),t.id}.bind(this)).reverse();t.sort(function(t,n){i(this,a);let s=t?t.value:null,r=n?n.value:null;return s>0&&r>0&&(s=t.id?e.indexOf(t.id):null,r=n.id?e.indexOf(n.id):null),s-r}.bind(this))}else/^(asc|desc)$/.test(p)?t.sort(function(t,e){i(this,a);const n=t?x(t):null,s=e?x(e):null;return"asc"===p?n-s:s-n}.bind(this)):k(p)&&t.sort(p.bind(o));const y=r.getTooltipContentTemplate(_),T=t.length;let w,A,C,R,O;for(O=0;O'+t+"":""})}if(!A.ratio&&d.arcs&&(C=["arc",r.$el.arcs.select("path."+bt.arc+"-"+A.id).data()[0]],A.ratio=r.getRatio.apply(r,C)),C=[A.ratio,A.id,A.index,t],R=G(f.apply(void 0,[x(A)].concat(C))),r.isAreaRangeType(A)){const t=["high","low"].map(function(t){return i(this,a),G(f.apply(void 0,[r.getRangedData(A,t)].concat(C)))}.bind(this));R="Mid: "+R+" High: "+t[0]+" Low: "+t[1]}else if(r.isCandlestickType(A)){const t=["open","high","low","close","volume"].map(function(t){return i(this,a),G(f.apply(void 0,[r.getRangedData(A,t,"candlestick")].concat(C)))}.bind(this)),e=t[0],n=t[1],s=t[2],o=t[3],c=t[4];R="Open: "+e+" High: "+n+" Low: "+s+" Close: "+o+(c?" Volume: "+c:"")}else if(r.isBarRangeType(A)){const t=A.value,e=t[0],i=t[1];R=f(e)+" ~ "+f(i)}if(void 0!==R){if(null===A.name)continue;const t=G(g.apply(void 0,[A.name].concat(C))),e=b(A),n={CLASS_TOOLTIP_NAME:Ft.tooltipName+r.getTargetSelectorSuffix(A.id),COLOR:_||!r.patterns?e:'',NAME:t,VALUE:R};if(_&&F(m.text)){const t=v.indexOf(A.id);Object.keys(m.text).forEach(function(e){i(this,a),n[e]=m.text[e][t]}.bind(this))}w+=lt(y[1],n)}}return w+""},getTooltipContentTemplate:function(t){return(t||'\n\t\t\t\t{=TITLE}\n\t\t\t\t{{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}}\n\t\t\t
'+(this.patterns?"{=COLOR}":'')+'{=NAME}{=VALUE}
').replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},setTooltipPosition:function(t,e){var n=this;const s=this,a=s.config,r=s.scale,o=s.state,c=s.$el,l=c.eventRect,d=c.tooltip,u=a.tooltip_contents.bindto,h=d.datum();if(!u&&h){var g,f;const c=H(o.event,null!=e?e:null==l?void 0:l.node()),u={x:c[0],y:c[1]};r.x&&h&&"x"in h&&(u.xAxis=r.x(h.x));const p=h.width,x=void 0===p?0:p,b=h.height,m=void 0===b?0:b,_=null!=(g=null==(f=a.tooltip_position)?void 0:f.bind(s.api)(null!=t?t:JSON.parse(h.current),x,m,null==l?void 0:l.node(),u))?g:s.getTooltipPosition.bind(s)(x,m,u);["top","left"].forEach(function(t){i(this,n);const e=_[t];d.style(t,e+"px"),"left"!==t||h.xPosInPercent||(h.xPosInPercent=e/o.current.width*100)}.bind(this))}},getTooltipPosition:function(t,e,n){var s=this;const a=this,r=a.config,o=a.scale,c=a.state,l=c,d=l.width,u=l.height,h=l.current,g=l.isLegendRight,f=l.inputType,p=a.hasType("gauge")&&!r.gauge_fullCircle,x=c.hasTreemap,b=r.axis_rotated,m=a.getSvgLeft(!0);let _=m+h.width-a.getCurrentPaddingRight();const v=a.getCurrentPaddingLeft(!0);let y=n.x,T=n.y;if(a.hasArcType()){"touch"===f||a.hasType("radar")||(T+=p?u:u/2,y+=(d-(g?a.getLegendWidth():0))/2)}else x||(b?(T=n.xAxis+20,y+=m,_-=m):(T-=5,y=m+v+20+(o.zoom?y:n.xAxis)));if(y+t+15>_&&(y-=b?t-v:t+(x?0:v)),T+e>h.height){T-=p?3*e:e+(x?0:30)}const w={top:T,left:y};return Object.keys(w).forEach(function(t){i(this,s),w[t]<0&&(w[t]=0)}.bind(this)),w},showTooltip:function(t,e){var n=this;const s=this,a=s.config,r=s.$el.tooltip,o=t.filter(function(t){return i(this,n),t&&S(s.getBaseValue(t))}.bind(this));if(!r||0===o.length||!a.tooltip_show)return;let c=r.datum();const l=JSON.stringify(t);if(!c||c.current!==l){const e=t.concat().sort()[0],i=e.index,n=e.x;N(a.tooltip_onshow,s.api,t),r.html(s.getTooltipHTML(t,s.axis?s.axis.getXAxisTickFormat():s.categoryName.bind(s),s.getDefaultValueFormat(),s.color)).style("display",null).style("visibility",null).datum(c={index:i,x:n,current:l,width:r.property("offsetWidth"),height:r.property("offsetHeight")}),N(a.tooltip_onshown,s.api,t),s._handleLinkedCharts(!0,i)}s.setTooltipPosition(o,e)},bindTooltipResizePos:function(){var t=this;const e=this,n=e.resizeFunction,s=e.state,a=e.$el.tooltip;n.add(function(){if(i(this,t),"block"===a.style("display")){const t=s.current,e=a.datum(),i=e.width,n=e.xPosInPercent;let r=t.width/100*n;const o=t.width-(r+i);o<0&&(r+=o),a.style("left",r+"px")}}.bind(this))},hideTooltip:function(t){const e=this,i=e.api,n=e.config,s=e.$el.tooltip;if(s&&"none"!==s.style("display")&&(!n.tooltip_doNotHide||t)){const t=JSON.parse(s.datum().current);N(n.tooltip_onhide,i,t),s.style("display","none").style("visibility","hidden").datum(null),N(n.tooltip_onhidden,i,t)}},_handleLinkedCharts:function(t,e){var n=this;const s=this,a=s.charts,r=s.config,o=s.state.event;if(null!=o&&o.isTrusted&&r.tooltip_linked&&a.length>1){const o=r.tooltip_linked_name;a.filter(function(t){return i(this,n),t!==s.api}.bind(this)).forEach(function(s){i(this,n);const a=s.internal,r=a.config,c=a.$el,l=r.tooltip_linked,d=r.tooltip_linked_name,u=h.body.contains(c.chart.node());if(l&&o===d&&u){const i=c.tooltip.data()[0],n=e!==(null==i?void 0:i.index);try{s.tooltip[t&&n?"show":"hide"]({index:e})}catch(t){}}}.bind(this))}},updateTooltipOnRedraw:function(t,e){var n=this;const a=this,r=a.config,o=a.$el,c=o.eventRect,l=o.svg,d=o.tooltip,u=a.state,g=u.event,f=u.hasAxis,p=u.hasRadar,x=u.hasTreemap;if("block"===(null==d?void 0:d.style("display"))&&g){var b;const o=null!=t?t:null==(b=p?l:c)?void 0:b.node();if(f||p)if(a.isMultipleX())a.selectRectForMultipleXs(o,!1);else{const t=null!=e?e:a.getDataIndexFromEvent(g);-1===e?a.api.tooltip.hide():(a.selectRectForSingle(o,t),a.setExpand(t,null,!0))}else{const t=g.clientX,e=g.clientY;setTimeout(function(){i(this,n);let r=h.elementFromPoint(t,e);const o=(0,s.select)(r).datum();if(o){const t=a.hasArcType()?a.convertToArcData(a.updateAngle(o)):null==o?void 0:o.data;x&&(r=l.node()),t&&a.showTooltip([t],r)}else a.api.tooltip.hide()}.bind(this),r.transition_duration)}}}},si={getTranslate:function(t,e){void 0===e&&(e=0);const i=this,n=i.config,s=i.state,a=n.axis_rotated;let r,o,c=0;if(e&&/^(x|y2?)$/.test(t)&&(c=i.getAxisSize(t)*e),"main"===t)r=I(s.margin.left),o=I(s.margin.top);else if("context"===t)r=I(s.margin2.left),o=I(s.margin2.top);else if("legend"===t)r=s.margin3.left,o=s.margin3.top;else if("x"===t)r=a?-c:0,o=a?0:s.height+c;else if("y"===t)r=a?0:-c,o=a?s.height+c:0;else if("y2"===t)r=a?0:s.width+c,o=a&&c?1-c:0;else if("subX"===t)r=0,o=a?0:s.height2;else if("arc"===t)r=s.arcWidth/2,o=s.arcHeight/2;else if("polar"===t)r=s.arcWidth/2,o=s.arcHeight/2;else if("radar"===t){const t=i.getRadarSize()[0];r=s.width/2-t,o=I(s.margin.top)}return"translate("+r+", "+o+")"},transformMain:function(t,e){const i=this,n=i.$el.main,s=i.$T,a=null!=e&&e.axisX?e.axisX:s(n.select("."+_t.axisX),t),r=null!=e&&e.axisY?e.axisY:s(n.select("."+_t.axisY),t),o=null!=e&&e.axisY2?e.axisY2:s(n.select("."+_t.axisY2),t);s(n,t).attr("transform",i.getTranslate("main")),a.attr("transform",i.getTranslate("x")),r.attr("transform",i.getTranslate("y")),o.attr("transform",i.getTranslate("y2")),n.select("."+bt.chartArcs).attr("transform",i.getTranslate("arc"))},transformAll:function(t,e){const i=this,n=i.config,s=i.state,a=s.hasAxis,r=s.hasTreemap,o=i.$el;r||i.transformMain(t,e),a&&n.subchart_show&&i.transformContext(t,e),o.legend&&i.transformLegend(t)}},ai={isValidChartType:function(t){return!!(t&&Object.values(g).indexOf(t)>-1)},setTargetType:function(t,e){var n=this;const s=this,a=s.config,r=s.state.withoutFadeIn;s.mapToTargetIds(t).forEach(function(t){i(this,n),r[t]=e===a.data_types[t],a.data_types[t]=e}.bind(this)),t||(a.data_type=e)},updateTypesElements:function(){var t=this;const e=this,n=e.state.current;Object.keys(g).forEach(function(s){i(this,t);const a=g[s],r=e.hasType(a,null,!0),o=n.types.indexOf(a);-1===o&&r?n.types.push(a):o>-1&&!r&&n.types.splice(o,1)}.bind(this)),e.setChartElements()},hasType:function(t,e,n){var s,a=this;void 0===n&&(n=!1);const r=this,o=r.config,c=r.state.current,l=o.data_types,d=e||r.data.targets;let u=!1;return!n&&(null==(s=c.types)?void 0:s.indexOf(t))>-1?u=!0:null!=d&&d.length?d.forEach(function(e){i(this,a);const n=l[e.id];(n===t||!n&&"line"===t)&&(u=!0)}.bind(this)):Object.keys(l).length?Object.keys(l).forEach(function(e){i(this,a),l[e]===t&&(u=!0)}.bind(this)):u=o.data_type===t,u},hasTypeOf:function(t,e,n){var s=this;return void 0===n&&(n=[]),t in b&&!b[t].filter(function(t){return i(this,s),-1===n.indexOf(t)}.bind(this)).every(function(t){return i(this,s),!this.hasType(t,e)}.bind(this))},isTypeOf:function(t,e){const i=C(t)?t:t.id,n=this.config.data_types[i]||this.config.data_type;return $(e)?e.indexOf(n)>=0:n===e},hasPointType:function(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType:function(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge:function(){return this.hasType("gauge")&&"multi"===this.config.gauge_type},isLineType:function(t){const e=C(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,b.Line)},isStepType:function(t){return this.isTypeOf(t,b.Step)},isSplineType:function(t){return this.isTypeOf(t,b.Spline)},isAreaType:function(t){return this.isTypeOf(t,b.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,b.AreaRange)},isBarType:function(t){return this.isTypeOf(t,"bar")},isBubbleType:function(t){return this.isTypeOf(t,"bubble")},isCandlestickType:function(t){return this.isTypeOf(t,"candlestick")},isScatterType:function(t){return this.isTypeOf(t,"scatter")},isTreemapType:function(t){return this.isTypeOf(t,"treemap")},isPieType:function(t){return this.isTypeOf(t,"pie")},isGaugeType:function(t){return this.isTypeOf(t,"gauge")},isDonutType:function(t){return this.isTypeOf(t,"donut")},isPolarType:function(t){return this.isTypeOf(t,"polar")},isRadarType:function(t){return this.isTypeOf(t,"radar")},isArcType:function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint:function(t){const e=this.config,i=e.point_pattern;let n=!1;return n="circle"===(null==t?void 0:t.tagName)||"circle"===e.point_type&&(!i||$(i)&&0===i.length),n},lineData:function(t){return this.isLineType(t)?[t]:[]},arcData:function(t){return this.isArcType(t.data)?[t]:[]},labelishData:function(t){var e=this;return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(function(t){return i(this,e),R(t.value)||!!t.value}.bind(this)):[]},barLineBubbleData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}};let ri=function(){function t(t){this.api=void 0,this.config=void 0,this.cache=void 0,this.$el=void 0,this.state=void 0,this.charts=void 0,this.data={xs:{},targets:[]},this.axis=void 0,this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.color=void 0,this.patterns=void 0,this.levelColor=void 0,this.point=void 0,this.brush=void 0,this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};const e=this;e.api=t,e.config=new ne,e.cache=new fe;const i=new Vt;e.$el=i.getStore("element"),e.state=i.getStore("state"),e.$T=e.$T.bind(e)}var e=t.prototype;return e.$T=function(t,e,i){const n=this.config,a=this.state,r=n.transition_duration,o=n.subchart_show;let c=t;if(c){"tagName"in c&&(c=(0,s.select)(c));c=(!1!==e&&r||e)&&(!a.zooming||a.dragging)&&!a.resizing&&a.rendered&&!o?c.transition(i).duration(r):c}return c},e.beforeInit=function(){const t=this;t.callPluginHook("$beforeInit"),N(t.config.onbeforeinit,t.api)},e.afterInit=function(){const t=this;t.callPluginHook("$afterInit"),N(t.config.onafterinit,t.api)},e.init=function(){const t=this,e=t.config,i=t.state,n=t.$el,a=e.boost_useCssRule;if(gt(t),i.hasRadar=!i.hasAxis&&t.hasType("radar"),i.hasTreemap=!i.hasAxis&&t.hasType("treemap"),i.hasAxis=!t.hasArcType()&&!i.hasTreemap,i.datetimeId="bb-"+ +new Date*Z(),a){const t=h.createElement("style");t.type="text/css",h.head.appendChild(t),i.style={rootSelctor:"."+i.datetimeId,sheet:t.sheet},n.style=t}const r={element:e.bindto,classname:"bb"};F(e.bindto)&&(r.element=e.bindto.element||"#chart",r.classname=e.bindto.classname||r.classname),n.chart=k(r.element.node)?e.bindto.element:(0,s.select)(r.element||[]),n.chart.empty()&&(n.chart=(0,s.select)(h.body.appendChild(h.createElement("div")))),n.chart.html("").classed(r.classname,!0).classed(i.datetimeId,a).style("position","relative"),t.initParams(),t.initToRender()},e.initToRender=function(t){var e=this;const n=this,s=n.config,a=n.state,o=n.$el.chart,c=function(){return i(this,e),"none"===o.style("display")||"hidden"===o.style("visibility")}.bind(this),l=s.render.lazy||c(),d=r.MutationObserver;l&&d&&!1!==s.render.observe&&!t&&new d(function(t,s){i(this,e),c()||(s.disconnect(),a.rendered||n.initToRender(!0))}.bind(this)).observe(o.node(),{attributes:!0,attributeFilter:["class","style"]}),l&&!t||n.convertData(s,function(t){i(this,e),n.initWithData(t),n.afterInit()}.bind(this))},e.initParams=function(){var t=this;const e=this,s=e.config,a=e.format,o=e.state,c=s.axis_rotated;if(e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),!1===s.padding&&(s.axis_x_show=!1,s.axis_y_show=!1,s.axis_y2_show=!1,s.subchart_show=!1),e.hasPointType()&&(e.point=e.generatePoint()),o.hasAxis){e.initClip(),a.extraLineClasses=e.generateExtraLineClass(),a.dataTime=s.data_xLocaltime?n.timeParse:n.utcParse,a.axisTime=s.axis_x_localtime?n.timeFormat:n.utcFormat;const r=e.config.zoom_enabled&&"drag"===e.config.zoom_type;a.defaultAxisTime=function(n){i(this,t);const s=e.scale,o=s.x,c=s.zoom,l=r?c:c&&o.orgDomain().toString()!==c.domain().toString(),d=(n.getMilliseconds()?".%L":n.getSeconds()&&".:%S")||n.getMinutes()&&"%I:%M"||n.getHours()&&"%I %p"||1!==n.getDate()&&"%b %d"||l&&1===n.getDate()&&"%b'%y"||n.getMonth()&&"%-m/%-d"||"%Y";return a.axisTime(d)(n)}.bind(this)}o.isLegendRight="right"===s.legend_position,o.isLegendInset="inset"===s.legend_position,o.isLegendTop="top-left"===s.legend_inset_anchor||"top-right"===s.legend_inset_anchor,o.isLegendLeft="top-left"===s.legend_inset_anchor||"bottom-left"===s.legend_inset_anchor,o.rotatedPadding.top=e.getResettedPadding(o.rotatedPadding.top),o.rotatedPadding.right=c&&!s.axis_x_show?0:30,o.inputType=function(t,e){var n=this;const s=r.DocumentTouch,a=r.matchMedia,o=r.navigator;let c=!1;if(e)if(o&&"maxTouchPoints"in o)c=o.maxTouchPoints>0;else if("ontouchmove"in r||s&&h instanceof s)c=!0;else if(null!=a&&a("(pointer:coarse)").matches)c=!0;else{const t=o.userAgent;c=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(t)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(t)}return(t&&["any-hover:hover","any-pointer:fine"].some(function(t){return i(this,n),null==a?void 0:a("("+t+")").matches}.bind(this))?"mouse":c&&"touch")||"mouse"}(s.interaction_inputType_mouse,s.interaction_inputType_touch)},e.initWithData=function(t){var e=this;const n=this,s=n.config,a=n.scale,r=n.state,o=n.$el,c=n.org,l=r,d=l.hasAxis,u=l.hasTreemap,h=s.interaction_enabled,g=n.hasType("polar");if(d&&(n.axis=n.getAxisInstance(),s.zoom_enabled&&n.initZoom()),n.data.xs={},n.data.targets=n.convertDataToTargets(t),s.data_filter&&(n.data.targets=n.data.targets.filter(s.data_filter.bind(n.api))),s.data_hide&&n.addHiddenTargetIds(!0===s.data_hide?n.mapToIds(n.data.targets):s.data_hide),s.legend_hide&&n.addHiddenLegendIds(!0===s.legend_hide?n.mapToIds(n.data.targets):s.legend_hide),n.updateSizes(),n.updateScales(!0),d){const t=a.x,e=a.y,i=a.y2,r=a.subX,o=a.subY,l=a.subY2;t&&(t.domain(at(n.getXDomain(n.data.targets),!s.axis_x_inverted)),r.domain(t.domain()),c.xDomain=t.domain()),e&&(e.domain(n.getYDomain(n.data.targets,"y")),o.domain(e.domain())),i&&(i.domain(n.getYDomain(n.data.targets,"y2")),l&&l.domain(i.domain()))}if(o.svg=o.chart.append("svg").style("overflow","hidden").style("display","block"),h&&r.inputType){const t="touch"===r.inputType,e=s.onclick,i=s.onover,a=s.onout;o.svg.on("click",(null==e?void 0:e.bind(n.api))||null).on(t?"touchstart":"mouseenter",(null==i?void 0:i.bind(n.api))||null).on(t?"touchend":"mouseleave",(null==a?void 0:a.bind(n.api))||null)}s.svg_classname&&o.svg.attr("class",s.svg_classname);const f=k(s.color_tiles)&&n.patterns;(d||f||g||u||s.data_labels_backgroundColors)&&(o.defs=o.svg.append("defs"),d&&["id","idXAxis","idYAxis","idGrid"].forEach(function(t){i(this,e),n.appendClip(o.defs,r.clip[t])}.bind(this)),n.generateDataLabelBackgroundColorFilter(),f&&n.patterns.forEach(function(t){var n=this;return i(this,e),o.defs.append(function(){return i(this,n),t.node}.bind(this))}.bind(this))),n.updateSvgSize(),n.bindResize();const p=o.svg.append("g").classed(xt.main,!0).attr("transform",u?null:n.getTranslate("main"));var x;(o.main=p,s.subchart_show&&n.initSubchart(),s.tooltip_show&&n.initTooltip(),s.title_text&&n.initTitle(),!u&&s.legend_show&&n.initLegend(),s.data_empty_label_text&&p.append("text").attr("class",$t.text+" "+xt.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),d&&(s.regions.length&&n.initRegion(),s.clipPath||n.axis.init()),p.append("g").classed(xt.chart,!0).attr("clip-path",d?r.clip.path:null),n.callPluginHook("$init"),n.initChartElements(),d)&&(h&&(null==n.initEventRect||n.initEventRect()),n.initGrid(),s.clipPath&&(null==(x=n.axis)||x.init()));if(n.updateTargets(n.data.targets),n.updateDimension(),N(s.oninit,n.api),n.setBackground(),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),s.data_onmin||s.data_onmax){const t=n.getMinMaxData();N(s.data_onmin,n.api,t.min),N(s.data_onmax,n.api,t.max)}s.tooltip_show&&n.initShowTooltip(),r.rendered=!0},e.initChartElements=function(){var t=this;const e=this,n=e.state,s=n.hasAxis,a=n.hasRadar,r=n.hasTreemap,o=[];if(s){const n=["bar","bubble","candlestick","line"];e.config.bar_front&&n.push(n.shift()),n.forEach(function(n){i(this,t);const s=Q(n);("line"===n&&e.hasTypeOf(s)||e.hasType(n))&&o.push(s)}.bind(this))}else if(r)o.push("Treemap");else{const t=e.hasType("polar");a||o.push("Arc","Pie"),e.hasType("gauge")?o.push("Gauge"):a?o.push("Radar"):t&&o.push("Polar")}o.forEach(function(n){i(this,t),e["init"+n]()}.bind(this)),X(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()},e.setChartElements=function(){const t=this.$el,e=t.chart,i=t.svg,n=t.defs,s=t.main,a=t.tooltip,r=t.legend,o=t.title,c=t.grid,l=t.needle,d=t.arcs,u=t.circle,h=t.bar,g=t.candlestick,f=t.line,p=t.area,x=t.text;this.api.$={chart:e,svg:i,defs:n,main:s,tooltip:a,legend:r,title:o,grid:c,arc:d,circles:u,bar:{bars:h},candlestick:g,line:{lines:f,areas:p},needle:l,text:{texts:x}}},e.setBackground=function(){const t=this,e=t.config.background,i=t.state,n=t.$el.svg;if(X(e)){const t=n.select("g").insert(e.imgUrl?"image":"rect",":first-child");e.imgUrl?t.attr("href",e.imgUrl):e.color&&t.style("fill",e.color).attr("clip-path",i.clip.path),t.attr("class",e.class||null).attr("width","100%").attr("height","100%")}},e.updateTargets=function(t){var e=this;const n=this,s=n.state,a=s.hasAxis,r=s.hasRadar,o=s.hasTreemap,c=function(s){return i(this,e),n["updateTargetsFor"+s](t.filter(n["is"+s+"Type"].bind(n)))}.bind(this);if(n.updateTargetsForText(t),a)["bar","candlestick","line"].forEach(function(t){i(this,e);const s=Q(t);("line"===t&&n.hasTypeOf(s)||n.hasType(t))&&c(s)}.bind(this)),n.updateTargetsForSubchart&&n.updateTargetsForSubchart(t);else if(n.hasArcType(t)){let t="Arc";r?t="Radar":n.hasType("polar")&&(t="Polar"),c(t)}else o&&c("Treemap");const l=n.hasType("bubble")||n.hasType("scatter");l&&(null==n.updateTargetForCircle||n.updateTargetForCircle()),n.filterTargetsToShowAtInit(l)},e.filterTargetsToShowAtInit=function(t){var e=this;void 0===t&&(t=!1);const n=this,s=n.$el.svg,a=n.$T;let r="."+xt.target;t&&(r+=", ."+Tt.chartCircles+" > ."+Tt.circles),a(s.selectAll(r).filter(function(t){return i(this,e),n.isTargetToShow(t.id)}.bind(this))).style("opacity",null)},e.getWithOption=function(t){var e=this;const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};return Object.keys(n).forEach(function(s){i(this,e);let a=n[s];C(a)&&(a=n[a]),n[s]=B(t,"with"+s,a)}.bind(this)),n},e.initialOpacity=function(t){const e=this.state.withoutFadeIn;return null!==this.getBaseValue(t)&&e[t.id]?null:"0"},e.bindResize=function(){var t=this;const e=this,n=e.config,s=e.state,a=function(t){var e=this;const n=[];let s;const a=function(){var e=this;a.clear(),!1===t?u(function(){var t=this;i(this,e),n.forEach(function(e){return i(this,t),e()}.bind(this))}.bind(this),{timeout:200}):s=pe(function(){var t=this;i(this,e),n.forEach(function(e){return i(this,t),e()}.bind(this))}.bind(this),R(t)?t:200)};return a.clear=function(){i(this,e),s&&(xe(s),s=null)}.bind(this),a.add=function(t){return i(this,e),n.push(t)}.bind(this),a.remove=function(t){return i(this,e),n.splice(n.indexOf(t),1)}.bind(this),a}(n.resize_timer),o=[];o.push(function(){return i(this,t),N(n.onresize,e.api)}.bind(this)),n.resize_auto&&o.push(function(){i(this,t),s.resizing=!0,n.legend_show&&(e.updateSizes(),e.updateLegend()),e.api.flush(!1)}.bind(this)),o.push(function(){i(this,t),N(n.onresized,e.api),s.resizing=!1}.bind(this)),o.forEach(function(e){return i(this,t),a.add(e)}.bind(this)),e.resizeFunction=a,r.addEventListener("resize",e.resizeFunction=a)},e.callPluginHook=function(t){for(var e=this,n=arguments.length,s=Array(n>1?n-1:0),a=1;a\n\t\t\t\n\t\t\t\t'+x+"\n\t\t\t\t"+f.replace(/(url\()[^#]+/g,"$1")+"\n\t\t\t";return"data:image/svg+xml;base64,"+ui(b)}function gi(t){var e=this;const n=t.getBoundingClientRect(),s=n.left,a=n.top,o=function(t){return i(this,e),t.textContent||t.childElementCount}.bind(this),c=[];return tt(t.querySelectorAll("text")).filter(o).forEach(function(t){var n=this;i(this,e);const l=function(t){var e;i(this,n);const o=r.getComputedStyle(t),c=o.fill,l=o.fontFamily,d=o.fontSize,u=o.textAnchor,h=o.transform,g=function(t,e){const i=e.top,n=e.left,s=t.getBBox(),a=s.x,r=s.y,o=t.getScreenCTM(),c=o.a,l=o.b,d=o.c,u=o.d,h=o.e,g=o.f,f=t.getBoundingClientRect(),p=f.width,x=f.height;return{x:c*a+d*r+h-n,y:l*a+u*r+g-i+(x-Math.round(x/4)),width:p,height:x}}(t,{left:s,top:a}),f=g.x,p=g.y,x=g.width,b=g.height;return(e={})[t.textContent]={x:f,y:p,width:x,height:b,fill:c,fontFamily:l,fontSize:d,textAnchor:u,transform:h},e}.bind(this);if(t.childElementCount>1)return tt(t.querySelectorAll("tspan")).filter(o).forEach(function(t){i(this,n),c.push(l(t))}.bind(this)),[];c.push(l(t))}.bind(this)),c}var fi={export:function(t,e){var n=this;const s=this.internal,a=s.state,r=s.$el,o=r.chart,c=r.svg,l=a.current,d=l.width,u=l.height,g=st({width:d,height:u,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t),f=hi(o.node(),g,{width:d,height:u}),p=g.preserveFontStyle?gi(c.node()):[];if(e&&k(e)){const t=new Image;t.crossOrigin="Anonymous",t.onload=function(){i(this,n);const s=h.createElement("canvas"),a=s.getContext("2d");s.width=g.width||d,s.height=g.height||u,a.drawImage(t,0,0),p.length&&(!function(t,e){var n=this;e.forEach(function(e){var s=this;i(this,n),Object.keys(e).forEach(function(n){var a=this;i(this,s);const r=e[n],o=r.x,c=r.y,l=r.width,d=r.height,u=r.fill,h=r.fontFamily,g=r.fontSize,f=r.transform;if(t.save(),t.font=g+" "+h,t.fillStyle=u,"none"===f)t.fillText(n,o,c);else{const e=f.replace(/(matrix|\(|\))/g,"").split(",");e.splice(4).every(function(t){return i(this,a),0==+t}.bind(this))?(e.push(o+l-l/4),e.push(c-d+d/3)):(e.push(o),e.push(c)),t.transform.apply(t,e),t.fillText(n,0,0)}t.restore()}.bind(this))}.bind(this))}(a,p),p.length=0),e.bind(this)(s.toDataURL(g.mimeType))}.bind(this),t.src=f}return f}},pi={focus:function(t){var e=this;const n=this.internal,s=n.state,a=n.mapToTargetIds(t),r=n.$el.svg.selectAll(n.selectorTargets(a.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),r.classed(Et.focused,!0).classed(Et.defocused,!1),n.hasArcType()&&!s.hasRadar&&(n.expandArc(a),n.hasType("gauge")&&n.markOverlapped(t,n,"."+St.gaugeValue)),n.toggleFocusLegend(a,!0),s.focusedTargetIds=a,s.defocusedTargetIds=s.defocusedTargetIds.filter(function(t){return i(this,e),a.indexOf(t)<0}.bind(this))},defocus:function(t){var e=this;const n=this.internal,s=n.state,a=n.mapToTargetIds(t);n.$el.svg.selectAll(n.selectorTargets(a.filter(n.isTargetToShow,n))).classed(Et.focused,!1).classed(Et.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(a),n.hasType("gauge")&&n.undoMarkOverlapped(n,"."+St.gaugeValue)),n.toggleFocusLegend(a,!1),s.focusedTargetIds=s.focusedTargetIds.filter(function(t){return i(this,e),a.indexOf(t)<0}.bind(this)),s.defocusedTargetIds=a},revert:function(t){const e=this.internal,i=e.config,n=e.state,a=e.$el,r=e.mapToTargetIds(t);a.svg.selectAll(e.selectorTargets(r)).classed(Et.focused,!1).classed(Et.defocused,!1),e.hasArcType(null,["polar"])&&e.unexpandArc(r),i.legend_show&&(e.showLegend(r.filter(e.isLegendToShow.bind(e))),a.legend.selectAll(e.selectorLegends(r)).filter((function(){return(0,s.select)(this).classed(Et.legendItemFocused)})).classed(Et.legendItemFocused,!1)),n.focusedTargetIds=[],n.defocusedTargetIds=[]}};var xi={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},bi={load:function(t){var e=this;const n=this.internal,s=n.config;t.xs&&n.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(n){i(this,e),s.data_classes[n]=t.classes[n]}.bind(this)),"categories"in t&&n.axis.isCategorized()&&(s.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(n){i(this,e),s.data_axes[n]=t.axes[n]}.bind(this)),"colors"in t&&Object.keys(t.colors).forEach(function(n){i(this,e),s.data_colors[n]=t.colors[n]}.bind(this)),"unload"in t&&!1!==t.unload?n.unload(n.mapToTargetIds(!0===t.unload?null:t.unload),function(){var s=this;i(this,e),u(function(){return i(this,s),n.loadFromArgs(t)}.bind(this))}.bind(this)):n.loadFromArgs(t)},unload:function(t){var e=this;const n=this.internal;let s=t||{};M(s)&&this.tooltip.hide(),$(s)?s={ids:s}:C(s)&&(s={ids:[s]});const a=n.mapToTargetIds(s.ids);n.unload(a,function(){i(this,e),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.cache.remove(a),Oe.call(n,s.done,s.resizeAfter)}.bind(this))}};function mi(t,e,n){var s=this;const a=this.internal,r=a.mapToTargetIds(e),o=a.state.hiddenTargetIds.map(function(t){return i(this,s),r.indexOf(t)>-1&&t}.bind(this)).filter(Boolean);a.state.toggling=!0,a[(t?"remove":"add")+"HiddenTargetIds"](r);const c=a.$el.svg.selectAll(a.selectorTargets(r)),l=t?null:"0";t&&o.length&&(c.style("display",null),N(a.config.data_onshown,this,o)),a.$T(c).style("opacity",l,"important").call(j,function(){i(this,s),t||0!==o.length||(c.style("display","none"),N(a.config.data_onhidden,this,r)),c.style("opacity",l)}.bind(this)),n.withLegend&&a[(t?"show":"hide")+"Legend"](r),a.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),a.state.toggling=!1}var _i={show:function(t,e){void 0===e&&(e={}),mi.call(this,!0,t,e)},hide:function(t,e){void 0===e&&(e={}),mi.call(this,!1,t,e)},toggle:function(t,e){var n=this;void 0===e&&(e={});const s=this.internal,a={show:[],hide:[]};s.mapToTargetIds(t).forEach(function(t){return i(this,n),a[s.isTargetToShow(t)?"hide":"show"].push(t)}.bind(this)),a.show.length&&this.show(a.show,e),a.hide.length&&setTimeout(function(){return i(this,n),this.hide(a.hide,e)}.bind(this),0)}};const vi={show:function(t){var e=this;const n=this.internal,s=n.$el,a=n.config,r=n.state,o=r.eventReceiver,c=r.hasTreemap,l=r.inputType;let d,u;if(t.mouse&&(u=t.mouse),t.data){var h;const e=t.data,i=null==(h=n.getYScaleById(e.id))?void 0:h(e.value);if(c&&e.id)o.rect=s.main.select(""+n.selectorTarget(e.id,void 0,"rect"));else if(n.isMultipleX())u=[n.xx(e),i];else{var g,f;a.tooltip_grouped||(u=[0,i]),d=null!=(g=e.index)?g:n.hasArcType()&&e.id?null==(f=n.getArcElementByIdOrIndex(e.id))?void 0:f.datum().index:n.getIndexByX(e.x)}}else O(t.x)?d=n.getIndexByX(t.x):O(t.index)&&(d=t.index);("mouse"===l?["mouseover","mousemove"]:["touchstart"]).forEach(function(t){i(this,e),n.dispatchEvent(t,d,u)}.bind(this))},hide:function(){var t=this;const e=this.internal,n=e.state.inputType,s=e.$el.tooltip,a=null==s?void 0:s.datum();if(a){const s=JSON.parse(a.current)[0].index;("mouse"===n?["mouseout"]:["touchend"]).forEach(function(n){i(this,t),e.dispatchEvent(n,s)}.bind(this))}"touch"===n&&e.callOverOutForTouch(),e.hideTooltip(!0),null==e.hideGridFocus||e.hideGridFocus(),null==e.unexpandCircles||e.unexpandCircles(),null==e.expandBarTypeShapes||e.expandBarTypeShapes(!1)}};var yi={tooltip:vi};let Ti=function t(e){this.plugins=[],this.internal=void 0;const n=new ri(this);this.internal=n,function t(e,n,s){var a=this;Object.keys(e).forEach(function(r){i(this,a);const o=k(e[r]),c=n!==s,l=X(e[r]),d=l&&Object.keys(e[r]).length>0;n[r]=o&&(!c&&d||c)?e[r].bind(s):l&&!o?{}:e[r],d&&t(e[r],n[r],s)}.bind(this))}(t.prototype,this,this),oi.call(n,e),n.beforeInit(),n.init()};function wi(t,e,n){var s=this;const a=t.config,r=function(t,n){i(this,s);const r=R(n)?n:!1===n?void 0:null;null!==r&&(a["axis_"+t+"_"+e]=r)}.bind(this);O(n)&&(z(n)?Object.keys(n).forEach(function(t){i(this,s),r(t,n[t])}.bind(this)):(R(n)||!1===n)&&["y","y2"].forEach(function(t){i(this,s),r(t,n)}.bind(this)),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function Ai(t,e){const i=t.config;return{x:i["axis_x_"+e],y:i["axis_y_"+e],y2:i["axis_y2_"+e]}}J(Ti.prototype,[ci,{color:function(t){return this.internal.color(t)}},di,fi,pi,xi,bi,_i,yi]);const Si={labels:function(t){var e=this;const n=this.internal;let s;return t&&(Object.keys(t).forEach(function(s){i(this,e),n.axis.setLabelText(s,t[s])}.bind(this)),n.axis.updateLabels()),["x","y","y2"].forEach(function(t){i(this,e);const a=n.axis.getLabelText(t);a&&(s||(s={}),s[t]=a)}.bind(this)),s},min:function(t){const e=this.internal;return S(t)||!1===t?wi(e,"min",t):Ai(e,"min")},max:function(t){const e=this.internal;return S(t)||!1===t?wi(e,"max",t):Ai(e,"max")},range:function(t){const e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};{const i=t.min,n=t.max;O(n)&&e.max(n),O(i)&&e.min(i)}}};var ki={axis:Si};function Ci(t,e){const i=this.internal,n=i.config,s=n.transition_duration&&ut(),a="grid_"+e+"_lines";return t?(n[a]=t,i.updateGrid(),i.redrawGrid(s),n[a]):n[a]}function Ri(t,e){return Ci.bind(this)(this.internal.config["grid_"+e+"_lines"].concat(t||[]),e)}function Ei(t,e){this.internal.removeGridLines(t,e)}const Oi=function(t){return Ci.bind(this)(t,"x")};J(Oi,{add:function(t){return Ri.bind(this)(t,"x")},remove:function(t){return Ei.bind(this)(t,!0)}});const Li=function(t){return Ci.bind(this)(t,"y")};J(Li,{add:function(t){return Ri.bind(this)(t,"y")},remove:function(t){return Ei.bind(this)(t,!1)}});var Pi={xgrids:Oi,ygrids:Li},Ii={groups:function(t){const e=this.internal,i=e.config;return E(t)||(i.data_groups=t,e.redraw()),i.data_groups}};function Di(t,e){void 0===e&&(e=!1);const i=this.internal,n=i.config,s=n.transition_duration&&ut();return t?(n.regions=e?n.regions.concat(t):t,i.updateRegion(),i.redrawRegion(s),e?n.regions:t):n.regions}const zi=function(t){return Di.bind(this)(t)};J(zi,{add:function(t){return Di.bind(this)(t,!0)},remove:function(t){var e=this;const n=this.internal,s=n.config,a=n.$T,r=t||{},o=B(r,"classes",[Dt.region]);let c=n.$el.main.select("."+Dt.regions).selectAll(o.map(function(t){return i(this,e),"."+t}.bind(this)));return a(c).style("opacity","0").remove(),c=s.regions,Object.keys(r).length?(c=c.filter(function(t){var n=this;i(this,e);let s=!1;return!t.class||(t.class.split(" ").forEach(function(t){i(this,n),o.indexOf(t)>=0&&(s=!0)}.bind(this)),!s)}.bind(this)),s.regions=c):s.regions=[],c}});var Mi={regions:zi},Xi={x:function(t){const e=this.internal,i=e.axis,n=e.data,s=i.isCustomX()&&i.isCategorized();return $(t)&&(s?this.categories(t):(e.updateTargetX(n.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),s?this.categories():n.xs},xs:function(t){const e=this.internal;return F(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},$i={flow:function(t){var e=this;const n=this.internal;let s;(t.json||t.rows||t.columns)&&n.convertData(t,function(a){i(this,e),s=a,function(){var e=this;let a,r,o,c=0,l=0;if(n.state.redrawing||!s||!ut())return;const d=[],u=n.getMaxDataCount(),h=n.convertDataToTargets(s,!0),g=n.axis.isTimeSeries();n.data.targets.forEach(function(t){i(this,e);let n=!1;for(let e=0;e1?f.values[f.values.length-1].x-p.x:p.x-n.getXDomain(n.data.targets)[0]:1,a=[p.x-r,p.x]);a&&n.updateXDomain(null,!0,!0,!1,a),n.updateTargets(n.data.targets),n.redraw({flow:{index:p.index,length:c,duration:S(t.duration)?t.duration:n.config.transition_duration,done:t.done,orgDataCount:u},withLegend:!0,withTransition:u>1,withTrimXDomain:!1,withUpdateXAxis:!0})}()}.bind(this))}},Fi=p(10);let Bi=function(){function t(t){this.owner=void 0,this.config=void 0,this.scale=void 0;const e=He(),i=t.config,n=t.params;this.owner=t,this.config=i,this.scale=e,!i.noTransition&&n.config.transition_duration||(i.withoutTransition=!0),i.range=this.scaleExtent((n.orgXScale||e).range())}t.getSizeFor1Char=function(t){var e=this;const n={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call(function(t){i(this,e);try{const e=t.node().getBBox(),i=e.width,s=e.height;i&&s&&(n.w=i,n.h=s)}catch(t){}finally{t.text("")}}.bind(this)),this.getSizeFor1Char=function(){return i(this,e),n}.bind(this),n};var e=t.prototype;return e.getTickTransformSetter=function(t){var e=this;const n=this.config,s="x"===t?function(t){return i(this,e),"translate("+(t+n.tickOffset)+",0)"}.bind(this):function(t){return i(this,e),"translate(0,"+t+")"}.bind(this);return function(t,n){var a=this;i(this,e),t.attr("transform",function(t){return i(this,a),S(t)?s(Math.ceil(n(t))):null}.bind(this))}.bind(this)},e.scaleExtent=function(t){const e=t[0],i=t[t.length-1];return e0?r:1,o]).range(t.range());c=e.ticks();for(let t=o.toFixed().length;c.length>15;t--)c=e.ticks(t);c.splice(0,1,r),c.splice(c.length-1,1,o)}c=c.map(function(t){i(this,n);return C(t)&&R(t)&&!isNaN(t)&&Math.round(10*t)/10||t}.bind(this))}else{for(let t=Math.ceil(r);t0&&c[0]>0&&c.unshift(c[0]-(c[1]-c[0]))}return c},e.copyScale=function(){const t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t.type=this.scale.type,t},e.textFormatted=function(t){const e=this.config.tickFormat,i=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,n=e?e(i):i;return O(n)?n:""},e.transitionise=function(t){const e=this.config;let i=t;if(e.withoutTransition)i=t.interrupt();else if(e.transition||!this.owner.params.noTransition)try{i=t.transition(e.transition)}catch(t){}return i},t}(),Ni=function(){function t(t){void 0===t&&(t={}),this.helper=void 0,this.config=void 0,this.params=void 0,this.g=void 0,this.generatedTicks=void 0;const e={innerTickSize:6,outerTickSize:t.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:t.noTransition};e.tickLength=Math.max(e.innerTickSize,0)+e.tickPadding,this.config=e,this.params=t,this.helper=new Bi(this)}var e=t.prototype;return e.create=function(t){const e=this,n=e.config,a=e.helper,r=e.params,o=a.scale,c=n.orient,l=this.splitTickText.bind(e),d=/^(left|right)$/.test(c),u=/^(top|bottom)$/.test(c),h=a.getTickTransformSetter(u?"x":"y"),g=h===a.axisX?"y":"x",f=/^(top|left)$/.test(c)?-1:1,p=r.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():a.scaleExtent((r.orgXScale||o).range());const x=n.innerTickSize,b=n.tickLength,m=n.range,_=r.id,v=_&&/^(x|y|y2)$/.test(_)?r.config["axis_"+_+"_tick_text_position"]:{x:0,y:0},y="subX"===_?"subchart_axis_x":"axis_"+_,T=r.config[y+"_show"],w=!!T&&r.config[y+"_tick_show"],A=!!T&&r.config[y+"_tick_text_show"];let S;t.each((function(){var t=this;const _=(0,s.select)(this);let y=this.__chart__||o,T=a.copyScale();S=_,this.__chart__=T,n.tickOffset=r.isCategory?Math.ceil((T(1)-T(0))/2):0;const k=_.selectAll(".domain").data([0]);if(k.enter().append("path").attr("class","domain").merge(k).attr("d",function(){i(this,t);const e=n.outerTickSize*f;return u?"M"+m[0]+","+e+"V0H"+m[1]+"V"+e:"M"+e+","+m[0]+"H0V"+m[1]+"H"+e}.bind(this)),w||A){const s=n.tickValues||a.generateTicks(T,d);e.generatedTicks=s;let o=_.selectAll(".tick").data(s,T);const m=o.enter().insert("g",".domain").attr("class","tick"),S=o.exit().remove();o=m.merge(o),w&&m.append("line"),A&&m.append("text");const k=Bi.getSizeFor1Char(o),C=[];let E=o.select("text").selectAll("tspan").data(function(e,n){var o=this;i(this,t);const c=r.tickMultiline?l(e,T,s,d,k.w):$(a.textFormatted(e))?a.textFormatted(e).concat():[a.textFormatted(e)];return C[n]=c.length,c.map(function(t){return i(this,o),{index:n,splitted:t}}.bind(this))}.bind(this));E.exit().remove(),E=E.enter().append("tspan").merge(E).text(function(e){return i(this,t),e.splitted}.bind(this)),E.attr("x",u?0:b*f).attr("dx",function(){i(this,t);let e=0;return/(top|bottom)/.test(c)&&p&&(e=8*Math.sin(Math.PI*(p/180))*("top"===c?-1:1)),e+(v.x||0)}.bind(this)()).attr("dy",function(e,n){i(this,t);let s=0;return"top"!==c&&(s=k.h,0===n&&(s=d?-((C[e.index]-1)*(k.h/2)-3):0===v.y?".71em":0)),R(s)&&v.y?s+v.y:s||".71em"}.bind(this));const O=o.select("line"),L=o.select("text");if(m.select("line").attr(g+"2",x*f),m.select("text").attr(g,b*f),e.setTickLineTextPosition(O,L),r.tickTitle){const e=L.select("title");(e.empty()?L.append("title"):e).text(function(e){return i(this,t),r.tickTitle[e]}.bind(this))}if(T.bandwidth){const e=T,n=e.bandwidth()/2;y=function(s){return i(this,t),e(s)+n}.bind(this),T=y}else y.bandwidth?y=T:h(S,T);o=r.owner.state.flowing?a.transitionise(o):r.owner.$T(o),h(m,y),h(o.style("opacity",null),T)}})),this.g=S},e.getGeneratedTicks=function(t){var e,n=this;const s=(null==(e=this.generatedTicks)?void 0:e.length)-1;let a=this.generatedTicks;if(s>t){const e=Math.round(s/t+.1);a=this.generatedTicks.map(function(t,s){return i(this,n),s%e==0?t:null}.bind(this)).filter(function(t){return i(this,n),null!==t}.bind(this)).splice(0,t)}return a},e.getTickXY=function(){const t=this.config,e={x:0,y:0};return this.params.isCategory&&(e.x=t.tickCentered?0:t.tickOffset,e.y=t.tickCentered?t.tickOffset:0),e},e.getTickSize=function(t){const e=this.helper.scale,i=this.config,n=i,s=n.innerTickSize,a=n.range,r=e(t)+(i.tickCentered?0:i.tickOffset);return a[0]0?0:1]:"middle"}.bind(this),h=function(t){return i(this,n),t?"rotate("+t+")":null}.bind(this),g=function(t){i(this,n);return t?11.5-2.5*(t/("bottom"===o?15:23))*(t>0?1:-1):c}.bind(this);switch(o){case"bottom":t.attr("x1",s.x).attr("x2",s.x).attr("y2",this.getTickSize.bind(this)),e.attr("x",0).attr("y",g(d)).style("text-anchor",u(d)).attr("transform",h(d));break;case"top":t.attr("x2",0).attr("y2",-r),e.attr("x",0).attr("y",2*-g(d)).style("text-anchor",u(d)).attr("transform",h(d));break;case"left":t.attr("x2",-r).attr("y1",s.y).attr("y2",s.y),e.attr("x",-c).attr("y",l).style("text-anchor","end");break;case"right":t.attr("x2",r).attr("y2",0),e.attr("x",c).attr("y",0).style("text-anchor","start")}},e.splitTickText=function(t,e,i,n,s){const a=this.params,r=this.helper.textFormatted(t),o=C(r)&&r.indexOf("\n")>-1?r.split("\n"):[];if(o.length)return o;if($(r))return r;let c=a.tickWidth;return(!c||c<=0)&&(c=n?95:a.isCategory?Math.ceil(a.isInverted?e(i[0])-e(i[1]):e(i[1])-e(i[0]))-12:110),function t(e,i){let n,a,r;for(let o=1;o=0||i.hasRadar},e.isCustomX=function(){const t=this.owner.config;return!this.isTimeSeries()&&(t.data_x||X(t.data_xs))},e.isTimeSeries=function(t){return void 0===t&&(t="x"),"timeseries"===this.owner.config["axis_"+t+"_type"]},e.isLog=function(t){return void 0===t&&(t="x"),"log"===this.owner.config["axis_"+t+"_type"]},e.isTimeSeriesY=function(){return this.isTimeSeries("y")},e.getAxisType=function(t){void 0===t&&(t="x");let e="linear";return this.isTimeSeries(t)?e=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(t)&&(e="log"),e},e.init=function(){var t=this;const e=this.owner,n=e.config,s=e.$el,a=s.main,r=s.axis,o=e.state.clip,c=n.axis_rotated,l=["x","y"];n.axis_y2_show&&l.push("y2"),l.forEach(function(s){var l=this;i(this,t);const d=this.getAxisClassName(s),u=_t["axis"+s.toUpperCase()+"Label"];r[s]=a.append("g").attr("class",d).attr("clip-path",function(){i(this,l);let t=null;return"x"===s?t=o.pathXAxis:"y"===s&&(t=o.pathYAxis),t}.bind(this)).attr("transform",e.getTranslate(s)).style("visibility",n["axis_"+s+"_show"]?null:"hidden"),r[s].append("text").attr("class",u).attr("transform",["rotate(-90)",null]["x"===s?+!c:+c]).style("text-anchor",function(){return i(this,l),this.textAnchorForAxisLabel(s)}.bind(this)),this.generateAxes(s)}.bind(this))},e.setOrient=function(){const t=this.owner.config,e=t.axis_rotated,i=t.axis_y_inner,n=t.axis_y2_inner;this.orient={x:e?"left":"bottom",y:e?i?"top":"bottom":i?"right":"left",y2:e?n?"bottom":"top":n?"left":"right",subX:e?"left":"bottom"}},e.generateAxes=function(t){var e=this;const n=this.owner,s=n.config,a=[],r=s["axis_"+t+"_axes"],o=s.axis_rotated;let c;"x"===t?c=o?Fi.axisLeft:Fi.axisBottom:"y"===t?c=o?Fi.axisBottom:Fi.axisLeft:"y2"===t&&(c=o?Fi.axisTop:Fi.axisRight),r.length&&r.forEach(function(s){var r=this;i(this,e);const o=s.tick||{},l=n.scale[t].copy();s.domain&&l.domain(s.domain),a.push(c(l).ticks(o.count).tickFormat(k(o.format)?o.format.bind(n.api):function(t){return i(this,r),t}.bind(this)).tickValues(o.values).tickSizeOuter(!1===o.outer?0:6))}.bind(this)),this.axesList[t]=a},e.updateAxes=function(){var t=this;const e=this.owner,n=e.config,s=e.$el.main,a=e.$T;Object.keys(this.axesList).forEach(function(r){var o=this;i(this,t);const c=n["axis_"+r+"_axes"],l=e.scale[r].copy(),d=l.range();this.axesList[r].forEach(function(t,u){var h=this;i(this,o);const g=t.scale().range();d.every(function(t,e){return i(this,h),t===g[e]}.bind(this))||t.scale().range(d);const f=this.getAxisClassName(r)+"-"+(u+1);let p=s.select("."+f.replace(/\s/,"."));p.empty()?p=s.append("g").attr("class",f).style("visibility",n["axis_"+r+"_show"]?null:"hidden").call(t):(c[u].domain&&l.domain(c[u].domain),a(p).call(t.scale(l))),p.attr("transform",e.getTranslate(r,u+1))}.bind(this))}.bind(this))},e.setAxis=function(t,e,i,n){const s=this.owner;"subX"!==t&&(this.tick[t]=this.getTickValues(t)),this[t]=this.getAxis(t,e,i,!("x"!==t||!(s.scale.zoom||s.config.subchart_show||s.state.resizing))||n)},e.getAxis=function(t,e,n,s,a){var r=this;const o=this.owner,c=o.config,l=/^(x|subX)$/.test(t),d=l?"x":t,u=l&&this.isCategorized(),h=this.orient[t],g=a?0:o.getAxisTickRotate(d);let f;if(l)f="subX"===t?o.format.subXAxisTick:o.format.xAxisTick;else{const e=c["axis_"+t+"_tick_format"];k(e)&&(f=e.bind(o.api))}let p=this.tick[d];const x=st({outerTick:n,noTransition:s,config:c,id:t,tickTextRotate:g,owner:o},l&&{isCategory:u,isInverted:c.axis_x_inverted,tickMultiline:c.axis_x_tick_multiline,tickWidth:c.axis_x_tick_width,tickTitle:u&&c.axis_x_tick_tooltip&&o.api.categories(),orgXScale:o.scale.x});l||(x.tickStepSize=c["axis_"+d+"_tick_stepSize"]);const b=new Ni(x).scale(l&&o.scale.zoom||e).orient(h);if(l&&this.isTimeSeries()&&p&&!k(p)){const t=dt.bind(o);p=p.map(function(e){return i(this,r),t(e)}.bind(this))}else!l&&this.isTimeSeriesY()&&(b.ticks(c.axis_y_tick_time_value),p=null);p&&b.tickValues(p),b.tickFormat(f||!l&&o.isStackNormalized()&&function(t){return i(this,r),t+"%"}.bind(this)),u&&(b.tickCentered(c.axis_x_tick_centered),M(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1));const m=c["axis_"+d+"_tick_count"];return m&&b.ticks(m),b},e.updateXAxisTickValues=function(t,e){const i=this.owner,n=i.config,s=n.axis_x_tick_fit;let a,r=n.axis_x_tick_count;if((s||r&&s)&&(a=i.mapTargetsToUniqueXs(t),this.isCategorized()&&r>a.length&&(r=a.length),a=this.generateTickValues(a,r,this.isTimeSeries())),e)e.tickValues(a);else if(this.x){var o;this.x.tickValues(a),null==(o=this.subX)||o.tickValues(a)}return a},e.getId=function(t){const e=this.owner,i=e.config,n=e.scale;let s=i.data_axes[t];return s&&n[s]||(s="y"),s},e.getXAxisTickFormat=function(t){var e=this;const n=this.owner,s=n.config,a=n.format,r=t&&s.subchart_axis_x_tick_format||s.axis_x_tick_format,o=this.isTimeSeries(),c=this.isCategorized();let l;return r?k(r)?l=r.bind(n.api):o&&(l=function(t){return i(this,e),t?a.axisTime(r)(t):""}.bind(this)):l=o?a.defaultAxisTime:c?n.categoryName:function(t){return i(this,e),t<0?t.toFixed(0):t}.bind(this),k(l)?function(t){return i(this,e),l.apply(n,c?[t,n.categoryName(t)]:[t])}.bind(this):l},e.getTickValues=function(t){const e=this.owner,i=e.config["axis_"+t+"_tick_values"],n=e[t+"Axis"];return(k(i)?i.call(e.api):i)||(n?n.tickValues():void 0)},e.getLabelOptionByAxisId=function(t){return this.owner.config["axis_"+t+"_label"]},e.getLabelText=function(t){const e=this.getLabelOptionByAxisId(t);return C(e)?e:e?e.text:null},e.setLabelText=function(t,e){const i=this.owner.config,n=this.getLabelOptionByAxisId(t);C(n)?i["axis_"+t+"_label"]=e:n&&(n.text=e)},e.getLabelPosition=function(t,e){var n=this;const s=this.owner.config.axis_rotated,a=this.getLabelOptionByAxisId(t),r=z(a)&&a.position?a.position:e[+!s],o=function(t){return i(this,n),!!~r.indexOf(t)}.bind(this);return{isInner:o("inner"),isOuter:o("outer"),isLeft:o("left"),isCenter:o("center"),isRight:o("right"),isTop:o("top"),isMiddle:o("middle"),isBottom:o("bottom")}},e.getAxisLabelPosition=function(t){return this.getLabelPosition(t,"x"===t?["inner-top","inner-right"]:["inner-right","inner-top"])},e.getLabelPositionById=function(t){return this.getAxisLabelPosition(t)},e.xForAxisLabel=function(t){const e=this.owner,i=e.state,n=i.width,s=i.height,a=this.getAxisLabelPosition(t);let r=a.isMiddle?-s/2:0;return this.isHorizontal(e,"x"!==t)?r=a.isLeft?0:a.isCenter?n/2:n:a.isBottom&&(r=-s),r},e.dxForAxisLabel=function(t){const e=this.owner,i=this.getAxisLabelPosition(t);let n=i.isBottom?"0.5em":"0";return this.isHorizontal(e,"x"!==t)?n=i.isLeft?"0.5em":i.isRight?"-0.5em":"0":i.isTop&&(n="-0.5em"),n},e.textAnchorForAxisLabel=function(t){const e=this.owner,i=this.getAxisLabelPosition(t);let n=i.isMiddle?"middle":"end";return this.isHorizontal(e,"x"!==t)?n=i.isLeft?"start":i.isCenter?"middle":"end":i.isBottom&&(n="start"),n},e.dyForAxisLabel=function(t){const e=this.owner,i=e.config,n=i.axis_rotated,s=this.getAxisLabelPosition(t).isInner,a=i["axis_"+t+"_tick_rotate"]?e.getHorizontalAxisHeight(t):0,r=this.getMaxTickWidth(t);let o;if("x"===t){const t=i.axis_x_height;o=n?s?"1.2em":-25-r:s?"-0.5em":t?t-10:a?a-10:"3em"}else o={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[t],o=n?s?o[0]:a?a*("y2"===t?-1:1)-o[1]:o[2]:s?o[3]:(o[4]+(i["axis_"+t+"_inner"]?0:r+o[4]))*("y"===t?-1:1);return o},e.getMaxTickWidth=function(t,e){var n=this;const s=this.owner,a=s.config,r=s.state.current,o=s.$el,c=o.svg,l=o.chart,d=r.maxTickWidths[t];let u=0;if(e||!a["axis_"+t+"_show"]||d.size>0&&0===s.filterTargetsToShow().length)return d.size;if(c){const e=/^y2?$/.test(t),r=s.filterTargetsToShow(s.data.targets),o=s.scale[t].copy().domain(s["get"+(e?"Y":"X")+"Domain"](r,t)),c=o.domain(),h=c[0]===c[1]&&c.every(function(t){return i(this,n),t>0}.bind(this)),g=$(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(function(t){return i(this,n),t>0}.bind(this));if(h||g)return d.size;d.domain=c,e||d.ticks.splice(0);const f=this.getAxis(t,o,!1,!1,!0),p=a["axis_"+t+"_tick_count"];!a["axis_"+t+"_tick_values"]&&p&&f.tickValues(this.generateTickValues(c,p,e?this.isTimeSeriesY():this.isTimeSeries())),e||this.updateXAxisTickValues(r,f);const x=l.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0");f.create(x),x.selectAll("text").each((function(t,i){const n=this.getBoundingClientRect().width;u=Math.max(u,n),e||(d.ticks[i]=n)})),x.remove()}return u>0&&(d.size=u),d.size},e.getXAxisTickTextY2Overflow=function(t){const e=this.owner,i=e.axis,n=e.config,s=e.state,a=e.getAxisTickRotate("x");if((i.isCategorized()||i.isTimeSeries())&&n.axis_x_tick_fit&&!n.axis_x_tick_culling&&!n.axis_x_tick_multiline&&a>0&&a<90){const i=s.current.width-e.getCurrentPaddingLeft(),n=this.getXAxisTickMaxOverflow(a,i-t),r=Math.max(0,n)+t;return Math.min(r,i/2)}return 0},e.getXAxisTickMaxOverflow=function(t,e){const i=this.owner,n=i.axis,s=i.config,a=i.state,r=n.isTimeSeries(),o=a.current.maxTickWidths.x.ticks,c=o.length,l=a.axis.x.padding,d=l.left,u=l.right;let h=0;const g=c-(r&&s.axis_x_tick_fit?.5:0);for(let i=0;i2){const e=this.isCategorized(),s=i-2,r=t[0],o=t[t.length-1];let c;a=[r];for(let t=0;t=h)&&(g=!0,e.preventDefault())}.bind(this);r.on("touchstart",function(n){i(this,t),s.event=n,e.updateEventRect()}.bind(this)).on("touchstart.eventRect touchmove.eventRect",function(n){if(i(this,t),s.event=n,!r.empty()&&r.classed(Rt.eventRect)){if(s.dragging||s.flowing||e.hasArcType()||n.touches.length>1)return;f(n),c(r.node())}else l()}.bind(this),!0).on("touchend.eventRect",function(n){i(this,t),s.event=n,!r.empty()&&r.classed(Rt.eventRect)&&(e.hasArcType()||!e.toggleShape||s.cancelClick)&&s.cancelClick&&(s.cancelClick=!1)}.bind(this),!0),o.on("touchstart",function(e){i(this,t),s.event=e;const n=e.target;n&&n!==r.node()&&l()}.bind(this))},updateEventRect:function(t,e){var n=this;void 0===e&&(e=!1);const s=this.state,a=this.$el,r=s,o=r.eventReceiver,c=r.width,l=r.height,d=r.rendered,u=r.resizing,h=t||a.eventRect,g=function(){i(this,n),o&&(o.rect=h.node().getBoundingClientRect())}.bind(this);(!d||u||e)&&(h.attr("x",0).attr("y",0).attr("width",c).attr("height",l),d&&!e||h.classed(Rt.eventRect,!0)),g()},updateEventRectData:function(){var t=this;const e=this,n=e.config,s=e.scale,a=e.state,r=s.zoom||s.x,o=n.axis_rotated;let c,l,d,u;if(e.isMultipleX())c=0,l=0,d=a.width,u=a.height;else{let n,s;if(e.axis.isCategorized())n=e.getEventRectWidth(),s=function(e){return i(this,t),r(e.x)-n/2}.bind(this);else{const c=function(n){let s=n.index;return i(this,t),{prev:e.getPrevX(s),next:e.getNextX(s)}}.bind(this);n=function(e){var n=this;i(this,t);const s=c(e),l=r.domain();let d;return null===s.prev&&null===s.next?d=o?a.height:a.width:null===s.prev?d=(r(s.next)+r(e.x))/2:null===s.next?d=r(l[1])-(r(s.prev)+r(e.x))/2:(Object.keys(s).forEach(function(t,e){var a;i(this,n),s[t]=null!=(a=s[t])?a:l[e]}.bind(this)),d=Math.max(0,(r(s.next)-r(s.prev))/2)),d}.bind(this),s=function(e){i(this,t);const n=c(e);let s;return s=null===n.prev&&null===n.next?0:null===n.prev?r(r.domain()[0]):(r(e.x)+r(n.prev))/2,s}.bind(this)}c=o?0:s,l=o?s:0,d=o?a.width:n,u=o?n:a.height}const h=a.eventReceiver,g=function(e,n){return i(this,t),k(e)?e(n):e}.bind(this);h.coords.splice(h.data.length),h.data.forEach(function(e,n){i(this,t),h.coords[n]={x:g(c,e),y:g(l,e),w:g(d,e),h:g(u,e)}}.bind(this))},selectRectForSingle:function(t,e){var n=this;const s=this,a=s.config,r=s.$el,o=r.main,c=r.circle,l=a.data_selection_enabled,d=a.data_selection_grouped,u=a.data_selection_isselectable,h=a.tooltip_grouped,g=s.getAllValuesOnIndex(e);if(h&&(s.showTooltip(g,t),null==s.showGridFocus||s.showGridFocus(g),!l||d))return;c||o.selectAll("."+xt.EXPANDED+":not(."+Mt.shape+"-"+e+")").classed(xt.EXPANDED,!1);const f=o.selectAll("."+Mt.shape+"-"+e).classed(xt.EXPANDED,!0).style("cursor",u?"pointer":null).filter((function(t){return s.isWithinShape(this,t)}));f.empty()&&!h&&(null==s.hideGridFocus||s.hideGridFocus(),s.hideTooltip(),d||s.setExpand(e)),f.call(function(a){var r=this;i(this,n);const o=a.data();l&&(d||null!=u&&u.bind(s.api)(o))&&(t.style.cursor="pointer"),h||(s.showTooltip(o,t),null==s.showGridFocus||s.showGridFocus(o),null==s.unexpandCircles||s.unexpandCircles(),a.each(function(t){return i(this,r),s.setExpand(e,t.id)}.bind(this)))}.bind(this))},selectRectForMultipleXs:function(t,e){var n=this;void 0===e&&(e=!0);const s=this,a=s.config,r=s.state,o=s.filterTargetsToShow(s.data.targets);if(r.dragging||s.hasArcType(o))return;const c=H(r.event,t),l=s.findClosestFromTargets(o,c);if(!e||!r.mouseover||l&&l.id===r.mouseover.id||(a.data_onout.call(s.api,r.mouseover),r.mouseover=void 0),!l)return void s.unselectRect();const d=(s.isBubbleType(l)||s.isScatterType(l)||!a.tooltip_grouped?[l]:s.filterByX(o,l.x)).map(function(t){return i(this,n),s.addName(t)}.bind(this));s.showTooltip(d,t),s.setExpand(l.index,l.id,!0),s.showGridFocus(d);const u=s.dist(l,c);(s.isBarType(l.id)||u-1?r.data[s]:null}.bind(this);o.on("mouseover",function(t){i(this,e),a.event=t,n.updateEventRect()}.bind(this)).on("mousemove",(function(e){const i=t(e);if(a.event=e,!i)return;let o=i.index;const c=s.line_step_type;if(s.line_step_tooltipMatch&&n.hasType("step")&&/^step\-(before|after)$/.test(c)){const t=n.scale.zoom||n.scale.x,i=n.axis.xs[o],s=t.invert(H(e,this)[0]);"step-after"===c&&si&&(o+=1)}const l=s.tooltip_grouped&&o===r.currentIdx;a.dragging||a.flowing||n.hasArcType()||l?l&&n.setTooltipPosition():(o!==r.currentIdx&&(n.setOverOut(!1,r.currentIdx),r.currentIdx=o),-1===o?n.unselectRect():n.selectRectForSingle(this,o),n.setOverOut(-1!==o,o))})).on("mouseout",function(t){i(this,e),a.event=t,s&&!n.hasArcType()&&-1!==r.currentIdx&&(n.unselectRect(),n.setOverOut(!1,r.currentIdx),r.currentIdx=-1)}.bind(this))}return o},clickHandlerForSingleX:function(t,e){const i=e,n=i.config,s=i.state,a=i.$el.main;if(!t||i.hasArcType()||s.cancelClick)return void(s.cancelClick&&(s.cancelClick=!1));const r=t.index;a.selectAll("."+Mt.shape+"-"+r).each((function(t){(n.data_selection_grouped||i.isWithinShape(this,t))&&(null==i.toggleShape||i.toggleShape(this,t,r),n.data_onclick.bind(i.api)(t,this))}))},generateEventRectsForMultipleXs:function(t){var e=this;const n=this,s=n.state;t.on("click",(function(t){s.event=t,n.clickHandlerForMultipleXS.bind(this)(n)})),"mouse"===s.inputType&&t.on("mouseover mousemove",(function(t){s.event=t,n.selectRectForMultipleXs(this)})).on("mouseout",function(t){i(this,e),s.event=t,n.config&&!n.hasArcType()&&n.unselectRect()}.bind(this))},clickHandlerForMultipleXS:function(t){const e=t,i=e.config,n=e.state,s=e.filterTargetsToShow(e.data.targets);if(e.hasArcType(s))return;const a=H(n.event,this),r=e.findClosestFromTargets(s,a);r&&(e.isBarType(r.id)||e.dist(r,a)1&&(s=s[n[1]]),null!=(e=s)&&e.size()&&(c[t]=s)}.bind(this)),e.hideGridFocus(),e.setFlowList(c,t)}},setFlowList:function(t,e){var n=this;const s=this,a=e.flow,r=e.targets,o=a,c=o.duration,l=void 0===c?e.duration:c,d=o.index,u=o.length,h=o.orgDataCount,g=s.getFlowTransform(r,h,d,u),f=be();let p;f.add(Object.keys(t).map(function(e){var a=this;return i(this,n),p=t[e].transition().ease(Yi.easeLinear).duration(l),p="axis.x"===e?p.call(function(t){i(this,a),s.axis.x.setTransition(t).create(t)}.bind(this)):"region.list"===e?p.filter(s.isRegionOnX).attr("transform",g):p.attr("transform",g),p}.bind(this))),p.call(f,function(){i(this,n),s.cleanUpFlow(t,e)}.bind(this))},cleanUpFlow:function(t,e){var n=this;const s=this,a=s.config,r=s.state,o=s.$el.svg,c=a.axis_rotated,l=e.flow,d=e.shape,u=e.xv,h=d.pos,g=h.cx,f=h.cy,p=h.xForText,x=h.yForText,b=l,m=b.done,_=void 0===m?function(){i(this,n)}.bind(this):m,v=b.length;v&&(["circle","text","shape","eventRect"].forEach(function(t){i(this,n);const e=[];for(let i=0;i=0?"":h.URL.split("#")[0])+"#"+t+")"},appendClip:function(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath:function(t){const e=this.config,i=this.state,n=i.margin,s=i.width,a=i.height,r=e.axis_rotated,o=Math.max(30,n.left)-(r?0:20),c=r?-(1+o):-(o-1),l=-Math.max(15,n.top),d=r?n.left+20:s+10+o,u=(r?n.top+a+10:n.bottom)+20;t.attr("x",c).attr("y",l).attr("width",d).attr("height",u)},setYAxisClipPath:function(t){var e;const i=this.config,n=this.state,s=n.margin,a=n.width,r=n.height,o=i.axis_rotated,c=Math.max(30,s.left)-(o?20:0),l=i.axis_y_inner,d=l&&!o?i.axis_y_label.text?-20:-1:o?-(1+c):-(c-1),u=-(o?20:s.top),h=(o?a+15+c:s.left+20)+(l?20:0),g=(o?s.bottom+("fit"===(null==(e=i.padding)?void 0:e.mode)?10:0):s.top+r)+10;t.attr("x",d).attr("y",u).attr("width",h).attr("height",g)},updateXAxisTickClip:function(){const t=this,e=t.config,i=t.state,n=i.clip,s=i.xAxisHeight,a=t.$el.defs,r=t.getHorizontalAxisHeight("x");if(a&&!n.idXAxisTickTexts){const e=n.id+"-xaxisticktexts";t.appendClip(a,e),n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts),n.idXAxisTickTexts=e}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&r!==s&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=r},setXAxisTickClipWidth:function(){const t=this,e=t.config,i=t.state.current.maxTickWidths,n=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&n){const e=Math.sin(Math.PI/180*Math.abs(n));i.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/e}else i.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){const t=this.state,e=t.clip,i=t.current,n=this.$el.svg;n&&n.select("#"+e.idXAxisTickTexts+" rect").attr("width",i.maxTickWidths.x.clipPath).attr("height",30)}},Ui=void 0;const Zi=function(t){return i(this,Ui),S(t.position)||"end"}.bind(void 0),qi=function(t){return i(this,Ui),"start"===t.position?4:"middle"===t.position?0:-4}.bind(void 0);function Ki(t,e,n){var s=this;return function(a){i(this,s);let r=t?0:e;return"start"===a.position?r=t?-n:0:"middle"===a.position&&(r=(t?-n:e)/2),r}.bind(this)}function Ji(t,e){"grid"===e&&t.each((function(){var t=this;const e=(0,s.select)(this);["x1","x2","y1","y2"].forEach(function(n){return i(this,t),e.attr(n,Math.ceil(+e.attr(n)))}.bind(this))}))}var Qi={hasGrid:function(){var t=this;const e=this.config;return["x","y"].some(function(n){return i(this,t),e["grid_"+n+"_show"]||e["grid_"+n+"_lines"].length}.bind(this))},initGrid:function(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines:function(){const t=this,e=t.config,i=t.state.clip,n=t.$el;(e.grid_x_lines.length||e.grid_y_lines.length)&&(n.gridLines.main=n.main.insert("g","."+xt.chart+(e.grid_lines_front?" + *":"")).attr("clip-path",i.pathGrid).attr("class",Ot.grid+" "+Ot.gridLines),n.gridLines.main.append("g").attr("class",Ot.xgridLines),n.gridLines.main.append("g").attr("class",Ot.ygridLines),n.gridLines.x=(0,s.selectAll)([]))},updateXGrid:function(t){var e=this;const n=this,a=n.config,r=n.scale,o=n.state,c=n.$el,l=c.main,d=c.grid,u=a.axis_rotated,h=n.generateGridData(a.grid_x_type,r.x),g=n.axis.isCategorized()?n.axis.x.tickOffset():0,f=function(t){return i(this,e),(r.zoom||r.x)(t)+g*(u?-1:1)}.bind(this);o.xgridAttr=u?{x1:0,x2:o.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:o.height},d.x=l.select("."+Ot.xgrids).selectAll("."+Ot.xgrid).data(h),d.x.exit().remove(),d.x=d.x.enter().append("line").attr("class",Ot.xgrid).merge(d.x),t||d.x.each((function(){var t=this;const e=(0,s.select)(this);Object.keys(o.xgridAttr).forEach(function(n){var s=this;i(this,t),e.attr(n,o.xgridAttr[n]).style("opacity",function(){return i(this,s),e.attr(u?"y1":"x1")===(u?o.height:0)?"0":null}.bind(this))}.bind(this))}))},updateYGrid:function(){var t=this;const e=this,n=e.axis,s=e.config,a=e.scale,r=e.state,o=e.$el,c=o.grid,l=o.main,d=s.axis_rotated,u=function(e){return i(this,t),Math.ceil(a.y(e))}.bind(this),h=n.y.getGeneratedTicks(s.grid_y_ticks)||e.scale.y.ticks(s.grid_y_ticks);c.y=l.select("."+Ot.ygrids).selectAll("."+Ot.ygrid).data(h),c.y.exit().remove(),c.y=c.y.enter().append("line").attr("class",Ot.ygrid).merge(c.y),c.y.attr("x1",d?u:0).attr("x2",d?u:r.width).attr("y1",d?0:u).attr("y2",d?r.height:u),Ji(c.y,"grid")},updateGrid:function(){const t=this,e=t.$el,i=e.grid;e.gridLines.main||t.initGridLines(),i.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines:function(t){var e=this;const n=this,a=n.config,r=n.$el,o=r.gridLines,c=r.main,l=n.$T,d=a.axis_rotated;a["grid_"+t+"_show"]&&n["update"+t.toUpperCase()+"Grid"]();let u=c.select("."+Ot[t+"gridLines"]).selectAll("."+Ot[t+"gridLine"]).data(a["grid_"+t+"_lines"]);l(u.exit()).style("opacity","0").remove();const h=u.enter().append("g");h.append("line").style("opacity","0"),u=h.merge(u),u.each((function(t){const e=(0,s.select)(this);e.select("text").empty()&&t.text&&e.append("text").style("opacity","0")})),l(u.attr("class",function(n){return i(this,e),(Ot[t+"gridLine"]+" "+(n.class||"")).trim()}.bind(this)).select("text").attr("text-anchor",Zi).attr("transform",function(){return i(this,e),"x"===t?d?null:"rotate(-90)":d?"rotate(-90)":null}.bind(this)).attr("dx",qi).attr("dy",-5)).text((function(t){var e;return null!=(e=t.text)?e:this.remove()})),o[t]=u},redrawGrid:function(t){const e=this,i=e.config.axis_rotated,n=e.state,s=n.width,a=n.height,r=e.$el.gridLines,o=e.$T,c=e.xv.bind(e),l=e.yv.bind(e);let d=r.x.select("line"),u=r.x.select("text"),h=r.y.select("line"),g=r.y.select("text");return d=o(d,t).attr("x1",i?0:c).attr("x2",i?s:c).attr("y1",i?c:0).attr("y2",i?c:a),u=o(u,t).attr("x",Ki(!i,s,a)).attr("y",c),h=o(h,t).attr("x1",i?l:0).attr("x2",i?l:s).attr("y1",i?0:l).attr("y2",i?a:l),g=o(g,t).attr("x",Ki(i,s,a)).attr("y",l),[d.style("opacity",null),u.style("opacity",null),h.style("opacity",null),g.style("opacity",null)]},initFocusGrid:function(){const t=this,e=t.config,i=t.state.clip,n=t.$el,s=e.grid_front,a="."+(s&&n.gridLines.main?Ot.gridLines:xt.chart)+(s?" + *":""),r=n.main.insert("g",a).attr("clip-path",i.pathGrid).attr("class",Ot.grid);n.grid.main=r,e.grid_x_show&&r.append("g").attr("class",Ot.xgrids),e.grid_y_show&&r.append("g").attr("class",Ot.ygrids),e.interaction_enabled&&e.grid_focus_show&&(r.append("g").attr("class",Et.xgridFocus).append("line").attr("class",Et.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&r.append("g").attr("class",Et.ygridFocus).append("line").attr("class",Et.ygridFocus))},showGridFocus:function(t){var e=this;const n=this,a=n.config,r=n.state,o=r.width,c=r.height,l=a.axis_rotated,d=n.$el.main.selectAll("line."+Et.xgridFocus+", line."+Et.ygridFocus),u=(t||[d.datum()]).filter(function(t){return i(this,e),t&&S(n.getBaseValue(t))}.bind(this));if(!a.tooltip_show||0===u.length||n.hasType("bubble")||n.hasArcType())return;const h=a.grid_focus_edge&&!a.tooltip_grouped,g=n.xx.bind(n);d.style("visibility",null).data(u.concat(u)).each((function(t){var e=this;const a=(0,s.select)(this),r={x:g(t),y:n.getYScaleById(t.id)(t.value)};let d;if(a.classed(Et.xgridFocus))d=l?[null,r.x,h?r.y:o,r.x]:[r.x,h?r.y:null,r.x,c];else{const e="y2"===n.axis.getId(t.id);d=l?[r.y,h&&!e?r.x:null,r.y,h&&e?r.x:c]:[h&&e?r.x:null,r.y,h&&!e?r.x:o,r.y]}["x1","y1","x2","y2"].forEach(function(t,n){return i(this,e),a.attr(t,d[n])}.bind(this))})),Ji(d,"grid"),null==n.showCircleFocus||n.showCircleFocus(t)},hideGridFocus:function(){const t=this,e=t.state,i=e.inputType,n=e.resizing,s=t.$el.main;"mouse"!==i&&n||(s.selectAll("line."+Et.xgridFocus+", line."+Et.ygridFocus).style("visibility","hidden"),null==t.hideCircleFocus||t.hideCircleFocus())},updateGridFocus:function(){const t=this,e=t.state,i=e.inputType,n=e.width,s=e.height,a=e.resizing,r=t.$el.grid.main.select("line."+Et.xgridFocus);if("touch"===i)r.empty()?a&&(null==t.showCircleFocus||t.showCircleFocus()):t.showGridFocus();else{const e=t.config.axis_rotated;r.attr("x1",e?0:-10).attr("x2",e?n:-10).attr("y1",e?-10:0).attr("y2",e?-10:s)}return!0},generateGridData:function(t,e){var n=this;const s=this,a=s.$el.main.select("."+_t.axisX).selectAll(".tick").size();let r=[];if("year"===t){const t=s.getXDomain().map(function(t){return i(this,n),t.getFullYear()}.bind(this)),e=t[0],a=t[1];for(let t=e;t<=a;t++)r.push(new Date(t+"-01-01 00:00:00"))}else r=e.ticks(10),r.length>a&&(r=r.filter(function(t){return i(this,n),(t+"").indexOf(".")<0}.bind(this)));return r},getGridFilterToRemove:function(t){var e=this;return t?function(n){var s=this;i(this,e);let a=!1;return($(t)?t.concat():[t]).forEach(function(t){i(this,s),("value"in t&&n.value===t.value||"class"in t&&n.class===t.class)&&(a=!0)}.bind(this)),a}.bind(this):function(){return i(this,e),!0}.bind(this)},removeGridLines:function(t,e){var n=this;const s=this,a=s.config,r=s.$T,o=s.getGridFilterToRemove(t),c=function(t){return i(this,n),!o(t)}.bind(this),l=e?Ot.xgridLines:Ot.ygridLines,d=e?Ot.xgridLine:Ot.ygridLine;r(s.$el.main.select("."+l).selectAll("."+d).filter(o)).style("opacity","0").remove();const u="grid_"+(e?"x":"y")+"_lines";a[u]=a[u].filter(c)}},tn={initRegion:function(){const t=this.$el;t.region.main=t.main.insert("g",":first-child").attr("clip-path",this.state.clip.path).attr("class",Dt.regions)},updateRegion:function(){const t=this,e=t.config,i=t.$el.region,n=t.$T;i.main||t.initRegion(),i.main.style("visibility",t.hasArcType()?"hidden":null);const a=i.main.selectAll("."+Dt.region).data(e.regions);n(a.exit()).style("opacity","0").remove();const r=a.enter().append("g");r.append("rect").style("fill-opacity","0"),i.list=r.merge(a).attr("class",t.classRegion.bind(t)),i.list.each((function(t){var e;(0,s.select)(this).select("text").empty()&&null!=(e=t.label)&&e.text&&(0,s.select)(this).append("text").style("opacity","0")}))},redrawRegion:function(t){var e=this;const n=this,a=n.$el.region,r=n.$T;let o=a.list.select("rect"),c=a.list.selectAll("text");return o=r(o,t).attr("x",n.regionX.bind(n)).attr("y",n.regionY.bind(n)).attr("width",n.regionWidth.bind(n)).attr("height",n.regionHeight.bind(n)),c=r(c,t).attr("transform",function(t){var s;i(this,e);const a=null!=(s=t.label)?s:{},r=a.x,o=void 0===r?0:r,c=a.y,l=void 0===c?0:c,d=a.rotated,u=void 0!==d&&d;return"translate("+(n.regionX.bind(n)(t)+o)+", "+(n.regionY.bind(n)(t)+l)+")"+(u?" rotate(-90)":"")}.bind(this)).attr("text-anchor",function(t){var n;return i(this,e),null!=(n=t.label)&&n.rotated?"end":null}.bind(this)).attr("dy","1em").style("fill",function(t){var n,s;return i(this,e),null!=(n=null==(s=t.label)?void 0:s.color)?n:null}.bind(this)).text(function(t){var n;return i(this,e),null==(n=t.label)?void 0:n.text}.bind(this)),[o.style("fill-opacity",function(t){return i(this,e),S(t.opacity)?t.opacity:null}.bind(this)).on("end",(function(){(0,s.select)(this.parentNode).selectAll("rect:not([x])").remove()})),c.style("opacity",null)]},getRegionXY:function(t,e){const i=this,n=i.config,s=i.scale,a=n.axis_rotated,r="x"===t;let o,c="start",l=0;return"y"===e.axis||"y2"===e.axis?(r||(c="end"),(r?a:!a)&&c in e&&(o=s[e.axis],l=o(e[c]))):(r?!a:a)&&c in e&&(o=s.zoom||s.x,l=o(i.axis.isTimeSeries()?dt.call(i,e[c]):e[c])),l},regionX:function(t){return this.getRegionXY("x",t)},regionY:function(t){return this.getRegionXY("y",t)},getRegionSize:function(t,e){const i=this,n=i.config,s=i.scale,a=i.state,r=n.axis_rotated,o="width"===t,c=i[o?"regionX":"regionY"](e);let l,d="end",u=a[t];return"y"===e.axis||"y2"===e.axis?(o||(d="start"),(o?r:!r)&&d in e&&(l=s[e.axis],u=l(e[d]))):(o?!r:r)&&d in e&&(l=s.zoom||s.x,u=l(i.axis.isTimeSeries()?dt.call(i,e[d]):e[d])),ur.height/2&&(f=r.height/2)),f+(n.axis.getLabelPositionById(t).isInner?0:10)+("y2"!==t||d?0:-10)},getEventRectWidth:function(){const t=this.config,e=this.axis,i=t.axis_x_inverted,n=e.x.tickInterval();return Math.max(0,i?Math.abs(n):n)},getAxisTickRotate:function(t){const e=this,i=e.axis,n=e.config,s=e.state,a=e.$el;let r=n["axis_"+t+"_tick_rotate"];if("x"===t){const t=i.isCategorized()||i.isTimeSeries();if(n.axis_x_tick_fit&&t){const t=n.axis_x_tick_count,i=s.current.maxTickWidths.x.ticks.length;let a=0;if(t?a=t>i?i:t:i&&(a=i),a!==s.axis.x.tickCount){const t=e.data.targets;s.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")],a)}s.axis.x.tickCount=a}a.svg&&n.axis_x_tick_fit&&!n.axis_x_tick_multiline&&!n.axis_x_tick_culling&&n.axis_x_tick_autorotate&&t&&(r=e.needToRotateXAxisTickTexts()?n.axis_x_tick_rotate:0)}return r},needToRotateXAxisTickTexts:function(){const t=this,e=t.state,i=e.axis,n=e.current.width-t.getCurrentPaddingLeft(!1)-t.getCurrentPaddingRight(),s=i.x.tickCount+i.x.padding.left+i.x.padding.right;return t.axis.getMaxTickWidth("x")>(s?n/s:0)}},nn={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},sn={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]};function an(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function rn(t){for(var e,i=1;i1&&(n.axis_x_categories[t]=e,i.redraw()),n.axis_x_categories[t]},categories:function(t){const e=this.internal,i=e.config;return arguments.length?(i.axis_x_categories=t,e.redraw(),i.axis_x_categories):i.axis_x_categories}},$i,Pi,Ii,Mi,Xi],ln=[ji,Wi,Vi,Hi,Qi,tn,en],dn=[{data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},on,{grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0}];var un=p(12);function hn(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function gn(t){for(var e,i=1;i360&&(e=2),e*Math.PI},getGaugeStartAngle:function(){const t=this.config,e=t.gauge_fullCircle,i=-1*Math.PI/2,n=Math.PI/2;let s=t.gauge_startingAngle;return!e&&s<=i?s=i:!e&&s>=n?s=n:(s>Math.PI||s<-1*Math.PI)&&(s=Math.PI),s},updateAngle:function(t){var e=this;const n=this,s=n.config,a=n.state;let r=n.pie,o=t,c=!1;if(!s)return null;const l=n.getGaugeStartAngle(),d=s.gauge_fullCircle?n.getArcLength():-2*l;if(o.data&&n.isGaugeType(o.data)&&!n.hasMultiArcGauge()){const t=s.gauge_min,e=s.gauge_max,i=n.getTotalDataSum(a.rendered);r=r.startAngle(l).endAngle(d*((i-t)/(e-t))+l)}if(r(n.filterTargetsToShow()).forEach(function(t,n){var s;i(this,e),c||t.data.id!==(null==(s=o.data)?void 0:s.id)||(c=!0,o=t,o.index=n)}.bind(this)),isNaN(o.startAngle)&&(o.startAngle=0),isNaN(o.endAngle)&&(o.endAngle=o.startAngle),o.data&&n.hasMultiArcGauge()){const t=s.gauge_min,e=s.gauge_max,i=o.value1){var c;let a=n.getRadius(t).outerRadius;n.hasType("polar")&&(a=n.getPolarOuterRadius(t,a));const l=this.svgArc.centroid(r).map(function(t){return i(this,e),isNaN(t)?0:t}.bind(this)),d=l[0],u=l[1],h=Math.sqrt(d*d+u*u);let g=null==(c=["donut","pie","polar"].filter(n.hasType.bind(n)).map(function(t){return i(this,e),s[t+"_label_ratio"]}.bind(this)))?void 0:c[0];g=g?k(g)?g.bind(n.api)(t,a,h):g:a&&(h?(36/a>.375?1.175-36/a:.8)*a/h:0),o="translate("+d*g+","+u*g+")"}return o},convertToArcData:function(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function(t){const e=this,i=e.hasType("gauge");e.shouldShowArcLabel()&&t.style("fill",e.updateTextColor.bind(e)).attr("filter",e.updateTextBacgroundColor.bind(e)).each((function(t){var n;const a=(0,s.select)(this),r=e.updateAngle(t),o=e.getRatio("arc",r);if(e.meetsLabelThreshold(o,null==(n=["donut","gauge","pie","polar"].filter(e.hasType.bind(e)))?void 0:n[0])){const n=(r||t).value;V(a,(e.getArcLabelFormat()||e.defaultArcValueFormat)(n,o,t.data.id).toString(),[-1,1],i)}else a.text("")}))},expandArc:function(t){var e=this;const n=this,a=n.state.transiting,r=n.$el;if(a){const s=setInterval(function(){i(this,e),a||(clearInterval(s),r.legend.selectAll("."+Et.legendItemFocused).size()>0&&n.expandArc(t))}.bind(this),10);return}const o=n.mapToTargetIds(t);r.svg.selectAll(n.selectorTargets(o,"."+bt.chartArc)).each((function(t){if(!n.shouldExpand(t.data.id))return;const e=n.getExpandConfig(t.data.id,"duration"),i=n.getSvgArcExpanded(n.getExpandConfig(t.data.id,"rate"));(0,s.select)(this).selectAll("path").transition().duration(e).attrTween("d",pn(n.svgArcExpanded.bind(n))).transition().duration(2*e).attrTween("d",pn(i.bind(n)))}))},unexpandArc:function(t){var e=this;const n=this,s=n.state.transiting,a=n.$el.svg;if(s)return;const r=n.mapToTargetIds(t);a.selectAll(n.selectorTargets(r,"."+bt.chartArc)).selectAll("path").transition().duration(function(t){return i(this,e),n.getExpandConfig(t.data.id,"duration")}.bind(this)).attrTween("d",pn(n.svgArc.bind(n))),a.selectAll(""+bt.arc).style("opacity",null)},getExpandConfig:function(t,e){const i=this,n=i.config;let s;return i.isDonutType(t)?s="donut":i.isGaugeType(t)?s="gauge":i.isPieType(t)&&(s="pie"),s?n[s+"_expand_"+e]:{duration:50,rate:.98}[e]},shouldExpand:function(t){const e=this,i=e.config;return e.isDonutType(t)&&i.donut_expand||e.isGaugeType(t)&&i.gauge_expand||e.isPieType(t)&&i.pie_expand},shouldShowArcLabel:function(){var t=this;const e=this,n=e.config;return["donut","gauge","pie","polar"].some(function(s){return i(this,t),e.hasType(s)&&n[s+"_label_show"]}.bind(this))},getArcLabelFormat:function(){var t=this;const e=this,n=e.config;let s=function(e){return i(this,t),e}.bind(this);return["donut","gauge","pie","polar"].filter(e.hasType.bind(e)).forEach(function(e){i(this,t),s=n[e+"_label_format"]}.bind(this)),k(s)?s.bind(e.api):s},updateTargetsForArc:function(t){var e=this;const n=this,s=n.$el,a=n.hasType("gauge"),r=n.getChartClass("Arc"),o=n.getClass("arcs",!0),c=n.classFocus.bind(n),l=s.main.select("."+bt.chartArcs),d=l.selectAll("."+bt.chartArc).data(n.pie(t)).attr("class",function(t){return i(this,e),r(t)+c(t.data)}.bind(this)),u=d.enter().append("g").attr("class",r).call(this.setCssRule(!1,"."+bt.chartArcs+" text",["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",o).merge(d),u.append("text").attr("dy",a&&!n.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor",n.getStylePropValue("middle")).style("pointer-events",n.getStylePropValue("none")),s.text=l.selectAll("."+xt.target+" text")},initArc:function(){const t=this,e=t.$el;e.arcs=e.main.select("."+xt.chart).append("g").attr("class",bt.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle:function(t){const e=this,i=t||e.getArcTitle(),n=e.hasType("gauge");if(i){const t=n?St.chartArcsGaugeTitle:bt.chartArcsTitle;let s=e.$el.arcs.select("."+t);s.empty()&&(s=e.$el.arcs.append("text").attr("class",t).style("text-anchor","middle")),n&&s.attr("dy","-0.3em"),V(s,i,n?void 0:[-.6,1.35],!0)}},getArcTitle:function(){const t=this,e=t.hasType("donut")?"donut":t.hasType("gauge")&&"gauge";return e?t.config[e+"_title"]:""},getArcTitleWithNeedleValue:function(){const t=this,e=t.config,i=t.state,n=t.getArcTitle();if(n&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(n)){let t=i.current.needle;return R(t)||(t=e.arc_needle_value),lt(n,{NEEDLE_VALUE:R(t)?t:0})}return!1},redrawArc:function(t,e,n){var a=this;const r=this,o=r.config,c=r.state,l=r.$el.main,d=o.interaction_enabled,u=d&&o.data_selection_isselectable;let h=l.selectAll("."+bt.arcs).selectAll("."+bt.arc).data(r.arcData.bind(r));h.exit().transition().duration(e).style("opacity","0").remove(),h=h.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",function(t){return i(this,a),r.color(t.data)}.bind(this)).style("cursor",function(t){return i(this,a),null!=u&&null!=u.bind&&u.bind(r.api)(t)?"pointer":null}.bind(this)).style("opacity","0").each((function(t){r.isGaugeType(t.data)&&(t.startAngle=o.gauge_startingAngle,t.endAngle=o.gauge_startingAngle),this._current=t})).merge(h),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawMultiArcGauge()),h.attr("transform",function(t){return i(this,a),!r.isGaugeType(t.data)&&n?"scale(0)":""}.bind(this)).style("opacity",(function(t){return t===this._current?"0":null})).each(function(){i(this,a),c.transiting=!0}.bind(this)).transition().duration(t).attrTween("d",(function(t){var e=this;const n=r.updateAngle(t);if(!n)return function(){return i(this,e),"M 0 0"}.bind(this);isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const s=(0,un.interpolate)(this._current,n);return this._current=s(0),function(e){const i=s(e);return i.data=t.data,r.getArc(i,!0)}})).attr("transform",n?"scale(1)":"").style("fill",function(t){let e;return i(this,a),r.levelColor?(e=r.levelColor(t.data.values[0].value),o.data_colors[t.data.id]=e):e=r.color(t.data),e}.bind(this)).style("opacity",null).call(j,(function(){if(r.levelColor){const t=(0,s.select)(this),e=t.datum(this._current);r.updateLegendItemColor(e.data.id,t.style("fill"))}c.transiting=!1,N(o.onrendered,r.api)})),d&&r.bindArcEvent(h),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),o.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t)},redrawNeedle:function(){var t=this;const e=this,n=e.$el,s=e.config,a=e.state,r=a.hiddenTargetIds,o=(a.radius-1)/100*s.arc_needle_length,c=r.length!==e.data.targets.length;let l=e.$el.arcs.select("."+bt.needle);const d=s.arc_needle_path,u=s.arc_needle_bottom_width/2,h=s.arc_needle_top_width/2,g=s.arc_needle_top_rx,f=s.arc_needle_top_ry,p=s.arc_needle_bottom_len,x=s.arc_needle_bottom_rx,b=s.arc_needle_bottom_ry,m=e.getNeedleAngle(),_=function(){i(this,t);const n=e.getArcTitleWithNeedleValue();n&&e.setArcTitle(n)}.bind(this);if(_(),l.empty()&&(l=n.arcs.append("path").classed(bt.needle,!0),n.needle=l,n.needle.updateHelper=function(a,r){var o=this;void 0===r&&(r=!1),i(this,t),"none"!==n.needle.style("display")&&e.$T(n.needle).style("transform","rotate("+e.getNeedleAngle(a)+"deg)").call(j,function(){i(this,o),r&&(s.arc_needle_value=a),_()}.bind(this))}.bind(this)),c){const t=k(d)?d.call(e,o):"M-"+u+" "+p+" A"+x+" "+b+" 0 0 0 "+u+" "+p+" L"+h+" -"+o+" A"+g+" "+f+" 0 0 0 -"+h+" -"+o+" L-"+u+" "+p+" Z";e.$T(l).attr("d",t).style("fill",s.arc_needle_color).style("display",null).style("transform","rotate("+m+"deg)")}else l.style("display","none")},getNeedleAngle:function(t){const e=this,i=e.config,n=e.state,s=e.getArcLength(),a=e.hasType("gauge"),r=e.getTotalDataSum(!0);let o=O(t)?t:i.arc_needle_value,c=i[i.data_type+"_startingAngle"]||0,l=0;if(R(o)||(o=a&&1===e.data.targets.length?r:0),n.current.needle=o,a){c=e.getGaugeStartAngle();const t=i.gauge_fullCircle?s:-2*c,n=i.gauge_min;l=t*((o-n)/(i.gauge_max-n))}else l=s*(o/r);return(c+l)*(180/Math.PI)},redrawBackgroundArcs:function(){var t=this;const e=this,n=e.config,s=e.state,a=e.hasMultiArcGauge(),r=n.gauge_fullCircle,o=0===e.filterTargetsToShow(e.data.targets).length&&!!n.data_empty_label_text,c=e.getGaugeStartAngle(),l=r?c+e.getArcLength():-1*c;let d=e.$el.arcs.select((a?"g":"")+"."+bt.chartArcsBackground);if(a){let a=0;d=d.selectAll("path."+bt.chartArcsBackground).data(e.data.targets),d.enter().append("path").attr("class",function(e,n){return i(this,t),bt.chartArcsBackground+" "+bt.chartArcsBackground+"-"+n}.bind(this)).merge(d).style("fill",n.gauge_background||null).attr("d",function(r){let d=r.id;if(i(this,t),o||s.hiddenTargetIds.indexOf(d)>=0)return"M 0 0";const u={data:[{value:n.gauge_max}],startAngle:c,endAngle:l,index:a++};return e.getArc(u,!0,!0)}.bind(this)),d.exit().remove()}else d.attr("d",o?"M 0 0":function(){i(this,t);const s={data:[{value:n.gauge_max}],startAngle:c,endAngle:l};return e.getArc(s,!0,!0)}.bind(this))},bindArcEvent:function(t){var e=this;const n=this,a=n.config,r=n.state,o="touch"===r.inputType,c="mouse"===r.inputType;function l(t,e,i){n.expandArc(i),n.api.focus(i),n.toggleFocusLegend(i,!0),n.showTooltip([e],t)}function d(t){const e=(null==t?void 0:t.id)||void 0;n.unexpandArc(e),n.api.revert(),n.revertLegend(),n.hideTooltip()}if(t.on("click",(function(t,e,i){const s=n.updateAngle(e);let r;s&&(r=n.convertToArcData(s),null==n.toggleShape||n.toggleShape(this,r,i),a.data_onclick.bind(n.api)(r,this))})),c&&t.on("mouseover",(function(t,e){var i;if(r.transiting)return;r.event=t;const s=n.updateAngle(e),a=s?n.convertToArcData(s):null;l(this,a,(null==(i=a)?void 0:i.id)||void 0),n.setOverOut(!0,a)})).on("mouseout",function(t,s){if(i(this,e),r.transiting)return;r.event=t;const a=n.updateAngle(s),o=a?n.convertToArcData(a):null;d(),n.setOverOut(!1,o)}.bind(this)).on("mousemove",(function(t,e){const i=n.updateAngle(e),s=i?n.convertToArcData(i):null;r.event=t,n.showTooltip([s],this)})),o&&n.hasArcType()&&!n.radars){const t=function(t){i(this,e);const n=t.changedTouches[0];return(0,s.select)(h.elementFromPoint(n.clientX,n.clientY))}.bind(this);n.$el.svg.on("touchstart touchmove",(function(e){var i,s;if(r.transiting)return;r.event=e;const a=t(e).datum(),o=null!=(i=a)&&i.data&&a.data.id?n.updateAngle(a):null,c=o?n.convertToArcData(o):null,u=(null==(s=c)?void 0:s.id)||void 0;n.callOverOutForTouch(c),E(u)?d():l(this,c,u)}))}},redrawArcText:function(t){var e=this;const n=this,s=n.config,a=n.state,r=n.$el,o=r.main,c=r.arcs,l=n.hasType("gauge"),d=n.hasMultiArcGauge();let u;if(l&&1===n.data.targets.length&&s.gauge_title||(u=o.selectAll("."+bt.chartArc).select("text").style("opacity","0").attr("class",function(t){return i(this,e),n.isGaugeType(t.data)?St.gaugeValue:null}.bind(this)).call(n.textForArcLabel.bind(n)).attr("transform",n.transformForArcLabel.bind(n)).style("font-size",function(t){return i(this,e),n.isGaugeType(t.data)&&1===n.data.targets.length&&!d?Math.round(a.radius/5)+"px":null}.bind(this)).transition().duration(t).style("opacity",function(t){return i(this,e),n.isTargetToShow(t.data.id)&&n.isArcType(t.data)?null:"0"}.bind(this)),d&&u.attr("dy","-.1em")),o.select("."+bt.chartArcsTitle).style("opacity",n.hasType("donut")||l?null:"0"),l){var h;const t=s.gauge_fullCircle;t&&(null==(h=u)||h.attr("dy",""+(d?0:Math.round(a.radius/14)))),s.gauge_label_show&&(c.select("."+St.chartArcsGaugeUnit).attr("dy",(t?1.5:.75)+"em").text(s.gauge_units),c.select("."+St.chartArcsGaugeMin).attr("dx",-1*(a.innerRadius+(a.radius-a.innerRadius)/(t?1:2))+"px").attr("dy","1.2em").text(n.textForGaugeMinMax(s.gauge_min,!1)),t||c.select("."+St.chartArcsGaugeMax).attr("dx",a.innerRadius+(a.radius-a.innerRadius)/2+"px").attr("dy","1.2em").text(n.textForGaugeMinMax(s.gauge_max,!0)))}},getArcElementByIdOrIndex:function(t){var e=this;const n=this.$el.arcs,s=R(t)?function(n){return i(this,e),n.index===t}.bind(this):function(n){return i(this,e),n.data.id===t}.bind(this);return null==n?void 0:n.selectAll("."+xt.target+" path").filter(s)}},bn={initArea:function(t){const e=this.config;t.insert("g","."+(e.area_front?Tt.circles:Ct.lines)).attr("class",this.getClass("areas",!0))},updateAreaColor:function(t){const e=this;return e.config.area_linearGradient?e.getGradienColortUrl(t.id):e.color(t)},updateArea:function(t,e){void 0===e&&(e=!1);const i=this,n=i.config,a=i.state,r=i.$el,o=i.$T,c=e?r.subchart:r;n.area_linearGradient&&i.updateLinearGradient();const l=c.main.selectAll("."+mt.areas).selectAll("."+mt.area).data(i.lineData.bind(i));o(l.exit(),t).style("opacity","0").remove(),c.area=l.enter().append("path").attr("class",i.getClass("area",!0)).style("fill",i.updateAreaColor.bind(i)).style("opacity",(function(){return a.orgAreaOpacity=(0,s.select)(this).style("opacity"),"0"})).merge(l),l.style("opacity",a.orgAreaOpacity),i.setRatioForGroupedData(c.area.data())},redrawArea:function(t,e,n){var s=this;void 0===n&&(n=!1);const a=this,r=(n?this.$el.subchart:this.$el).area,o=a.state.orgAreaOpacity;return[a.$T(r,e,Z()).attr("d",t).style("fill",a.updateAreaColor.bind(a)).style("opacity",function(t){return i(this,s),(a.isAreaRangeType(t)?o/1.75:o)+""}.bind(this))]},generateDrawArea:function(t,e){var n=this;const s=this,a=s.config,r=a.line_connectNull,o=a.axis_rotated,c=s.generateGetAreaPoints(t,e),l=s.getYScaleById.bind(s),d=function(t){return i(this,n),(e?s.subxx:s.xx).call(s,t)}.bind(this),u=function(t,a){return i(this,n),s.isGrouped(t.id)?c(t,a)[0][1]:l(t.id,e)(s.isAreaRangeType(t)?s.getRangedData(t,"high"):s.getShapeYMin(t.id))}.bind(this),h=function(t,a){return i(this,n),s.isGrouped(t.id)?c(t,a)[1][1]:l(t.id,e)(s.isAreaRangeType(t)?s.getRangedData(t,"low"):t.value)}.bind(this);return function(t){var e=this;i(this,n);let c,l=r?s.filterRemoveNull(t.values):t.values,g=0,f=0;if(s.isAreaType(t)){let n=(0,Ue.area)();n=o?n.y(d).x0(u).x1(h):n.x(d).y0(a.area_above?0:a.area_below?s.state.height:u).y1(h),r||(n=n.defined(function(t){return i(this,e),null!==s.getBaseValue(t)}.bind(this))),s.isStepType(t)&&(l=s.convertValuesToStep(l)),c=n.curve(s.getCurve(t))(l)}else l[0]&&(g=s.scale.x(l[0].x),f=s.getYScaleById(t.id)(l[0].value)),c=o?"M "+f+" "+g:"M "+g+" "+f;return c||"M 0 0"}.bind(this)},generateGetAreaPoints:function(t,e){const i=this,n=i.config,s=i.getShapeX(0,t,e),a=i.getShapeY(!!e),r=i.getShapeOffset(i.isAreaType,t,e),o=i.getYScaleById.bind(i);return function(t,c){const l=o.call(i,t.id,e)(i.getShapeYMin(t.id)),d=r(t,c)||l,u=s(t),h=t.value;let g=a(t);return n.axis_rotated&&(h>0&&g0?function(){return i(this,n),c}.bind(this):R(l)?function(t){return i(this,n),t*l}.bind(this):null;return function(t,e){i(this,n);const c=r(t,e),l=+o,u=+!l,h=t.value<0,g=a["axis_"+s.axis.getId(t.id)+"_inverted"],f=!g&&h||g&&!h,p=["",""];let x=0;const b=s.isGrouped(t.id),m=!(!d||!b)&&s.isStackingRadiusData(t);if(d){const t=o?u:l,e=c[2][t]-c[0][t];x=!b||m?d(e):0;const i="a"+x+","+x+" "+(f?"1 0 0":"0 0 1")+" ";p[+!o]=""+i+x+","+x,p[+o]=""+i+[-x,x][o?"sort":"reverse"](),f&&p.reverse()}const _=o?"H"+(c[1][l]+(f?x:-x))+" "+p[0]+"V"+(c[2][u]-x)+" "+p[1]+"H"+c[3][l]:"V"+(c[1][u]+(f?-x:x))+" "+p[0]+"H"+(c[2][l]-x)+" "+p[1]+"V"+c[3][u];return"M"+c[0][l]+","+c[0][u]+_+"z"}.bind(this)},isStackingRadiusData:function(t){var e=this;const n=this,s=n.$el,a=n.config,r=n.data,o=n.state,c=t.id,l=t.index,d=t.value;if(o.hiddenTargetIds.indexOf(c)>-1){const t=s.bar.filter(function(t){return i(this,e),t.id===c&&t.value===d}.bind(this));return!t.empty()&&/a\d+/i.test(t.attr("d"))}const u=a.data_groups.find(function(t){return i(this,e),t.indexOf(c)>-1}.bind(this)),h=n.orderTargets(n.filterTargetsToShow(r.targets.filter(n.isBarType,n))).filter(function(t){return i(this,e),u.indexOf(t.id)>-1}.bind(this)).map(function(t){var n=this;return i(this,e),t.values.filter(function(t){return i(this,n),t.index===l&&(R(d)&&d>0?t.value>0:t.value<0)}.bind(this))[0]}.bind(this)).filter(Boolean).map(function(t){return i(this,e),t.id}.bind(this));return 0!==d&&h.indexOf(c)===h.length-1},generateGetBarPoints:function(t,e){var n=this;const s=this,a=s.config,r=e?s.axis.subX:s.axis.x,o=s.getIndicesMax(t)+1,c=s.getBarW("bar",r,o),l=s.getShapeX(c,t,!!e),d=s.getShapeY(!!e),u=s.getShapeOffset(s.isBarType,t,!!e),h=s.getYScaleById.bind(s);return function(t,r){i(this,n);const o=t.id,g=h.call(s,o,e)(s.getShapeYMin(o)),f=u(t,r)||g,p=R(c)?c:c[t.id]||c._$width,x=a["axis_"+s.axis.getId(o)+"_inverted"],b=t.value,m=l(t);let _=d(t);a.axis_rotated&&!x&&(b>0&&_0&&i.start=e.open),e||null}},yn={initGauge:function(){var t=this;const e=this,n=e.config,s=e.$el.arcs,a=function(e){i(this,t),s.append("text").attr("class",e).style("text-anchor","middle").style("pointer-events","none")}.bind(this);if(e.hasType("gauge")){const t=e.hasMultiArcGauge();s.append(t?"g":"path").attr("class",bt.chartArcsBackground).style("fill",!t&&n.gauge_background||null),n.gauge_units&&a(St.chartArcsGaugeUnit),n.gauge_label_show&&(a(St.chartArcsGaugeMin),n.gauge_fullCircle||a(St.chartArcsGaugeMax))}},updateGaugeMax:function(){const t=this,e=t.config,i=t.state,n=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(i.rendered);n+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=n-e.gauge_min)},redrawMultiArcGauge:function(){var t=this;const e=this,n=e.config,a=e.state,r=e.$el,o=e.state.hiddenTargetIds,c=r.main.selectAll("."+bt.arcs).selectAll("."+bt.arcLabelLine).data(e.arcData.bind(e));c.enter().append("rect").attr("class",function(e){return i(this,t),bt.arcLabelLine+" "+xt.target+" "+xt.target+"-"+e.data.id}.bind(this)).merge(c).style("fill",function(n){return i(this,t),e.levelColor?e.levelColor(n.data.values[0].value):e.color(n.data)}.bind(this)).style("display",n.gauge_label_show?null:"none").each((function(t){let i=0,n=0,r=0,c="";if(o.indexOf(t.data.id)<0){const s=e.updateAngle(t),o=a.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length*(s.index+1),l=s.endAngle-Math.PI/2,d=a.radius-o,u=l-(0===d?0:1/d);i=a.radiusExpanded-a.radius+o,n=Math.cos(u)*d,r=Math.sin(u)*d,c="rotate("+180*l/Math.PI+", "+n+", "+r+")"}(0,s.select)(this).attr("x",n).attr("y",r).attr("width",i).attr("height",2).attr("transform",c).style("stroke-dasharray","0, "+(i+2)+", 0")}))},textForGaugeMinMax:function(t,e){const i=this.config.gauge_label_extents;return k(i)?i.bind(this.api)(t,e):t},getGaugeLabelHeight:function(){const t=this.config;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge:function(){return this.getGaugeLabelHeight()*(this.config.gauge_label_show?2:2.5)}},Tn={initBubble:function(){const t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle")},getBaseLength:function(){const t=this,e=t.state,i=e.width,n=e.height,s=se;let a=t.cache.get(s);return a||t.cache.add(s,a=rt("min",[i,n])),a},getBubbleR:function(t){var e=this;const n=this;let s=n.config.bubble_maxR;k(s)?s=s.bind(n.api)(t):R(s)||(s=n.getBaseLength()/(2*n.getMaxDataCount())+12);const a=rt("max",n.getMinMaxData().max.map(function(t){return i(this,e),n.isBubbleZType(t)?n.getBubbleZData(t.value,"y"):F(t.value)?t.value.mid:t.value}.bind(this))),r=s*s*Math.PI,o=(n.isBubbleZType(t)?n.getBubbleZData(t.value,"z"):t.value)*(r/a);return Math.sqrt(o/Math.PI)},getBubbleZData:function(t,e){return F(t)?t[e]:t["y"===e?0:1]}},wn={initLine:function(){const t=this.$el;t.line=t.main.select("."+xt.chart).append("g").attr("class",Ct.chartLines).call(this.setCssRule(!1,"."+Ct.chartLines,["pointer-events:none"]))},updateTargetsForLine:function(t){var e=this;const n=this,s=n.$el,a=s.area,r=s.line,o=s.main,c=n.getChartClass("Line"),l=n.getClass("lines",!0),d=n.classFocus.bind(n);r||n.initLine();const u=t.filter(function(t){return i(this,e),!(n.isScatterType(t)||n.isBubbleType(t))}.bind(this)),h=o.select("."+Ct.chartLines).selectAll("."+Ct.chartLine).data(u).attr("class",function(t){return i(this,e),c(t)+d(t)}.bind(this)),g=h.enter().append("g").attr("class",c).style("opacity","0").style("pointer-events",n.getStylePropValue("none"));if(g.append("g").attr("class",l),n.hasTypeOf("Area")){const t=(!a&&g.empty()?h:g).filter(n.isAreaType.bind(n));n.initArea(t)}n.updateTargetForCircle(u,g)},updateLine:function(t,e){var n=this;void 0===e&&(e=!1);const s=this,a=s.format.extraLineClasses,r=s.$el,o=s.$T,c=e?r.subchart:r,l=c.main.selectAll("."+Ct.lines).selectAll("."+Ct.line).data(s.lineData.bind(s));o(l.exit(),t).style("opacity","0").remove(),c.line=l.enter().append("path").attr("class",function(t){return i(this,n),s.getClass("line",!0)(t)+" "+(a(t)||"")}.bind(this)).style("stroke",s.color).merge(l).style("opacity",s.initialOpacity.bind(s)).attr("transform",null)},redrawLine:function(t,e,i){void 0===i&&(i=!1);const n=this.$el;return[(0,this.$T)((i?n.subchart:n).line,e,Z()).attr("d",t).style("stroke",this.color).style("opacity",null)]},getCurve:function(t){var e=this;const n=this;return n.config.axis_rotated&&n.isStepType(t)?function(s){i(this,e);const a=n.getInterpolate(t)(s);return a.orgPoint=a.point,a.pointRotated=function(t,e){1===this._point&&(this._point=2);const i=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,i),this._context.lineTo(t,i),this._x=t,this._y=e},a.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},a}.bind(this):n.getInterpolate(t)},generateDrawLine:function(t,e){var n=this;const s=this,a=s.config,r=s.scale,o=a.line_connectNull,c=a.axis_rotated,l=s.generateGetLinePoints(t,e),d=s.getYScaleById.bind(s),u=function(t){return i(this,n),(e?s.subxx:s.xx).call(s,t)}.bind(this),h=function(t,a){return i(this,n),s.isGrouped(t.id)?l(t,a)[0][1]:d(t.id,e)(s.getBaseValue(t))}.bind(this);let g=(0,Ue.line)();g=c?g.x(h).y(u):g.x(u).y(h),o||(g=g.defined(function(t){return i(this,n),null!==s.getBaseValue(t)}.bind(this)));const f=e?r.subX:r.x;return function(t){i(this,n);const l=d(t.id,e);let u,h=o?s.filterRemoveNull(t.values):t.values,p=0,x=0;if(s.isLineType(t)){const e=a.data_regions[t.id];e?u=s.lineWithRegions(h,r.zoom||f,l,e):(s.isStepType(t)&&(h=s.convertValuesToStep(h)),u=g.curve(s.getCurve(t))(h))}else h[0]&&(p=f(h[0].x),x=l(h[0].value)),u=c?"M "+x+" "+p:"M "+p+" "+x;return u||"M 0 0"}.bind(this)},lineWithRegions:function(t,e,n,s){var a=this;const r=this,o=r.config.axis_rotated,c=r.axis.isTimeSeries(),l=[];let d,u,h,g;if(O(s)){const e=function(t,e){return i(this,a),E(t)?e:c?dt.call(r,t):t}.bind(this);for(let i,n=0;i=s[n];n++){const s=e(i.start,t[0].x),a=e(i.end,t[t.length-1].x),r=i.style||{dasharray:"2 2"};l[n]={start:s,end:a,style:r}}}const f=o?function(t){return i(this,a),n(t.value)}.bind(this):function(t){return i(this,a),e(t.x)}.bind(this),p=o?function(t){return i(this,a),e(t.x)}.bind(this):function(t){return i(this,a),n(t.value)}.bind(this),x=function(t){return i(this,a),"M"+t[0][0]+","+t[0][1]+"L"+t[1][0]+","+t[1][1]}.bind(this),b=c?function(t,s,r,c){i(this,a);const l=t.x.getTime(),d=s.x-t.x,g=new Date(l+d*r),f=new Date(l+d*(r+c)),p=o?[[n(u(r)),e(g)],[n(u(r+h)),e(f)]]:[[e(g),n(u(r))],[e(f),n(u(r+h))]];return x(p)}.bind(this):function(t,s,r,c){i(this,a);const l=o?[[n(u(r),!0),e(d(r))],[n(u(r+c),!0),e(d(r+c))]]:[[e(d(r),!0),n(u(r))],[e(d(r+c),!0),n(u(r+c))]];return x(l)}.bind(this),m={x:r.axis.getAxisType("x"),y:r.axis.getAxisType("y")};let _="";for(let i,s=0;i=t[s];s++){const a=t[s-1],o=a&&S(a.value);let c=r.isWithinRegions(i.x,l);if(S(i.value))if(!E(l)&&c&&o){if(o){try{c=c.dasharray.split(" ")}catch(t){c="2 2".split(" ")}d=He(m.x,a.x,i.x),u=He(m.y,a.value,i.value);const t=e(i.x)-e(a.x),s=n(i.value)-n(a.value),r=Math.sqrt(Math.pow(t,2)+Math.pow(s,2));h=c[0]/r,g=h*c[1];for(let t=h;t<=1;t+=g)_+=b(a,i,t,h),t+g>=1&&(_+=b(a,i,1,0))}}else _+=(s&&o?"L":"M")+f(i)+","+p(i)}return _},isWithinRegions:function(t,e){for(let i,n=0;i=e[n];n++)if(i.start-1?"0":null})),l&&h.forEach(function(t){var e=this;i(this,n),c.main.selectAll("."+zt.selectedCircles+a.getTargetSelectorSuffix(t.id)).selectAll(""+zt.selectedCircle).each(function(n){i(this,e),n.value=t.values[n.index].value}.bind(this))}.bind(this))},updateCircle:function(t){var e=this;void 0===t&&(t=!1);const n=this,s=n.config,a=n.state,r=n.$el,o=s.point_focus_only,c=t?r.subchart:r;if(s.point_show&&!a.toggling){const t=c.main.selectAll("."+Tt.circles).selectAll("."+Tt.circle).data(function(t){return i(this,e),n.isLineType(t)&&n.shouldDrawPointsForLine(t)||n.isBubbleType(t)||n.isRadarType(t)||n.isScatterType(t)?o?[t.values[0]]:t.values:[]}.bind(this));t.exit().remove(),t.enter().filter(Boolean).append(n.point("create",this,n.pointR.bind(n),n.getStylePropValue(n.color))),c.circle=c.main.selectAll("."+Tt.circles+" ."+Tt.circle).style("stroke",n.getStylePropValue(n.color)).style("opacity",n.initialOpacityForCircle.bind(n))}},redrawCircle:function(t,e,i,n,s){void 0===s&&(s=!1);const a=this,r=a.state.rendered,o=a.$el,c=a.$T,l=s?o.subchart:o,d=l.main.selectAll("."+zt.selectedCircle);if(!a.config.point_show)return[];const u=a.point("update",a,t,e,a.getStylePropValue(a.color),i,n,d),h=a.isCirclePoint()?"c":"",g=Z(),f=a.opacityForCircle.bind(a),p=[];return l.circle.each((function(t){let e=u.bind(this)(t);e=c(e,i||!r,g).style("opacity",f),p.push(e)})),[p,c(d,i).attr(h+"x",t).attr(h+"y",e)]},showCircleFocus:function(t){const e=this,n=e.config,a=e.state,r=a.hasRadar,o=a.resizing,c=a.toggling,l=a.transiting;let d=e.$el.circle;if(!1===l&&n.point_focus_only&&d){const n=(r?e.radarCircleX:e.circleX).bind(e),a=(r?e.radarCircleY:e.circleY).bind(e),l=c||E(t),u=e.point("update",e,n,a,e.getStylePropValue(e.color),!o&&l);t&&(d=d.filter((function(e){var n=this;const a=null==t.filter?void 0:t.filter(function(t){return i(this,n),t.id===e.id}.bind(this));return!!a.length&&(0,s.select)(this).datum(a[0])}))),d.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each((function(t){const i=t.id,n=t.index,s=t.value;let a="hidden";S(s)&&(u.bind(this)(t),e.expandCircles(n,i),a=""),this.style.visibility=a}))}},hideCircleFocus:function(){const t=this,e=t.config,i=t.$el.circle;e.point_focus_only&&i&&(t.unexpandCircles(),i.style("visibility","hidden"))},circleX:function(t){return this.xx(t)},updateCircleY:function(t){var e=this;void 0===t&&(t=!1);const n=this,s=n.generateGetLinePoints(n.getShapeIndices(n.isLineType),t);return function(a,r){i(this,e);const o=a.id;return n.isGrouped(o)?s(a,r)[0][1]:n.getYScaleById(o,t)(n.getBaseValue(a))}.bind(this)},expandCircles:function(t,e,i){const n=this,a=n.pointExpandedR.bind(n);i&&n.unexpandCircles();const r=n.getShapeByIndex("circle",t,e).classed(xt.EXPANDED,!0),o=a(r)/n.config.point_r,c=1-o;n.isCirclePoint()?r.attr("r",a):r.each((function(){const t=(0,s.select)(this);if("circle"===this.tagName)t.attr("r",a);else{const e=this.getBBox(),i=e.width,n=e.height,s=c*(+t.attr("x")+i/2),a=c*(+t.attr("y")+n/2);t.attr("transform","translate("+s+" "+a+") scale("+o+")")}}))},unexpandCircles:function(t){const e=this,i=e.pointR.bind(e),n=e.getShapeByIndex("circle",t).filter((function(){return(0,s.select)(this).classed(xt.EXPANDED)})).classed(xt.EXPANDED,!1);if(n.attr("r",i),!e.isCirclePoint()){const t=i(n)/e.config.point_r;n.attr("transform",1!==t?"scale("+t+")":null)}},pointR:function(t){const e=this,i=e.config.point_r;let n=i;return e.isBubbleType(t)?n=e.getBubbleR(t):k(i)&&(n=i.bind(e.api)(t)),t.r=n,n},pointExpandedR:function(t){const e=this,i=e.config,n=e.isBubbleType(t)?1.15:1.75;return i.point_focus_expand_enabled?i.point_focus_expand_r||e.pointR(t)*n:e.pointR(t)},pointSelectR:function(t){const e=this.config.point_select_r;return k(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function(t,e){const i=H(this.state.event,t),n=(0,s.select)(t),a=this.isCirclePoint(t)?"c":"";let r=+n.attr(a+"x"),o=+n.attr(a+"y");if(!r&&!o&&1===t.nodeType){const e=U(t);r=e.x,o=e.y}return Math.sqrt(Math.pow(r-i[0],2)+Math.pow(o-i[1],2))<(e||this.config.point_sensitivity)},getPointSensitivity:function(t){const e=this;let i=e.config.point_sensitivity;return k(i)?i=i.call(e.api,t):"radius"===i&&(i=t.r),i},insertPointInfoDefs:function(t,e){var n,a=this;const r=function(t,e){i(this,a);const n=t.attributes;for(let i,s=0;i=n[s];s++)i=i.name,e.setAttribute(i,t.getAttribute(i))}.bind(this),o=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,c=h.createElementNS(s.namespaces.svg,o.nodeName.toLowerCase());if(c.id=e,c.style.fill="inherit",c.style.stroke="inherit",r(o,c),null!=(n=o.childNodes)&&n.length){const t=(0,s.select)(c);"innerHTML"in c?t.html(o.innerHTML):tt(o.childNodes).forEach(function(e){i(this,a),r(e,t.append(e.tagName).node())}.bind(this))}this.$el.defs.node().appendChild(c)},pointFromDefs:function(t){return this.$el.defs.select("#"+t)},updatePointClass:function(t){const e=this,i=e.$el.circle;let n=!1;return(F(t)||i)&&(n=!0===t?i.each((function(t){let i=e.getClass("circle",!0)(t);this.getAttribute("class").indexOf(xt.EXPANDED)>-1&&(i+=" "+xt.EXPANDED),this.setAttribute("class",i)})):e.getClass("circle",!0)(t)),n},generateGetLinePoints:function(t,e){var n=this;const s=this,a=s.config,r=s.getShapeX(0,t,e),o=s.getShapeY(e),c=s.getShapeOffset(s.isLineType,t,e),l=s.getYScaleById.bind(s);return function(t,d){i(this,n);const u=l.call(s,t.id,e)(s.getShapeYMin(t.id)),h=c(t,d)||u,g=r(t);let f=o(t);a.axis_rotated&&(t.value>0&&f2?o-2:0),l=2;li&&(i=e),i}var Cn={initPolar:function(){const t=this,e=t.$el.arcs,i=t.config,n=i.polar_level_text_show,s=i.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",Pt),n&&s&&t.generateDataLabelBackgroundColorFilter(s)},getPolarOuterRadius:function(t,e){var i;const n=kn(this);return(null!=(i=null==t?void 0:t.data.values[0].value)?i:0)/n*e},updateTargetsForPolar:function(t){this.updateTargetsForArc(t)},redrawPolar:function(){this.config.polar_level_show&&this.updatePolarLevel()},updatePolarLevel:function(){var t=this;const e=this,n=e.config,s=e.state,a=e.$el.arcs.levels,r=n.polar_level_depth,o=kn(e),c=ot(0,r),l=s.radius,d=c.map(function(e){return i(this,t),l*((e+1)/r)}.bind(this)),u=(n.polar_level_text_format||function(){}).bind(e.api),h=a.selectAll("."+Lt).data(c);h.exit().remove();const g=h.enter().append("g").attr("class",function(e,n){return i(this,t),Lt+" "+Lt+"-"+n}.bind(this));if(g.append("circle"),g.merge(h).selectAll("circle").style("visibility",n.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",function(e){return i(this,t),d[e]}.bind(this)),n.polar_level_text_show){const a=n.polar_level_text_backgroundColor,r="#"+s.datetimeId+"-labels-bg"+e.getTargetSelectorSuffix(a);g.append("text").style("text-anchor","middle"),g.merge(h).selectAll("text").attr("dy",function(e){return i(this,t),5-d[e]}.bind(this)).attr("filter",a?"url("+r+")":null).text(function(e){return i(this,t),u(o/c.length*(e+1))}.bind(this))}}};const Rn=de;var En={initRadar:function(){const t=this,e=t.config,i=t.state.current,n=t.$el;t.hasType("radar")&&(n.radar=n.main.select("."+xt.chart).append("g").attr("class",It.chartRadars),n.radar.levels=n.radar.append("g").attr("class",Pt),n.radar.axes=n.radar.append("g").attr("class",_t.axis),n.radar.shapes=n.radar.append("g").attr("class",Mt.shapes),i.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function(){const t=this.config,e=this.state,i=e.arcWidth,n=e.arcHeight,s=t.axis_x_categories.length<4?-20:10,a=(Math.min(i,n)-s)/2;return[a,a]},updateTargetsForRadar:function(t){var e=this;const n=this.config;M(n.axis_x_categories)&&(n.axis_x_categories=ot(0,rt("max",t.map(function(t){return i(this,e),t.values.length}.bind(this))))),this.generateRadarPoints()},getRadarPosition:function(t,e,n,s){var a=this;const r=this.config,o=this.getRadarSize(),c=o[0],l=o[1],d=r.axis_x_categories.length,u=r.radar_direction_clockwise,h=tt(t).map(function(o){return i(this,a),function(t,e,i,n,s,a){const r=t&&n>0?i-n:n,o=2*Math.PI;return s*(1-a*("x"===e?Math.sin:Math.cos)(r*o/i))}(u,o,d,e,O(n)?n:"x"===t?c:l,R(s)?s:r.radar_size_ratio)}.bind(this));return 1===h.length?h[0]:h},generateRadarPoints:function(){var t=this;const e=this,n=e.data.targets,s=e.getRadarSize(),a=s[0],r=s[1],o=e.cache.get(Rn)||{},c=o._size;(!c||c.width!==a&&c.height!==r)&&(n.forEach(function(n){var s=this;i(this,t),o[n.id]=n.values.map(function(t,n){return i(this,s),e.getRadarPosition(["x","y"],n,void 0,e.getRatio("radar",t))}.bind(this))}.bind(this)),o._size={width:a,height:r},e.cache.add(Rn,o))},redrawRadar:function(){const t=this,e=t.$el,i=e.radar,n=e.main,s=t.getTranslate("radar");s&&(i.attr("transform",s),n.select("."+$t.chartTexts).attr("transform",s),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints:function(){var t=this;const e=this.cache.get(Rn);return function(n,s){i(this,t);const a=e[n.id][s];return[a,a,a,a]}.bind(this)},updateRadarLevel:function(){var t=this;const e=this,n=e.config,s=e.state,a=e.$el.radar,r=e.getRadarSize(),o=r[0],c=r[1],l=n.radar_level_depth,d=n.axis_x_categories.length,u=n.radar_level_text_show,h=a.levels,g=ot(0,l),f=n.radar_size_ratio*Math.min(o,c),p=g.map(function(e){return i(this,t),f*((e+1)/l)}.bind(this)),x=(n.radar_level_text_format||function(){}).bind(e.api),b=g.map(function(n){var s=this;i(this,t);const a=p[n];return ot(0,d).map(function(t){return i(this,s),e.getRadarPosition(["x","y"],t,a,1).join(",")}.bind(this)).join(" ")}.bind(this)),m=h.selectAll("."+Lt).data(g);m.exit().remove();const _=m.enter().append("g").attr("class",function(e,n){return i(this,t),Lt+" "+Lt+"-"+n}.bind(this));_.append("polygon").style("visibility",n.radar_level_show?null:"hidden"),u&&(h.select("text").empty()&&h.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return i(this,t),x(0)}.bind(this)),_.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(e){return i(this,t),x(s.current.dataMax/g.length*(e+1))}.bind(this))),_.merge(m).attr("transform",function(e){return i(this,t),"translate("+(o-p[e])+", "+(c-p[e])+")"}.bind(this)).selectAll("polygon").attr("points",function(e){return i(this,t),b[e]}.bind(this)),u&&h.selectAll("text").attr("x",function(e){return i(this,t),E(e)?o:b[e].split(",")[0]}.bind(this)).attr("y",function(e){return i(this,t),E(e)?c:0}.bind(this))},updateRadarAxes:function(){var t=this;const e=this,n=e.config,a=e.$el.radar,r=e.getRadarSize(),o=r[0],c=r[1],l=n.axis_x_categories;let d=a.axes.selectAll("g").data(l);d.exit().remove();const u=d.enter().append("g").attr("class",function(e,n){return i(this,t),_t.axis+"-"+n}.bind(this));if(n.radar_axis_line_show&&u.append("line"),n.radar_axis_text_show&&u.append("text"),d=u.merge(d),n.radar_axis_line_show&&d.select("line").attr("x1",o).attr("y1",c).attr("x2",function(n,s){return i(this,t),e.getRadarPosition("x",s)}.bind(this)).attr("y2",function(n,s){return i(this,t),e.getRadarPosition("y",s)}.bind(this)),n.radar_axis_text_show){const a=n.radar_axis_text_position,r=a.x,l=void 0===r?0:r,u=a.y,h=void 0===u?0:u;d.select("text").style("text-anchor","middle").attr("dy",".5em").call(function(e){i(this,t),e.each((function(t){V((0,s.select)(this),t+"",[-.6,1.2])}))}.bind(this)).datum(function(e,n){return i(this,t),{index:n}}.bind(this)).attr("transform",(function(t){E(this.width)&&(this.width=this.getBoundingClientRect().width/2);let i=e.getRadarPosition("x",t.index,void 0,1),n=Math.round(e.getRadarPosition("y",t.index,void 0,1));return i>o?i+=this.width+l:Math.round(i)c?(n/2===c&&"tspan"===this.firstChild.tagName&&this.firstChild.setAttribute("dy","0em"),n+=h):n=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Pn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i=0,p=!i||i.indexOf(h)>=0,x=o.classed(zt.SELECTED);o.classed(Ct.line)||o.classed(mt.area)||(t?f&&p&&l(r)&&!x?g(!0,o.classed(zt.SELECTED,!0),r,h):O(n)&&n&&x&&g(!1,o.classed(zt.SELECTED,!1),r,h):f&&p&&l(r)&&x&&g(!1,o.classed(zt.SELECTED,!1),r,h))}))}var vs={selected:function(t){var e=this;const n=this.internal,a=[];return n.$el.main.selectAll("."+(Mt.shapes+n.getTargetSelectorSuffix(t))).selectAll("."+Mt.shape).filter((function(){return(0,s.select)(this).classed(zt.SELECTED)})).each(function(t){return i(this,e),a.push(t)}.bind(this)),a},select:function(t,e,i){const n=this.internal;_s.bind(n)(!0,t,e,i)},unselect:function(t,e){const i=this.internal;_s.bind(i)(!1,t,e)}};const ys=function(t){var e=this;const n=this.internal,s=n.axis,a=n.brush,r=n.config,o=n.scale,c=o.x,l=o.subX,d=n.state;let u;if(r.subchart_show)if(u=t,Array.isArray(u)){s.isTimeSeries()&&(u=u.map(function(t){return i(this,e),dt.bind(n)(t)}.bind(this)));n.withinRange(u,n.getZoomDomain("subX",!0),n.getZoomDomain("subX"))&&(d.domain=u,a.move(a.getSelection(),u.map(l)))}else{var h;u=null!=(h=d.domain)?h:c.orgDomain()}return u};J(ys,{show:function(){const t=this.internal,e=t.$el.subchart,i=t.config,n=i.subchart_show;if(!n){var s,a;t.unbindZoomEvent(),i.subchart_show=!n,e.main||t.initSubchart();let o=e.main.selectAll("."+xt.target);var r;if(t.data.targets.length!==o.size())t.updateSizes(),t.updateTargetsForSubchart(t.data.targets),o=null==(r=e.main)?void 0:r.selectAll("."+xt.target);null==(s=o)||s.style("opacity",null),null==(a=e.main)||a.style("display",null),this.resize()}},hide:function(){const t=this.internal,e=t.$el.subchart.main,i=t.config;i.subchart_show&&"none"!==(null==e?void 0:e.style("display"))&&(i.subchart_show=!1,e.style("display","none"),this.resize())},toggle:function(){const t=this.internal.config;this.subchart[t.subchart_show?"hide":"show"]()},reset:function(){const t=this.internal.brush;t.clear(t.getSelection())}});var Ts={subchart:ys},ws=p(14);const As=function(t){var e,n=this;const s=this.internal,a=s.$el,r=s.axis,o=s.config,c=s.org,l=s.scale,d=s.state,u=o.axis_rotated,h=r.isCategorized();let g;if(o.zoom_enabled)if(g=t,Array.isArray(g)){r.isTimeSeries()&&(g=g.map(function(t){return i(this,n),dt.bind(s)(t)}.bind(this)));if(s.withinRange(g,s.getZoomDomain("zoom",!0),s.getZoomDomain("zoom"))){if(d.domain=g,h&&(g=g.map(function(t,e){return i(this,n),+t+(0===e?0:1)}.bind(this))),s.api.tooltip.hide(),o.subchart_show){const t=l.zoom||l.x;s.brush.getSelection().call(s.brush.move,g.map(t))}else{var f;const t=h?l.x.orgScale():c.xScale||l.x,e=[-t(g[0]),0],i=(f=ws.zoomIdentity.scale(t.range()[1]/(t(g[1])-t(g[0])))).translate.apply(f,u?e.reverse():e);a.eventRect.call(s.zoom.transform,i)}s.setZoomResetButton()}}else g=s.zoom.getDomain();return null!=(e=d.domain)?e:g};J(As,{enable:function(t){const e=this.internal,i=e.config;/^(drag|wheel)$/.test(t)&&(i.zoom_type=t),i.zoom_enabled=!!t,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function(t){const e=this.internal,i=e.config,n=e.org.xDomain;return(0===t||t)&&(i.zoom_x_max=rt("max",[n[1],t])),i.zoom_x_max},min:function(t){const e=this.internal,i=e.config,n=e.org.xDomain;return(0===t||t)&&(i.zoom_x_min=rt("min",[n[0],t])),i.zoom_x_min},range:function(t){const e=this.zoom;if(F(t)){const i=t.min,n=t.max;O(i)&&e.min(i),O(n)&&e.max(n)}return{min:e.min(),max:e.max()}}});var Ss={zoom:As,unzoom:function(){const t=this.internal,e=t.config,i=t.$el,n=i.eventRect,s=i.zoomResetBtn,a=t.state;t.scale.zoom&&(e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(ws.zoomIdentity),t.updateZoom(!0),null==s||s.style("display","none"),(0,ws.zoomTransform)(n.node())!==ws.zoomIdentity&&t.zoom.transform(n,ws.zoomIdentity),a.domain=void 0)}},ks={drag:function(t){var e=this;const n=this,a=n.config,r=n.state,o=n.$el.main,c=a.data_selection_grouped,l=a.interaction_enabled&&a.data_selection_isselectable;if(n.hasArcType()||!a.data_selection_enabled||a.zoom_enabled&&!n.zoom.altDomain||!a.data_selection_multiple)return;const d=r.dragStart||[0,0],u=d[0],h=d[1],g=t[0],f=t[1],p=Math.min(u,g),x=Math.max(u,g),b=c?r.margin.top:Math.min(h,f),m=c?r.height:Math.max(h,f);o.select("."+At.dragarea).attr("x",p).attr("y",b).attr("width",x-p).attr("height",m-b),o.selectAll("."+Mt.shapes).selectAll("."+Mt.shape).filter(function(t){return i(this,e),null==l?void 0:l.bind(n.api)(t)}.bind(this)).each((function(t,e){const i=(0,s.select)(this),a=i.classed(zt.SELECTED),r=i.classed(At.INCLUDED);let o,c=!1;if(i.classed(Tt.circle)){const t=1*+i.attr("cx"),e=1*+i.attr("cy");o=n.togglePoint,c=p0?a:e]}.bind(this))),c&&r[1].reverse(),this.extent(r),this.update()},e.brush.getSelection=function(){return i(this,t),r.main?r.main.select("."+jt.brush):(0,s.select)([])}.bind(this)},initSubchart:function(){var t=this;const e=this,n=e.config,s=e.state,a=s.clip,r=s.hasAxis,o=e.$el,c=o.defs,l=o.svg,d=o.subchart,u=o.axis;if(!r)return;const h=n.subchart_show?null:"hidden",g=a.id+"-subchart",f=e.getClipPath(g);a.idSubchart=g,e.appendClip(c,g),e.initBrush(),d.main=l.append("g").classed(jt.subchart,!0).attr("transform",e.getTranslate("context"));const p=d.main;p.style("visibility",h),p.append("g").attr("clip-path",f).attr("class",jt.chart),["bar","line","bubble","candlestick","scatter"].forEach(function(n){i(this,t);const s=Q(/^(bubble|scatter)$/.test(n)?"circle":n);if(e.hasType(n)||e.hasTypeOf(s)){const t=p.select("."+jt.chart),e=jt["chart"+s+"s"];t.select("."+e).empty()&&t.append("g").attr("class",e)}}.bind(this));const x=p.append("g").attr("clip-path",f).attr("class",jt.brush).call(e.brush);n.subchart_showHandle&&e.addBrushHandle(x),u.subX=p.append("g").attr("class",jt.axisX).attr("transform",e.getTranslate("subX")).attr("clip-path",n.axis_rotated?"":a.pathXAxis).style("visibility",n.subchart_axis_x_show?h:"hidden")},addBrushHandle:function(t){var e=this;const n=this.config,s=n.axis_rotated,a=n.subchart_init_range,r=s?["M 5.2491724,29.749209 a 6,6 0 0 0 -5.50000003,-6.5 H -5.7508276 a 6,6 0 0 0 -6.0000004,6.5 z m -5.00000003,-2 H -6.7508276 m 6.99999997,-2 H -6.7508276Z","M 5.2491724,23.249172 a 6,-6 0 0 1 -5.50000003,6.5 H -5.7508276 a 6,-6 0 0 1 -6.0000004,-6.5 z m -5.00000003,2 H -6.7508276 m 6.99999997,2 H -6.7508276Z"]:["M 0 18 A 6 6 0 0 0 -6.5 23.5 V 29 A 6 6 0 0 0 0 35 Z M -2 23 V 30 M -4 23 V 30Z","M 0 18 A 6 6 0 0 1 6.5 23.5 V 29 A 6 6 0 0 1 0 35 Z M 2 23 V 30 M 4 23 V 30Z"];this.brush.handle=t.selectAll(".handle--custom").data(s?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class","handle--custom").attr("cursor",(s?"ns":"ew")+"-resize").attr("d",function(t){return i(this,e),r[+/[se]/.test(t.type)]}.bind(this)).attr("display",a?null:"none")},updateTargetsForSubchart:function(t){var e=this;const n=this,s=n.config,a=n.state,r=n.$el.subchart.main;s.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter(function(t){return i(this,e),n.hasType(t)||n.hasTypeOf(Q(t))}.bind(this)).forEach(function(s){i(this,e);const a=/^(bubble|scatter)$/.test(s),o=Q(a?"circle":s),c=n.getChartClass(o,!0),l=n.getClass(a?"circles":s+"s",!0),d=r.select("."+jt["chart"+o+"s"]);if(a){const e=d.selectAll("."+jt.circles).data(t.filter(n["is"+Q(s)+"Type"].bind(n))).attr("class",l);e.exit().remove(),e.enter().append("g").attr("class",l)}else{const e=d.selectAll("."+jt["chart"+o]).attr("class",c).data(t.filter(n["is"+o+"Type"].bind(n))),i=e.enter().append("g").style("opacity","0").attr("class",c).append("g").attr("class",l);e.exit().remove(),"line"===s&&n.hasTypeOf("Area")&&i.append("g").attr("class",n.getClass("areas",!0))}}.bind(this)),r.selectAll("."+jt.brush+" rect").attr(s.axis_rotated?"width":"height",s.axis_rotated?a.width2:a.height2))},redrawSubchart:function(t,e,n){var s=this;const a=this,r=a.config,o=a.$el.subchart.main,c=a.state,l=!!e;var d;if((o.style("visibility",r.subchart_show?null:"hidden"),r.subchart_show)&&("zoom"===(null==(d=c.event)?void 0:d.type)&&a.brush.update(),t)){const t=r.subchart_init_range;if(K(a)||a.brush.update(),Object.keys(n.type).forEach(function(t){i(this,s);const e=Q(t),r=a["generateDraw"+e](n.indices[t],!0);a["update"+e](l,!0),a["redraw"+e](r,l,!0)}.bind(this)),a.hasType("bubble")||a.hasType("scatter")){const t=n.pos.cx,e=a.updateCircleY(!0);a.updateCircle(!0),a.redrawCircle(t,e,l,void 0,!0)}!c.rendered&&t&&(c.domain=t,a.brush.move(a.brush.getSelection(),t.map(a.scale.x)))}},redrawForBrush:function(t){var e;void 0===t&&(t=!0);const i=this,n=i.config,s=n.subchart_onbrush,a=n.zoom_rescale,r=i.scale,o=i.state;i.redraw({withTransition:!1,withY:a,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&o.rendered&&s.bind(i.api)(null!=(e=o.domain)?e:r.x.orgDomain())},transformContext:function(t,e){const i=this,n=i.$el.subchart,s=i.$T,a=null!=e&&e.axisSubX?e.axisSubX:s(n.main.select("."+jt.axisX),t);n.main.attr("transform",i.getTranslate("context")),a.attr("transform",i.getTranslate("subX"))},getExtent:function(){var t=this;const e=this,n=e.config,s=e.scale;let a=n.axis_x_extent;if(a)if(k(a))a=a.bind(e.api)(e.getXDomain(e.data.targets),s.subX);else if(e.axis.isTimeSeries()&&a.every(isNaN)){const n=dt.bind(e);a=a.map(function(e){return i(this,t),s.subX(n(e))}.bind(this))}return a}},Ls={initZoom:function(){const t=this;t.scale.zoom=null,t.generateZoom(),t.initZoomBehaviour()},bindZoomEvent:function(t){void 0===t&&(t=!0);const e=this,i=e.config;i.zoom_enabled&&t?i.subchart_show||e.bindZoomOnEventRect():!1===t&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom:function(){var t=this;const e=this,n=e.config,s=e.org,a=e.scale,r=(0,ws.zoom)().duration(0).on("start",e.onZoomStart.bind(e)).on("zoom",e.onZoom.bind(e)).on("end",e.onZoomEnd.bind(e));r.orgScaleExtent=function(){i(this,t);const s=n.zoom_extent||[1,10];return[s[0],Math.max(e.getMaxDataCount()/s[1],s[1])]}.bind(this),r.updateScaleExtent=function(){const t=D(e.scale.x.orgDomain())/D(e.getZoomDomain()),i=this.orgScaleExtent();return this.scaleExtent([i[0]*t,i[1]*t]),this},r.updateTransformScale=function(r,o){var c;i(this,t);const l=n.axis_rotated;null==(c=s.xScale)||c.range(a.x.range());const d=r[l?"rescaleY":"rescaleX"](s.xScale||a.x),u=e.trimXDomain(d.domain()),h=n.zoom_rescale;if(d.domain(u,s.xDomain),o){const t=d(a.x.domain()[0]),i=l?r.x:t,n=l?t:r.y;e.$el.eventRect.property("__zoom",ws.zoomIdentity.translate(i,n).scale(r.k))}e.state.xTickOffset||(e.state.xTickOffset=e.axis.x.tickOffset()),a.zoom=e.getCustomizedXScale(d),e.axis.x.scale(a.zoom),h&&(s.xScale||(s.xScale=a.x.copy()),a.x.domain(u))}.bind(this),r.getDomain=function(){i(this,t);const n=a[a.zoom?"zoom":"subX"].domain();return e.axis.isCategorized()&&(n[1]-=2),n}.bind(this),e.zoom=r},onZoomStart:function(t){const e=this,i=t.sourceEvent;i&&(e.zoom.startEvent=i,e.state.zooming=!0,N(e.config.zoom_onzoomstart,e.api,t))},onZoom:function(t){var e,n=this;const s=this,a=s.config,r=s.scale,o=s.state,c=s.org,l=t.sourceEvent,d=(null==t?void 0:t.transform)===ws.zoomIdentity;if(!a.zoom_enabled||0===s.filterTargetsToShow(s.data.targets).length||!r.zoom&&(null==l?void 0:l.type.indexOf("touch"))>-1&&1===(null==l?void 0:l.touches.length))return;t.sourceEvent&&(o.zooming=!0,o.domain=void 0);const u="mousemove"===(null==l?void 0:l.type),h=(null==l?void 0:l.wheelDelta)<0,g=t.transform;!u&&h&&r.x.domain().every(function(t,e){return i(this,n),t!==c.xDomain[e]}.bind(this))&&r.x.domain(c.xDomain),s.zoom.updateTransformScale(g,"wheel"===a.zoom_type&&l);const f=a.transition_duration>0&&!a.subchart_show&&(o.dragging||d||!t.sourceEvent);s.redraw({withTransition:f,withY:a.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),s.state.cancelClick=u,d||N(a.zoom_onzoom,s.api,null!=(e=s.state.domain)?e:s.zoom.getDomain())},onZoomEnd:function(t){var e,i;const n=this,s=n.config,a=n.state;let r=n.zoom.startEvent,o=null==t?void 0:t.sourceEvent;const c=(null==t?void 0:t.transform)===ws.zoomIdentity;var l;(null==(e=r)?void 0:e.type.indexOf("touch"))>-1&&(r=r.changedTouches[0],o=null==(l=o)||null==(l=l.changedTouches)?void 0:l[0]);"drag"===s.zoom_type&&o&&r.clientX===o.clientX&&r.clientY===o.clientY||(n.redrawEventRect(),n.updateZoom(),a.zooming=!1,!c&&(o||a.dragging)&&N(s.zoom_onzoomend,n.api,null!=(i=n.state.domain)?i:n.zoom.getDomain()))},updateZoom:function(t){const e=this,i=e.scale,n=i.subX,s=i.x,a=i.zoom;if(a){const i=a.domain(),r=n.domain(),o=.015,c=e.config.axis_x_inverted?(i[0]>=r[0]||i[0]+o>=r[0])&&(r[1]>=i[1]||r[1]>=i[1]+o):(i[0]<=r[0]||i[0]-o<=r[0])&&(r[1]<=i[1]||r[1]<=i[1]-o);(t||c)&&(e.axis.x.scale(n),s.domain(n.orgDomain()),e.scale.zoom=null)}},bindZoomOnEventRect:function(){var t=this;const e=this,n=e.config,s=e.$el.eventRect,a="drag"===n.zoom_type?e.zoomBehaviour:e.zoom;e.$el.svg.on("wheel",function(){i(this,t)}.bind(this)),s.call(a).on("dblclick.zoom",null)},initZoomBehaviour:function(){var t=this;const e=this,n=e.config,s=e.state,a=n.axis_rotated;let r,o=0,c=0;const l={axis:a?"y":"x",attr:a?"height":"width",index:a?1:0};e.zoomBehaviour=(0,Pe.drag)().clickDistance(4).on("start",(function(t){s.event=t,e.setDragStatus(!0),e.unselectRect(),r||(r=e.$el.main.append("rect").attr("clip-path",s.clip.path).attr("class",Nt.zoomBrush).attr("width",a?s.width:0).attr("height",a?0:s.height)),o=H(t,this)[l.index],c=o,r.attr(l.axis,o).attr(l.attr,0),e.onZoomStart(t)})).on("drag",(function(t){c=H(t,this)[l.index],r.attr(l.axis,Math.min(o,c)).attr(l.attr,Math.abs(c-o))})).on("end",function(n){var a=this;i(this,t);const d=e.scale.zoom||e.scale.x;if(s.event=n,r.attr(l.axis,0).attr(l.attr,0),o>c){var u=[c,o];o=u[0],c=u[1]}o<0&&(c+=Math.abs(o),o=0),o!==c&&e.api.zoom([o,c].map(function(t){return i(this,a),d.invert(t)}.bind(this))),e.setDragStatus(!1)}.bind(this))},setZoomResetButton:function(){const t=this,e=t.config,i=t.$el,n=e.zoom_resetButton;n&&"drag"===e.zoom_type&&(i.zoomResetBtn?i.zoomResetBtn.style("display",null):i.zoomResetBtn=t.$el.chart.append("div").classed(xt.button,!0).append("span").on("click",(function(){k(n.onclick)&&n.onclick.bind(t.api)(this),t.api.unzoom()})).classed(Nt.buttonZoomReset,!0).text(n.text||"Reset Zoom"))}},Ps=void 0,Is={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return i(this,Ps),!0}.bind(void 0),data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:function(){i(this,Ps)}.bind(void 0),data_onunselected:function(){i(this,Ps)}.bind(void 0)},Ds={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:function(){i(this,undefined)}.bind(void 0)},zs={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0},Ms=void 0;let Xs=function(){var t=this;return i(this,Ms),J(ri.prototype,Es),J(Ti.prototype,vs),ne.setOptions([Is]),(Xs=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),$s=function(){var t=this;return i(this,Ms),J(ri.prototype,Os),J(Ti.prototype,Ts),ne.setOptions([Ds]),($s=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),Fs=function(){var t=this;return i(this,Ms),J(ri.prototype,Ls),J(Ti.prototype,Ss),ne.setOptions([zs]),(Fs=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),Bs={};const Ns={version:"3.9.3-nightly-20230822004557",generate:function(t){const e=st({},Bs,t),i=new Ti(e);return i.internal.charts=this.instance,this.instance.push(i),i},defaults:function(t){return F(t)&&(Bs=t),Bs},instance:[],plugin:{}};var js=void 0;Object.keys(t).forEach(function(e){return i(this,js),t[e]()}.bind(void 0)),Object.keys(e).forEach(function(t){return i(this,js),e[t]()}.bind(void 0))}(),x}()})); \ No newline at end of file diff --git a/dist/billboard.pkgd.js b/dist/billboard.pkgd.js index 95656ba41..ccd914f95 100644 --- a/dist/billboard.pkgd.js +++ b/dist/billboard.pkgd.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills. * - @types/d3-selection ^3.0.5 @@ -28042,7 +28042,7 @@ function getDataKeyForJson(keysParam, config) { return Math.max.apply(Math, this.data.targets.map(function (t) { _newArrowCheck(this, _this17); return t.values.length; - }.bind(this))); + }.bind(this)).concat([0])); }, getMaxDataCountTarget: function getMaxDataCountTarget() { var _this18 = this; @@ -53263,7 +53263,7 @@ let _defaults = {}; /** * @namespace bb - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */ const bb = { /** @@ -53273,7 +53273,7 @@ const bb = { * bb.version; // "1.0.0" * @memberof bb */ - version: "3.9.3-nightly-20230819004547", + version: "3.9.3-nightly-20230822004557", /** * Generate chart * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: diff --git a/dist/billboard.pkgd.min.js b/dist/billboard.pkgd.min.js index 0f0f77679..36bafaabd 100644 --- a/dist/billboard.pkgd.min.js +++ b/dist/billboard.pkgd.min.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills. * - @types/d3-selection ^3.0.5 @@ -24,4 +24,4 @@ * - d3-transition ^3.0.1 * - d3-zoom ^3.0.0 */ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(this,(function(){return function(){var t=[function(t,e,n){"use strict";n(1),n(100),n(101),n(102),n(103),n(104),n(105),n(106),n(107),n(108),n(109),n(110),n(111),n(112),n(113),n(114),n(126),n(128),n(138),n(139),n(141),n(144),n(147),n(149),n(151),n(152),n(153),n(154),n(156),n(157),n(159),n(160),n(162),n(166),n(167),n(168),n(169),n(174),n(175),n(177),n(178),n(179),n(181),n(184),n(185),n(186),n(187),n(188),n(193),n(195),n(196),n(198),n(201),n(202),n(203),n(204),n(205),n(207),n(215),n(217),n(220),n(222),n(223),n(224),n(225),n(226),n(230),n(231),n(233),n(234),n(235),n(237),n(238),n(239),n(95),n(240),n(241),n(249),n(251),n(252),n(253),n(254),n(255),n(257),n(258),n(260),n(261),n(262),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(275),n(276),n(278),n(280),n(281),n(282),n(283),n(284),n(286),n(288),n(289),n(290),n(291),n(293),n(294),n(296),n(297),n(298),n(299),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(322),n(323),n(324),n(325),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(373),n(374),n(376),n(377),n(378),n(379),n(380),n(382),n(383),n(385),n(388),n(389),n(390),n(391),n(392),n(396),n(397),n(399),n(400),n(401),n(402),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(412),n(415),n(418),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(442),n(443),n(444),n(445),n(446),n(447),n(448),n(449),n(450),n(451),n(452),n(453),n(454),n(457),n(458),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480),n(481),n(482),n(483),n(484),n(487),n(489),n(491),n(492),n(495),n(496),n(499),n(500),n(501),n(506),n(507),n(508),n(512),n(515),n(520),n(521),n(522),n(523),n(524),n(525),n(82)},function(t,e,n){"use strict";n(2),n(92),n(94),n(95),n(99)},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(8),s=n(14),a=n(36),c=n(6),u=n(27),l=n(7),h=n(39),f=n(25),d=n(47),g=n(12),p=n(18),v=n(69),y=n(11),b=n(72),x=n(74),m=n(58),_=n(76),T=n(67),w=n(5),A=n(45),S=n(73),E=n(10),k=n(48),O=n(79),M=n(35),R=n(54),C=n(55),I=n(41),P=n(34),L=n(80),D=n(81),N=n(83),z=n(84),F=n(52),j=n(85).forEach,B=R("hidden"),X="Symbol",$="prototype",U=F.set,Y=F.getterFor(X),V=Object[$],G=r.Symbol,H=G&&G[$],W=r.TypeError,q=r.QObject,Z=w.f,K=A.f,J=_.f,Q=E.f,tt=s([].push),et=M("symbols"),nt=M("op-symbols"),it=M("wks"),rt=!q||!q[$]||!q[$].findChild,ot=c&&l((function(){return 7!==b(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(t,e,n){var i=Z(V,e);i&&delete V[e],K(t,e,n),i&&t!==V&&K(V,e,i)}:K,st=function(t,e){var n=et[t]=b(H);return U(n,{type:X,tag:t,description:e}),c||(n.description=e),n},at=function(t,e,n){t===V&&at(nt,e,n),d(t);var i=p(e);return d(n),h(et,i)?(n.enumerable?(h(t,B)&&t[B][i]&&(t[B][i]=!1),n=b(n,{enumerable:y(0,!1)})):(h(t,B)||K(t,B,y(1,{})),t[B][i]=!0),ot(t,i,n)):K(t,i,n)},ct=function(t,e){d(t);var n=g(e),i=x(n).concat(ft(n));return j(i,(function(e){c&&!o(ut,n,e)||at(t,e,n[e])})),t},ut=function(t){var e=p(t),n=o(Q,this,e);return!(this===V&&h(et,e)&&!h(nt,e))&&(!(n||!h(this,e)||!h(et,e)||h(this,B)&&this[B][e])||n)},lt=function(t,e){var n=g(t),i=p(e);if(n!==V||!h(et,i)||h(nt,i)){var r=Z(n,i);return!r||!h(et,i)||h(n,B)&&n[B][i]||(r.enumerable=!0),r}},ht=function(t){var e=J(g(t)),n=[];return j(e,(function(t){h(et,t)||h(C,t)||tt(n,t)})),n},ft=function(t){var e=t===V,n=J(e?nt:g(t)),i=[];return j(n,(function(t){!h(et,t)||e&&!h(V,t)||tt(i,et[t])})),i};u||(G=function(){if(f(H,this))throw W("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?v(arguments[0]):void 0,e=I(t),n=function(t){this===V&&o(n,nt,t),h(this,B)&&h(this[B],e)&&(this[B][e]=!1),ot(this,e,y(1,t))};return c&&rt&&ot(V,e,{configurable:!0,set:n}),st(e,t)},k(H=G[$],"toString",(function(){return Y(this).tag})),k(G,"withoutSetter",(function(t){return st(I(t),t)})),E.f=ut,A.f=at,S.f=ct,w.f=lt,m.f=_.f=ht,T.f=ft,L.f=function(t){return st(P(t),t)},c&&(O(H,"description",{configurable:!0,get:function(){return Y(this).description}}),a||k(V,"propertyIsEnumerable",ut,{unsafe:!0}))),i({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:G}),j(x(it),(function(t){D(t)})),i({target:X,stat:!0,forced:!u},{useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),i({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(t,e){return void 0===e?b(t):ct(b(t),e)},defineProperty:at,defineProperties:ct,getOwnPropertyDescriptor:lt}),i({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ht}),N(),z(G,X),C[B]=!0},function(t,e,n){"use strict";var i=n(4),r=n(5).f,o=n(44),s=n(48),a=n(38),c=n(56),u=n(68);t.exports=function(t,e){var n,l,h,f,d,g=t.target,p=t.global,v=t.stat;if(n=p?i:v?i[g]||a(g,{}):(i[g]||{}).prototype)for(l in e){if(f=e[l],h=t.dontCallGetSet?(d=r(n,l))&&d.value:n[l],!u(p?l:g+(v?".":"#")+l,t.forced)&&void 0!==h){if(typeof f==typeof h)continue;c(f,h)}(t.sham||h&&h.sham)&&o(f,"sham",!0),s(n,l,f,t)}}},function(t){"use strict";var e=function(t){return t&&t.Math===Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},function(t,e,n){"use strict";var i=n(6),r=n(8),o=n(10),s=n(11),a=n(12),c=n(18),u=n(39),l=n(42),h=Object.getOwnPropertyDescriptor;e.f=i?h:function(t,e){if(t=a(t),e=c(e),l)try{return h(t,e)}catch(t){}if(u(t,e))return s(!r(o.f,t,e),t[e])}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";var i=n(9),r=Function.prototype.call;t.exports=i?r.bind(r):function(){return r.apply(r,arguments)}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},function(t,e){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);e.f=r?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";var i=n(13),r=n(16);t.exports=function(t){return i(r(t))}},function(t,e,n){"use strict";var i=n(14),r=n(7),o=n(15),s=Object,a=i("".split);t.exports=r((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?a(t,""):s(t)}:s},function(t,e,n){"use strict";var i=n(9),r=Function.prototype,o=r.call,s=i&&r.bind.bind(o,o);t.exports=i?s:function(t){return function(){return o.apply(t,arguments)}}},function(t,e,n){"use strict";var i=n(14),r=i({}.toString),o=i("".slice);t.exports=function(t){return o(r(t),8,-1)}},function(t,e,n){"use strict";var i=n(17),r=TypeError;t.exports=function(t){if(i(t))throw r("Can't call method on "+t);return t}},function(t){"use strict";t.exports=function(t){return null==t}},function(t,e,n){"use strict";var i=n(19),r=n(23);t.exports=function(t){var e=i(t,"string");return r(e)?e:e+""}},function(t,e,n){"use strict";var i=n(8),r=n(20),o=n(23),s=n(30),a=n(33),c=n(34),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!r(t)||o(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=i(c,t,e),!r(n)||o(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},function(t,e,n){"use strict";var i=n(21),r=n(22),o=r.all;t.exports=r.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===o}:function(t){return"object"==typeof t?null!==t:i(t)}},function(t,e,n){"use strict";var i=n(22),r=i.all;t.exports=i.IS_HTMLDDA?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},function(t){"use strict";var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},function(t,e,n){"use strict";var i=n(24),r=n(21),o=n(25),s=n(26),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return r(e)&&o(e.prototype,a(t))}},function(t,e,n){"use strict";var i=n(4),r=n(21);t.exports=function(t,e){return arguments.length<2?(n=i[t],r(n)?n:void 0):i[t]&&i[t][e];var n}},function(t,e,n){"use strict";var i=n(14);t.exports=i({}.isPrototypeOf)},function(t,e,n){"use strict";var i=n(27);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){"use strict";var i=n(28),r=n(7),o=n(4).String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},function(t,e,n){"use strict";var i,r,o=n(4),s=n(29),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(r=(i=l.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!r&&s&&(!(i=s.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/))&&(r=+i[1]),t.exports=r},function(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(t,e,n){"use strict";var i=n(31),r=n(17);t.exports=function(t,e){var n=t[e];return r(n)?void 0:i(n)}},function(t,e,n){"use strict";var i=n(21),r=n(32),o=TypeError;t.exports=function(t){if(i(t))return t;throw o(r(t)+" is not a function")}},function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},function(t,e,n){"use strict";var i=n(8),r=n(21),o=n(20),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&r(n=t.toString)&&!o(a=i(n,t)))return a;if(r(n=t.valueOf)&&!o(a=i(n,t)))return a;if("string"!==e&&r(n=t.toString)&&!o(a=i(n,t)))return a;throw s("Can't convert object to primitive value")}},function(t,e,n){"use strict";var i=n(4),r=n(35),o=n(39),s=n(41),a=n(27),c=n(26),u=i.Symbol,l=r("wks"),h=c?u.for||u:u&&u.withoutSetter||s;t.exports=function(t){return o(l,t)||(l[t]=a&&o(u,t)?u[t]:h("Symbol."+t)),l[t]}},function(t,e,n){"use strict";var i=n(36),r=n(37);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.32.1",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})},function(t){"use strict";t.exports=!1},function(t,e,n){"use strict";var i=n(4),r=n(38),o="__core-js_shared__",s=i[o]||r(o,{});t.exports=s},function(t,e,n){"use strict";var i=n(4),r=Object.defineProperty;t.exports=function(t,e){try{r(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},function(t,e,n){"use strict";var i=n(14),r=n(40),o=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(r(t),e)}},function(t,e,n){"use strict";var i=n(16),r=Object;t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";var i=n(14),r=0,o=Math.random(),s=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++r+o,36)}},function(t,e,n){"use strict";var i=n(6),r=n(7),o=n(43);t.exports=!i&&!r((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";var i=n(4),r=n(20),o=i.document,s=r(o)&&r(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},function(t,e,n){"use strict";var i=n(6),r=n(45),o=n(11);t.exports=i?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){"use strict";var i=n(6),r=n(42),o=n(46),s=n(47),a=n(18),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",d="writable";e.f=i?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]){var i=l(t,e);i&&i[d]&&(t[e]=n.value,n={configurable:f in n?n[f]:i[f],enumerable:h in n?n[h]:i[h],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),r)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";var i=n(6),r=n(7);t.exports=i&&r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(t,e,n){"use strict";var i=n(20),r=String,o=TypeError;t.exports=function(t){if(i(t))return t;throw o(r(t)+" is not an object")}},function(t,e,n){"use strict";var i=n(21),r=n(45),o=n(49),s=n(38);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(i(n)&&o(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=n:r.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},function(t,e,n){"use strict";var i=n(14),r=n(7),o=n(21),s=n(39),a=n(6),c=n(50).CONFIGURABLE,u=n(51),l=n(52),h=l.enforce,f=l.get,d=String,g=Object.defineProperty,p=i("".slice),v=i("".replace),y=i([].join),b=a&&!r((function(){return 8!==g((function(){}),"length",{value:8}).length})),x=String(String).split("String"),m=t.exports=function(t,e,n){"Symbol("===p(d(e),0,7)&&(e="["+v(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||c&&t.name!==e)&&(a?g(t,"name",{value:e,configurable:!0}):t.name=e),b&&n&&s(n,"arity")&&t.length!==n.arity&&g(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=h(t);return s(i,"source")||(i.source=y(x,"string"==typeof e?e:"")),t};Function.prototype.toString=m((function(){return o(this)&&f(this).source||u(this)}),"toString")},function(t,e,n){"use strict";var i=n(6),r=n(39),o=Function.prototype,s=i&&Object.getOwnPropertyDescriptor,a=r(o,"name"),c=a&&"something"===function(){}.name,u=a&&(!i||i&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},function(t,e,n){"use strict";var i=n(14),r=n(21),o=n(37),s=i(Function.toString);r(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},function(t,e,n){"use strict";var i,r,o,s=n(53),a=n(4),c=n(20),u=n(44),l=n(39),h=n(37),f=n(54),d=n(55),g="Object already initialized",p=a.TypeError,v=a.WeakMap;if(s||h.state){var y=h.state||(h.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,i=function(t,e){if(y.has(t))throw p(g);return e.facade=t,y.set(t,e),e},r=function(t){return y.get(t)||{}},o=function(t){return y.has(t)}}else{var b=f("state");d[b]=!0,i=function(t,e){if(l(t,b))throw p(g);return e.facade=t,u(t,b,e),e},r=function(t){return l(t,b)?t[b]:{}},o=function(t){return l(t,b)}}t.exports={set:i,get:r,has:o,enforce:function(t){return o(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=r(e)).type!==t)throw p("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){"use strict";var i=n(4),r=n(21),o=i.WeakMap;t.exports=r(o)&&/native code/.test(String(o))},function(t,e,n){"use strict";var i=n(35),r=n(41),o=i("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},function(t){"use strict";t.exports={}},function(t,e,n){"use strict";var i=n(39),r=n(57),o=n(5),s=n(45);t.exports=function(t,e,n){for(var a=r(e),c=s.f,u=o.f,l=0;lu;)r(i,n=e[u++])&&(~s(l,n)||c(l,n));return l}},function(t,e,n){"use strict";var i=n(12),r=n(61),o=n(64),s=function(t){return function(e,n,s){var a,c=i(e),u=o(c),l=r(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},function(t,e,n){"use strict";var i=n(62),r=Math.max,o=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):o(n,e)}},function(t,e,n){"use strict";var i=n(63);t.exports=function(t){var e=+t;return e!=e||0===e?0:i(e)}},function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?n:e)(i)}},function(t,e,n){"use strict";var i=n(65);t.exports=function(t){return i(t.length)}},function(t,e,n){"use strict";var i=n(62),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";var i=n(7),r=n(21),o=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n===l||n!==u&&(r(e)?i(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},function(t,e,n){"use strict";var i=n(70),r=String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return r(t)}},function(t,e,n){"use strict";var i=n(71),r=n(21),o=n(15),s=n(34)("toStringTag"),a=Object,c="Arguments"===o(function(){return arguments}());t.exports=i?o:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?n:c?o(e):"Object"===(i=o(e))&&r(e.callee)?"Arguments":i}},function(t,e,n){"use strict";var i={};i[n(34)("toStringTag")]="z",t.exports="[object z]"===String(i)},function(t,e,n){"use strict";var i,r=n(47),o=n(73),s=n(66),a=n(55),c=n(75),u=n(43),l=n(54),h="prototype",f="script",d=l("IE_PROTO"),g=function(){},p=function(t){return"<"+f+">"+t+""},v=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;y="undefined"!=typeof document?document.domain&&i?v(i):(e=u("iframe"),n="java"+f+":",e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):v(i);for(var r=s.length;r--;)delete y[h][s[r]];return y()};a[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(g[h]=r(t),n=new g,g[h]=null,n[d]=t):n=y(),void 0===e?n:o.f(n,e)}},function(t,e,n){"use strict";var i=n(6),r=n(46),o=n(45),s=n(47),a=n(12),c=n(74);e.f=i&&!r?Object.defineProperties:function(t,e){s(t);for(var n,i=a(e),r=c(e),u=r.length,l=0;u>l;)o.f(t,n=r[l++],i[n]);return t}},function(t,e,n){"use strict";var i=n(59),r=n(66);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e,n){"use strict";var i=n(24);t.exports=i("document","documentElement")},function(t,e,n){"use strict";var i=n(15),r=n(12),o=n(58).f,s=n(77),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"===i(t)?function(t){try{return o(t)}catch(t){return s(a)}}(t):o(r(t))}},function(t,e,n){"use strict";var i=n(61),r=n(64),o=n(78),s=Array,a=Math.max;t.exports=function(t,e,n){for(var c=r(t),u=i(e,c),l=i(void 0===n?c:n,c),h=s(a(l-u,0)),f=0;uA;A++)if((d||A in _)&&(x=T(b=_[A],A,m),t))if(e)E[A]=x;else if(x)switch(t){case 3:return!0;case 5:return b;case 6:return A;case 2:u(E,b)}else switch(t){case 4:return!1;case 7:u(E,b)}return h?-1:r||l?l:E}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(t,e,n){"use strict";var i=n(87),r=n(31),o=n(9),s=i(i.bind);t.exports=function(t,e){return r(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";var i=n(15),r=n(14);t.exports=function(t){if("Function"===i(t))return r(t)}},function(t,e,n){"use strict";var i=n(89);t.exports=function(t,e){return new(i(t))(0===e?0:e)}},function(t,e,n){"use strict";var i=n(90),r=n(91),o=n(20),s=n(34)("species"),a=Array;t.exports=function(t){var e;return i(t)&&(e=t.constructor,(r(e)&&(e===a||i(e.prototype))||o(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?a:e}},function(t,e,n){"use strict";var i=n(15);t.exports=Array.isArray||function(t){return"Array"===i(t)}},function(t,e,n){"use strict";var i=n(14),r=n(7),o=n(21),s=n(70),a=n(24),c=n(51),u=function(){},l=[],h=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=i(f.exec),g=!f.exec(u),p=function(t){if(!o(t))return!1;try{return h(u,l,t),!0}catch(t){return!1}},v=function(t){if(!o(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!d(f,c(t))}catch(t){return!0}};v.sham=!0,t.exports=!h||r((function(){var t;return p(p.call)||!p(Object)||!p((function(){t=!0}))||t}))?v:p},function(t,e,n){"use strict";var i=n(3),r=n(24),o=n(39),s=n(69),a=n(35),c=n(93),u=a("string-to-symbol-registry"),l=a("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=s(t);if(o(u,e))return u[e];var n=r("Symbol")(e);return u[e]=n,l[n]=e,n}})},function(t,e,n){"use strict";var i=n(27);t.exports=i&&!!Symbol.for&&!!Symbol.keyFor},function(t,e,n){"use strict";var i=n(3),r=n(39),o=n(23),s=n(32),a=n(35),c=n(93),u=a("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!c},{keyFor:function(t){if(!o(t))throw TypeError(s(t)+" is not a symbol");if(r(u,t))return u[t]}})},function(t,e,n){"use strict";var i=n(3),r=n(24),o=n(96),s=n(8),a=n(14),c=n(7),u=n(21),l=n(23),h=n(97),f=n(98),d=n(27),g=String,p=r("JSON","stringify"),v=a(/./.exec),y=a("".charAt),b=a("".charCodeAt),x=a("".replace),m=a(1..toString),_=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,A=!d||c((function(){var t=r("Symbol")("stringify detection");return"[null]"!==p([t])||"{}"!==p({a:t})||"{}"!==p(Object(t))})),S=c((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),E=function(t,e){var n=h(arguments),i=f(e);if(u(i)||void 0!==t&&!l(t))return n[1]=function(t,e){if(u(i)&&(e=s(i,this,g(t),e)),!l(e))return e},o(p,null,n)},k=function(t,e,n){var i=y(n,e-1),r=y(n,e+1);return v(T,t)&&!v(w,r)||v(w,t)&&!v(T,i)?"\\u"+m(b(t,0),16):t};p&&i({target:"JSON",stat:!0,arity:3,forced:A||S},{stringify:function(t,e,n){var i=h(arguments),r=o(A?E:p,null,i);return S&&"string"==typeof r?x(r,_,k):r}})},function(t,e,n){"use strict";var i=n(9),r=Function.prototype,o=r.apply,s=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?s.bind(o):function(){return s.apply(o,arguments)})},function(t,e,n){"use strict";var i=n(14);t.exports=i([].slice)},function(t,e,n){"use strict";var i=n(14),r=n(90),o=n(21),s=n(15),a=n(69),c=i([].push);t.exports=function(t){if(o(t))return t;if(r(t)){for(var e=t.length,n=[],i=0;ib&&f(i,arguments[b]),i}));if(A.prototype=T,"Error"!==m?a?a(A,w):c(A,w,{name:!0}):g&&y in _&&(u(A,_,y),u(A,_,"prepareStackTrace")),c(A,_),!p)try{T.name!==m&&o(T,"name",m),T.constructor=A}catch(t){}return A}}},function(t,e,n){"use strict";var i=n(117),r=n(47),o=n(118);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=i(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),o(i),e?t(n,i):n.__proto__=i,n}}():void 0)},function(t,e,n){"use strict";var i=n(14),r=n(31);t.exports=function(t,e,n){try{return i(r(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},function(t,e,n){"use strict";var i=n(21),r=String,o=TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw o("Can't set "+r(t)+" as a prototype")}},function(t,e,n){"use strict";var i=n(45).f;t.exports=function(t,e,n){n in t||i(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},function(t,e,n){"use strict";var i=n(21),r=n(20),o=n(116);t.exports=function(t,e,n){var s,a;return o&&i(s=e.constructor)&&s!==n&&r(a=s.prototype)&&a!==n.prototype&&o(t,a),t}},function(t,e,n){"use strict";var i=n(69);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},function(t,e,n){"use strict";var i=n(20),r=n(44);t.exports=function(t,e){i(e)&&"cause"in e&&r(t,"cause",e.cause)}},function(t,e,n){"use strict";var i=n(44),r=n(124),o=n(125),s=Error.captureStackTrace;t.exports=function(t,e,n,a){o&&(s?s(t,e):i(t,"stack",r(n,a)))}},function(t,e,n){"use strict";var i=n(14),r=Error,o=i("".replace),s=String(r("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,c=a.test(s);t.exports=function(t,e){if(c&&"string"==typeof t&&!r.prepareStackTrace)for(;e--;)t=o(t,a,"");return t}},function(t,e,n){"use strict";var i=n(7),r=n(11);t.exports=!i((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",r(1,7)),7!==t.stack)}))},function(t,e,n){"use strict";var i=n(48),r=n(127),o=Error.prototype;o.toString!==r&&i(o,"toString",r)},function(t,e,n){"use strict";var i=n(6),r=n(7),o=n(47),s=n(72),a=n(121),c=Error.prototype.toString,u=r((function(){if(i){var t=s(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==c.call(t))return!0}return"2: 1"!==c.call({message:1,name:2})||"Error"!==c.call({})}));t.exports=u?function(){var t=o(this),e=a(t.name,"Error"),n=a(t.message);return e?n?e+": "+n:e:n}:c},function(t,e,n){"use strict";n(129)},function(t,e,n){"use strict";var i=n(3),r=n(25),o=n(130),s=n(116),a=n(56),c=n(72),u=n(44),l=n(11),h=n(122),f=n(123),d=n(132),g=n(121),p=n(34)("toStringTag"),v=Error,y=[].push,b=function(t,e){var n,i=r(x,this);s?n=s(v(),i?o(this):x):(n=i?this:c(x),u(n,p,"Error")),void 0!==e&&u(n,"message",g(e)),f(n,b,n.stack,1),arguments.length>2&&h(n,arguments[2]);var a=[];return d(t,y,{that:a}),u(n,"errors",a),n};s?s(b,v):a(b,v,{name:!0});var x=b.prototype=c(v.prototype,{constructor:l(1,b),message:l(1,""),name:l(1,"AggregateError")});i({global:!0,constructor:!0,arity:2},{AggregateError:b})},function(t,e,n){"use strict";var i=n(39),r=n(21),o=n(40),s=n(54),a=n(131),c=s("IE_PROTO"),u=Object,l=u.prototype;t.exports=a?u.getPrototypeOf:function(t){var e=o(t);if(i(e,c))return e[c];var n=e.constructor;return r(n)&&e instanceof n?n.prototype:e instanceof u?l:null}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){"use strict";var i=n(86),r=n(8),o=n(47),s=n(32),a=n(133),c=n(64),u=n(25),l=n(135),h=n(136),f=n(137),d=TypeError,g=function(t,e){this.stopped=t,this.result=e},p=g.prototype;t.exports=function(t,e,n){var v,y,b,x,m,_,T,w=n&&n.that,A=!(!n||!n.AS_ENTRIES),S=!(!n||!n.IS_RECORD),E=!(!n||!n.IS_ITERATOR),k=!(!n||!n.INTERRUPTED),O=i(e,w),M=function(t){return v&&f(v,"normal",t),new g(!0,t)},R=function(t){return A?(o(t),k?O(t[0],t[1],M):O(t[0],t[1])):k?O(t,M):O(t)};if(S)v=t.iterator;else if(E)v=t;else{if(!(y=h(t)))throw d(s(t)+" is not iterable");if(a(y)){for(b=0,x=c(t);x>b;b++)if((m=R(t[b]))&&u(p,m))return m;return new g(!1)}v=l(t,y)}for(_=S?t.next:v.next;!(T=r(_,v)).done;){try{m=R(T.value)}catch(t){f(v,"throw",t)}if("object"==typeof m&&m&&u(p,m))return m}return new g(!1)}},function(t,e,n){"use strict";var i=n(34),r=n(134),o=i("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||s[o]===t)}},function(t){"use strict";t.exports={}},function(t,e,n){"use strict";var i=n(8),r=n(31),o=n(47),s=n(32),a=n(136),c=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(r(n))return o(i(n,t));throw c(s(t)+" is not iterable")}},function(t,e,n){"use strict";var i=n(70),r=n(30),o=n(17),s=n(134),a=n(34)("iterator");t.exports=function(t){if(!o(t))return r(t,a)||r(t,"@@iterator")||s[i(t)]}},function(t,e,n){"use strict";var i=n(8),r=n(47),o=n(30);t.exports=function(t,e,n){var s,a;r(t);try{if(!(s=o(t,"return"))){if("throw"===e)throw n;return n}s=i(s,t)}catch(t){a=!0,s=t}if("throw"===e)throw n;if(a)throw s;return r(s),n}},function(t,e,n){"use strict";var i=n(3),r=n(24),o=n(96),s=n(7),a=n(115),c="AggregateError",u=r(c),l=!s((function(){return 1!==u([1]).errors[0]}))&&s((function(){return 7!==u([1],c,{cause:7}).cause}));i({global:!0,constructor:!0,arity:2,forced:l},{AggregateError:a(c,(function(t){return function(e,n){return o(t,this,arguments)}}),l,!0)})},function(t,e,n){"use strict";var i=n(3),r=n(40),o=n(64),s=n(62),a=n(140);i({target:"Array",proto:!0},{at:function(t){var e=r(this),n=o(e),i=s(t),a=i>=0?i:n+i;return a<0||a>=n?void 0:e[a]}}),a("at")},function(t,e,n){"use strict";var i=n(34),r=n(72),o=n(45).f,s=i("unscopables"),a=Array.prototype;void 0===a[s]&&o(a,s,{configurable:!0,value:r(null)}),t.exports=function(t){a[s][t]=!0}},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(90),s=n(20),a=n(40),c=n(64),u=n(142),l=n(78),h=n(88),f=n(143),d=n(34),g=n(28),p=d("isConcatSpreadable"),v=g>=51||!r((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),y=function(t){if(!s(t))return!1;var e=t[p];return void 0!==e?!!e:o(t)};i({target:"Array",proto:!0,arity:1,forced:!v||!f("concat")},{concat:function(t){var e,n,i,r,o,s=a(this),f=h(s,0),d=0;for(e=-1,i=arguments.length;e9007199254740991)throw e("Maximum allowed index exceeded");return t}},function(t,e,n){"use strict";var i=n(7),r=n(34),o=n(28),s=r("species");t.exports=function(t){return o>=51||!i((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){"use strict";var i=n(3),r=n(145),o=n(140);i({target:"Array",proto:!0},{copyWithin:r}),o("copyWithin")},function(t,e,n){"use strict";var i=n(40),r=n(61),o=n(64),s=n(146),a=Math.min;t.exports=[].copyWithin||function(t,e){var n=i(this),c=o(n),u=r(t,c),l=r(e,c),h=arguments.length>2?arguments[2]:void 0,f=a((void 0===h?c:r(h,c))-l,c-u),d=1;for(l0;)l in n?n[u]=n[l]:s(n,u),u+=d,l+=d;return n}},function(t,e,n){"use strict";var i=n(32),r=TypeError;t.exports=function(t,e){if(!delete t[e])throw r("Cannot delete property "+i(e)+" of "+i(t))}},function(t,e,n){"use strict";var i=n(3),r=n(85).every;i({target:"Array",proto:!0,forced:!n(148)("every")},{every:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(7);t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){return 1},1)}))}},function(t,e,n){"use strict";var i=n(3),r=n(150),o=n(140);i({target:"Array",proto:!0},{fill:r}),o("fill")},function(t,e,n){"use strict";var i=n(40),r=n(61),o=n(64);t.exports=function(t){for(var e=i(this),n=o(e),s=arguments.length,a=r(s>1?arguments[1]:void 0,n),c=s>2?arguments[2]:void 0,u=void 0===c?n:r(c,n);u>a;)e[a++]=t;return e}},function(t,e,n){"use strict";var i=n(3),r=n(85).filter;i({target:"Array",proto:!0,forced:!n(143)("filter")},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(85).find,o=n(140),s="find",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),i({target:"Array",proto:!0,forced:a},{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},function(t,e,n){"use strict";var i=n(3),r=n(85).findIndex,o=n(140),s="findIndex",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),i({target:"Array",proto:!0,forced:a},{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},function(t,e,n){"use strict";var i=n(3),r=n(155).findLast,o=n(140);i({target:"Array",proto:!0},{findLast:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o("findLast")},function(t,e,n){"use strict";var i=n(86),r=n(13),o=n(40),s=n(64),a=function(t){var e=1===t;return function(n,a,c){for(var u,l=o(n),h=r(l),f=i(a,c),d=s(h);d-- >0;)if(f(u=h[d],d,l))switch(t){case 0:return u;case 1:return d}return e?-1:void 0}};t.exports={findLast:a(0),findLastIndex:a(1)}},function(t,e,n){"use strict";var i=n(3),r=n(155).findLastIndex,o=n(140);i({target:"Array",proto:!0},{findLastIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o("findLastIndex")},function(t,e,n){"use strict";var i=n(3),r=n(158),o=n(40),s=n(64),a=n(62),c=n(88);i({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=o(this),n=s(e),i=c(e,0);return i.length=r(i,e,e,n,0,void 0===t?1:a(t)),i}})},function(t,e,n){"use strict";var i=n(90),r=n(64),o=n(142),s=n(86),a=function(t,e,n,c,u,l,h,f){for(var d,g,p=u,v=0,y=!!h&&s(h,f);v0&&i(d)?(g=r(d),p=a(t,e,d,g,p,l-1)-1):(o(p+1),t[p]=d),p++),v++;return p};t.exports=a},function(t,e,n){"use strict";var i=n(3),r=n(158),o=n(31),s=n(40),a=n(64),c=n(88);i({target:"Array",proto:!0},{flatMap:function(t){var e,n=s(this),i=a(n);return o(t),(e=c(n,0)).length=r(e,n,n,i,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},function(t,e,n){"use strict";var i=n(3),r=n(161);i({target:"Array",proto:!0,forced:[].forEach!==r},{forEach:r})},function(t,e,n){"use strict";var i=n(85).forEach,r=n(148)("forEach");t.exports=r?[].forEach:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){"use strict";var i=n(3),r=n(163);i({target:"Array",stat:!0,forced:!n(165)((function(t){Array.from(t)}))},{from:r})},function(t,e,n){"use strict";var i=n(86),r=n(8),o=n(40),s=n(164),a=n(133),c=n(91),u=n(64),l=n(78),h=n(135),f=n(136),d=Array;t.exports=function(t){var e=o(t),n=c(this),g=arguments.length,p=g>1?arguments[1]:void 0,v=void 0!==p;v&&(p=i(p,g>2?arguments[2]:void 0));var y,b,x,m,_,T,w=f(e),A=0;if(!w||this===d&&a(w))for(y=u(e),b=n?new this(y):d(y);y>A;A++)T=v?p(e[A],A):e[A],l(b,A,T);else for(_=(m=h(e,w)).next,b=n?new this:[];!(x=r(_,m)).done;A++)T=v?s(m,p,[x.value,A],!0):x.value,l(b,A,T);return b.length=A,b}},function(t,e,n){"use strict";var i=n(47),r=n(137);t.exports=function(t,e,n,o){try{return o?e(i(n)[0],n[1]):e(n)}catch(e){r(t,"throw",e)}}},function(t,e,n){"use strict";var i=n(34)("iterator"),r=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){r=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var o={};o[i]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var i=n(3),r=n(60).includes,o=n(7),s=n(140);i({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")},function(t,e,n){"use strict";var i=n(3),r=n(87),o=n(60).indexOf,s=n(148),a=r([].indexOf),c=!!a&&1/a([1],1,-0)<0;i({target:"Array",proto:!0,forced:c||!s("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return c?a(this,t,e)||0:o(this,t,e)}})},function(t,e,n){"use strict";n(3)({target:"Array",stat:!0},{isArray:n(90)})},function(t,e,n){"use strict";var i=n(12),r=n(140),o=n(134),s=n(52),a=n(45).f,c=n(170),u=n(173),l=n(36),h=n(6),f="Array Iterator",d=s.set,g=s.getterFor(f);t.exports=c(Array,"Array",(function(t,e){d(this,{type:f,target:i(t),index:0,kind:e})}),(function(){var t=g(this),e=t.target,n=t.kind,i=t.index++;if(!e||i>=e.length)return t.target=void 0,u(void 0,!0);switch(n){case"keys":return u(i,!1);case"values":return u(e[i],!1)}return u([i,e[i]],!1)}),"values");var p=o.Arguments=o.Array;if(r("keys"),r("values"),r("entries"),!l&&h&&"values"!==p.name)try{a(p,"name",{value:"values"})}catch(t){}},function(t,e,n){"use strict";var i=n(3),r=n(8),o=n(36),s=n(50),a=n(21),c=n(171),u=n(130),l=n(116),h=n(84),f=n(44),d=n(48),g=n(34),p=n(134),v=n(172),y=s.PROPER,b=s.CONFIGURABLE,x=v.IteratorPrototype,m=v.BUGGY_SAFARI_ITERATORS,_=g("iterator"),T="keys",w="values",A="entries",S=function(){return this};t.exports=function(t,e,n,s,g,v,E){c(n,e,s);var k,O,M,R=function(t){if(t===g&&D)return D;if(!m&&t in P)return P[t];switch(t){case T:case w:case A:return function(){return new n(this,t)}}return function(){return new n(this)}},C=e+" Iterator",I=!1,P=t.prototype,L=P[_]||P["@@iterator"]||g&&P[g],D=!m&&L||R(g),N="Array"===e&&P.entries||L;if(N&&(k=u(N.call(new t)))!==Object.prototype&&k.next&&(o||u(k)===x||(l?l(k,x):a(k[_])||d(k,_,S)),h(k,C,!0,!0),o&&(p[C]=S)),y&&g===w&&L&&L.name!==w&&(!o&&b?f(P,"name",w):(I=!0,D=function(){return r(L,this)})),g)if(O={values:R(w),keys:v?D:R(T),entries:R(A)},E)for(M in O)(m||I||!(M in P))&&d(P,M,O[M]);else i({target:e,proto:!0,forced:m||I},O);return o&&!E||P[_]===D||d(P,_,D,{name:g}),p[e]=D,O}},function(t,e,n){"use strict";var i=n(172).IteratorPrototype,r=n(72),o=n(11),s=n(84),a=n(134),c=function(){return this};t.exports=function(t,e,n,u){var l=e+" Iterator";return t.prototype=r(i,{next:o(+!u,n)}),s(t,l,!1,!0),a[l]=c,t}},function(t,e,n){"use strict";var i,r,o,s=n(7),a=n(21),c=n(20),u=n(72),l=n(130),h=n(48),f=n(34),d=n(36),g=f("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(r=l(l(o)))!==Object.prototype&&(i=r):p=!0),!c(i)||s((function(){var t={};return i[g].call(t)!==t}))?i={}:d&&(i=u(i)),a(i[g])||h(i,g,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:p}},function(t){"use strict";t.exports=function(t,e){return{value:t,done:e}}},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(13),s=n(12),a=n(148),c=r([].join);i({target:"Array",proto:!0,forced:o!==Object||!a("join",",")},{join:function(t){return c(s(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var i=n(3),r=n(176);i({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(t,e,n){"use strict";var i=n(96),r=n(12),o=n(62),s=n(64),a=n(148),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,h=a("lastIndexOf"),f=l||!h;t.exports=f?function(t){if(l)return i(u,this,arguments)||0;var e=r(this),n=s(e),a=n-1;for(arguments.length>1&&(a=c(a,o(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}:u},function(t,e,n){"use strict";var i=n(3),r=n(85).map;i({target:"Array",proto:!0,forced:!n(143)("map")},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(91),s=n(78),a=Array;i({target:"Array",stat:!0,forced:r((function(){function t(){}return!(a.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,n=new(o(this)?this:a)(e);e>t;)s(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var i=n(3),r=n(40),o=n(64),s=n(180),a=n(142);i({target:"Array",proto:!0,arity:1,forced:n(7)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=r(this),n=o(e),i=arguments.length;a(n+i);for(var c=0;c79&&s<83||!o("reduce")},{reduce:function(t){var e=arguments.length;return r(this,t,e,e>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(31),r=n(40),o=n(13),s=n(64),a=TypeError,c=function(t){return function(e,n,c,u){i(n);var l=r(e),h=o(l),f=s(l),d=t?f-1:0,g=t?-1:1;if(c<2)for(;;){if(d in h){u=h[d],d+=g;break}if(d+=g,t?d<0:f<=d)throw a("Reduce of empty array with no initial value")}for(;t?d>=0:f>d;d+=g)d in h&&(u=n(u,h[d],d,l));return u}};t.exports={left:c(!1),right:c(!0)}},function(t,e,n){"use strict";var i=n(4),r=n(15);t.exports="process"===r(i.process)},function(t,e,n){"use strict";var i=n(3),r=n(182).right,o=n(148),s=n(28);i({target:"Array",proto:!0,forced:!n(183)&&s>79&&s<83||!o("reduceRight")},{reduceRight:function(t){return r(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(90),s=r([].reverse),a=[1,2];i({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),s(this)}})},function(t,e,n){"use strict";var i=n(3),r=n(90),o=n(91),s=n(20),a=n(61),c=n(64),u=n(12),l=n(78),h=n(34),f=n(143),d=n(97),g=f("slice"),p=h("species"),v=Array,y=Math.max;i({target:"Array",proto:!0,forced:!g},{slice:function(t,e){var n,i,h,f=u(this),g=c(f),b=a(t,g),x=a(void 0===e?g:e,g);if(r(f)&&(n=f.constructor,(o(n)&&(n===v||r(n.prototype))||s(n)&&null===(n=n[p]))&&(n=void 0),n===v||void 0===n))return d(f,b,x);for(i=new(void 0===n?v:n)(y(x-b,0)),h=0;b1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(31),s=n(40),a=n(64),c=n(146),u=n(69),l=n(7),h=n(189),f=n(148),d=n(190),g=n(191),p=n(28),v=n(192),y=[],b=r(y.sort),x=r(y.push),m=l((function(){y.sort(void 0)})),_=l((function(){y.sort(null)})),T=f("sort"),w=!l((function(){if(p)return p<70;if(!(d&&d>3)){if(g)return!0;if(v)return v<603;var t,e,n,i,r="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)y.push({k:e+i,v:n})}for(y.sort((function(t,e){return e.v-t.v})),i=0;iu(n)?1:-1}}(t)),n=a(r),i=0;i0;)t[i]=t[--i];i!==o++&&(t[i]=n)}return t},a=function(t,e,n,i){for(var r=e.length,o=n.length,s=0,a=0;sm-i+n;v--)f(x,v-1)}else if(n>i)for(v=m-i;v>_;v--)b=v+n-1,(y=v+i-1)in x?x[b]=x[y]:f(x,b);for(v=0;vn;)o[n]=e[n++];return o}},function(t,e,n){"use strict";var i=n(4);t.exports=function(t){return i[t].prototype}},function(t,e,n){"use strict";var i=n(3),r=n(140),o=n(142),s=n(64),a=n(61),c=n(12),u=n(62),l=Array,h=Math.max,f=Math.min;i({target:"Array",proto:!0},{toSpliced:function(t,e){var n,i,r,d,g=c(this),p=s(g),v=a(t,p),y=arguments.length,b=0;for(0===y?n=i=0:1===y?(n=0,i=p-v):(n=y-2,i=f(h(u(e),0),p-v)),r=o(p+n-i),d=l(r);b=a||u<0)throw o("Incorrect index");for(var l=new e(a),h=0;h>8&255]},H=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},W=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},q=function(t){return U(t,23,4)},Z=function(t){return U(t,52,8)},K=function(t,e,n){u(t[O],e,{configurable:!0,get:function(){return n(this)[e]}})},J=function(t,e,n,i){var r=C(t),o=p(n),s=!!i;if(o+e>r.byteLength)throw B(M);var a=r.bytes,c=o+r.byteOffset,u=_(a,c,c+e);return s?u:$(u)},Q=function(t,e,n,i,r,o){var s=C(t),a=p(n),c=i(+r),u=!!o;if(a+e>s.byteLength)throw B(M);for(var l=s.bytes,h=a+s.byteOffset,f=0;fit;)(et=nt[it++])in L||c(L,et,P[et]);D.constructor=L}b&&y(z)!==F&&b(z,F);var rt=new N(new L(2)),ot=r(z.setInt8);rt.setInt8(0,2147483648),rt.setInt8(1,2147483649),!rt.getInt8(0)&&rt.getInt8(1)||l(z,{setInt8:function(t,e){ot(this,t,e<<24>>24)},setUint8:function(t,e){ot(this,t,e<<24>>24)}},{unsafe:!0})}else D=(L=function(t){f(this,D);var e=p(t);I(this,{type:E,bytes:X(j(e),0),byteLength:e}),o||(this.byteLength=e,this.detached=!1)})[O],z=(N=function(t,e,n){f(this,z),f(t,D);var i=R(t),r=i.byteLength,s=d(e);if(s<0||s>r)throw B("Wrong offset");if(s+(n=void 0===n?r-s:g(n))>r)throw B("Wrong length");I(this,{type:k,buffer:t,byteLength:n,byteOffset:s,bytes:i.bytes}),o||(this.buffer=t,this.byteLength=n,this.byteOffset=s)})[O],o&&(K(L,"byteLength",R),K(N,"buffer",C),K(N,"byteLength",C),K(N,"byteOffset",C)),l(z,{getInt8:function(t){return J(this,1,t)[0]<<24>>24},getUint8:function(t){return J(this,1,t)[0]},getInt16:function(t){var e=J(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=J(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return W(J(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return W(J(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return Y(J(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return Y(J(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){Q(this,1,t,V,e)},setUint8:function(t,e){Q(this,1,t,V,e)},setInt16:function(t,e){Q(this,2,t,G,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){Q(this,2,t,G,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){Q(this,4,t,H,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){Q(this,4,t,H,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){Q(this,4,t,q,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){Q(this,8,t,Z,e,arguments.length>2&&arguments[2])}});T(L,E),T(N,k),t.exports={ArrayBuffer:L,DataView:N}},function(t){"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,e,n){"use strict";var i=n(48);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},function(t,e,n){"use strict";var i=n(25),r=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw r("Incorrect invocation")}},function(t,e,n){"use strict";var i=n(62),r=n(65),o=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw o("Wrong length or index");return n}},function(t,e,n){"use strict";var i=n(214),r=n(63),o=Array,s=Math.abs,a=Math.pow,c=Math.floor,u=Math.log,l=Math.LN2,h=function(t){var e=r(t),n=s(t-e);return n>.5||.5===n&&e%2!=0?e+i(t):e};t.exports={pack:function(t,e,n){var i,r,f,d=o(n),g=8*n-e-1,p=(1<>1,y=23===e?a(2,-24)-a(2,-77):0,b=t<0||0===t&&1/t<0?1:0,x=0;for((t=s(t))!=t||t===1/0?(r=t!=t?1:0,i=p):(i=c(u(t)/l),t*(f=a(2,-i))<1&&(i--,f*=2),(t+=i+v>=1?y/f:y*a(2,1-v))*f>=2&&(i++,f/=2),i+v>=p?(r=0,i=p):i+v>=1?(r=h((t*f-1)*a(2,e)),i+=v):(r=h(t*a(2,v-1)*a(2,e)),i=0));e>=8;)d[x++]=255&r,r/=256,e-=8;for(i=i<0;)d[x++]=255&i,i/=256,g-=8;return d[--x]|=128*b,d},unpack:function(t,e){var n,i=t.length,r=8*i-e-1,o=(1<>1,c=r-7,u=i-1,l=t[u--],h=127&l;for(l>>=7;c>0;)h=256*h+t[u--],c-=8;for(n=h&(1<<-c)-1,h>>=-c,c+=e;c>0;)n=256*n+t[u--],c-=8;if(0===h)h=1-s;else{if(h===o)return n?NaN:l?-1/0:1/0;n+=a(2,e),h-=s}return(l?-1:1)*n*a(2,h-e)}}},function(t){"use strict";t.exports=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1}},function(t,e,n){"use strict";var i=n(3),r=n(216);i({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},function(t,e,n){"use strict";var i,r,o,s=n(209),a=n(6),c=n(4),u=n(21),l=n(20),h=n(39),f=n(70),d=n(32),g=n(44),p=n(48),v=n(79),y=n(25),b=n(130),x=n(116),m=n(34),_=n(41),T=n(52),w=T.enforce,A=T.get,S=c.Int8Array,E=S&&S.prototype,k=c.Uint8ClampedArray,O=k&&k.prototype,M=S&&b(S),R=E&&b(E),C=Object.prototype,I=c.TypeError,P=m("toStringTag"),L=_("TYPED_ARRAY_TAG"),D="TypedArrayConstructor",N=s&&!!x&&"Opera"!==f(c.opera),z=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},j={BigInt64Array:8,BigUint64Array:8},B=function(t){var e=b(t);if(l(e)){var n=A(e);return n&&h(n,D)?n[D]:B(e)}},X=function(t){if(!l(t))return!1;var e=f(t);return h(F,e)||h(j,e)};for(i in F)(o=(r=c[i])&&r.prototype)?w(o)[D]=r:N=!1;for(i in j)(o=(r=c[i])&&r.prototype)&&(w(o)[D]=r);if((!N||!u(M)||M===Function.prototype)&&(M=function(){throw I("Incorrect invocation")},N))for(i in F)c[i]&&x(c[i],M);if((!N||!R||R===C)&&(R=M.prototype,N))for(i in F)c[i]&&x(c[i].prototype,R);if(N&&b(O)!==R&&x(O,R),a&&!h(R,P))for(i in z=!0,v(R,P,{configurable:!0,get:function(){return l(this)?this[L]:void 0}}),F)c[i]&&g(c[i],L,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:N,TYPED_ARRAY_TAG:z&&L,aTypedArray:function(t){if(X(t))return t;throw I("Target is not a typed array")},aTypedArrayConstructor:function(t){if(u(t)&&(!x||y(M,t)))return t;throw I(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n,i){if(a){if(n)for(var r in F){var o=c[r];if(o&&h(o.prototype,t))try{delete o.prototype[t]}catch(n){try{o.prototype[t]=e}catch(t){}}}R[t]&&!n||p(R,t,n?e:N&&E[t]||e,i)}},exportTypedArrayStaticMethod:function(t,e,n){var i,r;if(a){if(x){if(n)for(i in F)if((r=c[i])&&h(r,t))try{delete r[t]}catch(t){}if(M[t]&&!n)return;try{return p(M,t,n?e:N&&M[t]||e)}catch(t){}}for(i in F)!(r=c[i])||r[t]&&!n||p(r,t,e)}},getTypedArrayConstructor:B,isView:function(t){if(!l(t))return!1;var e=f(t);return"DataView"===e||h(F,e)||h(j,e)},isTypedArray:X,TypedArray:M,TypedArrayPrototype:R}},function(t,e,n){"use strict";var i=n(3),r=n(87),o=n(7),s=n(208),a=n(47),c=n(61),u=n(65),l=n(218),h=s.ArrayBuffer,f=s.DataView,d=f.prototype,g=r(h.prototype.slice),p=r(d.getUint8),v=r(d.setUint8);i({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(g&&void 0===e)return g(a(this),t);for(var n=a(this).byteLength,i=c(t,n),r=c(void 0===e?n:e,n),o=new(l(this,h))(u(r-i)),s=new f(this),d=new f(o),y=0;i=0&&e<=99?e+1900:e)}})},function(t,e,n){"use strict";n(3)({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},function(t,e,n){"use strict";var i=n(3),r=n(227);i({target:"Date",proto:!0,forced:Date.prototype.toISOString!==r},{toISOString:r})},function(t,e,n){"use strict";var i=n(14),r=n(7),o=n(228).start,s=RangeError,a=isFinite,c=Math.abs,u=Date.prototype,l=u.toISOString,h=i(u.getTime),f=i(u.getUTCDate),d=i(u.getUTCFullYear),g=i(u.getUTCHours),p=i(u.getUTCMilliseconds),v=i(u.getUTCMinutes),y=i(u.getUTCMonth),b=i(u.getUTCSeconds);t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!==l.call(new Date(-50000000000001))}))||!r((function(){l.call(new Date(NaN))}))?function(){if(!a(h(this)))throw s("Invalid time value");var t=this,e=d(t),n=p(t),i=e<0?"-":e>9999?"+":"";return i+o(c(e),i?6:4,0)+"-"+o(y(t)+1,2,0)+"-"+o(f(t),2,0)+"T"+o(g(t),2,0)+":"+o(v(t),2,0)+":"+o(b(t),2,0)+"."+o(n,3,0)+"Z"}:l},function(t,e,n){"use strict";var i=n(14),r=n(65),o=n(69),s=n(229),a=n(16),c=i(s),u=i("".slice),l=Math.ceil,h=function(t){return function(e,n,i){var s,h,f=o(a(e)),d=r(n),g=f.length,p=void 0===i?" ":o(i);return d<=g||""===p?f:((h=c(p,l((s=d-g)/p.length))).length>s&&(h=u(h,0,s)),t?f+h:h+f)}};t.exports={start:h(!1),end:h(!0)}},function(t,e,n){"use strict";var i=n(62),r=n(69),o=n(16),s=RangeError;t.exports=function(t){var e=r(o(this)),n="",a=i(t);if(a<0||a===1/0)throw s("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(n+=e);return n}},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(40),s=n(19);i({target:"Date",proto:!0,arity:1,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=o(this),n=s(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){"use strict";var i=n(39),r=n(48),o=n(232),s=n(34)("toPrimitive"),a=Date.prototype;i(a,s)||r(a,s,o)},function(t,e,n){"use strict";var i=n(47),r=n(33),o=TypeError;t.exports=function(t){if(i(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw o("Incorrect hint");return r(this,t)}},function(t,e,n){"use strict";var i=n(14),r=n(48),o=Date.prototype,s="Invalid Date",a="toString",c=i(o[a]),u=i(o.getTime);String(new Date(NaN))!==s&&r(o,a,(function(){var t=u(this);return t==t?c(this):s}))},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(69),s=r("".charAt),a=r("".charCodeAt),c=r(/./.exec),u=r(1..toString),l=r("".toUpperCase),h=/[\w*+\-./@]/,f=function(t,e){for(var n=u(t,16);n.length1?arguments[1]:void 0);e=e?e.next:n.first;)for(i(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!x(this,t)}}),o(f,n?{get:function(t){var e=x(this,t);return e&&e.value},set:function(t,e){return b(this,0===t?0:t,e)}}:{add:function(t){return b(this,t=0===t?0:t,t)}}),d&&r(f,"size",{configurable:!0,get:function(){return p(this).size}}),h},setStrong:function(t,e,n){var i=e+" Iterator",r=y(e),o=y(i);l(t,e,(function(t,e){v(this,{type:i,target:t,state:r(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?h("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=void 0,h(void 0,!0))}),n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var i=n(3),r=n(250),o=Math.acosh,s=Math.log,a=Math.sqrt,c=Math.LN2;i({target:"Math",stat:!0,forced:!o||710!==Math.floor(o(Number.MAX_VALUE))||o(1/0)!==1/0},{acosh:function(t){var e=+t;return e<1?NaN:e>94906265.62425156?s(e)+c:r(e-1+a(e-1)*a(e+1))}})},function(t){"use strict";var e=Math.log;t.exports=Math.log1p||function(t){var n=+t;return n>-1e-8&&n<1e-8?n-n*n/2:e(1+n)}},function(t,e,n){"use strict";var i=n(3),r=Math.asinh,o=Math.log,s=Math.sqrt;i({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function t(e){var n=+e;return isFinite(n)&&0!==n?n<0?-t(-n):o(n+s(n*n+1)):n}})},function(t,e,n){"use strict";var i=n(3),r=Math.atanh,o=Math.log;i({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(t){var e=+t;return 0===e?e:o((1+e)/(1-e))/2}})},function(t,e,n){"use strict";var i=n(3),r=n(214),o=Math.abs,s=Math.pow;i({target:"Math",stat:!0},{cbrt:function(t){var e=+t;return r(e)*s(o(e),1/3)}})},function(t,e,n){"use strict";var i=n(3),r=Math.floor,o=Math.log,s=Math.LOG2E;i({target:"Math",stat:!0},{clz32:function(t){var e=t>>>0;return e?31-r(o(e+.5)*s):32}})},function(t,e,n){"use strict";var i=n(3),r=n(256),o=Math.cosh,s=Math.abs,a=Math.E;i({target:"Math",stat:!0,forced:!o||o(710)===1/0},{cosh:function(t){var e=r(s(t)-1)+1;return(e+1/(e*a*a))*(a/2)}})},function(t){"use strict";var e=Math.expm1,n=Math.exp;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!==e(-2e-17)?function(t){var e=+t;return 0===e?e:e>-1e-6&&e<1e-6?e+e*e/2:n(e)-1}:e},function(t,e,n){"use strict";var i=n(3),r=n(256);i({target:"Math",stat:!0,forced:r!==Math.expm1},{expm1:r})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{fround:n(259)})},function(t,e,n){"use strict";var i=n(214),r=Math.abs,o=Math.pow,s=o(2,-52),a=o(2,-23),c=o(2,127)*(2-a),u=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=+t,l=r(o),h=i(o);return lc||n!=n?h*(1/0):h*n}},function(t,e,n){"use strict";var i=n(3),r=Math.hypot,o=Math.abs,s=Math.sqrt;i({target:"Math",stat:!0,arity:2,forced:!!r&&r(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,i,r=0,a=0,c=arguments.length,u=0;a0?(i=n/u)*i:n;return u===1/0?1/0:u*s(r)}})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=Math.imul;i({target:"Math",stat:!0,forced:r((function(){return-5!==o(4294967295,5)||2!==o.length}))},{imul:function(t,e){var n=65535,i=+t,r=+e,o=n&i,s=n&r;return 0|o*s+((n&i>>>16)*s+o*(n&r>>>16)<<16>>>0)}})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{log10:n(263)})},function(t){"use strict";var e=Math.log,n=Math.LOG10E;t.exports=Math.log10||function(t){return e(t)*n}},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{log1p:n(250)})},function(t,e,n){"use strict";var i=n(3),r=Math.log,o=Math.LN2;i({target:"Math",stat:!0},{log2:function(t){return r(t)/o}})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{sign:n(214)})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(256),s=Math.abs,a=Math.exp,c=Math.E;i({target:"Math",stat:!0,forced:r((function(){return-2e-17!==Math.sinh(-2e-17)}))},{sinh:function(t){var e=+t;return s(e)<1?(o(e)-o(-e))/2:(a(e-1)-a(-e-1))*(c/2)}})},function(t,e,n){"use strict";var i=n(3),r=n(256),o=Math.exp;i({target:"Math",stat:!0},{tanh:function(t){var e=+t,n=r(e),i=r(-e);return n===1/0?1:i===1/0?-1:(n-i)/(o(e)+o(-e))}})},function(t,e,n){"use strict";n(84)(Math,"Math",!0)},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{trunc:n(63)})},function(t,e,n){"use strict";var i=n(3),r=n(36),o=n(6),s=n(4),a=n(82),c=n(14),u=n(68),l=n(39),h=n(120),f=n(25),d=n(23),g=n(19),p=n(7),v=n(58).f,y=n(5).f,b=n(45).f,x=n(272),m=n(273).trim,_="Number",T=s[_],w=a[_],A=T.prototype,S=s.TypeError,E=c("".slice),k=c("".charCodeAt),O=function(t){var e,n,i,r,o,s,a,c,u=g(t,"number");if(d(u))throw S("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=m(u),43===(e=k(u,0))||45===e){if(88===(n=k(u,2))||120===n)return NaN}else if(48===e){switch(k(u,1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+u}for(s=(o=E(u,2)).length,a=0;ar)return NaN;return parseInt(o,i)}return+u},M=u(_,!T(" 0o1")||!T("0b1")||T("+0x1")),R=function(t){var e,n=arguments.length<1?0:T(function(t){var e=g(t,"number");return"bigint"==typeof e?e:O(e)}(t));return f(A,e=this)&&p((function(){x(e)}))?h(Object(n),this,R):n};R.prototype=A,M&&!r&&(A.constructor=R),i({global:!0,constructor:!0,wrap:!0,forced:M},{Number:R});var C=function(t,e){for(var n,i=o?v(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),r=0;i.length>r;r++)l(e,n=i[r])&&!l(t,n)&&b(t,n,y(e,n))};r&&w&&C(a[_],w),(M||r)&&C(a[_],T)},function(t,e,n){"use strict";var i=n(14);t.exports=i(1..valueOf)},function(t,e,n){"use strict";var i=n(14),r=n(16),o=n(69),s=n(274),a=i("".replace),c=RegExp("^["+s+"]+"),u=RegExp("(^|[^"+s+"])["+s+"]+$"),l=function(t){return function(e){var n=o(r(e));return 1&t&&(n=a(n,c,"")),2&t&&(n=a(n,u,"$1")),n}};t.exports={start:l(1),end:l(2),trim:l(3)}},function(t){"use strict";t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isFinite:n(277)})},function(t,e,n){"use strict";var i=n(4).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&i(t)}},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isInteger:n(279)})},function(t,e,n){"use strict";var i=n(20),r=Math.floor;t.exports=Number.isInteger||function(t){return!i(t)&&isFinite(t)&&r(t)===t}},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,n){"use strict";var i=n(3),r=n(279),o=Math.abs;i({target:"Number",stat:!0},{isSafeInteger:function(t){return r(t)&&o(t)<=9007199254740991}})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){"use strict";var i=n(3),r=n(285);i({target:"Number",stat:!0,forced:Number.parseFloat!==r},{parseFloat:r})},function(t,e,n){"use strict";var i=n(4),r=n(7),o=n(14),s=n(69),a=n(273).trim,c=n(274),u=o("".charAt),l=i.parseFloat,h=i.Symbol,f=h&&h.iterator,d=1/l(c+"-0")!=-1/0||f&&!r((function(){l(Object(f))}));t.exports=d?function(t){var e=a(s(t)),n=l(e);return 0===n&&"-"===u(e,0)?-0:n}:l},function(t,e,n){"use strict";var i=n(3),r=n(287);i({target:"Number",stat:!0,forced:Number.parseInt!==r},{parseInt:r})},function(t,e,n){"use strict";var i=n(4),r=n(7),o=n(14),s=n(69),a=n(273).trim,c=n(274),u=i.parseInt,l=i.Symbol,h=l&&l.iterator,f=/^[+-]?0x/i,d=o(f.exec),g=8!==u(c+"08")||22!==u(c+"0x16")||h&&!r((function(){u(Object(h))}));t.exports=g?function(t,e){var n=a(s(t));return u(n,e>>>0||(d(f,n)?16:10))}:u},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(62),s=n(272),a=n(229),c=n(263),u=n(7),l=RangeError,h=String,f=isFinite,d=Math.abs,g=Math.floor,p=Math.pow,v=Math.round,y=r(1..toExponential),b=r(a),x=r("".slice),m="-6.9000e-11"===y(-69e-12,4)&&"1.25e+0"===y(1.255,2)&&"1.235e+4"===y(12345,3)&&"3e+1"===y(25,0);i({target:"Number",proto:!0,forced:!m||!(u((function(){y(1,1/0)}))&&u((function(){y(1,-1/0)})))||!!u((function(){y(1/0,1/0),y(NaN,1/0)}))},{toExponential:function(t){var e=s(this);if(void 0===t)return y(e);var n=o(t);if(!f(e))return String(e);if(n<0||n>20)throw l("Incorrect fraction digits");if(m)return y(e,n);var i="",r="",a=0,u="",_="";if(e<0&&(i="-",e=-e),0===e)a=0,r=b("0",n+1);else{var T=c(e);a=g(T);var w=0,A=p(10,a-n);2*e>=(2*(w=v(e/A))+1)*A&&(w+=1),w>=p(10,n+1)&&(w/=10,a+=1),r=h(w)}return 0!==n&&(r=x(r,0,1)+"."+x(r,1)),0===a?(u="+",_="0"):(u=a>0?"+":"-",_=h(d(a))),i+(r+="e"+u+_)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(62),s=n(272),a=n(229),c=n(7),u=RangeError,l=String,h=Math.floor,f=r(a),d=r("".slice),g=r(1..toFixed),p=function(t,e,n){return 0===e?n:e%2==1?p(t,e-1,n*t):p(t*t,e/2,n)},v=function(t,e,n){for(var i=-1,r=n;++i<6;)r+=e*t[i],t[i]=r%1e7,r=h(r/1e7)},y=function(t,e){for(var n=6,i=0;--n>=0;)i+=t[n],t[n]=h(i/e),i=i%e*1e7},b=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var i=l(t[e]);n=""===n?i:n+f("0",7-i.length)+i}return n};i({target:"Number",proto:!0,forced:c((function(){return"0.000"!==g(8e-5,3)||"1"!==g(.9,0)||"1.25"!==g(1.255,2)||"1000000000000000128"!==g(0xde0b6b3a7640080,0)}))||!c((function(){g({})}))},{toFixed:function(t){var e,n,i,r,a=s(this),c=o(t),h=[0,0,0,0,0,0],g="",x="0";if(c<0||c>20)throw u("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return l(a);if(a<0&&(g="-",a=-a),a>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(a*p(2,69,1))-69)<0?a*p(2,-e,1):a/p(2,e,1),n*=4503599627370496,(e=52-e)>0){for(v(h,0,n),i=c;i>=7;)v(h,1e7,0),i-=7;for(v(h,p(10,i,1),0),i=e-1;i>=23;)y(h,1<<23),i-=23;y(h,1<0?g+((r=x.length)<=c?"0."+f("0",c-r)+x:d(x,0,r-c)+"."+d(x,r-c)):g+x}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(7),s=n(272),a=r(1..toPrecision);i({target:"Number",proto:!0,forced:o((function(){return"1"!==a(1,void 0)}))||!o((function(){a({})}))},{toPrecision:function(t){return void 0===t?a(s(this)):a(s(this),t)}})},function(t,e,n){"use strict";var i=n(3),r=n(292);i({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},function(t,e,n){"use strict";var i=n(6),r=n(14),o=n(8),s=n(7),a=n(74),c=n(67),u=n(10),l=n(40),h=n(13),f=Object.assign,d=Object.defineProperty,g=r([].concat);t.exports=!f||s((function(){if(i&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!==f({},t)[n]||a(f({},e)).join("")!==r}))?function(t,e){for(var n=l(t),r=arguments.length,s=1,f=c.f,d=u.f;r>s;)for(var p,v=h(arguments[s++]),y=f?g(a(v),f(v)):a(v),b=y.length,x=0;b>x;)p=y[x++],i&&!o(d,v,p)||(n[p]=v[p]);return n}:f},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0,sham:!n(6)},{create:n(72)})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(295),s=n(31),a=n(40),c=n(45);r&&i({target:"Object",proto:!0,forced:o},{__defineGetter__:function(t,e){c.f(a(this),t,{get:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(36),r=n(4),o=n(7),s=n(192);t.exports=i||!o((function(){if(!(s&&s<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete r[t]}}))},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(73).f;i({target:"Object",stat:!0,forced:Object.defineProperties!==o,sham:!r},{defineProperties:o})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(45).f;i({target:"Object",stat:!0,forced:Object.defineProperty!==o,sham:!r},{defineProperty:o})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(295),s=n(31),a=n(40),c=n(45);r&&i({target:"Object",proto:!0,forced:o},{__defineSetter__:function(t,e){c.f(a(this),t,{set:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(3),r=n(300).entries;i({target:"Object",stat:!0},{entries:function(t){return r(t)}})},function(t,e,n){"use strict";var i=n(6),r=n(7),o=n(14),s=n(130),a=n(74),c=n(12),u=o(n(10).f),l=o([].push),h=i&&r((function(){var t=Object.create(null);return t[2]=2,!u(t,2)})),f=function(t){return function(e){for(var n,r=c(e),o=a(r),f=h&&null===s(r),d=o.length,g=0,p=[];d>g;)n=o[g++],i&&!(f?n in r:u(r,n))||l(p,t?[n,r[n]]:r[n]);return p}};t.exports={entries:f(!0),values:f(!1)}},function(t,e,n){"use strict";var i=n(3),r=n(247),o=n(7),s=n(20),a=n(244).onFreeze,c=Object.freeze;i({target:"Object",stat:!0,forced:o((function(){c(1)})),sham:!r},{freeze:function(t){return c&&s(t)?c(a(t)):t}})},function(t,e,n){"use strict";var i=n(3),r=n(132),o=n(78);i({target:"Object",stat:!0},{fromEntries:function(t){var e={};return r(t,(function(t,n){o(e,t,n)}),{AS_ENTRIES:!0}),e}})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(12),s=n(5).f,a=n(6);i({target:"Object",stat:!0,forced:!a||r((function(){s(1)})),sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(o(t),e)}})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(57),s=n(12),a=n(5),c=n(78);i({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(t){for(var e,n,i=s(t),r=a.f,u=o(i),l={},h=0;u.length>h;)void 0!==(n=r(i,e=u[h++]))&&c(l,e,n);return l}})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(76).f;i({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(40),s=n(130),a=n(131);i({target:"Object",stat:!0,forced:r((function(){s(1)})),sham:!a},{getPrototypeOf:function(t){return s(o(t))}})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{hasOwn:n(39)})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{is:n(309)})},function(t){"use strict";t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var i=n(3),r=n(245);i({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(20),s=n(15),a=n(246),c=Object.isFrozen;i({target:"Object",stat:!0,forced:a||r((function(){c(1)}))},{isFrozen:function(t){return!o(t)||(!(!a||"ArrayBuffer"!==s(t))||!!c&&c(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(20),s=n(15),a=n(246),c=Object.isSealed;i({target:"Object",stat:!0,forced:a||r((function(){c(1)}))},{isSealed:function(t){return!o(t)||(!(!a||"ArrayBuffer"!==s(t))||!!c&&c(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(40),o=n(74);i({target:"Object",stat:!0,forced:n(7)((function(){o(1)}))},{keys:function(t){return o(r(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(295),s=n(40),a=n(18),c=n(130),u=n(5).f;r&&i({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(t){var e,n=s(this),i=a(t);do{if(e=u(n,i))return e.get}while(n=c(n))}})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(295),s=n(40),a=n(18),c=n(130),u=n(5).f;r&&i({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(t){var e,n=s(this),i=a(t);do{if(e=u(n,i))return e.set}while(n=c(n))}})},function(t,e,n){"use strict";var i=n(3),r=n(20),o=n(244).onFreeze,s=n(247),a=n(7),c=Object.preventExtensions;i({target:"Object",stat:!0,forced:a((function(){c(1)})),sham:!s},{preventExtensions:function(t){return c&&r(t)?c(o(t)):t}})},function(t,e,n){"use strict";var i=n(6),r=n(79),o=n(20),s=n(40),a=n(16),c=Object.getPrototypeOf,u=Object.setPrototypeOf,l=Object.prototype,h="__proto__";if(i&&c&&u&&!(h in l))try{r(l,h,{configurable:!0,get:function(){return c(s(this))},set:function(t){var e=a(this);(o(t)||null===t)&&o(e)&&u(e,t)}})}catch(t){}},function(t,e,n){"use strict";var i=n(3),r=n(20),o=n(244).onFreeze,s=n(247),a=n(7),c=Object.seal;i({target:"Object",stat:!0,forced:a((function(){c(1)})),sham:!s},{seal:function(t){return c&&r(t)?c(o(t)):t}})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{setPrototypeOf:n(116)})},function(t,e,n){"use strict";var i=n(71),r=n(48),o=n(321);i||r(Object.prototype,"toString",o,{unsafe:!0})},function(t,e,n){"use strict";var i=n(71),r=n(70);t.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},function(t,e,n){"use strict";var i=n(3),r=n(300).values;i({target:"Object",stat:!0},{values:function(t){return r(t)}})},function(t,e,n){"use strict";var i=n(3),r=n(285);i({global:!0,forced:parseFloat!==r},{parseFloat:r})},function(t,e,n){"use strict";var i=n(3),r=n(287);i({global:!0,forced:parseInt!==r},{parseInt:r})},function(t,e,n){"use strict";n(326),n(341),n(343),n(344),n(345),n(346)},function(t,e,n){"use strict";var i,r,o,s=n(3),a=n(36),c=n(183),u=n(4),l=n(8),h=n(48),f=n(116),d=n(84),g=n(194),p=n(31),v=n(21),y=n(20),b=n(211),x=n(218),m=n(327).set,_=n(330),T=n(334),w=n(335),A=n(331),S=n(52),E=n(336),k=n(337),O=n(340),M="Promise",R=k.CONSTRUCTOR,C=k.REJECTION_EVENT,I=k.SUBCLASSING,P=S.getterFor(M),L=S.set,D=E&&E.prototype,N=E,z=D,F=u.TypeError,j=u.document,B=u.process,X=O.f,$=X,U=!!(j&&j.createEvent&&u.dispatchEvent),Y="unhandledrejection",V=function(t){var e;return!(!y(t)||!v(e=t.then))&&e},G=function(t,e){var n,i,r,o=e.value,s=1===e.state,a=s?t.ok:t.fail,c=t.resolve,u=t.reject,h=t.domain;try{a?(s||(2===e.rejection&&K(e),e.rejection=1),!0===a?n=o:(h&&h.enter(),n=a(o),h&&(h.exit(),r=!0)),n===t.promise?u(F("Promise-chain cycle")):(i=V(n))?l(i,n,c,u):c(n)):u(o)}catch(t){h&&!r&&h.exit(),u(t)}},H=function(t,e){t.notified||(t.notified=!0,_((function(){for(var n,i=t.reactions;n=i.get();)G(n,t);t.notified=!1,e&&!t.rejection&&q(t)})))},W=function(t,e,n){var i,r;U?((i=j.createEvent("Event")).promise=e,i.reason=n,i.initEvent(t,!1,!0),u.dispatchEvent(i)):i={promise:e,reason:n},!C&&(r=u["on"+t])?r(i):t===Y&&T("Unhandled promise rejection",n)},q=function(t){l(m,u,(function(){var e,n=t.facade,i=t.value;if(Z(t)&&(e=w((function(){c?B.emit("unhandledRejection",i,n):W(Y,n,i)})),t.rejection=c||Z(t)?2:1,e.error))throw e.value}))},Z=function(t){return 1!==t.rejection&&!t.parent},K=function(t){l(m,u,(function(){var e=t.facade;c?B.emit("rejectionHandled",e):W("rejectionhandled",e,t.value)}))},J=function(t,e,n){return function(i){t(e,i,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,H(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw F("Promise can't be resolved itself");var i=V(e);i?_((function(){var n={done:!1};try{l(i,e,J(tt,n,t),J(Q,n,t))}catch(e){Q(n,e,t)}})):(t.value=e,t.state=1,H(t,!1))}catch(e){Q({done:!1},e,t)}}};if(R&&(z=(N=function(t){b(this,z),p(t),l(i,this);var e=P(this);try{t(J(tt,e),J(Q,e))}catch(t){Q(e,t)}}).prototype,(i=function(t){L(this,{type:M,done:!1,notified:!1,parent:!1,reactions:new A,rejection:!1,state:0,value:void 0})}).prototype=h(z,"then",(function(t,e){var n=P(this),i=X(x(this,N));return n.parent=!0,i.ok=!v(t)||t,i.fail=v(e)&&e,i.domain=c?B.domain:void 0,0===n.state?n.reactions.add(i):_((function(){G(i,n)})),i.promise})),r=function(){var t=new i,e=P(t);this.promise=t,this.resolve=J(tt,e),this.reject=J(Q,e)},O.f=X=function(t){return t===N||undefined===t?new r(t):$(t)},!a&&v(E)&&D!==Object.prototype)){o=D.then,I||h(D,"then",(function(t,e){var n=this;return new N((function(t,e){l(o,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete D.constructor}catch(t){}f&&f(D,z)}s({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:N}),d(N,M,!1,!0),g(M)},function(t,e,n){"use strict";var i,r,o,s,a=n(4),c=n(96),u=n(86),l=n(21),h=n(39),f=n(7),d=n(75),g=n(97),p=n(43),v=n(328),y=n(329),b=n(183),x=a.setImmediate,m=a.clearImmediate,_=a.process,T=a.Dispatch,w=a.Function,A=a.MessageChannel,S=a.String,E=0,k={},O="onreadystatechange";f((function(){i=a.location}));var M=function(t){if(h(k,t)){var e=k[t];delete k[t],e()}},R=function(t){return function(){M(t)}},C=function(t){M(t.data)},I=function(t){a.postMessage(S(t),i.protocol+"//"+i.host)};x&&m||(x=function(t){v(arguments.length,1);var e=l(t)?t:w(t),n=g(arguments,1);return k[++E]=function(){c(e,void 0,n)},r(E),E},m=function(t){delete k[t]},b?r=function(t){_.nextTick(R(t))}:T&&T.now?r=function(t){T.now(R(t))}:A&&!y?(s=(o=new A).port2,o.port1.onmessage=C,r=u(s.postMessage,s)):a.addEventListener&&l(a.postMessage)&&!a.importScripts&&i&&"file:"!==i.protocol&&!f(I)?(r=I,a.addEventListener("message",C,!1)):r=O in p("script")?function(t){d.appendChild(p("script"))[O]=function(){d.removeChild(this),M(t)}}:function(t){setTimeout(R(t),0)}),t.exports={set:x,clear:m}},function(t){"use strict";var e=TypeError;t.exports=function(t,n){if(t@^][^\s!#%&*+<=>@^]*>/,L=/a/g,D=/a/g,N=new S(L)!==L,z=g.MISSED_STICKY,F=g.UNSUPPORTED_Y,j=i&&(!N||z||T||w||y((function(){return D[A]=!1,S(L)!==L||S(D)===D||"/a/i"!==String(S(L,"i"))})));if(s("RegExp",j)){for(var B=function(t,e){var n,i,r,o,s,u,g=l(E,this),p=h(t),v=void 0===e,y=[],m=t;if(!g&&p&&v&&t.constructor===B)return t;if((p||l(E,t))&&(t=t.source,v&&(e=d(m))),t=void 0===t?"":f(t),e=void 0===e?"":f(e),m=t,T&&"dotAll"in L&&(i=!!e&&C(e,"s")>-1)&&(e=R(e,/s/g,"")),n=e,z&&"sticky"in L&&(r=!!e&&C(e,"y")>-1)&&F&&(e=R(e,/y/g,"")),w&&(o=function(t){for(var e,n=t.length,i=0,r="",o=[],s={},a=!1,c=!1,u=0,l="";i<=n;i++){if("\\"===(e=M(t,i)))e+=M(t,++i);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:O(P,I(t,i+1))&&(i+=2,c=!0),r+=e,u++;continue;case">"===e&&c:if(""===l||b(s,l))throw new k("Invalid capture group name");s[l]=!0,o[o.length]=[l,u],c=!1,l="";continue}c?l+=e:r+=e}return[r,o]}(t),t=o[0],y=o[1]),s=a(S(t,e),g?this:E,B),(i||r||y.length)&&(u=x(s),i&&(u.dotAll=!0,u.raw=B(function(t){for(var e,n=t.length,i=0,r="",o=!1;i<=n;i++)"\\"!==(e=M(t,i))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),r+=e):r+="[\\s\\S]":r+=e+M(t,++i);return r}(t),n)),r&&(u.sticky=!0),y.length&&(u.groups=y)),t!==m)try{c(s,"source",""===m?"(?:)":m)}catch(t){}return s},X=u(S),$=0;X.length>$;)p(B,S,X[$++]);E.constructor=B,B.prototype=E,v(r,"RegExp",B,{constructor:!0})}m("RegExp")},function(t,e,n){"use strict";var i=n(20),r=n(15),o=n(34)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[o])?!!e:"RegExp"===r(t))}},function(t,e,n){"use strict";var i=n(8),r=n(39),o=n(25),s=n(369),a=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in a||r(t,"flags")||!o(a,t)?e:i(s,t)}},function(t,e,n){"use strict";var i=n(47);t.exports=function(){var t=i(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp,o=i((function(){var t=r("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),s=o||i((function(){return!r("a","y").sticky})),a=o||i((function(){var t=r("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:o}},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp;t.exports=i((function(){var t=r(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp;t.exports=i((function(){var t=r("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},function(t,e,n){"use strict";var i=n(6),r=n(371),o=n(15),s=n(79),a=n(52).get,c=RegExp.prototype,u=TypeError;i&&r&&s(c,"dotAll",{configurable:!0,get:function(){if(this!==c){if("RegExp"===o(this))return!!a(this).dotAll;throw u("Incompatible receiver, RegExp required")}}})},function(t,e,n){"use strict";var i=n(3),r=n(375);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(t,e,n){"use strict";var i,r,o=n(8),s=n(14),a=n(69),c=n(369),u=n(370),l=n(35),h=n(72),f=n(52).get,d=n(371),g=n(372),p=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,y=v,b=s("".charAt),x=s("".indexOf),m=s("".replace),_=s("".slice),T=(r=/b*/g,o(v,i=/a/,"a"),o(v,r,"a"),0!==i.lastIndex||0!==r.lastIndex),w=u.BROKEN_CARET,A=void 0!==/()??/.exec("")[1];(T||A||w||d||g)&&(y=function(t){var e,n,i,r,s,u,l,d=this,g=f(d),S=a(t),E=g.raw;if(E)return E.lastIndex=d.lastIndex,e=o(y,E,S),d.lastIndex=E.lastIndex,e;var k=g.groups,O=w&&d.sticky,M=o(c,d),R=d.source,C=0,I=S;if(O&&(M=m(M,"y",""),-1===x(M,"g")&&(M+="g"),I=_(S,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==b(S,d.lastIndex-1))&&(R="(?: "+R+")",I=" "+I,C++),n=new RegExp("^(?:"+R+")",M)),A&&(n=new RegExp("^"+R+"$(?!\\s)",M)),T&&(i=d.lastIndex),r=o(v,O?n:d,I),O?r?(r.input=_(r.input,C),r[0]=_(r[0],C),r.index=d.lastIndex,d.lastIndex+=r[0].length):d.lastIndex=0:T&&r&&(d.lastIndex=d.global?r.index+r[0].length:i),A&&r&&r.length>1&&o(p,r[0],n,(function(){for(s=1;s=0?i:n+i;return r<0||r>=n?void 0:u(e,r)}})},function(t,e,n){"use strict";var i=n(3),r=n(384).codeAt;i({target:"String",proto:!0},{codePointAt:function(t){return r(this,t)}})},function(t,e,n){"use strict";var i=n(14),r=n(62),o=n(69),s=n(16),a=i("".charAt),c=i("".charCodeAt),u=i("".slice),l=function(t){return function(e,n){var i,l,h=o(s(e)),f=r(n),d=h.length;return f<0||f>=d?t?"":void 0:(i=c(h,f))<55296||i>56319||f+1===d||(l=c(h,f+1))<56320||l>57343?t?a(h,f):i:t?u(h,f,f+2):l-56320+(i-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},function(t,e,n){"use strict";var i,r=n(3),o=n(87),s=n(5).f,a=n(65),c=n(69),u=n(386),l=n(16),h=n(387),f=n(36),d=o("".endsWith),g=o("".slice),p=Math.min,v=h("endsWith");r({target:"String",proto:!0,forced:!!(f||v||(i=s(String.prototype,"endsWith"),!i||i.writable))&&!v},{endsWith:function(t){var e=c(l(this));u(t);var n=arguments.length>1?arguments[1]:void 0,i=e.length,r=void 0===n?i:p(a(n),i),o=c(t);return d?d(e,o,r):g(e,r-o.length,r)===o}})},function(t,e,n){"use strict";var i=n(367),r=TypeError;t.exports=function(t){if(i(t))throw r("The method doesn't accept regular expressions");return t}},function(t,e,n){"use strict";var i=n(34)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[i]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(61),s=RangeError,a=String.fromCharCode,c=String.fromCodePoint,u=r([].join);i({target:"String",stat:!0,arity:1,forced:!!c&&1!==c.length},{fromCodePoint:function(t){for(var e,n=[],i=arguments.length,r=0;i>r;){if(e=+arguments[r++],o(e,1114111)!==e)throw s(e+" is not a valid code point");n[r]=e<65536?a(e):a(55296+((e-=65536)>>10),e%1024+56320)}return u(n,"")}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(386),s=n(16),a=n(69),c=n(387),u=r("".indexOf);i({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~u(a(s(this)),a(o(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(16),s=n(69),a=r("".charCodeAt);i({target:"String",proto:!0},{isWellFormed:function(){for(var t=s(o(this)),e=t.length,n=0;n=56320||++n>=e||56320!=(64512&a(t,n))))return!1}return!0}})},function(t,e,n){"use strict";var i=n(384).charAt,r=n(69),o=n(52),s=n(170),a=n(173),c="String Iterator",u=o.set,l=o.getterFor(c);s(String,"String",(function(t){u(this,{type:c,string:r(t),index:0})}),(function(){var t,e=l(this),n=e.string,r=e.index;return r>=n.length?a(void 0,!0):(t=i(n,r),e.index+=t.length,a(t,!1))}))},function(t,e,n){"use strict";var i=n(8),r=n(393),o=n(47),s=n(17),a=n(65),c=n(69),u=n(16),l=n(30),h=n(394),f=n(395);r("match",(function(t,e,n){return[function(e){var n=u(this),r=s(e)?void 0:l(e,t);return r?i(r,e,n):new RegExp(e)[t](c(n))},function(t){var i=o(this),r=c(t),s=n(e,i,r);if(s.done)return s.value;if(!i.global)return f(i,r);var u=i.unicode;i.lastIndex=0;for(var l,d=[],g=0;null!==(l=f(i,r));){var p=c(l[0]);d[g]=p,""===p&&(i.lastIndex=h(r,a(i.lastIndex),u)),g++}return 0===g?null:d}]}))},function(t,e,n){"use strict";n(374);var i=n(87),r=n(48),o=n(375),s=n(7),a=n(34),c=n(44),u=a("species"),l=RegExp.prototype;t.exports=function(t,e,n,h){var f=a(t),d=!s((function(){var e={};return e[f]=function(){return 7},7!==""[t](e)})),g=d&&!s((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return e=!0,null},n[f](""),!e}));if(!d||!g||n){var p=i(/./[f]),v=e(f,""[t],(function(t,e,n,r,s){var a=i(t),c=e.exec;return c===o||c===l.exec?d&&!s?{done:!0,value:p(e,n,r)}:{done:!0,value:a(n,e,r)}:{done:!1}}));r(String.prototype,t,v[0]),r(l,f,v[1])}h&&c(l[f],"sham",!0)}},function(t,e,n){"use strict";var i=n(384).charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},function(t,e,n){"use strict";var i=n(8),r=n(47),o=n(21),s=n(15),a=n(375),c=TypeError;t.exports=function(t,e){var n=t.exec;if(o(n)){var u=i(n,t,e);return null!==u&&r(u),u}if("RegExp"===s(t))return i(a,t,e);throw c("RegExp#exec called on incompatible receiver")}},function(t,e,n){"use strict";var i=n(3),r=n(8),o=n(87),s=n(171),a=n(173),c=n(16),u=n(65),l=n(69),h=n(47),f=n(17),d=n(15),g=n(367),p=n(368),v=n(30),y=n(48),b=n(7),x=n(34),m=n(218),_=n(394),T=n(395),w=n(52),A=n(36),S=x("matchAll"),E="RegExp String",k=E+" Iterator",O=w.set,M=w.getterFor(k),R=RegExp.prototype,C=TypeError,I=o("".indexOf),P=o("".matchAll),L=!!P&&!b((function(){P("a",/./)})),D=s((function(t,e,n,i){O(this,{type:k,regexp:t,string:e,global:n,unicode:i,done:!1})}),E,(function(){var t=M(this);if(t.done)return a(void 0,!0);var e=t.regexp,n=t.string,i=T(e,n);return null===i?(t.done=!0,a(void 0,!0)):t.global?(""===l(i[0])&&(e.lastIndex=_(n,u(e.lastIndex),t.unicode)),a(i,!1)):(t.done=!0,a(i,!1))})),N=function(t){var e,n,i,r=h(this),o=l(t),s=m(r,RegExp),a=l(p(r));return e=new s(s===RegExp?r.source:r,a),n=!!~I(a,"g"),i=!!~I(a,"u"),e.lastIndex=u(r.lastIndex),new D(e,o,n,i)};i({target:"String",proto:!0,forced:L},{matchAll:function(t){var e,n,i,o,s=c(this);if(f(t)){if(L)return P(s,t)}else{if(g(t)&&(e=l(c(p(t))),!~I(e,"g")))throw C("`.matchAll` does not allow non-global regexes");if(L)return P(s,t);if(void 0===(i=v(t,S))&&A&&"RegExp"===d(t)&&(i=N),i)return r(i,t,s)}return n=l(s),o=new RegExp(t,"g"),A?r(N,o,n):o[S](n)}}),A||S in R||y(R,S,N)},function(t,e,n){"use strict";var i=n(3),r=n(228).end;i({target:"String",proto:!0,forced:n(398)},{padEnd:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(29);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(i)},function(t,e,n){"use strict";var i=n(3),r=n(228).start;i({target:"String",proto:!0,forced:n(398)},{padStart:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(12),s=n(40),a=n(69),c=n(64),u=r([].push),l=r([].join);i({target:"String",stat:!0},{raw:function(t){var e=o(s(t).raw),n=c(e);if(!n)return"";for(var i=arguments.length,r=[],h=0;;){if(u(r,a(e[h++])),h===n)return l(r,"");h=R&&(M+=S(a,R,L)+I,R=L+P.length)}return M+S(a,R)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!E||k)},function(t,e,n){"use strict";var i=n(14),r=n(40),o=Math.floor,s=i("".charAt),a=i("".replace),c=i("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,i,h,f){var d=n+t.length,g=i.length,p=l;return void 0!==h&&(h=r(h),p=u),a(f,p,(function(r,a){var u;switch(s(a,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,n);case"'":return c(e,d);case"<":u=h[c(a,1,-1)];break;default:var l=+a;if(0===l)return r;if(l>g){var f=o(l/10);return 0===f?r:f<=g?void 0===i[f-1]?s(a,1):i[f-1]+s(a,1):r}u=i[l-1]}return void 0===u?"":u}))}},function(t,e,n){"use strict";var i=n(3),r=n(8),o=n(14),s=n(16),a=n(21),c=n(17),u=n(367),l=n(69),h=n(30),f=n(368),d=n(403),g=n(34),p=n(36),v=g("replace"),y=TypeError,b=o("".indexOf),x=o("".replace),m=o("".slice),_=Math.max,T=function(t,e,n){return n>t.length?-1:""===e?n:b(t,e,n)};i({target:"String",proto:!0},{replaceAll:function(t,e){var n,i,o,g,w,A,S,E,k,O=s(this),M=0,R=0,C="";if(!c(t)){if((n=u(t))&&(i=l(s(f(t))),!~b(i,"g")))throw y("`.replaceAll` does not allow non-global regexes");if(o=h(t,v))return r(o,t,O,e);if(p&&n)return x(l(O),t,e)}for(g=l(O),w=l(t),(A=a(e))||(e=l(e)),S=w.length,E=_(1,S),M=T(g,w,0);-1!==M;)k=A?l(e(w,M,g)):d(w,g,M,[],void 0,e),C+=m(g,R,M)+k,R=M+S,M=T(g,w,M+E);return R1||"".split(/.?/).length?function(t,n){var o=g(l(this)),s=void 0===n?T:n>>>0;if(0===s)return[];if(void 0===t)return[o];if(!u(t))return r(e,o,t,s);for(var a,c,h,f=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,y=new RegExp(t.source,d+"g");(a=r(b,y,o))&&!((c=y.lastIndex)>p&&(E(f,k(o,p,a.index)),a.length>1&&a.index=s));)y.lastIndex===a.index&&y.lastIndex++;return p===o.length?!h&&S(y,"")||E(f,""):E(f,k(o,p)),f.length>s?v(f,0,s):f}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:r(e,this,t,n)}:e,[function(e,n){var i=l(this),s=c(e)?void 0:p(e,t);return s?r(s,e,i,n):r(o,g(i),e,n)},function(t,i){var r=a(this),s=g(t),c=n(o,r,s,i,o!==e);if(c.done)return c.value;var u=h(r,RegExp),l=r.unicode,p=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(_?"g":"y"),v=new u(_?"^(?:"+r.source+")":r,p),b=void 0===i?T:i>>>0;if(0===b)return[];if(0===s.length)return null===y(v,s)?[s]:[];for(var x=0,m=0,A=[];m1?arguments[1]:void 0,e.length)),i=c(t);return d?d(e,i,n):g(e,n,n+i.length)===i}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(16),s=n(62),a=n(69),c=r("".slice),u=Math.max,l=Math.min;i({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(t,e){var n,i,r=a(o(this)),h=r.length,f=s(t);return f===1/0&&(f=0),f<0&&(f=u(h+f,0)),(n=void 0===e?h:s(e))<=0||n===1/0||f>=(i=l(f+n,h))?"":c(r,f,i)}})},function(t,e,n){"use strict";var i=n(3),r=n(8),o=n(14),s=n(16),a=n(69),c=n(7),u=Array,l=o("".charAt),h=o("".charCodeAt),f=o([].join),d="".toWellFormed,g=d&&c((function(){return"1"!==r(d,1)}));i({target:"String",proto:!0,forced:g},{toWellFormed:function(){var t=a(s(this));if(g)return r(d,t);for(var e=t.length,n=u(e),i=0;i=56320||i+1>=e||56320!=(64512&h(t,i+1))?n[i]="�":(n[i]=l(t,i),n[++i]=l(t,i))}return f(n,"")}})},function(t,e,n){"use strict";var i=n(3),r=n(273).trim;i({target:"String",proto:!0,forced:n(411)("trim")},{trim:function(){return r(this)}})},function(t,e,n){"use strict";var i=n(50).PROPER,r=n(7),o=n(274);t.exports=function(t){return r((function(){return!!o[t]()||"​…᠎"!=="​…᠎"[t]()||i&&o[t].name!==t}))}},function(t,e,n){"use strict";n(413);var i=n(3),r=n(414);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==r},{trimEnd:r})},function(t,e,n){"use strict";var i=n(3),r=n(414);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==r},{trimRight:r})},function(t,e,n){"use strict";var i=n(273).end,r=n(411);t.exports=r("trimEnd")?function(){return i(this)}:"".trimEnd},function(t,e,n){"use strict";n(416);var i=n(3),r=n(417);i({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==r},{trimStart:r})},function(t,e,n){"use strict";var i=n(3),r=n(417);i({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==r},{trimLeft:r})},function(t,e,n){"use strict";var i=n(273).start,r=n(411);t.exports=r("trimStart")?function(){return i(this)}:"".trimStart},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("anchor")},{anchor:function(t){return r(this,"a","name",t)}})},function(t,e,n){"use strict";var i=n(14),r=n(16),o=n(69),s=/"/g,a=i("".replace);t.exports=function(t,e,n,i){var c=o(r(t)),u="<"+e;return""!==n&&(u+=" "+n+'="'+a(o(i),s,""")+'"'),u+">"+c+""}},function(t,e,n){"use strict";var i=n(7);t.exports=function(t){return i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("big")},{big:function(){return r(this,"big","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("blink")},{blink:function(){return r(this,"blink","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("bold")},{bold:function(){return r(this,"b","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fontcolor")},{fontcolor:function(t){return r(this,"font","color",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fontsize")},{fontsize:function(t){return r(this,"font","size",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("italics")},{italics:function(){return r(this,"i","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("link")},{link:function(t){return r(this,"a","href",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("small")},{small:function(){return r(this,"small","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("strike")},{strike:function(){return r(this,"strike","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("sub")},{sub:function(){return r(this,"sub","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("sup")},{sup:function(){return r(this,"sup","","")}})},function(t,e,n){"use strict";n(434)("Float32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(8),s=n(6),a=n(435),c=n(216),u=n(208),l=n(211),h=n(11),f=n(44),d=n(279),g=n(65),p=n(212),v=n(436),y=n(438),b=n(18),x=n(39),m=n(70),_=n(20),T=n(23),w=n(72),A=n(25),S=n(116),E=n(58).f,k=n(439),O=n(85).forEach,M=n(194),R=n(79),C=n(45),I=n(5),P=n(52),L=n(120),D=P.get,N=P.set,z=P.enforce,F=C.f,j=I.f,B=r.RangeError,X=u.ArrayBuffer,$=X.prototype,U=u.DataView,Y=c.NATIVE_ARRAY_BUFFER_VIEWS,V=c.TYPED_ARRAY_TAG,G=c.TypedArray,H=c.TypedArrayPrototype,W=c.aTypedArrayConstructor,q=c.isTypedArray,Z="BYTES_PER_ELEMENT",K="Wrong length",J=function(t,e){W(t);for(var n=0,i=e.length,r=new t(i);i>n;)r[n]=e[n++];return r},Q=function(t,e){R(t,e,{configurable:!0,get:function(){return D(this)[e]}})},tt=function(t){var e;return A($,t)||"ArrayBuffer"===(e=m(t))||"SharedArrayBuffer"===e},et=function(t,e){return q(t)&&!T(e)&&e in t&&d(+e)&&e>=0},nt=function(t,e){return e=b(e),et(t,e)?h(2,t[e]):j(t,e)},it=function(t,e,n){return e=b(e),!(et(t,e)&&_(n)&&x(n,"value"))||x(n,"get")||x(n,"set")||n.configurable||x(n,"writable")&&!n.writable||x(n,"enumerable")&&!n.enumerable?F(t,e,n):(t[e]=n.value,t)};s?(Y||(I.f=nt,C.f=it,Q(H,"buffer"),Q(H,"byteOffset"),Q(H,"byteLength"),Q(H,"length")),i({target:"Object",stat:!0,forced:!Y},{getOwnPropertyDescriptor:nt,defineProperty:it}),t.exports=function(t,e,n){var s=t.match(/\d+/)[0]/8,c=t+(n?"Clamped":"")+"Array",u="get"+t,h="set"+t,d=r[c],b=d,x=b&&b.prototype,m={},T=function(t,e){F(t,e,{get:function(){return function(t,e){var n=D(t);return n.view[u](e*s+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,i){var r=D(t);r.view[h](e*s+r.byteOffset,n?y(i):i,!0)}(this,e,t)},enumerable:!0})};Y?a&&(b=e((function(t,e,n,i){return l(t,x),L(_(e)?tt(e)?void 0!==i?new d(e,v(n,s),i):void 0!==n?new d(e,v(n,s)):new d(e):q(e)?J(b,e):o(k,b,e):new d(p(e)),t,b)})),S&&S(b,G),O(E(d),(function(t){t in b||f(b,t,d[t])})),b.prototype=x):(b=e((function(t,e,n,i){l(t,x);var r,a,c,u=0,h=0;if(_(e)){if(!tt(e))return q(e)?J(b,e):o(k,b,e);r=e,h=v(n,s);var f=e.byteLength;if(void 0===i){if(f%s)throw B(K);if((a=f-h)<0)throw B(K)}else if((a=g(i)*s)+h>f)throw B(K);c=a/s}else c=p(e),r=new X(a=c*s);for(N(t,{buffer:r,byteOffset:h,byteLength:a,length:c,view:new U(r)});u255?255:255&n}},function(t,e,n){"use strict";var i=n(86),r=n(8),o=n(219),s=n(40),a=n(64),c=n(135),u=n(136),l=n(133),h=n(440),f=n(216).aTypedArrayConstructor,d=n(441);t.exports=function(t){var e,n,g,p,v,y,b,x,m=o(this),_=s(t),T=arguments.length,w=T>1?arguments[1]:void 0,A=void 0!==w,S=u(_);if(S&&!l(S))for(x=(b=c(_,S)).next,_=[];!(y=r(x,b)).done;)_.push(y.value);for(A&&T>2&&(w=i(w,arguments[2])),n=a(_),g=new(f(m))(n),p=h(g),e=0;n>e;e++)v=A?w(_[e],e):_[e],g[e]=p?d(v):+v;return g}},function(t,e,n){"use strict";var i=n(70);t.exports=function(t){var e=i(t);return"BigInt64Array"===e||"BigUint64Array"===e}},function(t,e,n){"use strict";var i=n(19),r=TypeError;t.exports=function(t){var e=i(t,"number");if("number"==typeof e)throw r("Can't convert number to bigint");return BigInt(e)}},function(t,e,n){"use strict";n(434)("Float64",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int16",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}),!0)},function(t,e,n){"use strict";n(434)("Uint16",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";var i=n(216),r=n(64),o=n(62),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("at",(function(t){var e=s(this),n=r(e),i=o(t),a=i>=0?i:n+i;return a<0||a>=n?void 0:e[a]}))},function(t,e,n){"use strict";var i=n(14),r=n(216),o=i(n(145)),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(t,e){return o(s(this),t,e,arguments.length>2?arguments[2]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(85).every,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("every",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(150),o=n(441),s=n(70),a=n(8),c=n(14),u=n(7),l=i.aTypedArray,h=i.exportTypedArrayMethod,f=c("".slice);h("fill",(function(t){var e=arguments.length;l(this);var n="Big"===f(s(this),0,3)?o(t):+t;return a(r,this,n,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),u((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},function(t,e,n){"use strict";var i=n(216),r=n(85).filter,o=n(455),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("filter",(function(t){var e=r(s(this),t,arguments.length>1?arguments[1]:void 0);return o(this,e)}))},function(t,e,n){"use strict";var i=n(199),r=n(456);t.exports=function(t,e){return i(r(t),e)}},function(t,e,n){"use strict";var i=n(216),r=n(218),o=i.aTypedArrayConstructor,s=i.getTypedArrayConstructor;t.exports=function(t){return o(r(t,s(t)))}},function(t,e,n){"use strict";var i=n(216),r=n(85).find,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("find",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(85).findIndex,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("findIndex",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(155).findLast,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLast",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(155).findLastIndex,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLastIndex",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(85).forEach,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("forEach",(function(t){r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(435);(0,n(216).exportTypedArrayStaticMethod)("from",n(439),i)},function(t,e,n){"use strict";var i=n(216),r=n(60).includes,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("includes",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(60).indexOf,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("indexOf",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(4),r=n(7),o=n(14),s=n(216),a=n(169),c=n(34)("iterator"),u=i.Uint8Array,l=o(a.values),h=o(a.keys),f=o(a.entries),d=s.aTypedArray,g=s.exportTypedArrayMethod,p=u&&u.prototype,v=!r((function(){p[c].call([1])})),y=!!p&&p.values&&p[c]===p.values&&"values"===p.values.name,b=function(){return l(d(this))};g("entries",(function(){return f(d(this))}),v),g("keys",(function(){return h(d(this))}),v),g("values",b,v||!y,{name:"values"}),g(c,b,v||!y,{name:"values"})},function(t,e,n){"use strict";var i=n(216),r=n(14),o=i.aTypedArray,s=i.exportTypedArrayMethod,a=r([].join);s("join",(function(t){return a(o(this),t)}))},function(t,e,n){"use strict";var i=n(216),r=n(96),o=n(176),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return r(o,s(this),e>1?[t,arguments[1]]:[t])}))},function(t,e,n){"use strict";var i=n(216),r=n(85).map,o=n(456),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("map",(function(t){return r(s(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(o(t))(e)}))}))},function(t,e,n){"use strict";var i=n(216),r=n(435),o=i.aTypedArrayConstructor;(0,i.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,n=new(o(this))(e);e>t;)n[t]=arguments[t++];return n}),r)},function(t,e,n){"use strict";var i=n(216),r=n(182).left,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return r(o(this),t,e,e>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(182).right,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return r(o(this),t,e,e>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=i.aTypedArray,o=i.exportTypedArrayMethod,s=Math.floor;o("reverse",(function(){for(var t,e=this,n=r(e).length,i=s(n/2),o=0;o1?arguments[1]:void 0,1),n=c(t);if(v)return r(d,this,n,e);var i=this.length,o=s(n),u=0;if(o+e>i)throw l("Wrong length");for(;uo;)u[o]=n[o++];return u}),o((function(){new Int8Array(1).slice()})))},function(t,e,n){"use strict";var i=n(216),r=n(85).some,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("some",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(4),r=n(87),o=n(7),s=n(31),a=n(189),c=n(216),u=n(190),l=n(191),h=n(28),f=n(192),d=c.aTypedArray,g=c.exportTypedArrayMethod,p=i.Uint16Array,v=p&&r(p.prototype.sort),y=!(!v||o((function(){v(new p(2),null)}))&&o((function(){v(new p(2),{})}))),b=!!v&&!o((function(){if(h)return h<74;if(u)return u<67;if(l)return!0;if(f)return f<602;var t,e,n=new p(516),i=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,i[t]=t-2*e+3;for(v(n,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==i[t])return!0}));g("sort",(function(t){return void 0!==t&&s(t),b?v(this,t):a(d(this),function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!=n?-1:e!=e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}}(t))}),!b||y)},function(t,e,n){"use strict";var i=n(216),r=n(65),o=n(61),s=n(456),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("subarray",(function(t,e){var n=a(this),i=n.length,c=o(t,i);return new(s(n))(n.buffer,n.byteOffset+c*n.BYTES_PER_ELEMENT,r((void 0===e?i:o(e,i))-c))}))},function(t,e,n){"use strict";var i=n(4),r=n(96),o=n(216),s=n(7),a=n(97),c=i.Int8Array,u=o.aTypedArray,l=o.exportTypedArrayMethod,h=[].toLocaleString,f=!!c&&s((function(){h.call(new c(1))}));l("toLocaleString",(function(){return r(h,f?a(u(this)):u(this),a(arguments))}),s((function(){return[1,2].toLocaleString()!==new c([1,2]).toLocaleString()}))||!s((function(){c.prototype.toLocaleString.call([1,2])})))},function(t,e,n){"use strict";var i=n(197),r=n(216),o=r.aTypedArray,s=r.exportTypedArrayMethod,a=r.getTypedArrayConstructor;s("toReversed",(function(){return i(o(this),a(this))}))},function(t,e,n){"use strict";var i=n(216),r=n(14),o=n(31),s=n(199),a=i.aTypedArray,c=i.getTypedArrayConstructor,u=i.exportTypedArrayMethod,l=r(i.TypedArrayPrototype.sort);u("toSorted",(function(t){void 0!==t&&o(t);var e=a(this),n=s(c(e),e);return l(n,t)}))},function(t,e,n){"use strict";var i=n(216).exportTypedArrayMethod,r=n(7),o=n(4),s=n(14),a=o.Uint8Array,c=a&&a.prototype||{},u=[].toString,l=s([].join);r((function(){u.call({})}))&&(u=function(){return l(this)});var h=c.toString!==u;i("toString",u,h)},function(t,e,n){"use strict";var i=n(206),r=n(216),o=n(440),s=n(62),a=n(441),c=r.aTypedArray,u=r.getTypedArrayConstructor,l=r.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();l("with",{with:function(t,e){var n=c(this),r=s(t),l=o(n)?a(e):+e;return i(n,u(n),r,l)}}.with,!h)},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(69),s=String.fromCharCode,a=r("".charAt),c=r(/./.exec),u=r("".slice),l=/^[\da-f]{2}$/i,h=/^[\da-f]{4}$/i;i({global:!0},{unescape:function(t){for(var e,n,i=o(t),r="",f=i.length,d=0;d>(-2*_&6))));return s}})},function(t){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n={},i=0;i<66;i++)n[e.charAt(i)]=i;t.exports={itoc:e,ctoi:n}},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(24),s=n(14),a=n(8),c=n(7),u=n(69),l=n(328),h=n(490).itoc,f=o("btoa"),d=s("".charAt),g=s("".charCodeAt),p=!!f&&!c((function(){f()})),v=!!f&&c((function(){return"bnVsbA=="!==f(null)})),y=!!f&&1!==f.length;i({global:!0,bind:!0,enumerable:!0,forced:p||v||y},{btoa:function(t){if(l(arguments.length,1),p||v||y)return a(f,r,u(t));for(var e,n,i=u(t),s="",c=0,b=h;d(i,c)||(b="=",c%1);){if((n=g(i,c+=3/4))>255)throw new(o("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");s+=d(b,63&(e=e<<8|n)>>8-c%1*8)}return s}})},function(t,e,n){"use strict";var i=n(4),r=n(493),o=n(494),s=n(161),a=n(44),c=function(t){if(t&&t.forEach!==s)try{a(t,"forEach",s)}catch(e){t.forEach=s}};for(var u in r)r[u]&&c(i[u]&&i[u].prototype);c(o)},function(t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){"use strict";var i=n(43)("span").classList,r=i&&i.constructor&&i.constructor.prototype;t.exports=r===Object.prototype?void 0:r},function(t,e,n){"use strict";var i=n(4),r=n(493),o=n(494),s=n(169),a=n(44),c=n(34),u=c("iterator"),l=c("toStringTag"),h=s.values,f=function(t,e){if(t){if(t[u]!==h)try{a(t,u,h)}catch(e){t[u]=h}if(t[l]||a(t,l,e),r[e])for(var n in s)if(t[n]!==s[n])try{a(t,n,s[n])}catch(e){t[n]=s[n]}}};for(var d in r)f(i[d]&&i[d].prototype,d);f(o,"DOMTokenList")},function(t,e,n){"use strict";var i=n(3),r=n(497),o=n(24),s=n(7),a=n(72),c=n(11),u=n(45).f,l=n(48),h=n(79),f=n(39),d=n(211),g=n(47),p=n(127),v=n(121),y=n(498),b=n(124),x=n(52),m=n(6),_=n(36),T="DOMException",w="DATA_CLONE_ERR",A=o("Error"),S=o(T)||function(){try{(new(o("MessageChannel")||r("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name===w&&25===t.code)return t.constructor}}(),E=S&&S.prototype,k=A.prototype,O=x.set,M=x.getterFor(T),R="stack"in A(T),C=function(t){return f(y,t)&&y[t].m?y[t].c:0},I=function(){d(this,P);var t=arguments.length,e=v(t<1?void 0:arguments[0]),n=v(t<2?void 0:arguments[1],"Error"),i=C(n);if(O(this,{type:T,name:n,message:e,code:i}),m||(this.name=n,this.message=e,this.code=i),R){var r=A(e);r.name=T,u(this,"stack",c(1,b(r.stack,1)))}},P=I.prototype=a(k),L=function(t){return{enumerable:!0,configurable:!0,get:t}},D=function(t){return L((function(){return M(this)[t]}))};m&&(h(P,"code",D("code")),h(P,"message",D("message")),h(P,"name",D("name"))),u(P,"constructor",c(1,I));var N=s((function(){return!(new S instanceof A)})),z=N||s((function(){return k.toString!==p||"2: 1"!==String(new S(1,2))})),F=N||s((function(){return 25!==new S(1,"DataCloneError").code})),j=N||25!==S[w]||25!==E[w],B=_?z||F||j:N;i({global:!0,constructor:!0,forced:B},{DOMException:B?I:S});var X=o(T),$=X.prototype;for(var U in z&&(_||S===X)&&l($,"toString",p),F&&m&&S===X&&h($,"code",L((function(){return C(g(this).name)}))),y)if(f(y,U)){var Y=y[U],V=Y.s,G=c(6,Y.c);f(X,V)||u(X,V,G),f($,V)||u($,V,G)}},function(t,e,n){"use strict";var i=n(183);t.exports=function(t){try{if(i)return Function('return require("'+t+'")')()}catch(t){}}},function(t){"use strict";t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(24),s=n(11),a=n(45).f,c=n(39),u=n(211),l=n(120),h=n(121),f=n(498),d=n(124),g=n(6),p=n(36),v="DOMException",y=o("Error"),b=o(v),x=function(){u(this,m);var t=arguments.length,e=h(t<1?void 0:arguments[0]),n=h(t<2?void 0:arguments[1],"Error"),i=new b(e,n),r=y(e);return r.name=v,a(i,"stack",s(1,d(r.stack,1))),l(i,this,x),i},m=x.prototype=b.prototype,_="stack"in y(v),T="stack"in new b(1,2),w=b&&g&&Object.getOwnPropertyDescriptor(r,v),A=!(!w||w.writable&&w.configurable),S=_&&!A&&!T;i({global:!0,constructor:!0,forced:p||S},{DOMException:S?x:b});var E=o(v),k=E.prototype;if(k.constructor!==E)for(var O in p||a(k,"constructor",s(1,E)),f)if(c(f,O)){var M=f[O],R=M.s;c(E,R)||a(E,R,s(6,M.c))}},function(t,e,n){"use strict";var i=n(24),r="DOMException";n(84)(i(r),r)},function(t,e,n){"use strict";n(502),n(503)},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(327).clear;i({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==o},{clearImmediate:o})},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(327).set,s=n(504),a=r.setImmediate?s(o,!1):o;i({global:!0,bind:!0,enumerable:!0,forced:r.setImmediate!==a},{setImmediate:a})},function(t,e,n){"use strict";var i,r=n(4),o=n(96),s=n(21),a=n(505),c=n(29),u=n(97),l=n(328),h=r.Function,f=/MSIE .\./.test(c)||a&&((i=r.Bun.version.split(".")).length<3||"0"===i[0]&&(i[1]<3||"3"===i[1]&&"0"===i[2]));t.exports=function(t,e){var n=e?2:1;return f?function(i,r){var a=l(arguments.length,1)>n,c=s(i)?i:h(i),f=a?u(arguments,n):[],d=a?function(){o(c,this,f)}:c;return e?t(d,r):t(d)}:t}},function(t){"use strict";t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(330),s=n(31),a=n(328),c=n(183),u=r.process;i({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(t){a(arguments.length,1),s(t);var e=c&&u.domain;o(e?e.bind(t):t)}})},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(79),s=n(6),a=TypeError,c=Object.defineProperty,u=r.self!==r;try{if(s){var l=Object.getOwnPropertyDescriptor(r,"self");!u&&l&&l.get&&l.enumerable||o(r,"self",{get:function(){return r},set:function(t){if(this!==r)throw a("Illegal invocation");c(r,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else i({global:!0,simple:!0,forced:u},{self:r})}catch(t){}},function(t,e,n){"use strict";var i,r=n(36),o=n(3),s=n(4),a=n(24),c=n(14),u=n(7),l=n(41),h=n(21),f=n(91),d=n(17),g=n(20),p=n(23),v=n(132),y=n(47),b=n(70),x=n(39),m=n(78),_=n(44),T=n(64),w=n(328),A=n(368),S=n(509),E=n(510),k=n(125),O=n(511),M=s.Object,R=s.Array,C=s.Date,I=s.Error,P=s.EvalError,L=s.RangeError,D=s.ReferenceError,N=s.SyntaxError,z=s.TypeError,F=s.URIError,j=s.PerformanceMark,B=s.WebAssembly,X=B&&B.CompileError||I,$=B&&B.LinkError||I,U=B&&B.RuntimeError||I,Y=a("DOMException"),V=S.Map,G=S.has,H=S.get,W=S.set,q=E.Set,Z=E.add,K=a("Object","keys"),J=c([].push),Q=c((!0).valueOf),tt=c(1..valueOf),et=c("".valueOf),nt=c(C.prototype.getTime),it=l("structuredClone"),rt="DataCloneError",ot="Transferring",st=function(t){return!u((function(){var e=new s.Set([7]),n=t(e),i=t(M(7));return n===e||!n.has(7)||"object"!=typeof i||7!==i}))&&t},at=function(t,e){return!u((function(){var n=new e,i=t({a:n,b:n});return!(i&&i.a===i.b&&i.a instanceof e&&i.a.stack===n.stack)}))},ct=s.structuredClone,ut=r||!at(ct,I)||!at(ct,Y)||(i=ct,!!u((function(){var t=i(new s.AggregateError([1],it,{cause:3}));return"AggregateError"!==t.name||1!==t.errors[0]||t.message!==it||3!==t.cause}))),lt=!ct&&st((function(t){return new j(it,{detail:t}).detail})),ht=st(ct)||lt,ft=function(t){throw new Y("Uncloneable type: "+t,rt)},dt=function(t,e){throw new Y((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",rt)},gt=function(t,e){return ht||dt(e),ht(t)},pt=function(t,e,n){if(G(e,t))return H(e,t);var i,r,o,a,c,u;if("SharedArrayBuffer"===(n||b(t)))i=ht?ht(t):t;else{var l=s.DataView;l||"function"==typeof t.slice||dt("ArrayBuffer");try{if("function"!=typeof t.slice||t.resizable){r=t.byteLength,o="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0,i=new ArrayBuffer(r,o),a=new l(t),c=new l(i);for(u=0;u1&&!d(arguments[1])?y(arguments[1]):void 0,r=i?i.transfer:void 0,o=!1;void 0!==r&&(n=function(t,e){if(!g(t))throw z("Transfer option cannot be converted to a sequence");var n=[];v(t,(function(t){J(n,y(t))}));for(var i,r,o,a,c,u=0,l=T(n),d=[];u92||c&&o>94||s&&o>97)return!1;var t=new ArrayBuffer(8),e=u(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength}))},function(t,e,n){"use strict";n(513),n(514)},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(504)(r.setInterval,!0);i({global:!0,bind:!0,forced:r.setInterval!==o},{setInterval:o})},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(504)(r.setTimeout,!0);i({global:!0,bind:!0,forced:r.setTimeout!==o},{setTimeout:o})},function(t,e,n){"use strict";n(516)},function(t,e,n){"use strict";n(391);var i,r=n(3),o=n(6),s=n(517),a=n(4),c=n(86),u=n(14),l=n(48),h=n(79),f=n(211),d=n(39),g=n(292),p=n(163),v=n(77),y=n(384).codeAt,b=n(518),x=n(69),m=n(84),_=n(328),T=n(519),w=n(52),A=w.set,S=w.getterFor("URL"),E=T.URLSearchParams,k=T.getState,O=a.URL,M=a.TypeError,R=a.parseInt,C=Math.floor,I=Math.pow,P=u("".charAt),L=u(/./.exec),D=u([].join),N=u(1..toString),z=u([].pop),F=u([].push),j=u("".replace),B=u([].shift),X=u("".split),$=u("".slice),U=u("".toLowerCase),Y=u([].unshift),V="Invalid scheme",G="Invalid host",H="Invalid port",W=/[a-z]/i,q=/[\d+-.a-z]/i,Z=/\d/,K=/^0x/i,J=/^[0-7]+$/,Q=/^\d+$/,tt=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nt=/[\0\t\n\r #/:<>?@[\\\]^|]/,it=/^[\u0000-\u0020]+/,rt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ot=/[\t\n\r]/g,st=function(t){var e,n,i,r;if("number"==typeof t){for(e=[],n=0;n<4;n++)Y(e,t%256),t=C(t/256);return D(e,".")}if("object"==typeof t){for(e="",i=function(t){for(var e=null,n=1,i=null,r=0,o=0;o<8;o++)0!==t[o]?(r>n&&(e=i,n=r),i=null,r=0):(null===i&&(i=o),++r);return r>n&&(e=i,n=r),e}(t),n=0;n<8;n++)r&&0===t[n]||(r&&(r=!1),i===n?(e+=n?":":"::",r=!0):(e+=N(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},at={},ct=g({},at,{" ":1,'"':1,"<":1,">":1,"`":1}),ut=g({},ct,{"#":1,"?":1,"{":1,"}":1}),lt=g({},ut,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ht=function(t,e){var n=y(t,0);return n>32&&n<127&&!d(e,t)?t:encodeURIComponent(t)},ft={ftp:21,file:null,http:80,https:443,ws:80,wss:443},dt=function(t,e){var n;return 2===t.length&&L(W,P(t,0))&&(":"===(n=P(t,1))||!e&&"|"===n)},gt=function(t){var e;return t.length>1&&dt($(t,0,2))&&(2===t.length||"/"===(e=P(t,2))||"\\"===e||"?"===e||"#"===e)},pt=function(t){return"."===t||"%2e"===U(t)},vt={},yt={},bt={},xt={},mt={},_t={},Tt={},wt={},At={},St={},Et={},kt={},Ot={},Mt={},Rt={},Ct={},It={},Pt={},Lt={},Dt={},Nt={},zt=function(t,e,n){var i,r,o,s=x(t);if(e){if(r=this.parse(s))throw M(r);this.searchParams=null}else{if(void 0!==n&&(i=new zt(n,!0)),r=this.parse(s,null,i))throw M(r);(o=k(new E)).bindURL(this),this.searchParams=o}};zt.prototype={type:"URL",parse:function(t,e,n){var r,o,s,a,c,u=this,l=e||vt,h=0,f="",g=!1,y=!1,b=!1;for(t=x(t),e||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,t=j(t,it,""),t=j(t,rt,"$1")),t=j(t,ot,""),r=p(t);h<=r.length;){switch(o=r[h],l){case vt:if(!o||!L(W,o)){if(e)return V;l=bt;continue}f+=U(o),l=yt;break;case yt:if(o&&(L(q,o)||"+"===o||"-"===o||"."===o))f+=U(o);else{if(":"!==o){if(e)return V;f="",l=bt,h=0;continue}if(e&&(u.isSpecial()!==d(ft,f)||"file"===f&&(u.includesCredentials()||null!==u.port)||"file"===u.scheme&&!u.host))return;if(u.scheme=f,e)return void(u.isSpecial()&&ft[u.scheme]===u.port&&(u.port=null));f="","file"===u.scheme?l=Mt:u.isSpecial()&&n&&n.scheme===u.scheme?l=xt:u.isSpecial()?l=wt:"/"===r[h+1]?(l=mt,h++):(u.cannotBeABaseURL=!0,F(u.path,""),l=Lt)}break;case bt:if(!n||n.cannotBeABaseURL&&"#"!==o)return V;if(n.cannotBeABaseURL&&"#"===o){u.scheme=n.scheme,u.path=v(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,l=Nt;break}l="file"===n.scheme?Mt:_t;continue;case xt:if("/"!==o||"/"!==r[h+1]){l=_t;continue}l=At,h++;break;case mt:if("/"===o){l=St;break}l=Pt;continue;case _t:if(u.scheme=n.scheme,o===i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=v(n.path),u.query=n.query;else if("/"===o||"\\"===o&&u.isSpecial())l=Tt;else if("?"===o)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=v(n.path),u.query="",l=Dt;else{if("#"!==o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=v(n.path),u.path.length--,l=Pt;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=v(n.path),u.query=n.query,u.fragment="",l=Nt}break;case Tt:if(!u.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,l=Pt;continue}l=St}else l=At;break;case wt:if(l=At,"/"!==o||"/"!==P(f,h+1))continue;h++;break;case At:if("/"!==o&&"\\"!==o){l=St;continue}break;case St:if("@"===o){g&&(f="%40"+f),g=!0,s=p(f);for(var m=0;m65535)return H;u.port=u.isSpecial()&&w===ft[u.scheme]?null:w,f=""}if(e)return;l=It;continue}return H}f+=o;break;case Mt:if(u.scheme="file","/"===o||"\\"===o)l=Rt;else{if(!n||"file"!==n.scheme){l=Pt;continue}switch(o){case i:u.host=n.host,u.path=v(n.path),u.query=n.query;break;case"?":u.host=n.host,u.path=v(n.path),u.query="",l=Dt;break;case"#":u.host=n.host,u.path=v(n.path),u.query=n.query,u.fragment="",l=Nt;break;default:gt(D(v(r,h),""))||(u.host=n.host,u.path=v(n.path),u.shortenPath()),l=Pt;continue}}break;case Rt:if("/"===o||"\\"===o){l=Ct;break}n&&"file"===n.scheme&&!gt(D(v(r,h),""))&&(dt(n.path[0],!0)?F(u.path,n.path[0]):u.host=n.host),l=Pt;continue;case Ct:if(o===i||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&dt(f))l=Pt;else if(""===f){if(u.host="",e)return;l=It}else{if(a=u.parseHost(f))return a;if("localhost"===u.host&&(u.host=""),e)return;f="",l=It}continue}f+=o;break;case It:if(u.isSpecial()){if(l=Pt,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==i&&(l=Pt,"/"!==o))continue}else u.fragment="",l=Nt;else u.query="",l=Dt;break;case Pt:if(o===i||"/"===o||"\\"===o&&u.isSpecial()||!e&&("?"===o||"#"===o)){if(".."===(c=U(c=f))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(u.shortenPath(),"/"===o||"\\"===o&&u.isSpecial()||F(u.path,"")):pt(f)?"/"===o||"\\"===o&&u.isSpecial()||F(u.path,""):("file"===u.scheme&&!u.path.length&&dt(f)&&(u.host&&(u.host=""),f=P(f,0)+":"),F(u.path,f)),f="","file"===u.scheme&&(o===i||"?"===o||"#"===o))for(;u.path.length>1&&""===u.path[0];)B(u.path);"?"===o?(u.query="",l=Dt):"#"===o&&(u.fragment="",l=Nt)}else f+=ht(o,ut);break;case Lt:"?"===o?(u.query="",l=Dt):"#"===o?(u.fragment="",l=Nt):o!==i&&(u.path[0]+=ht(o,at));break;case Dt:e||"#"!==o?o!==i&&("'"===o&&u.isSpecial()?u.query+="%27":u.query+="#"===o?"%23":ht(o,at)):(u.fragment="",l=Nt);break;case Nt:o!==i&&(u.fragment+=ht(o,ct))}h++}},parseHost:function(t){var e,n,i;if("["===P(t,0)){if("]"!==P(t,t.length-1))return G;if(e=function(t){var e,n,i,r,o,s,a,c=[0,0,0,0,0,0,0,0],u=0,l=null,h=0,f=function(){return P(t,h)};if(":"===f()){if(":"!==P(t,1))return;h+=2,l=++u}for(;f();){if(8===u)return;if(":"!==f()){for(e=n=0;n<4&&L(tt,f());)e=16*e+R(f(),16),h++,n++;if("."===f()){if(0===n)return;if(h-=n,u>6)return;for(i=0;f();){if(r=null,i>0){if(!("."===f()&&i<4))return;h++}if(!L(Z,f()))return;for(;L(Z,f());){if(o=R(f(),10),null===r)r=o;else{if(0===r)return;r=10*r+o}if(r>255)return;h++}c[u]=256*c[u]+r,2!=++i&&4!==i||u++}if(4!==i)return;break}if(":"===f()){if(h++,!f())return}else if(f())return;c[u++]=e}else{if(null!==l)return;h++,l=++u}}if(null!==l)for(s=u-l,u=7;0!==u&&s>0;)a=c[u],c[u--]=c[l+s-1],c[l+--s]=a;else if(8!==u)return;return c}($(t,1,-1)),!e)return G;this.host=e}else if(this.isSpecial()){if(t=b(t),L(et,t))return G;if(e=function(t){var e,n,i,r,o,s,a,c=X(t,".");if(c.length&&""===c[c.length-1]&&c.length--,(e=c.length)>4)return t;for(n=[],i=0;i1&&"0"===P(r,0)&&(o=L(K,r)?16:8,r=$(r,8===o?1:2)),""===r)s=0;else{if(!L(10===o?Q:8===o?J:tt,r))return t;s=R(r,o)}F(n,s)}for(i=0;i=I(256,5-e))return null}else if(s>255)return null;for(a=z(n),i=0;i1?arguments[1]:void 0,i=A(e,new zt(t,!1,n));o||(e.href=i.serialize(),e.origin=i.getOrigin(),e.protocol=i.getProtocol(),e.username=i.getUsername(),e.password=i.getPassword(),e.host=i.getHost(),e.hostname=i.getHostname(),e.port=i.getPort(),e.pathname=i.getPathname(),e.search=i.getSearch(),e.searchParams=i.getSearchParams(),e.hash=i.getHash())},jt=Ft.prototype,Bt=function(t,e){return{get:function(){return S(this)[t]()},set:e&&function(t){return S(this)[e](t)},configurable:!0,enumerable:!0}};if(o&&(h(jt,"href",Bt("serialize","setHref")),h(jt,"origin",Bt("getOrigin")),h(jt,"protocol",Bt("getProtocol","setProtocol")),h(jt,"username",Bt("getUsername","setUsername")),h(jt,"password",Bt("getPassword","setPassword")),h(jt,"host",Bt("getHost","setHost")),h(jt,"hostname",Bt("getHostname","setHostname")),h(jt,"port",Bt("getPort","setPort")),h(jt,"pathname",Bt("getPathname","setPathname")),h(jt,"search",Bt("getSearch","setSearch")),h(jt,"searchParams",Bt("getSearchParams")),h(jt,"hash",Bt("getHash","setHash"))),l(jt,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),l(jt,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),O){var Xt=O.createObjectURL,$t=O.revokeObjectURL;Xt&&l(Ft,"createObjectURL",c(Xt,O)),$t&&l(Ft,"revokeObjectURL",c($t,O))}m(Ft,"URL"),r({global:!0,constructor:!0,forced:!s,sham:!o},{URL:Ft})},function(t,e,n){"use strict";var i=n(7),r=n(34),o=n(6),s=n(36),a=r("iterator");t.exports=!i((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),i="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),i+=n+t})),n.delete("a",2),n.delete("b",void 0),s&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!e.size&&(s||!o)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))},function(t,e,n){"use strict";var i=n(14),r=2147483647,o=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",c=RangeError,u=i(s.exec),l=Math.floor,h=String.fromCharCode,f=i("".charCodeAt),d=i([].join),g=i([].push),p=i("".replace),v=i("".split),y=i("".toLowerCase),b=function(t){return t+22+75*(t<26)},x=function(t,e,n){var i=0;for(t=n?l(t/700):t>>1,t+=l(t/e);t>455;)t=l(t/35),i+=36;return l(i+36*t/(t+38))},m=function(t){var e=[];t=function(t){for(var e=[],n=0,i=t.length;n=55296&&r<=56319&&n=s&&il((r-u)/_))throw c(a);for(u+=(m-s)*_,s=m,n=0;nr)throw c(a);if(i===s){for(var T=u,w=36;;){var A=w<=p?1:w>=p+26?26:w-p;if(T0?arguments[0]:void 0));a||(this.size=t.entries.length)},dt=ft.prototype;if(h(dt,{append:function(t,e){var n=L(this);k(arguments.length,2),q(n.entries,{key:T(t),value:T(e)}),a||this.length++,n.updateURL()},delete:function(t){for(var e=L(this),n=k(arguments.length,1),i=e.entries,r=T(t),o=n<2?void 0:arguments[1],s=void 0===o?o:T(o),c=0;ce.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=L(this).entries,i=b(t,arguments.length>1?arguments[1]:void 0),r=0;r1?vt(arguments[1]):{})}}),v(j)){var yt=function(t){return p(this,X),new j(t,arguments.length>1?vt(arguments[1]):{})};X.constructor=yt,yt.prototype=X,i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yt})}}t.exports={URLSearchParams:ft,getState:L}},function(t,e,n){"use strict";var i=n(3),r=n(24),o=n(7),s=n(328),a=n(69),c=n(517),u=r("URL");i({target:"URL",stat:!0,forced:!(c&&o((function(){u.canParse()})))},{canParse:function(t){var e=s(arguments.length,1),n=a(t),i=e<2||void 0===arguments[1]?void 0:a(arguments[1]);try{return!!new u(n,i)}catch(t){return!1}}})},function(t,e,n){"use strict";var i=n(3),r=n(8);i({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}})},function(t,e,n){"use strict";n(519)},function(t,e,n){"use strict";var i=n(48),r=n(14),o=n(69),s=n(328),a=URLSearchParams,c=a.prototype,u=r(c.append),l=r(c.delete),h=r(c.forEach),f=r([].push),d=new a("a=1&a=2&b=3");d.delete("a",1),d.delete("b",void 0),d+""!="a=2"&&i(c,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return l(this,t);var i=[];h(this,(function(t,e){f(i,{key:e,value:t})})),s(e,1);for(var r,a=o(t),c=o(n),d=0,g=0,p=!1,v=i.length;d0))return a;let c;do{a.push(c=new Date(+n)),e(n,s),t(n)}while(c=e)for(;t(e),!n(e);)e.setTime(e-1)}.bind(this),function(t,r){if(o(this,i),t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}.bind(this))}.bind(this),n&&(u.count=function(e,i){return o(this,r),s.setTime(+e),a.setTime(+i),t(s),t(a),Math.floor(n(s,a))}.bind(this),u.every=function(t){var e=this;return o(this,r),t=Math.floor(t),isFinite(t)&&t>0?t>1?u.filter(i?function(n){return o(this,e),i(n)%t==0}.bind(this):function(n){return o(this,e),u.count(0,n)%t==0}.bind(this)):u:null}.bind(this)),u}const u=1e3,l=6e4,h=36e5,f=864e5,d=6048e5,g=2592e6,p=31536e6;function v(t){var e=this;return c(function(n){o(this,e),n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}.bind(this),function(t,n){o(this,e),t.setDate(t.getDate()+7*n)}.bind(this),function(t,n){return o(this,e),(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*l)/d}.bind(this))}const y=v(0),b=v(1),x=v(2),m=v(3),_=v(4),T=v(5),w=v(6);y.range,b.range,x.range,m.range,_.range,T.range,w.range;function A(t){var e=this;return c(function(n){o(this,e),n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}.bind(this),function(t,n){o(this,e),t.setUTCDate(t.getUTCDate()+7*n)}.bind(this),function(t,n){return o(this,e),(n-t)/d}.bind(this))}const S=A(0),E=A(1),k=A(2),O=A(3),M=A(4),R=A(5),C=A(6);S.range,E.range,k.range,O.range,M.range,R.range,C.range;var I=void 0;const P=c(function(t){return o(this,I),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){return o(this,I),t.setDate(t.getDate()+e)}.bind(void 0),function(t,e){return o(this,I),(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*l)/f}.bind(void 0),function(t){return o(this,I),t.getDate()-1}.bind(void 0)),L=(P.range,c(function(t){o(this,I),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,I),t.setUTCDate(t.getUTCDate()+e)}.bind(void 0),function(t,e){return o(this,I),(e-t)/f}.bind(void 0),function(t){return o(this,I),t.getUTCDate()-1}.bind(void 0))),D=(L.range,c(function(t){o(this,I),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,I),t.setUTCDate(t.getUTCDate()+e)}.bind(void 0),function(t,e){return o(this,I),(e-t)/f}.bind(void 0),function(t){return o(this,I),Math.floor(t/f)}.bind(void 0)));D.range;var N=void 0;const z=c(function(t){o(this,N),t.setMonth(0,1),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,N),t.setFullYear(t.getFullYear()+e)}.bind(void 0),function(t,e){return o(this,N),e.getFullYear()-t.getFullYear()}.bind(void 0),function(t){return o(this,N),t.getFullYear()}.bind(void 0));z.every=function(t){var e=this;return o(this,N),isFinite(t=Math.floor(t))&&t>0?c(function(n){o(this,e),n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}.bind(this),function(n,i){o(this,e),n.setFullYear(n.getFullYear()+i*t)}.bind(this)):null}.bind(void 0);z.range;const F=c(function(t){o(this,N),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,N),t.setUTCFullYear(t.getUTCFullYear()+e)}.bind(void 0),function(t,e){return o(this,N),e.getUTCFullYear()-t.getUTCFullYear()}.bind(void 0),function(t){return o(this,N),t.getUTCFullYear()}.bind(void 0));F.every=function(t){var e=this;return o(this,N),isFinite(t=Math.floor(t))&&t>0?c(function(n){o(this,e),n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}.bind(this),function(n,i){o(this,e),n.setUTCFullYear(n.getUTCFullYear()+i*t)}.bind(this)):null}.bind(void 0);F.range;function j(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function B(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function X(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var $,U,Y,V,G,H={"-":"",_:" ",0:"0"},W=/^\s*\d+/,q=/^%/,Z=/[\\^$*+?|[\]().{}]/g;function K(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o68?1900:2e3),n+i[0].length):-1}function ct(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ut(t,e,n){var i=W.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function lt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function ht(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function ft(t,e,n){var i=W.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function dt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function gt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function pt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function vt(t,e,n){var i=W.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function yt(t,e,n){var i=W.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function bt(t,e,n){var i=q.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function xt(t,e,n){var i=W.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function mt(t,e,n){var i=W.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function _t(t,e){return K(t.getDate(),e,2)}function Tt(t,e){return K(t.getHours(),e,2)}function wt(t,e){return K(t.getHours()%12||12,e,2)}function At(t,e){return K(1+P.count(z(t),t),e,3)}function St(t,e){return K(t.getMilliseconds(),e,3)}function Et(t,e){return St(t,e)+"000"}function kt(t,e){return K(t.getMonth()+1,e,2)}function Ot(t,e){return K(t.getMinutes(),e,2)}function Mt(t,e){return K(t.getSeconds(),e,2)}function Rt(t){var e=t.getDay();return 0===e?7:e}function Ct(t,e){return K(y.count(z(t)-1,t),e,2)}function It(t){var e=t.getDay();return e>=4||0===e?_(t):_.ceil(t)}function Pt(t,e){return t=It(t),K(_.count(z(t),t)+(4===z(t).getDay()),e,2)}function Lt(t){return t.getDay()}function Dt(t,e){return K(b.count(z(t)-1,t),e,2)}function Nt(t,e){return K(t.getFullYear()%100,e,2)}function zt(t,e){return K((t=It(t)).getFullYear()%100,e,2)}function Ft(t,e){return K(t.getFullYear()%1e4,e,4)}function jt(t,e){var n=t.getDay();return K((t=n>=4||0===n?_(t):_.ceil(t)).getFullYear()%1e4,e,4)}function Bt(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+K(e/60|0,"0",2)+K(e%60,"0",2)}function Xt(t,e){return K(t.getUTCDate(),e,2)}function $t(t,e){return K(t.getUTCHours(),e,2)}function Ut(t,e){return K(t.getUTCHours()%12||12,e,2)}function Yt(t,e){return K(1+L.count(F(t),t),e,3)}function Vt(t,e){return K(t.getUTCMilliseconds(),e,3)}function Gt(t,e){return Vt(t,e)+"000"}function Ht(t,e){return K(t.getUTCMonth()+1,e,2)}function Wt(t,e){return K(t.getUTCMinutes(),e,2)}function qt(t,e){return K(t.getUTCSeconds(),e,2)}function Zt(t){var e=t.getUTCDay();return 0===e?7:e}function Kt(t,e){return K(S.count(F(t)-1,t),e,2)}function Jt(t){var e=t.getUTCDay();return e>=4||0===e?M(t):M.ceil(t)}function Qt(t,e){return t=Jt(t),K(M.count(F(t),t)+(4===F(t).getUTCDay()),e,2)}function te(t){return t.getUTCDay()}function ee(t,e){return K(E.count(F(t)-1,t),e,2)}function ne(t,e){return K(t.getUTCFullYear()%100,e,2)}function ie(t,e){return K((t=Jt(t)).getUTCFullYear()%100,e,2)}function re(t,e){return K(t.getUTCFullYear()%1e4,e,4)}function oe(t,e){var n=t.getUTCDay();return K((t=n>=4||0===n?M(t):M.ceil(t)).getUTCFullYear()%1e4,e,4)}function se(){return"+0000"}function ae(){return"%"}function ce(t){return+t}function ue(t){return Math.floor(+t/1e3)}function le(){}function he(t){return null==t?le:function(){return this.querySelector(t)}}function fe(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function de(){return[]}function ge(t){return null==t?de:function(){return this.querySelectorAll(t)}}function pe(t){return function(){return this.matches(t)}}function ve(t){return function(e){return e.matches(t)}}$=function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,c=t.shortMonths,u=Q(r),l=tt(r),h=Q(o),f=tt(o),d=Q(s),g=tt(s),p=Q(a),v=tt(a),y=Q(c),x=tt(c),m={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:_t,e:_t,f:Et,g:zt,G:jt,H:Tt,I:wt,j:At,L:St,m:kt,M:Ot,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ce,s:ue,S:Mt,u:Rt,U:Ct,V:Pt,w:Lt,W:Dt,x:null,X:null,y:Nt,Y:Ft,Z:Bt,"%":ae},_={a:function(t){return s[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Xt,e:Xt,f:Gt,g:ie,G:oe,H:$t,I:Ut,j:Yt,L:Vt,m:Ht,M:Wt,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ce,s:ue,S:qt,u:Zt,U:Kt,V:Qt,w:te,W:ee,x:null,X:null,y:ne,Y:re,Z:se,"%":ae},T={a:function(t,e,n){var i=d.exec(e.slice(n));return i?(t.w=g.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=f.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=y.exec(e.slice(n));return i?(t.m=x.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=p.exec(e.slice(n));return i?(t.m=v.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return S(t,e,n,i)},d:ht,e:ht,f:yt,g:at,G:st,H:dt,I:dt,j:ft,L:vt,m:lt,M:gt,p:function(t,e,n){var i=u.exec(e.slice(n));return i?(t.p=l.get(i[0].toLowerCase()),n+i[0].length):-1},q:ut,Q:xt,s:mt,S:pt,u:nt,U:it,V:rt,w:et,W:ot,x:function(t,e,i){return S(t,n,e,i)},X:function(t,e,n){return S(t,i,e,n)},y:at,Y:st,Z:ct,"%":bt};function w(t,e){return function(n){var i,r,o,s=[],a=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++a53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=B(X(o.y,0,1))).getUTCDay(),i=r>4||0===r?E.ceil(i):E(i),i=L.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(r=(i=j(X(o.y,0,1))).getDay(),i=r>4||0===r?b.ceil(i):b(i),i=P.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?B(X(o.y,0,1)).getUTCDay():j(X(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,B(o)):j(o)}}function S(t,e,n,i){for(var r,o,s=0,a=e.length,c=n.length;s=c)return-1;if(37===(r=e.charCodeAt(s++))){if(r=e.charAt(s++),!(o=T[r in H?e.charAt(s++):r])||(i=o(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return m.x=w(n,m),m.X=w(i,m),m.c=w(e,m),_.x=w(n,_),_.X=w(i,_),_.c=w(e,_),{format:function(t){var e=w(t+="",m);return e.toString=function(){return t},e},parse:function(t){var e=A(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=A(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),U=$.format,Y=$.parse,V=$.utcFormat,G=$.utcParse;var ye=Array.prototype.find;function be(){return this.firstElementChild}var xe=Array.prototype.filter;function me(){return Array.from(this.children)}function _e(t){return Array(t.length)}function Te(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function we(t,e,n,i,r,o){for(var s,a=0,c=e.length,u=o.length;ae?1:t>=e?0:NaN}function Oe(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Me(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Me(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Me(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ce.hasOwnProperty(e)?{space:Ce[e],local:t}:t}function Pe(t){return function(){this.removeAttribute(t)}}function Le(t){return function(){this.removeAttributeNS(t.space,t.local)}}function De(t,e){return function(){this.setAttribute(t,e)}}function Ne(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ze(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Fe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function je(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Be(t){return function(){this.style.removeProperty(t)}}function Xe(t,e,n){return function(){this.style.setProperty(t,e,n)}}function $e(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Ue(t,e){return t.style.getPropertyValue(e)||je(t).getComputedStyle(t,null).getPropertyValue(e)}function Ye(t){return function(){delete this[t]}}function Ve(t,e){return function(){this[t]=e}}function Ge(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function He(t){return t.trim().split(/^|\s+/)}function We(t){return t.classList||new qe(t)}function qe(t){this._node=t,this._names=He(t.getAttribute("class")||"")}function Ze(t,e){for(var n=We(t),i=-1,r=e.length;++i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Tn,wn=n(527),An=wn.mark(Sn);function Sn(){var t,e,n,i,r,o,s;return wn.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:t=this._groups,e=0,n=t.length;case 1:if(!(e=m&&(m=x+1);!(b=v[m])&&++m=0;)(i=r[o])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ke);for(var n=this._groups,i=n.length,r=Array(i),o=0;o1?this.each((null==e?Be:"function"==typeof e?$e:Xe)(t,e,null==n?"":n)):Ue(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ye:"function"==typeof e?Ge:Ve)(t,e)):this.node()[t]},classed:function(t,e){var n=He(t+"");if(arguments.length<2){for(var i=We(this.node()),r=-1,o=n.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?bn:yn,i=0;i=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s0)for(var n,i,r=Array(n),o=0;o>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?_i(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?_i(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=li.exec(t))?new wi(e[1],e[2],e[3],1):(e=hi.exec(t))?new wi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=fi.exec(t))?_i(e[1],e[2],e[3],e[4]):(e=di.exec(t))?_i(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=gi.exec(t))?Mi(e[1],e[2]/100,e[3]/100,1):(e=pi.exec(t))?Mi(e[1],e[2]/100,e[3]/100,e[4]):vi.hasOwnProperty(t)?mi(vi[t]):"transparent"===t?new wi(NaN,NaN,NaN,0):null}function mi(t){return new wi(t>>16&255,t>>8&255,255&t,1)}function _i(t,e,n,i){return i<=0&&(t=e=n=NaN),new wi(t,e,n,i)}function Ti(t,e,n,i){return 1===arguments.length?((r=t)instanceof si||(r=xi(r)),r?new wi((r=r.rgb()).r,r.g,r.b,r.opacity):new wi):new wi(t,e,n,null==i?1:i);var r}function wi(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Ai(){return"#"+Oi(this.r)+Oi(this.g)+Oi(this.b)}function Si(){const t=Ei(this.opacity);return(1===t?"rgb(":"rgba(")+ki(this.r)+", "+ki(this.g)+", "+ki(this.b)+(1===t?")":", "+t+")")}function Ei(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ki(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Oi(t){return((t=ki(t))<16?"0":"")+t.toString(16)}function Mi(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ci(t,e,n,i)}function Ri(t){if(t instanceof Ci)return new Ci(t.h,t.s,t.l,t.opacity);if(t instanceof si||(t=xi(t)),!t)return new Ci;if(t instanceof Ci)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,c=(o+r)/2;return a?(s=e===o?(n-i)/a+6*(n0&&c<1?0:s,new Ci(s,a,c,t.opacity)}function Ci(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Ii(t){return(t=(t||0)%360)<0?t+360:t}function Pi(t){return Math.max(0,Math.min(1,t||0))}function Li(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Di(t,e,n,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*i+s*r)/6}ri(si,xi,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:yi,formatHex:yi,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ri(this).formatHsl()},formatRgb:bi,toString:bi}),ri(wi,Ti,oi(si,{brighter:function(t){return t=null==t?ci:Math.pow(ci,t),new wi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?ai:Math.pow(ai,t),new wi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},clamp:function(){return new wi(ki(this.r),ki(this.g),ki(this.b),Ei(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ai,formatHex:Ai,formatHex8:function(){return"#"+Oi(this.r)+Oi(this.g)+Oi(this.b)+Oi(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:Si,toString:Si})),ri(Ci,(function(t,e,n,i){return 1===arguments.length?Ri(t):new Ci(t,e,n,null==i?1:i)}),oi(si,{brighter:function(t){return t=null==t?ci:Math.pow(ci,t),new Ci(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?ai:Math.pow(ai,t),new Ci(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new wi(Li(t>=240?t-240:t+120,r,i),Li(t,r,i),Li(t<120?t+240:t-120,r,i),this.opacity)},clamp:function(){return new Ci(Ii(this.h),Pi(this.s),Pi(this.l),Ei(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){const t=Ei(this.opacity);return(1===t?"hsl(":"hsla(")+Ii(this.h)+", "+100*Pi(this.s)+"%, "+100*Pi(this.l)+"%"+(1===t?")":", "+t+")")}}));var Ni=function(t){var e=this;return o(this,undefined),function(){return o(this,e),t}.bind(this)}.bind(void 0);function zi(t,e){return function(n){return t+n*e}}function Fi(t){return 1==(t=+t)?ji:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):Ni(isNaN(e)?n:e)}}function ji(t,e){var n=e-t;return n?zi(t,n):Ni(isNaN(t)?e:t)}var Bi=function t(e){var n=Fi(e);function i(t,e){var i=n((t=Ti(t)).r,(e=Ti(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),s=ji(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function Xi(t){return function(e){var n,i,r=e.length,o=Array(r),s=Array(r),a=Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],o=t[i+1],s=i>0?t[i-1]:2*r-o,a=io&&(r=e.slice(o,r),a[s]?a[s]+=r:a[++s]=r),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:Gi(n,i)})),o=qi.lastIndex;return o=0&&e._call.call(void 0,t),e=e._next;--tr}()}finally{tr=0,function(){var t,e,n=Ji,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ji=e);Qi=t,pr(i)}(),or=0}}function gr(){var t=ar.now(),e=t-rr;e>ir&&(sr-=e,rr=t)}function pr(t){tr||(er&&(er=clearTimeout(er)),t-or>24?(t<1/0&&(er=setTimeout(dr,t-ar.now()-sr)),nr&&(nr=clearInterval(nr))):(nr||(rr=ar.now(),nr=setInterval(gr,ir)),tr=1,cr(dr)))}function vr(t,e,n){var i=this,r=new hr;return e=null==e?0:+e,r.restart(function(n){o(this,i),r.stop(),t(n+e)}.bind(this),e,n),r}hr.prototype=fr.prototype={constructor:hr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?ur():+n)+(null==e?0:+e),this._next||Qi===this||(Qi?Qi._next=this:Ji=this,Qi=this),this._call=t,this._time=n,pr()},stop:function(){this._call&&(this._call=null,this._time=1/0,pr())}};var yr=Kn("start","end","cancel","interrupt"),br=[],xr=0,mr=1,_r=2,Tr=3,wr=4,Ar=5,Sr=6;function Er(t,e,n,i,r,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function o(c){var u,l,h,f;if(n.state!==mr)return a();for(u in r)if((f=r[u]).name===n.name){if(f.state===Tr)return vr(o);f.state===wr?(f.state=Sr,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete r[u]):+uxr)throw new Error("too late; already scheduled");return n}function Or(t,e){var n=Mr(t,e);if(n.state>Tr)throw new Error("too late; already running");return n}function Mr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Rr(t,e){var n,i,r,o=t.__transition,s=!0;if(o){for(r in e=null==e?null:e+"",o)(n=o[r]).name===e?(i=n.state>_r&&n.state180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(r(n)+"rotate(",null,i)-2,x:Gi(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(o.rotate,s.rotate,a,c),function(t,e,n,o){t!==e?o.push({i:n.push(r(n)+"skewX(",null,i)-2,x:Gi(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(o.skewX,s.skewX,a,c),function(t,e,n,i,o,s){if(t!==n||e!==i){var a=o.push(r(o)+"scale(",null,",",null,")");s.push({i:a-4,x:Gi(t,n)},{i:a-2,x:Gi(e,i)})}else 1===n&&1===i||o.push(r(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,c),o=s=null,function(t){for(var e,n=-1,i=c.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?kr:Or;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(e,n),s.on=r}}(n,t,e))},attr:function(t,e){var n=Ie(t),i="transform"===n?zr:Xr;return this.attrTween(t,"function"==typeof e?(n.local?Hr:Gr)(n,i,Br(this,"attr."+t,e)):null==e?(n.local?Ur:$r)(n):(n.local?Vr:Yr)(n,i,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=Ie(t);return this.tween(n,(i.local?Wr:qr)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Nr:Xr;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var o=Ue(this,t),s=(this.style.removeProperty(t),Ue(this,t));return o===s?null:o===n&&s===i?r:r=e(n=o,i=s)}}(t,i)).on("end.style."+t,no(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,o;return function(){var s=Ue(this,t),a=n(this),c=a+"";return null==a&&(this.style.removeProperty(t),c=a=Ue(this,t)),s===c?null:s===i&&c===r?o:(r=c,o=e(i=s,a))}}(t,i,Br(this,"style."+t,e))).each(function(t,e){var n,i,r,o,s="style."+e;return function(){var a=Or(this,t),c=a.on,u=null==a.value[s]?o||(o=no(e)):void 0;c===n&&r===u||(i=(n=c).copy()).on("end."+s,r=u),a.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r;return function(){var o=Ue(this,t);return o===n+""?null:o===i?r:r=e(i=o,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,r;function o(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,o,n)),i}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Br(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=Mr(this.node(),n).tween,o=0,s=r.length;o=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function po(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n1&&X(n)}else a=k[0][0],u=k[0][1],d=k[1][0],p=k[1][1];c=a,f=u,g=d,v=p;var z=Rn(m).attr("pointer-events","none"),F=z.selectAll(".overlay").attr("cursor",ko[_]);if(n.touches)N.moved=B,N.ended=$;else{var j=Rn(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",$,!0);s&&j.on("keydown.brush",(function(t){switch(t.keyCode){case 16:L=w&&A;break;case 18:T===bo&&(w&&(d=g-I*w,a=c+I*w),A&&(p=v-P*A,u=f+P*A),T=xo,X(t));break;case 32:T!==bo&&T!==xo||(w<0?d=g-I:w>0&&(a=c-I),A<0?p=v-P:A>0&&(u=f-P),T=yo,F.attr("cursor",ko.selection),X(t));break;default:return}fo(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:L&&(b=x=L=!1,X(t));break;case 18:T===xo&&(w<0?d=g:w>0&&(a=c),A<0?p=v:A>0&&(u=f),T=bo,X(t));break;case 32:T===yo&&(t.altKey?(w&&(d=g-I*w,a=c+I*w),A&&(p=v-P*A,u=f+P*A),T=xo):(w<0?d=g:w>0&&(a=c),A<0?p=v:A>0&&(u=f),T=bo),F.attr("cursor",ko[_]),X(t));break;default:return}fo(t)}),!0),ni(n.view)}l.call(m),N.start(n,T.name)}function B(t){for(var e,n=go(t.changedTouches||[t]);!(e=n()).done;){const t=e.value;for(var i,r=go(D);!(i=r()).done;){const e=i.value;e.identifier===t.identifier&&(e.cur=Vn(t,m))}}if(L&&!b&&!x&&1===D.length){const t=D[0];mo(t.cur[0]-t[0])>mo(t.cur[1]-t[1])?x=!0:b=!0}for(var o,s=go(D);!(o=s()).done;){const t=o.value;t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1])}y=!0,fo(t),X(t)}function X(t){const e=D[0],n=e.point0;var i;switch(I=e[0]-n[0],P=e[1]-n[1],T){case yo:case vo:w&&(I=_o(O-a,To(R-d,I)),c=a+I,g=d+I),A&&(P=_o(M-u,To(C-p,P)),f=u+P,v=p+P);break;case bo:D[1]?(w&&(c=_o(O,To(R,D[0][0])),g=_o(O,To(R,D[1][0])),w=1),A&&(f=_o(M,To(C,D[0][1])),v=_o(M,To(C,D[1][1])),A=1)):(w<0?(I=_o(O-a,To(R-a,I)),c=a+I,g=d):w>0&&(I=_o(O-d,To(R-d,I)),c=a,g=d+I),A<0?(P=_o(M-u,To(C-u,P)),f=u+P,v=p):A>0&&(P=_o(M-p,To(C-p,P)),f=u,v=p+P));break;case xo:w&&(c=_o(O,To(R,a-I*w)),g=_o(O,To(R,d+I*w))),A&&(f=_o(M,To(C,u-P*A)),v=_o(M,To(C,p+P*A)))}g2?i-2:0),o=2;o/gi,">"):t}function as(t,e,n,i){var r=this;if(void 0===n&&(n=[-1,1]),void 0===i&&(i=!1),t&&Yo(e))if(-1===e.indexOf("\n"))t.text(e);else{const s=[t.text(),e].map(function(t){return o(this,r),t.replace(/[\s\n]/g,"")}.bind(this));if(s[0]!==s[1]){const s=e.split("\n"),a=i?s.length-1:1;t.html(""),s.forEach(function(e,i){o(this,r),t.append("tspan").attr("x",0).attr("dy",(0===i?n[0]*a:n[1])+"em").text(e)}.bind(this))}}}function cs(t){const e=t.getBBox(),n=e.x,i=e.y,r=e.width,o=e.height;return[{x:n,y:i+o},{x:n,y:i},{x:n+r,y:i},{x:n+r,y:i+o}]}function us(t,e){var n,i=this;return Vn(t&&(null==(n=t.touches||t.sourceEvent&&t.sourceEvent.touches)?void 0:n[0])||t,e).map(function(t){return o(this,i),isNaN(t)?0:t}.bind(this))}function ls(t){const e=t.event,n=t.$el,i=n.subchart.main||n.main;let r;return e&&"brush"===e.type?r=e.selection:i&&(r=i.select(".bb-brush").node())&&(r=zo(r)),r}function hs(t){return!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width")?t.rect=t.getBoundingClientRect():t.rect}function fs(t,e,n){void 0===t&&(t=!0),void 0===e&&(e=0),void 0===n&&(n=1e4);const i=In.crypto||In.msCrypto,r=i?e+i.getRandomValues(new Uint32Array(1))[0]%(n-e+1):Math.floor(Math.random()*(n-e)+e);return t?r+"":r}function ds(t,e,n,i,r){if(n>i)return-1;const o=Math.floor((n+i)/2);let s=t[o],a=s.x,c=s.w,u=void 0===c?0:c;return r&&(a=t[o].y,u=t[o].h),e>=a&&e<=a+u?o:e1?n-1:0),r=1;re?-1:t{=TITLE}",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_padding:0,legend_position:"bottom",legend_show:!0,legend_usePoint:!1},pa={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},va=void 0,ya={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){o(this,va)}.bind(void 0),tooltip_onhide:function(){o(this,va)}.bind(void 0),tooltip_onshown:function(){o(this,va)}.bind(void 0),tooltip_onhidden:function(){o(this,va)}.bind(void 0),tooltip_order:null};function ba(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function xa(t){for(var e,n=1;n9999?"+"+Xa(e,6):Xa(e,4))+"-"+Xa(t.getUTCMonth()+1,2)+"-"+Xa(t.getUTCDate(),2)+(o?"T"+Xa(n,2)+":"+Xa(i,2)+":"+Xa(r,2)+"."+Xa(o,3)+"Z":r?"T"+Xa(n,2)+":"+Xa(i,2)+":"+Xa(r,2)+"Z":i||n?"T"+Xa(n,2)+":"+Xa(i,2)+"Z":"")}function Ua(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function i(t,e){var i,r=[],o=t.length,s=0,a=0,c=o<=0,u=!1;function l(){if(c)return Fa;if(u)return u=!1,za;var e,i,r=s;if(34===t.charCodeAt(r)){for(;s++=o?c=!0:10===(i=t.charCodeAt(s++))?u=!0:13===i&&(u=!0,10===t.charCodeAt(s)&&++s),t.slice(r+1,e-1).replace(/""/g,'"')}for(;s0){if(void 0===e[r-1]&&(e[r-1]={}),void 0===t)throw new Error("Source data is missing a component at ("+n+", "+r+")!");e[r-1][i]=t}}))})),e}function Ka(t){const e=t[0],n=[];return t.forEach((function(t,i){if(i>0){const r={};t.forEach((function(t,n){if(void 0===t)throw new Error("Source data is missing a component at ("+i+", "+n+")!");r[e[n]]=t})),n.push(r)}})),n}function Ja(t,e){const n=[];let i,r;if(Array.isArray(t)){const o=function(t,e){if(void 0!==t[e])return t[e];const n=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let i=t;return n.some((function(t){return!(i=i&&t in i?i[t]:void 0)})),i};i=e.x?e.value.concat(e.x):e.value,n.push(i),t.forEach((function(t){const e=i.map((function(e){let n=o(t,e);return void 0===n&&(n=null),n}));n.push(e)})),r=Ka(n)}else Object.keys(t).forEach((function(e){const i=t[e].concat();null==i.unshift||i.unshift(e),n.push(i)})),r=Za(n);return r}function Qa(t,e){var n=this;const i=t.rows(e);let r;return 1===i.length?(r=[{}],i[0].forEach(function(t){o(this,n),r[0][t]=null}.bind(this))):r=t.parse(e),r}function tc(t){return Qa({rows:Ga,parse:Va},t)}function ec(t){return Qa({rows:qa,parse:Wa},t)}function nc(t,e){const n=t||(null==e?void 0:e.data_keys);return null!=n&&n.x&&(e.data_x=n.x),n}var ic={convertData:function(t,e){var n=this;const i=this.config,r=i.boost_useWorker;let s=t;if(t.bindto&&(s={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(e){o(this,n);const i="data_"+e;i in t&&(s[e]=t[i])}.bind(this))),s.url&&e)!function(t,e,n,i,r){void 0===e&&(e="csv");const o=new XMLHttpRequest,s={csv:tc,tsv:ec,json:Ja};o.open("GET",t),n&&Object.keys(n).forEach((function(t){o.setRequestHeader(t,n[t])})),o.onreadystatechange=function(){if(4===o.readyState){if(200!==o.status)throw new Error(t+": Something went wrong loading!");{const t=o.responseText;t&&r.call(this,s[e]("json"===e?JSON.parse(t):t,i))}}},o.send()}(s.url,s.mimeType,s.headers,nc(s.keys,i),e);else if(s.json)Na(r,Ja,e,[Za,Ka])(s.json,nc(s.keys,i));else if(s.rows)Na(r,Ka,e)(s.rows);else if(s.columns)Na(r,Za,e)(s.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets:function(t,e){var n=this;const i=this,r=i.axis,s=i.config,a=i.state,c=s.data_type;let u=!1,l=!1,h=!1;r&&(u=r.isCategorized(),l=r.isTimeSeries(),h=r.isCustomX());const f=Object.keys(t[0]||{}),d=f.length?f.filter(i.isNotX,i):[],g=f.length?f.filter(i.isX,i):[];let p;d.forEach(function(r){var a=this;o(this,n);const c=this.getXKey(r);h||l?g.indexOf(c)>=0?p=(e&&i.data.xs[r]||[]).concat(t.map(function(t){return o(this,a),t[c]}.bind(this)).filter($o).map(function(t,e){return o(this,a),i.generateTargetX(t,r,e)}.bind(this))):s.data_x?p=this.getOtherTargetXs():ts(s.data_xs)&&(p=i.getXValuesOfXKey(c,i.data.targets)):p=t.map(function(t,e){return o(this,a),e}.bind(this)),p&&(this.data.xs[r]=p)}.bind(this)),d.forEach(function(t){if(o(this,n),!this.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}.bind(this));const v=d.map(function(e,r){var c=this;o(this,n);const l=s.data_idConverter.bind(i.api)(e),f=i.getXKey(e),d=h&&u,g=d&&t.map(function(t){return o(this,c),t.x}.bind(this)).every(function(t){return o(this,c),s.axis_x_categories.indexOf(t)>-1}.bind(this)),p=t.__append__,v=null===f&&p?i.api.data.values(e).length:0;return{id:l,id_org:e,values:t.map(function(t,n){o(this,c);const u=t[f];let h,y=t[e];return y=null===y||isNaN(y)||ns(y)?es(y)||ns(y)?y:null:+y,!d&&!a.hasRadar||0!==r||Go(u)?h=i.generateTargetX(u,e,v+n):(g||0!==r||0!==n||p||(s.axis_x_categories=[]),h=s.axis_x_categories.indexOf(u),-1===h&&(h=s.axis_x_categories.length,s.axis_x_categories.push(u))),(Go(y)||i.data.xs[e].length<=n)&&(h=void 0),{x:h,value:y,id:l,index:-1}}.bind(this)).filter(function(t){return o(this,c),Ho(t.x)}.bind(this))}}.bind(this));if(v.forEach(function(t){var e,r=this;o(this,n),s.data_xSort&&(t.values=t.values.sort(function(t,e){o(this,r);return(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)}.bind(this))),t.values.forEach(function(t,e){return o(this,r),t.index=e}.bind(this)),null==(e=i.data.xs[t.id])||e.sort(function(t,e){return o(this,r),t-e}.bind(this))}.bind(this)),a.hasNegativeValue=i.hasNegativeValueInTargets(v),a.hasPositiveValue=i.hasPositiveValueInTargets(v),c&&i.isValidChartType(c)){const t=i.mapToIds(v).filter(function(t){return o(this,n),!(t in s.data_types)||!i.isValidChartType(s.data_types[t])}.bind(this));i.setTargetType(t,c)}return v.forEach(function(t){return o(this,n),i.cache.add(t.id_org,t,!0)}.bind(this)),v}},rc={isX:function(t){const e=this.config,n=e.data_x&&t===e.data_x,i=ts(e.data_xs)&&function(t,e){var n=this;let i=!1;return Object.keys(t).forEach(function(r){return o(this,n),t[r]===e&&(i=!0)}.bind(this)),i}(e.data_xs,t);return n||i},isNotX:function(t){return!this.isX(t)},isStackNormalized:function(){const t=this.config;return!(!t.data_stack_normalize||!t.data_groups.length)},isGrouped:function(t){var e=this;const n=this.config.data_groups;return t?n.some(function(n){return o(this,e),n.indexOf(t)>=0&&n.length>1}.bind(this)):n.length>0},getXKey:function(t){const e=this.config;return e.data_x?e.data_x:ts(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n=this;const i=this;let r;return(e&&ts(e)?i.mapToIds(e):[]).forEach(function(e){o(this,n),i.getXKey(e)===t&&(r=i.data.xs[e])}.bind(this)),r},getIndexByX:function(t,e){return e?e.indexOf(Yo(t)?t:+t):(this.filterByX(this.data.targets,t)[0]||{index:null}).index},getXValue:function(t,e){const n=this;return t in n.data.xs&&n.data.xs[t]&&$o(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs:function(){const t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function(t){const e=this.getOtherTargetXs();return e&&t1?(e=e.map(function(e){return o(this,t),e.values}.bind(this)).reduce(function(e,n){return o(this,t),e.concat(n)}.bind(this)).map(function(e){return o(this,t),e.x}.bind(this)),e=Ts(xs(e)).map(function(e,n,r){return o(this,t),{x:e,index:i?r.length-n-1:n}}.bind(this))):n&&(e=e[0].values.concat()),e},mapToIds:function(t){var e=this;return t.map(function(t){return o(this,e),t.id}.bind(this))},mapToTargetIds:function(t){return t?es(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function(t,e){const n=this.mapToIds(t);for(let t,i=0;t=n[i];i++)if(t===e)return!0;return!1},isTargetToShow:function(t){return this.state.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function(t){return this.state.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function(t){var e=this;const n=this;return(t||n.data.targets).filter(function(t){return o(this,e),n.isTargetToShow(t.id)}.bind(this))},mapTargetsToUniqueXs:function(t){var e=this;const n=this.axis;let i=[];return null!=t&&t.length&&(i=xs(ms(t.map(function(t){var n=this;return o(this,e),t.values.map(function(t){return o(this,n),+t.x}.bind(this))}.bind(this)))),i=null!=n&&n.isTimeSeries()?i.map(function(t){return o(this,e),new Date(+t)}.bind(this)):i.map(Number)),Ts(i)},addTargetIds:function(t,e){var n=this;const i=this.state;(es(e)?e:[e]).forEach(function(e){o(this,n),i[t].indexOf(e)<0&&i[t].push(e)}.bind(this))},removeTargetIds:function(t,e){var n=this;const i=this.state;(es(e)?e:[e]).forEach(function(e){o(this,n);const r=i[t].indexOf(e);r>=0&&i[t].splice(r,1)}.bind(this))},addHiddenTargetIds:function(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds:function(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds:function(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds:function(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed:function(t){var e=this;const n=this,i=n.state.hasAxis,r={},s=n.isMultipleX(),a=s?n.mapTargetsToUniqueXs(t).map(function(t){return o(this,e),Yo(t)?t:+t}.bind(this)):null;return t.forEach(function(t){var c=this;o(this,e);const u=[];t.values.filter(function(t){let e=t.value;return o(this,c),$o(e)||null===e}.bind(this)).forEach(function(t){o(this,c);let e=t.value;null!==e&&n.isCandlestickType(t)&&(e=es(e)?e.slice(0,4):[e.open,e.high,e.low,e.close]),es(e)?u.push.apply(u,e):ns(e)&&"high"in e?u.push.apply(u,Object.values(e)):n.isBubbleZType(t)?u.push(i&&n.getBubbleZData(e,"y")):s?u[n.getIndexByX(t.x,a)]=e:u.push(e)}.bind(this)),r[t.id]=u}.bind(this)),r},checkValueInTargets:function(t,e){const n=Object.keys(t);let i;for(let r=0;r1},hasNegativeValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return o(this,e),t<0}.bind(this))},hasPositiveValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return o(this,e),t>0}.bind(this))},orderTargets:function(t){const e=[].concat(t),n=this.getSortCompareFn();return n&&e.sort(n),e},getSortCompareFn:function(t){var e=this;void 0===t&&(t=!1);const n=this,i=n.config.data_order,r=/asc/i.test(i),s=/desc/i.test(i);let a;if(r||s){const n=function(t,n){return o(this,e),t+Math.abs(n.value)}.bind(this);a=function(i,s){o(this,e);const a="values"in i?i.values.reduce(n,0):i.value,c="values"in s?s.values.reduce(n,0):s.value;return t?r?a-c:c-a:r?c-a:a-c}.bind(this)}else Uo(i)&&(a=i.bind(n.api));return a||null},filterByX:function(t,e){var n=this;return ms(t.map(function(t){return o(this,n),t.values}.bind(this))).filter(function(t){return o(this,n),t.x-e==0}.bind(this))},filterRemoveNull:function(t){var e=this;return t.filter(function(t){return o(this,e),$o(this.getBaseValue(t))}.bind(this))},filterByXDomain:function(t,e){var n=this;return t.map(function(t){var i=this;return o(this,n),{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return o(this,i),e[0]<=t.x&&t.x<=e[1]}.bind(this))}}.bind(this))},hasDataLabel:function(){const t=this.config.data_labels;return Wo(t)&&t||Jo(t)&&ts(t)},getDataIndexFromEvent:function(t){const e=this.config,n=this.state,i=n.hasRadar,r=n.inputType,o=n.eventReceiver,s=o.coords,a=o.rect;let c;if(i){let e=t.target;/tspan/i.test(e.tagName)&&(e=e.parentNode);const n=Rn(e).datum();c=n&&1===Object.keys(n).length?n.index:void 0}else{const n=e.axis_rotated,i="touch"===r&&t.changedTouches?t.changedTouches[0]:t;c=ds(s,n?i.clientY-a.top:i.clientX-a.left,0,s.length-1,n)}return c},getDataLabelLength:function(t,e,n){var i=this;const r=this,s=[0,0];return r.$el.chart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return o(this,i),r.dataLabelFormat(t.id)(t)}.bind(this)).each((function(t,e){s[e]=1.3*this.getBoundingClientRect()[n]})).remove(),s},isNoneArc:function(t){return this.hasTarget(this.data.targets,t.id)},isArc:function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function(t,e){const n=t[e].x,i=[];let r;for(r=e-1;r>=0&&n===t[r].x;r--)i.push(t[r]);for(r=e;r=0&&i?i[t]:void 0}return i?i[e]:i},setRatioForGroupedData:function(t){var e=this;const n=this;if(n.config.data_groups.length&&t.some(function(t){return o(this,e),n.isGrouped(t.id)}.bind(this))){const i=function(t){return o(this,e),n.getRatio("index",t,!0)}.bind(this);t.forEach(function(t){o(this,e),"values"in t?t.values.forEach(i):i(t)}.bind(this))}},getRatio:function(t,e,n){var i=this;void 0===n&&(n=!1);const r=this,s=r.config,a=r.state,c=r.api;let u=0;if(e&&c.data.shown().length)if(u=e.ratio||e.value,"arc"===t)if(r.pie.padAngle()())u=e.value/r.getTotalDataSum(!0);else{const t=s.gauge_fullCircle?r.getArcLength():-2*r.getGaugeStartAngle(),n=r.hasType("gauge")?t:2*Math.PI;u=(e.endAngle-e.startAngle)/n}else if("index"===t){const t=c.data.values.bind(c);let n=this.getTotalPerIndex();if(a.hiddenTargetIds.length){let e=t(a.hiddenTargetIds,!1);e.length&&(e=e.reduce(function(t,e){var n=this;return o(this,i),t.map(function(t,i){return o(this,n),(Vo(t)?t:0)+e[i]}.bind(this))}.bind(this)),n=n.map(function(t,n){return o(this,i),t-e[n]}.bind(this)))}const r=n[e.index];e.ratio=Vo(e.value)&&n&&r?e.value/r:0,u=e.ratio}else if("radar"===t)u=parseFloat(Math.max(e.value,0)+"")/a.current.dataMax*s.radar_size_ratio;else if("bar"===t){const t=r.getYScaleById.bind(r)(e.id).domain().reduce(function(t,e){return o(this,i),e-t}.bind(this));u=0===t?0:Math.abs(e.value)/t}else"treemap"===t&&(u/=r.getTotalDataSum(!0));return n&&u?100*u:u},updateDataIndexByX:function(t){var e=this;const n=t.reduce(function(t,n,i){return o(this,e),t[+n.x]=i,t}.bind(this),{});this.data.targets.forEach(function(t){var i=this;o(this,e),t.values.forEach(function(t,e){o(this,i);let r=n[+t.x];void 0===r&&(r=e),t.index=r}.bind(this))}.bind(this))},isBubbleZType:function(t){return this.isBubbleType(t)&&(ns(t.value)&&("z"in t.value||"y"in t.value)||es(t.value)&&t.value.length>=2)},isBarRangeType:function(t){var e=this;const n=t.value;return this.isBarType(t)&&es(n)&&n.length>=2&&n.every(function(t){return o(this,e),Vo(t)}.bind(this))},getDataById:function(t){var e;const n=this.cache.get(t)||this.api.data(t);return null!=(e=null==n?void 0:n[0])?e:n}};function oc(t,e){void 0===e&&(e=!1);const n=this.api;e&&this.api.flush(!0),null==t||t.call(n)}var sc={load:function(t,e){var n=this;const i=this,r=i.data,s=e.append;let a=t;a&&(e.filter&&(a=a.filter(e.filter)),(e.type||e.types)&&a.forEach(function(t){var r;o(this,n);const s=(null==(r=e.types)?void 0:r[t.id])||e.type;i.setTargetType(t.id,s)}.bind(this)),r.targets.forEach(function(t){o(this,n);for(let e=0;eh}c.mouse("drag",i)}function p(t){Rn(t.view).on("mousemove.drag mouseup.drag",null),ii(t.view,n),ei(t),c.mouse("end",t)}function v(t,e){if(r.call(this,t,e)){var n,i,s=t.changedTouches,a=o.call(this,t,e),c=s.length;for(n=0;n=0?oa.focused:"")},classDefocused:function(t){return" "+(this.state.defocusedTargetIds.indexOf(t.id)>=0?oa.defocused:"")},getTargetSelectorSuffix:function(t){return(t||0===t?"-"+t:"").replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g,"-")},selectorTarget:function(t,e,n){void 0===e&&(e=""),void 0===n&&(n="");const i=this.getTargetSelectorSuffix(t);return e+"."+(oa.target+i)+" "+n+", "+e+"."+(oa.circles+i)+" "+n},selectorTargets:function(t,e){var n=this;const i=t||[];return i.length?i.map(function(t){return o(this,n),this.selectorTarget(t,e)}.bind(this)):null},selectorLegend:function(t){return"."+(oa.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return null!=t&&t.length?t.map(function(t){return o(this,e),this.selectorLegend(t)}.bind(this)):null}};function vc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yc(t,e){return yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yc(t,e)}function bc(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,yc(t,e)}function xc(t){return xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xc(t)}function mc(t,e,n){return mc=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&yc(r,n.prototype),r},mc.apply(null,arguments)}function _c(t){var e="function"==typeof Map?new Map:void 0;return _c=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return mc(t,arguments,xc(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),yc(i,t)},_c(t)}function Tc(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return wc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wc(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Cc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n-1&&(r=s.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(t){return o(this,e),t.trim().replace(/[\"'\s]/g,"")}.bind(this)).filter(Boolean),i[n]=r)}return r}(n.chart)||Dc).range();const u=c;if(Uo(i.color_tiles)){const n=i.color_tiles.bind(e.api)(),r=c.map(function(i,r){o(this,t);const s=i.replace(/[#\(\)\s,]/g,""),a=e.state.datetimeId+"-pattern-"+s+"-"+r;return Lc(n[r%n.length],i,a)}.bind(this));c=r.map(function(e){return o(this,t),"url(#"+e.id+")"}.bind(this)),e.patterns=r}return function(t){var n;const o=t.id||(null==(n=t.data)?void 0:n.id)||t,l=e.isTypeOf(o,["line","spline","step"])||!i.data_types[o];let h;return Uo(r[o])?h=r[o].bind(e.api)(t):r[o]?h=r[o]:(a.indexOf(o)<0&&a.push(o),h=l?u[a.indexOf(o)%u.length]:c[a.indexOf(o)%c.length],r[o]=h),Uo(s)?s.bind(e.api)(h,t):h}},generateLevelColor:function(){const t=this.config,e=t.color_pattern,n=t.color_threshold,i="value"===n.unit,r=n.max||100,o=n.values&&n.values.length?n.values:[];return ts(n)?function(t){const n=i?t:100*t/r;let s=e[e.length-1];for(let t=0,i=o.length;t')}.bind(this))}},getGradienColortUrl:function(t){return"url(#"+this.state.datetimeId+"-gradient"+this.getTargetSelectorSuffix(t)+")"},updateLinearGradient:function(){var t=this;const e=this,n=e.config,i=e.data.targets,r=e.state.datetimeId,s=e.$el.defs;i.forEach(function(i){var a=this;o(this,t);const c=r+"-gradient"+e.getTargetSelectorSuffix(i.id),u=e.isAreaType(i)?"area":e.isBarType(i)&&"bar",l=n.axis_rotated;if(u&&s.select("#"+c).empty()){const t=e.color(i),r=n[u+"_linearGradient"],h=r.x,f=void 0===h?l?[1,0]:[0,0]:h,d=r.y,g=void 0===d?l?[0,0]:[0,1]:d,p=r.stops,v=void 0===p?[[0,t,1],[1,t,0]]:p,y=s.append("linearGradient").attr("id",""+c).attr("x1",f[0]).attr("x2",f[1]).attr("y1",g[0]).attr("y2",g[1]);v.forEach(function(n){o(this,a);const r=Uo(n[1])?n[1].bind(e.api)(i.id):n[1];y.append("stop").attr("offset",n[0]).attr("stop-color",r||t).attr("stop-opacity",n[2])}.bind(this))}}.bind(this))},setOverColor:function(t,e){var n=this;const i=this,r=i.config,s=i.$el.main,a=r.color_onover;let c=t?a:i.color;ns(c)?c=function(t){let e=t.id;return o(this,n),e in a?a[e]:i.color(e)}.bind(this):Yo(c)?c=function(){return o(this,n),a}.bind(this):Uo(a)&&(c=c.bind(i.api)),s.selectAll(ns(e)?"."+Ls.arc+i.getTargetSelectorSuffix(e.id):"."+Qs.shape+"-"+e).style("fill",c)}},zc={getYDomainMinMax:function(t,e){var n=this;const i=this,r=i.axis,s=i.config,a="min"===e,c=s.data_groups,u=i.mapToIds(t),l=i.getValuesAsIdKeyed(t);if(c.length>0){const e=i["has"+(a?"Negative":"Positive")+"ValueInTargets"](t);c.forEach(function(t){var i=this;o(this,n);const s=t.filter(function(t){return o(this,i),u.indexOf(t)>=0}.bind(this));if(s.length){const t=s[0],n=r.getId(t);e&&l[t]&&(l[t]=l[t].map(function(t){return o(this,i),(a?t<0:t>0)?t:0}.bind(this))),s.filter(function(t,e){return o(this,i),e>0}.bind(this)).forEach(function(s){var c=this;if(o(this,i),l[s]){const i=r.getId(s);l[s].forEach(function(r,s){o(this,c);const u=+r;i!==n||e&&(a?u>0:u<0)||(l[t][s]+=u)}.bind(this))}}.bind(this))}}.bind(this))}return ws(e,Object.keys(l).map(function(t){return o(this,n),ws(e,l[t])}.bind(this)))},isHiddenTargetWithYDomain:function(t){var e=this;const n=this;return n.state.hiddenTargetIds.some(function(i){return o(this,e),n.axis.getId(i)===t}.bind(this))},getYDomain:function(t,e,n){var i=this;const r=this,s=r.axis,a=r.config,c=r.scale,u="axis_"+e;if(r.isStackNormalized())return[0,100];const l=(null==c?void 0:c[e])&&"log"===c[e].type,h=t.filter(function(t){return o(this,i),s.getId(t.id)===e}.bind(this)),f=n?r.filterByXDomain(h,n):h;if(0===f.length)return r.isHiddenTargetWithYDomain(e)?c[e].domain():"y2"===e?c.y.domain():r.getYDomain(t,"y2",n);const d=a[u+"_min"],g=a[u+"_max"],p=a[u+"_center"],v=a[u+"_inverted"],y=r.hasDataLabel()&&a.axis_rotated,b=r.hasDataLabel()&&!a.axis_rotated;let x=r.getYDomainMinMax(f,"min"),m=r.getYDomainMinMax(f,"max"),_=[jn.BAR,jn.BUBBLE,jn.SCATTER].concat(Xn.Line).some(function(t){o(this,i);const e=t.indexOf("area")>-1?"area":t;return r.hasType(t,f,!0)&&a[e+"_zerobased"]}.bind(this));x=$o(d)?d:$o(g)?x<=g?x:g-10:x,m=$o(g)?g:$o(d)?d<=m?m:d+10:m,isNaN(x)&&(x=0),isNaN(m)&&(m=x),x===m&&(x<0?m=0:x=0);const T=x>=0&&m>=0,w=x<=0&&m<=0;($o(d)&&T||$o(g)&&w)&&(_=!1),_&&(T&&(x=0),w&&(m=0));const A=Math.abs(m-x);let S={top:.1*A,bottom:.1*A};if(Ho(p)){const t=Math.max(Math.abs(x),Math.abs(m));m=p+t,x=p-t}if(y){const t=Ko(c.y.range()),e=r.getDataLabelLength(x,m,"width").map(function(e){return o(this,i),e/t}.bind(this));["bottom","top"].forEach(function(t,n){o(this,i),S[t]+=A*(e[n]/(1-e[0]-e[1]))}.bind(this))}else if(b){const t=r.getDataLabelLength(x,m,"height");["bottom","top"].forEach(function(e,n){o(this,i),S[e]+=r.convertPixelToScale("y",t[n],A)}.bind(this))}S=r.getResettedPadding(S);const E=a[u+"_padding"];ts(E)&&["bottom","top"].forEach(function(t){o(this,i),S[t]=s.getPadding(E,t,S[t],A)}.bind(this)),_&&(T&&(S.bottom=x),w&&(S.top=-m));const k=l?[x,m].map(function(t){return o(this,i),t<0?0:t}.bind(this)):[x-S.bottom,m+S.top];return v?k.reverse():k},getXDomainMinMax:function(t,e){var n,i=this;const r=this.config["axis_x_"+e],s=ws(e,t.map(function(t){var n=this;return o(this,i),ws(e,t.values.map(function(t){return o(this,n),t.x}.bind(this)))}.bind(this)));let a=ns(r)?r.value:r;return a=Ho(a)&&null!=(n=this.axis)&&n.isTimeSeries()?ks.bind(this)(a):a,ns(r)&&r.fit&&("min"===e&&as)&&(a=void 0),Ho(a)?a:s},getXDomainPadding:function(t,e){const n=this,i=n.axis,r=n.config.axis_x_padding,o=i.isTimeSeries()&&e,s=Ko(t);let a;if(i.isCategorized()||o)a=0;else if(n.hasType("bar")){const t=n.getMaxDataCount();a=t>1?s/(t-1)/2:.5}else a=n.getResettedPadding(.01*s);let c=Vo(r)?{left:r,right:r}:r,u=c.left,l=void 0===u?a:u,h=c.right,f=void 0===h?a:h;if("px"===r.unit){const t=Math.abs(s+.2*s);l=i.getPadding(r,"left",a,t),f=i.getPadding(r,"right",a,t)}else{const t=s+l+f;if(o&&t){const n=s/e/t;l=l/t/n,f=f/t/n}}return{left:l,right:f}},getXDomain:function(t){const e=this,n=e.axis,i=e.config,r=e.scale.x,o=i.axis_x_inverted,s=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let a=s[0],c=void 0===a?0:a,u=s[1],l=void 0===u?0:u;if("log"!==r.type){const t=n.isCategorized(),i=n.isTimeSeries(),r=e.getXDomainPadding(s);let o=s[0],a=s[1];o-a!=0||t||(i?(o=new Date(.5*o.getTime()),a=new Date(1.5*a.getTime())):(o=0===o?1:.5*o,a=0===a?-1:1.5*a)),(o||0===o)&&(c=i?new Date(o.getTime()-r.left):o-r.left),(a||0===a)&&(l=i?new Date(a.getTime()+r.right):a+r.right)}return o?[l,c]:[c,l]},updateXDomain:function(t,e,n,i,r){const o=this,s=o.config,a=o.org,c=o.scale,u=c.x,l=c.subX,h=s.zoom_enabled;var f;n&&(u.domain(r||Ts(o.getXDomain(t),!s.axis_x_inverted)),a.xDomain=u.domain(),h&&o.zoom.updateScaleExtent(),l.domain(u.domain()),null==(f=o.brush)||f.scale(l));if(e){const t=r||!o.brush||gs(o)?a.xDomain:ls(o).map(l.invert);u.domain(t),h&&o.zoom.updateScaleExtent()}return i&&u.domain(o.trimXDomain(u.orgDomain())),u.domain()},trimXDomain:function(t){const e=this.config.axis_x_inverted,n=this.getZoomDomain(),i=n[0],r=n[1];return(e?t[0]>=i:t[0]<=i)&&(t[0]=i,t[1]=+t[1]+(i-t[0])),(e?t[1]<=r:t[1]>=r)&&(t[0]=+t[0]-(t[1]-r),t[1]=r),t},getZoomDomain:function(t,e){void 0===t&&(t="zoom"),void 0===e&&(e=!1);const n=this,i=n.config,r=n.scale,o=n.org;let s=e&&r[t]?r[t].domain():o.xDomain,a=s[0],c=s[1];return"zoom"===t&&(Ho(i.zoom_x_min)&&(a=ws("min",[a,i.zoom_x_min])),Ho(i.zoom_x_max)&&(c=ws("max",[c,i.zoom_x_max]))),[a,c]},convertPixelToScale:function(t,e,n){const i=this.config,r=this.state,o=i.axis_rotated;let s;return s="x"===t?o?"height":"width":o?"width":"height",n*(e/r[s])},withinRange:function(t,e,n){var i=this;const r=this.config.axis_x_inverted,s=n,a=s[0],c=s[1];if(Array.isArray(t)){const n=[].concat(t);if(r&&n.reverse(),n[0]=a:r?+n>=c:+n<=c)&&!t.every(function(t,n){return o(this,u),t===e[n]}.bind(this))}.bind(this))}return!1}};function Fc(t,e,n){const i=t.config,r="axis_"+e+"_tick_format";return(i[r]?i[r]:t.defaultValueFormat).call(t.api,n)}var jc={yFormat:function(t){return Fc(this,"y",t)},y2Format:function(t){return Fc(this,"y2",t)},getDefaultValueFormat:function(){const t=this,e=t.defaultArcValueFormat,n=t.yFormat,i=t.y2Format,r=t.hasArcType(null,["gauge","polar","radar"]);return function(o,s,a){return(r?e:t.axis&&"y2"===t.axis.getId(a)?i:n).call(t,o,s)}},defaultValueFormat:function(t){return $o(t)?+t:""},defaultArcValueFormat:function(t,e){return(100*e).toFixed(1)+"%"},defaultPolarValueFormat:function(t){return""+t},dataLabelFormat:function(t){var e=this;const n=this.config.data_labels,i=function(t){return o(this,e),$o(t)?+t:""}.bind(this);let r=i;return Uo(n.format)?r=n.format:Jo(n.format)&&(r=n.format[t]?!0===n.format[t]?i:n.format[t]:function(){return o(this,e),""}.bind(this)),r.bind(this.api)}};function Bc(t){const e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}var Xc={initLegend:function(){const t=this,e=t.config,n=t.$el;t.legendItemTextBox={},t.state.legendHasRendered=!1,e.legend_show?(e.legend_contents_bindto||(n.legend=t.$el.svg.append("g").classed(Us.legend,!0).attr("transform",t.getTranslate("legend"))),t.updateLegend()):t.state.hiddenLegendIds=t.mapToIds(t.data.targets)},updateLegend:function(t,e,n){var i;const r=this,o=r.config,s=r.state,a=r.scale,c=r.$el,u=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=is(u,"withTransition",!0),u.withTransitionForTransform=is(u,"withTransitionForTransform",!0),o.legend_contents_bindto&&o.legend_contents_template?r.updateLegendTemplate():s.hasTreemap||r.updateLegendElement(t||r.mapToIds(r.data.targets),u,n),null==(i=c.legend)||i.selectAll("."+Us.legendItem).classed(Us.legendItemHidden,(function(t){const e=!r.isTargetToShow(t);return e&&(this.style.opacity=null),e})),r.updateScales(!1,!a.zoom),r.updateSvgSize(),r.transformAll(u.withTransitionForTransform,n),s.legendHasRendered=!0},updateLegendTemplate:function(){var t=this;const e=this,n=e.config,i=e.$el,r=Rn(n.legend_contents_bindto),s=n.legend_contents_template;if(!r.empty()){const n=e.mapToIds(e.data.targets),a=[];let c="";n.forEach(function(n){o(this,t);const i=Uo(s)?s.bind(e.api)(n,e.color(n),e.api.data(n)[0].values):Es(s,{COLOR:e.color(n),TITLE:n});i&&(a.push(n),c+=i)}.bind(this));const u=r.html(c).selectAll((function(){return this.childNodes})).data(a);e.setLegendItem(u),i.legend=r}},updateSizeForLegend:function(t){const e=this,n=e.config,i=e.state,r=i.isLegendTop,o=i.isLegendLeft,s=i.isLegendRight,a=i.isLegendInset,c=i.current,u=t.width,l=t.height,h={top:r?e.getCurrentPaddingTop()+n.legend_inset_y+5.5:c.height-l-e.getCurrentPaddingBottom()-n.legend_inset_y,left:o?e.getCurrentPaddingLeft()+n.legend_inset_x+.5:c.width-u-e.getCurrentPaddingRight()-n.legend_inset_x+.5};e.state.margin3={top:s?0:a?h.top:c.height-l,right:NaN,bottom:0,left:s?c.width-u:a?h.left:0}},transformLegend:function(t){const e=this,n=e.$el.legend;(0,e.$T)(n,t).attr("transform",e.getTranslate("legend"))},updateLegendStep:function(t){this.state.legendStep=t},updateLegendItemWidth:function(t){this.state.legendItemWidth=t},updateLegendItemHeight:function(t){this.state.legendItemHeight=t},updateLegendItemColor:function(t,e){const n=this.$el.legend;n&&n.select("."+Us.legendItem+"-"+t+" line").style("stroke",e)},getLegendWidth:function(){const t=this.state,e=t.current.width,n=t.isLegendRight,i=t.isLegendInset,r=t.legendItemWidth,o=t.legendStep;return this.config.legend_show?n||i?r*(o+1):e:0},getLegendHeight:function(){var t;const e=this,n=e.state,i=n.current,r=n.isLegendRight,o=n.legendItemHeight,s=n.legendStep,a="fit"===(null==(t=e.config.padding)?void 0:t.mode);return e.config.legend_show?r?i.height:(a?10:Math.max(20,o))*(s+1):0},opacityForUnfocusedLegend:function(t){return t.classed(Us.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this;const i=this,r=i.$el.legend,s=i.$T,a=i.mapToTargetIds(t);r&&s(r.selectAll("."+Us.legendItem).filter(function(t){return o(this,n),a.indexOf(t)>=0}.bind(this)).classed(Gs.legendItemFocused,e)).style("opacity",(function(){return e?null:i.opacityForUnfocusedLegend.call(i,Rn(this))}))},revertLegend:function(){const t=this.$el.legend,e=this.$T;t&&e(t.selectAll("."+Us.legendItem).classed(Gs.legendItemFocused,!1)).style("opacity",null)},showLegend:function(t){const e=this,n=e.config,i=e.$el,r=e.$T;n.legend_show||(n.legend_show=!0,i.legend?i.legend.style("visibility",null):e.initLegend(),e.state.legendHasRendered||e.updateLegend()),e.removeHiddenLegendIds(t),r(i.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend:function(t){const e=this,n=e.config,i=e.$el.legend;n.legend_show&&Qo(t)&&(n.legend_show=!1,i.style("visibility","hidden")),e.addHiddenLegendIds(t),i.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox:function(t,e){const n=this,i=n.cache,r=n.state;let o;const s=Ea;return t&&(o=!r.redrawing&&i.get(s)||{},o[t]||(o[t]=n.getTextRect(e,Us.legendItem),i.add(s,o)),o=o[t]),o},setLegendItem:function(t){var e=this;const n=this,i=n.$el,r=n.api,s=n.config,a=n.state,c="touch"===a.inputType,u=n.hasType("gauge"),l=s.boost_useCssRule,h=s.legend_item_interaction;t.attr("class",(function(t){const e=Rn(this);return(!e.empty()&&e.attr("class")||"")+n.generateClass(Us.legendItem,t)})).style("visibility",function(t){return o(this,e),n.isLegendToShow(t)?null:"hidden"}.bind(this)),s.interaction_enabled&&(l&&[["."+Us.legendItem,"cursor:pointer"],["."+Us.legendItem+" text","pointer-events:none"],["."+Us.legendItemPoint+" text","pointer-events:none"],["."+Us.legendItemTile,"pointer-events:none"],["."+Us.legendItemEvent,"fill-opacity:0"]].forEach(function(t){o(this,e);const r=t[0],s=t[1];n.setCssRule(!1,r,[s])(i.legend)}.bind(this)),t.on(h.dblclick?"dblclick":"click",h||Uo(s.legend_item_onclick)?function(t,e){if(!rs(s.legend_item_onclick,r,e)){const n=t.altKey,i=t.target;"dblclick"===t.type||n?a.hiddenTargetIds.length&&-1===i.parentNode.getAttribute("class").indexOf(Us.legendItemHidden)?r.show():(r.hide(),r.show(e)):(r.toggle(e),Rn(this).classed(Gs.legendItemFocused,!1))}c&&n.hideTooltip()}:null),c||t.on("mouseout",h||Uo(s.legend_item_onout)?function(t,e){rs(s.legend_item_onout,r,e)||(Rn(this).classed(Gs.legendItemFocused,!1),u&&n.undoMarkOverlapped(n,"."+$s.gaugeValue),n.api.revert())}:null).on("mouseover",h||Uo(s.legend_item_onover)?function(t,e){rs(s.legend_item_onover,r,e)||(Rn(this).classed(Gs.legendItemFocused,!0),u&&n.markOverlapped(e,n,"."+$s.gaugeValue),!a.transiting&&n.isTargetToShow(e)&&r.focus(e))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",n.getStylePropValue("pointer")))},updateLegendElement:function(t,e){var n=this;const i=this,r=i.config,s=i.state,a=i.$el.legend,c=i.$T,u="circle"!==r.legend_item_tile_type,l=r.legend_item_tile_r,h={width:u?r.legend_item_tile_width:2*l,height:u?r.legend_item_tile_height:2*l},f={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:h.width+5,totalLength:0},d={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let g,p,v;const y=t.filter(function(t){return o(this,n),!Ho(r.data_names[t])||null!==r.data_names[t]}.bind(this)),b=e.withTransition,x=i.getUpdateLegendPositions(y,f,d);s.isLegendInset&&(f.step=r.legend_inset_step?r.legend_inset_step:y.length,i.updateLegendStep(f.step)),s.isLegendRight?(g=function(t){return o(this,n),f.max.width*d.steps[t]}.bind(this),p=function(t){return o(this,n),d.margins[d.steps[t]]+d.offsets[t]}.bind(this)):s.isLegendInset?(g=function(t){return o(this,n),f.max.width*d.steps[t]+10}.bind(this),p=function(t){return o(this,n),d.margins[d.steps[t]]+d.offsets[t]}.bind(this)):(g=function(t){return o(this,n),d.margins[d.steps[t]]+d.offsets[t]}.bind(this),p=function(t){return o(this,n),f.max.height*d.steps[t]}.bind(this));const m={xText:function(t,e){return o(this,n),g(t,e)+4+h.width}.bind(this),xRect:function(t,e){return o(this,n),g(t,e)}.bind(this),x1Tile:function(t,e){return o(this,n),g(t,e)-2}.bind(this),x2Tile:function(t,e){return o(this,n),g(t,e)-2+h.width}.bind(this),yText:function(t,e){return o(this,n),p(t,e)+9}.bind(this),yRect:function(t,e){return o(this,n),p(t,e)-5}.bind(this),yTile:function(t,e){return o(this,n),p(t,e)+4}.bind(this)};i.generateLegendItem(y,h,x,m),v=a.select("."+Us.legendBackground+" rect"),s.isLegendInset&&f.max.width>0&&0===v.size()&&(v=a.insert("g","."+Us.legendItem).attr("class",Us.legendBackground).append("rect"));const _=a.selectAll("text").data(y).text(function(t){return o(this,n),Ho(r.data_names[t])?r.data_names[t]:t}.bind(this)).each((function(t,e){x(this,t,e)}));c(_,b).attr("x",m.xText).attr("y",m.yText);c(a.selectAll("rect."+Us.legendItemEvent).data(y),b).attr("width",function(t){return o(this,n),d.widths[t]}.bind(this)).attr("height",function(t){return o(this,n),d.heights[t]}.bind(this)).attr("x",m.xRect).attr("y",m.yRect),i.updateLegendItemPos(y,b,m),v&&c(v,b).attr("height",i.getLegendHeight()-12).attr("width",f.max.width*(f.step+1)+10),i.updateLegendItemWidth(f.max.width),i.updateLegendItemHeight(f.max.height),i.updateLegendStep(f.step)},getUpdateLegendPositions:function(t,e,n){const i=this,r=i.config,s=i.state,a=s.isLegendRight||s.isLegendInset;return function(c,u,l){var h=this;const f=l===t.length-1,d=i.getLegendItemTextBox(u,c),g=d.width+e.tileWidth+(f&&!a?0:e.padding.right)+r.legend_padding,p=d.height+e.padding.top,v=a?p:g,y=a?i.getLegendHeight():i.getLegendWidth();let b;const x=function(t,i){i||(b=(y-e.totalLength-v)/2,b=e.max.width)&&(e.max.width=g),(!e.max.height||p>=e.max.height)&&(e.max.height=p);const m=a?e.max.height:e.max.width;r.legend_equally?(Object.keys(n.widths).forEach(function(t){return o(this,h),n.widths[t]=e.max.width}.bind(this)),Object.keys(n.heights).forEach(function(t){return o(this,h),n.heights[t]=e.max.height}.bind(this)),b=(y-m*t.length)/2,b=Uc?10:o>=Yc?5:o>=Vc?2:1;let a,c,u;return r<0?(u=Math.pow(10,-r)/s,a=Math.round(t*u),c=Math.round(e*u),a/ue&&--c,u=-u):(u=Math.pow(10,r)*s,a=Math.round(t/u),c=Math.round(e/u),a*ue&&--c),c0))return[];if((t=+t)===(e=+e))return[t];const i=e=o))return[];const c=s-o+1,u=Array(c);if(i)if(a<0)for(let t=0;te?1:t>=e?0:NaN}function Kc(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Jc(t){var e=this;let n,i,r;function s(t,e,r,o){if(void 0===r&&(r=0),void 0===o&&(o=t.length),r>>1;i(t[n],e)<0?r=n+1:o=n}while(rn&&r(t[o-1],e)>-r(t[o],e)?o-1:o},right:function(t,e,r,o){if(void 0===r&&(r=0),void 0===o&&(o=t.length),r>>1;i(t[n],e)<=0?r=n+1:o=n}while(re&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),i=c>2?uu:cu,r=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(r||(r=i(s.map(t),a,c)))(t(u(e)))}return h.invert=function(n){return u(e((o||(o=i(a,s.map(t),Gi)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,ru),l()):s.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),l()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),c=iu,l()},h.clamp=function(t){return arguments.length?(u=!!t||su,l()):u!==su},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,l()}}function fu(){return hu()(su,su)}var du,gu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pu(t){if(!(e=gu.exec(t)))throw new Error("invalid format: "+t);var e;return new vu({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function vu(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function yu(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function bu(t){return(t=yu(Math.abs(t)))?t[1]:NaN}function xu(t,e){var n=yu(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+Array(r-i.length+2).join("0")}pu.prototype=vu.prototype,vu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var mu=void 0,_u={"%":function(t,e){return o(this,mu),(100*t).toFixed(e)}.bind(void 0),b:function(t){return o(this,mu),Math.round(t).toString(2)}.bind(void 0),c:function(t){return o(this,mu),t+""}.bind(void 0),d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return o(this,mu),t.toExponential(e)}.bind(void 0),f:function(t,e){return o(this,mu),t.toFixed(e)}.bind(void 0),g:function(t,e){return o(this,mu),t.toPrecision(e)}.bind(void 0),o:function(t){return o(this,mu),Math.round(t).toString(8)}.bind(void 0),p:function(t,e){return o(this,mu),xu(100*t,e)}.bind(void 0),r:xu,s:function(t,e){var n=yu(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(du=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+Array(1-o).join("0")+yu(t,Math.max(0,e+o-1))[0]},X:function(t){return o(this,mu),Math.round(t).toString(16).toUpperCase()}.bind(void 0),x:function(t){return o(this,mu),Math.round(t).toString(16)}.bind(void 0)};function Tu(t){return t}var wu,Au,Su,Eu=Array.prototype.map,ku=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ou(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?Tu:(e=Eu.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,o=[],s=0,a=e[0],c=0;r>0&&a>0&&(c+a+1>i&&(a=Math.max(1,i-c)),o.push(t.substring(r-=a,r+a)),!((c+=a+1)>i));)a=e[s=(s+1)%e.length];return o.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Tu:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Eu.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=pu(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,g=t.width,p=t.comma,v=t.precision,y=t.trim,b=t.type;"n"===b?(p=!0,b="g"):_u[b]||(void 0===v&&(v=12),y=!0,b="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===f?r:"#"===f&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",m="$"===f?o:/[%p]/.test(b)?c:"",_=_u[b],T=/[defgprs%]/.test(b);function w(t){var r,o,c,f=x,w=m;if("c"===b)w=_(t)+w,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:_(Math.abs(t),v),y&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),A&&0==+t&&"+"!==h&&(A=!1),f=(A?"("===h?h:u:"-"===h||"("===h?"":h)+f,w=("s"===b?ku[8+du/3]:"")+w+(A&&"("===h?")":""),T)for(r=-1,o=t.length;++r(c=t.charCodeAt(r))||c>57){w=(46===c?s+t.slice(r+1):t.slice(r))+w,t=t.slice(0,r);break}}p&&!d&&(t=i(t,1/0));var S=f.length+t.length+w.length,E=S>1)+f+t+w+E.slice(S);break;default:t=E+f+t+w}return a(t)}return v=void 0===v?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=pu(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(bu(e)/3))),r=Math.pow(10,-i),o=ku[8+i/3];return function(t){return n(r*t)+o}}}}function Mu(t,e,n,i){var r,o=qc(t,e,n);switch((i=pu(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(bu(e)/3)))-bu(Math.abs(t)))}(o,s))||(i.precision=r),Su(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,bu(e)-bu(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-bu(Math.abs(t)))}(o))||(i.precision=r-2*("%"===i.type))}return Au(i)}function Ru(t){var e=t.domain;return t.ticks=function(t){var n=e();return Hc(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return Mu(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r,o=e(),s=0,a=o.length-1,c=o[s],u=o[a],l=10;for(u0;){if((r=Wc(c,u,n))===i)return o[s]=c,o[a]=u,e(o);if(r>0)c=Math.floor(c/r)*r,u=Math.ceil(u/r)*r;else{if(!(r<0))break;c=Math.ceil(c*r)/r,u=Math.floor(u*r)/r}i=r}return t},t}function Cu(){var t=fu();return t.copy=function(){return lu(t,Cu())},Mc.apply(t,arguments),Ru(t)}function Iu(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Pu(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Lu(){var t=function(t){var e=1,n=t(Iu(e),Pu(e));return n.constant=function(n){return arguments.length?t(Iu(e=+n),Pu(e)):e},Ru(n)}(hu());return t.copy=function(){return lu(t,Lu()).constant(t.constant())},Mc.apply(t,arguments)}function Du(t,e){var n,i=0,r=(t=t.slice()).length-1,o=t[i],s=t[r];return s0){for(;g<=p;++g)for(f=1;fu)break;y.push(d)}}else for(;g<=p;++g)for(f=a-1;f>=1;--f)if(d=g>0?f/s(-g):f*s(g),!(du)break;y.push(d)}2*y.length0?t>1?c(function(n){o(this,e),n.setTime(Math.floor(n/t)*t)}.bind(this),function(n,i){o(this,e),n.setTime(+n+i*t)}.bind(this),function(n,i){return o(this,e),(i-n)/t}.bind(this)):Vu:null}.bind(void 0);Vu.range;var Gu=void 0;const Hu=c(function(t){o(this,Gu),t.setTime(t-t.getMilliseconds())}.bind(void 0),function(t,e){o(this,Gu),t.setTime(+t+e*u)}.bind(void 0),function(t,e){return o(this,Gu),(e-t)/u}.bind(void 0),function(t){return o(this,Gu),t.getUTCSeconds()}.bind(void 0));Hu.range;var Wu=void 0;const qu=c(function(t){o(this,Wu),t.setTime(t-t.getMilliseconds()-t.getSeconds()*u)}.bind(void 0),function(t,e){o(this,Wu),t.setTime(+t+e*l)}.bind(void 0),function(t,e){return o(this,Wu),(e-t)/l}.bind(void 0),function(t){return o(this,Wu),t.getMinutes()}.bind(void 0)),Zu=(qu.range,c(function(t){o(this,Wu),t.setUTCSeconds(0,0)}.bind(void 0),function(t,e){o(this,Wu),t.setTime(+t+e*l)}.bind(void 0),function(t,e){return o(this,Wu),(e-t)/l}.bind(void 0),function(t){return o(this,Wu),t.getUTCMinutes()}.bind(void 0)));Zu.range;var Ku=void 0;const Ju=c(function(t){o(this,Ku),t.setTime(t-t.getMilliseconds()-t.getSeconds()*u-t.getMinutes()*l)}.bind(void 0),function(t,e){o(this,Ku),t.setTime(+t+e*h)}.bind(void 0),function(t,e){return o(this,Ku),(e-t)/h}.bind(void 0),function(t){return o(this,Ku),t.getHours()}.bind(void 0)),Qu=(Ju.range,c(function(t){o(this,Ku),t.setUTCMinutes(0,0,0)}.bind(void 0),function(t,e){o(this,Ku),t.setTime(+t+e*h)}.bind(void 0),function(t,e){return o(this,Ku),(e-t)/h}.bind(void 0),function(t){return o(this,Ku),t.getUTCHours()}.bind(void 0)));Qu.range;var tl=void 0;const el=c(function(t){o(this,tl),t.setDate(1),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,tl),t.setMonth(t.getMonth()+e)}.bind(void 0),function(t,e){return o(this,tl),e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}.bind(void 0),function(t){return o(this,tl),t.getMonth()}.bind(void 0)),nl=(el.range,c(function(t){o(this,tl),t.setUTCDate(1),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,tl),t.setUTCMonth(t.getUTCMonth()+e)}.bind(void 0),function(t,e){return o(this,tl),e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}.bind(void 0),function(t){return o(this,tl),t.getUTCMonth()}.bind(void 0)));nl.range;function il(t,e,n,i,r,s){const a=[[Hu,1,u],[Hu,5,5e3],[Hu,15,15e3],[Hu,30,3e4],[s,1,l],[s,5,3e5],[s,15,9e5],[s,30,18e5],[r,1,h],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,f],[i,2,1728e5],[n,1,d],[e,1,g],[e,3,7776e6],[t,1,p]];function c(e,n,i){var r=this;const s=Math.abs(n-e)/i,c=Jc(function(t){let e=t[2];return o(this,r),e}.bind(this)).right(a,s);if(c===a.length)return t.every(qc(e/p,n/p,i));if(0===c)return Vu.every(Math.max(qc(e,n,i),1));const u=a[s/a[c-1][2]0)for(var i,r=t[0],o=e[0],s=t[n]-r,a=e[n]-o,c=-1;++c<=n;)i=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(r+i*s),this._beta*e[c]+(1-this._beta)*(o+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var El=function t(e){function n(t){return 1===e?new bl(t):new Sl(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function kl(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Ol(t,e){this._context=t,this._k=(1-e)/6}Ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:kl(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ml=function t(e){function n(t){return new Ol(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Rl(t,e){this._context=t,this._k=(1-e)/6}Rl.prototype={areaStart:ml,areaEnd:ml,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Cl=function t(e){function n(t){return new Rl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Il(t,e){this._context=t,this._k=(1-e)/6}Il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Pl=function t(e){function n(t){return new Il(t,e)}return n.tension=function(e){return t(+e)},n}(0);const Ll=Math.abs,Dl=Math.atan2,Nl=Math.cos,zl=Math.max,Fl=Math.min,jl=Math.sin,Bl=Math.sqrt,Xl=1e-12,$l=Math.PI,Ul=$l/2,Yl=2*$l;function Vl(t){return t>=1?Ul:t<=-1?-Ul:Math.asin(t)}function Gl(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>Xl){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Xl){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/l,s=(s*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function Hl(t,e){this._context=t,this._alpha=e}Hl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Wl=function t(e){function n(t){return e?new Hl(t,e):new Ol(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ql(t,e){this._context=t,this._alpha=e}ql.prototype={areaStart:ml,areaEnd:ml,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Zl=function t(e){function n(t){return e?new ql(t,e):new Rl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Kl(t,e){this._context=t,this._alpha=e}Kl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Jl=function t(e){function n(t){return e?new Kl(t,e):new Il(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ql(t){return t<0?-1:1}function th(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0);return(Ql(o)+Ql(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs((o*r+s*i)/(i+r)))||0}function eh(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function nh(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function ih(t){this._context=t}function rh(t){this._context=new oh(t)}function oh(t){this._context=t}function sh(t){return new ih(t)}function ah(t){return new rh(t)}function ch(t){this._context=t}function uh(t){var e,n,i=t.length-1,r=Array(i),o=Array(i),s=Array(i);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[i-1]=(t[i]+r[i-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var xh={getDrawShape:function(){var t=this;const e=this,n=e.config.axis_rotated,i=e.state,r=i.hasRadar,s=i.hasTreemap,a={type:{},indices:{},pos:{}};if(s||["bar","candlestick","line","area"].forEach(function(n){o(this,t);const i=vs(/^(bubble|scatter)$/.test(n)?"line":n);if(e.hasType(n)||e.hasTypeOf(i)||"line"===n&&(e.hasType("bubble")||e.hasType("scatter"))){const t=e.getShapeIndices(e["is"+i+"Type"]),r=e["generateDraw"+i];a.indices[n]=t,a.type[n]=r?r.bind(e)(t,!1):void 0}}.bind(this)),!e.hasArcType()||r||s){let t,i;s||(t=r?e.radarCircleX:n?e.circleY:e.circleX,i=r?e.radarCircleY:n?e.circleX:e.circleY),a.pos={xForText:e.generateXYForText(a.indices,!0),yForText:e.generateXYForText(a.indices,!1),cx:(t||function(){}).bind(e),cy:(i||function(){}).bind(e)}}return a},getShapeIndices:function(t){var e=this;const n=this,i=n.config,r=i.data_xs,s=ts(r),a={};let c=s?{}:0;return s&&xs(Object.keys(r).map(function(t){return o(this,e),r[t]}.bind(this))).forEach(function(t){o(this,e),c[t]=0,a[t]={}}.bind(this)),n.filterTargetsToShow(n.data.targets.filter(t,n)).forEach(function(t){o(this,e);const n=t.id in r?r[t.id]:"",s=n?a[n]:a;for(let e,n=0;e=i.data_groups[n];n++)if(!(e.indexOf(t.id)<0))for(let n,i=0;n=e[i];i++)if(n in s){s[t.id]=s[n];break}Go(s[t.id])&&(s[t.id]=n?c[n]++:c++,s.__max__=(n?c[n]:c)-1)}.bind(this)),a},getIndices:function(t,e){var n=this;const i=this,r=i.config,s=r.data_xs,a=r.bar_indices_removeNull,c=e.id,u=e.index;if(i.isBarType(c)&&a){const t={};return i.getAllValuesOnIndex(u,!0).forEach(function(e,i){o(this,n),t[e.id]=i,t.__max__=i}.bind(this)),t}return ts(s)?t[s[c]]:t},getIndicesMax:function(t){var e=this;return ts(this.config.data_xs)?Object.keys(t).map(function(n){return o(this,e),t[n].__max__||0}.bind(this)).reduce(function(t,n){return o(this,e),t+n}.bind(this)):t.__max__},getShapeX:function(t,e,n){var i=this;const r=this,s=r.config,a=r.scale,c=n?a.subX:a.zoom||a.x,u=s.bar_overlap,l=s.bar_padding,h=function(t,e){return o(this,i),t+e}.bind(this),f=Jo(t)&&(t._$total.length?t._$total.reduce(h)/2:0);return function(n){o(this,i);const s=r.getIndices(e,n,"getShapeX"),a=n.id in s?s[n.id]:0,d=(s.__max__||0)+1;let g=0;if(ts(n.x)){const e=c(n.x,!0);if(f){const i=t[n.id]||t._$width;g=u?e-i/2:e-i+t._$total.slice(0,a+1).reduce(h)-f}else g=e-(Vo(t)?t:t._$width)*(d/2-(u?1:a))}return t&&g&&d>1&&l&&(a&&(g+=l*a),d>2?g-=(d-1)*l/2:2===d&&(g-=l/2)),g}.bind(this)},getShapeY:function(t){var e=this;const n=this,i=n.isStackNormalized();return function(r){o(this,e);let s=r.value;return Vo(r)?s=r:i?s=n.getRatio("index",r,!0):n.isBubbleZType(r)?s=n.getBubbleZData(r.value,"y"):n.isBarRangeType(r)&&(s=s[1]),n.getYScaleById(r.id,t)(s)}.bind(this)},getShapeYMin:function(t){const e=this,n=e.axis.getId(t),i=e.scale[n].domain()[0],r=e.config["axis_"+n+"_inverted"];return!e.isGrouped(t)&&!r&&i>0?i:0},getShapeOffsetData:function(t){var e=this;const n=this,i=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),r=n.isStackNormalized(),s=i.map(function(t){var i=this;o(this,e);let s=t.values;const a={};n.isStepType(t)&&(s=n.convertValuesToStep(s));const c=s.reduce(function(t,e){o(this,i);const s=+e.x;return t[s]=e,a[s]=r?n.getRatio("index",e,!0):e.value,t}.bind(this),{});return{id:t.id,rowValues:s,rowValueMapByXValue:c,values:a}}.bind(this)),a=i.reduce(function(t,n,i){let r=n.id;return o(this,e),t[r]=i,t}.bind(this),{});return{indexMapByTargetId:a,shapeOffsetTargets:s}},getShapeOffset:function(t,e,n){var i=this;const r=this,s=r.getShapeOffsetData(t),a=s.shapeOffsetTargets,c=s.indexMapByTargetId,u=r.config.data_groupsZeroAs;return function(t,s){var l=this;o(this,i);const h=t.id,f=t.value,d=t.x,g=r.getIndices(e,t),p=r.getYScaleById(h,n);if(r.isBarRangeType(t))return p(f[0]);const v=+d,y=p("zero"===u?0:r.getShapeYMin(h));let b=y;return a.filter(function(t){return o(this,l),t.id!==h&&g[t.id]===g[h]}.bind(this)).forEach(function(t){o(this,l);const e=t.id,n=t.rowValueMapByXValue,i=t.rowValues,r=t.values;if(c[e]=0&&Vo(t)){(0!==f||("positive"===u&&t>0||"negative"===u&&t<0))&&(b+=p(t)-y)}}}.bind(this)),b}.bind(this)},getBarW:function(t,e,n){var i=this;const r=this,s=r.config,a=r.org,c=r.scale,u=r.getMaxDataCount(),l="bar"===t&&s.data_groups.length,h=t+"_width",f=c.zoom&&!r.axis.isCategorized()?a.xDomain.map(function(t){return o(this,i),c.zoom(t)}.bind(this)).reduce(function(t,e){return o(this,i),Math.abs(t)+e}.bind(this))/u:e.tickInterval(u),d=function(t){o(this,i);const e=t?s[h][t]:s[h],r=t?e.ratio:s[h+"_ratio"],a=t?e.max:s[h+"_max"],c=Vo(e)?e:n?f*r/n:0;return a&&c>a?a:c}.bind(this);let g=d();return!l&&Jo(s[h])&&(g={_$width:g,_$total:[]},r.filterTargetsToShow(r.data.targets).forEach(function(t){o(this,i),s[h][t.id]&&(g[t.id]=d(t.id),g._$total.push(g[t.id]||g._$width))}.bind(this))),g},getShapeByIndex:function(t,e,n){var i=this;const r=this,s=r.$el,a=$o(e)?"-"+e:"";let c=s[t];return c=c&&!c.empty()?c.filter(function(t){return o(this,i),!n||t.id===n}.bind(this)).filter(function(t){return o(this,i),!$o(e)||t.index===e}.bind(this)):(n?s.main.selectAll("."+oa[t+"s"]+r.getTargetSelectorSuffix(n)):s.main).selectAll("."+oa[t]+a),c},isWithinShape:function(t,e){const n=this,i=Rn(t);let r;return n.isTargetToShow(e.id)?null!=n.hasValidPointType&&n.hasValidPointType(t.nodeName)?r=n.isStepType(e)?n.isWithinStep(t,n.getYScaleById(e.id)(e.value)):n.isWithinCircle(t,n.isBubbleType(e)?1.5*n.pointSelectR(e):0):"path"===t.nodeName&&(r=!i.classed(oa.bar)||n.isWithinBar(t)):r=!1,r},getInterpolate:function(t){const e=this.getInterpolateType(t);return{basis:xl,"basis-closed":Tl,"basis-open":Al,bundle:El,cardinal:Ml,"cardinal-closed":Cl,"cardinal-open":Pl,"catmull-rom":Wl,"catmull-rom-closed":Zl,"catmull-rom-open":Jl,"monotone-x":sh,"monotone-y":ah,natural:lh,"linear-closed":fh,linear:gh,step:vh,"step-after":bh,"step-before":yh}[e]},getInterpolateType:function(t){const e=this,n=e.config,i=n.spline_interpolation_type,r=e.isInterpolationType(i)?i:"cardinal";return e.isSplineType(t)?r:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar:function(t){const e=us(this.state.event,t),n=cs(t),i=n[0],r=n[1],o=Math.min(i.x,r.x),s=Math.min(i.y,r.y),a=this.config.bar_sensitivity,c=t.getBBox(),u=c.width,l=c.height;return o-a0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getCurrentPaddingTop:function(){const t=this,e=t.config,n=t.state.hasAxis,i=t.$el,r=n?e.axis_y2_axes.length:0;let o=$o(e.padding_top)?e.padding_top:0;return i.title&&i.title.node()&&(o+=t.getTitlePadding()),r&&e.axis_rotated&&(o+=t.getHorizontalAxisHeight("y2")*r),o},getCurrentPaddingBottom:function(){const t=this,e=t.config,n=t.state.hasAxis,i=e.axis_rotated?"y":"x",r=n?e["axis_"+i+"_axes"].length:0;return($o(e.padding_bottom)?e.padding_bottom:0)+(r?t.getHorizontalAxisHeight(i)*r:0)},getCurrentPaddingLeft:function(t){var e;const n=this,i=n.config,r=n.state.hasAxis,o=i.axis_rotated,s="fit"===(null==(e=i.padding)?void 0:e.mode),a=o?"x":"y",c=r?i["axis_"+a+"_axes"].length:0;let u=r?n.getAxisWidthByAxisId(a,t):0;s||(u=qo(u));let l=i["axis_"+a+"_inner"]||!i["axis_"+a+"_show"]?0:u;return $o(i.padding_left)?l=i.padding_left+(s&&o?u:0):r&&o&&(l=i.axis_x_show?s?u:Math.max(u,40):1),r&&(s||i["axis_"+a+"_inner"])&&i["axis_"+a+"_label"].text&&(l+=n.axis.getAxisLabelPosition("y").isOuter?20:0),l+u*c},getCurrentPaddingRight:function(t){var e,n;void 0===t&&(t=!1);const i=this,r=i.config,o=i.state.hasAxis,s=r.axis_rotated,a="fit"===(null==(e=r.padding)?void 0:e.mode),c=a?2:10,u=i.state.isLegendRight?i.getLegendWidth()+20:0,l=o?r.axis_y2_axes.length:0,h=null!=(n=i.axis)&&n.getAxisLabelPosition("y2").isOuter?20:0,f=t?i.axis.getXAxisTickTextY2Overflow(c):0;let d=o&&!r.axis_y2_inner?i.getAxisWidthByAxisId("y2"):1;a||(d=qo(d));let g=s?0:Math.max(d+u,f);return $o(r.padding_right)?g=r.padding_right+(a&&(s||!r.axis_y2_show?c:g))+(o&&!a?1:0):i.axis&&s?g=c+u:!i.axis||r.axis_y2_show&&!r.axis_y2_inner||(g=Math.max((a&&!r.axis_y2_show?2:1)+u+h,f)),o&&!s&&a&&r.axis_y2_show&&!r.axis_y2_inner&&r.axis_y2_label.text&&(g+=h),g+d*l},getParentRectValue:function(t){const e="offset"+vs(t);let n=this.$el.chart.node(),i=0;for(;i<30&&n&&"BODY"!==n.tagName;){try{i=n.getBoundingClientRect()[t]}catch(t){e in n&&(i=n[e])}n=n.parentNode}const r=Fn.body[e];return i>r&&(i=r),i},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft:function(t){const e=this,n=e.config,i=e.$el,r=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,o=n.axis_rotated?Ns.axisX:Ns.axisY,s=i.main.select("."+o).node(),a=s&&r?s.getBoundingClientRect():{right:0},c=i.chart.node().getBoundingClientRect(),u=e.hasArcType(),l=a.right-c.left-(u?0:e.getCurrentPaddingLeft(t));return l>0?l:0},updateDimension:function(t){const e=this,n=e.config,i=e.state.hasAxis,r=e.$el;var o;i&&!t&&e.axis.x&&n.axis_rotated&&(null==(o=e.axis.subX)||o.create(r.axis.subX));e.updateScales(t),e.updateSvgSize(),e.transformAll(!1)},updateSvgSize:function(){const t=this,e=t.state,n=e.clip,i=e.current,r=e.hasAxis,o=e.width,s=e.height,a=t.$el.svg;if(a.attr("width",i.width).attr("height",i.height),r){const e=a.select("."+ta.brush+" .overlay"),i={width:0,height:0};e.size()&&(i.width=+e.attr("width"),i.height=+e.attr("height")),a.selectAll(["#"+n.id,"#"+n.idGrid]).select("rect").attr("width",o).attr("height",s),a.select("#"+n.idXAxis).select("rect").call(t.setXAxisClipPath.bind(t)),a.select("#"+n.idYAxis).select("rect").call(t.setYAxisClipPath.bind(t)),n.idSubchart&&a.select("#"+n.idSubchart).select("rect").attr("width",o).attr("height",i.height)}},getCurrentPadding:function(){const t=this;return{top:t.getCurrentPaddingTop(),bottom:t.getCurrentPaddingBottom(),left:t.getCurrentPaddingLeft(),right:t.getCurrentPaddingRight()}},getResettedPadding:function(t){var e=this;const n=this.config,i=Vo(t);let r=i?0:{};return!1===n.padding?i||Object.keys(t).forEach(function(i){o(this,e),r[i]=Qo(n.data_labels)||!1===n.data_labels||"top"!==i?0:t[i]}.bind(this)):r=t,r},updateSizes:function(t){var e;const n=this,i=n.config,r=n.state,o=n.$el.legend,s=i.axis_rotated,a=n.hasArcType()||r.hasTreemap,c="fit"===(null==(e=i.padding)?void 0:e.mode);t||n.setContainerSize();const u={width:o?n.getLegendWidth():0,height:o?n.getLegendHeight():0};!a&&i.axis_x_show&&i.axis_x_tick_autorotate&&n.updateXAxisTickClip();const l=r.isLegendRight||r.isLegendInset?0:u.height,h=s||a?0:n.getHorizontalAxisHeight("x"),f=i.subchart_axis_x_show&&i.subchart_axis_x_tick_text_show?h:30,d=i.subchart_show&&!a?i.subchart_size_height+f:0,g=n.hasType("gauge")&&i.arc_needle_show&&!i.gauge_fullCircle&&!i.gauge_label_show?10:0,p=n.getCurrentPadding();if(r.margin=!a&&s?{top:n.getHorizontalAxisHeight("y2")+p.top,right:a?0:n.getCurrentPaddingRight(!0),bottom:n.getHorizontalAxisHeight("y")+l+p.bottom,left:d+(a?0:p.left)}:{top:(c?0:4)+p.top,right:a?0:n.getCurrentPaddingRight(!0),bottom:g+h+d+l+p.bottom,left:a?0:p.left},r.margin=n.getResettedPadding(r.margin),r.margin2=s?{top:r.margin.top,right:NaN,bottom:20+l,left:n.state.rotatedPadding.left}:{top:r.current.height-d-l,right:NaN,bottom:f+l,left:r.margin.left},r.margin3={top:0,right:NaN,bottom:0,left:0},null==n.updateSizeForLegend||n.updateSizeForLegend(u),r.width=r.current.width-r.margin.left-r.margin.right,r.height=r.current.height-r.margin.top-r.margin.bottom,r.width<0&&(r.width=0),r.height<0&&(r.height=0),r.width2=s?r.margin.left-r.rotatedPadding.left-r.rotatedPadding.right:r.width,r.height2=s?r.height:r.current.height-r.margin2.top-r.margin2.bottom,r.width2<0&&(r.width2=0),r.height2<0&&(r.height2=0),n.hasArcType()){const t=n.hasType("gauge"),e=i.legend_show&&r.isLegendRight;r.arcWidth=r.width-(e?u.width+10:0),r.arcHeight=r.height-(e&&!t?0:10),t&&!i.gauge_fullCircle&&(r.arcHeight+=r.height-n.getPaddingBottomForGauge()),null==n.updateRadius||n.updateRadius()}r.isLegendRight&&a&&(r.margin3.left=r.arcWidth/2+1.1*r.radiusExpanded)}},_h={setCssRule:function(t,e,n,i){var r=this;const s=this,a=s.config,c=s.state,u=c.cssRule,l=c.style;return a.boost_useCssRule?function(a){var c=this;o(this,r),a.each(function(r){var a=this;o(this,c);const h=i&&(null==i?void 0:i.call(s,r)),f=(t?"."+(Qs.shapes+s.getTargetSelectorSuffix(r.id)):"")+e;e in u&&l.sheet.deleteRule(u[f]),s.state.cssRule[f]=function(t,e,n){var i=this;const r=t.rootSelctor,s=t.sheet,a=r+" "+function(t){return o(this,i),t.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,".")}.bind(this)(e)+" {"+n.join(";")+"}";return s[s.insertRule?"insertRule":"addRule"](a,s.cssRules.length)}(l,f,n.filter(Boolean).map(function(t){return o(this,a),Yo(h)&&-1===t.indexOf(":")?t+": "+h:t||""}.bind(this)))}.bind(this))}.bind(this):function(){o(this,r)}.bind(this)},getStylePropValue:function(t){return this.config.boost_useCssRule?null:Uo(t)?t.bind(this):t}};function Th(t){return"string"==typeof t?new kn([document.querySelectorAll(t)],[document.documentElement]):new kn([fe(t)],En)}function wh(t,e,n,i,r){var o;const s=t.value,a=this.isCandlestickType(t),c=Vo(s)&&s<0||a&&!(null!=(o=this.getCandlestickData(t))&&o._isUp);let u=e.x,l=e.y;return i?"start"===n?(u+=c?0:8,l+=4):"middle"===n?(u+=8,l-=8):"end"===n&&(c&&(u-=8),l+=4):("start"===n?(u+=4,c&&(l+=16)):"middle"===n?l-=8:"end"===n&&(u-=4,c&&(l+=16)),r&&(l+=c?-17:a?13:7)),{x:u,y:l}}function Ah(t,e){var n;const i=this.config.data_labels_position,r=t.id,o=t.index,s=t.value;return null!=(n=Uo(i)?i.bind(this.api)(e,s,r,o,this.$el.text):(r in i?i[r]:i)[e])?n:0}var Sh={opacityForText:function(t){const e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?null:"0"},initText:function(){const t=this.$el;t.main.select("."+Ps.chart).append("g").attr("class",ea.chartTexts).style("pointer-events",t.treemap?"none":null)},updateTargetsForText:function(t){var e=this;const n=this,i=n.getChartClass("Text"),r=n.getClass("texts","id"),s=n.classFocus.bind(n);n.$el.main.select("."+ea.chartTexts).selectAll("."+ea.chartText).data(t).attr("class",function(t){return o(this,e),(""+i(t)+s(t)).trim()}.bind(this)).enter().append("g").style("opacity","0").attr("class",i).call(n.setCssRule(!0," ."+ea.text,["fill","pointer-events:none"],n.updateTextColor)).append("g").attr("class",r)},updateText:function(){var t=this;const e=this,n=e.$el,i=e.$T,r=e.config,s=e.axis,a=e.getClass("text","index"),c=r.data_labels.centered,u=n.main.selectAll("."+ea.texts).selectAll("."+ea.text).data(e.labelishData.bind(e));i(u.exit()).style("fill-opacity","0").remove(),n.text=u.enter().append("text").merge(u).attr("class",a).attr("text-anchor",function(n){o(this,t);let i=r["axis_"+(null==s?void 0:s.getId(n.id))+"_inverted"]?n.value>0:n.value<0;if(e.isCandlestickType(n)){const t=e.getCandlestickData(n);i=!(null!=t&&t._isUp)}else if(e.isTreemapType(n))return c?"middle":"start";return r.axis_rotated?i?"end":"start":"middle"}.bind(this)).style("fill",e.getStylePropValue(e.updateTextColor)).style("fill-opacity","0").each((function(t,n,i){const r=Rn(this);let o=t.value;if(e.isBubbleZType(t))o=e.getBubbleZData(o,"z");else if(e.isCandlestickType(t)){const n=e.getCandlestickData(t);n&&(o=n.close)}o=e.isTreemapType(t)?e.treemapDataLabelFormat(t)(r):e.dataLabelFormat(t.id)(o,t.id,n,i),Vo(o)?this.textContent=o:as(r,o)}))},updateTextColor:function(t){const e=this,n=e.config,i=n.data_labels_colors,r=e.isArcType(t)&&!e.isRadarType(t)||e.isTreemapType(t)?null:e.color(t);let o;if(Yo(i))o=i;else if(ns(i)){o=i[(t.data||t).id]}else Uo(i)&&(o=i.bind(e.api)(r,t));if(e.isCandlestickType(t)&&!Uo(i)){const i=e.getCandlestickData(t);if(null==i||!i._isUp){const e=n.candlestick_color_down;o=ns(e)?e[t.id]:e}}return o||r},updateTextBacgroundColor:function(t){const e=this,n=e.$el,i=e.config.data_labels_backgroundColors;let r="";if(Yo(i)||ns(i)){const o=Yo(i)?"":e.getTargetSelectorSuffix("id"in t?t.id:t.data.id),s=n.defs.select(["filter[id*='labels-bg","']"].join(o));s.size()&&(r="url(#"+s.attr("id")+")")}return r||null},redrawText:function(t,e,n,i){const r=this,o=r.$T,s=r.axis,a=r.config,c=r.state.hasTreemap,u=fs(!0),l=a.axis_rotated,h=a.data_labels.rotate,f=function(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}(h),d=h?"rotate("+h+")":"";return r.$el.text.style("fill",r.getStylePropValue(r.updateTextColor)).attr("filter",r.updateTextBacgroundColor.bind(r)).style("fill-opacity",n?0:r.opacityForText.bind(r)).each((function(n,g){const p=o(c&&this.childElementCount?this.parentNode:this,!(!i||!this.getAttribute("x")),u),v=a["axis_"+(null==s?void 0:s.getId(n.id))+"_inverted"];let y={x:t.bind(this)(n,g),y:e.bind(this)(n,g)};h&&(y=wh.bind(r)(n,y,f,l,v),p.attr("text-anchor",f)),this.childElementCount||h?p.attr("transform","translate("+y.x+" "+y.y+") "+d):p.attr("x",y.x).attr("y",y.y)})),!0},getTextRect:function(t,e){var n=this;const i=this;let r=t.node?t.node():t;/text/i.test(r.tagName)||(r=r.querySelector("text"));const s=r.textContent,a=Ra+"-"+s.replace(/\W/g,"_");let c=i.cache.get(a);return c||(i.$el.svg.append("text").style("visibility","hidden").style("font",Rn(r).style("font")).classed(e,!0).text(s).call(function(t){o(this,n),c=hs(t.node())}.bind(this)).remove(),i.cache.add(a,c)),c},generateXYForText:function(t,e){var n=this;const i=this,r=i.state,s=r.hasRadar,a=r.hasTreemap,c=Object.keys(t),u={},l=e?i.getXForText:i.getYForText;return s&&c.push("radar"),a&&c.push("treemap"),c.forEach(function(e){o(this,n),u[e]=i["generateGet"+vs(e)+"Points"](t[e],!1)}.bind(this)),function(t,e){const n=(i.isAreaType(t)?"area":i.isBarType(t)&&"bar")||i.isCandlestickType(t)&&"candlestick"||i.isRadarType(t)&&"radar"||i.isTreemapType(t)&&"treemap"||"line";return l.call(i,u[n](t,e),t,this)}},getCenteredTextPos:function(t,e,n,i){const r=this,o=r.config,s=o.axis_rotated,a=r.isBarType(t),c=r.isTreemapType(t);if(o.data_labels.centered&&(a||c)){const r=hs(n);if(a){const n=t.value>=0;if(s){const t=(n?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+r.width/2;return n?-t-3:t+2}{const t=(n?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+r.height/2;return n?t:-t-2}}if(c)return"x"===i?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2+r.height/2}return 0},getXForText:function(t,e,n){const i=this,r=i.config,o=i.state,s=r.axis_rotated,a=i.isTreemapType(e);let c=t[0][0];var u;if(i.isCandlestickType(e))s?c=null!=(u=i.getCandlestickData(e))&&u._isUp?t[2][2]+4:t[2][1]-4:c+=(t[1][0]-c)/2;else if(a)c+=r.data_labels.centered?0:5;else if(s){const n=r["axis_"+i.axis.getId(e.id)+"_inverted"],o=i.isBarType(e)?4:6,s=e.value;c=t[2][1],n?c-=o*(s>0?1:-1):c+=o*(s<0?-1:1)}else c=i.hasType("bar")?(t[2][0]+t[0][0])/2:c;if(null===e.value)if(c>o.width){const t=hs(n).width;c=o.width-t}else c<0&&(c=4);return(s||a)&&(c+=i.getCenteredTextPos(e,t,n,"x")),c+Ah.call(this,e,"x")},getYForText:function(t,e,n){const i=this,r=i.axis,o=i.config,s=i.state,a=o.axis_rotated,c=o["axis_"+(null==r?void 0:r.getId(e.id))+"_inverted"],u=i.isBarType(e),l=i.isTreemapType(e),h=o.point_r,f=hs(n);let d,g=e.value,p=3;if(i.isCandlestickType(e))g=i.getCandlestickData(e),a?(d=t[0][0],d+=(t[1][0]-d)/2+p):(d=g&&g._isUp?t[2][2]-p:t[2][1]+4*p,c&&(d+=15*(g._isUp?1:-1)));else if(l)d=t[0][1]+(o.data_labels.centered?0:f.height+5);else if(a)d=(t[0][0]+t[2][0]+.6*f.height)/2;else if(d=t[2][1],Vo(h)&&h>5&&(i.isLineType(e)||i.isScatterType(e))&&(p+=o.point_r/2.3),g<0||0===g&&!s.hasPositiveValue&&s.hasNegativeValue)d+=c?u?-3:-5:f.height+(u?-p:p);else{let t=2*-p;u?t=-p:i.isBubbleType(e)&&(t=p),c&&(t=u?10:15),d+=t}if(null===e.value&&!a){const t=f.height;ds.height&&(d=s.height-4)}return a&&!l||(d+=i.getCenteredTextPos(e,t,n,"y")),d+Ah.call(this,e,"y")},markOverlapped:function(t,e,n){var i=this;const r=e.$el.arcs.selectAll(n),s=r.filter(function(e){return o(this,i),e.data.id!==t}.bind(this)),a=r.filter(function(e){return o(this,i),e.data.id===t}.bind(this)),c=bs(a.node()),u=function(t,e){return o(this,i),Math.sqrt(Math.pow(t,2)+Math.pow(e,2))}.bind(this);a.node()&&s.each((function(){const t=bs(this),e=Rn(this),n=u(c.e,c.f)>u(t.e,t.f)?a:e,i=Math.ceil(Math.abs(c.e-t.e))=(this.config[e+"_label_threshold"]||0)}};function Eh(t,e){void 0===t&&(t="left");const n=Vo(e);let i;return i=t.indexOf("center")>-1?n?e/2:"middle":t.indexOf("right")>-1?n?e:"end":n?0:"start",i}var kh={initTitle:function(){const t=this.config,e=this.$el;if(t.title_text){e.title=e.svg.append("g");as(e.title.append("text").style("text-anchor",Eh(t.title_position)).attr("class",ea.title),t.title_text,[.3,1.5])}},redrawTitle:function(){const t=this,e=t.config,n=t.state.current,i=t.$el.title;if(i){const r=t.yForTitle.call(t);/g/i.test(i.node().tagName)?i.attr("transform","translate("+Eh(e.title_position,n.width)+", "+r+")"):i.attr("x",t.xForTitle.call(t)).attr("y",r)}},xForTitle:function(){const t=this,e=t.config,n=t.state.current,i=e.title_position||"left",r=t.getTextRect(t.$el.title,ea.title).width;let o;return/(right|center)/.test(i)?(o=n.width-r,i.indexOf("right")>=0?o=n.width-r-e.title_padding.right:i.indexOf("center")>=0&&(o=(n.width-r)/2)):o=e.title_padding.left||0,o},yForTitle:function(){const t=this;return(t.config.title_padding.top||0)+t.getTextRect(t.$el.title,ea.title).height},getTitlePadding:function(){return this.yForTitle()+(this.config.title_padding.bottom||0)}},Oh={initTooltip:function(){const t=this,e=t.config,n=t.$el;n.tooltip=Rn(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",na.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip:function(){var t=this;const e=this,n=e.config,i=e.$el,r=e.state,s=r.hasAxis,a=r.hasRadar;if(n.tooltip_init_show){var c,u;const r=!(s&&a);if(null!=(c=e.axis)&&c.isTimeSeries()&&Yo(n.tooltip_init_x)){const t=e.data.targets[0];let i,r;for(n.tooltip_init_x=ks.call(e,n.tooltip_init_x),i=0;(r=t.values[i])&&r.x-n.tooltip_init_x!=0;i++);n.tooltip_init_x=i}let l=e.data.targets.map(function(i){o(this,t);const s=r?0:n.tooltip_init_x;return e.addName(i.values[s])}.bind(this));r&&(l=[l[n.tooltip_init_x]]),i.tooltip.html(e.getTooltipHTML(l,null==(u=e.axis)?void 0:u.getXAxisTickFormat(),e.getDefaultValueFormat(),e.color)),n.tooltip_contents.bindto||i.tooltip.style("top",n.tooltip_init_position.top).style("left",n.tooltip_init_position.left).style("display",null)}},getTooltipHTML:function(){const t=this,e=t.api,n=t.config;return Uo(n.tooltip_contents)?n.tooltip_contents.bind(e).apply(void 0,arguments):t.getTooltipContent.apply(t,arguments)},getTooltipContent:function(t,e,n,i){var r=this;const s=this,a=s.api,c=s.config,u=s.state,l=s.$el;let h=["title","name","value"].map(function(t){o(this,r);const e=c["tooltip_format_"+t];return Uo(e)?e.bind(a):e}.bind(this)),f=h[0],d=h[1],g=h[2];f=f||e,d=d||function(t){return o(this,r),t}.bind(this),g=g||(u.hasTreemap||s.isStackNormalized()?function(t,e){return o(this,r),(100*e).toFixed(2)+"%"}.bind(this):n);const p=c.tooltip_order,v=function(t){return o(this,r),s.axis&&s.isBubbleZType(t)?s.getBubbleZData(t.value,"z"):s.getBaseValue(t)}.bind(this),y=s.levelColor?function(t){return o(this,r),s.levelColor(t.value)}.bind(this):function(t){return o(this,r),i(t)}.bind(this),b=c.tooltip_contents,x=b.template,m=s.mapToTargetIds();if(null===p&&c.data_groups.length){const e=s.orderTargets(s.data.targets).map(function(t){return o(this,r),t.id}.bind(this)).reverse();t.sort(function(t,n){o(this,r);let i=t?t.value:null,s=n?n.value:null;return i>0&&s>0&&(i=t.id?e.indexOf(t.id):null,s=n.id?e.indexOf(n.id):null),i-s}.bind(this))}else/^(asc|desc)$/.test(p)?t.sort(function(t,e){o(this,r);const n=t?v(t):null,i=e?v(e):null;return"asc"===p?n-i:i-n}.bind(this)):Uo(p)&&t.sort(p.bind(a));const _=s.getTooltipContentTemplate(x),T=t.length;let w,A,S,E,k;for(k=0;k'+t+"":""})}if(!A.ratio&&l.arcs&&(S=["arc",s.$el.arcs.select("path."+Ls.arc+"-"+A.id).data()[0]],A.ratio=s.getRatio.apply(s,S)),S=[A.ratio,A.id,A.index,t],E=ss(g.apply(void 0,[v(A)].concat(S))),s.isAreaRangeType(A)){const t=["high","low"].map(function(t){return o(this,r),ss(g.apply(void 0,[s.getRangedData(A,t)].concat(S)))}.bind(this));E="Mid: "+E+" High: "+t[0]+" Low: "+t[1]}else if(s.isCandlestickType(A)){const t=["open","high","low","close","volume"].map(function(t){return o(this,r),ss(g.apply(void 0,[s.getRangedData(A,t,"candlestick")].concat(S)))}.bind(this)),e=t[0],n=t[1],i=t[2],a=t[3],c=t[4];E="Open: "+e+" High: "+n+" Low: "+i+" Close: "+a+(c?" Volume: "+c:"")}else if(s.isBarRangeType(A)){const t=A.value,e=t[0],n=t[1];E=g(e)+" ~ "+g(n)}if(void 0!==E){if(null===A.name)continue;const t=ss(d.apply(void 0,[A.name].concat(S))),e=y(A),n={CLASS_TOOLTIP_NAME:na.tooltipName+s.getTargetSelectorSuffix(A.id),COLOR:x||!s.patterns?e:'',NAME:t,VALUE:E};if(x&&ns(b.text)){const t=m.indexOf(A.id);Object.keys(b.text).forEach(function(e){o(this,r),n[e]=b.text[e][t]}.bind(this))}w+=Es(_[1],n)}}return w+""},getTooltipContentTemplate:function(t){return(t||'\n\t\t\t\t{=TITLE}\n\t\t\t\t{{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}}\n\t\t\t
'+(this.patterns?"{=COLOR}":'')+'{=NAME}{=VALUE}
').replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},setTooltipPosition:function(t,e){var n=this;const i=this,r=i.config,s=i.scale,a=i.state,c=i.$el,u=c.eventRect,l=c.tooltip,h=r.tooltip_contents.bindto,f=l.datum();if(!h&&f){var d,g;const c=us(a.event,null!=e?e:null==u?void 0:u.node()),h={x:c[0],y:c[1]};s.x&&f&&"x"in f&&(h.xAxis=s.x(f.x));const p=f.width,v=void 0===p?0:p,y=f.height,b=void 0===y?0:y,x=null!=(d=null==(g=r.tooltip_position)?void 0:g.bind(i.api)(null!=t?t:JSON.parse(f.current),v,b,null==u?void 0:u.node(),h))?d:i.getTooltipPosition.bind(i)(v,b,h);["top","left"].forEach(function(t){o(this,n);const e=x[t];l.style(t,e+"px"),"left"!==t||f.xPosInPercent||(f.xPosInPercent=e/a.current.width*100)}.bind(this))}},getTooltipPosition:function(t,e,n){var i=this;const r=this,s=r.config,a=r.scale,c=r.state,u=c,l=u.width,h=u.height,f=u.current,d=u.isLegendRight,g=u.inputType,p=r.hasType("gauge")&&!s.gauge_fullCircle,v=c.hasTreemap,y=s.axis_rotated,b=r.getSvgLeft(!0);let x=b+f.width-r.getCurrentPaddingRight();const m=r.getCurrentPaddingLeft(!0);let _=n.x,T=n.y;if(r.hasArcType()){"touch"===g||r.hasType("radar")||(T+=p?h:h/2,_+=(l-(d?r.getLegendWidth():0))/2)}else v||(y?(T=n.xAxis+20,_+=b,x-=b):(T-=5,_=b+m+20+(a.zoom?_:n.xAxis)));if(_+t+15>x&&(_-=y?t-m:t+(v?0:m)),T+e>f.height){T-=p?3*e:e+(v?0:30)}const w={top:T,left:_};return Object.keys(w).forEach(function(t){o(this,i),w[t]<0&&(w[t]=0)}.bind(this)),w},showTooltip:function(t,e){var n=this;const i=this,r=i.config,s=i.$el.tooltip,a=t.filter(function(t){return o(this,n),t&&$o(i.getBaseValue(t))}.bind(this));if(!s||0===a.length||!r.tooltip_show)return;let c=s.datum();const u=JSON.stringify(t);if(!c||c.current!==u){const e=t.concat().sort()[0],n=e.index,o=e.x;rs(r.tooltip_onshow,i.api,t),s.html(i.getTooltipHTML(t,i.axis?i.axis.getXAxisTickFormat():i.categoryName.bind(i),i.getDefaultValueFormat(),i.color)).style("display",null).style("visibility",null).datum(c={index:n,x:o,current:u,width:s.property("offsetWidth"),height:s.property("offsetHeight")}),rs(r.tooltip_onshown,i.api,t),i._handleLinkedCharts(!0,n)}i.setTooltipPosition(a,e)},bindTooltipResizePos:function(){var t=this;const e=this,n=e.resizeFunction,i=e.state,r=e.$el.tooltip;n.add(function(){if(o(this,t),"block"===r.style("display")){const t=i.current,e=r.datum(),n=e.width,o=e.xPosInPercent;let s=t.width/100*o;const a=t.width-(s+n);a<0&&(s+=a),r.style("left",s+"px")}}.bind(this))},hideTooltip:function(t){const e=this,n=e.api,i=e.config,r=e.$el.tooltip;if(r&&"none"!==r.style("display")&&(!i.tooltip_doNotHide||t)){const t=JSON.parse(r.datum().current);rs(i.tooltip_onhide,n,t),r.style("display","none").style("visibility","hidden").datum(null),rs(i.tooltip_onhidden,n,t)}},_handleLinkedCharts:function(t,e){var n=this;const i=this,r=i.charts,s=i.config,a=i.state.event;if(null!=a&&a.isTrusted&&s.tooltip_linked&&r.length>1){const a=s.tooltip_linked_name;r.filter(function(t){return o(this,n),t!==i.api}.bind(this)).forEach(function(i){o(this,n);const r=i.internal,s=r.config,c=r.$el,u=s.tooltip_linked,l=s.tooltip_linked_name,h=Fn.body.contains(c.chart.node());if(u&&a===l&&h){const n=c.tooltip.data()[0],r=e!==(null==n?void 0:n.index);try{i.tooltip[t&&r?"show":"hide"]({index:e})}catch(t){}}}.bind(this))}},updateTooltipOnRedraw:function(t,e){var n=this;const i=this,r=i.config,s=i.$el,a=s.eventRect,c=s.svg,u=s.tooltip,l=i.state,h=l.event,f=l.hasAxis,d=l.hasRadar,g=l.hasTreemap;if("block"===(null==u?void 0:u.style("display"))&&h){var p;const s=null!=t?t:null==(p=d?c:a)?void 0:p.node();if(f||d)if(i.isMultipleX())i.selectRectForMultipleXs(s,!1);else{const t=null!=e?e:i.getDataIndexFromEvent(h);-1===e?i.api.tooltip.hide():(i.selectRectForSingle(s,t),i.setExpand(t,null,!0))}else{const t=h.clientX,e=h.clientY;setTimeout(function(){o(this,n);let r=Fn.elementFromPoint(t,e);const s=Rn(r).datum();if(s){const t=i.hasArcType()?i.convertToArcData(i.updateAngle(s)):null==s?void 0:s.data;g&&(r=c.node()),t&&i.showTooltip([t],r)}else i.api.tooltip.hide()}.bind(this),r.transition_duration)}}}},Mh={getTranslate:function(t,e){void 0===e&&(e=0);const n=this,i=n.config,r=n.state,o=i.axis_rotated;let s,a,c=0;if(e&&/^(x|y2?)$/.test(t)&&(c=n.getAxisSize(t)*e),"main"===t)s=Zo(r.margin.left),a=Zo(r.margin.top);else if("context"===t)s=Zo(r.margin2.left),a=Zo(r.margin2.top);else if("legend"===t)s=r.margin3.left,a=r.margin3.top;else if("x"===t)s=o?-c:0,a=o?0:r.height+c;else if("y"===t)s=o?0:-c,a=o?r.height+c:0;else if("y2"===t)s=o?0:r.width+c,a=o&&c?1-c:0;else if("subX"===t)s=0,a=o?0:r.height2;else if("arc"===t)s=r.arcWidth/2,a=r.arcHeight/2;else if("polar"===t)s=r.arcWidth/2,a=r.arcHeight/2;else if("radar"===t){const t=n.getRadarSize()[0];s=r.width/2-t,a=Zo(r.margin.top)}return"translate("+s+", "+a+")"},transformMain:function(t,e){const n=this,i=n.$el.main,r=n.$T,o=null!=e&&e.axisX?e.axisX:r(i.select("."+Ns.axisX),t),s=null!=e&&e.axisY?e.axisY:r(i.select("."+Ns.axisY),t),a=null!=e&&e.axisY2?e.axisY2:r(i.select("."+Ns.axisY2),t);r(i,t).attr("transform",n.getTranslate("main")),o.attr("transform",n.getTranslate("x")),s.attr("transform",n.getTranslate("y")),a.attr("transform",n.getTranslate("y2")),i.select("."+Ls.chartArcs).attr("transform",n.getTranslate("arc"))},transformAll:function(t,e){const n=this,i=n.config,r=n.state,o=r.hasAxis,s=r.hasTreemap,a=n.$el;s||n.transformMain(t,e),o&&i.subchart_show&&n.transformContext(t,e),a.legend&&n.transformLegend(t)}},Rh={isValidChartType:function(t){return!!(t&&Object.values(jn).indexOf(t)>-1)},setTargetType:function(t,e){var n=this;const i=this,r=i.config,s=i.state.withoutFadeIn;i.mapToTargetIds(t).forEach(function(t){o(this,n),s[t]=e===r.data_types[t],r.data_types[t]=e}.bind(this)),t||(r.data_type=e)},updateTypesElements:function(){var t=this;const e=this,n=e.state.current;Object.keys(jn).forEach(function(i){o(this,t);const r=jn[i],s=e.hasType(r,null,!0),a=n.types.indexOf(r);-1===a&&s?n.types.push(r):a>-1&&!s&&n.types.splice(a,1)}.bind(this)),e.setChartElements()},hasType:function(t,e,n){var i,r=this;void 0===n&&(n=!1);const s=this,a=s.config,c=s.state.current,u=a.data_types,l=e||s.data.targets;let h=!1;return!n&&(null==(i=c.types)?void 0:i.indexOf(t))>-1?h=!0:null!=l&&l.length?l.forEach(function(e){o(this,r);const n=u[e.id];(n===t||!n&&"line"===t)&&(h=!0)}.bind(this)):Object.keys(u).length?Object.keys(u).forEach(function(e){o(this,r),u[e]===t&&(h=!0)}.bind(this)):h=a.data_type===t,h},hasTypeOf:function(t,e,n){var i=this;return void 0===n&&(n=[]),t in Xn&&!Xn[t].filter(function(t){return o(this,i),-1===n.indexOf(t)}.bind(this)).every(function(t){return o(this,i),!this.hasType(t,e)}.bind(this))},isTypeOf:function(t,e){const n=Yo(t)?t:t.id,i=this.config.data_types[n]||this.config.data_type;return es(e)?e.indexOf(i)>=0:i===e},hasPointType:function(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType:function(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge:function(){return this.hasType("gauge")&&"multi"===this.config.gauge_type},isLineType:function(t){const e=Yo(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,Xn.Line)},isStepType:function(t){return this.isTypeOf(t,Xn.Step)},isSplineType:function(t){return this.isTypeOf(t,Xn.Spline)},isAreaType:function(t){return this.isTypeOf(t,Xn.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,Xn.AreaRange)},isBarType:function(t){return this.isTypeOf(t,"bar")},isBubbleType:function(t){return this.isTypeOf(t,"bubble")},isCandlestickType:function(t){return this.isTypeOf(t,"candlestick")},isScatterType:function(t){return this.isTypeOf(t,"scatter")},isTreemapType:function(t){return this.isTypeOf(t,"treemap")},isPieType:function(t){return this.isTypeOf(t,"pie")},isGaugeType:function(t){return this.isTypeOf(t,"gauge")},isDonutType:function(t){return this.isTypeOf(t,"donut")},isPolarType:function(t){return this.isTypeOf(t,"polar")},isRadarType:function(t){return this.isTypeOf(t,"radar")},isArcType:function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint:function(t){const e=this.config,n=e.point_pattern;let i=!1;return i="circle"===(null==t?void 0:t.tagName)||"circle"===e.point_type&&(!n||es(n)&&0===n.length),i},lineData:function(t){return this.isLineType(t)?[t]:[]},arcData:function(t){return this.isArcType(t.data)?[t]:[]},labelishData:function(t){var e=this;return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(function(t){return o(this,e),Vo(t.value)||!!t.value}.bind(this)):[]},barLineBubbleData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}};let Ch=function(){function t(t){this.api=void 0,this.config=void 0,this.cache=void 0,this.$el=void 0,this.state=void 0,this.charts=void 0,this.data={xs:{},targets:[]},this.axis=void 0,this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.color=void 0,this.patterns=void 0,this.levelColor=void 0,this.point=void 0,this.brush=void 0,this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};const e=this;e.api=t,e.config=new ma,e.cache=new Ca;const n=new aa;e.$el=n.getStore("element"),e.state=n.getStore("state"),e.$T=e.$T.bind(e)}var e=t.prototype;return e.$T=function(t,e,n){const i=this.config,r=this.state,o=i.transition_duration,s=i.subchart_show;let a=t;if(a){"tagName"in a&&(a=Rn(a));a=(!1!==e&&o||e)&&(!r.zooming||r.dragging)&&!r.resizing&&r.rendered&&!s?a.transition(n).duration(o):a}return a},e.beforeInit=function(){const t=this;t.callPluginHook("$beforeInit"),rs(t.config.onbeforeinit,t.api)},e.afterInit=function(){const t=this;t.callPluginHook("$afterInit"),rs(t.config.onafterinit,t.api)},e.init=function(){const t=this,e=t.config,n=t.state,i=t.$el,r=e.boost_useCssRule;if(Rs(t),n.hasRadar=!n.hasAxis&&t.hasType("radar"),n.hasTreemap=!n.hasAxis&&t.hasType("treemap"),n.hasAxis=!t.hasArcType()&&!n.hasTreemap,n.datetimeId="bb-"+ +new Date*fs(),r){const t=Fn.createElement("style");t.type="text/css",Fn.head.appendChild(t),n.style={rootSelctor:"."+n.datetimeId,sheet:t.sheet},i.style=t}const o={element:e.bindto,classname:"bb"};ns(e.bindto)&&(o.element=e.bindto.element||"#chart",o.classname=e.bindto.classname||o.classname),i.chart=Uo(o.element.node)?e.bindto.element:Rn(o.element||[]),i.chart.empty()&&(i.chart=Rn(Fn.body.appendChild(Fn.createElement("div")))),i.chart.html("").classed(o.classname,!0).classed(n.datetimeId,r).style("position","relative"),t.initParams(),t.initToRender()},e.initToRender=function(t){var e=this;const n=this,i=n.config,r=n.state,s=n.$el.chart,a=function(){return o(this,e),"none"===s.style("display")||"hidden"===s.style("visibility")}.bind(this),c=i.render.lazy||a(),u=In.MutationObserver;c&&u&&!1!==i.render.observe&&!t&&new u(function(t,i){o(this,e),a()||(i.disconnect(),r.rendered||n.initToRender(!0))}.bind(this)).observe(s.node(),{attributes:!0,attributeFilter:["class","style"]}),c&&!t||n.convertData(i,function(t){o(this,e),n.initWithData(t),n.afterInit()}.bind(this))},e.initParams=function(){var t=this;const e=this,n=e.config,i=e.format,r=e.state,s=n.axis_rotated;if(e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),!1===n.padding&&(n.axis_x_show=!1,n.axis_y_show=!1,n.axis_y2_show=!1,n.subchart_show=!1),e.hasPointType()&&(e.point=e.generatePoint()),r.hasAxis){e.initClip(),i.extraLineClasses=e.generateExtraLineClass(),i.dataTime=n.data_xLocaltime?Y:G,i.axisTime=n.axis_x_localtime?U:V;const r=e.config.zoom_enabled&&"drag"===e.config.zoom_type;i.defaultAxisTime=function(n){o(this,t);const s=e.scale,a=s.x,c=s.zoom,u=r?c:c&&a.orgDomain().toString()!==c.domain().toString(),l=(n.getMilliseconds()?".%L":n.getSeconds()&&".:%S")||n.getMinutes()&&"%I:%M"||n.getHours()&&"%I %p"||1!==n.getDate()&&"%b %d"||u&&1===n.getDate()&&"%b'%y"||n.getMonth()&&"%-m/%-d"||"%Y";return i.axisTime(l)(n)}.bind(this)}r.isLegendRight="right"===n.legend_position,r.isLegendInset="inset"===n.legend_position,r.isLegendTop="top-left"===n.legend_inset_anchor||"top-right"===n.legend_inset_anchor,r.isLegendLeft="top-left"===n.legend_inset_anchor||"bottom-left"===n.legend_inset_anchor,r.rotatedPadding.top=e.getResettedPadding(r.rotatedPadding.top),r.rotatedPadding.right=s&&!n.axis_x_show?0:30,r.inputType=function(t,e){var n=this;const i=In.DocumentTouch,r=In.matchMedia,s=In.navigator;let a=!1;if(e)if(s&&"maxTouchPoints"in s)a=s.maxTouchPoints>0;else if("ontouchmove"in In||i&&Fn instanceof i)a=!0;else if(null!=r&&r("(pointer:coarse)").matches)a=!0;else{const t=s.userAgent;a=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(t)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(t)}return(t&&["any-hover:hover","any-pointer:fine"].some(function(t){return o(this,n),null==r?void 0:r("("+t+")").matches}.bind(this))?"mouse":a&&"touch")||"mouse"}(n.interaction_inputType_mouse,n.interaction_inputType_touch)},e.initWithData=function(t){var e=this;const n=this,i=n.config,r=n.scale,s=n.state,a=n.$el,c=n.org,u=s,l=u.hasAxis,h=u.hasTreemap,f=i.interaction_enabled,d=n.hasType("polar");if(l&&(n.axis=n.getAxisInstance(),i.zoom_enabled&&n.initZoom()),n.data.xs={},n.data.targets=n.convertDataToTargets(t),i.data_filter&&(n.data.targets=n.data.targets.filter(i.data_filter.bind(n.api))),i.data_hide&&n.addHiddenTargetIds(!0===i.data_hide?n.mapToIds(n.data.targets):i.data_hide),i.legend_hide&&n.addHiddenLegendIds(!0===i.legend_hide?n.mapToIds(n.data.targets):i.legend_hide),n.updateSizes(),n.updateScales(!0),l){const t=r.x,e=r.y,o=r.y2,s=r.subX,a=r.subY,u=r.subY2;t&&(t.domain(Ts(n.getXDomain(n.data.targets),!i.axis_x_inverted)),s.domain(t.domain()),c.xDomain=t.domain()),e&&(e.domain(n.getYDomain(n.data.targets,"y")),a.domain(e.domain())),o&&(o.domain(n.getYDomain(n.data.targets,"y2")),u&&u.domain(o.domain()))}if(a.svg=a.chart.append("svg").style("overflow","hidden").style("display","block"),f&&s.inputType){const t="touch"===s.inputType,e=i.onclick,r=i.onover,o=i.onout;a.svg.on("click",(null==e?void 0:e.bind(n.api))||null).on(t?"touchstart":"mouseenter",(null==r?void 0:r.bind(n.api))||null).on(t?"touchend":"mouseleave",(null==o?void 0:o.bind(n.api))||null)}i.svg_classname&&a.svg.attr("class",i.svg_classname);const g=Uo(i.color_tiles)&&n.patterns;(l||g||d||h||i.data_labels_backgroundColors)&&(a.defs=a.svg.append("defs"),l&&["id","idXAxis","idYAxis","idGrid"].forEach(function(t){o(this,e),n.appendClip(a.defs,s.clip[t])}.bind(this)),n.generateDataLabelBackgroundColorFilter(),g&&n.patterns.forEach(function(t){var n=this;return o(this,e),a.defs.append(function(){return o(this,n),t.node}.bind(this))}.bind(this))),n.updateSvgSize(),n.bindResize();const p=a.svg.append("g").classed(Ps.main,!0).attr("transform",h?null:n.getTranslate("main"));var v;(a.main=p,i.subchart_show&&n.initSubchart(),i.tooltip_show&&n.initTooltip(),i.title_text&&n.initTitle(),!h&&i.legend_show&&n.initLegend(),i.data_empty_label_text&&p.append("text").attr("class",ea.text+" "+Ps.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),l&&(i.regions.length&&n.initRegion(),i.clipPath||n.axis.init()),p.append("g").classed(Ps.chart,!0).attr("clip-path",l?s.clip.path:null),n.callPluginHook("$init"),n.initChartElements(),l)&&(f&&(null==n.initEventRect||n.initEventRect()),n.initGrid(),i.clipPath&&(null==(v=n.axis)||v.init()));if(n.updateTargets(n.data.targets),n.updateDimension(),rs(i.oninit,n.api),n.setBackground(),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),i.data_onmin||i.data_onmax){const t=n.getMinMaxData();rs(i.data_onmin,n.api,t.min),rs(i.data_onmax,n.api,t.max)}i.tooltip_show&&n.initShowTooltip(),s.rendered=!0},e.initChartElements=function(){var t=this;const e=this,n=e.state,i=n.hasAxis,r=n.hasRadar,s=n.hasTreemap,a=[];if(i){const n=["bar","bubble","candlestick","line"];e.config.bar_front&&n.push(n.shift()),n.forEach(function(n){o(this,t);const i=vs(n);("line"===n&&e.hasTypeOf(i)||e.hasType(n))&&a.push(i)}.bind(this))}else if(s)a.push("Treemap");else{const t=e.hasType("polar");r||a.push("Arc","Pie"),e.hasType("gauge")?a.push("Gauge"):r?a.push("Radar"):t&&a.push("Polar")}a.forEach(function(n){o(this,t),e["init"+n]()}.bind(this)),ts(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()},e.setChartElements=function(){const t=this.$el,e=t.chart,n=t.svg,i=t.defs,r=t.main,o=t.tooltip,s=t.legend,a=t.title,c=t.grid,u=t.needle,l=t.arcs,h=t.circle,f=t.bar,d=t.candlestick,g=t.line,p=t.area,v=t.text;this.api.$={chart:e,svg:n,defs:i,main:r,tooltip:o,legend:s,title:a,grid:c,arc:l,circles:h,bar:{bars:f},candlestick:d,line:{lines:g,areas:p},needle:u,text:{texts:v}}},e.setBackground=function(){const t=this,e=t.config.background,n=t.state,i=t.$el.svg;if(ts(e)){const t=i.select("g").insert(e.imgUrl?"image":"rect",":first-child");e.imgUrl?t.attr("href",e.imgUrl):e.color&&t.style("fill",e.color).attr("clip-path",n.clip.path),t.attr("class",e.class||null).attr("width","100%").attr("height","100%")}},e.updateTargets=function(t){var e=this;const n=this,i=n.state,r=i.hasAxis,s=i.hasRadar,a=i.hasTreemap,c=function(i){return o(this,e),n["updateTargetsFor"+i](t.filter(n["is"+i+"Type"].bind(n)))}.bind(this);if(n.updateTargetsForText(t),r)["bar","candlestick","line"].forEach(function(t){o(this,e);const i=vs(t);("line"===t&&n.hasTypeOf(i)||n.hasType(t))&&c(i)}.bind(this)),n.updateTargetsForSubchart&&n.updateTargetsForSubchart(t);else if(n.hasArcType(t)){let t="Arc";s?t="Radar":n.hasType("polar")&&(t="Polar"),c(t)}else a&&c("Treemap");const u=n.hasType("bubble")||n.hasType("scatter");u&&(null==n.updateTargetForCircle||n.updateTargetForCircle()),n.filterTargetsToShowAtInit(u)},e.filterTargetsToShowAtInit=function(t){var e=this;void 0===t&&(t=!1);const n=this,i=n.$el.svg,r=n.$T;let s="."+Ps.target;t&&(s+=", ."+js.chartCircles+" > ."+js.circles),r(i.selectAll(s).filter(function(t){return o(this,e),n.isTargetToShow(t.id)}.bind(this))).style("opacity",null)},e.getWithOption=function(t){var e=this;const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};return Object.keys(n).forEach(function(i){o(this,e);let r=n[i];Yo(r)&&(r=n[r]),n[i]=is(t,"with"+i,r)}.bind(this)),n},e.initialOpacity=function(t){const e=this.state.withoutFadeIn;return null!==this.getBaseValue(t)&&e[t.id]?null:"0"},e.bindResize=function(){var t=this;const e=this,n=e.config,i=e.state,r=function(t){var e=this;const n=[];let i;const r=function(){var e=this;r.clear(),!1===t?zn(function(){var t=this;o(this,e),n.forEach(function(e){return o(this,t),e()}.bind(this))}.bind(this),{timeout:200}):i=Ia(function(){var t=this;o(this,e),n.forEach(function(e){return o(this,t),e()}.bind(this))}.bind(this),Vo(t)?t:200)};return r.clear=function(){o(this,e),i&&(Pa(i),i=null)}.bind(this),r.add=function(t){return o(this,e),n.push(t)}.bind(this),r.remove=function(t){return o(this,e),n.splice(n.indexOf(t),1)}.bind(this),r}(n.resize_timer),s=[];s.push(function(){return o(this,t),rs(n.onresize,e.api)}.bind(this)),n.resize_auto&&s.push(function(){o(this,t),i.resizing=!0,n.legend_show&&(e.updateSizes(),e.updateLegend()),e.api.flush(!1)}.bind(this)),s.push(function(){o(this,t),rs(n.onresized,e.api),i.resizing=!1}.bind(this)),s.forEach(function(e){return o(this,t),r.add(e)}.bind(this)),e.resizeFunction=r,In.addEventListener("resize",e.resizeFunction=r)},e.callPluginHook=function(t){for(var e=this,n=arguments.length,i=Array(n>1?n-1:0),r=1;r\n\t\t\t\n\t\t\t\t'+d+"\n\t\t\t\t"+h.replace(/(url\()[^#]+/g,"$1")+"\n\t\t\t";return"data:image/svg+xml;base64,"+Nh(g)}function Fh(t){var e=this;const n=t.getBoundingClientRect(),i=n.left,r=n.top,s=function(t){return o(this,e),t.textContent||t.childElementCount}.bind(this),a=[];return ys(t.querySelectorAll("text")).filter(s).forEach(function(t){var n=this;o(this,e);const c=function(t){var e;o(this,n);const s=In.getComputedStyle(t),a=s.fill,c=s.fontFamily,u=s.fontSize,l=s.textAnchor,h=s.transform,f=function(t,e){const n=e.top,i=e.left,r=t.getBBox(),o=r.x,s=r.y,a=t.getScreenCTM(),c=a.a,u=a.b,l=a.c,h=a.d,f=a.e,d=a.f,g=t.getBoundingClientRect(),p=g.width,v=g.height;return{x:c*o+l*s+f-i,y:u*o+h*s+d-n+(v-Math.round(v/4)),width:p,height:v}}(t,{left:i,top:r}),d=f.x,g=f.y,p=f.width,v=f.height;return(e={})[t.textContent]={x:d,y:g,width:p,height:v,fill:a,fontFamily:c,fontSize:u,textAnchor:l,transform:h},e}.bind(this);if(t.childElementCount>1)return ys(t.querySelectorAll("tspan")).filter(s).forEach(function(t){o(this,n),a.push(c(t))}.bind(this)),[];a.push(c(t))}.bind(this)),a}var jh={export:function(t,e){var n=this;const i=this.internal,r=i.state,s=i.$el,a=s.chart,c=s.svg,u=r.current,l=u.width,h=u.height,f=_s({width:l,height:h,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t),d=zh(a.node(),f,{width:l,height:h}),g=f.preserveFontStyle?Fh(c.node()):[];if(e&&Uo(e)){const t=new Image;t.crossOrigin="Anonymous",t.onload=function(){o(this,n);const i=Fn.createElement("canvas"),r=i.getContext("2d");i.width=f.width||l,i.height=f.height||h,r.drawImage(t,0,0),g.length&&(!function(t,e){var n=this;e.forEach(function(e){var i=this;o(this,n),Object.keys(e).forEach(function(n){var r=this;o(this,i);const s=e[n],a=s.x,c=s.y,u=s.width,l=s.height,h=s.fill,f=s.fontFamily,d=s.fontSize,g=s.transform;if(t.save(),t.font=d+" "+f,t.fillStyle=h,"none"===g)t.fillText(n,a,c);else{const e=g.replace(/(matrix|\(|\))/g,"").split(",");e.splice(4).every(function(t){return o(this,r),0==+t}.bind(this))?(e.push(a+u-u/4),e.push(c-l+l/3)):(e.push(a),e.push(c)),t.transform.apply(t,e),t.fillText(n,0,0)}t.restore()}.bind(this))}.bind(this))}(r,g),g.length=0),e.bind(this)(i.toDataURL(f.mimeType))}.bind(this),t.src=d}return d}},Bh={focus:function(t){var e=this;const n=this.internal,i=n.state,r=n.mapToTargetIds(t),s=n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),s.classed(Gs.focused,!0).classed(Gs.defocused,!1),n.hasArcType()&&!i.hasRadar&&(n.expandArc(r),n.hasType("gauge")&&n.markOverlapped(t,n,"."+$s.gaugeValue)),n.toggleFocusLegend(r,!0),i.focusedTargetIds=r,i.defocusedTargetIds=i.defocusedTargetIds.filter(function(t){return o(this,e),r.indexOf(t)<0}.bind(this))},defocus:function(t){var e=this;const n=this.internal,i=n.state,r=n.mapToTargetIds(t);n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n))).classed(Gs.focused,!1).classed(Gs.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(r),n.hasType("gauge")&&n.undoMarkOverlapped(n,"."+$s.gaugeValue)),n.toggleFocusLegend(r,!1),i.focusedTargetIds=i.focusedTargetIds.filter(function(t){return o(this,e),r.indexOf(t)<0}.bind(this)),i.defocusedTargetIds=r},revert:function(t){const e=this.internal,n=e.config,i=e.state,r=e.$el,o=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(o)).classed(Gs.focused,!1).classed(Gs.defocused,!1),e.hasArcType(null,["polar"])&&e.unexpandArc(o),n.legend_show&&(e.showLegend(o.filter(e.isLegendToShow.bind(e))),r.legend.selectAll(e.selectorLegends(o)).filter((function(){return Rn(this).classed(Gs.legendItemFocused)})).classed(Gs.legendItemFocused,!1)),i.focusedTargetIds=[],i.defocusedTargetIds=[]}};var Xh={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},$h={load:function(t){var e=this;const n=this.internal,i=n.config;t.xs&&n.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(n){o(this,e),i.data_classes[n]=t.classes[n]}.bind(this)),"categories"in t&&n.axis.isCategorized()&&(i.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(n){o(this,e),i.data_axes[n]=t.axes[n]}.bind(this)),"colors"in t&&Object.keys(t.colors).forEach(function(n){o(this,e),i.data_colors[n]=t.colors[n]}.bind(this)),"unload"in t&&!1!==t.unload?n.unload(n.mapToTargetIds(!0===t.unload?null:t.unload),function(){var i=this;o(this,e),zn(function(){return o(this,i),n.loadFromArgs(t)}.bind(this))}.bind(this)):n.loadFromArgs(t)},unload:function(t){var e=this;const n=this.internal;let i=t||{};Qo(i)&&this.tooltip.hide(),es(i)?i={ids:i}:Yo(i)&&(i={ids:[i]});const r=n.mapToTargetIds(i.ids);n.unload(r,function(){o(this,e),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.cache.remove(r),oc.call(n,i.done,i.resizeAfter)}.bind(this))}};function Uh(t,e,n){var i=this;const r=this.internal,s=r.mapToTargetIds(e),a=r.state.hiddenTargetIds.map(function(t){return o(this,i),s.indexOf(t)>-1&&t}.bind(this)).filter(Boolean);r.state.toggling=!0,r[(t?"remove":"add")+"HiddenTargetIds"](s);const c=r.$el.svg.selectAll(r.selectorTargets(s)),u=t?null:"0";t&&a.length&&(c.style("display",null),rs(r.config.data_onshown,this,a)),r.$T(c).style("opacity",u,"important").call(os,function(){o(this,i),t||0!==a.length||(c.style("display","none"),rs(r.config.data_onhidden,this,s)),c.style("opacity",u)}.bind(this)),n.withLegend&&r[(t?"show":"hide")+"Legend"](s),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),r.state.toggling=!1}var Yh={show:function(t,e){void 0===e&&(e={}),Uh.call(this,!0,t,e)},hide:function(t,e){void 0===e&&(e={}),Uh.call(this,!1,t,e)},toggle:function(t,e){var n=this;void 0===e&&(e={});const i=this.internal,r={show:[],hide:[]};i.mapToTargetIds(t).forEach(function(t){return o(this,n),r[i.isTargetToShow(t)?"hide":"show"].push(t)}.bind(this)),r.show.length&&this.show(r.show,e),r.hide.length&&setTimeout(function(){return o(this,n),this.hide(r.hide,e)}.bind(this),0)}};const Vh={show:function(t){var e=this;const n=this.internal,i=n.$el,r=n.config,s=n.state,a=s.eventReceiver,c=s.hasTreemap,u=s.inputType;let l,h;if(t.mouse&&(h=t.mouse),t.data){var f;const e=t.data,o=null==(f=n.getYScaleById(e.id))?void 0:f(e.value);if(c&&e.id)a.rect=i.main.select(""+n.selectorTarget(e.id,void 0,"rect"));else if(n.isMultipleX())h=[n.xx(e),o];else{var d,g;r.tooltip_grouped||(h=[0,o]),l=null!=(d=e.index)?d:n.hasArcType()&&e.id?null==(g=n.getArcElementByIdOrIndex(e.id))?void 0:g.datum().index:n.getIndexByX(e.x)}}else Ho(t.x)?l=n.getIndexByX(t.x):Ho(t.index)&&(l=t.index);("mouse"===u?["mouseover","mousemove"]:["touchstart"]).forEach(function(t){o(this,e),n.dispatchEvent(t,l,h)}.bind(this))},hide:function(){var t=this;const e=this.internal,n=e.state.inputType,i=e.$el.tooltip,r=null==i?void 0:i.datum();if(r){const i=JSON.parse(r.current)[0].index;("mouse"===n?["mouseout"]:["touchend"]).forEach(function(n){o(this,t),e.dispatchEvent(n,i)}.bind(this))}"touch"===n&&e.callOverOutForTouch(),e.hideTooltip(!0),null==e.hideGridFocus||e.hideGridFocus(),null==e.unexpandCircles||e.unexpandCircles(),null==e.expandBarTypeShapes||e.expandBarTypeShapes(!1)}};var Gh={tooltip:Vh};let Hh=function t(e){this.plugins=[],this.internal=void 0;const n=new Ch(this);this.internal=n,function t(e,n,i){var r=this;Object.keys(e).forEach(function(s){o(this,r);const a=Uo(e[s]),c=n!==i,u=ts(e[s]),l=u&&Object.keys(e[s]).length>0;n[s]=a&&(!c&&l||c)?e[s].bind(i):u&&!a?{}:e[s],l&&t(e[s],n[s],i)}.bind(this))}(t.prototype,this,this),Ih.call(n,e),n.beforeInit(),n.init()};function Wh(t,e,n){var i=this;const r=t.config,s=function(t,n){o(this,i);const s=Vo(n)?n:!1===n?void 0:null;null!==s&&(r["axis_"+t+"_"+e]=s)}.bind(this);Ho(n)&&(Jo(n)?Object.keys(n).forEach(function(t){o(this,i),s(t,n[t])}.bind(this)):(Vo(n)||!1===n)&&["y","y2"].forEach(function(t){o(this,i),s(t,n)}.bind(this)),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function qh(t,e){const n=t.config;return{x:n["axis_x_"+e],y:n["axis_y_"+e],y2:n["axis_y2_"+e]}}ps(Hh.prototype,[Ph,{color:function(t){return this.internal.color(t)}},Dh,jh,Bh,Xh,$h,Yh,Gh]);const Zh={labels:function(t){var e=this;const n=this.internal;let i;return t&&(Object.keys(t).forEach(function(i){o(this,e),n.axis.setLabelText(i,t[i])}.bind(this)),n.axis.updateLabels()),["x","y","y2"].forEach(function(t){o(this,e);const r=n.axis.getLabelText(t);r&&(i||(i={}),i[t]=r)}.bind(this)),i},min:function(t){const e=this.internal;return $o(t)||!1===t?Wh(e,"min",t):qh(e,"min")},max:function(t){const e=this.internal;return $o(t)||!1===t?Wh(e,"max",t):qh(e,"max")},range:function(t){const e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};{const n=t.min,i=t.max;Ho(i)&&e.max(i),Ho(n)&&e.min(n)}}};var Kh={axis:Zh};function Jh(t,e){const n=this.internal,i=n.config,r=i.transition_duration&&Os(),o="grid_"+e+"_lines";return t?(i[o]=t,n.updateGrid(),n.redrawGrid(r),i[o]):i[o]}function Qh(t,e){return Jh.bind(this)(this.internal.config["grid_"+e+"_lines"].concat(t||[]),e)}function tf(t,e){this.internal.removeGridLines(t,e)}const ef=function(t){return Jh.bind(this)(t,"x")};ps(ef,{add:function(t){return Qh.bind(this)(t,"x")},remove:function(t){return tf.bind(this)(t,!0)}});const nf=function(t){return Jh.bind(this)(t,"y")};ps(nf,{add:function(t){return Qh.bind(this)(t,"y")},remove:function(t){return tf.bind(this)(t,!1)}});var rf={xgrids:ef,ygrids:nf},of={groups:function(t){const e=this.internal,n=e.config;return Go(t)||(n.data_groups=t,e.redraw()),n.data_groups}};function sf(t,e){void 0===e&&(e=!1);const n=this.internal,i=n.config,r=i.transition_duration&&Os();return t?(i.regions=e?i.regions.concat(t):t,n.updateRegion(),n.redrawRegion(r),e?i.regions:t):i.regions}const af=function(t){return sf.bind(this)(t)};ps(af,{add:function(t){return sf.bind(this)(t,!0)},remove:function(t){var e=this;const n=this.internal,i=n.config,r=n.$T,s=t||{},a=is(s,"classes",[Ks.region]);let c=n.$el.main.select("."+Ks.regions).selectAll(a.map(function(t){return o(this,e),"."+t}.bind(this)));return r(c).style("opacity","0").remove(),c=i.regions,Object.keys(s).length?(c=c.filter(function(t){var n=this;o(this,e);let i=!1;return!t.class||(t.class.split(" ").forEach(function(t){o(this,n),a.indexOf(t)>=0&&(i=!0)}.bind(this)),!i)}.bind(this)),i.regions=c):i.regions=[],c}});var cf={regions:af},uf={x:function(t){const e=this.internal,n=e.axis,i=e.data,r=n.isCustomX()&&n.isCategorized();return es(t)&&(r?this.categories(t):(e.updateTargetX(i.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),r?this.categories():i.xs},xs:function(t){const e=this.internal;return ns(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},lf={flow:function(t){var e=this;const n=this.internal;let i;(t.json||t.rows||t.columns)&&n.convertData(t,function(r){o(this,e),i=r,function(){var e=this;let r,s,a,c=0,u=0;if(n.state.redrawing||!i||!Os())return;const l=[],h=n.getMaxDataCount(),f=n.convertDataToTargets(i,!0),d=n.axis.isTimeSeries();n.data.targets.forEach(function(t){o(this,e);let n=!1;for(let e=0;e1?g.values[g.values.length-1].x-p.x:p.x-n.getXDomain(n.data.targets)[0]:1,r=[p.x-s,p.x]);r&&n.updateXDomain(null,!0,!0,!1,r),n.updateTargets(n.data.targets),n.redraw({flow:{index:p.index,length:c,duration:$o(t.duration)?t.duration:n.config.transition_duration,done:t.done,orgDataCount:h},withLegend:!0,withTransition:h>1,withTrimXDomain:!1,withUpdateXAxis:!0})}()}.bind(this))}};function hf(t){return t}var ff=1,df=2,gf=3,pf=4,vf=1e-6;function yf(t){return"translate("+t+",0)"}function bf(t){return"translate(0,"+t+")"}function xf(t){var e=this;return function(n){return o(this,e),+t(n)}.bind(this)}function mf(t,e){var n=this;return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),function(i){return o(this,n),+t(i)+e}.bind(this)}function _f(){return!this.__axis}function Tf(t,e){var n=[],i=null,r=null,o=6,s=6,a=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=t===ff||t===pf?-1:1,l=t===pf||t===df?"x":"y",h=t===ff||t===gf?yf:bf;function f(f){var d=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,g=null==r?e.tickFormat?e.tickFormat.apply(e,n):hf:r,p=Math.max(o,0)+a,v=e.range(),y=+v[0]+c,b=+v[v.length-1]+c,x=(e.bandwidth?mf:xf)(e.copy(),c),m=f.selection?f.selection():f,_=m.selectAll(".domain").data([null]),T=m.selectAll(".tick").data(d,e).order(),w=T.exit(),A=T.enter().append("g").attr("class","tick"),S=T.select("line"),E=T.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(A),S=S.merge(A.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),E=E.merge(A.append("text").attr("fill","currentColor").attr(l,u*p).attr("dy",t===ff?"0em":t===gf?"0.71em":"0.32em")),f!==m&&(_=_.transition(f),T=T.transition(f),S=S.transition(f),E=E.transition(f),w=w.transition(f).attr("opacity",vf).attr("transform",(function(t){return isFinite(t=x(t))?h(t+c):this.getAttribute("transform")})),A.attr("opacity",vf).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:x(t))+c)}))),w.remove(),_.attr("d",t===pf||t===df?s?"M"+u*s+","+y+"H"+c+"V"+b+"H"+u*s:"M"+c+","+y+"V"+b:s?"M"+y+","+u*s+"V"+c+"H"+b+"V"+u*s:"M"+y+","+c+"H"+b),T.attr("opacity",1).attr("transform",(function(t){return h(x(t)+c)})),S.attr(l+"2",u*o),E.attr(l,u*p).text(g),m.filter(_f).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===df?"start":t===pf?"end":"middle"),m.each((function(){this.__axis=x}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),f):i&&i.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(o=s=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(s=+t,f):s},f.tickPadding=function(t){return arguments.length?(a=+t,f):a},f.offset=function(t){return arguments.length?(c=+t,f):c},f}function wf(t){return Tf(ff,t)}function Af(t){return Tf(df,t)}function Sf(t){return Tf(gf,t)}function Ef(t){return Tf(pf,t)}let kf=function(){function t(t){this.owner=void 0,this.config=void 0,this.scale=void 0;const e=pl(),n=t.config,i=t.params;this.owner=t,this.config=n,this.scale=e,!n.noTransition&&i.config.transition_duration||(n.withoutTransition=!0),n.range=this.scaleExtent((i.orgXScale||e).range())}t.getSizeFor1Char=function(t){var e=this;const n={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call(function(t){o(this,e);try{const e=t.node().getBBox(),i=e.width,r=e.height;i&&r&&(n.w=i,n.h=r)}catch(t){}finally{t.text("")}}.bind(this)),this.getSizeFor1Char=function(){return o(this,e),n}.bind(this),n};var e=t.prototype;return e.getTickTransformSetter=function(t){var e=this;const n=this.config,i="x"===t?function(t){return o(this,e),"translate("+(t+n.tickOffset)+",0)"}.bind(this):function(t){return o(this,e),"translate(0,"+t+")"}.bind(this);return function(t,n){var r=this;o(this,e),t.attr("transform",function(t){return o(this,r),$o(t)?i(Math.ceil(n(t))):null}.bind(this))}.bind(this)},e.scaleExtent=function(t){const e=t[0],n=t[t.length-1];return e0?s:1,a]).range(t.range());c=e.ticks();for(let t=a.toFixed().length;c.length>15;t--)c=e.ticks(t);c.splice(0,1,s),c.splice(c.length-1,1,a)}c=c.map(function(t){o(this,n);return Yo(t)&&Vo(t)&&!isNaN(t)&&Math.round(10*t)/10||t}.bind(this))}else{for(let t=Math.ceil(s);t0&&c[0]>0&&c.unshift(c[0]-(c[1]-c[0]))}return c},e.copyScale=function(){const t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t.type=this.scale.type,t},e.textFormatted=function(t){const e=this.config.tickFormat,n=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,i=e?e(n):n;return Ho(i)?i:""},e.transitionise=function(t){const e=this.config;let n=t;if(e.withoutTransition)n=t.interrupt();else if(e.transition||!this.owner.params.noTransition)try{n=t.transition(e.transition)}catch(t){}return n},t}(),Of=function(){function t(t){void 0===t&&(t={}),this.helper=void 0,this.config=void 0,this.params=void 0,this.g=void 0,this.generatedTicks=void 0;const e={innerTickSize:6,outerTickSize:t.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:t.noTransition};e.tickLength=Math.max(e.innerTickSize,0)+e.tickPadding,this.config=e,this.params=t,this.helper=new kf(this)}var e=t.prototype;return e.create=function(t){const e=this,n=e.config,i=e.helper,r=e.params,s=i.scale,a=n.orient,c=this.splitTickText.bind(e),u=/^(left|right)$/.test(a),l=/^(top|bottom)$/.test(a),h=i.getTickTransformSetter(l?"x":"y"),f=h===i.axisX?"y":"x",d=/^(top|left)$/.test(a)?-1:1,g=r.tickTextRotate;this.config.range=s.rangeExtent?s.rangeExtent():i.scaleExtent((r.orgXScale||s).range());const p=n.innerTickSize,v=n.tickLength,y=n.range,b=r.id,x=b&&/^(x|y|y2)$/.test(b)?r.config["axis_"+b+"_tick_text_position"]:{x:0,y:0},m="subX"===b?"subchart_axis_x":"axis_"+b,_=r.config[m+"_show"],T=!!_&&r.config[m+"_tick_show"],w=!!_&&r.config[m+"_tick_text_show"];let A;t.each((function(){var t=this;const b=Rn(this);let m=this.__chart__||s,_=i.copyScale();A=b,this.__chart__=_,n.tickOffset=r.isCategory?Math.ceil((_(1)-_(0))/2):0;const S=b.selectAll(".domain").data([0]);if(S.enter().append("path").attr("class","domain").merge(S).attr("d",function(){o(this,t);const e=n.outerTickSize*d;return l?"M"+y[0]+","+e+"V0H"+y[1]+"V"+e:"M"+e+","+y[0]+"H0V"+y[1]+"H"+e}.bind(this)),T||w){const s=n.tickValues||i.generateTicks(_,u);e.generatedTicks=s;let y=b.selectAll(".tick").data(s,_);const A=y.enter().insert("g",".domain").attr("class","tick"),S=y.exit().remove();y=A.merge(y),T&&A.append("line"),w&&A.append("text");const E=kf.getSizeFor1Char(y),k=[];let O=y.select("text").selectAll("tspan").data(function(e,n){var a=this;o(this,t);const l=r.tickMultiline?c(e,_,s,u,E.w):es(i.textFormatted(e))?i.textFormatted(e).concat():[i.textFormatted(e)];return k[n]=l.length,l.map(function(t){return o(this,a),{index:n,splitted:t}}.bind(this))}.bind(this));O.exit().remove(),O=O.enter().append("tspan").merge(O).text(function(e){return o(this,t),e.splitted}.bind(this)),O.attr("x",l?0:v*d).attr("dx",function(){o(this,t);let e=0;return/(top|bottom)/.test(a)&&g&&(e=8*Math.sin(Math.PI*(g/180))*("top"===a?-1:1)),e+(x.x||0)}.bind(this)()).attr("dy",function(e,n){o(this,t);let i=0;return"top"!==a&&(i=E.h,0===n&&(i=u?-((k[e.index]-1)*(E.h/2)-3):0===x.y?".71em":0)),Vo(i)&&x.y?i+x.y:i||".71em"}.bind(this));const M=y.select("line"),R=y.select("text");if(A.select("line").attr(f+"2",p*d),A.select("text").attr(f,v*d),e.setTickLineTextPosition(M,R),r.tickTitle){const e=R.select("title");(e.empty()?R.append("title"):e).text(function(e){return o(this,t),r.tickTitle[e]}.bind(this))}if(_.bandwidth){const e=_,n=e.bandwidth()/2;m=function(i){return o(this,t),e(i)+n}.bind(this),_=m}else m.bandwidth?m=_:h(S,_);y=r.owner.state.flowing?i.transitionise(y):r.owner.$T(y),h(A,m),h(y.style("opacity",null),_)}})),this.g=A},e.getGeneratedTicks=function(t){var e,n=this;const i=(null==(e=this.generatedTicks)?void 0:e.length)-1;let r=this.generatedTicks;if(i>t){const e=Math.round(i/t+.1);r=this.generatedTicks.map(function(t,i){return o(this,n),i%e==0?t:null}.bind(this)).filter(function(t){return o(this,n),null!==t}.bind(this)).splice(0,t)}return r},e.getTickXY=function(){const t=this.config,e={x:0,y:0};return this.params.isCategory&&(e.x=t.tickCentered?0:t.tickOffset,e.y=t.tickCentered?t.tickOffset:0),e},e.getTickSize=function(t){const e=this.helper.scale,n=this.config,i=n,r=i.innerTickSize,o=i.range,s=e(t)+(n.tickCentered?0:n.tickOffset);return o[0]0?0:1]:"middle"}.bind(this),f=function(t){return o(this,n),t?"rotate("+t+")":null}.bind(this),d=function(t){o(this,n);return t?11.5-2.5*(t/("bottom"===a?15:23))*(t>0?1:-1):c}.bind(this);switch(a){case"bottom":t.attr("x1",i.x).attr("x2",i.x).attr("y2",this.getTickSize.bind(this)),e.attr("x",0).attr("y",d(l)).style("text-anchor",h(l)).attr("transform",f(l));break;case"top":t.attr("x2",0).attr("y2",-s),e.attr("x",0).attr("y",2*-d(l)).style("text-anchor",h(l)).attr("transform",f(l));break;case"left":t.attr("x2",-s).attr("y1",i.y).attr("y2",i.y),e.attr("x",-c).attr("y",u).style("text-anchor","end");break;case"right":t.attr("x2",s).attr("y2",0),e.attr("x",c).attr("y",0).style("text-anchor","start")}},e.splitTickText=function(t,e,n,i,r){const o=this.params,s=this.helper.textFormatted(t),a=Yo(s)&&s.indexOf("\n")>-1?s.split("\n"):[];if(a.length)return a;if(es(s))return s;let c=o.tickWidth;return(!c||c<=0)&&(c=i?95:o.isCategory?Math.ceil(o.isInverted?e(n[0])-e(n[1]):e(n[1])-e(n[0]))-12:110),function t(e,n){let i,o,s;for(let a=1;a=0||n.hasRadar},e.isCustomX=function(){const t=this.owner.config;return!this.isTimeSeries()&&(t.data_x||ts(t.data_xs))},e.isTimeSeries=function(t){return void 0===t&&(t="x"),"timeseries"===this.owner.config["axis_"+t+"_type"]},e.isLog=function(t){return void 0===t&&(t="x"),"log"===this.owner.config["axis_"+t+"_type"]},e.isTimeSeriesY=function(){return this.isTimeSeries("y")},e.getAxisType=function(t){void 0===t&&(t="x");let e="linear";return this.isTimeSeries(t)?e=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(t)&&(e="log"),e},e.init=function(){var t=this;const e=this.owner,n=e.config,i=e.$el,r=i.main,s=i.axis,a=e.state.clip,c=n.axis_rotated,u=["x","y"];n.axis_y2_show&&u.push("y2"),u.forEach(function(i){var u=this;o(this,t);const l=this.getAxisClassName(i),h=Ns["axis"+i.toUpperCase()+"Label"];s[i]=r.append("g").attr("class",l).attr("clip-path",function(){o(this,u);let t=null;return"x"===i?t=a.pathXAxis:"y"===i&&(t=a.pathYAxis),t}.bind(this)).attr("transform",e.getTranslate(i)).style("visibility",n["axis_"+i+"_show"]?null:"hidden"),s[i].append("text").attr("class",h).attr("transform",["rotate(-90)",null]["x"===i?+!c:+c]).style("text-anchor",function(){return o(this,u),this.textAnchorForAxisLabel(i)}.bind(this)),this.generateAxes(i)}.bind(this))},e.setOrient=function(){const t=this.owner.config,e=t.axis_rotated,n=t.axis_y_inner,i=t.axis_y2_inner;this.orient={x:e?"left":"bottom",y:e?n?"top":"bottom":n?"right":"left",y2:e?i?"bottom":"top":i?"left":"right",subX:e?"left":"bottom"}},e.generateAxes=function(t){var e=this;const n=this.owner,i=n.config,r=[],s=i["axis_"+t+"_axes"],a=i.axis_rotated;let c;"x"===t?c=a?Ef:Sf:"y"===t?c=a?Sf:Ef:"y2"===t&&(c=a?wf:Af),s.length&&s.forEach(function(i){var s=this;o(this,e);const a=i.tick||{},u=n.scale[t].copy();i.domain&&u.domain(i.domain),r.push(c(u).ticks(a.count).tickFormat(Uo(a.format)?a.format.bind(n.api):function(t){return o(this,s),t}.bind(this)).tickValues(a.values).tickSizeOuter(!1===a.outer?0:6))}.bind(this)),this.axesList[t]=r},e.updateAxes=function(){var t=this;const e=this.owner,n=e.config,i=e.$el.main,r=e.$T;Object.keys(this.axesList).forEach(function(s){var a=this;o(this,t);const c=n["axis_"+s+"_axes"],u=e.scale[s].copy(),l=u.range();this.axesList[s].forEach(function(t,h){var f=this;o(this,a);const d=t.scale().range();l.every(function(t,e){return o(this,f),t===d[e]}.bind(this))||t.scale().range(l);const g=this.getAxisClassName(s)+"-"+(h+1);let p=i.select("."+g.replace(/\s/,"."));p.empty()?p=i.append("g").attr("class",g).style("visibility",n["axis_"+s+"_show"]?null:"hidden").call(t):(c[h].domain&&u.domain(c[h].domain),r(p).call(t.scale(u))),p.attr("transform",e.getTranslate(s,h+1))}.bind(this))}.bind(this))},e.setAxis=function(t,e,n,i){const r=this.owner;"subX"!==t&&(this.tick[t]=this.getTickValues(t)),this[t]=this.getAxis(t,e,n,!("x"!==t||!(r.scale.zoom||r.config.subchart_show||r.state.resizing))||i)},e.getAxis=function(t,e,n,i,r){var s=this;const a=this.owner,c=a.config,u=/^(x|subX)$/.test(t),l=u?"x":t,h=u&&this.isCategorized(),f=this.orient[t],d=r?0:a.getAxisTickRotate(l);let g;if(u)g="subX"===t?a.format.subXAxisTick:a.format.xAxisTick;else{const e=c["axis_"+t+"_tick_format"];Uo(e)&&(g=e.bind(a.api))}let p=this.tick[l];const v=_s({outerTick:n,noTransition:i,config:c,id:t,tickTextRotate:d,owner:a},u&&{isCategory:h,isInverted:c.axis_x_inverted,tickMultiline:c.axis_x_tick_multiline,tickWidth:c.axis_x_tick_width,tickTitle:h&&c.axis_x_tick_tooltip&&a.api.categories(),orgXScale:a.scale.x});u||(v.tickStepSize=c["axis_"+l+"_tick_stepSize"]);const y=new Of(v).scale(u&&a.scale.zoom||e).orient(f);if(u&&this.isTimeSeries()&&p&&!Uo(p)){const t=ks.bind(a);p=p.map(function(e){return o(this,s),t(e)}.bind(this))}else!u&&this.isTimeSeriesY()&&(y.ticks(c.axis_y_tick_time_value),p=null);p&&y.tickValues(p),y.tickFormat(g||!u&&a.isStackNormalized()&&function(t){return o(this,s),t+"%"}.bind(this)),h&&(y.tickCentered(c.axis_x_tick_centered),Qo(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1));const b=c["axis_"+l+"_tick_count"];return b&&y.ticks(b),y},e.updateXAxisTickValues=function(t,e){const n=this.owner,i=n.config,r=i.axis_x_tick_fit;let o,s=i.axis_x_tick_count;if((r||s&&r)&&(o=n.mapTargetsToUniqueXs(t),this.isCategorized()&&s>o.length&&(s=o.length),o=this.generateTickValues(o,s,this.isTimeSeries())),e)e.tickValues(o);else if(this.x){var a;this.x.tickValues(o),null==(a=this.subX)||a.tickValues(o)}return o},e.getId=function(t){const e=this.owner,n=e.config,i=e.scale;let r=n.data_axes[t];return r&&i[r]||(r="y"),r},e.getXAxisTickFormat=function(t){var e=this;const n=this.owner,i=n.config,r=n.format,s=t&&i.subchart_axis_x_tick_format||i.axis_x_tick_format,a=this.isTimeSeries(),c=this.isCategorized();let u;return s?Uo(s)?u=s.bind(n.api):a&&(u=function(t){return o(this,e),t?r.axisTime(s)(t):""}.bind(this)):u=a?r.defaultAxisTime:c?n.categoryName:function(t){return o(this,e),t<0?t.toFixed(0):t}.bind(this),Uo(u)?function(t){return o(this,e),u.apply(n,c?[t,n.categoryName(t)]:[t])}.bind(this):u},e.getTickValues=function(t){const e=this.owner,n=e.config["axis_"+t+"_tick_values"],i=e[t+"Axis"];return(Uo(n)?n.call(e.api):n)||(i?i.tickValues():void 0)},e.getLabelOptionByAxisId=function(t){return this.owner.config["axis_"+t+"_label"]},e.getLabelText=function(t){const e=this.getLabelOptionByAxisId(t);return Yo(e)?e:e?e.text:null},e.setLabelText=function(t,e){const n=this.owner.config,i=this.getLabelOptionByAxisId(t);Yo(i)?n["axis_"+t+"_label"]=e:i&&(i.text=e)},e.getLabelPosition=function(t,e){var n=this;const i=this.owner.config.axis_rotated,r=this.getLabelOptionByAxisId(t),s=Jo(r)&&r.position?r.position:e[+!i],a=function(t){return o(this,n),!!~s.indexOf(t)}.bind(this);return{isInner:a("inner"),isOuter:a("outer"),isLeft:a("left"),isCenter:a("center"),isRight:a("right"),isTop:a("top"),isMiddle:a("middle"),isBottom:a("bottom")}},e.getAxisLabelPosition=function(t){return this.getLabelPosition(t,"x"===t?["inner-top","inner-right"]:["inner-right","inner-top"])},e.getLabelPositionById=function(t){return this.getAxisLabelPosition(t)},e.xForAxisLabel=function(t){const e=this.owner,n=e.state,i=n.width,r=n.height,o=this.getAxisLabelPosition(t);let s=o.isMiddle?-r/2:0;return this.isHorizontal(e,"x"!==t)?s=o.isLeft?0:o.isCenter?i/2:i:o.isBottom&&(s=-r),s},e.dxForAxisLabel=function(t){const e=this.owner,n=this.getAxisLabelPosition(t);let i=n.isBottom?"0.5em":"0";return this.isHorizontal(e,"x"!==t)?i=n.isLeft?"0.5em":n.isRight?"-0.5em":"0":n.isTop&&(i="-0.5em"),i},e.textAnchorForAxisLabel=function(t){const e=this.owner,n=this.getAxisLabelPosition(t);let i=n.isMiddle?"middle":"end";return this.isHorizontal(e,"x"!==t)?i=n.isLeft?"start":n.isCenter?"middle":"end":n.isBottom&&(i="start"),i},e.dyForAxisLabel=function(t){const e=this.owner,n=e.config,i=n.axis_rotated,r=this.getAxisLabelPosition(t).isInner,o=n["axis_"+t+"_tick_rotate"]?e.getHorizontalAxisHeight(t):0,s=this.getMaxTickWidth(t);let a;if("x"===t){const t=n.axis_x_height;a=i?r?"1.2em":-25-s:r?"-0.5em":t?t-10:o?o-10:"3em"}else a={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[t],a=i?r?a[0]:o?o*("y2"===t?-1:1)-a[1]:a[2]:r?a[3]:(a[4]+(n["axis_"+t+"_inner"]?0:s+a[4]))*("y"===t?-1:1);return a},e.getMaxTickWidth=function(t,e){var n=this;const i=this.owner,r=i.config,s=i.state.current,a=i.$el,c=a.svg,u=a.chart,l=s.maxTickWidths[t];let h=0;if(e||!r["axis_"+t+"_show"]||l.size>0&&0===i.filterTargetsToShow().length)return l.size;if(c){const e=/^y2?$/.test(t),s=i.filterTargetsToShow(i.data.targets),a=i.scale[t].copy().domain(i["get"+(e?"Y":"X")+"Domain"](s,t)),c=a.domain(),f=c[0]===c[1]&&c.every(function(t){return o(this,n),t>0}.bind(this)),d=es(l.domain)&&l.domain[0]===l.domain[1]&&l.domain.every(function(t){return o(this,n),t>0}.bind(this));if(f||d)return l.size;l.domain=c,e||l.ticks.splice(0);const g=this.getAxis(t,a,!1,!1,!0),p=r["axis_"+t+"_tick_count"];!r["axis_"+t+"_tick_values"]&&p&&g.tickValues(this.generateTickValues(c,p,e?this.isTimeSeriesY():this.isTimeSeries())),e||this.updateXAxisTickValues(s,g);const v=u.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0");g.create(v),v.selectAll("text").each((function(t,n){const i=this.getBoundingClientRect().width;h=Math.max(h,i),e||(l.ticks[n]=i)})),v.remove()}return h>0&&(l.size=h),l.size},e.getXAxisTickTextY2Overflow=function(t){const e=this.owner,n=e.axis,i=e.config,r=e.state,o=e.getAxisTickRotate("x");if((n.isCategorized()||n.isTimeSeries())&&i.axis_x_tick_fit&&!i.axis_x_tick_culling&&!i.axis_x_tick_multiline&&o>0&&o<90){const n=r.current.width-e.getCurrentPaddingLeft(),i=this.getXAxisTickMaxOverflow(o,n-t),s=Math.max(0,i)+t;return Math.min(s,n/2)}return 0},e.getXAxisTickMaxOverflow=function(t,e){const n=this.owner,i=n.axis,r=n.config,o=n.state,s=i.isTimeSeries(),a=o.current.maxTickWidths.x.ticks,c=a.length,u=o.axis.x.padding,l=u.left,h=u.right;let f=0;const d=c-(s&&r.axis_x_tick_fit?.5:0);for(let n=0;n2){const e=this.isCategorized(),o=i-2,s=t[0],a=t[t.length-1];let c;r=[s];for(let t=0;t=f)&&(d=!0,e.preventDefault())}.bind(this);s.on("touchstart",function(n){o(this,t),i.event=n,e.updateEventRect()}.bind(this)).on("touchstart.eventRect touchmove.eventRect",function(n){if(o(this,t),i.event=n,!s.empty()&&s.classed(Vs.eventRect)){if(i.dragging||i.flowing||e.hasArcType()||n.touches.length>1)return;g(n),c(s.node())}else u()}.bind(this),!0).on("touchend.eventRect",function(n){o(this,t),i.event=n,!s.empty()&&s.classed(Vs.eventRect)&&(e.hasArcType()||!e.toggleShape||i.cancelClick)&&i.cancelClick&&(i.cancelClick=!1)}.bind(this),!0),a.on("touchstart",function(e){o(this,t),i.event=e;const n=e.target;n&&n!==s.node()&&u()}.bind(this))},updateEventRect:function(t,e){var n=this;void 0===e&&(e=!1);const i=this.state,r=this.$el,s=i,a=s.eventReceiver,c=s.width,u=s.height,l=s.rendered,h=s.resizing,f=t||r.eventRect,d=function(){o(this,n),a&&(a.rect=f.node().getBoundingClientRect())}.bind(this);(!l||h||e)&&(f.attr("x",0).attr("y",0).attr("width",c).attr("height",u),l&&!e||f.classed(Vs.eventRect,!0)),d()},updateEventRectData:function(){var t=this;const e=this,n=e.config,i=e.scale,r=e.state,s=i.zoom||i.x,a=n.axis_rotated;let c,u,l,h;if(e.isMultipleX())c=0,u=0,l=r.width,h=r.height;else{let n,i;if(e.axis.isCategorized())n=e.getEventRectWidth(),i=function(e){return o(this,t),s(e.x)-n/2}.bind(this);else{const c=function(n){let i=n.index;return o(this,t),{prev:e.getPrevX(i),next:e.getNextX(i)}}.bind(this);n=function(e){var n=this;o(this,t);const i=c(e),u=s.domain();let l;return null===i.prev&&null===i.next?l=a?r.height:r.width:null===i.prev?l=(s(i.next)+s(e.x))/2:null===i.next?l=s(u[1])-(s(i.prev)+s(e.x))/2:(Object.keys(i).forEach(function(t,e){var r;o(this,n),i[t]=null!=(r=i[t])?r:u[e]}.bind(this)),l=Math.max(0,(s(i.next)-s(i.prev))/2)),l}.bind(this),i=function(e){o(this,t);const n=c(e);let i;return i=null===n.prev&&null===n.next?0:null===n.prev?s(s.domain()[0]):(s(e.x)+s(n.prev))/2,i}.bind(this)}c=a?0:i,u=a?i:0,l=a?r.width:n,h=a?n:r.height}const f=r.eventReceiver,d=function(e,n){return o(this,t),Uo(e)?e(n):e}.bind(this);f.coords.splice(f.data.length),f.data.forEach(function(e,n){o(this,t),f.coords[n]={x:d(c,e),y:d(u,e),w:d(l,e),h:d(h,e)}}.bind(this))},selectRectForSingle:function(t,e){var n=this;const i=this,r=i.config,s=i.$el,a=s.main,c=s.circle,u=r.data_selection_enabled,l=r.data_selection_grouped,h=r.data_selection_isselectable,f=r.tooltip_grouped,d=i.getAllValuesOnIndex(e);if(f&&(i.showTooltip(d,t),null==i.showGridFocus||i.showGridFocus(d),!u||l))return;c||a.selectAll("."+Ps.EXPANDED+":not(."+Qs.shape+"-"+e+")").classed(Ps.EXPANDED,!1);const g=a.selectAll("."+Qs.shape+"-"+e).classed(Ps.EXPANDED,!0).style("cursor",h?"pointer":null).filter((function(t){return i.isWithinShape(this,t)}));g.empty()&&!f&&(null==i.hideGridFocus||i.hideGridFocus(),i.hideTooltip(),l||i.setExpand(e)),g.call(function(r){var s=this;o(this,n);const a=r.data();u&&(l||null!=h&&h.bind(i.api)(a))&&(t.style.cursor="pointer"),f||(i.showTooltip(a,t),null==i.showGridFocus||i.showGridFocus(a),null==i.unexpandCircles||i.unexpandCircles(),r.each(function(t){return o(this,s),i.setExpand(e,t.id)}.bind(this)))}.bind(this))},selectRectForMultipleXs:function(t,e){var n=this;void 0===e&&(e=!0);const i=this,r=i.config,s=i.state,a=i.filterTargetsToShow(i.data.targets);if(s.dragging||i.hasArcType(a))return;const c=us(s.event,t),u=i.findClosestFromTargets(a,c);if(!e||!s.mouseover||u&&u.id===s.mouseover.id||(r.data_onout.call(i.api,s.mouseover),s.mouseover=void 0),!u)return void i.unselectRect();const l=(i.isBubbleType(u)||i.isScatterType(u)||!r.tooltip_grouped?[u]:i.filterByX(a,u.x)).map(function(t){return o(this,n),i.addName(t)}.bind(this));i.showTooltip(l,t),i.setExpand(u.index,u.id,!0),i.showGridFocus(l);const h=i.dist(u,c);(i.isBarType(u.id)||h-1?s.data[i]:null}.bind(this);a.on("mouseover",function(t){o(this,e),r.event=t,n.updateEventRect()}.bind(this)).on("mousemove",(function(e){const o=t(e);if(r.event=e,!o)return;let a=o.index;const c=i.line_step_type;if(i.line_step_tooltipMatch&&n.hasType("step")&&/^step\-(before|after)$/.test(c)){const t=n.scale.zoom||n.scale.x,i=n.axis.xs[a],r=t.invert(us(e,this)[0]);"step-after"===c&&ri&&(a+=1)}const u=i.tooltip_grouped&&a===s.currentIdx;r.dragging||r.flowing||n.hasArcType()||u?u&&n.setTooltipPosition():(a!==s.currentIdx&&(n.setOverOut(!1,s.currentIdx),s.currentIdx=a),-1===a?n.unselectRect():n.selectRectForSingle(this,a),n.setOverOut(-1!==a,a))})).on("mouseout",function(t){o(this,e),r.event=t,i&&!n.hasArcType()&&-1!==s.currentIdx&&(n.unselectRect(),n.setOverOut(!1,s.currentIdx),s.currentIdx=-1)}.bind(this))}return a},clickHandlerForSingleX:function(t,e){const n=e,i=n.config,r=n.state,o=n.$el.main;if(!t||n.hasArcType()||r.cancelClick)return void(r.cancelClick&&(r.cancelClick=!1));const s=t.index;o.selectAll("."+Qs.shape+"-"+s).each((function(t){(i.data_selection_grouped||n.isWithinShape(this,t))&&(null==n.toggleShape||n.toggleShape(this,t,s),i.data_onclick.bind(n.api)(t,this))}))},generateEventRectsForMultipleXs:function(t){var e=this;const n=this,i=n.state;t.on("click",(function(t){i.event=t,n.clickHandlerForMultipleXS.bind(this)(n)})),"mouse"===i.inputType&&t.on("mouseover mousemove",(function(t){i.event=t,n.selectRectForMultipleXs(this)})).on("mouseout",function(t){o(this,e),i.event=t,n.config&&!n.hasArcType()&&n.unselectRect()}.bind(this))},clickHandlerForMultipleXS:function(t){const e=t,n=e.config,i=e.state,r=e.filterTargetsToShow(e.data.targets);if(e.hasArcType(r))return;const o=us(i.event,this),s=e.findClosestFromTargets(r,o);s&&(e.isBarType(s.id)||e.dist(s,o)1&&(i=i[n[1]]),null!=(e=i)&&e.size()&&(c[t]=i)}.bind(this)),e.hideGridFocus(),e.setFlowList(c,t)}},setFlowList:function(t,e){var n=this;const i=this,r=e.flow,s=e.targets,a=r,c=a.duration,u=void 0===c?e.duration:c,l=a.index,h=a.length,f=a.orgDataCount,d=i.getFlowTransform(s,f,l,h),g=La();let p;g.add(Object.keys(t).map(function(e){var r=this;return o(this,n),p=t[e].transition().ease(If).duration(u),p="axis.x"===e?p.call(function(t){o(this,r),i.axis.x.setTransition(t).create(t)}.bind(this)):"region.list"===e?p.filter(i.isRegionOnX).attr("transform",d):p.attr("transform",d),p}.bind(this))),p.call(g,function(){o(this,n),i.cleanUpFlow(t,e)}.bind(this))},cleanUpFlow:function(t,e){var n=this;const i=this,r=i.config,s=i.state,a=i.$el.svg,c=r.axis_rotated,u=e.flow,l=e.shape,h=e.xv,f=l.pos,d=f.cx,g=f.cy,p=f.xForText,v=f.yForText,y=u,b=y.done,x=void 0===b?function(){o(this,n)}.bind(this):b,m=y.length;m&&(["circle","text","shape","eventRect"].forEach(function(t){o(this,n);const e=[];for(let n=0;n=0?"":Fn.URL.split("#")[0])+"#"+t+")"},appendClip:function(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath:function(t){const e=this.config,n=this.state,i=n.margin,r=n.width,o=n.height,s=e.axis_rotated,a=Math.max(30,i.left)-(s?0:20),c=s?-(1+a):-(a-1),u=-Math.max(15,i.top),l=s?i.left+20:r+10+a,h=(s?i.top+o+10:i.bottom)+20;t.attr("x",c).attr("y",u).attr("width",l).attr("height",h)},setYAxisClipPath:function(t){var e;const n=this.config,i=this.state,r=i.margin,o=i.width,s=i.height,a=n.axis_rotated,c=Math.max(30,r.left)-(a?20:0),u=n.axis_y_inner,l=u&&!a?n.axis_y_label.text?-20:-1:a?-(1+c):-(c-1),h=-(a?20:r.top),f=(a?o+15+c:r.left+20)+(u?20:0),d=(a?r.bottom+("fit"===(null==(e=n.padding)?void 0:e.mode)?10:0):r.top+s)+10;t.attr("x",l).attr("y",h).attr("width",f).attr("height",d)},updateXAxisTickClip:function(){const t=this,e=t.config,n=t.state,i=n.clip,r=n.xAxisHeight,o=t.$el.defs,s=t.getHorizontalAxisHeight("x");if(o&&!i.idXAxisTickTexts){const e=i.id+"-xaxisticktexts";t.appendClip(o,e),i.pathXAxisTickTexts=t.getClipPath(i.idXAxisTickTexts),i.idXAxisTickTexts=e}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&s!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=s},setXAxisTickClipWidth:function(){const t=this,e=t.config,n=t.state.current.maxTickWidths,i=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&i){const e=Math.sin(Math.PI/180*Math.abs(i));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/e}else n.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){const t=this.state,e=t.clip,n=t.current,i=this.$el.svg;i&&i.select("#"+e.idXAxisTickTexts+" rect").attr("width",n.maxTickWidths.x.clipPath).attr("height",30)}},Df=void 0;const Nf=function(t){return o(this,Df),$o(t.position)||"end"}.bind(void 0),zf=function(t){return o(this,Df),"start"===t.position?4:"middle"===t.position?0:-4}.bind(void 0);function Ff(t,e,n){var i=this;return function(r){o(this,i);let s=t?0:e;return"start"===r.position?s=t?-n:0:"middle"===r.position&&(s=(t?-n:e)/2),s}.bind(this)}function jf(t,e){"grid"===e&&t.each((function(){var t=this;const e=Rn(this);["x1","x2","y1","y2"].forEach(function(n){return o(this,t),e.attr(n,Math.ceil(+e.attr(n)))}.bind(this))}))}var Bf={hasGrid:function(){var t=this;const e=this.config;return["x","y"].some(function(n){return o(this,t),e["grid_"+n+"_show"]||e["grid_"+n+"_lines"].length}.bind(this))},initGrid:function(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines:function(){const t=this,e=t.config,n=t.state.clip,i=t.$el;(e.grid_x_lines.length||e.grid_y_lines.length)&&(i.gridLines.main=i.main.insert("g","."+Ps.chart+(e.grid_lines_front?" + *":"")).attr("clip-path",n.pathGrid).attr("class",Hs.grid+" "+Hs.gridLines),i.gridLines.main.append("g").attr("class",Hs.xgridLines),i.gridLines.main.append("g").attr("class",Hs.ygridLines),i.gridLines.x=Th([]))},updateXGrid:function(t){var e=this;const n=this,i=n.config,r=n.scale,s=n.state,a=n.$el,c=a.main,u=a.grid,l=i.axis_rotated,h=n.generateGridData(i.grid_x_type,r.x),f=n.axis.isCategorized()?n.axis.x.tickOffset():0,d=function(t){return o(this,e),(r.zoom||r.x)(t)+f*(l?-1:1)}.bind(this);s.xgridAttr=l?{x1:0,x2:s.width,y1:d,y2:d}:{x1:d,x2:d,y1:0,y2:s.height},u.x=c.select("."+Hs.xgrids).selectAll("."+Hs.xgrid).data(h),u.x.exit().remove(),u.x=u.x.enter().append("line").attr("class",Hs.xgrid).merge(u.x),t||u.x.each((function(){var t=this;const e=Rn(this);Object.keys(s.xgridAttr).forEach(function(n){var i=this;o(this,t),e.attr(n,s.xgridAttr[n]).style("opacity",function(){return o(this,i),e.attr(l?"y1":"x1")===(l?s.height:0)?"0":null}.bind(this))}.bind(this))}))},updateYGrid:function(){var t=this;const e=this,n=e.axis,i=e.config,r=e.scale,s=e.state,a=e.$el,c=a.grid,u=a.main,l=i.axis_rotated,h=function(e){return o(this,t),Math.ceil(r.y(e))}.bind(this),f=n.y.getGeneratedTicks(i.grid_y_ticks)||e.scale.y.ticks(i.grid_y_ticks);c.y=u.select("."+Hs.ygrids).selectAll("."+Hs.ygrid).data(f),c.y.exit().remove(),c.y=c.y.enter().append("line").attr("class",Hs.ygrid).merge(c.y),c.y.attr("x1",l?h:0).attr("x2",l?h:s.width).attr("y1",l?0:h).attr("y2",l?s.height:h),jf(c.y,"grid")},updateGrid:function(){const t=this,e=t.$el,n=e.grid;e.gridLines.main||t.initGridLines(),n.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines:function(t){var e=this;const n=this,i=n.config,r=n.$el,s=r.gridLines,a=r.main,c=n.$T,u=i.axis_rotated;i["grid_"+t+"_show"]&&n["update"+t.toUpperCase()+"Grid"]();let l=a.select("."+Hs[t+"gridLines"]).selectAll("."+Hs[t+"gridLine"]).data(i["grid_"+t+"_lines"]);c(l.exit()).style("opacity","0").remove();const h=l.enter().append("g");h.append("line").style("opacity","0"),l=h.merge(l),l.each((function(t){const e=Rn(this);e.select("text").empty()&&t.text&&e.append("text").style("opacity","0")})),c(l.attr("class",function(n){return o(this,e),(Hs[t+"gridLine"]+" "+(n.class||"")).trim()}.bind(this)).select("text").attr("text-anchor",Nf).attr("transform",function(){return o(this,e),"x"===t?u?null:"rotate(-90)":u?"rotate(-90)":null}.bind(this)).attr("dx",zf).attr("dy",-5)).text((function(t){var e;return null!=(e=t.text)?e:this.remove()})),s[t]=l},redrawGrid:function(t){const e=this,n=e.config.axis_rotated,i=e.state,r=i.width,o=i.height,s=e.$el.gridLines,a=e.$T,c=e.xv.bind(e),u=e.yv.bind(e);let l=s.x.select("line"),h=s.x.select("text"),f=s.y.select("line"),d=s.y.select("text");return l=a(l,t).attr("x1",n?0:c).attr("x2",n?r:c).attr("y1",n?c:0).attr("y2",n?c:o),h=a(h,t).attr("x",Ff(!n,r,o)).attr("y",c),f=a(f,t).attr("x1",n?u:0).attr("x2",n?u:r).attr("y1",n?0:u).attr("y2",n?o:u),d=a(d,t).attr("x",Ff(n,r,o)).attr("y",u),[l.style("opacity",null),h.style("opacity",null),f.style("opacity",null),d.style("opacity",null)]},initFocusGrid:function(){const t=this,e=t.config,n=t.state.clip,i=t.$el,r=e.grid_front,o="."+(r&&i.gridLines.main?Hs.gridLines:Ps.chart)+(r?" + *":""),s=i.main.insert("g",o).attr("clip-path",n.pathGrid).attr("class",Hs.grid);i.grid.main=s,e.grid_x_show&&s.append("g").attr("class",Hs.xgrids),e.grid_y_show&&s.append("g").attr("class",Hs.ygrids),e.interaction_enabled&&e.grid_focus_show&&(s.append("g").attr("class",Gs.xgridFocus).append("line").attr("class",Gs.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&s.append("g").attr("class",Gs.ygridFocus).append("line").attr("class",Gs.ygridFocus))},showGridFocus:function(t){var e=this;const n=this,i=n.config,r=n.state,s=r.width,a=r.height,c=i.axis_rotated,u=n.$el.main.selectAll("line."+Gs.xgridFocus+", line."+Gs.ygridFocus),l=(t||[u.datum()]).filter(function(t){return o(this,e),t&&$o(n.getBaseValue(t))}.bind(this));if(!i.tooltip_show||0===l.length||n.hasType("bubble")||n.hasArcType())return;const h=i.grid_focus_edge&&!i.tooltip_grouped,f=n.xx.bind(n);u.style("visibility",null).data(l.concat(l)).each((function(t){var e=this;const i=Rn(this),r={x:f(t),y:n.getYScaleById(t.id)(t.value)};let u;if(i.classed(Gs.xgridFocus))u=c?[null,r.x,h?r.y:s,r.x]:[r.x,h?r.y:null,r.x,a];else{const e="y2"===n.axis.getId(t.id);u=c?[r.y,h&&!e?r.x:null,r.y,h&&e?r.x:a]:[h&&e?r.x:null,r.y,h&&!e?r.x:s,r.y]}["x1","y1","x2","y2"].forEach(function(t,n){return o(this,e),i.attr(t,u[n])}.bind(this))})),jf(u,"grid"),null==n.showCircleFocus||n.showCircleFocus(t)},hideGridFocus:function(){const t=this,e=t.state,n=e.inputType,i=e.resizing,r=t.$el.main;"mouse"!==n&&i||(r.selectAll("line."+Gs.xgridFocus+", line."+Gs.ygridFocus).style("visibility","hidden"),null==t.hideCircleFocus||t.hideCircleFocus())},updateGridFocus:function(){const t=this,e=t.state,n=e.inputType,i=e.width,r=e.height,o=e.resizing,s=t.$el.grid.main.select("line."+Gs.xgridFocus);if("touch"===n)s.empty()?o&&(null==t.showCircleFocus||t.showCircleFocus()):t.showGridFocus();else{const e=t.config.axis_rotated;s.attr("x1",e?0:-10).attr("x2",e?i:-10).attr("y1",e?-10:0).attr("y2",e?-10:r)}return!0},generateGridData:function(t,e){var n=this;const i=this,r=i.$el.main.select("."+Ns.axisX).selectAll(".tick").size();let s=[];if("year"===t){const t=i.getXDomain().map(function(t){return o(this,n),t.getFullYear()}.bind(this)),e=t[0],r=t[1];for(let t=e;t<=r;t++)s.push(new Date(t+"-01-01 00:00:00"))}else s=e.ticks(10),s.length>r&&(s=s.filter(function(t){return o(this,n),(t+"").indexOf(".")<0}.bind(this)));return s},getGridFilterToRemove:function(t){var e=this;return t?function(n){var i=this;o(this,e);let r=!1;return(es(t)?t.concat():[t]).forEach(function(t){o(this,i),("value"in t&&n.value===t.value||"class"in t&&n.class===t.class)&&(r=!0)}.bind(this)),r}.bind(this):function(){return o(this,e),!0}.bind(this)},removeGridLines:function(t,e){var n=this;const i=this,r=i.config,s=i.$T,a=i.getGridFilterToRemove(t),c=function(t){return o(this,n),!a(t)}.bind(this),u=e?Hs.xgridLines:Hs.ygridLines,l=e?Hs.xgridLine:Hs.ygridLine;s(i.$el.main.select("."+u).selectAll("."+l).filter(a)).style("opacity","0").remove();const h="grid_"+(e?"x":"y")+"_lines";r[h]=r[h].filter(c)}},Xf={initRegion:function(){const t=this.$el;t.region.main=t.main.insert("g",":first-child").attr("clip-path",this.state.clip.path).attr("class",Ks.regions)},updateRegion:function(){const t=this,e=t.config,n=t.$el.region,i=t.$T;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);const r=n.main.selectAll("."+Ks.region).data(e.regions);i(r.exit()).style("opacity","0").remove();const o=r.enter().append("g");o.append("rect").style("fill-opacity","0"),n.list=o.merge(r).attr("class",t.classRegion.bind(t)),n.list.each((function(t){var e;Rn(this).select("text").empty()&&null!=(e=t.label)&&e.text&&Rn(this).append("text").style("opacity","0")}))},redrawRegion:function(t){var e=this;const n=this,i=n.$el.region,r=n.$T;let s=i.list.select("rect"),a=i.list.selectAll("text");return s=r(s,t).attr("x",n.regionX.bind(n)).attr("y",n.regionY.bind(n)).attr("width",n.regionWidth.bind(n)).attr("height",n.regionHeight.bind(n)),a=r(a,t).attr("transform",function(t){var i;o(this,e);const r=null!=(i=t.label)?i:{},s=r.x,a=void 0===s?0:s,c=r.y,u=void 0===c?0:c,l=r.rotated,h=void 0!==l&&l;return"translate("+(n.regionX.bind(n)(t)+a)+", "+(n.regionY.bind(n)(t)+u)+")"+(h?" rotate(-90)":"")}.bind(this)).attr("text-anchor",function(t){var n;return o(this,e),null!=(n=t.label)&&n.rotated?"end":null}.bind(this)).attr("dy","1em").style("fill",function(t){var n,i;return o(this,e),null!=(n=null==(i=t.label)?void 0:i.color)?n:null}.bind(this)).text(function(t){var n;return o(this,e),null==(n=t.label)?void 0:n.text}.bind(this)),[s.style("fill-opacity",function(t){return o(this,e),$o(t.opacity)?t.opacity:null}.bind(this)).on("end",(function(){Rn(this.parentNode).selectAll("rect:not([x])").remove()})),a.style("opacity",null)]},getRegionXY:function(t,e){const n=this,i=n.config,r=n.scale,o=i.axis_rotated,s="x"===t;let a,c="start",u=0;return"y"===e.axis||"y2"===e.axis?(s||(c="end"),(s?o:!o)&&c in e&&(a=r[e.axis],u=a(e[c]))):(s?!o:o)&&c in e&&(a=r.zoom||r.x,u=a(n.axis.isTimeSeries()?ks.call(n,e[c]):e[c])),u},regionX:function(t){return this.getRegionXY("x",t)},regionY:function(t){return this.getRegionXY("y",t)},getRegionSize:function(t,e){const n=this,i=n.config,r=n.scale,o=n.state,s=i.axis_rotated,a="width"===t,c=n[a?"regionX":"regionY"](e);let u,l="end",h=o[t];return"y"===e.axis||"y2"===e.axis?(a||(l="start"),(a?s:!s)&&l in e&&(u=r[e.axis],h=u(e[l]))):(a?!s:s)&&l in e&&(u=r.zoom||r.x,h=u(n.axis.isTimeSeries()?ks.call(n,e[l]):e[l])),hs.height/2&&(g=s.height/2)),g+(i.axis.getLabelPositionById(t).isInner?0:10)+("y2"!==t||l?0:-10)},getEventRectWidth:function(){const t=this.config,e=this.axis,n=t.axis_x_inverted,i=e.x.tickInterval();return Math.max(0,n?Math.abs(i):i)},getAxisTickRotate:function(t){const e=this,n=e.axis,i=e.config,r=e.state,o=e.$el;let s=i["axis_"+t+"_tick_rotate"];if("x"===t){const t=n.isCategorized()||n.isTimeSeries();if(i.axis_x_tick_fit&&t){const t=i.axis_x_tick_count,n=r.current.maxTickWidths.x.ticks.length;let o=0;if(t?o=t>n?n:t:n&&(o=n),o!==r.axis.x.tickCount){const t=e.data.targets;r.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")],o)}r.axis.x.tickCount=o}o.svg&&i.axis_x_tick_fit&&!i.axis_x_tick_multiline&&!i.axis_x_tick_culling&&i.axis_x_tick_autorotate&&t&&(s=e.needToRotateXAxisTickTexts()?i.axis_x_tick_rotate:0)}return s},needToRotateXAxisTickTexts:function(){const t=this,e=t.state,n=e.axis,i=e.current.width-t.getCurrentPaddingLeft(!1)-t.getCurrentPaddingRight(),r=n.x.tickCount+n.x.padding.left+n.x.padding.right;return t.axis.getMaxTickWidth("x")>(r?i/r:0)}},Uf={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},Yf={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]};function Vf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Gf(t){for(var e,n=1;n1&&(i.axis_x_categories[t]=e,n.redraw()),i.axis_x_categories[t]},categories:function(t){const e=this.internal,n=e.config;return arguments.length?(n.axis_x_categories=t,e.redraw(),n.axis_x_categories):n.axis_x_categories}},lf,rf,of,cf,uf],qf=[Mf,Lf,Cf,Pf,Bf,Xf,$f],Zf=[{data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},Hf,{grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0}];var Kf,Jf,Qf,td,ed,nd,id,rd,od,sd,ad,cd,ud,ld;Array.prototype.slice;function hd(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function fd(t){return function(){return t}}function dd(t,e){return et?1:e>=t?0:NaN}function gd(t){return t}function pd(t,e){return e||(e=t.slice(0)),t.raw=e,t}const vd=Math.PI,yd=2*vd,bd=1e-6,xd=yd-bd;function md(t){this._+=t[0];for(let e=1,n=t.length;e=0))throw new Error("invalid digits: "+t);if(e>15)return md;const n=Math.pow(10,e);return function(t){this._+=t[0];for(let e=1,i=t.length;ebd)if(Math.abs(l*a-c*u)>bd&&r){let f=n-o,d=i-s,g=a*a+c*c,p=Math.sqrt(g),v=Math.sqrt(h),y=r*Math.tan((vd-Math.acos((g+h-(f*f+d*d))/(2*p*v)))/2),b=y/v,x=y/p;Math.abs(b-1)>bd&&this._append(rd||(rd=pd(["L",",",""])),t+b*u,e+b*l),this._append(od||(od=pd(["A",",",",0,0,",",",",",""])),r,r,+(l*f>u*d),this._x1=t+x*a,this._y1=e+x*c)}else this._append(id||(id=pd(["L",",",""])),this._x1=t,this._y1=e);else;},e.arc=function(t,e,n,i,r,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error("negative radius: "+n);let s=n*Math.cos(i),a=n*Math.sin(i),c=t+s,u=e+a,l=1^o,h=o?i-r:r-i;null===this._x1?this._append(sd||(sd=pd(["M",",",""])),c,u):(Math.abs(this._x1-c)>bd||Math.abs(this._y1-u)>bd)&&this._append(ad||(ad=pd(["L",",",""])),c,u),n&&(h<0&&(h=h%yd+yd),h>xd?this._append(cd||(cd=pd(["A",",",",0,1,",",",",","A",",",",0,1,",",",",",""])),n,n,l,t-s,e-a,n,n,l,this._x1=c,this._y1=u):h>bd&&this._append(ud||(ud=pd(["A",",",",0,",",",",",",",""])),n,n,+(h>=vd),l,this._x1=t+n*Math.cos(r),this._y1=e+n*Math.sin(r)))},e.rect=function(t,e,n,i){this._append(ld||(ld=pd(["M",",","h","v","h","Z"])),this._x0=this._x1=+t,this._y0=this._y1=+e,n=+n,+i,-n)},e.toString=function(){return this._},t}();function Td(t){var e=this;let n=3;return t.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError("invalid digits: "+e);n=t}return t},function(){return o(this,e),new _d(n)}.bind(this)}function wd(t){return t.innerRadius}function Ad(t){return t.outerRadius}function Sd(t){return t.startAngle}function Ed(t){return t.endAngle}function kd(t){return t&&t.padAngle}function Od(t,e,n,i,r,o,s){var a=t-n,c=e-i,u=(s?o:-o)/Bl(a*a+c*c),l=u*c,h=-u*a,f=t+l,d=e+h,g=n+l,p=i+h,v=(f+g)/2,y=(d+p)/2,b=g-f,x=p-d,m=b*b+x*x,_=r-o,T=f*p-g*d,w=(x<0?-1:1)*Bl(zl(0,_*_*m-T*T)),A=(T*x-b*w)/m,S=(-T*b-x*w)/m,E=(T*x+b*w)/m,k=(-T*b+x*w)/m,O=A-v,M=S-y,R=E-v,C=k-y;return O*O+M*M>R*R+C*C&&(A=E,S=k),{cx:A,cy:S,x01:-l,y01:-h,x11:A*(r/_-1),y11:S*(r/_-1)}}function Md(){var t=wd,e=Ad,n=fd(0),i=null,r=Sd,o=Ed,s=kd,a=null,c=Td(u);function u(){var u,l,h=+t.apply(this,arguments),f=+e.apply(this,arguments),d=r.apply(this,arguments)-Ul,g=o.apply(this,arguments)-Ul,p=Ll(g-d),v=g>d;if(a||(a=u=c()),fXl)if(p>Yl-Xl)a.moveTo(f*Nl(d),f*jl(d)),a.arc(0,0,f,d,g,!v),h>Xl&&(a.moveTo(h*Nl(g),h*jl(g)),a.arc(0,0,h,g,d,v));else{var y,b,x=d,m=g,_=d,T=g,w=p,A=p,S=s.apply(this,arguments)/2,E=S>Xl&&(i?+i.apply(this,arguments):Bl(h*h+f*f)),k=Fl(Ll(f-h)/2,+n.apply(this,arguments)),O=k,M=k;if(E>Xl){var R=Vl(E/h*jl(S)),C=Vl(E/f*jl(S));(w-=2*R)>Xl?(_+=R*=v?1:-1,T-=R):(w=0,_=T=(d+g)/2),(A-=2*C)>Xl?(x+=C*=v?1:-1,m-=C):(A=0,x=m=(d+g)/2)}var I=f*Nl(x),P=f*jl(x),L=h*Nl(T),D=h*jl(T);if(k>Xl){var N,z=f*Nl(m),F=f*jl(m),j=h*Nl(_),B=h*jl(_);if(p<$l)if(N=function(t,e,n,i,r,o,s,a){var c=n-t,u=i-e,l=s-r,h=a-o,f=h*c-l*u;if(!(f*f1?0:t<-1?$l:Math.acos(t)}((X*U+$*Y)/(Bl(X*X+$*$)*Bl(U*U+Y*Y)))/2),G=Bl(N[0]*N[0]+N[1]*N[1]);O=Fl(k,(h-G)/(V-1)),M=Fl(k,(f-G)/(V+1))}else O=M=0}A>Xl?M>Xl?(y=Od(j,B,I,P,f,M,v),b=Od(z,F,L,D,f,M,v),a.moveTo(y.cx+y.x01,y.cy+y.y01),MXl&&w>Xl?O>Xl?(y=Od(L,D,z,F,h,-O,v),b=Od(I,P,j,B,h,-O,v),a.lineTo(y.cx+y.x01,y.cy+y.y01),O0&&(d+=h);for(null!=e?g.sort((function(t,n){return e(p[t],p[n])})):null!=n&&g.sort((function(t,e){return n(s[t],s[e])})),a=0,u=d?(y-f*x)/d:0;a0?h*u:0)+x,p[c]={data:s[c],index:a,value:h,startAngle:v,endAngle:l,padAngle:b};return p}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:fd(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:fd(+t),s):i},s.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:fd(+t),s):r},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:fd(+t),s):o},s}().startAngle(s).endAngle(s+2*Math.PI).padAngle(a).value(function(e){var n=this;return o(this,t),e.values.reduce(function(t,e){return o(this,n),t+e.value}.bind(this),0)}.bind(this)).sort(e.getSortCompareFn.bind(e)(!0))},updateRadius:function(){const t=this,e=t.config,n=t.state,i=e[e.data_type+"_padding"],r=e.gauge_width||e.donut_width,o=t.filterTargetsToShow(t.data.targets).length*e.gauge_arcs_minWidth;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?.85:1),n.radius=.95*n.radiusExpanded,n.innerRadiusRatio=r?(n.radius-r)/n.radius:.6,n.gaugeArcWidth=r||(o<=n.radius-n.innerRadius?n.radius-n.innerRadius:o<=n.radius?o:n.radius);const s=e.pie_innerRadius||(i?i*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:s},getRadius:function(t){const e=this,n=null==t?void 0:t.data;let i=e.state,r=i.innerRadius,o=i.outerRadius;return!Vo(r)&&n&&(r=r[n.id]||0),ns(o)&&n&&n.id in o?o=o[n.id]:Vo(o)||(o=e.state.radius),{innerRadius:r,outerRadius:o}},updateArc:function(){const t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength:function(){const t=3.6*this.config.gauge_arcLength;let e=t/360*2;return t<-360?e=-2:t>360&&(e=2),e*Math.PI},getGaugeStartAngle:function(){const t=this.config,e=t.gauge_fullCircle,n=-1*Math.PI/2,i=Math.PI/2;let r=t.gauge_startingAngle;return!e&&r<=n?r=n:!e&&r>=i?r=i:(r>Math.PI||r<-1*Math.PI)&&(r=Math.PI),r},updateAngle:function(t){var e=this;const n=this,i=n.config,r=n.state;let s=n.pie,a=t,c=!1;if(!i)return null;const u=n.getGaugeStartAngle(),l=i.gauge_fullCircle?n.getArcLength():-2*u;if(a.data&&n.isGaugeType(a.data)&&!n.hasMultiArcGauge()){const t=i.gauge_min,e=i.gauge_max,o=n.getTotalDataSum(r.rendered);s=s.startAngle(u).endAngle(l*((o-t)/(e-t))+u)}if(s(n.filterTargetsToShow()).forEach(function(t,n){var i;o(this,e),c||t.data.id!==(null==(i=a.data)?void 0:i.id)||(c=!0,a=t,a.index=n)}.bind(this)),isNaN(a.startAngle)&&(a.startAngle=0),isNaN(a.endAngle)&&(a.endAngle=a.startAngle),a.data&&n.hasMultiArcGauge()){const t=i.gauge_min,e=i.gauge_max,n=a.value1){var c;let r=n.getRadius(t).outerRadius;n.hasType("polar")&&(r=n.getPolarOuterRadius(t,r));const u=this.svgArc.centroid(s).map(function(t){return o(this,e),isNaN(t)?0:t}.bind(this)),l=u[0],h=u[1],f=Math.sqrt(l*l+h*h);let d=null==(c=["donut","pie","polar"].filter(n.hasType.bind(n)).map(function(t){return o(this,e),i[t+"_label_ratio"]}.bind(this)))?void 0:c[0];d=d?Uo(d)?d.bind(n.api)(t,r,f):d:r&&(f?(36/r>.375?1.175-36/r:.8)*r/f:0),a="translate("+l*d+","+h*d+")"}return a},convertToArcData:function(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function(t){const e=this,n=e.hasType("gauge");e.shouldShowArcLabel()&&t.style("fill",e.updateTextColor.bind(e)).attr("filter",e.updateTextBacgroundColor.bind(e)).each((function(t){var i;const r=Rn(this),o=e.updateAngle(t),s=e.getRatio("arc",o);if(e.meetsLabelThreshold(s,null==(i=["donut","gauge","pie","polar"].filter(e.hasType.bind(e)))?void 0:i[0])){const i=(o||t).value;as(r,(e.getArcLabelFormat()||e.defaultArcValueFormat)(i,s,t.data.id).toString(),[-1,1],n)}else r.text("")}))},expandArc:function(t){var e=this;const n=this,i=n.state.transiting,r=n.$el;if(i){const s=setInterval(function(){o(this,e),i||(clearInterval(s),r.legend.selectAll("."+Gs.legendItemFocused).size()>0&&n.expandArc(t))}.bind(this),10);return}const s=n.mapToTargetIds(t);r.svg.selectAll(n.selectorTargets(s,"."+Ls.chartArc)).each((function(t){if(!n.shouldExpand(t.data.id))return;const e=n.getExpandConfig(t.data.id,"duration"),i=n.getSvgArcExpanded(n.getExpandConfig(t.data.id,"rate"));Rn(this).selectAll("path").transition().duration(e).attrTween("d",Pd(n.svgArcExpanded.bind(n))).transition().duration(2*e).attrTween("d",Pd(i.bind(n)))}))},unexpandArc:function(t){var e=this;const n=this,i=n.state.transiting,r=n.$el.svg;if(i)return;const s=n.mapToTargetIds(t);r.selectAll(n.selectorTargets(s,"."+Ls.chartArc)).selectAll("path").transition().duration(function(t){return o(this,e),n.getExpandConfig(t.data.id,"duration")}.bind(this)).attrTween("d",Pd(n.svgArc.bind(n))),r.selectAll(""+Ls.arc).style("opacity",null)},getExpandConfig:function(t,e){const n=this,i=n.config;let r;return n.isDonutType(t)?r="donut":n.isGaugeType(t)?r="gauge":n.isPieType(t)&&(r="pie"),r?i[r+"_expand_"+e]:{duration:50,rate:.98}[e]},shouldExpand:function(t){const e=this,n=e.config;return e.isDonutType(t)&&n.donut_expand||e.isGaugeType(t)&&n.gauge_expand||e.isPieType(t)&&n.pie_expand},shouldShowArcLabel:function(){var t=this;const e=this,n=e.config;return["donut","gauge","pie","polar"].some(function(i){return o(this,t),e.hasType(i)&&n[i+"_label_show"]}.bind(this))},getArcLabelFormat:function(){var t=this;const e=this,n=e.config;let i=function(e){return o(this,t),e}.bind(this);return["donut","gauge","pie","polar"].filter(e.hasType.bind(e)).forEach(function(e){o(this,t),i=n[e+"_label_format"]}.bind(this)),Uo(i)?i.bind(e.api):i},updateTargetsForArc:function(t){var e=this;const n=this,i=n.$el,r=n.hasType("gauge"),s=n.getChartClass("Arc"),a=n.getClass("arcs",!0),c=n.classFocus.bind(n),u=i.main.select("."+Ls.chartArcs),l=u.selectAll("."+Ls.chartArc).data(n.pie(t)).attr("class",function(t){return o(this,e),s(t)+c(t.data)}.bind(this)),h=l.enter().append("g").attr("class",s).call(this.setCssRule(!1,"."+Ls.chartArcs+" text",["pointer-events:none","text-anchor:middle"]));h.append("g").attr("class",a).merge(l),h.append("text").attr("dy",r&&!n.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor",n.getStylePropValue("middle")).style("pointer-events",n.getStylePropValue("none")),i.text=u.selectAll("."+Ps.target+" text")},initArc:function(){const t=this,e=t.$el;e.arcs=e.main.select("."+Ps.chart).append("g").attr("class",Ls.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle:function(t){const e=this,n=t||e.getArcTitle(),i=e.hasType("gauge");if(n){const t=i?$s.chartArcsGaugeTitle:Ls.chartArcsTitle;let r=e.$el.arcs.select("."+t);r.empty()&&(r=e.$el.arcs.append("text").attr("class",t).style("text-anchor","middle")),i&&r.attr("dy","-0.3em"),as(r,n,i?void 0:[-.6,1.35],!0)}},getArcTitle:function(){const t=this,e=t.hasType("donut")?"donut":t.hasType("gauge")&&"gauge";return e?t.config[e+"_title"]:""},getArcTitleWithNeedleValue:function(){const t=this,e=t.config,n=t.state,i=t.getArcTitle();if(i&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(i)){let t=n.current.needle;return Vo(t)||(t=e.arc_needle_value),Es(i,{NEEDLE_VALUE:Vo(t)?t:0})}return!1},redrawArc:function(t,e,n){var i=this;const r=this,s=r.config,a=r.state,c=r.$el.main,u=s.interaction_enabled,l=u&&s.data_selection_isselectable;let h=c.selectAll("."+Ls.arcs).selectAll("."+Ls.arc).data(r.arcData.bind(r));h.exit().transition().duration(e).style("opacity","0").remove(),h=h.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",function(t){return o(this,i),r.color(t.data)}.bind(this)).style("cursor",function(t){return o(this,i),null!=l&&null!=l.bind&&l.bind(r.api)(t)?"pointer":null}.bind(this)).style("opacity","0").each((function(t){r.isGaugeType(t.data)&&(t.startAngle=s.gauge_startingAngle,t.endAngle=s.gauge_startingAngle),this._current=t})).merge(h),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawMultiArcGauge()),h.attr("transform",function(t){return o(this,i),!r.isGaugeType(t.data)&&n?"scale(0)":""}.bind(this)).style("opacity",(function(t){return t===this._current?"0":null})).each(function(){o(this,i),a.transiting=!0}.bind(this)).transition().duration(t).attrTween("d",(function(t){var e=this;const n=r.updateAngle(t);if(!n)return function(){return o(this,e),"M 0 0"}.bind(this);isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const i=Ki(this._current,n);return this._current=i(0),function(e){const n=i(e);return n.data=t.data,r.getArc(n,!0)}})).attr("transform",n?"scale(1)":"").style("fill",function(t){let e;return o(this,i),r.levelColor?(e=r.levelColor(t.data.values[0].value),s.data_colors[t.data.id]=e):e=r.color(t.data),e}.bind(this)).style("opacity",null).call(os,(function(){if(r.levelColor){const t=Rn(this),e=t.datum(this._current);r.updateLegendItemColor(e.data.id,t.style("fill"))}a.transiting=!1,rs(s.onrendered,r.api)})),u&&r.bindArcEvent(h),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),s.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t)},redrawNeedle:function(){var t=this;const e=this,n=e.$el,i=e.config,r=e.state,s=r.hiddenTargetIds,a=(r.radius-1)/100*i.arc_needle_length,c=s.length!==e.data.targets.length;let u=e.$el.arcs.select("."+Ls.needle);const l=i.arc_needle_path,h=i.arc_needle_bottom_width/2,f=i.arc_needle_top_width/2,d=i.arc_needle_top_rx,g=i.arc_needle_top_ry,p=i.arc_needle_bottom_len,v=i.arc_needle_bottom_rx,y=i.arc_needle_bottom_ry,b=e.getNeedleAngle(),x=function(){o(this,t);const n=e.getArcTitleWithNeedleValue();n&&e.setArcTitle(n)}.bind(this);if(x(),u.empty()&&(u=n.arcs.append("path").classed(Ls.needle,!0),n.needle=u,n.needle.updateHelper=function(r,s){var a=this;void 0===s&&(s=!1),o(this,t),"none"!==n.needle.style("display")&&e.$T(n.needle).style("transform","rotate("+e.getNeedleAngle(r)+"deg)").call(os,function(){o(this,a),s&&(i.arc_needle_value=r),x()}.bind(this))}.bind(this)),c){const t=Uo(l)?l.call(e,a):"M-"+h+" "+p+" A"+v+" "+y+" 0 0 0 "+h+" "+p+" L"+f+" -"+a+" A"+d+" "+g+" 0 0 0 -"+f+" -"+a+" L-"+h+" "+p+" Z";e.$T(u).attr("d",t).style("fill",i.arc_needle_color).style("display",null).style("transform","rotate("+b+"deg)")}else u.style("display","none")},getNeedleAngle:function(t){const e=this,n=e.config,i=e.state,r=e.getArcLength(),o=e.hasType("gauge"),s=e.getTotalDataSum(!0);let a=Ho(t)?t:n.arc_needle_value,c=n[n.data_type+"_startingAngle"]||0,u=0;if(Vo(a)||(a=o&&1===e.data.targets.length?s:0),i.current.needle=a,o){c=e.getGaugeStartAngle();const t=n.gauge_fullCircle?r:-2*c,i=n.gauge_min;u=t*((a-i)/(n.gauge_max-i))}else u=r*(a/s);return(c+u)*(180/Math.PI)},redrawBackgroundArcs:function(){var t=this;const e=this,n=e.config,i=e.state,r=e.hasMultiArcGauge(),s=n.gauge_fullCircle,a=0===e.filterTargetsToShow(e.data.targets).length&&!!n.data_empty_label_text,c=e.getGaugeStartAngle(),u=s?c+e.getArcLength():-1*c;let l=e.$el.arcs.select((r?"g":"")+"."+Ls.chartArcsBackground);if(r){let r=0;l=l.selectAll("path."+Ls.chartArcsBackground).data(e.data.targets),l.enter().append("path").attr("class",function(e,n){return o(this,t),Ls.chartArcsBackground+" "+Ls.chartArcsBackground+"-"+n}.bind(this)).merge(l).style("fill",n.gauge_background||null).attr("d",function(s){let l=s.id;if(o(this,t),a||i.hiddenTargetIds.indexOf(l)>=0)return"M 0 0";const h={data:[{value:n.gauge_max}],startAngle:c,endAngle:u,index:r++};return e.getArc(h,!0,!0)}.bind(this)),l.exit().remove()}else l.attr("d",a?"M 0 0":function(){o(this,t);const i={data:[{value:n.gauge_max}],startAngle:c,endAngle:u};return e.getArc(i,!0,!0)}.bind(this))},bindArcEvent:function(t){var e=this;const n=this,i=n.config,r=n.state,s="touch"===r.inputType,a="mouse"===r.inputType;function c(t,e,i){n.expandArc(i),n.api.focus(i),n.toggleFocusLegend(i,!0),n.showTooltip([e],t)}function u(t){const e=(null==t?void 0:t.id)||void 0;n.unexpandArc(e),n.api.revert(),n.revertLegend(),n.hideTooltip()}if(t.on("click",(function(t,e,r){const o=n.updateAngle(e);let s;o&&(s=n.convertToArcData(o),null==n.toggleShape||n.toggleShape(this,s,r),i.data_onclick.bind(n.api)(s,this))})),a&&t.on("mouseover",(function(t,e){var i;if(r.transiting)return;r.event=t;const o=n.updateAngle(e),s=o?n.convertToArcData(o):null;c(this,s,(null==(i=s)?void 0:i.id)||void 0),n.setOverOut(!0,s)})).on("mouseout",function(t,i){if(o(this,e),r.transiting)return;r.event=t;const s=n.updateAngle(i),a=s?n.convertToArcData(s):null;u(),n.setOverOut(!1,a)}.bind(this)).on("mousemove",(function(t,e){const i=n.updateAngle(e),o=i?n.convertToArcData(i):null;r.event=t,n.showTooltip([o],this)})),s&&n.hasArcType()&&!n.radars){const t=function(t){o(this,e);const n=t.changedTouches[0];return Rn(Fn.elementFromPoint(n.clientX,n.clientY))}.bind(this);n.$el.svg.on("touchstart touchmove",(function(e){var i,o;if(r.transiting)return;r.event=e;const s=t(e).datum(),a=null!=(i=s)&&i.data&&s.data.id?n.updateAngle(s):null,l=a?n.convertToArcData(a):null,h=(null==(o=l)?void 0:o.id)||void 0;n.callOverOutForTouch(l),Go(h)?u():c(this,l,h)}))}},redrawArcText:function(t){var e=this;const n=this,i=n.config,r=n.state,s=n.$el,a=s.main,c=s.arcs,u=n.hasType("gauge"),l=n.hasMultiArcGauge();let h;if(u&&1===n.data.targets.length&&i.gauge_title||(h=a.selectAll("."+Ls.chartArc).select("text").style("opacity","0").attr("class",function(t){return o(this,e),n.isGaugeType(t.data)?$s.gaugeValue:null}.bind(this)).call(n.textForArcLabel.bind(n)).attr("transform",n.transformForArcLabel.bind(n)).style("font-size",function(t){return o(this,e),n.isGaugeType(t.data)&&1===n.data.targets.length&&!l?Math.round(r.radius/5)+"px":null}.bind(this)).transition().duration(t).style("opacity",function(t){return o(this,e),n.isTargetToShow(t.data.id)&&n.isArcType(t.data)?null:"0"}.bind(this)),l&&h.attr("dy","-.1em")),a.select("."+Ls.chartArcsTitle).style("opacity",n.hasType("donut")||u?null:"0"),u){var f;const t=i.gauge_fullCircle;t&&(null==(f=h)||f.attr("dy",""+(l?0:Math.round(r.radius/14)))),i.gauge_label_show&&(c.select("."+$s.chartArcsGaugeUnit).attr("dy",(t?1.5:.75)+"em").text(i.gauge_units),c.select("."+$s.chartArcsGaugeMin).attr("dx",-1*(r.innerRadius+(r.radius-r.innerRadius)/(t?1:2))+"px").attr("dy","1.2em").text(n.textForGaugeMinMax(i.gauge_min,!1)),t||c.select("."+$s.chartArcsGaugeMax).attr("dx",r.innerRadius+(r.radius-r.innerRadius)/2+"px").attr("dy","1.2em").text(n.textForGaugeMinMax(i.gauge_max,!0)))}},getArcElementByIdOrIndex:function(t){var e=this;const n=this.$el.arcs,i=Vo(t)?function(n){return o(this,e),n.index===t}.bind(this):function(n){return o(this,e),n.data.id===t}.bind(this);return null==n?void 0:n.selectAll("."+Ps.target+" path").filter(i)}};function Dd(t){return t[0]}function Nd(t){return t[1]}function zd(t,e){var n=fd(!0),i=null,r=gh,o=null,s=Td(a);function a(a){var c,u,l,h=(a=hd(a)).length,f=!1;for(null==i&&(o=r(l=s())),c=0;c<=h;++c)!(c=h;--f)a.point(y[f],b[f]);a.lineEnd(),a.areaEnd()}v&&(y[l]=+t(d,l,u),b[l]=+e(d,l,u),a.point(i?+i(d,l,u):y[l],n?+n(d,l,u):b[l]))}if(g)return a=null,g+""||null}function l(){return zd().defined(r).curve(s).context(o)}return t="function"==typeof t?t:void 0===t?Dd:fd(+t),e="function"==typeof e?e:fd(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Nd:fd(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:fd(+e),i=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:fd(+e),u):t},u.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:fd(+t),u):i},u.y=function(t){return arguments.length?(e="function"==typeof t?t:fd(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:fd(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:fd(+t),u):n},u.lineX0=u.lineY0=function(){return l().x(t).y(e)},u.lineY1=function(){return l().x(t).y(n)},u.lineX1=function(){return l().x(i).y(e)},u.defined=function(t){return arguments.length?(r="function"==typeof t?t:fd(!!t),u):r},u.curve=function(t){return arguments.length?(s=t,null!=o&&(a=s(o)),u):s},u.context=function(t){return arguments.length?(null==t?o=a=null:a=s(o=t),u):o},u}();n=a?n.y(l).x0(h).x1(f):n.x(l).y0(r.area_above?0:r.area_below?i.state.height:h).y1(f),s||(n=n.defined(function(t){return o(this,e),null!==i.getBaseValue(t)}.bind(this))),i.isStepType(t)&&(u=i.convertValuesToStep(u)),c=n.curve(i.getCurve(t))(u)}else u[0]&&(d=i.scale.x(u[0].x),g=i.getYScaleById(t.id)(u[0].value)),c=a?"M "+g+" "+d:"M "+d+" "+g;return c||"M 0 0"}.bind(this)},generateGetAreaPoints:function(t,e){const n=this,i=n.config,r=n.getShapeX(0,t,e),o=n.getShapeY(!!e),s=n.getShapeOffset(n.isAreaType,t,e),a=n.getYScaleById.bind(n);return function(t,c){const u=a.call(n,t.id,e)(n.getShapeYMin(t.id)),l=s(t,c)||u,h=r(t),f=t.value;let d=o(t);return i.axis_rotated&&(f>0&&d0?function(){return o(this,n),c}.bind(this):Vo(u)?function(t){return o(this,n),t*u}.bind(this):null;return function(t,e){o(this,n);const c=s(t,e),u=+a,h=+!u,f=t.value<0,d=r["axis_"+i.axis.getId(t.id)+"_inverted"],g=!d&&f||d&&!f,p=["",""];let v=0;const y=i.isGrouped(t.id),b=!(!l||!y)&&i.isStackingRadiusData(t);if(l){const t=a?h:u,e=c[2][t]-c[0][t];v=!y||b?l(e):0;const n="a"+v+","+v+" "+(g?"1 0 0":"0 0 1")+" ";p[+!a]=""+n+v+","+v,p[+a]=""+n+[-v,v][a?"sort":"reverse"](),g&&p.reverse()}const x=a?"H"+(c[1][u]+(g?v:-v))+" "+p[0]+"V"+(c[2][h]-v)+" "+p[1]+"H"+c[3][u]:"V"+(c[1][h]+(g?-v:v))+" "+p[0]+"H"+(c[2][u]-v)+" "+p[1]+"V"+c[3][h];return"M"+c[0][u]+","+c[0][h]+x+"z"}.bind(this)},isStackingRadiusData:function(t){var e=this;const n=this,i=n.$el,r=n.config,s=n.data,a=n.state,c=t.id,u=t.index,l=t.value;if(a.hiddenTargetIds.indexOf(c)>-1){const t=i.bar.filter(function(t){return o(this,e),t.id===c&&t.value===l}.bind(this));return!t.empty()&&/a\d+/i.test(t.attr("d"))}const h=r.data_groups.find(function(t){return o(this,e),t.indexOf(c)>-1}.bind(this)),f=n.orderTargets(n.filterTargetsToShow(s.targets.filter(n.isBarType,n))).filter(function(t){return o(this,e),h.indexOf(t.id)>-1}.bind(this)).map(function(t){var n=this;return o(this,e),t.values.filter(function(t){return o(this,n),t.index===u&&(Vo(l)&&l>0?t.value>0:t.value<0)}.bind(this))[0]}.bind(this)).filter(Boolean).map(function(t){return o(this,e),t.id}.bind(this));return 0!==l&&f.indexOf(c)===f.length-1},generateGetBarPoints:function(t,e){var n=this;const i=this,r=i.config,s=e?i.axis.subX:i.axis.x,a=i.getIndicesMax(t)+1,c=i.getBarW("bar",s,a),u=i.getShapeX(c,t,!!e),l=i.getShapeY(!!e),h=i.getShapeOffset(i.isBarType,t,!!e),f=i.getYScaleById.bind(i);return function(t,s){o(this,n);const a=t.id,d=f.call(i,a,e)(i.getShapeYMin(a)),g=h(t,s)||d,p=Vo(c)?c:c[t.id]||c._$width,v=r["axis_"+i.axis.getId(a)+"_inverted"],y=t.value,b=u(t);let x=l(t);r.axis_rotated&&!v&&(y>0&&x0&&n.start=e.open),e||null}},$d={initGauge:function(){var t=this;const e=this,n=e.config,i=e.$el.arcs,r=function(e){o(this,t),i.append("text").attr("class",e).style("text-anchor","middle").style("pointer-events","none")}.bind(this);if(e.hasType("gauge")){const t=e.hasMultiArcGauge();i.append(t?"g":"path").attr("class",Ls.chartArcsBackground).style("fill",!t&&n.gauge_background||null),n.gauge_units&&r($s.chartArcsGaugeUnit),n.gauge_label_show&&(r($s.chartArcsGaugeMin),n.gauge_fullCircle||r($s.chartArcsGaugeMax))}},updateGaugeMax:function(){const t=this,e=t.config,n=t.state,i=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);i+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=i-e.gauge_min)},redrawMultiArcGauge:function(){var t=this;const e=this,n=e.config,i=e.state,r=e.$el,s=e.state.hiddenTargetIds,a=r.main.selectAll("."+Ls.arcs).selectAll("."+Ls.arcLabelLine).data(e.arcData.bind(e));a.enter().append("rect").attr("class",function(e){return o(this,t),Ls.arcLabelLine+" "+Ps.target+" "+Ps.target+"-"+e.data.id}.bind(this)).merge(a).style("fill",function(n){return o(this,t),e.levelColor?e.levelColor(n.data.values[0].value):e.color(n.data)}.bind(this)).style("display",n.gauge_label_show?null:"none").each((function(t){let n=0,r=0,o=0,a="";if(s.indexOf(t.data.id)<0){const s=e.updateAngle(t),c=i.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length*(s.index+1),u=s.endAngle-Math.PI/2,l=i.radius-c,h=u-(0===l?0:1/l);n=i.radiusExpanded-i.radius+c,r=Math.cos(h)*l,o=Math.sin(h)*l,a="rotate("+180*u/Math.PI+", "+r+", "+o+")"}Rn(this).attr("x",r).attr("y",o).attr("width",n).attr("height",2).attr("transform",a).style("stroke-dasharray","0, "+(n+2)+", 0")}))},textForGaugeMinMax:function(t,e){const n=this.config.gauge_label_extents;return Uo(n)?n.bind(this.api)(t,e):t},getGaugeLabelHeight:function(){const t=this.config;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge:function(){return this.getGaugeLabelHeight()*(this.config.gauge_label_show?2:2.5)}},Ud={initBubble:function(){const t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle")},getBaseLength:function(){const t=this,e=t.state,n=e.width,i=e.height,r=_a;let o=t.cache.get(r);return o||t.cache.add(r,o=ws("min",[n,i])),o},getBubbleR:function(t){var e=this;const n=this;let i=n.config.bubble_maxR;Uo(i)?i=i.bind(n.api)(t):Vo(i)||(i=n.getBaseLength()/(2*n.getMaxDataCount())+12);const r=ws("max",n.getMinMaxData().max.map(function(t){return o(this,e),n.isBubbleZType(t)?n.getBubbleZData(t.value,"y"):ns(t.value)?t.value.mid:t.value}.bind(this))),s=i*i*Math.PI,a=(n.isBubbleZType(t)?n.getBubbleZData(t.value,"z"):t.value)*(s/r);return Math.sqrt(a/Math.PI)},getBubbleZData:function(t,e){return ns(t)?t[e]:t["y"===e?0:1]}},Yd={initLine:function(){const t=this.$el;t.line=t.main.select("."+Ps.chart).append("g").attr("class",Ys.chartLines).call(this.setCssRule(!1,"."+Ys.chartLines,["pointer-events:none"]))},updateTargetsForLine:function(t){var e=this;const n=this,i=n.$el,r=i.area,s=i.line,a=i.main,c=n.getChartClass("Line"),u=n.getClass("lines",!0),l=n.classFocus.bind(n);s||n.initLine();const h=t.filter(function(t){return o(this,e),!(n.isScatterType(t)||n.isBubbleType(t))}.bind(this)),f=a.select("."+Ys.chartLines).selectAll("."+Ys.chartLine).data(h).attr("class",function(t){return o(this,e),c(t)+l(t)}.bind(this)),d=f.enter().append("g").attr("class",c).style("opacity","0").style("pointer-events",n.getStylePropValue("none"));if(d.append("g").attr("class",u),n.hasTypeOf("Area")){const t=(!r&&d.empty()?f:d).filter(n.isAreaType.bind(n));n.initArea(t)}n.updateTargetForCircle(h,d)},updateLine:function(t,e){var n=this;void 0===e&&(e=!1);const i=this,r=i.format.extraLineClasses,s=i.$el,a=i.$T,c=e?s.subchart:s,u=c.main.selectAll("."+Ys.lines).selectAll("."+Ys.line).data(i.lineData.bind(i));a(u.exit(),t).style("opacity","0").remove(),c.line=u.enter().append("path").attr("class",function(t){return o(this,n),i.getClass("line",!0)(t)+" "+(r(t)||"")}.bind(this)).style("stroke",i.color).merge(u).style("opacity",i.initialOpacity.bind(i)).attr("transform",null)},redrawLine:function(t,e,n){void 0===n&&(n=!1);const i=this.$el;return[(0,this.$T)((n?i.subchart:i).line,e,fs()).attr("d",t).style("stroke",this.color).style("opacity",null)]},getCurve:function(t){var e=this;const n=this;return n.config.axis_rotated&&n.isStepType(t)?function(i){o(this,e);const r=n.getInterpolate(t)(i);return r.orgPoint=r.point,r.pointRotated=function(t,e){1===this._point&&(this._point=2);const n=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,n),this._context.lineTo(t,n),this._x=t,this._y=e},r.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},r}.bind(this):n.getInterpolate(t)},generateDrawLine:function(t,e){var n=this;const i=this,r=i.config,s=i.scale,a=r.line_connectNull,c=r.axis_rotated,u=i.generateGetLinePoints(t,e),l=i.getYScaleById.bind(i),h=function(t){return o(this,n),(e?i.subxx:i.xx).call(i,t)}.bind(this),f=function(t,r){return o(this,n),i.isGrouped(t.id)?u(t,r)[0][1]:l(t.id,e)(i.getBaseValue(t))}.bind(this);let d=zd();d=c?d.x(f).y(h):d.x(h).y(f),a||(d=d.defined(function(t){return o(this,n),null!==i.getBaseValue(t)}.bind(this)));const g=e?s.subX:s.x;return function(t){o(this,n);const u=l(t.id,e);let h,f=a?i.filterRemoveNull(t.values):t.values,p=0,v=0;if(i.isLineType(t)){const e=r.data_regions[t.id];e?h=i.lineWithRegions(f,s.zoom||g,u,e):(i.isStepType(t)&&(f=i.convertValuesToStep(f)),h=d.curve(i.getCurve(t))(f))}else f[0]&&(p=g(f[0].x),v=u(f[0].value)),h=c?"M "+v+" "+p:"M "+p+" "+v;return h||"M 0 0"}.bind(this)},lineWithRegions:function(t,e,n,i){var r=this;const s=this,a=s.config.axis_rotated,c=s.axis.isTimeSeries(),u=[];let l,h,f,d;if(Ho(i)){const e=function(t,e){return o(this,r),Go(t)?e:c?ks.call(s,t):t}.bind(this);for(let n,r=0;n=i[r];r++){const i=e(n.start,t[0].x),o=e(n.end,t[t.length-1].x),s=n.style||{dasharray:"2 2"};u[r]={start:i,end:o,style:s}}}const g=a?function(t){return o(this,r),n(t.value)}.bind(this):function(t){return o(this,r),e(t.x)}.bind(this),p=a?function(t){return o(this,r),e(t.x)}.bind(this):function(t){return o(this,r),n(t.value)}.bind(this),v=function(t){return o(this,r),"M"+t[0][0]+","+t[0][1]+"L"+t[1][0]+","+t[1][1]}.bind(this),y=c?function(t,i,s,c){o(this,r);const u=t.x.getTime(),l=i.x-t.x,d=new Date(u+l*s),g=new Date(u+l*(s+c)),p=a?[[n(h(s)),e(d)],[n(h(s+f)),e(g)]]:[[e(d),n(h(s))],[e(g),n(h(s+f))]];return v(p)}.bind(this):function(t,i,s,c){o(this,r);const u=a?[[n(h(s),!0),e(l(s))],[n(h(s+c),!0),e(l(s+c))]]:[[e(l(s),!0),n(h(s))],[e(l(s+c),!0),n(h(s+c))]];return v(u)}.bind(this),b={x:s.axis.getAxisType("x"),y:s.axis.getAxisType("y")};let x="";for(let i,r=0;i=t[r];r++){const o=t[r-1],a=o&&$o(o.value);let c=s.isWithinRegions(i.x,u);if($o(i.value))if(!Go(u)&&c&&a){if(a){try{c=c.dasharray.split(" ")}catch(t){c="2 2".split(" ")}l=pl(b.x,o.x,i.x),h=pl(b.y,o.value,i.value);const t=e(i.x)-e(o.x),r=n(i.value)-n(o.value),s=Math.sqrt(Math.pow(t,2)+Math.pow(r,2));f=c[0]/s,d=f*c[1];for(let t=f;t<=1;t+=d)x+=y(o,i,t,f),t+d>=1&&(x+=y(o,i,1,0))}}else x+=(r&&a?"L":"M")+g(i)+","+p(i)}return x},isWithinRegions:function(t,e){for(let n,i=0;n=e[i];i++)if(n.start-1?"0":null})),c&&h.forEach(function(t){var e=this;o(this,n),a.main.selectAll("."+Js.selectedCircles+i.getTargetSelectorSuffix(t.id)).selectAll(""+Js.selectedCircle).each(function(n){o(this,e),n.value=t.values[n.index].value}.bind(this))}.bind(this))},updateCircle:function(t){var e=this;void 0===t&&(t=!1);const n=this,i=n.config,r=n.state,s=n.$el,a=i.point_focus_only,c=t?s.subchart:s;if(i.point_show&&!r.toggling){const t=c.main.selectAll("."+js.circles).selectAll("."+js.circle).data(function(t){return o(this,e),n.isLineType(t)&&n.shouldDrawPointsForLine(t)||n.isBubbleType(t)||n.isRadarType(t)||n.isScatterType(t)?a?[t.values[0]]:t.values:[]}.bind(this));t.exit().remove(),t.enter().filter(Boolean).append(n.point("create",this,n.pointR.bind(n),n.getStylePropValue(n.color))),c.circle=c.main.selectAll("."+js.circles+" ."+js.circle).style("stroke",n.getStylePropValue(n.color)).style("opacity",n.initialOpacityForCircle.bind(n))}},redrawCircle:function(t,e,n,i,r){void 0===r&&(r=!1);const o=this,s=o.state.rendered,a=o.$el,c=o.$T,u=r?a.subchart:a,l=u.main.selectAll("."+Js.selectedCircle);if(!o.config.point_show)return[];const h=o.point("update",o,t,e,o.getStylePropValue(o.color),n,i,l),f=o.isCirclePoint()?"c":"",d=fs(),g=o.opacityForCircle.bind(o),p=[];return u.circle.each((function(t){let e=h.bind(this)(t);e=c(e,n||!s,d).style("opacity",g),p.push(e)})),[p,c(l,n).attr(f+"x",t).attr(f+"y",e)]},showCircleFocus:function(t){const e=this,n=e.config,i=e.state,r=i.hasRadar,s=i.resizing,a=i.toggling,c=i.transiting;let u=e.$el.circle;if(!1===c&&n.point_focus_only&&u){const n=(r?e.radarCircleX:e.circleX).bind(e),i=(r?e.radarCircleY:e.circleY).bind(e),c=a||Go(t),l=e.point("update",e,n,i,e.getStylePropValue(e.color),!s&&c);t&&(u=u.filter((function(e){var n=this;const i=null==t.filter?void 0:t.filter(function(t){return o(this,n),t.id===e.id}.bind(this));return!!i.length&&Rn(this).datum(i[0])}))),u.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each((function(t){const n=t.id,i=t.index,r=t.value;let o="hidden";$o(r)&&(l.bind(this)(t),e.expandCircles(i,n),o=""),this.style.visibility=o}))}},hideCircleFocus:function(){const t=this,e=t.config,n=t.$el.circle;e.point_focus_only&&n&&(t.unexpandCircles(),n.style("visibility","hidden"))},circleX:function(t){return this.xx(t)},updateCircleY:function(t){var e=this;void 0===t&&(t=!1);const n=this,i=n.generateGetLinePoints(n.getShapeIndices(n.isLineType),t);return function(r,s){o(this,e);const a=r.id;return n.isGrouped(a)?i(r,s)[0][1]:n.getYScaleById(a,t)(n.getBaseValue(r))}.bind(this)},expandCircles:function(t,e,n){const i=this,r=i.pointExpandedR.bind(i);n&&i.unexpandCircles();const o=i.getShapeByIndex("circle",t,e).classed(Ps.EXPANDED,!0),s=r(o)/i.config.point_r,a=1-s;i.isCirclePoint()?o.attr("r",r):o.each((function(){const t=Rn(this);if("circle"===this.tagName)t.attr("r",r);else{const e=this.getBBox(),n=e.width,i=e.height,r=a*(+t.attr("x")+n/2),o=a*(+t.attr("y")+i/2);t.attr("transform","translate("+r+" "+o+") scale("+s+")")}}))},unexpandCircles:function(t){const e=this,n=e.pointR.bind(e),i=e.getShapeByIndex("circle",t).filter((function(){return Rn(this).classed(Ps.EXPANDED)})).classed(Ps.EXPANDED,!1);if(i.attr("r",n),!e.isCirclePoint()){const t=n(i)/e.config.point_r;i.attr("transform",1!==t?"scale("+t+")":null)}},pointR:function(t){const e=this,n=e.config.point_r;let i=n;return e.isBubbleType(t)?i=e.getBubbleR(t):Uo(n)&&(i=n.bind(e.api)(t)),t.r=i,i},pointExpandedR:function(t){const e=this,n=e.config,i=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*i:e.pointR(t)},pointSelectR:function(t){const e=this.config.point_select_r;return Uo(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function(t,e){const n=us(this.state.event,t),i=Rn(t),r=this.isCirclePoint(t)?"c":"";let o=+i.attr(r+"x"),s=+i.attr(r+"y");if(!o&&!s&&1===t.nodeType){const e=hs(t);o=e.x,s=e.y}return Math.sqrt(Math.pow(o-n[0],2)+Math.pow(s-n[1],2))<(e||this.config.point_sensitivity)},getPointSensitivity:function(t){const e=this;let n=e.config.point_sensitivity;return Uo(n)?n=n.call(e.api,t):"radius"===n&&(n=t.r),n},insertPointInfoDefs:function(t,e){var n,i=this;const r=function(t,e){o(this,i);const n=t.attributes;for(let i,r=0;i=n[r];r++)i=i.name,e.setAttribute(i,t.getAttribute(i))}.bind(this),s=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,a=Fn.createElementNS(Ce.svg,s.nodeName.toLowerCase());if(a.id=e,a.style.fill="inherit",a.style.stroke="inherit",r(s,a),null!=(n=s.childNodes)&&n.length){const t=Rn(a);"innerHTML"in a?t.html(s.innerHTML):ys(s.childNodes).forEach(function(e){o(this,i),r(e,t.append(e.tagName).node())}.bind(this))}this.$el.defs.node().appendChild(a)},pointFromDefs:function(t){return this.$el.defs.select("#"+t)},updatePointClass:function(t){const e=this,n=e.$el.circle;let i=!1;return(ns(t)||n)&&(i=!0===t?n.each((function(t){let n=e.getClass("circle",!0)(t);this.getAttribute("class").indexOf(Ps.EXPANDED)>-1&&(n+=" "+Ps.EXPANDED),this.setAttribute("class",n)})):e.getClass("circle",!0)(t)),i},generateGetLinePoints:function(t,e){var n=this;const i=this,r=i.config,s=i.getShapeX(0,t,e),a=i.getShapeY(e),c=i.getShapeOffset(i.isLineType,t,e),u=i.getYScaleById.bind(i);return function(t,l){o(this,n);const h=u.call(i,t.id,e)(i.getShapeYMin(t.id)),f=c(t,l)||h,d=s(t);let g=a(t);r.axis_rotated&&(t.value>0&&g2?s-2:0),c=2;cn&&(n=e),n}var Wd={initPolar:function(){const t=this,e=t.$el.arcs,n=t.config,i=n.polar_level_text_show,r=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",qs),i&&r&&t.generateDataLabelBackgroundColorFilter(r)},getPolarOuterRadius:function(t,e){var n;const i=Hd(this);return(null!=(n=null==t?void 0:t.data.values[0].value)?n:0)/i*e},updateTargetsForPolar:function(t){this.updateTargetsForArc(t)},redrawPolar:function(){this.config.polar_level_show&&this.updatePolarLevel()},updatePolarLevel:function(){var t=this;const e=this,n=e.config,i=e.state,r=e.$el.arcs.levels,s=n.polar_level_depth,a=Hd(e),c=As(0,s),u=i.radius,l=c.map(function(e){return o(this,t),u*((e+1)/s)}.bind(this)),h=(n.polar_level_text_format||function(){}).bind(e.api),f=r.selectAll("."+Ws).data(c);f.exit().remove();const d=f.enter().append("g").attr("class",function(e,n){return o(this,t),Ws+" "+Ws+"-"+n}.bind(this));if(d.append("circle"),d.merge(f).selectAll("circle").style("visibility",n.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",function(e){return o(this,t),l[e]}.bind(this)),n.polar_level_text_show){const r=n.polar_level_text_backgroundColor,s="#"+i.datetimeId+"-labels-bg"+e.getTargetSelectorSuffix(r);d.append("text").style("text-anchor","middle"),d.merge(f).selectAll("text").attr("dy",function(e){return o(this,t),5-l[e]}.bind(this)).attr("filter",r?"url("+s+")":null).text(function(e){return o(this,t),h(a/c.length*(e+1))}.bind(this))}}};const qd=ka;var Zd={initRadar:function(){const t=this,e=t.config,n=t.state.current,i=t.$el;t.hasType("radar")&&(i.radar=i.main.select("."+Ps.chart).append("g").attr("class",Zs.chartRadars),i.radar.levels=i.radar.append("g").attr("class",qs),i.radar.axes=i.radar.append("g").attr("class",Ns.axis),i.radar.shapes=i.radar.append("g").attr("class",Qs.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function(){const t=this.config,e=this.state,n=e.arcWidth,i=e.arcHeight,r=t.axis_x_categories.length<4?-20:10,o=(Math.min(n,i)-r)/2;return[o,o]},updateTargetsForRadar:function(t){var e=this;const n=this.config;Qo(n.axis_x_categories)&&(n.axis_x_categories=As(0,ws("max",t.map(function(t){return o(this,e),t.values.length}.bind(this))))),this.generateRadarPoints()},getRadarPosition:function(t,e,n,i){var r=this;const s=this.config,a=this.getRadarSize(),c=a[0],u=a[1],l=s.axis_x_categories.length,h=s.radar_direction_clockwise,f=ys(t).map(function(a){return o(this,r),function(t,e,n,i,r,o){const s=t&&i>0?n-i:i,a=2*Math.PI;return r*(1-o*("x"===e?Math.sin:Math.cos)(s*a/n))}(h,a,l,e,Ho(n)?n:"x"===t?c:u,Vo(i)?i:s.radar_size_ratio)}.bind(this));return 1===f.length?f[0]:f},generateRadarPoints:function(){var t=this;const e=this,n=e.data.targets,i=e.getRadarSize(),r=i[0],s=i[1],a=e.cache.get(qd)||{},c=a._size;(!c||c.width!==r&&c.height!==s)&&(n.forEach(function(n){var i=this;o(this,t),a[n.id]=n.values.map(function(t,n){return o(this,i),e.getRadarPosition(["x","y"],n,void 0,e.getRatio("radar",t))}.bind(this))}.bind(this)),a._size={width:r,height:s},e.cache.add(qd,a))},redrawRadar:function(){const t=this,e=t.$el,n=e.radar,i=e.main,r=t.getTranslate("radar");r&&(n.attr("transform",r),i.select("."+ea.chartTexts).attr("transform",r),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints:function(){var t=this;const e=this.cache.get(qd);return function(n,i){o(this,t);const r=e[n.id][i];return[r,r,r,r]}.bind(this)},updateRadarLevel:function(){var t=this;const e=this,n=e.config,i=e.state,r=e.$el.radar,s=e.getRadarSize(),a=s[0],c=s[1],u=n.radar_level_depth,l=n.axis_x_categories.length,h=n.radar_level_text_show,f=r.levels,d=As(0,u),g=n.radar_size_ratio*Math.min(a,c),p=d.map(function(e){return o(this,t),g*((e+1)/u)}.bind(this)),v=(n.radar_level_text_format||function(){}).bind(e.api),y=d.map(function(n){var i=this;o(this,t);const r=p[n];return As(0,l).map(function(t){return o(this,i),e.getRadarPosition(["x","y"],t,r,1).join(",")}.bind(this)).join(" ")}.bind(this)),b=f.selectAll("."+Ws).data(d);b.exit().remove();const x=b.enter().append("g").attr("class",function(e,n){return o(this,t),Ws+" "+Ws+"-"+n}.bind(this));x.append("polygon").style("visibility",n.radar_level_show?null:"hidden"),h&&(f.select("text").empty()&&f.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return o(this,t),v(0)}.bind(this)),x.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(e){return o(this,t),v(i.current.dataMax/d.length*(e+1))}.bind(this))),x.merge(b).attr("transform",function(e){return o(this,t),"translate("+(a-p[e])+", "+(c-p[e])+")"}.bind(this)).selectAll("polygon").attr("points",function(e){return o(this,t),y[e]}.bind(this)),h&&f.selectAll("text").attr("x",function(e){return o(this,t),Go(e)?a:y[e].split(",")[0]}.bind(this)).attr("y",function(e){return o(this,t),Go(e)?c:0}.bind(this))},updateRadarAxes:function(){var t=this;const e=this,n=e.config,i=e.$el.radar,r=e.getRadarSize(),s=r[0],a=r[1],c=n.axis_x_categories;let u=i.axes.selectAll("g").data(c);u.exit().remove();const l=u.enter().append("g").attr("class",function(e,n){return o(this,t),Ns.axis+"-"+n}.bind(this));if(n.radar_axis_line_show&&l.append("line"),n.radar_axis_text_show&&l.append("text"),u=l.merge(u),n.radar_axis_line_show&&u.select("line").attr("x1",s).attr("y1",a).attr("x2",function(n,i){return o(this,t),e.getRadarPosition("x",i)}.bind(this)).attr("y2",function(n,i){return o(this,t),e.getRadarPosition("y",i)}.bind(this)),n.radar_axis_text_show){const i=n.radar_axis_text_position,r=i.x,c=void 0===r?0:r,l=i.y,h=void 0===l?0:l;u.select("text").style("text-anchor","middle").attr("dy",".5em").call(function(e){o(this,t),e.each((function(t){as(Rn(this),t+"",[-.6,1.2])}))}.bind(this)).datum(function(e,n){return o(this,t),{index:n}}.bind(this)).attr("transform",(function(t){Go(this.width)&&(this.width=this.getBoundingClientRect().width/2);let n=e.getRadarPosition("x",t.index,void 0,1),i=Math.round(e.getRadarPosition("y",t.index,void 0,1));return n>s?n+=this.width+c:Math.round(n)a?(i/2===a&&"tspan"===this.firstChild.tagName&&this.firstChild.setAttribute("dy","0em"),i+=h):if&&(f=a),v=l*l*p,(d=Math.max(f/v,v/h))>g){l-=a;break}g=d}y.push(s={value:l,dice:c1?e:1)},n}(tg);function ig(t){if("function"!=typeof t)throw new Error;return t}function rg(){return 0}function og(t){return function(){return t}}function sg(t){var e=0,n=t.children,i=n&&n.length;if(i)for(;--i>=0;)e+=n[i].value;else e=1;t.value=e}function ag(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return cg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cg(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function cg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function lg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0;--o)c.push(i=r[o]=new xg(r[o])),i.parent=n,i.depth=n.depth+1;return a.eachBefore(bg)}function pg(t){return t.children}function vg(t){return Array.isArray(t)?t[1]:null}function yg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function bg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function xg(t){this.data=t,this.depth=this.height=0,this.parent=null}function mg(t,e,n,i,r){var o,s,a=t.children,c=a.length,u=Array(c+1);for(u[0]=s=o=0;o=n-1){var l=a[e];return l.x0=r,l.y0=o,l.x1=s,void(l.y1=c)}var h=u[e],f=i/2+h,d=e+1,g=n-1;for(;d>>1;u[p]c-o){var b=i?(r*y+s*v)/i:s;t(e,d,v,r,o,b,c),t(d,n,y,b,o,s,c)}else{var x=i?(o*y+c*v)/i:c;t(e,d,v,r,o,s,x),t(d,n,y,r,x,s,c)}}(0,c,t.value,e,n,i,r)}function _g(t,e,n,i,r){(1&t.depth?Qd:Jd)(t,e,n,i,r)}xg.prototype=gg.prototype=(hg={constructor:xg,count:function(){return this.eachAfter(sg)},each:function(t,e){let n=-1;for(var i,r=ag(this);!(i=r()).done;){const r=i.value;t.call(e,r,++n,this)}return this},eachAfter:function(t,e){for(var n,i,r,o=this,s=[o],a=[],c=-1;o=s.pop();)if(a.push(o),n=o.children)for(i=0,r=n.length;i=0;--i)o.push(n[i]);return this},find:function(t,e){let n=-1;for(var i,r=ug(this);!(i=r()).done;){const r=i.value;if(t.call(e,r,++n,this))return r}},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;t=n.pop(),e=i.pop();for(;t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)e=e.parent,i.push(e);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return gg(this).eachBefore(yg)}},hg[Symbol.iterator]=dg,hg);var Tg=function t(e){function n(t,n,i,r,o){if((s=t._squarify)&&s.ratio===e)for(var s,a,c,u,l,h=-1,f=s.length,d=t.value;++h1?e:1)},n}(tg);function wg(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ag(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ag(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ag(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0,g=!n||n.indexOf(h)>=0,p=s.classed(Js.SELECTED);s.classed(Ys.line)||s.classed(Ds.area)||(t?d&&g&&c(o)&&!p?f(!0,s.classed(Js.SELECTED,!0),o,h):Ho(i)&&i&&p&&f(!1,s.classed(Js.SELECTED,!1),o,h):d&&g&&c(o)&&p&&f(!1,s.classed(Js.SELECTED,!1),o,h))}))}var fp={selected:function(t){var e=this;const n=this.internal,i=[];return n.$el.main.selectAll("."+(Qs.shapes+n.getTargetSelectorSuffix(t))).selectAll("."+Qs.shape).filter((function(){return Rn(this).classed(Js.SELECTED)})).each(function(t){return o(this,e),i.push(t)}.bind(this)),i},select:function(t,e,n){const i=this.internal;hp.bind(i)(!0,t,e,n)},unselect:function(t,e){const n=this.internal;hp.bind(n)(!1,t,e)}};const dp=function(t){var e=this;const n=this.internal,i=n.axis,r=n.brush,s=n.config,a=n.scale,c=a.x,u=a.subX,l=n.state;let h;if(s.subchart_show)if(h=t,Array.isArray(h)){i.isTimeSeries()&&(h=h.map(function(t){return o(this,e),ks.bind(n)(t)}.bind(this)));n.withinRange(h,n.getZoomDomain("subX",!0),n.getZoomDomain("subX"))&&(l.domain=h,r.move(r.getSelection(),h.map(u)))}else{var f;h=null!=(f=l.domain)?f:c.orgDomain()}return h};ps(dp,{show:function(){const t=this.internal,e=t.$el.subchart,n=t.config,i=n.subchart_show;if(!i){var r,o;t.unbindZoomEvent(),n.subchart_show=!i,e.main||t.initSubchart();let a=e.main.selectAll("."+Ps.target);var s;if(t.data.targets.length!==a.size())t.updateSizes(),t.updateTargetsForSubchart(t.data.targets),a=null==(s=e.main)?void 0:s.selectAll("."+Ps.target);null==(r=a)||r.style("opacity",null),null==(o=e.main)||o.style("display",null),this.resize()}},hide:function(){const t=this.internal,e=t.$el.subchart.main,n=t.config;n.subchart_show&&"none"!==(null==e?void 0:e.style("display"))&&(n.subchart_show=!1,e.style("display","none"),this.resize())},toggle:function(){const t=this.internal.config;this.subchart[t.subchart_show?"hide":"show"]()},reset:function(){const t=this.internal.brush;t.clear(t.getSelection())}});var gp={subchart:dp};function pp(t){return((t=Math.exp(t))+1/t)/2}var vp=function t(e,n,i){function r(t,r){var o,s,a=t[0],c=t[1],u=t[2],l=r[0],h=r[1],f=r[2],d=l-a,g=h-c,p=d*d+g*g;if(p<1e-12)s=Math.log(f/u)/e,o=function(t){return[a+t*d,c+t*g,u*Math.exp(e*t*s)]};else{var v=Math.sqrt(p),y=(f*f-u*u+i*p)/(2*u*n*v),b=(f*f-u*u-i*p)/(2*f*n*v),x=Math.log(Math.sqrt(y*y+1)-y),m=Math.log(Math.sqrt(b*b+1)-b);s=(m-x)/e,o=function(t){var i=t*s,r=pp(x),o=u/(n*v)*(r*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(e*i+x)-function(t){return((t=Math.exp(t))-1/t)/2}(x));return[a+o*d,c+o*g,u*r/pp(e*i+x)]}}return o.duration=1e3*s*e/Math.SQRT2,o}return r.rho=function(e){var n=Math.max(.001,+e),i=n*n;return t(n,i,i*i)},r}(Math.SQRT2,2,4),yp=function(t){var e=this;return o(this,undefined),function(){return o(this,e),t}.bind(this)}.bind(void 0);function bp(t,e){let n=e.sourceEvent,i=e.target,r=e.transform,o=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function xp(t,e,n){this.k=t,this.x=e,this.y=n}xp.prototype={constructor:xp,scale:function(t){return 1===t?this:new xp(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new xp(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var mp=new xp(1,0,0);function _p(t){for(;!t.__zoom;)if(!(t=t.parentNode))return mp;return t.__zoom}function Tp(t){t.stopImmediatePropagation()}function wp(t){t.preventDefault(),t.stopImmediatePropagation()}function Ap(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Sp(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Ep(){return this.__zoom||mp}function kp(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Op(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mp(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}_p.prototype=xp.prototype;const Rp=function(t){var e,n=this;const i=this.internal,r=i.$el,s=i.axis,a=i.config,c=i.org,u=i.scale,l=i.state,h=a.axis_rotated,f=s.isCategorized();let d;if(a.zoom_enabled)if(d=t,Array.isArray(d)){s.isTimeSeries()&&(d=d.map(function(t){return o(this,n),ks.bind(i)(t)}.bind(this)));if(i.withinRange(d,i.getZoomDomain("zoom",!0),i.getZoomDomain("zoom"))){if(l.domain=d,f&&(d=d.map(function(t,e){return o(this,n),+t+(0===e?0:1)}.bind(this))),i.api.tooltip.hide(),a.subchart_show){const t=u.zoom||u.x;i.brush.getSelection().call(i.brush.move,d.map(t))}else{var g;const t=f?u.x.orgScale():c.xScale||u.x,e=[-t(d[0]),0],n=(g=mp.scale(t.range()[1]/(t(d[1])-t(d[0])))).translate.apply(g,h?e.reverse():e);r.eventRect.call(i.zoom.transform,n)}i.setZoomResetButton()}}else d=i.zoom.getDomain();return null!=(e=l.domain)?e:d};ps(Rp,{enable:function(t){const e=this.internal,n=e.config;/^(drag|wheel)$/.test(t)&&(n.zoom_type=t),n.zoom_enabled=!!t,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function(t){const e=this.internal,n=e.config,i=e.org.xDomain;return(0===t||t)&&(n.zoom_x_max=ws("max",[i[1],t])),n.zoom_x_max},min:function(t){const e=this.internal,n=e.config,i=e.org.xDomain;return(0===t||t)&&(n.zoom_x_min=ws("min",[i[0],t])),n.zoom_x_min},range:function(t){const e=this.zoom;if(ns(t)){const n=t.min,i=t.max;Ho(n)&&e.min(n),Ho(i)&&e.max(i)}return{min:e.min(),max:e.max()}}});var Cp={zoom:Rp,unzoom:function(){const t=this.internal,e=t.config,n=t.$el,i=n.eventRect,r=n.zoomResetBtn,o=t.state;t.scale.zoom&&(e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(mp),t.updateZoom(!0),null==r||r.style("display","none"),_p(i.node())!==mp&&t.zoom.transform(i,mp),o.domain=void 0)}},Ip={drag:function(t){var e=this;const n=this,i=n.config,r=n.state,s=n.$el.main,a=i.data_selection_grouped,c=i.interaction_enabled&&i.data_selection_isselectable;if(n.hasArcType()||!i.data_selection_enabled||i.zoom_enabled&&!n.zoom.altDomain||!i.data_selection_multiple)return;const u=r.dragStart||[0,0],l=u[0],h=u[1],f=t[0],d=t[1],g=Math.min(l,f),p=Math.max(l,f),v=a?r.margin.top:Math.min(h,d),y=a?r.height:Math.max(h,d);s.select("."+Xs.dragarea).attr("x",g).attr("y",v).attr("width",p-g).attr("height",y-v),s.selectAll("."+Qs.shapes).selectAll("."+Qs.shape).filter(function(t){return o(this,e),null==c?void 0:c.bind(n.api)(t)}.bind(this)).each((function(t,e){const i=Rn(this),r=i.classed(Js.SELECTED),o=i.classed(Xs.INCLUDED);let s,a=!1;if(i.classed(js.circle)){const t=1*+i.attr("cx"),e=1*+i.attr("cy");s=n.togglePoint,a=g0?r:e]}.bind(this))),a&&s[1].reverse(),this.extent(s),this.update()},e.brush.getSelection=function(){return o(this,t),r.main?r.main.select("."+oa.brush):Rn([])}.bind(this)},initSubchart:function(){var t=this;const e=this,n=e.config,i=e.state,r=i.clip,s=i.hasAxis,a=e.$el,c=a.defs,u=a.svg,l=a.subchart,h=a.axis;if(!s)return;const f=n.subchart_show?null:"hidden",d=r.id+"-subchart",g=e.getClipPath(d);r.idSubchart=d,e.appendClip(c,d),e.initBrush(),l.main=u.append("g").classed(oa.subchart,!0).attr("transform",e.getTranslate("context"));const p=l.main;p.style("visibility",f),p.append("g").attr("clip-path",g).attr("class",oa.chart),["bar","line","bubble","candlestick","scatter"].forEach(function(n){o(this,t);const i=vs(/^(bubble|scatter)$/.test(n)?"circle":n);if(e.hasType(n)||e.hasTypeOf(i)){const t=p.select("."+oa.chart),e=oa["chart"+i+"s"];t.select("."+e).empty()&&t.append("g").attr("class",e)}}.bind(this));const v=p.append("g").attr("clip-path",g).attr("class",oa.brush).call(e.brush);n.subchart_showHandle&&e.addBrushHandle(v),h.subX=p.append("g").attr("class",oa.axisX).attr("transform",e.getTranslate("subX")).attr("clip-path",n.axis_rotated?"":r.pathXAxis).style("visibility",n.subchart_axis_x_show?f:"hidden")},addBrushHandle:function(t){var e=this;const n=this.config,i=n.axis_rotated,r=n.subchart_init_range,s=i?["M 5.2491724,29.749209 a 6,6 0 0 0 -5.50000003,-6.5 H -5.7508276 a 6,6 0 0 0 -6.0000004,6.5 z m -5.00000003,-2 H -6.7508276 m 6.99999997,-2 H -6.7508276Z","M 5.2491724,23.249172 a 6,-6 0 0 1 -5.50000003,6.5 H -5.7508276 a 6,-6 0 0 1 -6.0000004,-6.5 z m -5.00000003,2 H -6.7508276 m 6.99999997,2 H -6.7508276Z"]:["M 0 18 A 6 6 0 0 0 -6.5 23.5 V 29 A 6 6 0 0 0 0 35 Z M -2 23 V 30 M -4 23 V 30Z","M 0 18 A 6 6 0 0 1 6.5 23.5 V 29 A 6 6 0 0 1 0 35 Z M 2 23 V 30 M 4 23 V 30Z"];this.brush.handle=t.selectAll(".handle--custom").data(i?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class","handle--custom").attr("cursor",(i?"ns":"ew")+"-resize").attr("d",function(t){return o(this,e),s[+/[se]/.test(t.type)]}.bind(this)).attr("display",r?null:"none")},updateTargetsForSubchart:function(t){var e=this;const n=this,i=n.config,r=n.state,s=n.$el.subchart.main;i.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter(function(t){return o(this,e),n.hasType(t)||n.hasTypeOf(vs(t))}.bind(this)).forEach(function(i){o(this,e);const r=/^(bubble|scatter)$/.test(i),a=vs(r?"circle":i),c=n.getChartClass(a,!0),u=n.getClass(r?"circles":i+"s",!0),l=s.select("."+oa["chart"+a+"s"]);if(r){const e=l.selectAll("."+oa.circles).data(t.filter(n["is"+vs(i)+"Type"].bind(n))).attr("class",u);e.exit().remove(),e.enter().append("g").attr("class",u)}else{const e=l.selectAll("."+oa["chart"+a]).attr("class",c).data(t.filter(n["is"+a+"Type"].bind(n))),r=e.enter().append("g").style("opacity","0").attr("class",c).append("g").attr("class",u);e.exit().remove(),"line"===i&&n.hasTypeOf("Area")&&r.append("g").attr("class",n.getClass("areas",!0))}}.bind(this)),s.selectAll("."+oa.brush+" rect").attr(i.axis_rotated?"width":"height",i.axis_rotated?r.width2:r.height2))},redrawSubchart:function(t,e,n){var i=this;const r=this,s=r.config,a=r.$el.subchart.main,c=r.state,u=!!e;var l;if((a.style("visibility",s.subchart_show?null:"hidden"),s.subchart_show)&&("zoom"===(null==(l=c.event)?void 0:l.type)&&r.brush.update(),t)){const t=s.subchart_init_range;if(gs(r)||r.brush.update(),Object.keys(n.type).forEach(function(t){o(this,i);const e=vs(t),s=r["generateDraw"+e](n.indices[t],!0);r["update"+e](u,!0),r["redraw"+e](s,u,!0)}.bind(this)),r.hasType("bubble")||r.hasType("scatter")){const t=n.pos.cx,e=r.updateCircleY(!0);r.updateCircle(!0),r.redrawCircle(t,e,u,void 0,!0)}!c.rendered&&t&&(c.domain=t,r.brush.move(r.brush.getSelection(),t.map(r.scale.x)))}},redrawForBrush:function(t){var e;void 0===t&&(t=!0);const n=this,i=n.config,r=i.subchart_onbrush,o=i.zoom_rescale,s=n.scale,a=n.state;n.redraw({withTransition:!1,withY:o,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&a.rendered&&r.bind(n.api)(null!=(e=a.domain)?e:s.x.orgDomain())},transformContext:function(t,e){const n=this,i=n.$el.subchart,r=n.$T,o=null!=e&&e.axisSubX?e.axisSubX:r(i.main.select("."+oa.axisX),t);i.main.attr("transform",n.getTranslate("context")),o.attr("transform",n.getTranslate("subX"))},getExtent:function(){var t=this;const e=this,n=e.config,i=e.scale;let r=n.axis_x_extent;if(r)if(Uo(r))r=r.bind(e.api)(e.getXDomain(e.data.targets),i.subX);else if(e.axis.isTimeSeries()&&r.every(isNaN)){const n=ks.bind(e);r=r.map(function(e){return o(this,t),i.subX(n(e))}.bind(this))}return r}},zp={initZoom:function(){const t=this;t.scale.zoom=null,t.generateZoom(),t.initZoomBehaviour()},bindZoomEvent:function(t){void 0===t&&(t=!0);const e=this,n=e.config;n.zoom_enabled&&t?n.subchart_show||e.bindZoomOnEventRect():!1===t&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom:function(){var t=this;const e=this,n=e.config,i=e.org,r=e.scale,s=function(){var t,e,n,i=Ap,r=Sp,o=Mp,s=kp,a=Op,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],l=250,h=vp,f=Kn("start","zoom","end"),d=0,g=10;function p(t){t.property("__zoom",Ep).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",A).filter(a).on("touchstart.zoom",S).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(c[0],Math.min(c[1],e)))===t.k?t:new xp(e,t.x,t.y)}function y(t,e,n){var i=e[0]-n[0]*t.k,r=e[1]-n[1]*t.k;return i===t.x&&r===t.y?t:new xp(t.k,i,r)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,e,n,i){t.on("start.zoom",(function(){m(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){m(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,o=arguments,s=m(t,o).event(i),a=r.apply(t,o),c=null==n?b(a):"function"==typeof n?n.apply(t,o):n,u=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=t.__zoom,f="function"==typeof e?e.apply(t,o):e,d=h(l.invert(c).concat(u/l.k),f.invert(c).concat(u/f.k));return function(t){if(1===t)t=f;else{var e=d(t),n=u/e[2];t=new xp(n,c[0]-e[0]*n,c[1]-e[1]*n)}s.zoom(null,t)}}))}function m(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=r.apply(t,e),this.taps=0}function T(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r1?e-1:0),s=1;sd}c.event(t).zoom("mouse",o(y(c.that.__zoom,c.mouse[0]=Vn(t,a),c.mouse[1]),c.extent,u))}),!0).on("mouseup.zoom",(function(t){l.on("mousemove.zoom mouseup.zoom",null),ii(t.view,c.moved),wp(t),c.event(t).end()}),!0),h=Vn(t,a),f=t.clientX,g=t.clientY;ni(t.view),Tp(t),c.mouse=[h,this.__zoom.invert(h)],Rr(this),c.start()}}function A(t){for(var e=arguments.length,n=Array(e>1?e-1:0),s=1;s0?Rn(this).transition().duration(l).call(x,d,c,t):Rn(this).call(p.transform,d,c,t)}}function S(n){for(var r=arguments.length,o=Array(r>1?r-1:0),s=1;s1?e-1:0),i=1;i1?i-1:0),o=1;o-1&&1===(null==u?void 0:u.touches.length))return;t.sourceEvent&&(a.zooming=!0,a.domain=void 0);const h="mousemove"===(null==u?void 0:u.type),f=(null==u?void 0:u.wheelDelta)<0,d=t.transform;!h&&f&&s.x.domain().every(function(t,e){return o(this,n),t!==c.xDomain[e]}.bind(this))&&s.x.domain(c.xDomain),i.zoom.updateTransformScale(d,"wheel"===r.zoom_type&&u);const g=r.transition_duration>0&&!r.subchart_show&&(a.dragging||l||!t.sourceEvent);i.redraw({withTransition:g,withY:r.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),i.state.cancelClick=h,l||rs(r.zoom_onzoom,i.api,null!=(e=i.state.domain)?e:i.zoom.getDomain())},onZoomEnd:function(t){var e,n;const i=this,r=i.config,o=i.state;let s=i.zoom.startEvent,a=null==t?void 0:t.sourceEvent;const c=(null==t?void 0:t.transform)===mp;var u;(null==(e=s)?void 0:e.type.indexOf("touch"))>-1&&(s=s.changedTouches[0],a=null==(u=a)||null==(u=u.changedTouches)?void 0:u[0]);"drag"===r.zoom_type&&a&&s.clientX===a.clientX&&s.clientY===a.clientY||(i.redrawEventRect(),i.updateZoom(),o.zooming=!1,!c&&(a||o.dragging)&&rs(r.zoom_onzoomend,i.api,null!=(n=i.state.domain)?n:i.zoom.getDomain()))},updateZoom:function(t){const e=this,n=e.scale,i=n.subX,r=n.x,o=n.zoom;if(o){const n=o.domain(),s=i.domain(),a=.015,c=e.config.axis_x_inverted?(n[0]>=s[0]||n[0]+a>=s[0])&&(s[1]>=n[1]||s[1]>=n[1]+a):(n[0]<=s[0]||n[0]-a<=s[0])&&(s[1]<=n[1]||s[1]<=n[1]-a);(t||c)&&(e.axis.x.scale(i),r.domain(i.orgDomain()),e.scale.zoom=null)}},bindZoomOnEventRect:function(){var t=this;const e=this,n=e.config,i=e.$el.eventRect,r="drag"===n.zoom_type?e.zoomBehaviour:e.zoom;e.$el.svg.on("wheel",function(){o(this,t)}.bind(this)),i.call(r).on("dblclick.zoom",null)},initZoomBehaviour:function(){var t=this;const e=this,n=e.config,i=e.state,r=n.axis_rotated;let s,a=0,c=0;const u={axis:r?"y":"x",attr:r?"height":"width",index:r?1:0};e.zoomBehaviour=dc().clickDistance(4).on("start",(function(t){i.event=t,e.setDragStatus(!0),e.unselectRect(),s||(s=e.$el.main.append("rect").attr("clip-path",i.clip.path).attr("class",ra.zoomBrush).attr("width",r?i.width:0).attr("height",r?0:i.height)),a=us(t,this)[u.index],c=a,s.attr(u.axis,a).attr(u.attr,0),e.onZoomStart(t)})).on("drag",(function(t){c=us(t,this)[u.index],s.attr(u.axis,Math.min(a,c)).attr(u.attr,Math.abs(c-a))})).on("end",function(n){var r=this;o(this,t);const l=e.scale.zoom||e.scale.x;if(i.event=n,s.attr(u.axis,0).attr(u.attr,0),a>c){var h=[c,a];a=h[0],c=h[1]}a<0&&(c+=Math.abs(a),a=0),a!==c&&e.api.zoom([a,c].map(function(t){return o(this,r),l.invert(t)}.bind(this))),e.setDragStatus(!1)}.bind(this))},setZoomResetButton:function(){const t=this,e=t.config,n=t.$el,i=e.zoom_resetButton;i&&"drag"===e.zoom_type&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(Ps.button,!0).append("span").on("click",(function(){Uo(i.onclick)&&i.onclick.bind(t.api)(this),t.api.unzoom()})).classed(ra.buttonZoomReset,!0).text(i.text||"Reset Zoom"))}},Fp=void 0,jp={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return o(this,Fp),!0}.bind(void 0),data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:function(){o(this,Fp)}.bind(void 0),data_onunselected:function(){o(this,Fp)}.bind(void 0)},Bp={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:function(){o(this,undefined)}.bind(void 0)},Xp={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0},$p=void 0;let Up=function(){var t=this;return o(this,$p),ps(Ch.prototype,Dp),ps(Hh.prototype,fp),ma.setOptions([jp]),(Up=function(){return o(this,t),!0}.bind(this))()}.bind(void 0),Yp=function(){var t=this;return o(this,$p),ps(Ch.prototype,Np),ps(Hh.prototype,gp),ma.setOptions([Bp]),(Yp=function(){return o(this,t),!0}.bind(this))()}.bind(void 0),Vp=function(){var t=this;return o(this,$p),ps(Ch.prototype,zp),ps(Hh.prototype,Cp),ma.setOptions([Xp]),(Vp=function(){return o(this,t),!0}.bind(this))()}.bind(void 0),Gp={};const Hp={version:"3.9.3-nightly-20230819004547",generate:function(t){const e=_s({},Gp,t),n=new Hh(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults:function(t){return ns(t)&&(Gp=t),Gp},instance:[],plugin:{}};var Wp=void 0;Object.keys(i).forEach(function(t){return o(this,Wp),i[t]()}.bind(void 0)),Object.keys(r).forEach(function(t){return o(this,Wp),r[t]()}.bind(void 0))},function(t,e,n){var i=n(528)();t.exports=i;try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},function(t,e,n){var i=n(529).default;function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=r=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,o=n.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,n){return t[e]=n}}function f(t,e,n,i){var r=e&&e.prototype instanceof p?e:p,o=Object.create(r.prototype),a=new O(i||[]);return s(o,"_invoke",{value:A(t,n,a)}),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var g={};function p(){}function v(){}function y(){}var b={};h(b,c,(function(){return this}));var x=Object.getPrototypeOf,m=x&&x(x(M([])));m&&m!==n&&o.call(m,c)&&(b=m);var _=y.prototype=p.prototype=Object.create(b);function T(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(r,s,a,c){var u=d(t[r],t,s);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==i(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var r;s(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,r){n(t,i,e,r)}))}return r=r?r.then(o,o):o()}})}function A(t,e,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return{value:void 0,done:!0}}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=S(s,n);if(a){if(a===g)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=d(t,e,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function S(t,e){var n=e.method,i=t.iterator[n];if(void 0===i)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var r=d(i,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function M(t){if(t||""===t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n=0;--i){var r=this.tryEntries[i],s=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var a=o.call(r,"catchLoc"),c=o.call(r,"finallyLoc");if(a&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;k(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),g}},e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}],e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}return n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(0),n(526)}()})); \ No newline at end of file +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(this,(function(){return function(){var t=[function(t,e,n){"use strict";n(1),n(100),n(101),n(102),n(103),n(104),n(105),n(106),n(107),n(108),n(109),n(110),n(111),n(112),n(113),n(114),n(126),n(128),n(138),n(139),n(141),n(144),n(147),n(149),n(151),n(152),n(153),n(154),n(156),n(157),n(159),n(160),n(162),n(166),n(167),n(168),n(169),n(174),n(175),n(177),n(178),n(179),n(181),n(184),n(185),n(186),n(187),n(188),n(193),n(195),n(196),n(198),n(201),n(202),n(203),n(204),n(205),n(207),n(215),n(217),n(220),n(222),n(223),n(224),n(225),n(226),n(230),n(231),n(233),n(234),n(235),n(237),n(238),n(239),n(95),n(240),n(241),n(249),n(251),n(252),n(253),n(254),n(255),n(257),n(258),n(260),n(261),n(262),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(275),n(276),n(278),n(280),n(281),n(282),n(283),n(284),n(286),n(288),n(289),n(290),n(291),n(293),n(294),n(296),n(297),n(298),n(299),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(322),n(323),n(324),n(325),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(373),n(374),n(376),n(377),n(378),n(379),n(380),n(382),n(383),n(385),n(388),n(389),n(390),n(391),n(392),n(396),n(397),n(399),n(400),n(401),n(402),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(412),n(415),n(418),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(442),n(443),n(444),n(445),n(446),n(447),n(448),n(449),n(450),n(451),n(452),n(453),n(454),n(457),n(458),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480),n(481),n(482),n(483),n(484),n(487),n(489),n(491),n(492),n(495),n(496),n(499),n(500),n(501),n(506),n(507),n(508),n(512),n(515),n(520),n(521),n(522),n(523),n(524),n(525),n(82)},function(t,e,n){"use strict";n(2),n(92),n(94),n(95),n(99)},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(8),s=n(14),a=n(36),c=n(6),u=n(27),l=n(7),h=n(39),f=n(25),d=n(47),g=n(12),p=n(18),v=n(69),y=n(11),b=n(72),x=n(74),m=n(58),_=n(76),T=n(67),w=n(5),A=n(45),S=n(73),E=n(10),k=n(48),O=n(79),M=n(35),R=n(54),C=n(55),I=n(41),P=n(34),L=n(80),D=n(81),N=n(83),z=n(84),F=n(52),j=n(85).forEach,B=R("hidden"),X="Symbol",$="prototype",U=F.set,Y=F.getterFor(X),V=Object[$],G=r.Symbol,H=G&&G[$],W=r.TypeError,q=r.QObject,Z=w.f,K=A.f,J=_.f,Q=E.f,tt=s([].push),et=M("symbols"),nt=M("op-symbols"),it=M("wks"),rt=!q||!q[$]||!q[$].findChild,ot=c&&l((function(){return 7!==b(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(t,e,n){var i=Z(V,e);i&&delete V[e],K(t,e,n),i&&t!==V&&K(V,e,i)}:K,st=function(t,e){var n=et[t]=b(H);return U(n,{type:X,tag:t,description:e}),c||(n.description=e),n},at=function(t,e,n){t===V&&at(nt,e,n),d(t);var i=p(e);return d(n),h(et,i)?(n.enumerable?(h(t,B)&&t[B][i]&&(t[B][i]=!1),n=b(n,{enumerable:y(0,!1)})):(h(t,B)||K(t,B,y(1,{})),t[B][i]=!0),ot(t,i,n)):K(t,i,n)},ct=function(t,e){d(t);var n=g(e),i=x(n).concat(ft(n));return j(i,(function(e){c&&!o(ut,n,e)||at(t,e,n[e])})),t},ut=function(t){var e=p(t),n=o(Q,this,e);return!(this===V&&h(et,e)&&!h(nt,e))&&(!(n||!h(this,e)||!h(et,e)||h(this,B)&&this[B][e])||n)},lt=function(t,e){var n=g(t),i=p(e);if(n!==V||!h(et,i)||h(nt,i)){var r=Z(n,i);return!r||!h(et,i)||h(n,B)&&n[B][i]||(r.enumerable=!0),r}},ht=function(t){var e=J(g(t)),n=[];return j(e,(function(t){h(et,t)||h(C,t)||tt(n,t)})),n},ft=function(t){var e=t===V,n=J(e?nt:g(t)),i=[];return j(n,(function(t){!h(et,t)||e&&!h(V,t)||tt(i,et[t])})),i};u||(G=function(){if(f(H,this))throw W("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?v(arguments[0]):void 0,e=I(t),n=function(t){this===V&&o(n,nt,t),h(this,B)&&h(this[B],e)&&(this[B][e]=!1),ot(this,e,y(1,t))};return c&&rt&&ot(V,e,{configurable:!0,set:n}),st(e,t)},k(H=G[$],"toString",(function(){return Y(this).tag})),k(G,"withoutSetter",(function(t){return st(I(t),t)})),E.f=ut,A.f=at,S.f=ct,w.f=lt,m.f=_.f=ht,T.f=ft,L.f=function(t){return st(P(t),t)},c&&(O(H,"description",{configurable:!0,get:function(){return Y(this).description}}),a||k(V,"propertyIsEnumerable",ut,{unsafe:!0}))),i({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:G}),j(x(it),(function(t){D(t)})),i({target:X,stat:!0,forced:!u},{useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),i({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(t,e){return void 0===e?b(t):ct(b(t),e)},defineProperty:at,defineProperties:ct,getOwnPropertyDescriptor:lt}),i({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ht}),N(),z(G,X),C[B]=!0},function(t,e,n){"use strict";var i=n(4),r=n(5).f,o=n(44),s=n(48),a=n(38),c=n(56),u=n(68);t.exports=function(t,e){var n,l,h,f,d,g=t.target,p=t.global,v=t.stat;if(n=p?i:v?i[g]||a(g,{}):(i[g]||{}).prototype)for(l in e){if(f=e[l],h=t.dontCallGetSet?(d=r(n,l))&&d.value:n[l],!u(p?l:g+(v?".":"#")+l,t.forced)&&void 0!==h){if(typeof f==typeof h)continue;c(f,h)}(t.sham||h&&h.sham)&&o(f,"sham",!0),s(n,l,f,t)}}},function(t){"use strict";var e=function(t){return t&&t.Math===Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},function(t,e,n){"use strict";var i=n(6),r=n(8),o=n(10),s=n(11),a=n(12),c=n(18),u=n(39),l=n(42),h=Object.getOwnPropertyDescriptor;e.f=i?h:function(t,e){if(t=a(t),e=c(e),l)try{return h(t,e)}catch(t){}if(u(t,e))return s(!r(o.f,t,e),t[e])}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";var i=n(9),r=Function.prototype.call;t.exports=i?r.bind(r):function(){return r.apply(r,arguments)}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},function(t,e){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);e.f=r?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";var i=n(13),r=n(16);t.exports=function(t){return i(r(t))}},function(t,e,n){"use strict";var i=n(14),r=n(7),o=n(15),s=Object,a=i("".split);t.exports=r((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?a(t,""):s(t)}:s},function(t,e,n){"use strict";var i=n(9),r=Function.prototype,o=r.call,s=i&&r.bind.bind(o,o);t.exports=i?s:function(t){return function(){return o.apply(t,arguments)}}},function(t,e,n){"use strict";var i=n(14),r=i({}.toString),o=i("".slice);t.exports=function(t){return o(r(t),8,-1)}},function(t,e,n){"use strict";var i=n(17),r=TypeError;t.exports=function(t){if(i(t))throw r("Can't call method on "+t);return t}},function(t){"use strict";t.exports=function(t){return null==t}},function(t,e,n){"use strict";var i=n(19),r=n(23);t.exports=function(t){var e=i(t,"string");return r(e)?e:e+""}},function(t,e,n){"use strict";var i=n(8),r=n(20),o=n(23),s=n(30),a=n(33),c=n(34),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!r(t)||o(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=i(c,t,e),!r(n)||o(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},function(t,e,n){"use strict";var i=n(21),r=n(22),o=r.all;t.exports=r.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===o}:function(t){return"object"==typeof t?null!==t:i(t)}},function(t,e,n){"use strict";var i=n(22),r=i.all;t.exports=i.IS_HTMLDDA?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},function(t){"use strict";var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},function(t,e,n){"use strict";var i=n(24),r=n(21),o=n(25),s=n(26),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return r(e)&&o(e.prototype,a(t))}},function(t,e,n){"use strict";var i=n(4),r=n(21);t.exports=function(t,e){return arguments.length<2?(n=i[t],r(n)?n:void 0):i[t]&&i[t][e];var n}},function(t,e,n){"use strict";var i=n(14);t.exports=i({}.isPrototypeOf)},function(t,e,n){"use strict";var i=n(27);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){"use strict";var i=n(28),r=n(7),o=n(4).String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},function(t,e,n){"use strict";var i,r,o=n(4),s=n(29),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(r=(i=l.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!r&&s&&(!(i=s.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/))&&(r=+i[1]),t.exports=r},function(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(t,e,n){"use strict";var i=n(31),r=n(17);t.exports=function(t,e){var n=t[e];return r(n)?void 0:i(n)}},function(t,e,n){"use strict";var i=n(21),r=n(32),o=TypeError;t.exports=function(t){if(i(t))return t;throw o(r(t)+" is not a function")}},function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},function(t,e,n){"use strict";var i=n(8),r=n(21),o=n(20),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&r(n=t.toString)&&!o(a=i(n,t)))return a;if(r(n=t.valueOf)&&!o(a=i(n,t)))return a;if("string"!==e&&r(n=t.toString)&&!o(a=i(n,t)))return a;throw s("Can't convert object to primitive value")}},function(t,e,n){"use strict";var i=n(4),r=n(35),o=n(39),s=n(41),a=n(27),c=n(26),u=i.Symbol,l=r("wks"),h=c?u.for||u:u&&u.withoutSetter||s;t.exports=function(t){return o(l,t)||(l[t]=a&&o(u,t)?u[t]:h("Symbol."+t)),l[t]}},function(t,e,n){"use strict";var i=n(36),r=n(37);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.32.1",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})},function(t){"use strict";t.exports=!1},function(t,e,n){"use strict";var i=n(4),r=n(38),o="__core-js_shared__",s=i[o]||r(o,{});t.exports=s},function(t,e,n){"use strict";var i=n(4),r=Object.defineProperty;t.exports=function(t,e){try{r(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},function(t,e,n){"use strict";var i=n(14),r=n(40),o=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(r(t),e)}},function(t,e,n){"use strict";var i=n(16),r=Object;t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";var i=n(14),r=0,o=Math.random(),s=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++r+o,36)}},function(t,e,n){"use strict";var i=n(6),r=n(7),o=n(43);t.exports=!i&&!r((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";var i=n(4),r=n(20),o=i.document,s=r(o)&&r(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},function(t,e,n){"use strict";var i=n(6),r=n(45),o=n(11);t.exports=i?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){"use strict";var i=n(6),r=n(42),o=n(46),s=n(47),a=n(18),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",d="writable";e.f=i?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]){var i=l(t,e);i&&i[d]&&(t[e]=n.value,n={configurable:f in n?n[f]:i[f],enumerable:h in n?n[h]:i[h],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),r)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";var i=n(6),r=n(7);t.exports=i&&r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(t,e,n){"use strict";var i=n(20),r=String,o=TypeError;t.exports=function(t){if(i(t))return t;throw o(r(t)+" is not an object")}},function(t,e,n){"use strict";var i=n(21),r=n(45),o=n(49),s=n(38);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(i(n)&&o(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=n:r.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},function(t,e,n){"use strict";var i=n(14),r=n(7),o=n(21),s=n(39),a=n(6),c=n(50).CONFIGURABLE,u=n(51),l=n(52),h=l.enforce,f=l.get,d=String,g=Object.defineProperty,p=i("".slice),v=i("".replace),y=i([].join),b=a&&!r((function(){return 8!==g((function(){}),"length",{value:8}).length})),x=String(String).split("String"),m=t.exports=function(t,e,n){"Symbol("===p(d(e),0,7)&&(e="["+v(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||c&&t.name!==e)&&(a?g(t,"name",{value:e,configurable:!0}):t.name=e),b&&n&&s(n,"arity")&&t.length!==n.arity&&g(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=h(t);return s(i,"source")||(i.source=y(x,"string"==typeof e?e:"")),t};Function.prototype.toString=m((function(){return o(this)&&f(this).source||u(this)}),"toString")},function(t,e,n){"use strict";var i=n(6),r=n(39),o=Function.prototype,s=i&&Object.getOwnPropertyDescriptor,a=r(o,"name"),c=a&&"something"===function(){}.name,u=a&&(!i||i&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},function(t,e,n){"use strict";var i=n(14),r=n(21),o=n(37),s=i(Function.toString);r(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},function(t,e,n){"use strict";var i,r,o,s=n(53),a=n(4),c=n(20),u=n(44),l=n(39),h=n(37),f=n(54),d=n(55),g="Object already initialized",p=a.TypeError,v=a.WeakMap;if(s||h.state){var y=h.state||(h.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,i=function(t,e){if(y.has(t))throw p(g);return e.facade=t,y.set(t,e),e},r=function(t){return y.get(t)||{}},o=function(t){return y.has(t)}}else{var b=f("state");d[b]=!0,i=function(t,e){if(l(t,b))throw p(g);return e.facade=t,u(t,b,e),e},r=function(t){return l(t,b)?t[b]:{}},o=function(t){return l(t,b)}}t.exports={set:i,get:r,has:o,enforce:function(t){return o(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=r(e)).type!==t)throw p("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){"use strict";var i=n(4),r=n(21),o=i.WeakMap;t.exports=r(o)&&/native code/.test(String(o))},function(t,e,n){"use strict";var i=n(35),r=n(41),o=i("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},function(t){"use strict";t.exports={}},function(t,e,n){"use strict";var i=n(39),r=n(57),o=n(5),s=n(45);t.exports=function(t,e,n){for(var a=r(e),c=s.f,u=o.f,l=0;lu;)r(i,n=e[u++])&&(~s(l,n)||c(l,n));return l}},function(t,e,n){"use strict";var i=n(12),r=n(61),o=n(64),s=function(t){return function(e,n,s){var a,c=i(e),u=o(c),l=r(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},function(t,e,n){"use strict";var i=n(62),r=Math.max,o=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):o(n,e)}},function(t,e,n){"use strict";var i=n(63);t.exports=function(t){var e=+t;return e!=e||0===e?0:i(e)}},function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?n:e)(i)}},function(t,e,n){"use strict";var i=n(65);t.exports=function(t){return i(t.length)}},function(t,e,n){"use strict";var i=n(62),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";var i=n(7),r=n(21),o=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n===l||n!==u&&(r(e)?i(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},function(t,e,n){"use strict";var i=n(70),r=String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return r(t)}},function(t,e,n){"use strict";var i=n(71),r=n(21),o=n(15),s=n(34)("toStringTag"),a=Object,c="Arguments"===o(function(){return arguments}());t.exports=i?o:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?n:c?o(e):"Object"===(i=o(e))&&r(e.callee)?"Arguments":i}},function(t,e,n){"use strict";var i={};i[n(34)("toStringTag")]="z",t.exports="[object z]"===String(i)},function(t,e,n){"use strict";var i,r=n(47),o=n(73),s=n(66),a=n(55),c=n(75),u=n(43),l=n(54),h="prototype",f="script",d=l("IE_PROTO"),g=function(){},p=function(t){return"<"+f+">"+t+""},v=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;y="undefined"!=typeof document?document.domain&&i?v(i):(e=u("iframe"),n="java"+f+":",e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):v(i);for(var r=s.length;r--;)delete y[h][s[r]];return y()};a[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(g[h]=r(t),n=new g,g[h]=null,n[d]=t):n=y(),void 0===e?n:o.f(n,e)}},function(t,e,n){"use strict";var i=n(6),r=n(46),o=n(45),s=n(47),a=n(12),c=n(74);e.f=i&&!r?Object.defineProperties:function(t,e){s(t);for(var n,i=a(e),r=c(e),u=r.length,l=0;u>l;)o.f(t,n=r[l++],i[n]);return t}},function(t,e,n){"use strict";var i=n(59),r=n(66);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e,n){"use strict";var i=n(24);t.exports=i("document","documentElement")},function(t,e,n){"use strict";var i=n(15),r=n(12),o=n(58).f,s=n(77),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"===i(t)?function(t){try{return o(t)}catch(t){return s(a)}}(t):o(r(t))}},function(t,e,n){"use strict";var i=n(61),r=n(64),o=n(78),s=Array,a=Math.max;t.exports=function(t,e,n){for(var c=r(t),u=i(e,c),l=i(void 0===n?c:n,c),h=s(a(l-u,0)),f=0;uA;A++)if((d||A in _)&&(x=T(b=_[A],A,m),t))if(e)E[A]=x;else if(x)switch(t){case 3:return!0;case 5:return b;case 6:return A;case 2:u(E,b)}else switch(t){case 4:return!1;case 7:u(E,b)}return h?-1:r||l?l:E}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(t,e,n){"use strict";var i=n(87),r=n(31),o=n(9),s=i(i.bind);t.exports=function(t,e){return r(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";var i=n(15),r=n(14);t.exports=function(t){if("Function"===i(t))return r(t)}},function(t,e,n){"use strict";var i=n(89);t.exports=function(t,e){return new(i(t))(0===e?0:e)}},function(t,e,n){"use strict";var i=n(90),r=n(91),o=n(20),s=n(34)("species"),a=Array;t.exports=function(t){var e;return i(t)&&(e=t.constructor,(r(e)&&(e===a||i(e.prototype))||o(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?a:e}},function(t,e,n){"use strict";var i=n(15);t.exports=Array.isArray||function(t){return"Array"===i(t)}},function(t,e,n){"use strict";var i=n(14),r=n(7),o=n(21),s=n(70),a=n(24),c=n(51),u=function(){},l=[],h=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=i(f.exec),g=!f.exec(u),p=function(t){if(!o(t))return!1;try{return h(u,l,t),!0}catch(t){return!1}},v=function(t){if(!o(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!d(f,c(t))}catch(t){return!0}};v.sham=!0,t.exports=!h||r((function(){var t;return p(p.call)||!p(Object)||!p((function(){t=!0}))||t}))?v:p},function(t,e,n){"use strict";var i=n(3),r=n(24),o=n(39),s=n(69),a=n(35),c=n(93),u=a("string-to-symbol-registry"),l=a("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=s(t);if(o(u,e))return u[e];var n=r("Symbol")(e);return u[e]=n,l[n]=e,n}})},function(t,e,n){"use strict";var i=n(27);t.exports=i&&!!Symbol.for&&!!Symbol.keyFor},function(t,e,n){"use strict";var i=n(3),r=n(39),o=n(23),s=n(32),a=n(35),c=n(93),u=a("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!c},{keyFor:function(t){if(!o(t))throw TypeError(s(t)+" is not a symbol");if(r(u,t))return u[t]}})},function(t,e,n){"use strict";var i=n(3),r=n(24),o=n(96),s=n(8),a=n(14),c=n(7),u=n(21),l=n(23),h=n(97),f=n(98),d=n(27),g=String,p=r("JSON","stringify"),v=a(/./.exec),y=a("".charAt),b=a("".charCodeAt),x=a("".replace),m=a(1..toString),_=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,A=!d||c((function(){var t=r("Symbol")("stringify detection");return"[null]"!==p([t])||"{}"!==p({a:t})||"{}"!==p(Object(t))})),S=c((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),E=function(t,e){var n=h(arguments),i=f(e);if(u(i)||void 0!==t&&!l(t))return n[1]=function(t,e){if(u(i)&&(e=s(i,this,g(t),e)),!l(e))return e},o(p,null,n)},k=function(t,e,n){var i=y(n,e-1),r=y(n,e+1);return v(T,t)&&!v(w,r)||v(w,t)&&!v(T,i)?"\\u"+m(b(t,0),16):t};p&&i({target:"JSON",stat:!0,arity:3,forced:A||S},{stringify:function(t,e,n){var i=h(arguments),r=o(A?E:p,null,i);return S&&"string"==typeof r?x(r,_,k):r}})},function(t,e,n){"use strict";var i=n(9),r=Function.prototype,o=r.apply,s=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?s.bind(o):function(){return s.apply(o,arguments)})},function(t,e,n){"use strict";var i=n(14);t.exports=i([].slice)},function(t,e,n){"use strict";var i=n(14),r=n(90),o=n(21),s=n(15),a=n(69),c=i([].push);t.exports=function(t){if(o(t))return t;if(r(t)){for(var e=t.length,n=[],i=0;ib&&f(i,arguments[b]),i}));if(A.prototype=T,"Error"!==m?a?a(A,w):c(A,w,{name:!0}):g&&y in _&&(u(A,_,y),u(A,_,"prepareStackTrace")),c(A,_),!p)try{T.name!==m&&o(T,"name",m),T.constructor=A}catch(t){}return A}}},function(t,e,n){"use strict";var i=n(117),r=n(47),o=n(118);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=i(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),o(i),e?t(n,i):n.__proto__=i,n}}():void 0)},function(t,e,n){"use strict";var i=n(14),r=n(31);t.exports=function(t,e,n){try{return i(r(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},function(t,e,n){"use strict";var i=n(21),r=String,o=TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw o("Can't set "+r(t)+" as a prototype")}},function(t,e,n){"use strict";var i=n(45).f;t.exports=function(t,e,n){n in t||i(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},function(t,e,n){"use strict";var i=n(21),r=n(20),o=n(116);t.exports=function(t,e,n){var s,a;return o&&i(s=e.constructor)&&s!==n&&r(a=s.prototype)&&a!==n.prototype&&o(t,a),t}},function(t,e,n){"use strict";var i=n(69);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},function(t,e,n){"use strict";var i=n(20),r=n(44);t.exports=function(t,e){i(e)&&"cause"in e&&r(t,"cause",e.cause)}},function(t,e,n){"use strict";var i=n(44),r=n(124),o=n(125),s=Error.captureStackTrace;t.exports=function(t,e,n,a){o&&(s?s(t,e):i(t,"stack",r(n,a)))}},function(t,e,n){"use strict";var i=n(14),r=Error,o=i("".replace),s=String(r("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,c=a.test(s);t.exports=function(t,e){if(c&&"string"==typeof t&&!r.prepareStackTrace)for(;e--;)t=o(t,a,"");return t}},function(t,e,n){"use strict";var i=n(7),r=n(11);t.exports=!i((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",r(1,7)),7!==t.stack)}))},function(t,e,n){"use strict";var i=n(48),r=n(127),o=Error.prototype;o.toString!==r&&i(o,"toString",r)},function(t,e,n){"use strict";var i=n(6),r=n(7),o=n(47),s=n(72),a=n(121),c=Error.prototype.toString,u=r((function(){if(i){var t=s(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==c.call(t))return!0}return"2: 1"!==c.call({message:1,name:2})||"Error"!==c.call({})}));t.exports=u?function(){var t=o(this),e=a(t.name,"Error"),n=a(t.message);return e?n?e+": "+n:e:n}:c},function(t,e,n){"use strict";n(129)},function(t,e,n){"use strict";var i=n(3),r=n(25),o=n(130),s=n(116),a=n(56),c=n(72),u=n(44),l=n(11),h=n(122),f=n(123),d=n(132),g=n(121),p=n(34)("toStringTag"),v=Error,y=[].push,b=function(t,e){var n,i=r(x,this);s?n=s(v(),i?o(this):x):(n=i?this:c(x),u(n,p,"Error")),void 0!==e&&u(n,"message",g(e)),f(n,b,n.stack,1),arguments.length>2&&h(n,arguments[2]);var a=[];return d(t,y,{that:a}),u(n,"errors",a),n};s?s(b,v):a(b,v,{name:!0});var x=b.prototype=c(v.prototype,{constructor:l(1,b),message:l(1,""),name:l(1,"AggregateError")});i({global:!0,constructor:!0,arity:2},{AggregateError:b})},function(t,e,n){"use strict";var i=n(39),r=n(21),o=n(40),s=n(54),a=n(131),c=s("IE_PROTO"),u=Object,l=u.prototype;t.exports=a?u.getPrototypeOf:function(t){var e=o(t);if(i(e,c))return e[c];var n=e.constructor;return r(n)&&e instanceof n?n.prototype:e instanceof u?l:null}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){"use strict";var i=n(86),r=n(8),o=n(47),s=n(32),a=n(133),c=n(64),u=n(25),l=n(135),h=n(136),f=n(137),d=TypeError,g=function(t,e){this.stopped=t,this.result=e},p=g.prototype;t.exports=function(t,e,n){var v,y,b,x,m,_,T,w=n&&n.that,A=!(!n||!n.AS_ENTRIES),S=!(!n||!n.IS_RECORD),E=!(!n||!n.IS_ITERATOR),k=!(!n||!n.INTERRUPTED),O=i(e,w),M=function(t){return v&&f(v,"normal",t),new g(!0,t)},R=function(t){return A?(o(t),k?O(t[0],t[1],M):O(t[0],t[1])):k?O(t,M):O(t)};if(S)v=t.iterator;else if(E)v=t;else{if(!(y=h(t)))throw d(s(t)+" is not iterable");if(a(y)){for(b=0,x=c(t);x>b;b++)if((m=R(t[b]))&&u(p,m))return m;return new g(!1)}v=l(t,y)}for(_=S?t.next:v.next;!(T=r(_,v)).done;){try{m=R(T.value)}catch(t){f(v,"throw",t)}if("object"==typeof m&&m&&u(p,m))return m}return new g(!1)}},function(t,e,n){"use strict";var i=n(34),r=n(134),o=i("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||s[o]===t)}},function(t){"use strict";t.exports={}},function(t,e,n){"use strict";var i=n(8),r=n(31),o=n(47),s=n(32),a=n(136),c=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(r(n))return o(i(n,t));throw c(s(t)+" is not iterable")}},function(t,e,n){"use strict";var i=n(70),r=n(30),o=n(17),s=n(134),a=n(34)("iterator");t.exports=function(t){if(!o(t))return r(t,a)||r(t,"@@iterator")||s[i(t)]}},function(t,e,n){"use strict";var i=n(8),r=n(47),o=n(30);t.exports=function(t,e,n){var s,a;r(t);try{if(!(s=o(t,"return"))){if("throw"===e)throw n;return n}s=i(s,t)}catch(t){a=!0,s=t}if("throw"===e)throw n;if(a)throw s;return r(s),n}},function(t,e,n){"use strict";var i=n(3),r=n(24),o=n(96),s=n(7),a=n(115),c="AggregateError",u=r(c),l=!s((function(){return 1!==u([1]).errors[0]}))&&s((function(){return 7!==u([1],c,{cause:7}).cause}));i({global:!0,constructor:!0,arity:2,forced:l},{AggregateError:a(c,(function(t){return function(e,n){return o(t,this,arguments)}}),l,!0)})},function(t,e,n){"use strict";var i=n(3),r=n(40),o=n(64),s=n(62),a=n(140);i({target:"Array",proto:!0},{at:function(t){var e=r(this),n=o(e),i=s(t),a=i>=0?i:n+i;return a<0||a>=n?void 0:e[a]}}),a("at")},function(t,e,n){"use strict";var i=n(34),r=n(72),o=n(45).f,s=i("unscopables"),a=Array.prototype;void 0===a[s]&&o(a,s,{configurable:!0,value:r(null)}),t.exports=function(t){a[s][t]=!0}},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(90),s=n(20),a=n(40),c=n(64),u=n(142),l=n(78),h=n(88),f=n(143),d=n(34),g=n(28),p=d("isConcatSpreadable"),v=g>=51||!r((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),y=function(t){if(!s(t))return!1;var e=t[p];return void 0!==e?!!e:o(t)};i({target:"Array",proto:!0,arity:1,forced:!v||!f("concat")},{concat:function(t){var e,n,i,r,o,s=a(this),f=h(s,0),d=0;for(e=-1,i=arguments.length;e9007199254740991)throw e("Maximum allowed index exceeded");return t}},function(t,e,n){"use strict";var i=n(7),r=n(34),o=n(28),s=r("species");t.exports=function(t){return o>=51||!i((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){"use strict";var i=n(3),r=n(145),o=n(140);i({target:"Array",proto:!0},{copyWithin:r}),o("copyWithin")},function(t,e,n){"use strict";var i=n(40),r=n(61),o=n(64),s=n(146),a=Math.min;t.exports=[].copyWithin||function(t,e){var n=i(this),c=o(n),u=r(t,c),l=r(e,c),h=arguments.length>2?arguments[2]:void 0,f=a((void 0===h?c:r(h,c))-l,c-u),d=1;for(l0;)l in n?n[u]=n[l]:s(n,u),u+=d,l+=d;return n}},function(t,e,n){"use strict";var i=n(32),r=TypeError;t.exports=function(t,e){if(!delete t[e])throw r("Cannot delete property "+i(e)+" of "+i(t))}},function(t,e,n){"use strict";var i=n(3),r=n(85).every;i({target:"Array",proto:!0,forced:!n(148)("every")},{every:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(7);t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){return 1},1)}))}},function(t,e,n){"use strict";var i=n(3),r=n(150),o=n(140);i({target:"Array",proto:!0},{fill:r}),o("fill")},function(t,e,n){"use strict";var i=n(40),r=n(61),o=n(64);t.exports=function(t){for(var e=i(this),n=o(e),s=arguments.length,a=r(s>1?arguments[1]:void 0,n),c=s>2?arguments[2]:void 0,u=void 0===c?n:r(c,n);u>a;)e[a++]=t;return e}},function(t,e,n){"use strict";var i=n(3),r=n(85).filter;i({target:"Array",proto:!0,forced:!n(143)("filter")},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(85).find,o=n(140),s="find",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),i({target:"Array",proto:!0,forced:a},{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},function(t,e,n){"use strict";var i=n(3),r=n(85).findIndex,o=n(140),s="findIndex",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),i({target:"Array",proto:!0,forced:a},{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},function(t,e,n){"use strict";var i=n(3),r=n(155).findLast,o=n(140);i({target:"Array",proto:!0},{findLast:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o("findLast")},function(t,e,n){"use strict";var i=n(86),r=n(13),o=n(40),s=n(64),a=function(t){var e=1===t;return function(n,a,c){for(var u,l=o(n),h=r(l),f=i(a,c),d=s(h);d-- >0;)if(f(u=h[d],d,l))switch(t){case 0:return u;case 1:return d}return e?-1:void 0}};t.exports={findLast:a(0),findLastIndex:a(1)}},function(t,e,n){"use strict";var i=n(3),r=n(155).findLastIndex,o=n(140);i({target:"Array",proto:!0},{findLastIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o("findLastIndex")},function(t,e,n){"use strict";var i=n(3),r=n(158),o=n(40),s=n(64),a=n(62),c=n(88);i({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=o(this),n=s(e),i=c(e,0);return i.length=r(i,e,e,n,0,void 0===t?1:a(t)),i}})},function(t,e,n){"use strict";var i=n(90),r=n(64),o=n(142),s=n(86),a=function(t,e,n,c,u,l,h,f){for(var d,g,p=u,v=0,y=!!h&&s(h,f);v0&&i(d)?(g=r(d),p=a(t,e,d,g,p,l-1)-1):(o(p+1),t[p]=d),p++),v++;return p};t.exports=a},function(t,e,n){"use strict";var i=n(3),r=n(158),o=n(31),s=n(40),a=n(64),c=n(88);i({target:"Array",proto:!0},{flatMap:function(t){var e,n=s(this),i=a(n);return o(t),(e=c(n,0)).length=r(e,n,n,i,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},function(t,e,n){"use strict";var i=n(3),r=n(161);i({target:"Array",proto:!0,forced:[].forEach!==r},{forEach:r})},function(t,e,n){"use strict";var i=n(85).forEach,r=n(148)("forEach");t.exports=r?[].forEach:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){"use strict";var i=n(3),r=n(163);i({target:"Array",stat:!0,forced:!n(165)((function(t){Array.from(t)}))},{from:r})},function(t,e,n){"use strict";var i=n(86),r=n(8),o=n(40),s=n(164),a=n(133),c=n(91),u=n(64),l=n(78),h=n(135),f=n(136),d=Array;t.exports=function(t){var e=o(t),n=c(this),g=arguments.length,p=g>1?arguments[1]:void 0,v=void 0!==p;v&&(p=i(p,g>2?arguments[2]:void 0));var y,b,x,m,_,T,w=f(e),A=0;if(!w||this===d&&a(w))for(y=u(e),b=n?new this(y):d(y);y>A;A++)T=v?p(e[A],A):e[A],l(b,A,T);else for(_=(m=h(e,w)).next,b=n?new this:[];!(x=r(_,m)).done;A++)T=v?s(m,p,[x.value,A],!0):x.value,l(b,A,T);return b.length=A,b}},function(t,e,n){"use strict";var i=n(47),r=n(137);t.exports=function(t,e,n,o){try{return o?e(i(n)[0],n[1]):e(n)}catch(e){r(t,"throw",e)}}},function(t,e,n){"use strict";var i=n(34)("iterator"),r=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){r=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var o={};o[i]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var i=n(3),r=n(60).includes,o=n(7),s=n(140);i({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")},function(t,e,n){"use strict";var i=n(3),r=n(87),o=n(60).indexOf,s=n(148),a=r([].indexOf),c=!!a&&1/a([1],1,-0)<0;i({target:"Array",proto:!0,forced:c||!s("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return c?a(this,t,e)||0:o(this,t,e)}})},function(t,e,n){"use strict";n(3)({target:"Array",stat:!0},{isArray:n(90)})},function(t,e,n){"use strict";var i=n(12),r=n(140),o=n(134),s=n(52),a=n(45).f,c=n(170),u=n(173),l=n(36),h=n(6),f="Array Iterator",d=s.set,g=s.getterFor(f);t.exports=c(Array,"Array",(function(t,e){d(this,{type:f,target:i(t),index:0,kind:e})}),(function(){var t=g(this),e=t.target,n=t.kind,i=t.index++;if(!e||i>=e.length)return t.target=void 0,u(void 0,!0);switch(n){case"keys":return u(i,!1);case"values":return u(e[i],!1)}return u([i,e[i]],!1)}),"values");var p=o.Arguments=o.Array;if(r("keys"),r("values"),r("entries"),!l&&h&&"values"!==p.name)try{a(p,"name",{value:"values"})}catch(t){}},function(t,e,n){"use strict";var i=n(3),r=n(8),o=n(36),s=n(50),a=n(21),c=n(171),u=n(130),l=n(116),h=n(84),f=n(44),d=n(48),g=n(34),p=n(134),v=n(172),y=s.PROPER,b=s.CONFIGURABLE,x=v.IteratorPrototype,m=v.BUGGY_SAFARI_ITERATORS,_=g("iterator"),T="keys",w="values",A="entries",S=function(){return this};t.exports=function(t,e,n,s,g,v,E){c(n,e,s);var k,O,M,R=function(t){if(t===g&&D)return D;if(!m&&t in P)return P[t];switch(t){case T:case w:case A:return function(){return new n(this,t)}}return function(){return new n(this)}},C=e+" Iterator",I=!1,P=t.prototype,L=P[_]||P["@@iterator"]||g&&P[g],D=!m&&L||R(g),N="Array"===e&&P.entries||L;if(N&&(k=u(N.call(new t)))!==Object.prototype&&k.next&&(o||u(k)===x||(l?l(k,x):a(k[_])||d(k,_,S)),h(k,C,!0,!0),o&&(p[C]=S)),y&&g===w&&L&&L.name!==w&&(!o&&b?f(P,"name",w):(I=!0,D=function(){return r(L,this)})),g)if(O={values:R(w),keys:v?D:R(T),entries:R(A)},E)for(M in O)(m||I||!(M in P))&&d(P,M,O[M]);else i({target:e,proto:!0,forced:m||I},O);return o&&!E||P[_]===D||d(P,_,D,{name:g}),p[e]=D,O}},function(t,e,n){"use strict";var i=n(172).IteratorPrototype,r=n(72),o=n(11),s=n(84),a=n(134),c=function(){return this};t.exports=function(t,e,n,u){var l=e+" Iterator";return t.prototype=r(i,{next:o(+!u,n)}),s(t,l,!1,!0),a[l]=c,t}},function(t,e,n){"use strict";var i,r,o,s=n(7),a=n(21),c=n(20),u=n(72),l=n(130),h=n(48),f=n(34),d=n(36),g=f("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(r=l(l(o)))!==Object.prototype&&(i=r):p=!0),!c(i)||s((function(){var t={};return i[g].call(t)!==t}))?i={}:d&&(i=u(i)),a(i[g])||h(i,g,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:p}},function(t){"use strict";t.exports=function(t,e){return{value:t,done:e}}},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(13),s=n(12),a=n(148),c=r([].join);i({target:"Array",proto:!0,forced:o!==Object||!a("join",",")},{join:function(t){return c(s(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var i=n(3),r=n(176);i({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(t,e,n){"use strict";var i=n(96),r=n(12),o=n(62),s=n(64),a=n(148),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,h=a("lastIndexOf"),f=l||!h;t.exports=f?function(t){if(l)return i(u,this,arguments)||0;var e=r(this),n=s(e),a=n-1;for(arguments.length>1&&(a=c(a,o(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}:u},function(t,e,n){"use strict";var i=n(3),r=n(85).map;i({target:"Array",proto:!0,forced:!n(143)("map")},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(91),s=n(78),a=Array;i({target:"Array",stat:!0,forced:r((function(){function t(){}return!(a.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,n=new(o(this)?this:a)(e);e>t;)s(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var i=n(3),r=n(40),o=n(64),s=n(180),a=n(142);i({target:"Array",proto:!0,arity:1,forced:n(7)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=r(this),n=o(e),i=arguments.length;a(n+i);for(var c=0;c79&&s<83||!o("reduce")},{reduce:function(t){var e=arguments.length;return r(this,t,e,e>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(31),r=n(40),o=n(13),s=n(64),a=TypeError,c=function(t){return function(e,n,c,u){i(n);var l=r(e),h=o(l),f=s(l),d=t?f-1:0,g=t?-1:1;if(c<2)for(;;){if(d in h){u=h[d],d+=g;break}if(d+=g,t?d<0:f<=d)throw a("Reduce of empty array with no initial value")}for(;t?d>=0:f>d;d+=g)d in h&&(u=n(u,h[d],d,l));return u}};t.exports={left:c(!1),right:c(!0)}},function(t,e,n){"use strict";var i=n(4),r=n(15);t.exports="process"===r(i.process)},function(t,e,n){"use strict";var i=n(3),r=n(182).right,o=n(148),s=n(28);i({target:"Array",proto:!0,forced:!n(183)&&s>79&&s<83||!o("reduceRight")},{reduceRight:function(t){return r(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(90),s=r([].reverse),a=[1,2];i({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),s(this)}})},function(t,e,n){"use strict";var i=n(3),r=n(90),o=n(91),s=n(20),a=n(61),c=n(64),u=n(12),l=n(78),h=n(34),f=n(143),d=n(97),g=f("slice"),p=h("species"),v=Array,y=Math.max;i({target:"Array",proto:!0,forced:!g},{slice:function(t,e){var n,i,h,f=u(this),g=c(f),b=a(t,g),x=a(void 0===e?g:e,g);if(r(f)&&(n=f.constructor,(o(n)&&(n===v||r(n.prototype))||s(n)&&null===(n=n[p]))&&(n=void 0),n===v||void 0===n))return d(f,b,x);for(i=new(void 0===n?v:n)(y(x-b,0)),h=0;b1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(31),s=n(40),a=n(64),c=n(146),u=n(69),l=n(7),h=n(189),f=n(148),d=n(190),g=n(191),p=n(28),v=n(192),y=[],b=r(y.sort),x=r(y.push),m=l((function(){y.sort(void 0)})),_=l((function(){y.sort(null)})),T=f("sort"),w=!l((function(){if(p)return p<70;if(!(d&&d>3)){if(g)return!0;if(v)return v<603;var t,e,n,i,r="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)y.push({k:e+i,v:n})}for(y.sort((function(t,e){return e.v-t.v})),i=0;iu(n)?1:-1}}(t)),n=a(r),i=0;i0;)t[i]=t[--i];i!==o++&&(t[i]=n)}return t},a=function(t,e,n,i){for(var r=e.length,o=n.length,s=0,a=0;sm-i+n;v--)f(x,v-1)}else if(n>i)for(v=m-i;v>_;v--)b=v+n-1,(y=v+i-1)in x?x[b]=x[y]:f(x,b);for(v=0;vn;)o[n]=e[n++];return o}},function(t,e,n){"use strict";var i=n(4);t.exports=function(t){return i[t].prototype}},function(t,e,n){"use strict";var i=n(3),r=n(140),o=n(142),s=n(64),a=n(61),c=n(12),u=n(62),l=Array,h=Math.max,f=Math.min;i({target:"Array",proto:!0},{toSpliced:function(t,e){var n,i,r,d,g=c(this),p=s(g),v=a(t,p),y=arguments.length,b=0;for(0===y?n=i=0:1===y?(n=0,i=p-v):(n=y-2,i=f(h(u(e),0),p-v)),r=o(p+n-i),d=l(r);b=a||u<0)throw o("Incorrect index");for(var l=new e(a),h=0;h>8&255]},H=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},W=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},q=function(t){return U(t,23,4)},Z=function(t){return U(t,52,8)},K=function(t,e,n){u(t[O],e,{configurable:!0,get:function(){return n(this)[e]}})},J=function(t,e,n,i){var r=C(t),o=p(n),s=!!i;if(o+e>r.byteLength)throw B(M);var a=r.bytes,c=o+r.byteOffset,u=_(a,c,c+e);return s?u:$(u)},Q=function(t,e,n,i,r,o){var s=C(t),a=p(n),c=i(+r),u=!!o;if(a+e>s.byteLength)throw B(M);for(var l=s.bytes,h=a+s.byteOffset,f=0;fit;)(et=nt[it++])in L||c(L,et,P[et]);D.constructor=L}b&&y(z)!==F&&b(z,F);var rt=new N(new L(2)),ot=r(z.setInt8);rt.setInt8(0,2147483648),rt.setInt8(1,2147483649),!rt.getInt8(0)&&rt.getInt8(1)||l(z,{setInt8:function(t,e){ot(this,t,e<<24>>24)},setUint8:function(t,e){ot(this,t,e<<24>>24)}},{unsafe:!0})}else D=(L=function(t){f(this,D);var e=p(t);I(this,{type:E,bytes:X(j(e),0),byteLength:e}),o||(this.byteLength=e,this.detached=!1)})[O],z=(N=function(t,e,n){f(this,z),f(t,D);var i=R(t),r=i.byteLength,s=d(e);if(s<0||s>r)throw B("Wrong offset");if(s+(n=void 0===n?r-s:g(n))>r)throw B("Wrong length");I(this,{type:k,buffer:t,byteLength:n,byteOffset:s,bytes:i.bytes}),o||(this.buffer=t,this.byteLength=n,this.byteOffset=s)})[O],o&&(K(L,"byteLength",R),K(N,"buffer",C),K(N,"byteLength",C),K(N,"byteOffset",C)),l(z,{getInt8:function(t){return J(this,1,t)[0]<<24>>24},getUint8:function(t){return J(this,1,t)[0]},getInt16:function(t){var e=J(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=J(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return W(J(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return W(J(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return Y(J(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return Y(J(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){Q(this,1,t,V,e)},setUint8:function(t,e){Q(this,1,t,V,e)},setInt16:function(t,e){Q(this,2,t,G,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){Q(this,2,t,G,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){Q(this,4,t,H,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){Q(this,4,t,H,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){Q(this,4,t,q,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){Q(this,8,t,Z,e,arguments.length>2&&arguments[2])}});T(L,E),T(N,k),t.exports={ArrayBuffer:L,DataView:N}},function(t){"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,e,n){"use strict";var i=n(48);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},function(t,e,n){"use strict";var i=n(25),r=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw r("Incorrect invocation")}},function(t,e,n){"use strict";var i=n(62),r=n(65),o=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw o("Wrong length or index");return n}},function(t,e,n){"use strict";var i=n(214),r=n(63),o=Array,s=Math.abs,a=Math.pow,c=Math.floor,u=Math.log,l=Math.LN2,h=function(t){var e=r(t),n=s(t-e);return n>.5||.5===n&&e%2!=0?e+i(t):e};t.exports={pack:function(t,e,n){var i,r,f,d=o(n),g=8*n-e-1,p=(1<>1,y=23===e?a(2,-24)-a(2,-77):0,b=t<0||0===t&&1/t<0?1:0,x=0;for((t=s(t))!=t||t===1/0?(r=t!=t?1:0,i=p):(i=c(u(t)/l),t*(f=a(2,-i))<1&&(i--,f*=2),(t+=i+v>=1?y/f:y*a(2,1-v))*f>=2&&(i++,f/=2),i+v>=p?(r=0,i=p):i+v>=1?(r=h((t*f-1)*a(2,e)),i+=v):(r=h(t*a(2,v-1)*a(2,e)),i=0));e>=8;)d[x++]=255&r,r/=256,e-=8;for(i=i<0;)d[x++]=255&i,i/=256,g-=8;return d[--x]|=128*b,d},unpack:function(t,e){var n,i=t.length,r=8*i-e-1,o=(1<>1,c=r-7,u=i-1,l=t[u--],h=127&l;for(l>>=7;c>0;)h=256*h+t[u--],c-=8;for(n=h&(1<<-c)-1,h>>=-c,c+=e;c>0;)n=256*n+t[u--],c-=8;if(0===h)h=1-s;else{if(h===o)return n?NaN:l?-1/0:1/0;n+=a(2,e),h-=s}return(l?-1:1)*n*a(2,h-e)}}},function(t){"use strict";t.exports=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1}},function(t,e,n){"use strict";var i=n(3),r=n(216);i({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},function(t,e,n){"use strict";var i,r,o,s=n(209),a=n(6),c=n(4),u=n(21),l=n(20),h=n(39),f=n(70),d=n(32),g=n(44),p=n(48),v=n(79),y=n(25),b=n(130),x=n(116),m=n(34),_=n(41),T=n(52),w=T.enforce,A=T.get,S=c.Int8Array,E=S&&S.prototype,k=c.Uint8ClampedArray,O=k&&k.prototype,M=S&&b(S),R=E&&b(E),C=Object.prototype,I=c.TypeError,P=m("toStringTag"),L=_("TYPED_ARRAY_TAG"),D="TypedArrayConstructor",N=s&&!!x&&"Opera"!==f(c.opera),z=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},j={BigInt64Array:8,BigUint64Array:8},B=function(t){var e=b(t);if(l(e)){var n=A(e);return n&&h(n,D)?n[D]:B(e)}},X=function(t){if(!l(t))return!1;var e=f(t);return h(F,e)||h(j,e)};for(i in F)(o=(r=c[i])&&r.prototype)?w(o)[D]=r:N=!1;for(i in j)(o=(r=c[i])&&r.prototype)&&(w(o)[D]=r);if((!N||!u(M)||M===Function.prototype)&&(M=function(){throw I("Incorrect invocation")},N))for(i in F)c[i]&&x(c[i],M);if((!N||!R||R===C)&&(R=M.prototype,N))for(i in F)c[i]&&x(c[i].prototype,R);if(N&&b(O)!==R&&x(O,R),a&&!h(R,P))for(i in z=!0,v(R,P,{configurable:!0,get:function(){return l(this)?this[L]:void 0}}),F)c[i]&&g(c[i],L,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:N,TYPED_ARRAY_TAG:z&&L,aTypedArray:function(t){if(X(t))return t;throw I("Target is not a typed array")},aTypedArrayConstructor:function(t){if(u(t)&&(!x||y(M,t)))return t;throw I(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n,i){if(a){if(n)for(var r in F){var o=c[r];if(o&&h(o.prototype,t))try{delete o.prototype[t]}catch(n){try{o.prototype[t]=e}catch(t){}}}R[t]&&!n||p(R,t,n?e:N&&E[t]||e,i)}},exportTypedArrayStaticMethod:function(t,e,n){var i,r;if(a){if(x){if(n)for(i in F)if((r=c[i])&&h(r,t))try{delete r[t]}catch(t){}if(M[t]&&!n)return;try{return p(M,t,n?e:N&&M[t]||e)}catch(t){}}for(i in F)!(r=c[i])||r[t]&&!n||p(r,t,e)}},getTypedArrayConstructor:B,isView:function(t){if(!l(t))return!1;var e=f(t);return"DataView"===e||h(F,e)||h(j,e)},isTypedArray:X,TypedArray:M,TypedArrayPrototype:R}},function(t,e,n){"use strict";var i=n(3),r=n(87),o=n(7),s=n(208),a=n(47),c=n(61),u=n(65),l=n(218),h=s.ArrayBuffer,f=s.DataView,d=f.prototype,g=r(h.prototype.slice),p=r(d.getUint8),v=r(d.setUint8);i({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(g&&void 0===e)return g(a(this),t);for(var n=a(this).byteLength,i=c(t,n),r=c(void 0===e?n:e,n),o=new(l(this,h))(u(r-i)),s=new f(this),d=new f(o),y=0;i=0&&e<=99?e+1900:e)}})},function(t,e,n){"use strict";n(3)({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},function(t,e,n){"use strict";var i=n(3),r=n(227);i({target:"Date",proto:!0,forced:Date.prototype.toISOString!==r},{toISOString:r})},function(t,e,n){"use strict";var i=n(14),r=n(7),o=n(228).start,s=RangeError,a=isFinite,c=Math.abs,u=Date.prototype,l=u.toISOString,h=i(u.getTime),f=i(u.getUTCDate),d=i(u.getUTCFullYear),g=i(u.getUTCHours),p=i(u.getUTCMilliseconds),v=i(u.getUTCMinutes),y=i(u.getUTCMonth),b=i(u.getUTCSeconds);t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!==l.call(new Date(-50000000000001))}))||!r((function(){l.call(new Date(NaN))}))?function(){if(!a(h(this)))throw s("Invalid time value");var t=this,e=d(t),n=p(t),i=e<0?"-":e>9999?"+":"";return i+o(c(e),i?6:4,0)+"-"+o(y(t)+1,2,0)+"-"+o(f(t),2,0)+"T"+o(g(t),2,0)+":"+o(v(t),2,0)+":"+o(b(t),2,0)+"."+o(n,3,0)+"Z"}:l},function(t,e,n){"use strict";var i=n(14),r=n(65),o=n(69),s=n(229),a=n(16),c=i(s),u=i("".slice),l=Math.ceil,h=function(t){return function(e,n,i){var s,h,f=o(a(e)),d=r(n),g=f.length,p=void 0===i?" ":o(i);return d<=g||""===p?f:((h=c(p,l((s=d-g)/p.length))).length>s&&(h=u(h,0,s)),t?f+h:h+f)}};t.exports={start:h(!1),end:h(!0)}},function(t,e,n){"use strict";var i=n(62),r=n(69),o=n(16),s=RangeError;t.exports=function(t){var e=r(o(this)),n="",a=i(t);if(a<0||a===1/0)throw s("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(n+=e);return n}},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(40),s=n(19);i({target:"Date",proto:!0,arity:1,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=o(this),n=s(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){"use strict";var i=n(39),r=n(48),o=n(232),s=n(34)("toPrimitive"),a=Date.prototype;i(a,s)||r(a,s,o)},function(t,e,n){"use strict";var i=n(47),r=n(33),o=TypeError;t.exports=function(t){if(i(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw o("Incorrect hint");return r(this,t)}},function(t,e,n){"use strict";var i=n(14),r=n(48),o=Date.prototype,s="Invalid Date",a="toString",c=i(o[a]),u=i(o.getTime);String(new Date(NaN))!==s&&r(o,a,(function(){var t=u(this);return t==t?c(this):s}))},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(69),s=r("".charAt),a=r("".charCodeAt),c=r(/./.exec),u=r(1..toString),l=r("".toUpperCase),h=/[\w*+\-./@]/,f=function(t,e){for(var n=u(t,16);n.length1?arguments[1]:void 0);e=e?e.next:n.first;)for(i(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!x(this,t)}}),o(f,n?{get:function(t){var e=x(this,t);return e&&e.value},set:function(t,e){return b(this,0===t?0:t,e)}}:{add:function(t){return b(this,t=0===t?0:t,t)}}),d&&r(f,"size",{configurable:!0,get:function(){return p(this).size}}),h},setStrong:function(t,e,n){var i=e+" Iterator",r=y(e),o=y(i);l(t,e,(function(t,e){v(this,{type:i,target:t,state:r(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?h("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=void 0,h(void 0,!0))}),n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var i=n(3),r=n(250),o=Math.acosh,s=Math.log,a=Math.sqrt,c=Math.LN2;i({target:"Math",stat:!0,forced:!o||710!==Math.floor(o(Number.MAX_VALUE))||o(1/0)!==1/0},{acosh:function(t){var e=+t;return e<1?NaN:e>94906265.62425156?s(e)+c:r(e-1+a(e-1)*a(e+1))}})},function(t){"use strict";var e=Math.log;t.exports=Math.log1p||function(t){var n=+t;return n>-1e-8&&n<1e-8?n-n*n/2:e(1+n)}},function(t,e,n){"use strict";var i=n(3),r=Math.asinh,o=Math.log,s=Math.sqrt;i({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function t(e){var n=+e;return isFinite(n)&&0!==n?n<0?-t(-n):o(n+s(n*n+1)):n}})},function(t,e,n){"use strict";var i=n(3),r=Math.atanh,o=Math.log;i({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(t){var e=+t;return 0===e?e:o((1+e)/(1-e))/2}})},function(t,e,n){"use strict";var i=n(3),r=n(214),o=Math.abs,s=Math.pow;i({target:"Math",stat:!0},{cbrt:function(t){var e=+t;return r(e)*s(o(e),1/3)}})},function(t,e,n){"use strict";var i=n(3),r=Math.floor,o=Math.log,s=Math.LOG2E;i({target:"Math",stat:!0},{clz32:function(t){var e=t>>>0;return e?31-r(o(e+.5)*s):32}})},function(t,e,n){"use strict";var i=n(3),r=n(256),o=Math.cosh,s=Math.abs,a=Math.E;i({target:"Math",stat:!0,forced:!o||o(710)===1/0},{cosh:function(t){var e=r(s(t)-1)+1;return(e+1/(e*a*a))*(a/2)}})},function(t){"use strict";var e=Math.expm1,n=Math.exp;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!==e(-2e-17)?function(t){var e=+t;return 0===e?e:e>-1e-6&&e<1e-6?e+e*e/2:n(e)-1}:e},function(t,e,n){"use strict";var i=n(3),r=n(256);i({target:"Math",stat:!0,forced:r!==Math.expm1},{expm1:r})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{fround:n(259)})},function(t,e,n){"use strict";var i=n(214),r=Math.abs,o=Math.pow,s=o(2,-52),a=o(2,-23),c=o(2,127)*(2-a),u=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=+t,l=r(o),h=i(o);return lc||n!=n?h*(1/0):h*n}},function(t,e,n){"use strict";var i=n(3),r=Math.hypot,o=Math.abs,s=Math.sqrt;i({target:"Math",stat:!0,arity:2,forced:!!r&&r(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,i,r=0,a=0,c=arguments.length,u=0;a0?(i=n/u)*i:n;return u===1/0?1/0:u*s(r)}})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=Math.imul;i({target:"Math",stat:!0,forced:r((function(){return-5!==o(4294967295,5)||2!==o.length}))},{imul:function(t,e){var n=65535,i=+t,r=+e,o=n&i,s=n&r;return 0|o*s+((n&i>>>16)*s+o*(n&r>>>16)<<16>>>0)}})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{log10:n(263)})},function(t){"use strict";var e=Math.log,n=Math.LOG10E;t.exports=Math.log10||function(t){return e(t)*n}},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{log1p:n(250)})},function(t,e,n){"use strict";var i=n(3),r=Math.log,o=Math.LN2;i({target:"Math",stat:!0},{log2:function(t){return r(t)/o}})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{sign:n(214)})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(256),s=Math.abs,a=Math.exp,c=Math.E;i({target:"Math",stat:!0,forced:r((function(){return-2e-17!==Math.sinh(-2e-17)}))},{sinh:function(t){var e=+t;return s(e)<1?(o(e)-o(-e))/2:(a(e-1)-a(-e-1))*(c/2)}})},function(t,e,n){"use strict";var i=n(3),r=n(256),o=Math.exp;i({target:"Math",stat:!0},{tanh:function(t){var e=+t,n=r(e),i=r(-e);return n===1/0?1:i===1/0?-1:(n-i)/(o(e)+o(-e))}})},function(t,e,n){"use strict";n(84)(Math,"Math",!0)},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{trunc:n(63)})},function(t,e,n){"use strict";var i=n(3),r=n(36),o=n(6),s=n(4),a=n(82),c=n(14),u=n(68),l=n(39),h=n(120),f=n(25),d=n(23),g=n(19),p=n(7),v=n(58).f,y=n(5).f,b=n(45).f,x=n(272),m=n(273).trim,_="Number",T=s[_],w=a[_],A=T.prototype,S=s.TypeError,E=c("".slice),k=c("".charCodeAt),O=function(t){var e,n,i,r,o,s,a,c,u=g(t,"number");if(d(u))throw S("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=m(u),43===(e=k(u,0))||45===e){if(88===(n=k(u,2))||120===n)return NaN}else if(48===e){switch(k(u,1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+u}for(s=(o=E(u,2)).length,a=0;ar)return NaN;return parseInt(o,i)}return+u},M=u(_,!T(" 0o1")||!T("0b1")||T("+0x1")),R=function(t){var e,n=arguments.length<1?0:T(function(t){var e=g(t,"number");return"bigint"==typeof e?e:O(e)}(t));return f(A,e=this)&&p((function(){x(e)}))?h(Object(n),this,R):n};R.prototype=A,M&&!r&&(A.constructor=R),i({global:!0,constructor:!0,wrap:!0,forced:M},{Number:R});var C=function(t,e){for(var n,i=o?v(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),r=0;i.length>r;r++)l(e,n=i[r])&&!l(t,n)&&b(t,n,y(e,n))};r&&w&&C(a[_],w),(M||r)&&C(a[_],T)},function(t,e,n){"use strict";var i=n(14);t.exports=i(1..valueOf)},function(t,e,n){"use strict";var i=n(14),r=n(16),o=n(69),s=n(274),a=i("".replace),c=RegExp("^["+s+"]+"),u=RegExp("(^|[^"+s+"])["+s+"]+$"),l=function(t){return function(e){var n=o(r(e));return 1&t&&(n=a(n,c,"")),2&t&&(n=a(n,u,"$1")),n}};t.exports={start:l(1),end:l(2),trim:l(3)}},function(t){"use strict";t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isFinite:n(277)})},function(t,e,n){"use strict";var i=n(4).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&i(t)}},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isInteger:n(279)})},function(t,e,n){"use strict";var i=n(20),r=Math.floor;t.exports=Number.isInteger||function(t){return!i(t)&&isFinite(t)&&r(t)===t}},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,n){"use strict";var i=n(3),r=n(279),o=Math.abs;i({target:"Number",stat:!0},{isSafeInteger:function(t){return r(t)&&o(t)<=9007199254740991}})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){"use strict";var i=n(3),r=n(285);i({target:"Number",stat:!0,forced:Number.parseFloat!==r},{parseFloat:r})},function(t,e,n){"use strict";var i=n(4),r=n(7),o=n(14),s=n(69),a=n(273).trim,c=n(274),u=o("".charAt),l=i.parseFloat,h=i.Symbol,f=h&&h.iterator,d=1/l(c+"-0")!=-1/0||f&&!r((function(){l(Object(f))}));t.exports=d?function(t){var e=a(s(t)),n=l(e);return 0===n&&"-"===u(e,0)?-0:n}:l},function(t,e,n){"use strict";var i=n(3),r=n(287);i({target:"Number",stat:!0,forced:Number.parseInt!==r},{parseInt:r})},function(t,e,n){"use strict";var i=n(4),r=n(7),o=n(14),s=n(69),a=n(273).trim,c=n(274),u=i.parseInt,l=i.Symbol,h=l&&l.iterator,f=/^[+-]?0x/i,d=o(f.exec),g=8!==u(c+"08")||22!==u(c+"0x16")||h&&!r((function(){u(Object(h))}));t.exports=g?function(t,e){var n=a(s(t));return u(n,e>>>0||(d(f,n)?16:10))}:u},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(62),s=n(272),a=n(229),c=n(263),u=n(7),l=RangeError,h=String,f=isFinite,d=Math.abs,g=Math.floor,p=Math.pow,v=Math.round,y=r(1..toExponential),b=r(a),x=r("".slice),m="-6.9000e-11"===y(-69e-12,4)&&"1.25e+0"===y(1.255,2)&&"1.235e+4"===y(12345,3)&&"3e+1"===y(25,0);i({target:"Number",proto:!0,forced:!m||!(u((function(){y(1,1/0)}))&&u((function(){y(1,-1/0)})))||!!u((function(){y(1/0,1/0),y(NaN,1/0)}))},{toExponential:function(t){var e=s(this);if(void 0===t)return y(e);var n=o(t);if(!f(e))return String(e);if(n<0||n>20)throw l("Incorrect fraction digits");if(m)return y(e,n);var i="",r="",a=0,u="",_="";if(e<0&&(i="-",e=-e),0===e)a=0,r=b("0",n+1);else{var T=c(e);a=g(T);var w=0,A=p(10,a-n);2*e>=(2*(w=v(e/A))+1)*A&&(w+=1),w>=p(10,n+1)&&(w/=10,a+=1),r=h(w)}return 0!==n&&(r=x(r,0,1)+"."+x(r,1)),0===a?(u="+",_="0"):(u=a>0?"+":"-",_=h(d(a))),i+(r+="e"+u+_)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(62),s=n(272),a=n(229),c=n(7),u=RangeError,l=String,h=Math.floor,f=r(a),d=r("".slice),g=r(1..toFixed),p=function(t,e,n){return 0===e?n:e%2==1?p(t,e-1,n*t):p(t*t,e/2,n)},v=function(t,e,n){for(var i=-1,r=n;++i<6;)r+=e*t[i],t[i]=r%1e7,r=h(r/1e7)},y=function(t,e){for(var n=6,i=0;--n>=0;)i+=t[n],t[n]=h(i/e),i=i%e*1e7},b=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var i=l(t[e]);n=""===n?i:n+f("0",7-i.length)+i}return n};i({target:"Number",proto:!0,forced:c((function(){return"0.000"!==g(8e-5,3)||"1"!==g(.9,0)||"1.25"!==g(1.255,2)||"1000000000000000128"!==g(0xde0b6b3a7640080,0)}))||!c((function(){g({})}))},{toFixed:function(t){var e,n,i,r,a=s(this),c=o(t),h=[0,0,0,0,0,0],g="",x="0";if(c<0||c>20)throw u("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return l(a);if(a<0&&(g="-",a=-a),a>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(a*p(2,69,1))-69)<0?a*p(2,-e,1):a/p(2,e,1),n*=4503599627370496,(e=52-e)>0){for(v(h,0,n),i=c;i>=7;)v(h,1e7,0),i-=7;for(v(h,p(10,i,1),0),i=e-1;i>=23;)y(h,1<<23),i-=23;y(h,1<0?g+((r=x.length)<=c?"0."+f("0",c-r)+x:d(x,0,r-c)+"."+d(x,r-c)):g+x}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(7),s=n(272),a=r(1..toPrecision);i({target:"Number",proto:!0,forced:o((function(){return"1"!==a(1,void 0)}))||!o((function(){a({})}))},{toPrecision:function(t){return void 0===t?a(s(this)):a(s(this),t)}})},function(t,e,n){"use strict";var i=n(3),r=n(292);i({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},function(t,e,n){"use strict";var i=n(6),r=n(14),o=n(8),s=n(7),a=n(74),c=n(67),u=n(10),l=n(40),h=n(13),f=Object.assign,d=Object.defineProperty,g=r([].concat);t.exports=!f||s((function(){if(i&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!==f({},t)[n]||a(f({},e)).join("")!==r}))?function(t,e){for(var n=l(t),r=arguments.length,s=1,f=c.f,d=u.f;r>s;)for(var p,v=h(arguments[s++]),y=f?g(a(v),f(v)):a(v),b=y.length,x=0;b>x;)p=y[x++],i&&!o(d,v,p)||(n[p]=v[p]);return n}:f},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0,sham:!n(6)},{create:n(72)})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(295),s=n(31),a=n(40),c=n(45);r&&i({target:"Object",proto:!0,forced:o},{__defineGetter__:function(t,e){c.f(a(this),t,{get:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(36),r=n(4),o=n(7),s=n(192);t.exports=i||!o((function(){if(!(s&&s<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete r[t]}}))},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(73).f;i({target:"Object",stat:!0,forced:Object.defineProperties!==o,sham:!r},{defineProperties:o})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(45).f;i({target:"Object",stat:!0,forced:Object.defineProperty!==o,sham:!r},{defineProperty:o})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(295),s=n(31),a=n(40),c=n(45);r&&i({target:"Object",proto:!0,forced:o},{__defineSetter__:function(t,e){c.f(a(this),t,{set:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(3),r=n(300).entries;i({target:"Object",stat:!0},{entries:function(t){return r(t)}})},function(t,e,n){"use strict";var i=n(6),r=n(7),o=n(14),s=n(130),a=n(74),c=n(12),u=o(n(10).f),l=o([].push),h=i&&r((function(){var t=Object.create(null);return t[2]=2,!u(t,2)})),f=function(t){return function(e){for(var n,r=c(e),o=a(r),f=h&&null===s(r),d=o.length,g=0,p=[];d>g;)n=o[g++],i&&!(f?n in r:u(r,n))||l(p,t?[n,r[n]]:r[n]);return p}};t.exports={entries:f(!0),values:f(!1)}},function(t,e,n){"use strict";var i=n(3),r=n(247),o=n(7),s=n(20),a=n(244).onFreeze,c=Object.freeze;i({target:"Object",stat:!0,forced:o((function(){c(1)})),sham:!r},{freeze:function(t){return c&&s(t)?c(a(t)):t}})},function(t,e,n){"use strict";var i=n(3),r=n(132),o=n(78);i({target:"Object",stat:!0},{fromEntries:function(t){var e={};return r(t,(function(t,n){o(e,t,n)}),{AS_ENTRIES:!0}),e}})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(12),s=n(5).f,a=n(6);i({target:"Object",stat:!0,forced:!a||r((function(){s(1)})),sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(o(t),e)}})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(57),s=n(12),a=n(5),c=n(78);i({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(t){for(var e,n,i=s(t),r=a.f,u=o(i),l={},h=0;u.length>h;)void 0!==(n=r(i,e=u[h++]))&&c(l,e,n);return l}})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(76).f;i({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(40),s=n(130),a=n(131);i({target:"Object",stat:!0,forced:r((function(){s(1)})),sham:!a},{getPrototypeOf:function(t){return s(o(t))}})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{hasOwn:n(39)})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{is:n(309)})},function(t){"use strict";t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var i=n(3),r=n(245);i({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(20),s=n(15),a=n(246),c=Object.isFrozen;i({target:"Object",stat:!0,forced:a||r((function(){c(1)}))},{isFrozen:function(t){return!o(t)||(!(!a||"ArrayBuffer"!==s(t))||!!c&&c(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(7),o=n(20),s=n(15),a=n(246),c=Object.isSealed;i({target:"Object",stat:!0,forced:a||r((function(){c(1)}))},{isSealed:function(t){return!o(t)||(!(!a||"ArrayBuffer"!==s(t))||!!c&&c(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(40),o=n(74);i({target:"Object",stat:!0,forced:n(7)((function(){o(1)}))},{keys:function(t){return o(r(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(295),s=n(40),a=n(18),c=n(130),u=n(5).f;r&&i({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(t){var e,n=s(this),i=a(t);do{if(e=u(n,i))return e.get}while(n=c(n))}})},function(t,e,n){"use strict";var i=n(3),r=n(6),o=n(295),s=n(40),a=n(18),c=n(130),u=n(5).f;r&&i({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(t){var e,n=s(this),i=a(t);do{if(e=u(n,i))return e.set}while(n=c(n))}})},function(t,e,n){"use strict";var i=n(3),r=n(20),o=n(244).onFreeze,s=n(247),a=n(7),c=Object.preventExtensions;i({target:"Object",stat:!0,forced:a((function(){c(1)})),sham:!s},{preventExtensions:function(t){return c&&r(t)?c(o(t)):t}})},function(t,e,n){"use strict";var i=n(6),r=n(79),o=n(20),s=n(40),a=n(16),c=Object.getPrototypeOf,u=Object.setPrototypeOf,l=Object.prototype,h="__proto__";if(i&&c&&u&&!(h in l))try{r(l,h,{configurable:!0,get:function(){return c(s(this))},set:function(t){var e=a(this);(o(t)||null===t)&&o(e)&&u(e,t)}})}catch(t){}},function(t,e,n){"use strict";var i=n(3),r=n(20),o=n(244).onFreeze,s=n(247),a=n(7),c=Object.seal;i({target:"Object",stat:!0,forced:a((function(){c(1)})),sham:!s},{seal:function(t){return c&&r(t)?c(o(t)):t}})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{setPrototypeOf:n(116)})},function(t,e,n){"use strict";var i=n(71),r=n(48),o=n(321);i||r(Object.prototype,"toString",o,{unsafe:!0})},function(t,e,n){"use strict";var i=n(71),r=n(70);t.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},function(t,e,n){"use strict";var i=n(3),r=n(300).values;i({target:"Object",stat:!0},{values:function(t){return r(t)}})},function(t,e,n){"use strict";var i=n(3),r=n(285);i({global:!0,forced:parseFloat!==r},{parseFloat:r})},function(t,e,n){"use strict";var i=n(3),r=n(287);i({global:!0,forced:parseInt!==r},{parseInt:r})},function(t,e,n){"use strict";n(326),n(341),n(343),n(344),n(345),n(346)},function(t,e,n){"use strict";var i,r,o,s=n(3),a=n(36),c=n(183),u=n(4),l=n(8),h=n(48),f=n(116),d=n(84),g=n(194),p=n(31),v=n(21),y=n(20),b=n(211),x=n(218),m=n(327).set,_=n(330),T=n(334),w=n(335),A=n(331),S=n(52),E=n(336),k=n(337),O=n(340),M="Promise",R=k.CONSTRUCTOR,C=k.REJECTION_EVENT,I=k.SUBCLASSING,P=S.getterFor(M),L=S.set,D=E&&E.prototype,N=E,z=D,F=u.TypeError,j=u.document,B=u.process,X=O.f,$=X,U=!!(j&&j.createEvent&&u.dispatchEvent),Y="unhandledrejection",V=function(t){var e;return!(!y(t)||!v(e=t.then))&&e},G=function(t,e){var n,i,r,o=e.value,s=1===e.state,a=s?t.ok:t.fail,c=t.resolve,u=t.reject,h=t.domain;try{a?(s||(2===e.rejection&&K(e),e.rejection=1),!0===a?n=o:(h&&h.enter(),n=a(o),h&&(h.exit(),r=!0)),n===t.promise?u(F("Promise-chain cycle")):(i=V(n))?l(i,n,c,u):c(n)):u(o)}catch(t){h&&!r&&h.exit(),u(t)}},H=function(t,e){t.notified||(t.notified=!0,_((function(){for(var n,i=t.reactions;n=i.get();)G(n,t);t.notified=!1,e&&!t.rejection&&q(t)})))},W=function(t,e,n){var i,r;U?((i=j.createEvent("Event")).promise=e,i.reason=n,i.initEvent(t,!1,!0),u.dispatchEvent(i)):i={promise:e,reason:n},!C&&(r=u["on"+t])?r(i):t===Y&&T("Unhandled promise rejection",n)},q=function(t){l(m,u,(function(){var e,n=t.facade,i=t.value;if(Z(t)&&(e=w((function(){c?B.emit("unhandledRejection",i,n):W(Y,n,i)})),t.rejection=c||Z(t)?2:1,e.error))throw e.value}))},Z=function(t){return 1!==t.rejection&&!t.parent},K=function(t){l(m,u,(function(){var e=t.facade;c?B.emit("rejectionHandled",e):W("rejectionhandled",e,t.value)}))},J=function(t,e,n){return function(i){t(e,i,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,H(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw F("Promise can't be resolved itself");var i=V(e);i?_((function(){var n={done:!1};try{l(i,e,J(tt,n,t),J(Q,n,t))}catch(e){Q(n,e,t)}})):(t.value=e,t.state=1,H(t,!1))}catch(e){Q({done:!1},e,t)}}};if(R&&(z=(N=function(t){b(this,z),p(t),l(i,this);var e=P(this);try{t(J(tt,e),J(Q,e))}catch(t){Q(e,t)}}).prototype,(i=function(t){L(this,{type:M,done:!1,notified:!1,parent:!1,reactions:new A,rejection:!1,state:0,value:void 0})}).prototype=h(z,"then",(function(t,e){var n=P(this),i=X(x(this,N));return n.parent=!0,i.ok=!v(t)||t,i.fail=v(e)&&e,i.domain=c?B.domain:void 0,0===n.state?n.reactions.add(i):_((function(){G(i,n)})),i.promise})),r=function(){var t=new i,e=P(t);this.promise=t,this.resolve=J(tt,e),this.reject=J(Q,e)},O.f=X=function(t){return t===N||undefined===t?new r(t):$(t)},!a&&v(E)&&D!==Object.prototype)){o=D.then,I||h(D,"then",(function(t,e){var n=this;return new N((function(t,e){l(o,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete D.constructor}catch(t){}f&&f(D,z)}s({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:N}),d(N,M,!1,!0),g(M)},function(t,e,n){"use strict";var i,r,o,s,a=n(4),c=n(96),u=n(86),l=n(21),h=n(39),f=n(7),d=n(75),g=n(97),p=n(43),v=n(328),y=n(329),b=n(183),x=a.setImmediate,m=a.clearImmediate,_=a.process,T=a.Dispatch,w=a.Function,A=a.MessageChannel,S=a.String,E=0,k={},O="onreadystatechange";f((function(){i=a.location}));var M=function(t){if(h(k,t)){var e=k[t];delete k[t],e()}},R=function(t){return function(){M(t)}},C=function(t){M(t.data)},I=function(t){a.postMessage(S(t),i.protocol+"//"+i.host)};x&&m||(x=function(t){v(arguments.length,1);var e=l(t)?t:w(t),n=g(arguments,1);return k[++E]=function(){c(e,void 0,n)},r(E),E},m=function(t){delete k[t]},b?r=function(t){_.nextTick(R(t))}:T&&T.now?r=function(t){T.now(R(t))}:A&&!y?(s=(o=new A).port2,o.port1.onmessage=C,r=u(s.postMessage,s)):a.addEventListener&&l(a.postMessage)&&!a.importScripts&&i&&"file:"!==i.protocol&&!f(I)?(r=I,a.addEventListener("message",C,!1)):r=O in p("script")?function(t){d.appendChild(p("script"))[O]=function(){d.removeChild(this),M(t)}}:function(t){setTimeout(R(t),0)}),t.exports={set:x,clear:m}},function(t){"use strict";var e=TypeError;t.exports=function(t,n){if(t@^][^\s!#%&*+<=>@^]*>/,L=/a/g,D=/a/g,N=new S(L)!==L,z=g.MISSED_STICKY,F=g.UNSUPPORTED_Y,j=i&&(!N||z||T||w||y((function(){return D[A]=!1,S(L)!==L||S(D)===D||"/a/i"!==String(S(L,"i"))})));if(s("RegExp",j)){for(var B=function(t,e){var n,i,r,o,s,u,g=l(E,this),p=h(t),v=void 0===e,y=[],m=t;if(!g&&p&&v&&t.constructor===B)return t;if((p||l(E,t))&&(t=t.source,v&&(e=d(m))),t=void 0===t?"":f(t),e=void 0===e?"":f(e),m=t,T&&"dotAll"in L&&(i=!!e&&C(e,"s")>-1)&&(e=R(e,/s/g,"")),n=e,z&&"sticky"in L&&(r=!!e&&C(e,"y")>-1)&&F&&(e=R(e,/y/g,"")),w&&(o=function(t){for(var e,n=t.length,i=0,r="",o=[],s={},a=!1,c=!1,u=0,l="";i<=n;i++){if("\\"===(e=M(t,i)))e+=M(t,++i);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:O(P,I(t,i+1))&&(i+=2,c=!0),r+=e,u++;continue;case">"===e&&c:if(""===l||b(s,l))throw new k("Invalid capture group name");s[l]=!0,o[o.length]=[l,u],c=!1,l="";continue}c?l+=e:r+=e}return[r,o]}(t),t=o[0],y=o[1]),s=a(S(t,e),g?this:E,B),(i||r||y.length)&&(u=x(s),i&&(u.dotAll=!0,u.raw=B(function(t){for(var e,n=t.length,i=0,r="",o=!1;i<=n;i++)"\\"!==(e=M(t,i))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),r+=e):r+="[\\s\\S]":r+=e+M(t,++i);return r}(t),n)),r&&(u.sticky=!0),y.length&&(u.groups=y)),t!==m)try{c(s,"source",""===m?"(?:)":m)}catch(t){}return s},X=u(S),$=0;X.length>$;)p(B,S,X[$++]);E.constructor=B,B.prototype=E,v(r,"RegExp",B,{constructor:!0})}m("RegExp")},function(t,e,n){"use strict";var i=n(20),r=n(15),o=n(34)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[o])?!!e:"RegExp"===r(t))}},function(t,e,n){"use strict";var i=n(8),r=n(39),o=n(25),s=n(369),a=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in a||r(t,"flags")||!o(a,t)?e:i(s,t)}},function(t,e,n){"use strict";var i=n(47);t.exports=function(){var t=i(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp,o=i((function(){var t=r("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),s=o||i((function(){return!r("a","y").sticky})),a=o||i((function(){var t=r("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:o}},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp;t.exports=i((function(){var t=r(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp;t.exports=i((function(){var t=r("(?
b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},function(t,e,n){"use strict";var i=n(6),r=n(371),o=n(15),s=n(79),a=n(52).get,c=RegExp.prototype,u=TypeError;i&&r&&s(c,"dotAll",{configurable:!0,get:function(){if(this!==c){if("RegExp"===o(this))return!!a(this).dotAll;throw u("Incompatible receiver, RegExp required")}}})},function(t,e,n){"use strict";var i=n(3),r=n(375);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(t,e,n){"use strict";var i,r,o=n(8),s=n(14),a=n(69),c=n(369),u=n(370),l=n(35),h=n(72),f=n(52).get,d=n(371),g=n(372),p=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,y=v,b=s("".charAt),x=s("".indexOf),m=s("".replace),_=s("".slice),T=(r=/b*/g,o(v,i=/a/,"a"),o(v,r,"a"),0!==i.lastIndex||0!==r.lastIndex),w=u.BROKEN_CARET,A=void 0!==/()??/.exec("")[1];(T||A||w||d||g)&&(y=function(t){var e,n,i,r,s,u,l,d=this,g=f(d),S=a(t),E=g.raw;if(E)return E.lastIndex=d.lastIndex,e=o(y,E,S),d.lastIndex=E.lastIndex,e;var k=g.groups,O=w&&d.sticky,M=o(c,d),R=d.source,C=0,I=S;if(O&&(M=m(M,"y",""),-1===x(M,"g")&&(M+="g"),I=_(S,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==b(S,d.lastIndex-1))&&(R="(?: "+R+")",I=" "+I,C++),n=new RegExp("^(?:"+R+")",M)),A&&(n=new RegExp("^"+R+"$(?!\\s)",M)),T&&(i=d.lastIndex),r=o(v,O?n:d,I),O?r?(r.input=_(r.input,C),r[0]=_(r[0],C),r.index=d.lastIndex,d.lastIndex+=r[0].length):d.lastIndex=0:T&&r&&(d.lastIndex=d.global?r.index+r[0].length:i),A&&r&&r.length>1&&o(p,r[0],n,(function(){for(s=1;s=0?i:n+i;return r<0||r>=n?void 0:u(e,r)}})},function(t,e,n){"use strict";var i=n(3),r=n(384).codeAt;i({target:"String",proto:!0},{codePointAt:function(t){return r(this,t)}})},function(t,e,n){"use strict";var i=n(14),r=n(62),o=n(69),s=n(16),a=i("".charAt),c=i("".charCodeAt),u=i("".slice),l=function(t){return function(e,n){var i,l,h=o(s(e)),f=r(n),d=h.length;return f<0||f>=d?t?"":void 0:(i=c(h,f))<55296||i>56319||f+1===d||(l=c(h,f+1))<56320||l>57343?t?a(h,f):i:t?u(h,f,f+2):l-56320+(i-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},function(t,e,n){"use strict";var i,r=n(3),o=n(87),s=n(5).f,a=n(65),c=n(69),u=n(386),l=n(16),h=n(387),f=n(36),d=o("".endsWith),g=o("".slice),p=Math.min,v=h("endsWith");r({target:"String",proto:!0,forced:!!(f||v||(i=s(String.prototype,"endsWith"),!i||i.writable))&&!v},{endsWith:function(t){var e=c(l(this));u(t);var n=arguments.length>1?arguments[1]:void 0,i=e.length,r=void 0===n?i:p(a(n),i),o=c(t);return d?d(e,o,r):g(e,r-o.length,r)===o}})},function(t,e,n){"use strict";var i=n(367),r=TypeError;t.exports=function(t){if(i(t))throw r("The method doesn't accept regular expressions");return t}},function(t,e,n){"use strict";var i=n(34)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[i]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(61),s=RangeError,a=String.fromCharCode,c=String.fromCodePoint,u=r([].join);i({target:"String",stat:!0,arity:1,forced:!!c&&1!==c.length},{fromCodePoint:function(t){for(var e,n=[],i=arguments.length,r=0;i>r;){if(e=+arguments[r++],o(e,1114111)!==e)throw s(e+" is not a valid code point");n[r]=e<65536?a(e):a(55296+((e-=65536)>>10),e%1024+56320)}return u(n,"")}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(386),s=n(16),a=n(69),c=n(387),u=r("".indexOf);i({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~u(a(s(this)),a(o(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(16),s=n(69),a=r("".charCodeAt);i({target:"String",proto:!0},{isWellFormed:function(){for(var t=s(o(this)),e=t.length,n=0;n=56320||++n>=e||56320!=(64512&a(t,n))))return!1}return!0}})},function(t,e,n){"use strict";var i=n(384).charAt,r=n(69),o=n(52),s=n(170),a=n(173),c="String Iterator",u=o.set,l=o.getterFor(c);s(String,"String",(function(t){u(this,{type:c,string:r(t),index:0})}),(function(){var t,e=l(this),n=e.string,r=e.index;return r>=n.length?a(void 0,!0):(t=i(n,r),e.index+=t.length,a(t,!1))}))},function(t,e,n){"use strict";var i=n(8),r=n(393),o=n(47),s=n(17),a=n(65),c=n(69),u=n(16),l=n(30),h=n(394),f=n(395);r("match",(function(t,e,n){return[function(e){var n=u(this),r=s(e)?void 0:l(e,t);return r?i(r,e,n):new RegExp(e)[t](c(n))},function(t){var i=o(this),r=c(t),s=n(e,i,r);if(s.done)return s.value;if(!i.global)return f(i,r);var u=i.unicode;i.lastIndex=0;for(var l,d=[],g=0;null!==(l=f(i,r));){var p=c(l[0]);d[g]=p,""===p&&(i.lastIndex=h(r,a(i.lastIndex),u)),g++}return 0===g?null:d}]}))},function(t,e,n){"use strict";n(374);var i=n(87),r=n(48),o=n(375),s=n(7),a=n(34),c=n(44),u=a("species"),l=RegExp.prototype;t.exports=function(t,e,n,h){var f=a(t),d=!s((function(){var e={};return e[f]=function(){return 7},7!==""[t](e)})),g=d&&!s((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return e=!0,null},n[f](""),!e}));if(!d||!g||n){var p=i(/./[f]),v=e(f,""[t],(function(t,e,n,r,s){var a=i(t),c=e.exec;return c===o||c===l.exec?d&&!s?{done:!0,value:p(e,n,r)}:{done:!0,value:a(n,e,r)}:{done:!1}}));r(String.prototype,t,v[0]),r(l,f,v[1])}h&&c(l[f],"sham",!0)}},function(t,e,n){"use strict";var i=n(384).charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},function(t,e,n){"use strict";var i=n(8),r=n(47),o=n(21),s=n(15),a=n(375),c=TypeError;t.exports=function(t,e){var n=t.exec;if(o(n)){var u=i(n,t,e);return null!==u&&r(u),u}if("RegExp"===s(t))return i(a,t,e);throw c("RegExp#exec called on incompatible receiver")}},function(t,e,n){"use strict";var i=n(3),r=n(8),o=n(87),s=n(171),a=n(173),c=n(16),u=n(65),l=n(69),h=n(47),f=n(17),d=n(15),g=n(367),p=n(368),v=n(30),y=n(48),b=n(7),x=n(34),m=n(218),_=n(394),T=n(395),w=n(52),A=n(36),S=x("matchAll"),E="RegExp String",k=E+" Iterator",O=w.set,M=w.getterFor(k),R=RegExp.prototype,C=TypeError,I=o("".indexOf),P=o("".matchAll),L=!!P&&!b((function(){P("a",/./)})),D=s((function(t,e,n,i){O(this,{type:k,regexp:t,string:e,global:n,unicode:i,done:!1})}),E,(function(){var t=M(this);if(t.done)return a(void 0,!0);var e=t.regexp,n=t.string,i=T(e,n);return null===i?(t.done=!0,a(void 0,!0)):t.global?(""===l(i[0])&&(e.lastIndex=_(n,u(e.lastIndex),t.unicode)),a(i,!1)):(t.done=!0,a(i,!1))})),N=function(t){var e,n,i,r=h(this),o=l(t),s=m(r,RegExp),a=l(p(r));return e=new s(s===RegExp?r.source:r,a),n=!!~I(a,"g"),i=!!~I(a,"u"),e.lastIndex=u(r.lastIndex),new D(e,o,n,i)};i({target:"String",proto:!0,forced:L},{matchAll:function(t){var e,n,i,o,s=c(this);if(f(t)){if(L)return P(s,t)}else{if(g(t)&&(e=l(c(p(t))),!~I(e,"g")))throw C("`.matchAll` does not allow non-global regexes");if(L)return P(s,t);if(void 0===(i=v(t,S))&&A&&"RegExp"===d(t)&&(i=N),i)return r(i,t,s)}return n=l(s),o=new RegExp(t,"g"),A?r(N,o,n):o[S](n)}}),A||S in R||y(R,S,N)},function(t,e,n){"use strict";var i=n(3),r=n(228).end;i({target:"String",proto:!0,forced:n(398)},{padEnd:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(29);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(i)},function(t,e,n){"use strict";var i=n(3),r=n(228).start;i({target:"String",proto:!0,forced:n(398)},{padStart:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(12),s=n(40),a=n(69),c=n(64),u=r([].push),l=r([].join);i({target:"String",stat:!0},{raw:function(t){var e=o(s(t).raw),n=c(e);if(!n)return"";for(var i=arguments.length,r=[],h=0;;){if(u(r,a(e[h++])),h===n)return l(r,"");h=R&&(M+=S(a,R,L)+I,R=L+P.length)}return M+S(a,R)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!E||k)},function(t,e,n){"use strict";var i=n(14),r=n(40),o=Math.floor,s=i("".charAt),a=i("".replace),c=i("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,i,h,f){var d=n+t.length,g=i.length,p=l;return void 0!==h&&(h=r(h),p=u),a(f,p,(function(r,a){var u;switch(s(a,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,n);case"'":return c(e,d);case"<":u=h[c(a,1,-1)];break;default:var l=+a;if(0===l)return r;if(l>g){var f=o(l/10);return 0===f?r:f<=g?void 0===i[f-1]?s(a,1):i[f-1]+s(a,1):r}u=i[l-1]}return void 0===u?"":u}))}},function(t,e,n){"use strict";var i=n(3),r=n(8),o=n(14),s=n(16),a=n(21),c=n(17),u=n(367),l=n(69),h=n(30),f=n(368),d=n(403),g=n(34),p=n(36),v=g("replace"),y=TypeError,b=o("".indexOf),x=o("".replace),m=o("".slice),_=Math.max,T=function(t,e,n){return n>t.length?-1:""===e?n:b(t,e,n)};i({target:"String",proto:!0},{replaceAll:function(t,e){var n,i,o,g,w,A,S,E,k,O=s(this),M=0,R=0,C="";if(!c(t)){if((n=u(t))&&(i=l(s(f(t))),!~b(i,"g")))throw y("`.replaceAll` does not allow non-global regexes");if(o=h(t,v))return r(o,t,O,e);if(p&&n)return x(l(O),t,e)}for(g=l(O),w=l(t),(A=a(e))||(e=l(e)),S=w.length,E=_(1,S),M=T(g,w,0);-1!==M;)k=A?l(e(w,M,g)):d(w,g,M,[],void 0,e),C+=m(g,R,M)+k,R=M+S,M=T(g,w,M+E);return R1||"".split(/.?/).length?function(t,n){var o=g(l(this)),s=void 0===n?T:n>>>0;if(0===s)return[];if(void 0===t)return[o];if(!u(t))return r(e,o,t,s);for(var a,c,h,f=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,y=new RegExp(t.source,d+"g");(a=r(b,y,o))&&!((c=y.lastIndex)>p&&(E(f,k(o,p,a.index)),a.length>1&&a.index=s));)y.lastIndex===a.index&&y.lastIndex++;return p===o.length?!h&&S(y,"")||E(f,""):E(f,k(o,p)),f.length>s?v(f,0,s):f}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:r(e,this,t,n)}:e,[function(e,n){var i=l(this),s=c(e)?void 0:p(e,t);return s?r(s,e,i,n):r(o,g(i),e,n)},function(t,i){var r=a(this),s=g(t),c=n(o,r,s,i,o!==e);if(c.done)return c.value;var u=h(r,RegExp),l=r.unicode,p=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(_?"g":"y"),v=new u(_?"^(?:"+r.source+")":r,p),b=void 0===i?T:i>>>0;if(0===b)return[];if(0===s.length)return null===y(v,s)?[s]:[];for(var x=0,m=0,A=[];m1?arguments[1]:void 0,e.length)),i=c(t);return d?d(e,i,n):g(e,n,n+i.length)===i}})},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(16),s=n(62),a=n(69),c=r("".slice),u=Math.max,l=Math.min;i({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(t,e){var n,i,r=a(o(this)),h=r.length,f=s(t);return f===1/0&&(f=0),f<0&&(f=u(h+f,0)),(n=void 0===e?h:s(e))<=0||n===1/0||f>=(i=l(f+n,h))?"":c(r,f,i)}})},function(t,e,n){"use strict";var i=n(3),r=n(8),o=n(14),s=n(16),a=n(69),c=n(7),u=Array,l=o("".charAt),h=o("".charCodeAt),f=o([].join),d="".toWellFormed,g=d&&c((function(){return"1"!==r(d,1)}));i({target:"String",proto:!0,forced:g},{toWellFormed:function(){var t=a(s(this));if(g)return r(d,t);for(var e=t.length,n=u(e),i=0;i=56320||i+1>=e||56320!=(64512&h(t,i+1))?n[i]="�":(n[i]=l(t,i),n[++i]=l(t,i))}return f(n,"")}})},function(t,e,n){"use strict";var i=n(3),r=n(273).trim;i({target:"String",proto:!0,forced:n(411)("trim")},{trim:function(){return r(this)}})},function(t,e,n){"use strict";var i=n(50).PROPER,r=n(7),o=n(274);t.exports=function(t){return r((function(){return!!o[t]()||"​…᠎"!=="​…᠎"[t]()||i&&o[t].name!==t}))}},function(t,e,n){"use strict";n(413);var i=n(3),r=n(414);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==r},{trimEnd:r})},function(t,e,n){"use strict";var i=n(3),r=n(414);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==r},{trimRight:r})},function(t,e,n){"use strict";var i=n(273).end,r=n(411);t.exports=r("trimEnd")?function(){return i(this)}:"".trimEnd},function(t,e,n){"use strict";n(416);var i=n(3),r=n(417);i({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==r},{trimStart:r})},function(t,e,n){"use strict";var i=n(3),r=n(417);i({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==r},{trimLeft:r})},function(t,e,n){"use strict";var i=n(273).start,r=n(411);t.exports=r("trimStart")?function(){return i(this)}:"".trimStart},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("anchor")},{anchor:function(t){return r(this,"a","name",t)}})},function(t,e,n){"use strict";var i=n(14),r=n(16),o=n(69),s=/"/g,a=i("".replace);t.exports=function(t,e,n,i){var c=o(r(t)),u="<"+e;return""!==n&&(u+=" "+n+'="'+a(o(i),s,""")+'"'),u+">"+c+""}},function(t,e,n){"use strict";var i=n(7);t.exports=function(t){return i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("big")},{big:function(){return r(this,"big","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("blink")},{blink:function(){return r(this,"blink","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("bold")},{bold:function(){return r(this,"b","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fontcolor")},{fontcolor:function(t){return r(this,"font","color",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fontsize")},{fontsize:function(t){return r(this,"font","size",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("italics")},{italics:function(){return r(this,"i","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("link")},{link:function(t){return r(this,"a","href",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("small")},{small:function(){return r(this,"small","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("strike")},{strike:function(){return r(this,"strike","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("sub")},{sub:function(){return r(this,"sub","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("sup")},{sup:function(){return r(this,"sup","","")}})},function(t,e,n){"use strict";n(434)("Float32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(8),s=n(6),a=n(435),c=n(216),u=n(208),l=n(211),h=n(11),f=n(44),d=n(279),g=n(65),p=n(212),v=n(436),y=n(438),b=n(18),x=n(39),m=n(70),_=n(20),T=n(23),w=n(72),A=n(25),S=n(116),E=n(58).f,k=n(439),O=n(85).forEach,M=n(194),R=n(79),C=n(45),I=n(5),P=n(52),L=n(120),D=P.get,N=P.set,z=P.enforce,F=C.f,j=I.f,B=r.RangeError,X=u.ArrayBuffer,$=X.prototype,U=u.DataView,Y=c.NATIVE_ARRAY_BUFFER_VIEWS,V=c.TYPED_ARRAY_TAG,G=c.TypedArray,H=c.TypedArrayPrototype,W=c.aTypedArrayConstructor,q=c.isTypedArray,Z="BYTES_PER_ELEMENT",K="Wrong length",J=function(t,e){W(t);for(var n=0,i=e.length,r=new t(i);i>n;)r[n]=e[n++];return r},Q=function(t,e){R(t,e,{configurable:!0,get:function(){return D(this)[e]}})},tt=function(t){var e;return A($,t)||"ArrayBuffer"===(e=m(t))||"SharedArrayBuffer"===e},et=function(t,e){return q(t)&&!T(e)&&e in t&&d(+e)&&e>=0},nt=function(t,e){return e=b(e),et(t,e)?h(2,t[e]):j(t,e)},it=function(t,e,n){return e=b(e),!(et(t,e)&&_(n)&&x(n,"value"))||x(n,"get")||x(n,"set")||n.configurable||x(n,"writable")&&!n.writable||x(n,"enumerable")&&!n.enumerable?F(t,e,n):(t[e]=n.value,t)};s?(Y||(I.f=nt,C.f=it,Q(H,"buffer"),Q(H,"byteOffset"),Q(H,"byteLength"),Q(H,"length")),i({target:"Object",stat:!0,forced:!Y},{getOwnPropertyDescriptor:nt,defineProperty:it}),t.exports=function(t,e,n){var s=t.match(/\d+/)[0]/8,c=t+(n?"Clamped":"")+"Array",u="get"+t,h="set"+t,d=r[c],b=d,x=b&&b.prototype,m={},T=function(t,e){F(t,e,{get:function(){return function(t,e){var n=D(t);return n.view[u](e*s+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,i){var r=D(t);r.view[h](e*s+r.byteOffset,n?y(i):i,!0)}(this,e,t)},enumerable:!0})};Y?a&&(b=e((function(t,e,n,i){return l(t,x),L(_(e)?tt(e)?void 0!==i?new d(e,v(n,s),i):void 0!==n?new d(e,v(n,s)):new d(e):q(e)?J(b,e):o(k,b,e):new d(p(e)),t,b)})),S&&S(b,G),O(E(d),(function(t){t in b||f(b,t,d[t])})),b.prototype=x):(b=e((function(t,e,n,i){l(t,x);var r,a,c,u=0,h=0;if(_(e)){if(!tt(e))return q(e)?J(b,e):o(k,b,e);r=e,h=v(n,s);var f=e.byteLength;if(void 0===i){if(f%s)throw B(K);if((a=f-h)<0)throw B(K)}else if((a=g(i)*s)+h>f)throw B(K);c=a/s}else c=p(e),r=new X(a=c*s);for(N(t,{buffer:r,byteOffset:h,byteLength:a,length:c,view:new U(r)});u255?255:255&n}},function(t,e,n){"use strict";var i=n(86),r=n(8),o=n(219),s=n(40),a=n(64),c=n(135),u=n(136),l=n(133),h=n(440),f=n(216).aTypedArrayConstructor,d=n(441);t.exports=function(t){var e,n,g,p,v,y,b,x,m=o(this),_=s(t),T=arguments.length,w=T>1?arguments[1]:void 0,A=void 0!==w,S=u(_);if(S&&!l(S))for(x=(b=c(_,S)).next,_=[];!(y=r(x,b)).done;)_.push(y.value);for(A&&T>2&&(w=i(w,arguments[2])),n=a(_),g=new(f(m))(n),p=h(g),e=0;n>e;e++)v=A?w(_[e],e):_[e],g[e]=p?d(v):+v;return g}},function(t,e,n){"use strict";var i=n(70);t.exports=function(t){var e=i(t);return"BigInt64Array"===e||"BigUint64Array"===e}},function(t,e,n){"use strict";var i=n(19),r=TypeError;t.exports=function(t){var e=i(t,"number");if("number"==typeof e)throw r("Can't convert number to bigint");return BigInt(e)}},function(t,e,n){"use strict";n(434)("Float64",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int16",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}),!0)},function(t,e,n){"use strict";n(434)("Uint16",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";var i=n(216),r=n(64),o=n(62),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("at",(function(t){var e=s(this),n=r(e),i=o(t),a=i>=0?i:n+i;return a<0||a>=n?void 0:e[a]}))},function(t,e,n){"use strict";var i=n(14),r=n(216),o=i(n(145)),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(t,e){return o(s(this),t,e,arguments.length>2?arguments[2]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(85).every,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("every",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(150),o=n(441),s=n(70),a=n(8),c=n(14),u=n(7),l=i.aTypedArray,h=i.exportTypedArrayMethod,f=c("".slice);h("fill",(function(t){var e=arguments.length;l(this);var n="Big"===f(s(this),0,3)?o(t):+t;return a(r,this,n,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),u((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},function(t,e,n){"use strict";var i=n(216),r=n(85).filter,o=n(455),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("filter",(function(t){var e=r(s(this),t,arguments.length>1?arguments[1]:void 0);return o(this,e)}))},function(t,e,n){"use strict";var i=n(199),r=n(456);t.exports=function(t,e){return i(r(t),e)}},function(t,e,n){"use strict";var i=n(216),r=n(218),o=i.aTypedArrayConstructor,s=i.getTypedArrayConstructor;t.exports=function(t){return o(r(t,s(t)))}},function(t,e,n){"use strict";var i=n(216),r=n(85).find,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("find",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(85).findIndex,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("findIndex",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(155).findLast,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLast",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(155).findLastIndex,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLastIndex",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(85).forEach,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("forEach",(function(t){r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(435);(0,n(216).exportTypedArrayStaticMethod)("from",n(439),i)},function(t,e,n){"use strict";var i=n(216),r=n(60).includes,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("includes",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(60).indexOf,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("indexOf",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(4),r=n(7),o=n(14),s=n(216),a=n(169),c=n(34)("iterator"),u=i.Uint8Array,l=o(a.values),h=o(a.keys),f=o(a.entries),d=s.aTypedArray,g=s.exportTypedArrayMethod,p=u&&u.prototype,v=!r((function(){p[c].call([1])})),y=!!p&&p.values&&p[c]===p.values&&"values"===p.values.name,b=function(){return l(d(this))};g("entries",(function(){return f(d(this))}),v),g("keys",(function(){return h(d(this))}),v),g("values",b,v||!y,{name:"values"}),g(c,b,v||!y,{name:"values"})},function(t,e,n){"use strict";var i=n(216),r=n(14),o=i.aTypedArray,s=i.exportTypedArrayMethod,a=r([].join);s("join",(function(t){return a(o(this),t)}))},function(t,e,n){"use strict";var i=n(216),r=n(96),o=n(176),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return r(o,s(this),e>1?[t,arguments[1]]:[t])}))},function(t,e,n){"use strict";var i=n(216),r=n(85).map,o=n(456),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("map",(function(t){return r(s(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(o(t))(e)}))}))},function(t,e,n){"use strict";var i=n(216),r=n(435),o=i.aTypedArrayConstructor;(0,i.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,n=new(o(this))(e);e>t;)n[t]=arguments[t++];return n}),r)},function(t,e,n){"use strict";var i=n(216),r=n(182).left,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return r(o(this),t,e,e>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=n(182).right,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return r(o(this),t,e,e>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(216),r=i.aTypedArray,o=i.exportTypedArrayMethod,s=Math.floor;o("reverse",(function(){for(var t,e=this,n=r(e).length,i=s(n/2),o=0;o1?arguments[1]:void 0,1),n=c(t);if(v)return r(d,this,n,e);var i=this.length,o=s(n),u=0;if(o+e>i)throw l("Wrong length");for(;uo;)u[o]=n[o++];return u}),o((function(){new Int8Array(1).slice()})))},function(t,e,n){"use strict";var i=n(216),r=n(85).some,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("some",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(4),r=n(87),o=n(7),s=n(31),a=n(189),c=n(216),u=n(190),l=n(191),h=n(28),f=n(192),d=c.aTypedArray,g=c.exportTypedArrayMethod,p=i.Uint16Array,v=p&&r(p.prototype.sort),y=!(!v||o((function(){v(new p(2),null)}))&&o((function(){v(new p(2),{})}))),b=!!v&&!o((function(){if(h)return h<74;if(u)return u<67;if(l)return!0;if(f)return f<602;var t,e,n=new p(516),i=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,i[t]=t-2*e+3;for(v(n,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==i[t])return!0}));g("sort",(function(t){return void 0!==t&&s(t),b?v(this,t):a(d(this),function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!=n?-1:e!=e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}}(t))}),!b||y)},function(t,e,n){"use strict";var i=n(216),r=n(65),o=n(61),s=n(456),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("subarray",(function(t,e){var n=a(this),i=n.length,c=o(t,i);return new(s(n))(n.buffer,n.byteOffset+c*n.BYTES_PER_ELEMENT,r((void 0===e?i:o(e,i))-c))}))},function(t,e,n){"use strict";var i=n(4),r=n(96),o=n(216),s=n(7),a=n(97),c=i.Int8Array,u=o.aTypedArray,l=o.exportTypedArrayMethod,h=[].toLocaleString,f=!!c&&s((function(){h.call(new c(1))}));l("toLocaleString",(function(){return r(h,f?a(u(this)):u(this),a(arguments))}),s((function(){return[1,2].toLocaleString()!==new c([1,2]).toLocaleString()}))||!s((function(){c.prototype.toLocaleString.call([1,2])})))},function(t,e,n){"use strict";var i=n(197),r=n(216),o=r.aTypedArray,s=r.exportTypedArrayMethod,a=r.getTypedArrayConstructor;s("toReversed",(function(){return i(o(this),a(this))}))},function(t,e,n){"use strict";var i=n(216),r=n(14),o=n(31),s=n(199),a=i.aTypedArray,c=i.getTypedArrayConstructor,u=i.exportTypedArrayMethod,l=r(i.TypedArrayPrototype.sort);u("toSorted",(function(t){void 0!==t&&o(t);var e=a(this),n=s(c(e),e);return l(n,t)}))},function(t,e,n){"use strict";var i=n(216).exportTypedArrayMethod,r=n(7),o=n(4),s=n(14),a=o.Uint8Array,c=a&&a.prototype||{},u=[].toString,l=s([].join);r((function(){u.call({})}))&&(u=function(){return l(this)});var h=c.toString!==u;i("toString",u,h)},function(t,e,n){"use strict";var i=n(206),r=n(216),o=n(440),s=n(62),a=n(441),c=r.aTypedArray,u=r.getTypedArrayConstructor,l=r.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();l("with",{with:function(t,e){var n=c(this),r=s(t),l=o(n)?a(e):+e;return i(n,u(n),r,l)}}.with,!h)},function(t,e,n){"use strict";var i=n(3),r=n(14),o=n(69),s=String.fromCharCode,a=r("".charAt),c=r(/./.exec),u=r("".slice),l=/^[\da-f]{2}$/i,h=/^[\da-f]{4}$/i;i({global:!0},{unescape:function(t){for(var e,n,i=o(t),r="",f=i.length,d=0;d>(-2*_&6))));return s}})},function(t){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n={},i=0;i<66;i++)n[e.charAt(i)]=i;t.exports={itoc:e,ctoi:n}},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(24),s=n(14),a=n(8),c=n(7),u=n(69),l=n(328),h=n(490).itoc,f=o("btoa"),d=s("".charAt),g=s("".charCodeAt),p=!!f&&!c((function(){f()})),v=!!f&&c((function(){return"bnVsbA=="!==f(null)})),y=!!f&&1!==f.length;i({global:!0,bind:!0,enumerable:!0,forced:p||v||y},{btoa:function(t){if(l(arguments.length,1),p||v||y)return a(f,r,u(t));for(var e,n,i=u(t),s="",c=0,b=h;d(i,c)||(b="=",c%1);){if((n=g(i,c+=3/4))>255)throw new(o("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");s+=d(b,63&(e=e<<8|n)>>8-c%1*8)}return s}})},function(t,e,n){"use strict";var i=n(4),r=n(493),o=n(494),s=n(161),a=n(44),c=function(t){if(t&&t.forEach!==s)try{a(t,"forEach",s)}catch(e){t.forEach=s}};for(var u in r)r[u]&&c(i[u]&&i[u].prototype);c(o)},function(t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){"use strict";var i=n(43)("span").classList,r=i&&i.constructor&&i.constructor.prototype;t.exports=r===Object.prototype?void 0:r},function(t,e,n){"use strict";var i=n(4),r=n(493),o=n(494),s=n(169),a=n(44),c=n(34),u=c("iterator"),l=c("toStringTag"),h=s.values,f=function(t,e){if(t){if(t[u]!==h)try{a(t,u,h)}catch(e){t[u]=h}if(t[l]||a(t,l,e),r[e])for(var n in s)if(t[n]!==s[n])try{a(t,n,s[n])}catch(e){t[n]=s[n]}}};for(var d in r)f(i[d]&&i[d].prototype,d);f(o,"DOMTokenList")},function(t,e,n){"use strict";var i=n(3),r=n(497),o=n(24),s=n(7),a=n(72),c=n(11),u=n(45).f,l=n(48),h=n(79),f=n(39),d=n(211),g=n(47),p=n(127),v=n(121),y=n(498),b=n(124),x=n(52),m=n(6),_=n(36),T="DOMException",w="DATA_CLONE_ERR",A=o("Error"),S=o(T)||function(){try{(new(o("MessageChannel")||r("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name===w&&25===t.code)return t.constructor}}(),E=S&&S.prototype,k=A.prototype,O=x.set,M=x.getterFor(T),R="stack"in A(T),C=function(t){return f(y,t)&&y[t].m?y[t].c:0},I=function(){d(this,P);var t=arguments.length,e=v(t<1?void 0:arguments[0]),n=v(t<2?void 0:arguments[1],"Error"),i=C(n);if(O(this,{type:T,name:n,message:e,code:i}),m||(this.name=n,this.message=e,this.code=i),R){var r=A(e);r.name=T,u(this,"stack",c(1,b(r.stack,1)))}},P=I.prototype=a(k),L=function(t){return{enumerable:!0,configurable:!0,get:t}},D=function(t){return L((function(){return M(this)[t]}))};m&&(h(P,"code",D("code")),h(P,"message",D("message")),h(P,"name",D("name"))),u(P,"constructor",c(1,I));var N=s((function(){return!(new S instanceof A)})),z=N||s((function(){return k.toString!==p||"2: 1"!==String(new S(1,2))})),F=N||s((function(){return 25!==new S(1,"DataCloneError").code})),j=N||25!==S[w]||25!==E[w],B=_?z||F||j:N;i({global:!0,constructor:!0,forced:B},{DOMException:B?I:S});var X=o(T),$=X.prototype;for(var U in z&&(_||S===X)&&l($,"toString",p),F&&m&&S===X&&h($,"code",L((function(){return C(g(this).name)}))),y)if(f(y,U)){var Y=y[U],V=Y.s,G=c(6,Y.c);f(X,V)||u(X,V,G),f($,V)||u($,V,G)}},function(t,e,n){"use strict";var i=n(183);t.exports=function(t){try{if(i)return Function('return require("'+t+'")')()}catch(t){}}},function(t){"use strict";t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(24),s=n(11),a=n(45).f,c=n(39),u=n(211),l=n(120),h=n(121),f=n(498),d=n(124),g=n(6),p=n(36),v="DOMException",y=o("Error"),b=o(v),x=function(){u(this,m);var t=arguments.length,e=h(t<1?void 0:arguments[0]),n=h(t<2?void 0:arguments[1],"Error"),i=new b(e,n),r=y(e);return r.name=v,a(i,"stack",s(1,d(r.stack,1))),l(i,this,x),i},m=x.prototype=b.prototype,_="stack"in y(v),T="stack"in new b(1,2),w=b&&g&&Object.getOwnPropertyDescriptor(r,v),A=!(!w||w.writable&&w.configurable),S=_&&!A&&!T;i({global:!0,constructor:!0,forced:p||S},{DOMException:S?x:b});var E=o(v),k=E.prototype;if(k.constructor!==E)for(var O in p||a(k,"constructor",s(1,E)),f)if(c(f,O)){var M=f[O],R=M.s;c(E,R)||a(E,R,s(6,M.c))}},function(t,e,n){"use strict";var i=n(24),r="DOMException";n(84)(i(r),r)},function(t,e,n){"use strict";n(502),n(503)},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(327).clear;i({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==o},{clearImmediate:o})},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(327).set,s=n(504),a=r.setImmediate?s(o,!1):o;i({global:!0,bind:!0,enumerable:!0,forced:r.setImmediate!==a},{setImmediate:a})},function(t,e,n){"use strict";var i,r=n(4),o=n(96),s=n(21),a=n(505),c=n(29),u=n(97),l=n(328),h=r.Function,f=/MSIE .\./.test(c)||a&&((i=r.Bun.version.split(".")).length<3||"0"===i[0]&&(i[1]<3||"3"===i[1]&&"0"===i[2]));t.exports=function(t,e){var n=e?2:1;return f?function(i,r){var a=l(arguments.length,1)>n,c=s(i)?i:h(i),f=a?u(arguments,n):[],d=a?function(){o(c,this,f)}:c;return e?t(d,r):t(d)}:t}},function(t){"use strict";t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(330),s=n(31),a=n(328),c=n(183),u=r.process;i({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(t){a(arguments.length,1),s(t);var e=c&&u.domain;o(e?e.bind(t):t)}})},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(79),s=n(6),a=TypeError,c=Object.defineProperty,u=r.self!==r;try{if(s){var l=Object.getOwnPropertyDescriptor(r,"self");!u&&l&&l.get&&l.enumerable||o(r,"self",{get:function(){return r},set:function(t){if(this!==r)throw a("Illegal invocation");c(r,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else i({global:!0,simple:!0,forced:u},{self:r})}catch(t){}},function(t,e,n){"use strict";var i,r=n(36),o=n(3),s=n(4),a=n(24),c=n(14),u=n(7),l=n(41),h=n(21),f=n(91),d=n(17),g=n(20),p=n(23),v=n(132),y=n(47),b=n(70),x=n(39),m=n(78),_=n(44),T=n(64),w=n(328),A=n(368),S=n(509),E=n(510),k=n(125),O=n(511),M=s.Object,R=s.Array,C=s.Date,I=s.Error,P=s.EvalError,L=s.RangeError,D=s.ReferenceError,N=s.SyntaxError,z=s.TypeError,F=s.URIError,j=s.PerformanceMark,B=s.WebAssembly,X=B&&B.CompileError||I,$=B&&B.LinkError||I,U=B&&B.RuntimeError||I,Y=a("DOMException"),V=S.Map,G=S.has,H=S.get,W=S.set,q=E.Set,Z=E.add,K=a("Object","keys"),J=c([].push),Q=c((!0).valueOf),tt=c(1..valueOf),et=c("".valueOf),nt=c(C.prototype.getTime),it=l("structuredClone"),rt="DataCloneError",ot="Transferring",st=function(t){return!u((function(){var e=new s.Set([7]),n=t(e),i=t(M(7));return n===e||!n.has(7)||"object"!=typeof i||7!==i}))&&t},at=function(t,e){return!u((function(){var n=new e,i=t({a:n,b:n});return!(i&&i.a===i.b&&i.a instanceof e&&i.a.stack===n.stack)}))},ct=s.structuredClone,ut=r||!at(ct,I)||!at(ct,Y)||(i=ct,!!u((function(){var t=i(new s.AggregateError([1],it,{cause:3}));return"AggregateError"!==t.name||1!==t.errors[0]||t.message!==it||3!==t.cause}))),lt=!ct&&st((function(t){return new j(it,{detail:t}).detail})),ht=st(ct)||lt,ft=function(t){throw new Y("Uncloneable type: "+t,rt)},dt=function(t,e){throw new Y((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",rt)},gt=function(t,e){return ht||dt(e),ht(t)},pt=function(t,e,n){if(G(e,t))return H(e,t);var i,r,o,a,c,u;if("SharedArrayBuffer"===(n||b(t)))i=ht?ht(t):t;else{var l=s.DataView;l||"function"==typeof t.slice||dt("ArrayBuffer");try{if("function"!=typeof t.slice||t.resizable){r=t.byteLength,o="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0,i=new ArrayBuffer(r,o),a=new l(t),c=new l(i);for(u=0;u1&&!d(arguments[1])?y(arguments[1]):void 0,r=i?i.transfer:void 0,o=!1;void 0!==r&&(n=function(t,e){if(!g(t))throw z("Transfer option cannot be converted to a sequence");var n=[];v(t,(function(t){J(n,y(t))}));for(var i,r,o,a,c,u=0,l=T(n),d=[];u92||c&&o>94||s&&o>97)return!1;var t=new ArrayBuffer(8),e=u(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength}))},function(t,e,n){"use strict";n(513),n(514)},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(504)(r.setInterval,!0);i({global:!0,bind:!0,forced:r.setInterval!==o},{setInterval:o})},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(504)(r.setTimeout,!0);i({global:!0,bind:!0,forced:r.setTimeout!==o},{setTimeout:o})},function(t,e,n){"use strict";n(516)},function(t,e,n){"use strict";n(391);var i,r=n(3),o=n(6),s=n(517),a=n(4),c=n(86),u=n(14),l=n(48),h=n(79),f=n(211),d=n(39),g=n(292),p=n(163),v=n(77),y=n(384).codeAt,b=n(518),x=n(69),m=n(84),_=n(328),T=n(519),w=n(52),A=w.set,S=w.getterFor("URL"),E=T.URLSearchParams,k=T.getState,O=a.URL,M=a.TypeError,R=a.parseInt,C=Math.floor,I=Math.pow,P=u("".charAt),L=u(/./.exec),D=u([].join),N=u(1..toString),z=u([].pop),F=u([].push),j=u("".replace),B=u([].shift),X=u("".split),$=u("".slice),U=u("".toLowerCase),Y=u([].unshift),V="Invalid scheme",G="Invalid host",H="Invalid port",W=/[a-z]/i,q=/[\d+-.a-z]/i,Z=/\d/,K=/^0x/i,J=/^[0-7]+$/,Q=/^\d+$/,tt=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nt=/[\0\t\n\r #/:<>?@[\\\]^|]/,it=/^[\u0000-\u0020]+/,rt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ot=/[\t\n\r]/g,st=function(t){var e,n,i,r;if("number"==typeof t){for(e=[],n=0;n<4;n++)Y(e,t%256),t=C(t/256);return D(e,".")}if("object"==typeof t){for(e="",i=function(t){for(var e=null,n=1,i=null,r=0,o=0;o<8;o++)0!==t[o]?(r>n&&(e=i,n=r),i=null,r=0):(null===i&&(i=o),++r);return r>n&&(e=i,n=r),e}(t),n=0;n<8;n++)r&&0===t[n]||(r&&(r=!1),i===n?(e+=n?":":"::",r=!0):(e+=N(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},at={},ct=g({},at,{" ":1,'"':1,"<":1,">":1,"`":1}),ut=g({},ct,{"#":1,"?":1,"{":1,"}":1}),lt=g({},ut,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ht=function(t,e){var n=y(t,0);return n>32&&n<127&&!d(e,t)?t:encodeURIComponent(t)},ft={ftp:21,file:null,http:80,https:443,ws:80,wss:443},dt=function(t,e){var n;return 2===t.length&&L(W,P(t,0))&&(":"===(n=P(t,1))||!e&&"|"===n)},gt=function(t){var e;return t.length>1&&dt($(t,0,2))&&(2===t.length||"/"===(e=P(t,2))||"\\"===e||"?"===e||"#"===e)},pt=function(t){return"."===t||"%2e"===U(t)},vt={},yt={},bt={},xt={},mt={},_t={},Tt={},wt={},At={},St={},Et={},kt={},Ot={},Mt={},Rt={},Ct={},It={},Pt={},Lt={},Dt={},Nt={},zt=function(t,e,n){var i,r,o,s=x(t);if(e){if(r=this.parse(s))throw M(r);this.searchParams=null}else{if(void 0!==n&&(i=new zt(n,!0)),r=this.parse(s,null,i))throw M(r);(o=k(new E)).bindURL(this),this.searchParams=o}};zt.prototype={type:"URL",parse:function(t,e,n){var r,o,s,a,c,u=this,l=e||vt,h=0,f="",g=!1,y=!1,b=!1;for(t=x(t),e||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,t=j(t,it,""),t=j(t,rt,"$1")),t=j(t,ot,""),r=p(t);h<=r.length;){switch(o=r[h],l){case vt:if(!o||!L(W,o)){if(e)return V;l=bt;continue}f+=U(o),l=yt;break;case yt:if(o&&(L(q,o)||"+"===o||"-"===o||"."===o))f+=U(o);else{if(":"!==o){if(e)return V;f="",l=bt,h=0;continue}if(e&&(u.isSpecial()!==d(ft,f)||"file"===f&&(u.includesCredentials()||null!==u.port)||"file"===u.scheme&&!u.host))return;if(u.scheme=f,e)return void(u.isSpecial()&&ft[u.scheme]===u.port&&(u.port=null));f="","file"===u.scheme?l=Mt:u.isSpecial()&&n&&n.scheme===u.scheme?l=xt:u.isSpecial()?l=wt:"/"===r[h+1]?(l=mt,h++):(u.cannotBeABaseURL=!0,F(u.path,""),l=Lt)}break;case bt:if(!n||n.cannotBeABaseURL&&"#"!==o)return V;if(n.cannotBeABaseURL&&"#"===o){u.scheme=n.scheme,u.path=v(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,l=Nt;break}l="file"===n.scheme?Mt:_t;continue;case xt:if("/"!==o||"/"!==r[h+1]){l=_t;continue}l=At,h++;break;case mt:if("/"===o){l=St;break}l=Pt;continue;case _t:if(u.scheme=n.scheme,o===i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=v(n.path),u.query=n.query;else if("/"===o||"\\"===o&&u.isSpecial())l=Tt;else if("?"===o)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=v(n.path),u.query="",l=Dt;else{if("#"!==o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=v(n.path),u.path.length--,l=Pt;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=v(n.path),u.query=n.query,u.fragment="",l=Nt}break;case Tt:if(!u.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,l=Pt;continue}l=St}else l=At;break;case wt:if(l=At,"/"!==o||"/"!==P(f,h+1))continue;h++;break;case At:if("/"!==o&&"\\"!==o){l=St;continue}break;case St:if("@"===o){g&&(f="%40"+f),g=!0,s=p(f);for(var m=0;m65535)return H;u.port=u.isSpecial()&&w===ft[u.scheme]?null:w,f=""}if(e)return;l=It;continue}return H}f+=o;break;case Mt:if(u.scheme="file","/"===o||"\\"===o)l=Rt;else{if(!n||"file"!==n.scheme){l=Pt;continue}switch(o){case i:u.host=n.host,u.path=v(n.path),u.query=n.query;break;case"?":u.host=n.host,u.path=v(n.path),u.query="",l=Dt;break;case"#":u.host=n.host,u.path=v(n.path),u.query=n.query,u.fragment="",l=Nt;break;default:gt(D(v(r,h),""))||(u.host=n.host,u.path=v(n.path),u.shortenPath()),l=Pt;continue}}break;case Rt:if("/"===o||"\\"===o){l=Ct;break}n&&"file"===n.scheme&&!gt(D(v(r,h),""))&&(dt(n.path[0],!0)?F(u.path,n.path[0]):u.host=n.host),l=Pt;continue;case Ct:if(o===i||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&dt(f))l=Pt;else if(""===f){if(u.host="",e)return;l=It}else{if(a=u.parseHost(f))return a;if("localhost"===u.host&&(u.host=""),e)return;f="",l=It}continue}f+=o;break;case It:if(u.isSpecial()){if(l=Pt,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==i&&(l=Pt,"/"!==o))continue}else u.fragment="",l=Nt;else u.query="",l=Dt;break;case Pt:if(o===i||"/"===o||"\\"===o&&u.isSpecial()||!e&&("?"===o||"#"===o)){if(".."===(c=U(c=f))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(u.shortenPath(),"/"===o||"\\"===o&&u.isSpecial()||F(u.path,"")):pt(f)?"/"===o||"\\"===o&&u.isSpecial()||F(u.path,""):("file"===u.scheme&&!u.path.length&&dt(f)&&(u.host&&(u.host=""),f=P(f,0)+":"),F(u.path,f)),f="","file"===u.scheme&&(o===i||"?"===o||"#"===o))for(;u.path.length>1&&""===u.path[0];)B(u.path);"?"===o?(u.query="",l=Dt):"#"===o&&(u.fragment="",l=Nt)}else f+=ht(o,ut);break;case Lt:"?"===o?(u.query="",l=Dt):"#"===o?(u.fragment="",l=Nt):o!==i&&(u.path[0]+=ht(o,at));break;case Dt:e||"#"!==o?o!==i&&("'"===o&&u.isSpecial()?u.query+="%27":u.query+="#"===o?"%23":ht(o,at)):(u.fragment="",l=Nt);break;case Nt:o!==i&&(u.fragment+=ht(o,ct))}h++}},parseHost:function(t){var e,n,i;if("["===P(t,0)){if("]"!==P(t,t.length-1))return G;if(e=function(t){var e,n,i,r,o,s,a,c=[0,0,0,0,0,0,0,0],u=0,l=null,h=0,f=function(){return P(t,h)};if(":"===f()){if(":"!==P(t,1))return;h+=2,l=++u}for(;f();){if(8===u)return;if(":"!==f()){for(e=n=0;n<4&&L(tt,f());)e=16*e+R(f(),16),h++,n++;if("."===f()){if(0===n)return;if(h-=n,u>6)return;for(i=0;f();){if(r=null,i>0){if(!("."===f()&&i<4))return;h++}if(!L(Z,f()))return;for(;L(Z,f());){if(o=R(f(),10),null===r)r=o;else{if(0===r)return;r=10*r+o}if(r>255)return;h++}c[u]=256*c[u]+r,2!=++i&&4!==i||u++}if(4!==i)return;break}if(":"===f()){if(h++,!f())return}else if(f())return;c[u++]=e}else{if(null!==l)return;h++,l=++u}}if(null!==l)for(s=u-l,u=7;0!==u&&s>0;)a=c[u],c[u--]=c[l+s-1],c[l+--s]=a;else if(8!==u)return;return c}($(t,1,-1)),!e)return G;this.host=e}else if(this.isSpecial()){if(t=b(t),L(et,t))return G;if(e=function(t){var e,n,i,r,o,s,a,c=X(t,".");if(c.length&&""===c[c.length-1]&&c.length--,(e=c.length)>4)return t;for(n=[],i=0;i1&&"0"===P(r,0)&&(o=L(K,r)?16:8,r=$(r,8===o?1:2)),""===r)s=0;else{if(!L(10===o?Q:8===o?J:tt,r))return t;s=R(r,o)}F(n,s)}for(i=0;i=I(256,5-e))return null}else if(s>255)return null;for(a=z(n),i=0;i1?arguments[1]:void 0,i=A(e,new zt(t,!1,n));o||(e.href=i.serialize(),e.origin=i.getOrigin(),e.protocol=i.getProtocol(),e.username=i.getUsername(),e.password=i.getPassword(),e.host=i.getHost(),e.hostname=i.getHostname(),e.port=i.getPort(),e.pathname=i.getPathname(),e.search=i.getSearch(),e.searchParams=i.getSearchParams(),e.hash=i.getHash())},jt=Ft.prototype,Bt=function(t,e){return{get:function(){return S(this)[t]()},set:e&&function(t){return S(this)[e](t)},configurable:!0,enumerable:!0}};if(o&&(h(jt,"href",Bt("serialize","setHref")),h(jt,"origin",Bt("getOrigin")),h(jt,"protocol",Bt("getProtocol","setProtocol")),h(jt,"username",Bt("getUsername","setUsername")),h(jt,"password",Bt("getPassword","setPassword")),h(jt,"host",Bt("getHost","setHost")),h(jt,"hostname",Bt("getHostname","setHostname")),h(jt,"port",Bt("getPort","setPort")),h(jt,"pathname",Bt("getPathname","setPathname")),h(jt,"search",Bt("getSearch","setSearch")),h(jt,"searchParams",Bt("getSearchParams")),h(jt,"hash",Bt("getHash","setHash"))),l(jt,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),l(jt,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),O){var Xt=O.createObjectURL,$t=O.revokeObjectURL;Xt&&l(Ft,"createObjectURL",c(Xt,O)),$t&&l(Ft,"revokeObjectURL",c($t,O))}m(Ft,"URL"),r({global:!0,constructor:!0,forced:!s,sham:!o},{URL:Ft})},function(t,e,n){"use strict";var i=n(7),r=n(34),o=n(6),s=n(36),a=r("iterator");t.exports=!i((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),i="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),i+=n+t})),n.delete("a",2),n.delete("b",void 0),s&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!e.size&&(s||!o)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))},function(t,e,n){"use strict";var i=n(14),r=2147483647,o=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",c=RangeError,u=i(s.exec),l=Math.floor,h=String.fromCharCode,f=i("".charCodeAt),d=i([].join),g=i([].push),p=i("".replace),v=i("".split),y=i("".toLowerCase),b=function(t){return t+22+75*(t<26)},x=function(t,e,n){var i=0;for(t=n?l(t/700):t>>1,t+=l(t/e);t>455;)t=l(t/35),i+=36;return l(i+36*t/(t+38))},m=function(t){var e=[];t=function(t){for(var e=[],n=0,i=t.length;n=55296&&r<=56319&&n=s&&il((r-u)/_))throw c(a);for(u+=(m-s)*_,s=m,n=0;nr)throw c(a);if(i===s){for(var T=u,w=36;;){var A=w<=p?1:w>=p+26?26:w-p;if(T0?arguments[0]:void 0));a||(this.size=t.entries.length)},dt=ft.prototype;if(h(dt,{append:function(t,e){var n=L(this);k(arguments.length,2),q(n.entries,{key:T(t),value:T(e)}),a||this.length++,n.updateURL()},delete:function(t){for(var e=L(this),n=k(arguments.length,1),i=e.entries,r=T(t),o=n<2?void 0:arguments[1],s=void 0===o?o:T(o),c=0;ce.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=L(this).entries,i=b(t,arguments.length>1?arguments[1]:void 0),r=0;r1?vt(arguments[1]):{})}}),v(j)){var yt=function(t){return p(this,X),new j(t,arguments.length>1?vt(arguments[1]):{})};X.constructor=yt,yt.prototype=X,i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yt})}}t.exports={URLSearchParams:ft,getState:L}},function(t,e,n){"use strict";var i=n(3),r=n(24),o=n(7),s=n(328),a=n(69),c=n(517),u=r("URL");i({target:"URL",stat:!0,forced:!(c&&o((function(){u.canParse()})))},{canParse:function(t){var e=s(arguments.length,1),n=a(t),i=e<2||void 0===arguments[1]?void 0:a(arguments[1]);try{return!!new u(n,i)}catch(t){return!1}}})},function(t,e,n){"use strict";var i=n(3),r=n(8);i({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}})},function(t,e,n){"use strict";n(519)},function(t,e,n){"use strict";var i=n(48),r=n(14),o=n(69),s=n(328),a=URLSearchParams,c=a.prototype,u=r(c.append),l=r(c.delete),h=r(c.forEach),f=r([].push),d=new a("a=1&a=2&b=3");d.delete("a",1),d.delete("b",void 0),d+""!="a=2"&&i(c,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return l(this,t);var i=[];h(this,(function(t,e){f(i,{key:e,value:t})})),s(e,1);for(var r,a=o(t),c=o(n),d=0,g=0,p=!1,v=i.length;d0))return a;let c;do{a.push(c=new Date(+n)),e(n,s),t(n)}while(c=e)for(;t(e),!n(e);)e.setTime(e-1)}.bind(this),function(t,r){if(o(this,i),t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}.bind(this))}.bind(this),n&&(u.count=function(e,i){return o(this,r),s.setTime(+e),a.setTime(+i),t(s),t(a),Math.floor(n(s,a))}.bind(this),u.every=function(t){var e=this;return o(this,r),t=Math.floor(t),isFinite(t)&&t>0?t>1?u.filter(i?function(n){return o(this,e),i(n)%t==0}.bind(this):function(n){return o(this,e),u.count(0,n)%t==0}.bind(this)):u:null}.bind(this)),u}const u=1e3,l=6e4,h=36e5,f=864e5,d=6048e5,g=2592e6,p=31536e6;function v(t){var e=this;return c(function(n){o(this,e),n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}.bind(this),function(t,n){o(this,e),t.setDate(t.getDate()+7*n)}.bind(this),function(t,n){return o(this,e),(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*l)/d}.bind(this))}const y=v(0),b=v(1),x=v(2),m=v(3),_=v(4),T=v(5),w=v(6);y.range,b.range,x.range,m.range,_.range,T.range,w.range;function A(t){var e=this;return c(function(n){o(this,e),n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}.bind(this),function(t,n){o(this,e),t.setUTCDate(t.getUTCDate()+7*n)}.bind(this),function(t,n){return o(this,e),(n-t)/d}.bind(this))}const S=A(0),E=A(1),k=A(2),O=A(3),M=A(4),R=A(5),C=A(6);S.range,E.range,k.range,O.range,M.range,R.range,C.range;var I=void 0;const P=c(function(t){return o(this,I),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){return o(this,I),t.setDate(t.getDate()+e)}.bind(void 0),function(t,e){return o(this,I),(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*l)/f}.bind(void 0),function(t){return o(this,I),t.getDate()-1}.bind(void 0)),L=(P.range,c(function(t){o(this,I),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,I),t.setUTCDate(t.getUTCDate()+e)}.bind(void 0),function(t,e){return o(this,I),(e-t)/f}.bind(void 0),function(t){return o(this,I),t.getUTCDate()-1}.bind(void 0))),D=(L.range,c(function(t){o(this,I),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,I),t.setUTCDate(t.getUTCDate()+e)}.bind(void 0),function(t,e){return o(this,I),(e-t)/f}.bind(void 0),function(t){return o(this,I),Math.floor(t/f)}.bind(void 0)));D.range;var N=void 0;const z=c(function(t){o(this,N),t.setMonth(0,1),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,N),t.setFullYear(t.getFullYear()+e)}.bind(void 0),function(t,e){return o(this,N),e.getFullYear()-t.getFullYear()}.bind(void 0),function(t){return o(this,N),t.getFullYear()}.bind(void 0));z.every=function(t){var e=this;return o(this,N),isFinite(t=Math.floor(t))&&t>0?c(function(n){o(this,e),n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}.bind(this),function(n,i){o(this,e),n.setFullYear(n.getFullYear()+i*t)}.bind(this)):null}.bind(void 0);z.range;const F=c(function(t){o(this,N),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,N),t.setUTCFullYear(t.getUTCFullYear()+e)}.bind(void 0),function(t,e){return o(this,N),e.getUTCFullYear()-t.getUTCFullYear()}.bind(void 0),function(t){return o(this,N),t.getUTCFullYear()}.bind(void 0));F.every=function(t){var e=this;return o(this,N),isFinite(t=Math.floor(t))&&t>0?c(function(n){o(this,e),n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}.bind(this),function(n,i){o(this,e),n.setUTCFullYear(n.getUTCFullYear()+i*t)}.bind(this)):null}.bind(void 0);F.range;function j(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function B(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function X(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var $,U,Y,V,G,H={"-":"",_:" ",0:"0"},W=/^\s*\d+/,q=/^%/,Z=/[\\^$*+?|[\]().{}]/g;function K(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o68?1900:2e3),n+i[0].length):-1}function ct(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ut(t,e,n){var i=W.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function lt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function ht(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function ft(t,e,n){var i=W.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function dt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function gt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function pt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function vt(t,e,n){var i=W.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function yt(t,e,n){var i=W.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function bt(t,e,n){var i=q.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function xt(t,e,n){var i=W.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function mt(t,e,n){var i=W.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function _t(t,e){return K(t.getDate(),e,2)}function Tt(t,e){return K(t.getHours(),e,2)}function wt(t,e){return K(t.getHours()%12||12,e,2)}function At(t,e){return K(1+P.count(z(t),t),e,3)}function St(t,e){return K(t.getMilliseconds(),e,3)}function Et(t,e){return St(t,e)+"000"}function kt(t,e){return K(t.getMonth()+1,e,2)}function Ot(t,e){return K(t.getMinutes(),e,2)}function Mt(t,e){return K(t.getSeconds(),e,2)}function Rt(t){var e=t.getDay();return 0===e?7:e}function Ct(t,e){return K(y.count(z(t)-1,t),e,2)}function It(t){var e=t.getDay();return e>=4||0===e?_(t):_.ceil(t)}function Pt(t,e){return t=It(t),K(_.count(z(t),t)+(4===z(t).getDay()),e,2)}function Lt(t){return t.getDay()}function Dt(t,e){return K(b.count(z(t)-1,t),e,2)}function Nt(t,e){return K(t.getFullYear()%100,e,2)}function zt(t,e){return K((t=It(t)).getFullYear()%100,e,2)}function Ft(t,e){return K(t.getFullYear()%1e4,e,4)}function jt(t,e){var n=t.getDay();return K((t=n>=4||0===n?_(t):_.ceil(t)).getFullYear()%1e4,e,4)}function Bt(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+K(e/60|0,"0",2)+K(e%60,"0",2)}function Xt(t,e){return K(t.getUTCDate(),e,2)}function $t(t,e){return K(t.getUTCHours(),e,2)}function Ut(t,e){return K(t.getUTCHours()%12||12,e,2)}function Yt(t,e){return K(1+L.count(F(t),t),e,3)}function Vt(t,e){return K(t.getUTCMilliseconds(),e,3)}function Gt(t,e){return Vt(t,e)+"000"}function Ht(t,e){return K(t.getUTCMonth()+1,e,2)}function Wt(t,e){return K(t.getUTCMinutes(),e,2)}function qt(t,e){return K(t.getUTCSeconds(),e,2)}function Zt(t){var e=t.getUTCDay();return 0===e?7:e}function Kt(t,e){return K(S.count(F(t)-1,t),e,2)}function Jt(t){var e=t.getUTCDay();return e>=4||0===e?M(t):M.ceil(t)}function Qt(t,e){return t=Jt(t),K(M.count(F(t),t)+(4===F(t).getUTCDay()),e,2)}function te(t){return t.getUTCDay()}function ee(t,e){return K(E.count(F(t)-1,t),e,2)}function ne(t,e){return K(t.getUTCFullYear()%100,e,2)}function ie(t,e){return K((t=Jt(t)).getUTCFullYear()%100,e,2)}function re(t,e){return K(t.getUTCFullYear()%1e4,e,4)}function oe(t,e){var n=t.getUTCDay();return K((t=n>=4||0===n?M(t):M.ceil(t)).getUTCFullYear()%1e4,e,4)}function se(){return"+0000"}function ae(){return"%"}function ce(t){return+t}function ue(t){return Math.floor(+t/1e3)}function le(){}function he(t){return null==t?le:function(){return this.querySelector(t)}}function fe(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function de(){return[]}function ge(t){return null==t?de:function(){return this.querySelectorAll(t)}}function pe(t){return function(){return this.matches(t)}}function ve(t){return function(e){return e.matches(t)}}$=function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,c=t.shortMonths,u=Q(r),l=tt(r),h=Q(o),f=tt(o),d=Q(s),g=tt(s),p=Q(a),v=tt(a),y=Q(c),x=tt(c),m={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:_t,e:_t,f:Et,g:zt,G:jt,H:Tt,I:wt,j:At,L:St,m:kt,M:Ot,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ce,s:ue,S:Mt,u:Rt,U:Ct,V:Pt,w:Lt,W:Dt,x:null,X:null,y:Nt,Y:Ft,Z:Bt,"%":ae},_={a:function(t){return s[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Xt,e:Xt,f:Gt,g:ie,G:oe,H:$t,I:Ut,j:Yt,L:Vt,m:Ht,M:Wt,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ce,s:ue,S:qt,u:Zt,U:Kt,V:Qt,w:te,W:ee,x:null,X:null,y:ne,Y:re,Z:se,"%":ae},T={a:function(t,e,n){var i=d.exec(e.slice(n));return i?(t.w=g.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=f.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=y.exec(e.slice(n));return i?(t.m=x.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=p.exec(e.slice(n));return i?(t.m=v.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return S(t,e,n,i)},d:ht,e:ht,f:yt,g:at,G:st,H:dt,I:dt,j:ft,L:vt,m:lt,M:gt,p:function(t,e,n){var i=u.exec(e.slice(n));return i?(t.p=l.get(i[0].toLowerCase()),n+i[0].length):-1},q:ut,Q:xt,s:mt,S:pt,u:nt,U:it,V:rt,w:et,W:ot,x:function(t,e,i){return S(t,n,e,i)},X:function(t,e,n){return S(t,i,e,n)},y:at,Y:st,Z:ct,"%":bt};function w(t,e){return function(n){var i,r,o,s=[],a=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++a53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=B(X(o.y,0,1))).getUTCDay(),i=r>4||0===r?E.ceil(i):E(i),i=L.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(r=(i=j(X(o.y,0,1))).getDay(),i=r>4||0===r?b.ceil(i):b(i),i=P.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?B(X(o.y,0,1)).getUTCDay():j(X(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,B(o)):j(o)}}function S(t,e,n,i){for(var r,o,s=0,a=e.length,c=n.length;s=c)return-1;if(37===(r=e.charCodeAt(s++))){if(r=e.charAt(s++),!(o=T[r in H?e.charAt(s++):r])||(i=o(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return m.x=w(n,m),m.X=w(i,m),m.c=w(e,m),_.x=w(n,_),_.X=w(i,_),_.c=w(e,_),{format:function(t){var e=w(t+="",m);return e.toString=function(){return t},e},parse:function(t){var e=A(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=A(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),U=$.format,Y=$.parse,V=$.utcFormat,G=$.utcParse;var ye=Array.prototype.find;function be(){return this.firstElementChild}var xe=Array.prototype.filter;function me(){return Array.from(this.children)}function _e(t){return Array(t.length)}function Te(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function we(t,e,n,i,r,o){for(var s,a=0,c=e.length,u=o.length;ae?1:t>=e?0:NaN}function Oe(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Me(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Me(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Me(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ce.hasOwnProperty(e)?{space:Ce[e],local:t}:t}function Pe(t){return function(){this.removeAttribute(t)}}function Le(t){return function(){this.removeAttributeNS(t.space,t.local)}}function De(t,e){return function(){this.setAttribute(t,e)}}function Ne(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ze(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Fe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function je(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Be(t){return function(){this.style.removeProperty(t)}}function Xe(t,e,n){return function(){this.style.setProperty(t,e,n)}}function $e(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Ue(t,e){return t.style.getPropertyValue(e)||je(t).getComputedStyle(t,null).getPropertyValue(e)}function Ye(t){return function(){delete this[t]}}function Ve(t,e){return function(){this[t]=e}}function Ge(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function He(t){return t.trim().split(/^|\s+/)}function We(t){return t.classList||new qe(t)}function qe(t){this._node=t,this._names=He(t.getAttribute("class")||"")}function Ze(t,e){for(var n=We(t),i=-1,r=e.length;++i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Tn,wn=n(527),An=wn.mark(Sn);function Sn(){var t,e,n,i,r,o,s;return wn.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:t=this._groups,e=0,n=t.length;case 1:if(!(e=m&&(m=x+1);!(b=v[m])&&++m=0;)(i=r[o])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ke);for(var n=this._groups,i=n.length,r=Array(i),o=0;o1?this.each((null==e?Be:"function"==typeof e?$e:Xe)(t,e,null==n?"":n)):Ue(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ye:"function"==typeof e?Ge:Ve)(t,e)):this.node()[t]},classed:function(t,e){var n=He(t+"");if(arguments.length<2){for(var i=We(this.node()),r=-1,o=n.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?bn:yn,i=0;i=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s0)for(var n,i,r=Array(n),o=0;o>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?_i(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?_i(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=li.exec(t))?new wi(e[1],e[2],e[3],1):(e=hi.exec(t))?new wi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=fi.exec(t))?_i(e[1],e[2],e[3],e[4]):(e=di.exec(t))?_i(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=gi.exec(t))?Mi(e[1],e[2]/100,e[3]/100,1):(e=pi.exec(t))?Mi(e[1],e[2]/100,e[3]/100,e[4]):vi.hasOwnProperty(t)?mi(vi[t]):"transparent"===t?new wi(NaN,NaN,NaN,0):null}function mi(t){return new wi(t>>16&255,t>>8&255,255&t,1)}function _i(t,e,n,i){return i<=0&&(t=e=n=NaN),new wi(t,e,n,i)}function Ti(t,e,n,i){return 1===arguments.length?((r=t)instanceof si||(r=xi(r)),r?new wi((r=r.rgb()).r,r.g,r.b,r.opacity):new wi):new wi(t,e,n,null==i?1:i);var r}function wi(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Ai(){return"#"+Oi(this.r)+Oi(this.g)+Oi(this.b)}function Si(){const t=Ei(this.opacity);return(1===t?"rgb(":"rgba(")+ki(this.r)+", "+ki(this.g)+", "+ki(this.b)+(1===t?")":", "+t+")")}function Ei(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ki(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Oi(t){return((t=ki(t))<16?"0":"")+t.toString(16)}function Mi(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ci(t,e,n,i)}function Ri(t){if(t instanceof Ci)return new Ci(t.h,t.s,t.l,t.opacity);if(t instanceof si||(t=xi(t)),!t)return new Ci;if(t instanceof Ci)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,c=(o+r)/2;return a?(s=e===o?(n-i)/a+6*(n0&&c<1?0:s,new Ci(s,a,c,t.opacity)}function Ci(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Ii(t){return(t=(t||0)%360)<0?t+360:t}function Pi(t){return Math.max(0,Math.min(1,t||0))}function Li(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Di(t,e,n,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*i+s*r)/6}ri(si,xi,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:yi,formatHex:yi,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ri(this).formatHsl()},formatRgb:bi,toString:bi}),ri(wi,Ti,oi(si,{brighter:function(t){return t=null==t?ci:Math.pow(ci,t),new wi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?ai:Math.pow(ai,t),new wi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},clamp:function(){return new wi(ki(this.r),ki(this.g),ki(this.b),Ei(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ai,formatHex:Ai,formatHex8:function(){return"#"+Oi(this.r)+Oi(this.g)+Oi(this.b)+Oi(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:Si,toString:Si})),ri(Ci,(function(t,e,n,i){return 1===arguments.length?Ri(t):new Ci(t,e,n,null==i?1:i)}),oi(si,{brighter:function(t){return t=null==t?ci:Math.pow(ci,t),new Ci(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?ai:Math.pow(ai,t),new Ci(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new wi(Li(t>=240?t-240:t+120,r,i),Li(t,r,i),Li(t<120?t+240:t-120,r,i),this.opacity)},clamp:function(){return new Ci(Ii(this.h),Pi(this.s),Pi(this.l),Ei(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){const t=Ei(this.opacity);return(1===t?"hsl(":"hsla(")+Ii(this.h)+", "+100*Pi(this.s)+"%, "+100*Pi(this.l)+"%"+(1===t?")":", "+t+")")}}));var Ni=function(t){var e=this;return o(this,undefined),function(){return o(this,e),t}.bind(this)}.bind(void 0);function zi(t,e){return function(n){return t+n*e}}function Fi(t){return 1==(t=+t)?ji:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):Ni(isNaN(e)?n:e)}}function ji(t,e){var n=e-t;return n?zi(t,n):Ni(isNaN(t)?e:t)}var Bi=function t(e){var n=Fi(e);function i(t,e){var i=n((t=Ti(t)).r,(e=Ti(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),s=ji(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function Xi(t){return function(e){var n,i,r=e.length,o=Array(r),s=Array(r),a=Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],o=t[i+1],s=i>0?t[i-1]:2*r-o,a=io&&(r=e.slice(o,r),a[s]?a[s]+=r:a[++s]=r),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:Gi(n,i)})),o=qi.lastIndex;return o=0&&e._call.call(void 0,t),e=e._next;--tr}()}finally{tr=0,function(){var t,e,n=Ji,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ji=e);Qi=t,pr(i)}(),or=0}}function gr(){var t=ar.now(),e=t-rr;e>ir&&(sr-=e,rr=t)}function pr(t){tr||(er&&(er=clearTimeout(er)),t-or>24?(t<1/0&&(er=setTimeout(dr,t-ar.now()-sr)),nr&&(nr=clearInterval(nr))):(nr||(rr=ar.now(),nr=setInterval(gr,ir)),tr=1,cr(dr)))}function vr(t,e,n){var i=this,r=new hr;return e=null==e?0:+e,r.restart(function(n){o(this,i),r.stop(),t(n+e)}.bind(this),e,n),r}hr.prototype=fr.prototype={constructor:hr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?ur():+n)+(null==e?0:+e),this._next||Qi===this||(Qi?Qi._next=this:Ji=this,Qi=this),this._call=t,this._time=n,pr()},stop:function(){this._call&&(this._call=null,this._time=1/0,pr())}};var yr=Kn("start","end","cancel","interrupt"),br=[],xr=0,mr=1,_r=2,Tr=3,wr=4,Ar=5,Sr=6;function Er(t,e,n,i,r,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function o(c){var u,l,h,f;if(n.state!==mr)return a();for(u in r)if((f=r[u]).name===n.name){if(f.state===Tr)return vr(o);f.state===wr?(f.state=Sr,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete r[u]):+uxr)throw new Error("too late; already scheduled");return n}function Or(t,e){var n=Mr(t,e);if(n.state>Tr)throw new Error("too late; already running");return n}function Mr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Rr(t,e){var n,i,r,o=t.__transition,s=!0;if(o){for(r in e=null==e?null:e+"",o)(n=o[r]).name===e?(i=n.state>_r&&n.state180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(r(n)+"rotate(",null,i)-2,x:Gi(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(o.rotate,s.rotate,a,c),function(t,e,n,o){t!==e?o.push({i:n.push(r(n)+"skewX(",null,i)-2,x:Gi(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(o.skewX,s.skewX,a,c),function(t,e,n,i,o,s){if(t!==n||e!==i){var a=o.push(r(o)+"scale(",null,",",null,")");s.push({i:a-4,x:Gi(t,n)},{i:a-2,x:Gi(e,i)})}else 1===n&&1===i||o.push(r(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,c),o=s=null,function(t){for(var e,n=-1,i=c.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?kr:Or;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(e,n),s.on=r}}(n,t,e))},attr:function(t,e){var n=Ie(t),i="transform"===n?zr:Xr;return this.attrTween(t,"function"==typeof e?(n.local?Hr:Gr)(n,i,Br(this,"attr."+t,e)):null==e?(n.local?Ur:$r)(n):(n.local?Vr:Yr)(n,i,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=Ie(t);return this.tween(n,(i.local?Wr:qr)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Nr:Xr;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var o=Ue(this,t),s=(this.style.removeProperty(t),Ue(this,t));return o===s?null:o===n&&s===i?r:r=e(n=o,i=s)}}(t,i)).on("end.style."+t,no(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,o;return function(){var s=Ue(this,t),a=n(this),c=a+"";return null==a&&(this.style.removeProperty(t),c=a=Ue(this,t)),s===c?null:s===i&&c===r?o:(r=c,o=e(i=s,a))}}(t,i,Br(this,"style."+t,e))).each(function(t,e){var n,i,r,o,s="style."+e;return function(){var a=Or(this,t),c=a.on,u=null==a.value[s]?o||(o=no(e)):void 0;c===n&&r===u||(i=(n=c).copy()).on("end."+s,r=u),a.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r;return function(){var o=Ue(this,t);return o===n+""?null:o===i?r:r=e(i=o,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,r;function o(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,o,n)),i}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Br(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=Mr(this.node(),n).tween,o=0,s=r.length;o=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function po(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n1&&X(n)}else a=k[0][0],u=k[0][1],d=k[1][0],p=k[1][1];c=a,f=u,g=d,v=p;var z=Rn(m).attr("pointer-events","none"),F=z.selectAll(".overlay").attr("cursor",ko[_]);if(n.touches)N.moved=B,N.ended=$;else{var j=Rn(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",$,!0);s&&j.on("keydown.brush",(function(t){switch(t.keyCode){case 16:L=w&&A;break;case 18:T===bo&&(w&&(d=g-I*w,a=c+I*w),A&&(p=v-P*A,u=f+P*A),T=xo,X(t));break;case 32:T!==bo&&T!==xo||(w<0?d=g-I:w>0&&(a=c-I),A<0?p=v-P:A>0&&(u=f-P),T=yo,F.attr("cursor",ko.selection),X(t));break;default:return}fo(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:L&&(b=x=L=!1,X(t));break;case 18:T===xo&&(w<0?d=g:w>0&&(a=c),A<0?p=v:A>0&&(u=f),T=bo,X(t));break;case 32:T===yo&&(t.altKey?(w&&(d=g-I*w,a=c+I*w),A&&(p=v-P*A,u=f+P*A),T=xo):(w<0?d=g:w>0&&(a=c),A<0?p=v:A>0&&(u=f),T=bo),F.attr("cursor",ko[_]),X(t));break;default:return}fo(t)}),!0),ni(n.view)}l.call(m),N.start(n,T.name)}function B(t){for(var e,n=go(t.changedTouches||[t]);!(e=n()).done;){const t=e.value;for(var i,r=go(D);!(i=r()).done;){const e=i.value;e.identifier===t.identifier&&(e.cur=Vn(t,m))}}if(L&&!b&&!x&&1===D.length){const t=D[0];mo(t.cur[0]-t[0])>mo(t.cur[1]-t[1])?x=!0:b=!0}for(var o,s=go(D);!(o=s()).done;){const t=o.value;t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1])}y=!0,fo(t),X(t)}function X(t){const e=D[0],n=e.point0;var i;switch(I=e[0]-n[0],P=e[1]-n[1],T){case yo:case vo:w&&(I=_o(O-a,To(R-d,I)),c=a+I,g=d+I),A&&(P=_o(M-u,To(C-p,P)),f=u+P,v=p+P);break;case bo:D[1]?(w&&(c=_o(O,To(R,D[0][0])),g=_o(O,To(R,D[1][0])),w=1),A&&(f=_o(M,To(C,D[0][1])),v=_o(M,To(C,D[1][1])),A=1)):(w<0?(I=_o(O-a,To(R-a,I)),c=a+I,g=d):w>0&&(I=_o(O-d,To(R-d,I)),c=a,g=d+I),A<0?(P=_o(M-u,To(C-u,P)),f=u+P,v=p):A>0&&(P=_o(M-p,To(C-p,P)),f=u,v=p+P));break;case xo:w&&(c=_o(O,To(R,a-I*w)),g=_o(O,To(R,d+I*w))),A&&(f=_o(M,To(C,u-P*A)),v=_o(M,To(C,p+P*A)))}g2?i-2:0),o=2;o/gi,">"):t}function as(t,e,n,i){var r=this;if(void 0===n&&(n=[-1,1]),void 0===i&&(i=!1),t&&Yo(e))if(-1===e.indexOf("\n"))t.text(e);else{const s=[t.text(),e].map(function(t){return o(this,r),t.replace(/[\s\n]/g,"")}.bind(this));if(s[0]!==s[1]){const s=e.split("\n"),a=i?s.length-1:1;t.html(""),s.forEach(function(e,i){o(this,r),t.append("tspan").attr("x",0).attr("dy",(0===i?n[0]*a:n[1])+"em").text(e)}.bind(this))}}}function cs(t){const e=t.getBBox(),n=e.x,i=e.y,r=e.width,o=e.height;return[{x:n,y:i+o},{x:n,y:i},{x:n+r,y:i},{x:n+r,y:i+o}]}function us(t,e){var n,i=this;return Vn(t&&(null==(n=t.touches||t.sourceEvent&&t.sourceEvent.touches)?void 0:n[0])||t,e).map(function(t){return o(this,i),isNaN(t)?0:t}.bind(this))}function ls(t){const e=t.event,n=t.$el,i=n.subchart.main||n.main;let r;return e&&"brush"===e.type?r=e.selection:i&&(r=i.select(".bb-brush").node())&&(r=zo(r)),r}function hs(t){return!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width")?t.rect=t.getBoundingClientRect():t.rect}function fs(t,e,n){void 0===t&&(t=!0),void 0===e&&(e=0),void 0===n&&(n=1e4);const i=In.crypto||In.msCrypto,r=i?e+i.getRandomValues(new Uint32Array(1))[0]%(n-e+1):Math.floor(Math.random()*(n-e)+e);return t?r+"":r}function ds(t,e,n,i,r){if(n>i)return-1;const o=Math.floor((n+i)/2);let s=t[o],a=s.x,c=s.w,u=void 0===c?0:c;return r&&(a=t[o].y,u=t[o].h),e>=a&&e<=a+u?o:e1?n-1:0),r=1;re?-1:t{=TITLE}",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_padding:0,legend_position:"bottom",legend_show:!0,legend_usePoint:!1},pa={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},va=void 0,ya={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){o(this,va)}.bind(void 0),tooltip_onhide:function(){o(this,va)}.bind(void 0),tooltip_onshown:function(){o(this,va)}.bind(void 0),tooltip_onhidden:function(){o(this,va)}.bind(void 0),tooltip_order:null};function ba(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function xa(t){for(var e,n=1;n9999?"+"+Xa(e,6):Xa(e,4))+"-"+Xa(t.getUTCMonth()+1,2)+"-"+Xa(t.getUTCDate(),2)+(o?"T"+Xa(n,2)+":"+Xa(i,2)+":"+Xa(r,2)+"."+Xa(o,3)+"Z":r?"T"+Xa(n,2)+":"+Xa(i,2)+":"+Xa(r,2)+"Z":i||n?"T"+Xa(n,2)+":"+Xa(i,2)+"Z":"")}function Ua(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function i(t,e){var i,r=[],o=t.length,s=0,a=0,c=o<=0,u=!1;function l(){if(c)return Fa;if(u)return u=!1,za;var e,i,r=s;if(34===t.charCodeAt(r)){for(;s++=o?c=!0:10===(i=t.charCodeAt(s++))?u=!0:13===i&&(u=!0,10===t.charCodeAt(s)&&++s),t.slice(r+1,e-1).replace(/""/g,'"')}for(;s0){if(void 0===e[r-1]&&(e[r-1]={}),void 0===t)throw new Error("Source data is missing a component at ("+n+", "+r+")!");e[r-1][i]=t}}))})),e}function Ka(t){const e=t[0],n=[];return t.forEach((function(t,i){if(i>0){const r={};t.forEach((function(t,n){if(void 0===t)throw new Error("Source data is missing a component at ("+i+", "+n+")!");r[e[n]]=t})),n.push(r)}})),n}function Ja(t,e){const n=[];let i,r;if(Array.isArray(t)){const o=function(t,e){if(void 0!==t[e])return t[e];const n=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let i=t;return n.some((function(t){return!(i=i&&t in i?i[t]:void 0)})),i};i=e.x?e.value.concat(e.x):e.value,n.push(i),t.forEach((function(t){const e=i.map((function(e){let n=o(t,e);return void 0===n&&(n=null),n}));n.push(e)})),r=Ka(n)}else Object.keys(t).forEach((function(e){const i=t[e].concat();null==i.unshift||i.unshift(e),n.push(i)})),r=Za(n);return r}function Qa(t,e){var n=this;const i=t.rows(e);let r;return 1===i.length?(r=[{}],i[0].forEach(function(t){o(this,n),r[0][t]=null}.bind(this))):r=t.parse(e),r}function tc(t){return Qa({rows:Ga,parse:Va},t)}function ec(t){return Qa({rows:qa,parse:Wa},t)}function nc(t,e){const n=t||(null==e?void 0:e.data_keys);return null!=n&&n.x&&(e.data_x=n.x),n}var ic={convertData:function(t,e){var n=this;const i=this.config,r=i.boost_useWorker;let s=t;if(t.bindto&&(s={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(e){o(this,n);const i="data_"+e;i in t&&(s[e]=t[i])}.bind(this))),s.url&&e)!function(t,e,n,i,r){void 0===e&&(e="csv");const o=new XMLHttpRequest,s={csv:tc,tsv:ec,json:Ja};o.open("GET",t),n&&Object.keys(n).forEach((function(t){o.setRequestHeader(t,n[t])})),o.onreadystatechange=function(){if(4===o.readyState){if(200!==o.status)throw new Error(t+": Something went wrong loading!");{const t=o.responseText;t&&r.call(this,s[e]("json"===e?JSON.parse(t):t,i))}}},o.send()}(s.url,s.mimeType,s.headers,nc(s.keys,i),e);else if(s.json)Na(r,Ja,e,[Za,Ka])(s.json,nc(s.keys,i));else if(s.rows)Na(r,Ka,e)(s.rows);else if(s.columns)Na(r,Za,e)(s.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets:function(t,e){var n=this;const i=this,r=i.axis,s=i.config,a=i.state,c=s.data_type;let u=!1,l=!1,h=!1;r&&(u=r.isCategorized(),l=r.isTimeSeries(),h=r.isCustomX());const f=Object.keys(t[0]||{}),d=f.length?f.filter(i.isNotX,i):[],g=f.length?f.filter(i.isX,i):[];let p;d.forEach(function(r){var a=this;o(this,n);const c=this.getXKey(r);h||l?g.indexOf(c)>=0?p=(e&&i.data.xs[r]||[]).concat(t.map(function(t){return o(this,a),t[c]}.bind(this)).filter($o).map(function(t,e){return o(this,a),i.generateTargetX(t,r,e)}.bind(this))):s.data_x?p=this.getOtherTargetXs():ts(s.data_xs)&&(p=i.getXValuesOfXKey(c,i.data.targets)):p=t.map(function(t,e){return o(this,a),e}.bind(this)),p&&(this.data.xs[r]=p)}.bind(this)),d.forEach(function(t){if(o(this,n),!this.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}.bind(this));const v=d.map(function(e,r){var c=this;o(this,n);const l=s.data_idConverter.bind(i.api)(e),f=i.getXKey(e),d=h&&u,g=d&&t.map(function(t){return o(this,c),t.x}.bind(this)).every(function(t){return o(this,c),s.axis_x_categories.indexOf(t)>-1}.bind(this)),p=t.__append__,v=null===f&&p?i.api.data.values(e).length:0;return{id:l,id_org:e,values:t.map(function(t,n){o(this,c);const u=t[f];let h,y=t[e];return y=null===y||isNaN(y)||ns(y)?es(y)||ns(y)?y:null:+y,!d&&!a.hasRadar||0!==r||Go(u)?h=i.generateTargetX(u,e,v+n):(g||0!==r||0!==n||p||(s.axis_x_categories=[]),h=s.axis_x_categories.indexOf(u),-1===h&&(h=s.axis_x_categories.length,s.axis_x_categories.push(u))),(Go(y)||i.data.xs[e].length<=n)&&(h=void 0),{x:h,value:y,id:l,index:-1}}.bind(this)).filter(function(t){return o(this,c),Ho(t.x)}.bind(this))}}.bind(this));if(v.forEach(function(t){var e,r=this;o(this,n),s.data_xSort&&(t.values=t.values.sort(function(t,e){o(this,r);return(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)}.bind(this))),t.values.forEach(function(t,e){return o(this,r),t.index=e}.bind(this)),null==(e=i.data.xs[t.id])||e.sort(function(t,e){return o(this,r),t-e}.bind(this))}.bind(this)),a.hasNegativeValue=i.hasNegativeValueInTargets(v),a.hasPositiveValue=i.hasPositiveValueInTargets(v),c&&i.isValidChartType(c)){const t=i.mapToIds(v).filter(function(t){return o(this,n),!(t in s.data_types)||!i.isValidChartType(s.data_types[t])}.bind(this));i.setTargetType(t,c)}return v.forEach(function(t){return o(this,n),i.cache.add(t.id_org,t,!0)}.bind(this)),v}},rc={isX:function(t){const e=this.config,n=e.data_x&&t===e.data_x,i=ts(e.data_xs)&&function(t,e){var n=this;let i=!1;return Object.keys(t).forEach(function(r){return o(this,n),t[r]===e&&(i=!0)}.bind(this)),i}(e.data_xs,t);return n||i},isNotX:function(t){return!this.isX(t)},isStackNormalized:function(){const t=this.config;return!(!t.data_stack_normalize||!t.data_groups.length)},isGrouped:function(t){var e=this;const n=this.config.data_groups;return t?n.some(function(n){return o(this,e),n.indexOf(t)>=0&&n.length>1}.bind(this)):n.length>0},getXKey:function(t){const e=this.config;return e.data_x?e.data_x:ts(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n=this;const i=this;let r;return(e&&ts(e)?i.mapToIds(e):[]).forEach(function(e){o(this,n),i.getXKey(e)===t&&(r=i.data.xs[e])}.bind(this)),r},getIndexByX:function(t,e){return e?e.indexOf(Yo(t)?t:+t):(this.filterByX(this.data.targets,t)[0]||{index:null}).index},getXValue:function(t,e){const n=this;return t in n.data.xs&&n.data.xs[t]&&$o(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs:function(){const t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function(t){const e=this.getOtherTargetXs();return e&&t1?(e=e.map(function(e){return o(this,t),e.values}.bind(this)).reduce(function(e,n){return o(this,t),e.concat(n)}.bind(this)).map(function(e){return o(this,t),e.x}.bind(this)),e=Ts(xs(e)).map(function(e,n,r){return o(this,t),{x:e,index:i?r.length-n-1:n}}.bind(this))):n&&(e=e[0].values.concat()),e},mapToIds:function(t){var e=this;return t.map(function(t){return o(this,e),t.id}.bind(this))},mapToTargetIds:function(t){return t?es(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function(t,e){const n=this.mapToIds(t);for(let t,i=0;t=n[i];i++)if(t===e)return!0;return!1},isTargetToShow:function(t){return this.state.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function(t){return this.state.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function(t){var e=this;const n=this;return(t||n.data.targets).filter(function(t){return o(this,e),n.isTargetToShow(t.id)}.bind(this))},mapTargetsToUniqueXs:function(t){var e=this;const n=this.axis;let i=[];return null!=t&&t.length&&(i=xs(ms(t.map(function(t){var n=this;return o(this,e),t.values.map(function(t){return o(this,n),+t.x}.bind(this))}.bind(this)))),i=null!=n&&n.isTimeSeries()?i.map(function(t){return o(this,e),new Date(+t)}.bind(this)):i.map(Number)),Ts(i)},addTargetIds:function(t,e){var n=this;const i=this.state;(es(e)?e:[e]).forEach(function(e){o(this,n),i[t].indexOf(e)<0&&i[t].push(e)}.bind(this))},removeTargetIds:function(t,e){var n=this;const i=this.state;(es(e)?e:[e]).forEach(function(e){o(this,n);const r=i[t].indexOf(e);r>=0&&i[t].splice(r,1)}.bind(this))},addHiddenTargetIds:function(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds:function(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds:function(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds:function(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed:function(t){var e=this;const n=this,i=n.state.hasAxis,r={},s=n.isMultipleX(),a=s?n.mapTargetsToUniqueXs(t).map(function(t){return o(this,e),Yo(t)?t:+t}.bind(this)):null;return t.forEach(function(t){var c=this;o(this,e);const u=[];t.values.filter(function(t){let e=t.value;return o(this,c),$o(e)||null===e}.bind(this)).forEach(function(t){o(this,c);let e=t.value;null!==e&&n.isCandlestickType(t)&&(e=es(e)?e.slice(0,4):[e.open,e.high,e.low,e.close]),es(e)?u.push.apply(u,e):ns(e)&&"high"in e?u.push.apply(u,Object.values(e)):n.isBubbleZType(t)?u.push(i&&n.getBubbleZData(e,"y")):s?u[n.getIndexByX(t.x,a)]=e:u.push(e)}.bind(this)),r[t.id]=u}.bind(this)),r},checkValueInTargets:function(t,e){const n=Object.keys(t);let i;for(let r=0;r1},hasNegativeValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return o(this,e),t<0}.bind(this))},hasPositiveValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return o(this,e),t>0}.bind(this))},orderTargets:function(t){const e=[].concat(t),n=this.getSortCompareFn();return n&&e.sort(n),e},getSortCompareFn:function(t){var e=this;void 0===t&&(t=!1);const n=this,i=n.config.data_order,r=/asc/i.test(i),s=/desc/i.test(i);let a;if(r||s){const n=function(t,n){return o(this,e),t+Math.abs(n.value)}.bind(this);a=function(i,s){o(this,e);const a="values"in i?i.values.reduce(n,0):i.value,c="values"in s?s.values.reduce(n,0):s.value;return t?r?a-c:c-a:r?c-a:a-c}.bind(this)}else Uo(i)&&(a=i.bind(n.api));return a||null},filterByX:function(t,e){var n=this;return ms(t.map(function(t){return o(this,n),t.values}.bind(this))).filter(function(t){return o(this,n),t.x-e==0}.bind(this))},filterRemoveNull:function(t){var e=this;return t.filter(function(t){return o(this,e),$o(this.getBaseValue(t))}.bind(this))},filterByXDomain:function(t,e){var n=this;return t.map(function(t){var i=this;return o(this,n),{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return o(this,i),e[0]<=t.x&&t.x<=e[1]}.bind(this))}}.bind(this))},hasDataLabel:function(){const t=this.config.data_labels;return Wo(t)&&t||Jo(t)&&ts(t)},getDataIndexFromEvent:function(t){const e=this.config,n=this.state,i=n.hasRadar,r=n.inputType,o=n.eventReceiver,s=o.coords,a=o.rect;let c;if(i){let e=t.target;/tspan/i.test(e.tagName)&&(e=e.parentNode);const n=Rn(e).datum();c=n&&1===Object.keys(n).length?n.index:void 0}else{const n=e.axis_rotated,i="touch"===r&&t.changedTouches?t.changedTouches[0]:t;c=ds(s,n?i.clientY-a.top:i.clientX-a.left,0,s.length-1,n)}return c},getDataLabelLength:function(t,e,n){var i=this;const r=this,s=[0,0];return r.$el.chart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return o(this,i),r.dataLabelFormat(t.id)(t)}.bind(this)).each((function(t,e){s[e]=1.3*this.getBoundingClientRect()[n]})).remove(),s},isNoneArc:function(t){return this.hasTarget(this.data.targets,t.id)},isArc:function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function(t,e){const n=t[e].x,i=[];let r;for(r=e-1;r>=0&&n===t[r].x;r--)i.push(t[r]);for(r=e;r=0&&i?i[t]:void 0}return i?i[e]:i},setRatioForGroupedData:function(t){var e=this;const n=this;if(n.config.data_groups.length&&t.some(function(t){return o(this,e),n.isGrouped(t.id)}.bind(this))){const i=function(t){return o(this,e),n.getRatio("index",t,!0)}.bind(this);t.forEach(function(t){o(this,e),"values"in t?t.values.forEach(i):i(t)}.bind(this))}},getRatio:function(t,e,n){var i=this;void 0===n&&(n=!1);const r=this,s=r.config,a=r.state,c=r.api;let u=0;if(e&&c.data.shown().length)if(u=e.ratio||e.value,"arc"===t)if(r.pie.padAngle()())u=e.value/r.getTotalDataSum(!0);else{const t=s.gauge_fullCircle?r.getArcLength():-2*r.getGaugeStartAngle(),n=r.hasType("gauge")?t:2*Math.PI;u=(e.endAngle-e.startAngle)/n}else if("index"===t){const t=c.data.values.bind(c);let n=this.getTotalPerIndex();if(a.hiddenTargetIds.length){let e=t(a.hiddenTargetIds,!1);e.length&&(e=e.reduce(function(t,e){var n=this;return o(this,i),t.map(function(t,i){return o(this,n),(Vo(t)?t:0)+e[i]}.bind(this))}.bind(this)),n=n.map(function(t,n){return o(this,i),t-e[n]}.bind(this)))}const r=n[e.index];e.ratio=Vo(e.value)&&n&&r?e.value/r:0,u=e.ratio}else if("radar"===t)u=parseFloat(Math.max(e.value,0)+"")/a.current.dataMax*s.radar_size_ratio;else if("bar"===t){const t=r.getYScaleById.bind(r)(e.id).domain().reduce(function(t,e){return o(this,i),e-t}.bind(this));u=0===t?0:Math.abs(e.value)/t}else"treemap"===t&&(u/=r.getTotalDataSum(!0));return n&&u?100*u:u},updateDataIndexByX:function(t){var e=this;const n=t.reduce(function(t,n,i){return o(this,e),t[+n.x]=i,t}.bind(this),{});this.data.targets.forEach(function(t){var i=this;o(this,e),t.values.forEach(function(t,e){o(this,i);let r=n[+t.x];void 0===r&&(r=e),t.index=r}.bind(this))}.bind(this))},isBubbleZType:function(t){return this.isBubbleType(t)&&(ns(t.value)&&("z"in t.value||"y"in t.value)||es(t.value)&&t.value.length>=2)},isBarRangeType:function(t){var e=this;const n=t.value;return this.isBarType(t)&&es(n)&&n.length>=2&&n.every(function(t){return o(this,e),Vo(t)}.bind(this))},getDataById:function(t){var e;const n=this.cache.get(t)||this.api.data(t);return null!=(e=null==n?void 0:n[0])?e:n}};function oc(t,e){void 0===e&&(e=!1);const n=this.api;e&&this.api.flush(!0),null==t||t.call(n)}var sc={load:function(t,e){var n=this;const i=this,r=i.data,s=e.append;let a=t;a&&(e.filter&&(a=a.filter(e.filter)),(e.type||e.types)&&a.forEach(function(t){var r;o(this,n);const s=(null==(r=e.types)?void 0:r[t.id])||e.type;i.setTargetType(t.id,s)}.bind(this)),r.targets.forEach(function(t){o(this,n);for(let e=0;eh}c.mouse("drag",i)}function p(t){Rn(t.view).on("mousemove.drag mouseup.drag",null),ii(t.view,n),ei(t),c.mouse("end",t)}function v(t,e){if(r.call(this,t,e)){var n,i,s=t.changedTouches,a=o.call(this,t,e),c=s.length;for(n=0;n=0?oa.focused:"")},classDefocused:function(t){return" "+(this.state.defocusedTargetIds.indexOf(t.id)>=0?oa.defocused:"")},getTargetSelectorSuffix:function(t){return(t||0===t?"-"+t:"").replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g,"-")},selectorTarget:function(t,e,n){void 0===e&&(e=""),void 0===n&&(n="");const i=this.getTargetSelectorSuffix(t);return e+"."+(oa.target+i)+" "+n+", "+e+"."+(oa.circles+i)+" "+n},selectorTargets:function(t,e){var n=this;const i=t||[];return i.length?i.map(function(t){return o(this,n),this.selectorTarget(t,e)}.bind(this)):null},selectorLegend:function(t){return"."+(oa.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return null!=t&&t.length?t.map(function(t){return o(this,e),this.selectorLegend(t)}.bind(this)):null}};function vc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yc(t,e){return yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yc(t,e)}function bc(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,yc(t,e)}function xc(t){return xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xc(t)}function mc(t,e,n){return mc=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&yc(r,n.prototype),r},mc.apply(null,arguments)}function _c(t){var e="function"==typeof Map?new Map:void 0;return _c=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return mc(t,arguments,xc(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),yc(i,t)},_c(t)}function Tc(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return wc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wc(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Cc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n-1&&(r=s.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(t){return o(this,e),t.trim().replace(/[\"'\s]/g,"")}.bind(this)).filter(Boolean),i[n]=r)}return r}(n.chart)||Dc).range();const u=c;if(Uo(i.color_tiles)){const n=i.color_tiles.bind(e.api)(),r=c.map(function(i,r){o(this,t);const s=i.replace(/[#\(\)\s,]/g,""),a=e.state.datetimeId+"-pattern-"+s+"-"+r;return Lc(n[r%n.length],i,a)}.bind(this));c=r.map(function(e){return o(this,t),"url(#"+e.id+")"}.bind(this)),e.patterns=r}return function(t){var n;const o=t.id||(null==(n=t.data)?void 0:n.id)||t,l=e.isTypeOf(o,["line","spline","step"])||!i.data_types[o];let h;return Uo(r[o])?h=r[o].bind(e.api)(t):r[o]?h=r[o]:(a.indexOf(o)<0&&a.push(o),h=l?u[a.indexOf(o)%u.length]:c[a.indexOf(o)%c.length],r[o]=h),Uo(s)?s.bind(e.api)(h,t):h}},generateLevelColor:function(){const t=this.config,e=t.color_pattern,n=t.color_threshold,i="value"===n.unit,r=n.max||100,o=n.values&&n.values.length?n.values:[];return ts(n)?function(t){const n=i?t:100*t/r;let s=e[e.length-1];for(let t=0,i=o.length;t')}.bind(this))}},getGradienColortUrl:function(t){return"url(#"+this.state.datetimeId+"-gradient"+this.getTargetSelectorSuffix(t)+")"},updateLinearGradient:function(){var t=this;const e=this,n=e.config,i=e.data.targets,r=e.state.datetimeId,s=e.$el.defs;i.forEach(function(i){var a=this;o(this,t);const c=r+"-gradient"+e.getTargetSelectorSuffix(i.id),u=e.isAreaType(i)?"area":e.isBarType(i)&&"bar",l=n.axis_rotated;if(u&&s.select("#"+c).empty()){const t=e.color(i),r=n[u+"_linearGradient"],h=r.x,f=void 0===h?l?[1,0]:[0,0]:h,d=r.y,g=void 0===d?l?[0,0]:[0,1]:d,p=r.stops,v=void 0===p?[[0,t,1],[1,t,0]]:p,y=s.append("linearGradient").attr("id",""+c).attr("x1",f[0]).attr("x2",f[1]).attr("y1",g[0]).attr("y2",g[1]);v.forEach(function(n){o(this,a);const r=Uo(n[1])?n[1].bind(e.api)(i.id):n[1];y.append("stop").attr("offset",n[0]).attr("stop-color",r||t).attr("stop-opacity",n[2])}.bind(this))}}.bind(this))},setOverColor:function(t,e){var n=this;const i=this,r=i.config,s=i.$el.main,a=r.color_onover;let c=t?a:i.color;ns(c)?c=function(t){let e=t.id;return o(this,n),e in a?a[e]:i.color(e)}.bind(this):Yo(c)?c=function(){return o(this,n),a}.bind(this):Uo(a)&&(c=c.bind(i.api)),s.selectAll(ns(e)?"."+Ls.arc+i.getTargetSelectorSuffix(e.id):"."+Qs.shape+"-"+e).style("fill",c)}},zc={getYDomainMinMax:function(t,e){var n=this;const i=this,r=i.axis,s=i.config,a="min"===e,c=s.data_groups,u=i.mapToIds(t),l=i.getValuesAsIdKeyed(t);if(c.length>0){const e=i["has"+(a?"Negative":"Positive")+"ValueInTargets"](t);c.forEach(function(t){var i=this;o(this,n);const s=t.filter(function(t){return o(this,i),u.indexOf(t)>=0}.bind(this));if(s.length){const t=s[0],n=r.getId(t);e&&l[t]&&(l[t]=l[t].map(function(t){return o(this,i),(a?t<0:t>0)?t:0}.bind(this))),s.filter(function(t,e){return o(this,i),e>0}.bind(this)).forEach(function(s){var c=this;if(o(this,i),l[s]){const i=r.getId(s);l[s].forEach(function(r,s){o(this,c);const u=+r;i!==n||e&&(a?u>0:u<0)||(l[t][s]+=u)}.bind(this))}}.bind(this))}}.bind(this))}return ws(e,Object.keys(l).map(function(t){return o(this,n),ws(e,l[t])}.bind(this)))},isHiddenTargetWithYDomain:function(t){var e=this;const n=this;return n.state.hiddenTargetIds.some(function(i){return o(this,e),n.axis.getId(i)===t}.bind(this))},getYDomain:function(t,e,n){var i=this;const r=this,s=r.axis,a=r.config,c=r.scale,u="axis_"+e;if(r.isStackNormalized())return[0,100];const l=(null==c?void 0:c[e])&&"log"===c[e].type,h=t.filter(function(t){return o(this,i),s.getId(t.id)===e}.bind(this)),f=n?r.filterByXDomain(h,n):h;if(0===f.length)return r.isHiddenTargetWithYDomain(e)?c[e].domain():"y2"===e?c.y.domain():r.getYDomain(t,"y2",n);const d=a[u+"_min"],g=a[u+"_max"],p=a[u+"_center"],v=a[u+"_inverted"],y=r.hasDataLabel()&&a.axis_rotated,b=r.hasDataLabel()&&!a.axis_rotated;let x=r.getYDomainMinMax(f,"min"),m=r.getYDomainMinMax(f,"max"),_=[jn.BAR,jn.BUBBLE,jn.SCATTER].concat(Xn.Line).some(function(t){o(this,i);const e=t.indexOf("area")>-1?"area":t;return r.hasType(t,f,!0)&&a[e+"_zerobased"]}.bind(this));x=$o(d)?d:$o(g)?x<=g?x:g-10:x,m=$o(g)?g:$o(d)?d<=m?m:d+10:m,isNaN(x)&&(x=0),isNaN(m)&&(m=x),x===m&&(x<0?m=0:x=0);const T=x>=0&&m>=0,w=x<=0&&m<=0;($o(d)&&T||$o(g)&&w)&&(_=!1),_&&(T&&(x=0),w&&(m=0));const A=Math.abs(m-x);let S={top:.1*A,bottom:.1*A};if(Ho(p)){const t=Math.max(Math.abs(x),Math.abs(m));m=p+t,x=p-t}if(y){const t=Ko(c.y.range()),e=r.getDataLabelLength(x,m,"width").map(function(e){return o(this,i),e/t}.bind(this));["bottom","top"].forEach(function(t,n){o(this,i),S[t]+=A*(e[n]/(1-e[0]-e[1]))}.bind(this))}else if(b){const t=r.getDataLabelLength(x,m,"height");["bottom","top"].forEach(function(e,n){o(this,i),S[e]+=r.convertPixelToScale("y",t[n],A)}.bind(this))}S=r.getResettedPadding(S);const E=a[u+"_padding"];ts(E)&&["bottom","top"].forEach(function(t){o(this,i),S[t]=s.getPadding(E,t,S[t],A)}.bind(this)),_&&(T&&(S.bottom=x),w&&(S.top=-m));const k=l?[x,m].map(function(t){return o(this,i),t<0?0:t}.bind(this)):[x-S.bottom,m+S.top];return v?k.reverse():k},getXDomainMinMax:function(t,e){var n,i=this;const r=this.config["axis_x_"+e],s=ws(e,t.map(function(t){var n=this;return o(this,i),ws(e,t.values.map(function(t){return o(this,n),t.x}.bind(this)))}.bind(this)));let a=ns(r)?r.value:r;return a=Ho(a)&&null!=(n=this.axis)&&n.isTimeSeries()?ks.bind(this)(a):a,ns(r)&&r.fit&&("min"===e&&as)&&(a=void 0),Ho(a)?a:s},getXDomainPadding:function(t,e){const n=this,i=n.axis,r=n.config.axis_x_padding,o=i.isTimeSeries()&&e,s=Ko(t);let a;if(i.isCategorized()||o)a=0;else if(n.hasType("bar")){const t=n.getMaxDataCount();a=t>1?s/(t-1)/2:.5}else a=n.getResettedPadding(.01*s);let c=Vo(r)?{left:r,right:r}:r,u=c.left,l=void 0===u?a:u,h=c.right,f=void 0===h?a:h;if("px"===r.unit){const t=Math.abs(s+.2*s);l=i.getPadding(r,"left",a,t),f=i.getPadding(r,"right",a,t)}else{const t=s+l+f;if(o&&t){const n=s/e/t;l=l/t/n,f=f/t/n}}return{left:l,right:f}},getXDomain:function(t){const e=this,n=e.axis,i=e.config,r=e.scale.x,o=i.axis_x_inverted,s=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let a=s[0],c=void 0===a?0:a,u=s[1],l=void 0===u?0:u;if("log"!==r.type){const t=n.isCategorized(),i=n.isTimeSeries(),r=e.getXDomainPadding(s);let o=s[0],a=s[1];o-a!=0||t||(i?(o=new Date(.5*o.getTime()),a=new Date(1.5*a.getTime())):(o=0===o?1:.5*o,a=0===a?-1:1.5*a)),(o||0===o)&&(c=i?new Date(o.getTime()-r.left):o-r.left),(a||0===a)&&(l=i?new Date(a.getTime()+r.right):a+r.right)}return o?[l,c]:[c,l]},updateXDomain:function(t,e,n,i,r){const o=this,s=o.config,a=o.org,c=o.scale,u=c.x,l=c.subX,h=s.zoom_enabled;var f;n&&(u.domain(r||Ts(o.getXDomain(t),!s.axis_x_inverted)),a.xDomain=u.domain(),h&&o.zoom.updateScaleExtent(),l.domain(u.domain()),null==(f=o.brush)||f.scale(l));if(e){const t=r||!o.brush||gs(o)?a.xDomain:ls(o).map(l.invert);u.domain(t),h&&o.zoom.updateScaleExtent()}return i&&u.domain(o.trimXDomain(u.orgDomain())),u.domain()},trimXDomain:function(t){const e=this.config.axis_x_inverted,n=this.getZoomDomain(),i=n[0],r=n[1];return(e?t[0]>=i:t[0]<=i)&&(t[0]=i,t[1]=+t[1]+(i-t[0])),(e?t[1]<=r:t[1]>=r)&&(t[0]=+t[0]-(t[1]-r),t[1]=r),t},getZoomDomain:function(t,e){void 0===t&&(t="zoom"),void 0===e&&(e=!1);const n=this,i=n.config,r=n.scale,o=n.org;let s=e&&r[t]?r[t].domain():o.xDomain,a=s[0],c=s[1];return"zoom"===t&&(Ho(i.zoom_x_min)&&(a=ws("min",[a,i.zoom_x_min])),Ho(i.zoom_x_max)&&(c=ws("max",[c,i.zoom_x_max]))),[a,c]},convertPixelToScale:function(t,e,n){const i=this.config,r=this.state,o=i.axis_rotated;let s;return s="x"===t?o?"height":"width":o?"width":"height",n*(e/r[s])},withinRange:function(t,e,n){var i=this;const r=this.config.axis_x_inverted,s=n,a=s[0],c=s[1];if(Array.isArray(t)){const n=[].concat(t);if(r&&n.reverse(),n[0]=a:r?+n>=c:+n<=c)&&!t.every(function(t,n){return o(this,u),t===e[n]}.bind(this))}.bind(this))}return!1}};function Fc(t,e,n){const i=t.config,r="axis_"+e+"_tick_format";return(i[r]?i[r]:t.defaultValueFormat).call(t.api,n)}var jc={yFormat:function(t){return Fc(this,"y",t)},y2Format:function(t){return Fc(this,"y2",t)},getDefaultValueFormat:function(){const t=this,e=t.defaultArcValueFormat,n=t.yFormat,i=t.y2Format,r=t.hasArcType(null,["gauge","polar","radar"]);return function(o,s,a){return(r?e:t.axis&&"y2"===t.axis.getId(a)?i:n).call(t,o,s)}},defaultValueFormat:function(t){return $o(t)?+t:""},defaultArcValueFormat:function(t,e){return(100*e).toFixed(1)+"%"},defaultPolarValueFormat:function(t){return""+t},dataLabelFormat:function(t){var e=this;const n=this.config.data_labels,i=function(t){return o(this,e),$o(t)?+t:""}.bind(this);let r=i;return Uo(n.format)?r=n.format:Jo(n.format)&&(r=n.format[t]?!0===n.format[t]?i:n.format[t]:function(){return o(this,e),""}.bind(this)),r.bind(this.api)}};function Bc(t){const e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}var Xc={initLegend:function(){const t=this,e=t.config,n=t.$el;t.legendItemTextBox={},t.state.legendHasRendered=!1,e.legend_show?(e.legend_contents_bindto||(n.legend=t.$el.svg.append("g").classed(Us.legend,!0).attr("transform",t.getTranslate("legend"))),t.updateLegend()):t.state.hiddenLegendIds=t.mapToIds(t.data.targets)},updateLegend:function(t,e,n){var i;const r=this,o=r.config,s=r.state,a=r.scale,c=r.$el,u=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=is(u,"withTransition",!0),u.withTransitionForTransform=is(u,"withTransitionForTransform",!0),o.legend_contents_bindto&&o.legend_contents_template?r.updateLegendTemplate():s.hasTreemap||r.updateLegendElement(t||r.mapToIds(r.data.targets),u,n),null==(i=c.legend)||i.selectAll("."+Us.legendItem).classed(Us.legendItemHidden,(function(t){const e=!r.isTargetToShow(t);return e&&(this.style.opacity=null),e})),r.updateScales(!1,!a.zoom),r.updateSvgSize(),r.transformAll(u.withTransitionForTransform,n),s.legendHasRendered=!0},updateLegendTemplate:function(){var t=this;const e=this,n=e.config,i=e.$el,r=Rn(n.legend_contents_bindto),s=n.legend_contents_template;if(!r.empty()){const n=e.mapToIds(e.data.targets),a=[];let c="";n.forEach(function(n){o(this,t);const i=Uo(s)?s.bind(e.api)(n,e.color(n),e.api.data(n)[0].values):Es(s,{COLOR:e.color(n),TITLE:n});i&&(a.push(n),c+=i)}.bind(this));const u=r.html(c).selectAll((function(){return this.childNodes})).data(a);e.setLegendItem(u),i.legend=r}},updateSizeForLegend:function(t){const e=this,n=e.config,i=e.state,r=i.isLegendTop,o=i.isLegendLeft,s=i.isLegendRight,a=i.isLegendInset,c=i.current,u=t.width,l=t.height,h={top:r?e.getCurrentPaddingTop()+n.legend_inset_y+5.5:c.height-l-e.getCurrentPaddingBottom()-n.legend_inset_y,left:o?e.getCurrentPaddingLeft()+n.legend_inset_x+.5:c.width-u-e.getCurrentPaddingRight()-n.legend_inset_x+.5};e.state.margin3={top:s?0:a?h.top:c.height-l,right:NaN,bottom:0,left:s?c.width-u:a?h.left:0}},transformLegend:function(t){const e=this,n=e.$el.legend;(0,e.$T)(n,t).attr("transform",e.getTranslate("legend"))},updateLegendStep:function(t){this.state.legendStep=t},updateLegendItemWidth:function(t){this.state.legendItemWidth=t},updateLegendItemHeight:function(t){this.state.legendItemHeight=t},updateLegendItemColor:function(t,e){const n=this.$el.legend;n&&n.select("."+Us.legendItem+"-"+t+" line").style("stroke",e)},getLegendWidth:function(){const t=this.state,e=t.current.width,n=t.isLegendRight,i=t.isLegendInset,r=t.legendItemWidth,o=t.legendStep;return this.config.legend_show?n||i?r*(o+1):e:0},getLegendHeight:function(){var t;const e=this,n=e.state,i=n.current,r=n.isLegendRight,o=n.legendItemHeight,s=n.legendStep,a="fit"===(null==(t=e.config.padding)?void 0:t.mode);return e.config.legend_show?r?i.height:(a?10:Math.max(20,o))*(s+1):0},opacityForUnfocusedLegend:function(t){return t.classed(Us.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this;const i=this,r=i.$el.legend,s=i.$T,a=i.mapToTargetIds(t);r&&s(r.selectAll("."+Us.legendItem).filter(function(t){return o(this,n),a.indexOf(t)>=0}.bind(this)).classed(Gs.legendItemFocused,e)).style("opacity",(function(){return e?null:i.opacityForUnfocusedLegend.call(i,Rn(this))}))},revertLegend:function(){const t=this.$el.legend,e=this.$T;t&&e(t.selectAll("."+Us.legendItem).classed(Gs.legendItemFocused,!1)).style("opacity",null)},showLegend:function(t){const e=this,n=e.config,i=e.$el,r=e.$T;n.legend_show||(n.legend_show=!0,i.legend?i.legend.style("visibility",null):e.initLegend(),e.state.legendHasRendered||e.updateLegend()),e.removeHiddenLegendIds(t),r(i.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend:function(t){const e=this,n=e.config,i=e.$el.legend;n.legend_show&&Qo(t)&&(n.legend_show=!1,i.style("visibility","hidden")),e.addHiddenLegendIds(t),i.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox:function(t,e){const n=this,i=n.cache,r=n.state;let o;const s=Ea;return t&&(o=!r.redrawing&&i.get(s)||{},o[t]||(o[t]=n.getTextRect(e,Us.legendItem),i.add(s,o)),o=o[t]),o},setLegendItem:function(t){var e=this;const n=this,i=n.$el,r=n.api,s=n.config,a=n.state,c="touch"===a.inputType,u=n.hasType("gauge"),l=s.boost_useCssRule,h=s.legend_item_interaction;t.attr("class",(function(t){const e=Rn(this);return(!e.empty()&&e.attr("class")||"")+n.generateClass(Us.legendItem,t)})).style("visibility",function(t){return o(this,e),n.isLegendToShow(t)?null:"hidden"}.bind(this)),s.interaction_enabled&&(l&&[["."+Us.legendItem,"cursor:pointer"],["."+Us.legendItem+" text","pointer-events:none"],["."+Us.legendItemPoint+" text","pointer-events:none"],["."+Us.legendItemTile,"pointer-events:none"],["."+Us.legendItemEvent,"fill-opacity:0"]].forEach(function(t){o(this,e);const r=t[0],s=t[1];n.setCssRule(!1,r,[s])(i.legend)}.bind(this)),t.on(h.dblclick?"dblclick":"click",h||Uo(s.legend_item_onclick)?function(t,e){if(!rs(s.legend_item_onclick,r,e)){const n=t.altKey,i=t.target;"dblclick"===t.type||n?a.hiddenTargetIds.length&&-1===i.parentNode.getAttribute("class").indexOf(Us.legendItemHidden)?r.show():(r.hide(),r.show(e)):(r.toggle(e),Rn(this).classed(Gs.legendItemFocused,!1))}c&&n.hideTooltip()}:null),c||t.on("mouseout",h||Uo(s.legend_item_onout)?function(t,e){rs(s.legend_item_onout,r,e)||(Rn(this).classed(Gs.legendItemFocused,!1),u&&n.undoMarkOverlapped(n,"."+$s.gaugeValue),n.api.revert())}:null).on("mouseover",h||Uo(s.legend_item_onover)?function(t,e){rs(s.legend_item_onover,r,e)||(Rn(this).classed(Gs.legendItemFocused,!0),u&&n.markOverlapped(e,n,"."+$s.gaugeValue),!a.transiting&&n.isTargetToShow(e)&&r.focus(e))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",n.getStylePropValue("pointer")))},updateLegendElement:function(t,e){var n=this;const i=this,r=i.config,s=i.state,a=i.$el.legend,c=i.$T,u="circle"!==r.legend_item_tile_type,l=r.legend_item_tile_r,h={width:u?r.legend_item_tile_width:2*l,height:u?r.legend_item_tile_height:2*l},f={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:h.width+5,totalLength:0},d={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let g,p,v;const y=t.filter(function(t){return o(this,n),!Ho(r.data_names[t])||null!==r.data_names[t]}.bind(this)),b=e.withTransition,x=i.getUpdateLegendPositions(y,f,d);s.isLegendInset&&(f.step=r.legend_inset_step?r.legend_inset_step:y.length,i.updateLegendStep(f.step)),s.isLegendRight?(g=function(t){return o(this,n),f.max.width*d.steps[t]}.bind(this),p=function(t){return o(this,n),d.margins[d.steps[t]]+d.offsets[t]}.bind(this)):s.isLegendInset?(g=function(t){return o(this,n),f.max.width*d.steps[t]+10}.bind(this),p=function(t){return o(this,n),d.margins[d.steps[t]]+d.offsets[t]}.bind(this)):(g=function(t){return o(this,n),d.margins[d.steps[t]]+d.offsets[t]}.bind(this),p=function(t){return o(this,n),f.max.height*d.steps[t]}.bind(this));const m={xText:function(t,e){return o(this,n),g(t,e)+4+h.width}.bind(this),xRect:function(t,e){return o(this,n),g(t,e)}.bind(this),x1Tile:function(t,e){return o(this,n),g(t,e)-2}.bind(this),x2Tile:function(t,e){return o(this,n),g(t,e)-2+h.width}.bind(this),yText:function(t,e){return o(this,n),p(t,e)+9}.bind(this),yRect:function(t,e){return o(this,n),p(t,e)-5}.bind(this),yTile:function(t,e){return o(this,n),p(t,e)+4}.bind(this)};i.generateLegendItem(y,h,x,m),v=a.select("."+Us.legendBackground+" rect"),s.isLegendInset&&f.max.width>0&&0===v.size()&&(v=a.insert("g","."+Us.legendItem).attr("class",Us.legendBackground).append("rect"));const _=a.selectAll("text").data(y).text(function(t){return o(this,n),Ho(r.data_names[t])?r.data_names[t]:t}.bind(this)).each((function(t,e){x(this,t,e)}));c(_,b).attr("x",m.xText).attr("y",m.yText);c(a.selectAll("rect."+Us.legendItemEvent).data(y),b).attr("width",function(t){return o(this,n),d.widths[t]}.bind(this)).attr("height",function(t){return o(this,n),d.heights[t]}.bind(this)).attr("x",m.xRect).attr("y",m.yRect),i.updateLegendItemPos(y,b,m),v&&c(v,b).attr("height",i.getLegendHeight()-12).attr("width",f.max.width*(f.step+1)+10),i.updateLegendItemWidth(f.max.width),i.updateLegendItemHeight(f.max.height),i.updateLegendStep(f.step)},getUpdateLegendPositions:function(t,e,n){const i=this,r=i.config,s=i.state,a=s.isLegendRight||s.isLegendInset;return function(c,u,l){var h=this;const f=l===t.length-1,d=i.getLegendItemTextBox(u,c),g=d.width+e.tileWidth+(f&&!a?0:e.padding.right)+r.legend_padding,p=d.height+e.padding.top,v=a?p:g,y=a?i.getLegendHeight():i.getLegendWidth();let b;const x=function(t,i){i||(b=(y-e.totalLength-v)/2,b=e.max.width)&&(e.max.width=g),(!e.max.height||p>=e.max.height)&&(e.max.height=p);const m=a?e.max.height:e.max.width;r.legend_equally?(Object.keys(n.widths).forEach(function(t){return o(this,h),n.widths[t]=e.max.width}.bind(this)),Object.keys(n.heights).forEach(function(t){return o(this,h),n.heights[t]=e.max.height}.bind(this)),b=(y-m*t.length)/2,b=Uc?10:o>=Yc?5:o>=Vc?2:1;let a,c,u;return r<0?(u=Math.pow(10,-r)/s,a=Math.round(t*u),c=Math.round(e*u),a/ue&&--c,u=-u):(u=Math.pow(10,r)*s,a=Math.round(t/u),c=Math.round(e/u),a*ue&&--c),c0))return[];if((t=+t)===(e=+e))return[t];const i=e=o))return[];const c=s-o+1,u=Array(c);if(i)if(a<0)for(let t=0;te?1:t>=e?0:NaN}function Kc(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Jc(t){var e=this;let n,i,r;function s(t,e,r,o){if(void 0===r&&(r=0),void 0===o&&(o=t.length),r>>1;i(t[n],e)<0?r=n+1:o=n}while(rn&&r(t[o-1],e)>-r(t[o],e)?o-1:o},right:function(t,e,r,o){if(void 0===r&&(r=0),void 0===o&&(o=t.length),r>>1;i(t[n],e)<=0?r=n+1:o=n}while(re&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),i=c>2?uu:cu,r=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(r||(r=i(s.map(t),a,c)))(t(u(e)))}return h.invert=function(n){return u(e((o||(o=i(a,s.map(t),Gi)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,ru),l()):s.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),l()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),c=iu,l()},h.clamp=function(t){return arguments.length?(u=!!t||su,l()):u!==su},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,l()}}function fu(){return hu()(su,su)}var du,gu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pu(t){if(!(e=gu.exec(t)))throw new Error("invalid format: "+t);var e;return new vu({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function vu(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function yu(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function bu(t){return(t=yu(Math.abs(t)))?t[1]:NaN}function xu(t,e){var n=yu(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+Array(r-i.length+2).join("0")}pu.prototype=vu.prototype,vu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var mu=void 0,_u={"%":function(t,e){return o(this,mu),(100*t).toFixed(e)}.bind(void 0),b:function(t){return o(this,mu),Math.round(t).toString(2)}.bind(void 0),c:function(t){return o(this,mu),t+""}.bind(void 0),d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return o(this,mu),t.toExponential(e)}.bind(void 0),f:function(t,e){return o(this,mu),t.toFixed(e)}.bind(void 0),g:function(t,e){return o(this,mu),t.toPrecision(e)}.bind(void 0),o:function(t){return o(this,mu),Math.round(t).toString(8)}.bind(void 0),p:function(t,e){return o(this,mu),xu(100*t,e)}.bind(void 0),r:xu,s:function(t,e){var n=yu(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(du=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+Array(1-o).join("0")+yu(t,Math.max(0,e+o-1))[0]},X:function(t){return o(this,mu),Math.round(t).toString(16).toUpperCase()}.bind(void 0),x:function(t){return o(this,mu),Math.round(t).toString(16)}.bind(void 0)};function Tu(t){return t}var wu,Au,Su,Eu=Array.prototype.map,ku=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ou(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?Tu:(e=Eu.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,o=[],s=0,a=e[0],c=0;r>0&&a>0&&(c+a+1>i&&(a=Math.max(1,i-c)),o.push(t.substring(r-=a,r+a)),!((c+=a+1)>i));)a=e[s=(s+1)%e.length];return o.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Tu:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Eu.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=pu(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,g=t.width,p=t.comma,v=t.precision,y=t.trim,b=t.type;"n"===b?(p=!0,b="g"):_u[b]||(void 0===v&&(v=12),y=!0,b="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===f?r:"#"===f&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",m="$"===f?o:/[%p]/.test(b)?c:"",_=_u[b],T=/[defgprs%]/.test(b);function w(t){var r,o,c,f=x,w=m;if("c"===b)w=_(t)+w,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:_(Math.abs(t),v),y&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),A&&0==+t&&"+"!==h&&(A=!1),f=(A?"("===h?h:u:"-"===h||"("===h?"":h)+f,w=("s"===b?ku[8+du/3]:"")+w+(A&&"("===h?")":""),T)for(r=-1,o=t.length;++r(c=t.charCodeAt(r))||c>57){w=(46===c?s+t.slice(r+1):t.slice(r))+w,t=t.slice(0,r);break}}p&&!d&&(t=i(t,1/0));var S=f.length+t.length+w.length,E=S>1)+f+t+w+E.slice(S);break;default:t=E+f+t+w}return a(t)}return v=void 0===v?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=pu(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(bu(e)/3))),r=Math.pow(10,-i),o=ku[8+i/3];return function(t){return n(r*t)+o}}}}function Mu(t,e,n,i){var r,o=qc(t,e,n);switch((i=pu(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(bu(e)/3)))-bu(Math.abs(t)))}(o,s))||(i.precision=r),Su(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,bu(e)-bu(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-bu(Math.abs(t)))}(o))||(i.precision=r-2*("%"===i.type))}return Au(i)}function Ru(t){var e=t.domain;return t.ticks=function(t){var n=e();return Hc(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return Mu(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r,o=e(),s=0,a=o.length-1,c=o[s],u=o[a],l=10;for(u0;){if((r=Wc(c,u,n))===i)return o[s]=c,o[a]=u,e(o);if(r>0)c=Math.floor(c/r)*r,u=Math.ceil(u/r)*r;else{if(!(r<0))break;c=Math.ceil(c*r)/r,u=Math.floor(u*r)/r}i=r}return t},t}function Cu(){var t=fu();return t.copy=function(){return lu(t,Cu())},Mc.apply(t,arguments),Ru(t)}function Iu(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Pu(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Lu(){var t=function(t){var e=1,n=t(Iu(e),Pu(e));return n.constant=function(n){return arguments.length?t(Iu(e=+n),Pu(e)):e},Ru(n)}(hu());return t.copy=function(){return lu(t,Lu()).constant(t.constant())},Mc.apply(t,arguments)}function Du(t,e){var n,i=0,r=(t=t.slice()).length-1,o=t[i],s=t[r];return s0){for(;g<=p;++g)for(f=1;fu)break;y.push(d)}}else for(;g<=p;++g)for(f=a-1;f>=1;--f)if(d=g>0?f/s(-g):f*s(g),!(du)break;y.push(d)}2*y.length0?t>1?c(function(n){o(this,e),n.setTime(Math.floor(n/t)*t)}.bind(this),function(n,i){o(this,e),n.setTime(+n+i*t)}.bind(this),function(n,i){return o(this,e),(i-n)/t}.bind(this)):Vu:null}.bind(void 0);Vu.range;var Gu=void 0;const Hu=c(function(t){o(this,Gu),t.setTime(t-t.getMilliseconds())}.bind(void 0),function(t,e){o(this,Gu),t.setTime(+t+e*u)}.bind(void 0),function(t,e){return o(this,Gu),(e-t)/u}.bind(void 0),function(t){return o(this,Gu),t.getUTCSeconds()}.bind(void 0));Hu.range;var Wu=void 0;const qu=c(function(t){o(this,Wu),t.setTime(t-t.getMilliseconds()-t.getSeconds()*u)}.bind(void 0),function(t,e){o(this,Wu),t.setTime(+t+e*l)}.bind(void 0),function(t,e){return o(this,Wu),(e-t)/l}.bind(void 0),function(t){return o(this,Wu),t.getMinutes()}.bind(void 0)),Zu=(qu.range,c(function(t){o(this,Wu),t.setUTCSeconds(0,0)}.bind(void 0),function(t,e){o(this,Wu),t.setTime(+t+e*l)}.bind(void 0),function(t,e){return o(this,Wu),(e-t)/l}.bind(void 0),function(t){return o(this,Wu),t.getUTCMinutes()}.bind(void 0)));Zu.range;var Ku=void 0;const Ju=c(function(t){o(this,Ku),t.setTime(t-t.getMilliseconds()-t.getSeconds()*u-t.getMinutes()*l)}.bind(void 0),function(t,e){o(this,Ku),t.setTime(+t+e*h)}.bind(void 0),function(t,e){return o(this,Ku),(e-t)/h}.bind(void 0),function(t){return o(this,Ku),t.getHours()}.bind(void 0)),Qu=(Ju.range,c(function(t){o(this,Ku),t.setUTCMinutes(0,0,0)}.bind(void 0),function(t,e){o(this,Ku),t.setTime(+t+e*h)}.bind(void 0),function(t,e){return o(this,Ku),(e-t)/h}.bind(void 0),function(t){return o(this,Ku),t.getUTCHours()}.bind(void 0)));Qu.range;var tl=void 0;const el=c(function(t){o(this,tl),t.setDate(1),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,tl),t.setMonth(t.getMonth()+e)}.bind(void 0),function(t,e){return o(this,tl),e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}.bind(void 0),function(t){return o(this,tl),t.getMonth()}.bind(void 0)),nl=(el.range,c(function(t){o(this,tl),t.setUTCDate(1),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){o(this,tl),t.setUTCMonth(t.getUTCMonth()+e)}.bind(void 0),function(t,e){return o(this,tl),e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}.bind(void 0),function(t){return o(this,tl),t.getUTCMonth()}.bind(void 0)));nl.range;function il(t,e,n,i,r,s){const a=[[Hu,1,u],[Hu,5,5e3],[Hu,15,15e3],[Hu,30,3e4],[s,1,l],[s,5,3e5],[s,15,9e5],[s,30,18e5],[r,1,h],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,f],[i,2,1728e5],[n,1,d],[e,1,g],[e,3,7776e6],[t,1,p]];function c(e,n,i){var r=this;const s=Math.abs(n-e)/i,c=Jc(function(t){let e=t[2];return o(this,r),e}.bind(this)).right(a,s);if(c===a.length)return t.every(qc(e/p,n/p,i));if(0===c)return Vu.every(Math.max(qc(e,n,i),1));const u=a[s/a[c-1][2]0)for(var i,r=t[0],o=e[0],s=t[n]-r,a=e[n]-o,c=-1;++c<=n;)i=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(r+i*s),this._beta*e[c]+(1-this._beta)*(o+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var El=function t(e){function n(t){return 1===e?new bl(t):new Sl(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function kl(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Ol(t,e){this._context=t,this._k=(1-e)/6}Ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:kl(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ml=function t(e){function n(t){return new Ol(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Rl(t,e){this._context=t,this._k=(1-e)/6}Rl.prototype={areaStart:ml,areaEnd:ml,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Cl=function t(e){function n(t){return new Rl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Il(t,e){this._context=t,this._k=(1-e)/6}Il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Pl=function t(e){function n(t){return new Il(t,e)}return n.tension=function(e){return t(+e)},n}(0);const Ll=Math.abs,Dl=Math.atan2,Nl=Math.cos,zl=Math.max,Fl=Math.min,jl=Math.sin,Bl=Math.sqrt,Xl=1e-12,$l=Math.PI,Ul=$l/2,Yl=2*$l;function Vl(t){return t>=1?Ul:t<=-1?-Ul:Math.asin(t)}function Gl(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>Xl){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Xl){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/l,s=(s*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function Hl(t,e){this._context=t,this._alpha=e}Hl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Wl=function t(e){function n(t){return e?new Hl(t,e):new Ol(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ql(t,e){this._context=t,this._alpha=e}ql.prototype={areaStart:ml,areaEnd:ml,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Zl=function t(e){function n(t){return e?new ql(t,e):new Rl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Kl(t,e){this._context=t,this._alpha=e}Kl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Jl=function t(e){function n(t){return e?new Kl(t,e):new Il(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ql(t){return t<0?-1:1}function th(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0);return(Ql(o)+Ql(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs((o*r+s*i)/(i+r)))||0}function eh(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function nh(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function ih(t){this._context=t}function rh(t){this._context=new oh(t)}function oh(t){this._context=t}function sh(t){return new ih(t)}function ah(t){return new rh(t)}function ch(t){this._context=t}function uh(t){var e,n,i=t.length-1,r=Array(i),o=Array(i),s=Array(i);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[i-1]=(t[i]+r[i-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var xh={getDrawShape:function(){var t=this;const e=this,n=e.config.axis_rotated,i=e.state,r=i.hasRadar,s=i.hasTreemap,a={type:{},indices:{},pos:{}};if(s||["bar","candlestick","line","area"].forEach(function(n){o(this,t);const i=vs(/^(bubble|scatter)$/.test(n)?"line":n);if(e.hasType(n)||e.hasTypeOf(i)||"line"===n&&(e.hasType("bubble")||e.hasType("scatter"))){const t=e.getShapeIndices(e["is"+i+"Type"]),r=e["generateDraw"+i];a.indices[n]=t,a.type[n]=r?r.bind(e)(t,!1):void 0}}.bind(this)),!e.hasArcType()||r||s){let t,i;s||(t=r?e.radarCircleX:n?e.circleY:e.circleX,i=r?e.radarCircleY:n?e.circleX:e.circleY),a.pos={xForText:e.generateXYForText(a.indices,!0),yForText:e.generateXYForText(a.indices,!1),cx:(t||function(){}).bind(e),cy:(i||function(){}).bind(e)}}return a},getShapeIndices:function(t){var e=this;const n=this,i=n.config,r=i.data_xs,s=ts(r),a={};let c=s?{}:0;return s&&xs(Object.keys(r).map(function(t){return o(this,e),r[t]}.bind(this))).forEach(function(t){o(this,e),c[t]=0,a[t]={}}.bind(this)),n.filterTargetsToShow(n.data.targets.filter(t,n)).forEach(function(t){o(this,e);const n=t.id in r?r[t.id]:"",s=n?a[n]:a;for(let e,n=0;e=i.data_groups[n];n++)if(!(e.indexOf(t.id)<0))for(let n,i=0;n=e[i];i++)if(n in s){s[t.id]=s[n];break}Go(s[t.id])&&(s[t.id]=n?c[n]++:c++,s.__max__=(n?c[n]:c)-1)}.bind(this)),a},getIndices:function(t,e){var n=this;const i=this,r=i.config,s=r.data_xs,a=r.bar_indices_removeNull,c=e.id,u=e.index;if(i.isBarType(c)&&a){const t={};return i.getAllValuesOnIndex(u,!0).forEach(function(e,i){o(this,n),t[e.id]=i,t.__max__=i}.bind(this)),t}return ts(s)?t[s[c]]:t},getIndicesMax:function(t){var e=this;return ts(this.config.data_xs)?Object.keys(t).map(function(n){return o(this,e),t[n].__max__||0}.bind(this)).reduce(function(t,n){return o(this,e),t+n}.bind(this)):t.__max__},getShapeX:function(t,e,n){var i=this;const r=this,s=r.config,a=r.scale,c=n?a.subX:a.zoom||a.x,u=s.bar_overlap,l=s.bar_padding,h=function(t,e){return o(this,i),t+e}.bind(this),f=Jo(t)&&(t._$total.length?t._$total.reduce(h)/2:0);return function(n){o(this,i);const s=r.getIndices(e,n,"getShapeX"),a=n.id in s?s[n.id]:0,d=(s.__max__||0)+1;let g=0;if(ts(n.x)){const e=c(n.x,!0);if(f){const i=t[n.id]||t._$width;g=u?e-i/2:e-i+t._$total.slice(0,a+1).reduce(h)-f}else g=e-(Vo(t)?t:t._$width)*(d/2-(u?1:a))}return t&&g&&d>1&&l&&(a&&(g+=l*a),d>2?g-=(d-1)*l/2:2===d&&(g-=l/2)),g}.bind(this)},getShapeY:function(t){var e=this;const n=this,i=n.isStackNormalized();return function(r){o(this,e);let s=r.value;return Vo(r)?s=r:i?s=n.getRatio("index",r,!0):n.isBubbleZType(r)?s=n.getBubbleZData(r.value,"y"):n.isBarRangeType(r)&&(s=s[1]),n.getYScaleById(r.id,t)(s)}.bind(this)},getShapeYMin:function(t){const e=this,n=e.axis.getId(t),i=e.scale[n].domain()[0],r=e.config["axis_"+n+"_inverted"];return!e.isGrouped(t)&&!r&&i>0?i:0},getShapeOffsetData:function(t){var e=this;const n=this,i=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),r=n.isStackNormalized(),s=i.map(function(t){var i=this;o(this,e);let s=t.values;const a={};n.isStepType(t)&&(s=n.convertValuesToStep(s));const c=s.reduce(function(t,e){o(this,i);const s=+e.x;return t[s]=e,a[s]=r?n.getRatio("index",e,!0):e.value,t}.bind(this),{});return{id:t.id,rowValues:s,rowValueMapByXValue:c,values:a}}.bind(this)),a=i.reduce(function(t,n,i){let r=n.id;return o(this,e),t[r]=i,t}.bind(this),{});return{indexMapByTargetId:a,shapeOffsetTargets:s}},getShapeOffset:function(t,e,n){var i=this;const r=this,s=r.getShapeOffsetData(t),a=s.shapeOffsetTargets,c=s.indexMapByTargetId,u=r.config.data_groupsZeroAs;return function(t,s){var l=this;o(this,i);const h=t.id,f=t.value,d=t.x,g=r.getIndices(e,t),p=r.getYScaleById(h,n);if(r.isBarRangeType(t))return p(f[0]);const v=+d,y=p("zero"===u?0:r.getShapeYMin(h));let b=y;return a.filter(function(t){return o(this,l),t.id!==h&&g[t.id]===g[h]}.bind(this)).forEach(function(t){o(this,l);const e=t.id,n=t.rowValueMapByXValue,i=t.rowValues,r=t.values;if(c[e]=0&&Vo(t)){(0!==f||("positive"===u&&t>0||"negative"===u&&t<0))&&(b+=p(t)-y)}}}.bind(this)),b}.bind(this)},getBarW:function(t,e,n){var i=this;const r=this,s=r.config,a=r.org,c=r.scale,u=r.getMaxDataCount(),l="bar"===t&&s.data_groups.length,h=t+"_width",f=c.zoom&&!r.axis.isCategorized()?a.xDomain.map(function(t){return o(this,i),c.zoom(t)}.bind(this)).reduce(function(t,e){return o(this,i),Math.abs(t)+e}.bind(this))/u:e.tickInterval(u),d=function(t){o(this,i);const e=t?s[h][t]:s[h],r=t?e.ratio:s[h+"_ratio"],a=t?e.max:s[h+"_max"],c=Vo(e)?e:n?f*r/n:0;return a&&c>a?a:c}.bind(this);let g=d();return!l&&Jo(s[h])&&(g={_$width:g,_$total:[]},r.filterTargetsToShow(r.data.targets).forEach(function(t){o(this,i),s[h][t.id]&&(g[t.id]=d(t.id),g._$total.push(g[t.id]||g._$width))}.bind(this))),g},getShapeByIndex:function(t,e,n){var i=this;const r=this,s=r.$el,a=$o(e)?"-"+e:"";let c=s[t];return c=c&&!c.empty()?c.filter(function(t){return o(this,i),!n||t.id===n}.bind(this)).filter(function(t){return o(this,i),!$o(e)||t.index===e}.bind(this)):(n?s.main.selectAll("."+oa[t+"s"]+r.getTargetSelectorSuffix(n)):s.main).selectAll("."+oa[t]+a),c},isWithinShape:function(t,e){const n=this,i=Rn(t);let r;return n.isTargetToShow(e.id)?null!=n.hasValidPointType&&n.hasValidPointType(t.nodeName)?r=n.isStepType(e)?n.isWithinStep(t,n.getYScaleById(e.id)(e.value)):n.isWithinCircle(t,n.isBubbleType(e)?1.5*n.pointSelectR(e):0):"path"===t.nodeName&&(r=!i.classed(oa.bar)||n.isWithinBar(t)):r=!1,r},getInterpolate:function(t){const e=this.getInterpolateType(t);return{basis:xl,"basis-closed":Tl,"basis-open":Al,bundle:El,cardinal:Ml,"cardinal-closed":Cl,"cardinal-open":Pl,"catmull-rom":Wl,"catmull-rom-closed":Zl,"catmull-rom-open":Jl,"monotone-x":sh,"monotone-y":ah,natural:lh,"linear-closed":fh,linear:gh,step:vh,"step-after":bh,"step-before":yh}[e]},getInterpolateType:function(t){const e=this,n=e.config,i=n.spline_interpolation_type,r=e.isInterpolationType(i)?i:"cardinal";return e.isSplineType(t)?r:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar:function(t){const e=us(this.state.event,t),n=cs(t),i=n[0],r=n[1],o=Math.min(i.x,r.x),s=Math.min(i.y,r.y),a=this.config.bar_sensitivity,c=t.getBBox(),u=c.width,l=c.height;return o-a0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getCurrentPaddingTop:function(){const t=this,e=t.config,n=t.state.hasAxis,i=t.$el,r=n?e.axis_y2_axes.length:0;let o=$o(e.padding_top)?e.padding_top:0;return i.title&&i.title.node()&&(o+=t.getTitlePadding()),r&&e.axis_rotated&&(o+=t.getHorizontalAxisHeight("y2")*r),o},getCurrentPaddingBottom:function(){const t=this,e=t.config,n=t.state.hasAxis,i=e.axis_rotated?"y":"x",r=n?e["axis_"+i+"_axes"].length:0;return($o(e.padding_bottom)?e.padding_bottom:0)+(r?t.getHorizontalAxisHeight(i)*r:0)},getCurrentPaddingLeft:function(t){var e;const n=this,i=n.config,r=n.state.hasAxis,o=i.axis_rotated,s="fit"===(null==(e=i.padding)?void 0:e.mode),a=o?"x":"y",c=r?i["axis_"+a+"_axes"].length:0;let u=r?n.getAxisWidthByAxisId(a,t):0;s||(u=qo(u));let l=i["axis_"+a+"_inner"]||!i["axis_"+a+"_show"]?0:u;return $o(i.padding_left)?l=i.padding_left+(s&&o?u:0):r&&o&&(l=i.axis_x_show?s?u:Math.max(u,40):1),r&&(s||i["axis_"+a+"_inner"])&&i["axis_"+a+"_label"].text&&(l+=n.axis.getAxisLabelPosition("y").isOuter?20:0),l+u*c},getCurrentPaddingRight:function(t){var e,n;void 0===t&&(t=!1);const i=this,r=i.config,o=i.state.hasAxis,s=r.axis_rotated,a="fit"===(null==(e=r.padding)?void 0:e.mode),c=a?2:10,u=i.state.isLegendRight?i.getLegendWidth()+20:0,l=o?r.axis_y2_axes.length:0,h=null!=(n=i.axis)&&n.getAxisLabelPosition("y2").isOuter?20:0,f=t?i.axis.getXAxisTickTextY2Overflow(c):0;let d=o&&!r.axis_y2_inner?i.getAxisWidthByAxisId("y2"):1;a||(d=qo(d));let g=s?0:Math.max(d+u,f);return $o(r.padding_right)?g=r.padding_right+(a&&(s||!r.axis_y2_show?c:g))+(o&&!a?1:0):i.axis&&s?g=c+u:!i.axis||r.axis_y2_show&&!r.axis_y2_inner||(g=Math.max((a&&!r.axis_y2_show?2:1)+u+h,f)),o&&!s&&a&&r.axis_y2_show&&!r.axis_y2_inner&&r.axis_y2_label.text&&(g+=h),g+d*l},getParentRectValue:function(t){const e="offset"+vs(t);let n=this.$el.chart.node(),i=0;for(;i<30&&n&&"BODY"!==n.tagName;){try{i=n.getBoundingClientRect()[t]}catch(t){e in n&&(i=n[e])}n=n.parentNode}const r=Fn.body[e];return i>r&&(i=r),i},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft:function(t){const e=this,n=e.config,i=e.$el,r=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,o=n.axis_rotated?Ns.axisX:Ns.axisY,s=i.main.select("."+o).node(),a=s&&r?s.getBoundingClientRect():{right:0},c=i.chart.node().getBoundingClientRect(),u=e.hasArcType(),l=a.right-c.left-(u?0:e.getCurrentPaddingLeft(t));return l>0?l:0},updateDimension:function(t){const e=this,n=e.config,i=e.state.hasAxis,r=e.$el;var o;i&&!t&&e.axis.x&&n.axis_rotated&&(null==(o=e.axis.subX)||o.create(r.axis.subX));e.updateScales(t),e.updateSvgSize(),e.transformAll(!1)},updateSvgSize:function(){const t=this,e=t.state,n=e.clip,i=e.current,r=e.hasAxis,o=e.width,s=e.height,a=t.$el.svg;if(a.attr("width",i.width).attr("height",i.height),r){const e=a.select("."+ta.brush+" .overlay"),i={width:0,height:0};e.size()&&(i.width=+e.attr("width"),i.height=+e.attr("height")),a.selectAll(["#"+n.id,"#"+n.idGrid]).select("rect").attr("width",o).attr("height",s),a.select("#"+n.idXAxis).select("rect").call(t.setXAxisClipPath.bind(t)),a.select("#"+n.idYAxis).select("rect").call(t.setYAxisClipPath.bind(t)),n.idSubchart&&a.select("#"+n.idSubchart).select("rect").attr("width",o).attr("height",i.height)}},getCurrentPadding:function(){const t=this;return{top:t.getCurrentPaddingTop(),bottom:t.getCurrentPaddingBottom(),left:t.getCurrentPaddingLeft(),right:t.getCurrentPaddingRight()}},getResettedPadding:function(t){var e=this;const n=this.config,i=Vo(t);let r=i?0:{};return!1===n.padding?i||Object.keys(t).forEach(function(i){o(this,e),r[i]=Qo(n.data_labels)||!1===n.data_labels||"top"!==i?0:t[i]}.bind(this)):r=t,r},updateSizes:function(t){var e;const n=this,i=n.config,r=n.state,o=n.$el.legend,s=i.axis_rotated,a=n.hasArcType()||r.hasTreemap,c="fit"===(null==(e=i.padding)?void 0:e.mode);t||n.setContainerSize();const u={width:o?n.getLegendWidth():0,height:o?n.getLegendHeight():0};!a&&i.axis_x_show&&i.axis_x_tick_autorotate&&n.updateXAxisTickClip();const l=r.isLegendRight||r.isLegendInset?0:u.height,h=s||a?0:n.getHorizontalAxisHeight("x"),f=i.subchart_axis_x_show&&i.subchart_axis_x_tick_text_show?h:30,d=i.subchart_show&&!a?i.subchart_size_height+f:0,g=n.hasType("gauge")&&i.arc_needle_show&&!i.gauge_fullCircle&&!i.gauge_label_show?10:0,p=n.getCurrentPadding();if(r.margin=!a&&s?{top:n.getHorizontalAxisHeight("y2")+p.top,right:a?0:n.getCurrentPaddingRight(!0),bottom:n.getHorizontalAxisHeight("y")+l+p.bottom,left:d+(a?0:p.left)}:{top:(c?0:4)+p.top,right:a?0:n.getCurrentPaddingRight(!0),bottom:g+h+d+l+p.bottom,left:a?0:p.left},r.margin=n.getResettedPadding(r.margin),r.margin2=s?{top:r.margin.top,right:NaN,bottom:20+l,left:n.state.rotatedPadding.left}:{top:r.current.height-d-l,right:NaN,bottom:f+l,left:r.margin.left},r.margin3={top:0,right:NaN,bottom:0,left:0},null==n.updateSizeForLegend||n.updateSizeForLegend(u),r.width=r.current.width-r.margin.left-r.margin.right,r.height=r.current.height-r.margin.top-r.margin.bottom,r.width<0&&(r.width=0),r.height<0&&(r.height=0),r.width2=s?r.margin.left-r.rotatedPadding.left-r.rotatedPadding.right:r.width,r.height2=s?r.height:r.current.height-r.margin2.top-r.margin2.bottom,r.width2<0&&(r.width2=0),r.height2<0&&(r.height2=0),n.hasArcType()){const t=n.hasType("gauge"),e=i.legend_show&&r.isLegendRight;r.arcWidth=r.width-(e?u.width+10:0),r.arcHeight=r.height-(e&&!t?0:10),t&&!i.gauge_fullCircle&&(r.arcHeight+=r.height-n.getPaddingBottomForGauge()),null==n.updateRadius||n.updateRadius()}r.isLegendRight&&a&&(r.margin3.left=r.arcWidth/2+1.1*r.radiusExpanded)}},_h={setCssRule:function(t,e,n,i){var r=this;const s=this,a=s.config,c=s.state,u=c.cssRule,l=c.style;return a.boost_useCssRule?function(a){var c=this;o(this,r),a.each(function(r){var a=this;o(this,c);const h=i&&(null==i?void 0:i.call(s,r)),f=(t?"."+(Qs.shapes+s.getTargetSelectorSuffix(r.id)):"")+e;e in u&&l.sheet.deleteRule(u[f]),s.state.cssRule[f]=function(t,e,n){var i=this;const r=t.rootSelctor,s=t.sheet,a=r+" "+function(t){return o(this,i),t.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,".")}.bind(this)(e)+" {"+n.join(";")+"}";return s[s.insertRule?"insertRule":"addRule"](a,s.cssRules.length)}(l,f,n.filter(Boolean).map(function(t){return o(this,a),Yo(h)&&-1===t.indexOf(":")?t+": "+h:t||""}.bind(this)))}.bind(this))}.bind(this):function(){o(this,r)}.bind(this)},getStylePropValue:function(t){return this.config.boost_useCssRule?null:Uo(t)?t.bind(this):t}};function Th(t){return"string"==typeof t?new kn([document.querySelectorAll(t)],[document.documentElement]):new kn([fe(t)],En)}function wh(t,e,n,i,r){var o;const s=t.value,a=this.isCandlestickType(t),c=Vo(s)&&s<0||a&&!(null!=(o=this.getCandlestickData(t))&&o._isUp);let u=e.x,l=e.y;return i?"start"===n?(u+=c?0:8,l+=4):"middle"===n?(u+=8,l-=8):"end"===n&&(c&&(u-=8),l+=4):("start"===n?(u+=4,c&&(l+=16)):"middle"===n?l-=8:"end"===n&&(u-=4,c&&(l+=16)),r&&(l+=c?-17:a?13:7)),{x:u,y:l}}function Ah(t,e){var n;const i=this.config.data_labels_position,r=t.id,o=t.index,s=t.value;return null!=(n=Uo(i)?i.bind(this.api)(e,s,r,o,this.$el.text):(r in i?i[r]:i)[e])?n:0}var Sh={opacityForText:function(t){const e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?null:"0"},initText:function(){const t=this.$el;t.main.select("."+Ps.chart).append("g").attr("class",ea.chartTexts).style("pointer-events",t.treemap?"none":null)},updateTargetsForText:function(t){var e=this;const n=this,i=n.getChartClass("Text"),r=n.getClass("texts","id"),s=n.classFocus.bind(n);n.$el.main.select("."+ea.chartTexts).selectAll("."+ea.chartText).data(t).attr("class",function(t){return o(this,e),(""+i(t)+s(t)).trim()}.bind(this)).enter().append("g").style("opacity","0").attr("class",i).call(n.setCssRule(!0," ."+ea.text,["fill","pointer-events:none"],n.updateTextColor)).append("g").attr("class",r)},updateText:function(){var t=this;const e=this,n=e.$el,i=e.$T,r=e.config,s=e.axis,a=e.getClass("text","index"),c=r.data_labels.centered,u=n.main.selectAll("."+ea.texts).selectAll("."+ea.text).data(e.labelishData.bind(e));i(u.exit()).style("fill-opacity","0").remove(),n.text=u.enter().append("text").merge(u).attr("class",a).attr("text-anchor",function(n){o(this,t);let i=r["axis_"+(null==s?void 0:s.getId(n.id))+"_inverted"]?n.value>0:n.value<0;if(e.isCandlestickType(n)){const t=e.getCandlestickData(n);i=!(null!=t&&t._isUp)}else if(e.isTreemapType(n))return c?"middle":"start";return r.axis_rotated?i?"end":"start":"middle"}.bind(this)).style("fill",e.getStylePropValue(e.updateTextColor)).style("fill-opacity","0").each((function(t,n,i){const r=Rn(this);let o=t.value;if(e.isBubbleZType(t))o=e.getBubbleZData(o,"z");else if(e.isCandlestickType(t)){const n=e.getCandlestickData(t);n&&(o=n.close)}o=e.isTreemapType(t)?e.treemapDataLabelFormat(t)(r):e.dataLabelFormat(t.id)(o,t.id,n,i),Vo(o)?this.textContent=o:as(r,o)}))},updateTextColor:function(t){const e=this,n=e.config,i=n.data_labels_colors,r=e.isArcType(t)&&!e.isRadarType(t)||e.isTreemapType(t)?null:e.color(t);let o;if(Yo(i))o=i;else if(ns(i)){o=i[(t.data||t).id]}else Uo(i)&&(o=i.bind(e.api)(r,t));if(e.isCandlestickType(t)&&!Uo(i)){const i=e.getCandlestickData(t);if(null==i||!i._isUp){const e=n.candlestick_color_down;o=ns(e)?e[t.id]:e}}return o||r},updateTextBacgroundColor:function(t){const e=this,n=e.$el,i=e.config.data_labels_backgroundColors;let r="";if(Yo(i)||ns(i)){const o=Yo(i)?"":e.getTargetSelectorSuffix("id"in t?t.id:t.data.id),s=n.defs.select(["filter[id*='labels-bg","']"].join(o));s.size()&&(r="url(#"+s.attr("id")+")")}return r||null},redrawText:function(t,e,n,i){const r=this,o=r.$T,s=r.axis,a=r.config,c=r.state.hasTreemap,u=fs(!0),l=a.axis_rotated,h=a.data_labels.rotate,f=function(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}(h),d=h?"rotate("+h+")":"";return r.$el.text.style("fill",r.getStylePropValue(r.updateTextColor)).attr("filter",r.updateTextBacgroundColor.bind(r)).style("fill-opacity",n?0:r.opacityForText.bind(r)).each((function(n,g){const p=o(c&&this.childElementCount?this.parentNode:this,!(!i||!this.getAttribute("x")),u),v=a["axis_"+(null==s?void 0:s.getId(n.id))+"_inverted"];let y={x:t.bind(this)(n,g),y:e.bind(this)(n,g)};h&&(y=wh.bind(r)(n,y,f,l,v),p.attr("text-anchor",f)),this.childElementCount||h?p.attr("transform","translate("+y.x+" "+y.y+") "+d):p.attr("x",y.x).attr("y",y.y)})),!0},getTextRect:function(t,e){var n=this;const i=this;let r=t.node?t.node():t;/text/i.test(r.tagName)||(r=r.querySelector("text"));const s=r.textContent,a=Ra+"-"+s.replace(/\W/g,"_");let c=i.cache.get(a);return c||(i.$el.svg.append("text").style("visibility","hidden").style("font",Rn(r).style("font")).classed(e,!0).text(s).call(function(t){o(this,n),c=hs(t.node())}.bind(this)).remove(),i.cache.add(a,c)),c},generateXYForText:function(t,e){var n=this;const i=this,r=i.state,s=r.hasRadar,a=r.hasTreemap,c=Object.keys(t),u={},l=e?i.getXForText:i.getYForText;return s&&c.push("radar"),a&&c.push("treemap"),c.forEach(function(e){o(this,n),u[e]=i["generateGet"+vs(e)+"Points"](t[e],!1)}.bind(this)),function(t,e){const n=(i.isAreaType(t)?"area":i.isBarType(t)&&"bar")||i.isCandlestickType(t)&&"candlestick"||i.isRadarType(t)&&"radar"||i.isTreemapType(t)&&"treemap"||"line";return l.call(i,u[n](t,e),t,this)}},getCenteredTextPos:function(t,e,n,i){const r=this,o=r.config,s=o.axis_rotated,a=r.isBarType(t),c=r.isTreemapType(t);if(o.data_labels.centered&&(a||c)){const r=hs(n);if(a){const n=t.value>=0;if(s){const t=(n?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+r.width/2;return n?-t-3:t+2}{const t=(n?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+r.height/2;return n?t:-t-2}}if(c)return"x"===i?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2+r.height/2}return 0},getXForText:function(t,e,n){const i=this,r=i.config,o=i.state,s=r.axis_rotated,a=i.isTreemapType(e);let c=t[0][0];var u;if(i.isCandlestickType(e))s?c=null!=(u=i.getCandlestickData(e))&&u._isUp?t[2][2]+4:t[2][1]-4:c+=(t[1][0]-c)/2;else if(a)c+=r.data_labels.centered?0:5;else if(s){const n=r["axis_"+i.axis.getId(e.id)+"_inverted"],o=i.isBarType(e)?4:6,s=e.value;c=t[2][1],n?c-=o*(s>0?1:-1):c+=o*(s<0?-1:1)}else c=i.hasType("bar")?(t[2][0]+t[0][0])/2:c;if(null===e.value)if(c>o.width){const t=hs(n).width;c=o.width-t}else c<0&&(c=4);return(s||a)&&(c+=i.getCenteredTextPos(e,t,n,"x")),c+Ah.call(this,e,"x")},getYForText:function(t,e,n){const i=this,r=i.axis,o=i.config,s=i.state,a=o.axis_rotated,c=o["axis_"+(null==r?void 0:r.getId(e.id))+"_inverted"],u=i.isBarType(e),l=i.isTreemapType(e),h=o.point_r,f=hs(n);let d,g=e.value,p=3;if(i.isCandlestickType(e))g=i.getCandlestickData(e),a?(d=t[0][0],d+=(t[1][0]-d)/2+p):(d=g&&g._isUp?t[2][2]-p:t[2][1]+4*p,c&&(d+=15*(g._isUp?1:-1)));else if(l)d=t[0][1]+(o.data_labels.centered?0:f.height+5);else if(a)d=(t[0][0]+t[2][0]+.6*f.height)/2;else if(d=t[2][1],Vo(h)&&h>5&&(i.isLineType(e)||i.isScatterType(e))&&(p+=o.point_r/2.3),g<0||0===g&&!s.hasPositiveValue&&s.hasNegativeValue)d+=c?u?-3:-5:f.height+(u?-p:p);else{let t=2*-p;u?t=-p:i.isBubbleType(e)&&(t=p),c&&(t=u?10:15),d+=t}if(null===e.value&&!a){const t=f.height;ds.height&&(d=s.height-4)}return a&&!l||(d+=i.getCenteredTextPos(e,t,n,"y")),d+Ah.call(this,e,"y")},markOverlapped:function(t,e,n){var i=this;const r=e.$el.arcs.selectAll(n),s=r.filter(function(e){return o(this,i),e.data.id!==t}.bind(this)),a=r.filter(function(e){return o(this,i),e.data.id===t}.bind(this)),c=bs(a.node()),u=function(t,e){return o(this,i),Math.sqrt(Math.pow(t,2)+Math.pow(e,2))}.bind(this);a.node()&&s.each((function(){const t=bs(this),e=Rn(this),n=u(c.e,c.f)>u(t.e,t.f)?a:e,i=Math.ceil(Math.abs(c.e-t.e))=(this.config[e+"_label_threshold"]||0)}};function Eh(t,e){void 0===t&&(t="left");const n=Vo(e);let i;return i=t.indexOf("center")>-1?n?e/2:"middle":t.indexOf("right")>-1?n?e:"end":n?0:"start",i}var kh={initTitle:function(){const t=this.config,e=this.$el;if(t.title_text){e.title=e.svg.append("g");as(e.title.append("text").style("text-anchor",Eh(t.title_position)).attr("class",ea.title),t.title_text,[.3,1.5])}},redrawTitle:function(){const t=this,e=t.config,n=t.state.current,i=t.$el.title;if(i){const r=t.yForTitle.call(t);/g/i.test(i.node().tagName)?i.attr("transform","translate("+Eh(e.title_position,n.width)+", "+r+")"):i.attr("x",t.xForTitle.call(t)).attr("y",r)}},xForTitle:function(){const t=this,e=t.config,n=t.state.current,i=e.title_position||"left",r=t.getTextRect(t.$el.title,ea.title).width;let o;return/(right|center)/.test(i)?(o=n.width-r,i.indexOf("right")>=0?o=n.width-r-e.title_padding.right:i.indexOf("center")>=0&&(o=(n.width-r)/2)):o=e.title_padding.left||0,o},yForTitle:function(){const t=this;return(t.config.title_padding.top||0)+t.getTextRect(t.$el.title,ea.title).height},getTitlePadding:function(){return this.yForTitle()+(this.config.title_padding.bottom||0)}},Oh={initTooltip:function(){const t=this,e=t.config,n=t.$el;n.tooltip=Rn(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",na.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip:function(){var t=this;const e=this,n=e.config,i=e.$el,r=e.state,s=r.hasAxis,a=r.hasRadar;if(n.tooltip_init_show){var c,u;const r=!(s&&a);if(null!=(c=e.axis)&&c.isTimeSeries()&&Yo(n.tooltip_init_x)){const t=e.data.targets[0];let i,r;for(n.tooltip_init_x=ks.call(e,n.tooltip_init_x),i=0;(r=t.values[i])&&r.x-n.tooltip_init_x!=0;i++);n.tooltip_init_x=i}let l=e.data.targets.map(function(i){o(this,t);const s=r?0:n.tooltip_init_x;return e.addName(i.values[s])}.bind(this));r&&(l=[l[n.tooltip_init_x]]),i.tooltip.html(e.getTooltipHTML(l,null==(u=e.axis)?void 0:u.getXAxisTickFormat(),e.getDefaultValueFormat(),e.color)),n.tooltip_contents.bindto||i.tooltip.style("top",n.tooltip_init_position.top).style("left",n.tooltip_init_position.left).style("display",null)}},getTooltipHTML:function(){const t=this,e=t.api,n=t.config;return Uo(n.tooltip_contents)?n.tooltip_contents.bind(e).apply(void 0,arguments):t.getTooltipContent.apply(t,arguments)},getTooltipContent:function(t,e,n,i){var r=this;const s=this,a=s.api,c=s.config,u=s.state,l=s.$el;let h=["title","name","value"].map(function(t){o(this,r);const e=c["tooltip_format_"+t];return Uo(e)?e.bind(a):e}.bind(this)),f=h[0],d=h[1],g=h[2];f=f||e,d=d||function(t){return o(this,r),t}.bind(this),g=g||(u.hasTreemap||s.isStackNormalized()?function(t,e){return o(this,r),(100*e).toFixed(2)+"%"}.bind(this):n);const p=c.tooltip_order,v=function(t){return o(this,r),s.axis&&s.isBubbleZType(t)?s.getBubbleZData(t.value,"z"):s.getBaseValue(t)}.bind(this),y=s.levelColor?function(t){return o(this,r),s.levelColor(t.value)}.bind(this):function(t){return o(this,r),i(t)}.bind(this),b=c.tooltip_contents,x=b.template,m=s.mapToTargetIds();if(null===p&&c.data_groups.length){const e=s.orderTargets(s.data.targets).map(function(t){return o(this,r),t.id}.bind(this)).reverse();t.sort(function(t,n){o(this,r);let i=t?t.value:null,s=n?n.value:null;return i>0&&s>0&&(i=t.id?e.indexOf(t.id):null,s=n.id?e.indexOf(n.id):null),i-s}.bind(this))}else/^(asc|desc)$/.test(p)?t.sort(function(t,e){o(this,r);const n=t?v(t):null,i=e?v(e):null;return"asc"===p?n-i:i-n}.bind(this)):Uo(p)&&t.sort(p.bind(a));const _=s.getTooltipContentTemplate(x),T=t.length;let w,A,S,E,k;for(k=0;k'+t+"":""})}if(!A.ratio&&l.arcs&&(S=["arc",s.$el.arcs.select("path."+Ls.arc+"-"+A.id).data()[0]],A.ratio=s.getRatio.apply(s,S)),S=[A.ratio,A.id,A.index,t],E=ss(g.apply(void 0,[v(A)].concat(S))),s.isAreaRangeType(A)){const t=["high","low"].map(function(t){return o(this,r),ss(g.apply(void 0,[s.getRangedData(A,t)].concat(S)))}.bind(this));E="Mid: "+E+" High: "+t[0]+" Low: "+t[1]}else if(s.isCandlestickType(A)){const t=["open","high","low","close","volume"].map(function(t){return o(this,r),ss(g.apply(void 0,[s.getRangedData(A,t,"candlestick")].concat(S)))}.bind(this)),e=t[0],n=t[1],i=t[2],a=t[3],c=t[4];E="Open: "+e+" High: "+n+" Low: "+i+" Close: "+a+(c?" Volume: "+c:"")}else if(s.isBarRangeType(A)){const t=A.value,e=t[0],n=t[1];E=g(e)+" ~ "+g(n)}if(void 0!==E){if(null===A.name)continue;const t=ss(d.apply(void 0,[A.name].concat(S))),e=y(A),n={CLASS_TOOLTIP_NAME:na.tooltipName+s.getTargetSelectorSuffix(A.id),COLOR:x||!s.patterns?e:'',NAME:t,VALUE:E};if(x&&ns(b.text)){const t=m.indexOf(A.id);Object.keys(b.text).forEach(function(e){o(this,r),n[e]=b.text[e][t]}.bind(this))}w+=Es(_[1],n)}}return w+""},getTooltipContentTemplate:function(t){return(t||'\n\t\t\t\t{=TITLE}\n\t\t\t\t{{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}}\n\t\t\t
'+(this.patterns?"{=COLOR}":'')+'{=NAME}{=VALUE}
').replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},setTooltipPosition:function(t,e){var n=this;const i=this,r=i.config,s=i.scale,a=i.state,c=i.$el,u=c.eventRect,l=c.tooltip,h=r.tooltip_contents.bindto,f=l.datum();if(!h&&f){var d,g;const c=us(a.event,null!=e?e:null==u?void 0:u.node()),h={x:c[0],y:c[1]};s.x&&f&&"x"in f&&(h.xAxis=s.x(f.x));const p=f.width,v=void 0===p?0:p,y=f.height,b=void 0===y?0:y,x=null!=(d=null==(g=r.tooltip_position)?void 0:g.bind(i.api)(null!=t?t:JSON.parse(f.current),v,b,null==u?void 0:u.node(),h))?d:i.getTooltipPosition.bind(i)(v,b,h);["top","left"].forEach(function(t){o(this,n);const e=x[t];l.style(t,e+"px"),"left"!==t||f.xPosInPercent||(f.xPosInPercent=e/a.current.width*100)}.bind(this))}},getTooltipPosition:function(t,e,n){var i=this;const r=this,s=r.config,a=r.scale,c=r.state,u=c,l=u.width,h=u.height,f=u.current,d=u.isLegendRight,g=u.inputType,p=r.hasType("gauge")&&!s.gauge_fullCircle,v=c.hasTreemap,y=s.axis_rotated,b=r.getSvgLeft(!0);let x=b+f.width-r.getCurrentPaddingRight();const m=r.getCurrentPaddingLeft(!0);let _=n.x,T=n.y;if(r.hasArcType()){"touch"===g||r.hasType("radar")||(T+=p?h:h/2,_+=(l-(d?r.getLegendWidth():0))/2)}else v||(y?(T=n.xAxis+20,_+=b,x-=b):(T-=5,_=b+m+20+(a.zoom?_:n.xAxis)));if(_+t+15>x&&(_-=y?t-m:t+(v?0:m)),T+e>f.height){T-=p?3*e:e+(v?0:30)}const w={top:T,left:_};return Object.keys(w).forEach(function(t){o(this,i),w[t]<0&&(w[t]=0)}.bind(this)),w},showTooltip:function(t,e){var n=this;const i=this,r=i.config,s=i.$el.tooltip,a=t.filter(function(t){return o(this,n),t&&$o(i.getBaseValue(t))}.bind(this));if(!s||0===a.length||!r.tooltip_show)return;let c=s.datum();const u=JSON.stringify(t);if(!c||c.current!==u){const e=t.concat().sort()[0],n=e.index,o=e.x;rs(r.tooltip_onshow,i.api,t),s.html(i.getTooltipHTML(t,i.axis?i.axis.getXAxisTickFormat():i.categoryName.bind(i),i.getDefaultValueFormat(),i.color)).style("display",null).style("visibility",null).datum(c={index:n,x:o,current:u,width:s.property("offsetWidth"),height:s.property("offsetHeight")}),rs(r.tooltip_onshown,i.api,t),i._handleLinkedCharts(!0,n)}i.setTooltipPosition(a,e)},bindTooltipResizePos:function(){var t=this;const e=this,n=e.resizeFunction,i=e.state,r=e.$el.tooltip;n.add(function(){if(o(this,t),"block"===r.style("display")){const t=i.current,e=r.datum(),n=e.width,o=e.xPosInPercent;let s=t.width/100*o;const a=t.width-(s+n);a<0&&(s+=a),r.style("left",s+"px")}}.bind(this))},hideTooltip:function(t){const e=this,n=e.api,i=e.config,r=e.$el.tooltip;if(r&&"none"!==r.style("display")&&(!i.tooltip_doNotHide||t)){const t=JSON.parse(r.datum().current);rs(i.tooltip_onhide,n,t),r.style("display","none").style("visibility","hidden").datum(null),rs(i.tooltip_onhidden,n,t)}},_handleLinkedCharts:function(t,e){var n=this;const i=this,r=i.charts,s=i.config,a=i.state.event;if(null!=a&&a.isTrusted&&s.tooltip_linked&&r.length>1){const a=s.tooltip_linked_name;r.filter(function(t){return o(this,n),t!==i.api}.bind(this)).forEach(function(i){o(this,n);const r=i.internal,s=r.config,c=r.$el,u=s.tooltip_linked,l=s.tooltip_linked_name,h=Fn.body.contains(c.chart.node());if(u&&a===l&&h){const n=c.tooltip.data()[0],r=e!==(null==n?void 0:n.index);try{i.tooltip[t&&r?"show":"hide"]({index:e})}catch(t){}}}.bind(this))}},updateTooltipOnRedraw:function(t,e){var n=this;const i=this,r=i.config,s=i.$el,a=s.eventRect,c=s.svg,u=s.tooltip,l=i.state,h=l.event,f=l.hasAxis,d=l.hasRadar,g=l.hasTreemap;if("block"===(null==u?void 0:u.style("display"))&&h){var p;const s=null!=t?t:null==(p=d?c:a)?void 0:p.node();if(f||d)if(i.isMultipleX())i.selectRectForMultipleXs(s,!1);else{const t=null!=e?e:i.getDataIndexFromEvent(h);-1===e?i.api.tooltip.hide():(i.selectRectForSingle(s,t),i.setExpand(t,null,!0))}else{const t=h.clientX,e=h.clientY;setTimeout(function(){o(this,n);let r=Fn.elementFromPoint(t,e);const s=Rn(r).datum();if(s){const t=i.hasArcType()?i.convertToArcData(i.updateAngle(s)):null==s?void 0:s.data;g&&(r=c.node()),t&&i.showTooltip([t],r)}else i.api.tooltip.hide()}.bind(this),r.transition_duration)}}}},Mh={getTranslate:function(t,e){void 0===e&&(e=0);const n=this,i=n.config,r=n.state,o=i.axis_rotated;let s,a,c=0;if(e&&/^(x|y2?)$/.test(t)&&(c=n.getAxisSize(t)*e),"main"===t)s=Zo(r.margin.left),a=Zo(r.margin.top);else if("context"===t)s=Zo(r.margin2.left),a=Zo(r.margin2.top);else if("legend"===t)s=r.margin3.left,a=r.margin3.top;else if("x"===t)s=o?-c:0,a=o?0:r.height+c;else if("y"===t)s=o?0:-c,a=o?r.height+c:0;else if("y2"===t)s=o?0:r.width+c,a=o&&c?1-c:0;else if("subX"===t)s=0,a=o?0:r.height2;else if("arc"===t)s=r.arcWidth/2,a=r.arcHeight/2;else if("polar"===t)s=r.arcWidth/2,a=r.arcHeight/2;else if("radar"===t){const t=n.getRadarSize()[0];s=r.width/2-t,a=Zo(r.margin.top)}return"translate("+s+", "+a+")"},transformMain:function(t,e){const n=this,i=n.$el.main,r=n.$T,o=null!=e&&e.axisX?e.axisX:r(i.select("."+Ns.axisX),t),s=null!=e&&e.axisY?e.axisY:r(i.select("."+Ns.axisY),t),a=null!=e&&e.axisY2?e.axisY2:r(i.select("."+Ns.axisY2),t);r(i,t).attr("transform",n.getTranslate("main")),o.attr("transform",n.getTranslate("x")),s.attr("transform",n.getTranslate("y")),a.attr("transform",n.getTranslate("y2")),i.select("."+Ls.chartArcs).attr("transform",n.getTranslate("arc"))},transformAll:function(t,e){const n=this,i=n.config,r=n.state,o=r.hasAxis,s=r.hasTreemap,a=n.$el;s||n.transformMain(t,e),o&&i.subchart_show&&n.transformContext(t,e),a.legend&&n.transformLegend(t)}},Rh={isValidChartType:function(t){return!!(t&&Object.values(jn).indexOf(t)>-1)},setTargetType:function(t,e){var n=this;const i=this,r=i.config,s=i.state.withoutFadeIn;i.mapToTargetIds(t).forEach(function(t){o(this,n),s[t]=e===r.data_types[t],r.data_types[t]=e}.bind(this)),t||(r.data_type=e)},updateTypesElements:function(){var t=this;const e=this,n=e.state.current;Object.keys(jn).forEach(function(i){o(this,t);const r=jn[i],s=e.hasType(r,null,!0),a=n.types.indexOf(r);-1===a&&s?n.types.push(r):a>-1&&!s&&n.types.splice(a,1)}.bind(this)),e.setChartElements()},hasType:function(t,e,n){var i,r=this;void 0===n&&(n=!1);const s=this,a=s.config,c=s.state.current,u=a.data_types,l=e||s.data.targets;let h=!1;return!n&&(null==(i=c.types)?void 0:i.indexOf(t))>-1?h=!0:null!=l&&l.length?l.forEach(function(e){o(this,r);const n=u[e.id];(n===t||!n&&"line"===t)&&(h=!0)}.bind(this)):Object.keys(u).length?Object.keys(u).forEach(function(e){o(this,r),u[e]===t&&(h=!0)}.bind(this)):h=a.data_type===t,h},hasTypeOf:function(t,e,n){var i=this;return void 0===n&&(n=[]),t in Xn&&!Xn[t].filter(function(t){return o(this,i),-1===n.indexOf(t)}.bind(this)).every(function(t){return o(this,i),!this.hasType(t,e)}.bind(this))},isTypeOf:function(t,e){const n=Yo(t)?t:t.id,i=this.config.data_types[n]||this.config.data_type;return es(e)?e.indexOf(i)>=0:i===e},hasPointType:function(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType:function(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge:function(){return this.hasType("gauge")&&"multi"===this.config.gauge_type},isLineType:function(t){const e=Yo(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,Xn.Line)},isStepType:function(t){return this.isTypeOf(t,Xn.Step)},isSplineType:function(t){return this.isTypeOf(t,Xn.Spline)},isAreaType:function(t){return this.isTypeOf(t,Xn.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,Xn.AreaRange)},isBarType:function(t){return this.isTypeOf(t,"bar")},isBubbleType:function(t){return this.isTypeOf(t,"bubble")},isCandlestickType:function(t){return this.isTypeOf(t,"candlestick")},isScatterType:function(t){return this.isTypeOf(t,"scatter")},isTreemapType:function(t){return this.isTypeOf(t,"treemap")},isPieType:function(t){return this.isTypeOf(t,"pie")},isGaugeType:function(t){return this.isTypeOf(t,"gauge")},isDonutType:function(t){return this.isTypeOf(t,"donut")},isPolarType:function(t){return this.isTypeOf(t,"polar")},isRadarType:function(t){return this.isTypeOf(t,"radar")},isArcType:function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint:function(t){const e=this.config,n=e.point_pattern;let i=!1;return i="circle"===(null==t?void 0:t.tagName)||"circle"===e.point_type&&(!n||es(n)&&0===n.length),i},lineData:function(t){return this.isLineType(t)?[t]:[]},arcData:function(t){return this.isArcType(t.data)?[t]:[]},labelishData:function(t){var e=this;return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(function(t){return o(this,e),Vo(t.value)||!!t.value}.bind(this)):[]},barLineBubbleData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}};let Ch=function(){function t(t){this.api=void 0,this.config=void 0,this.cache=void 0,this.$el=void 0,this.state=void 0,this.charts=void 0,this.data={xs:{},targets:[]},this.axis=void 0,this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.color=void 0,this.patterns=void 0,this.levelColor=void 0,this.point=void 0,this.brush=void 0,this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};const e=this;e.api=t,e.config=new ma,e.cache=new Ca;const n=new aa;e.$el=n.getStore("element"),e.state=n.getStore("state"),e.$T=e.$T.bind(e)}var e=t.prototype;return e.$T=function(t,e,n){const i=this.config,r=this.state,o=i.transition_duration,s=i.subchart_show;let a=t;if(a){"tagName"in a&&(a=Rn(a));a=(!1!==e&&o||e)&&(!r.zooming||r.dragging)&&!r.resizing&&r.rendered&&!s?a.transition(n).duration(o):a}return a},e.beforeInit=function(){const t=this;t.callPluginHook("$beforeInit"),rs(t.config.onbeforeinit,t.api)},e.afterInit=function(){const t=this;t.callPluginHook("$afterInit"),rs(t.config.onafterinit,t.api)},e.init=function(){const t=this,e=t.config,n=t.state,i=t.$el,r=e.boost_useCssRule;if(Rs(t),n.hasRadar=!n.hasAxis&&t.hasType("radar"),n.hasTreemap=!n.hasAxis&&t.hasType("treemap"),n.hasAxis=!t.hasArcType()&&!n.hasTreemap,n.datetimeId="bb-"+ +new Date*fs(),r){const t=Fn.createElement("style");t.type="text/css",Fn.head.appendChild(t),n.style={rootSelctor:"."+n.datetimeId,sheet:t.sheet},i.style=t}const o={element:e.bindto,classname:"bb"};ns(e.bindto)&&(o.element=e.bindto.element||"#chart",o.classname=e.bindto.classname||o.classname),i.chart=Uo(o.element.node)?e.bindto.element:Rn(o.element||[]),i.chart.empty()&&(i.chart=Rn(Fn.body.appendChild(Fn.createElement("div")))),i.chart.html("").classed(o.classname,!0).classed(n.datetimeId,r).style("position","relative"),t.initParams(),t.initToRender()},e.initToRender=function(t){var e=this;const n=this,i=n.config,r=n.state,s=n.$el.chart,a=function(){return o(this,e),"none"===s.style("display")||"hidden"===s.style("visibility")}.bind(this),c=i.render.lazy||a(),u=In.MutationObserver;c&&u&&!1!==i.render.observe&&!t&&new u(function(t,i){o(this,e),a()||(i.disconnect(),r.rendered||n.initToRender(!0))}.bind(this)).observe(s.node(),{attributes:!0,attributeFilter:["class","style"]}),c&&!t||n.convertData(i,function(t){o(this,e),n.initWithData(t),n.afterInit()}.bind(this))},e.initParams=function(){var t=this;const e=this,n=e.config,i=e.format,r=e.state,s=n.axis_rotated;if(e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),!1===n.padding&&(n.axis_x_show=!1,n.axis_y_show=!1,n.axis_y2_show=!1,n.subchart_show=!1),e.hasPointType()&&(e.point=e.generatePoint()),r.hasAxis){e.initClip(),i.extraLineClasses=e.generateExtraLineClass(),i.dataTime=n.data_xLocaltime?Y:G,i.axisTime=n.axis_x_localtime?U:V;const r=e.config.zoom_enabled&&"drag"===e.config.zoom_type;i.defaultAxisTime=function(n){o(this,t);const s=e.scale,a=s.x,c=s.zoom,u=r?c:c&&a.orgDomain().toString()!==c.domain().toString(),l=(n.getMilliseconds()?".%L":n.getSeconds()&&".:%S")||n.getMinutes()&&"%I:%M"||n.getHours()&&"%I %p"||1!==n.getDate()&&"%b %d"||u&&1===n.getDate()&&"%b'%y"||n.getMonth()&&"%-m/%-d"||"%Y";return i.axisTime(l)(n)}.bind(this)}r.isLegendRight="right"===n.legend_position,r.isLegendInset="inset"===n.legend_position,r.isLegendTop="top-left"===n.legend_inset_anchor||"top-right"===n.legend_inset_anchor,r.isLegendLeft="top-left"===n.legend_inset_anchor||"bottom-left"===n.legend_inset_anchor,r.rotatedPadding.top=e.getResettedPadding(r.rotatedPadding.top),r.rotatedPadding.right=s&&!n.axis_x_show?0:30,r.inputType=function(t,e){var n=this;const i=In.DocumentTouch,r=In.matchMedia,s=In.navigator;let a=!1;if(e)if(s&&"maxTouchPoints"in s)a=s.maxTouchPoints>0;else if("ontouchmove"in In||i&&Fn instanceof i)a=!0;else if(null!=r&&r("(pointer:coarse)").matches)a=!0;else{const t=s.userAgent;a=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(t)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(t)}return(t&&["any-hover:hover","any-pointer:fine"].some(function(t){return o(this,n),null==r?void 0:r("("+t+")").matches}.bind(this))?"mouse":a&&"touch")||"mouse"}(n.interaction_inputType_mouse,n.interaction_inputType_touch)},e.initWithData=function(t){var e=this;const n=this,i=n.config,r=n.scale,s=n.state,a=n.$el,c=n.org,u=s,l=u.hasAxis,h=u.hasTreemap,f=i.interaction_enabled,d=n.hasType("polar");if(l&&(n.axis=n.getAxisInstance(),i.zoom_enabled&&n.initZoom()),n.data.xs={},n.data.targets=n.convertDataToTargets(t),i.data_filter&&(n.data.targets=n.data.targets.filter(i.data_filter.bind(n.api))),i.data_hide&&n.addHiddenTargetIds(!0===i.data_hide?n.mapToIds(n.data.targets):i.data_hide),i.legend_hide&&n.addHiddenLegendIds(!0===i.legend_hide?n.mapToIds(n.data.targets):i.legend_hide),n.updateSizes(),n.updateScales(!0),l){const t=r.x,e=r.y,o=r.y2,s=r.subX,a=r.subY,u=r.subY2;t&&(t.domain(Ts(n.getXDomain(n.data.targets),!i.axis_x_inverted)),s.domain(t.domain()),c.xDomain=t.domain()),e&&(e.domain(n.getYDomain(n.data.targets,"y")),a.domain(e.domain())),o&&(o.domain(n.getYDomain(n.data.targets,"y2")),u&&u.domain(o.domain()))}if(a.svg=a.chart.append("svg").style("overflow","hidden").style("display","block"),f&&s.inputType){const t="touch"===s.inputType,e=i.onclick,r=i.onover,o=i.onout;a.svg.on("click",(null==e?void 0:e.bind(n.api))||null).on(t?"touchstart":"mouseenter",(null==r?void 0:r.bind(n.api))||null).on(t?"touchend":"mouseleave",(null==o?void 0:o.bind(n.api))||null)}i.svg_classname&&a.svg.attr("class",i.svg_classname);const g=Uo(i.color_tiles)&&n.patterns;(l||g||d||h||i.data_labels_backgroundColors)&&(a.defs=a.svg.append("defs"),l&&["id","idXAxis","idYAxis","idGrid"].forEach(function(t){o(this,e),n.appendClip(a.defs,s.clip[t])}.bind(this)),n.generateDataLabelBackgroundColorFilter(),g&&n.patterns.forEach(function(t){var n=this;return o(this,e),a.defs.append(function(){return o(this,n),t.node}.bind(this))}.bind(this))),n.updateSvgSize(),n.bindResize();const p=a.svg.append("g").classed(Ps.main,!0).attr("transform",h?null:n.getTranslate("main"));var v;(a.main=p,i.subchart_show&&n.initSubchart(),i.tooltip_show&&n.initTooltip(),i.title_text&&n.initTitle(),!h&&i.legend_show&&n.initLegend(),i.data_empty_label_text&&p.append("text").attr("class",ea.text+" "+Ps.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),l&&(i.regions.length&&n.initRegion(),i.clipPath||n.axis.init()),p.append("g").classed(Ps.chart,!0).attr("clip-path",l?s.clip.path:null),n.callPluginHook("$init"),n.initChartElements(),l)&&(f&&(null==n.initEventRect||n.initEventRect()),n.initGrid(),i.clipPath&&(null==(v=n.axis)||v.init()));if(n.updateTargets(n.data.targets),n.updateDimension(),rs(i.oninit,n.api),n.setBackground(),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),i.data_onmin||i.data_onmax){const t=n.getMinMaxData();rs(i.data_onmin,n.api,t.min),rs(i.data_onmax,n.api,t.max)}i.tooltip_show&&n.initShowTooltip(),s.rendered=!0},e.initChartElements=function(){var t=this;const e=this,n=e.state,i=n.hasAxis,r=n.hasRadar,s=n.hasTreemap,a=[];if(i){const n=["bar","bubble","candlestick","line"];e.config.bar_front&&n.push(n.shift()),n.forEach(function(n){o(this,t);const i=vs(n);("line"===n&&e.hasTypeOf(i)||e.hasType(n))&&a.push(i)}.bind(this))}else if(s)a.push("Treemap");else{const t=e.hasType("polar");r||a.push("Arc","Pie"),e.hasType("gauge")?a.push("Gauge"):r?a.push("Radar"):t&&a.push("Polar")}a.forEach(function(n){o(this,t),e["init"+n]()}.bind(this)),ts(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()},e.setChartElements=function(){const t=this.$el,e=t.chart,n=t.svg,i=t.defs,r=t.main,o=t.tooltip,s=t.legend,a=t.title,c=t.grid,u=t.needle,l=t.arcs,h=t.circle,f=t.bar,d=t.candlestick,g=t.line,p=t.area,v=t.text;this.api.$={chart:e,svg:n,defs:i,main:r,tooltip:o,legend:s,title:a,grid:c,arc:l,circles:h,bar:{bars:f},candlestick:d,line:{lines:g,areas:p},needle:u,text:{texts:v}}},e.setBackground=function(){const t=this,e=t.config.background,n=t.state,i=t.$el.svg;if(ts(e)){const t=i.select("g").insert(e.imgUrl?"image":"rect",":first-child");e.imgUrl?t.attr("href",e.imgUrl):e.color&&t.style("fill",e.color).attr("clip-path",n.clip.path),t.attr("class",e.class||null).attr("width","100%").attr("height","100%")}},e.updateTargets=function(t){var e=this;const n=this,i=n.state,r=i.hasAxis,s=i.hasRadar,a=i.hasTreemap,c=function(i){return o(this,e),n["updateTargetsFor"+i](t.filter(n["is"+i+"Type"].bind(n)))}.bind(this);if(n.updateTargetsForText(t),r)["bar","candlestick","line"].forEach(function(t){o(this,e);const i=vs(t);("line"===t&&n.hasTypeOf(i)||n.hasType(t))&&c(i)}.bind(this)),n.updateTargetsForSubchart&&n.updateTargetsForSubchart(t);else if(n.hasArcType(t)){let t="Arc";s?t="Radar":n.hasType("polar")&&(t="Polar"),c(t)}else a&&c("Treemap");const u=n.hasType("bubble")||n.hasType("scatter");u&&(null==n.updateTargetForCircle||n.updateTargetForCircle()),n.filterTargetsToShowAtInit(u)},e.filterTargetsToShowAtInit=function(t){var e=this;void 0===t&&(t=!1);const n=this,i=n.$el.svg,r=n.$T;let s="."+Ps.target;t&&(s+=", ."+js.chartCircles+" > ."+js.circles),r(i.selectAll(s).filter(function(t){return o(this,e),n.isTargetToShow(t.id)}.bind(this))).style("opacity",null)},e.getWithOption=function(t){var e=this;const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};return Object.keys(n).forEach(function(i){o(this,e);let r=n[i];Yo(r)&&(r=n[r]),n[i]=is(t,"with"+i,r)}.bind(this)),n},e.initialOpacity=function(t){const e=this.state.withoutFadeIn;return null!==this.getBaseValue(t)&&e[t.id]?null:"0"},e.bindResize=function(){var t=this;const e=this,n=e.config,i=e.state,r=function(t){var e=this;const n=[];let i;const r=function(){var e=this;r.clear(),!1===t?zn(function(){var t=this;o(this,e),n.forEach(function(e){return o(this,t),e()}.bind(this))}.bind(this),{timeout:200}):i=Ia(function(){var t=this;o(this,e),n.forEach(function(e){return o(this,t),e()}.bind(this))}.bind(this),Vo(t)?t:200)};return r.clear=function(){o(this,e),i&&(Pa(i),i=null)}.bind(this),r.add=function(t){return o(this,e),n.push(t)}.bind(this),r.remove=function(t){return o(this,e),n.splice(n.indexOf(t),1)}.bind(this),r}(n.resize_timer),s=[];s.push(function(){return o(this,t),rs(n.onresize,e.api)}.bind(this)),n.resize_auto&&s.push(function(){o(this,t),i.resizing=!0,n.legend_show&&(e.updateSizes(),e.updateLegend()),e.api.flush(!1)}.bind(this)),s.push(function(){o(this,t),rs(n.onresized,e.api),i.resizing=!1}.bind(this)),s.forEach(function(e){return o(this,t),r.add(e)}.bind(this)),e.resizeFunction=r,In.addEventListener("resize",e.resizeFunction=r)},e.callPluginHook=function(t){for(var e=this,n=arguments.length,i=Array(n>1?n-1:0),r=1;r\n\t\t\t\n\t\t\t\t'+d+"\n\t\t\t\t"+h.replace(/(url\()[^#]+/g,"$1")+"\n\t\t\t";return"data:image/svg+xml;base64,"+Nh(g)}function Fh(t){var e=this;const n=t.getBoundingClientRect(),i=n.left,r=n.top,s=function(t){return o(this,e),t.textContent||t.childElementCount}.bind(this),a=[];return ys(t.querySelectorAll("text")).filter(s).forEach(function(t){var n=this;o(this,e);const c=function(t){var e;o(this,n);const s=In.getComputedStyle(t),a=s.fill,c=s.fontFamily,u=s.fontSize,l=s.textAnchor,h=s.transform,f=function(t,e){const n=e.top,i=e.left,r=t.getBBox(),o=r.x,s=r.y,a=t.getScreenCTM(),c=a.a,u=a.b,l=a.c,h=a.d,f=a.e,d=a.f,g=t.getBoundingClientRect(),p=g.width,v=g.height;return{x:c*o+l*s+f-i,y:u*o+h*s+d-n+(v-Math.round(v/4)),width:p,height:v}}(t,{left:i,top:r}),d=f.x,g=f.y,p=f.width,v=f.height;return(e={})[t.textContent]={x:d,y:g,width:p,height:v,fill:a,fontFamily:c,fontSize:u,textAnchor:l,transform:h},e}.bind(this);if(t.childElementCount>1)return ys(t.querySelectorAll("tspan")).filter(s).forEach(function(t){o(this,n),a.push(c(t))}.bind(this)),[];a.push(c(t))}.bind(this)),a}var jh={export:function(t,e){var n=this;const i=this.internal,r=i.state,s=i.$el,a=s.chart,c=s.svg,u=r.current,l=u.width,h=u.height,f=_s({width:l,height:h,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t),d=zh(a.node(),f,{width:l,height:h}),g=f.preserveFontStyle?Fh(c.node()):[];if(e&&Uo(e)){const t=new Image;t.crossOrigin="Anonymous",t.onload=function(){o(this,n);const i=Fn.createElement("canvas"),r=i.getContext("2d");i.width=f.width||l,i.height=f.height||h,r.drawImage(t,0,0),g.length&&(!function(t,e){var n=this;e.forEach(function(e){var i=this;o(this,n),Object.keys(e).forEach(function(n){var r=this;o(this,i);const s=e[n],a=s.x,c=s.y,u=s.width,l=s.height,h=s.fill,f=s.fontFamily,d=s.fontSize,g=s.transform;if(t.save(),t.font=d+" "+f,t.fillStyle=h,"none"===g)t.fillText(n,a,c);else{const e=g.replace(/(matrix|\(|\))/g,"").split(",");e.splice(4).every(function(t){return o(this,r),0==+t}.bind(this))?(e.push(a+u-u/4),e.push(c-l+l/3)):(e.push(a),e.push(c)),t.transform.apply(t,e),t.fillText(n,0,0)}t.restore()}.bind(this))}.bind(this))}(r,g),g.length=0),e.bind(this)(i.toDataURL(f.mimeType))}.bind(this),t.src=d}return d}},Bh={focus:function(t){var e=this;const n=this.internal,i=n.state,r=n.mapToTargetIds(t),s=n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),s.classed(Gs.focused,!0).classed(Gs.defocused,!1),n.hasArcType()&&!i.hasRadar&&(n.expandArc(r),n.hasType("gauge")&&n.markOverlapped(t,n,"."+$s.gaugeValue)),n.toggleFocusLegend(r,!0),i.focusedTargetIds=r,i.defocusedTargetIds=i.defocusedTargetIds.filter(function(t){return o(this,e),r.indexOf(t)<0}.bind(this))},defocus:function(t){var e=this;const n=this.internal,i=n.state,r=n.mapToTargetIds(t);n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n))).classed(Gs.focused,!1).classed(Gs.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(r),n.hasType("gauge")&&n.undoMarkOverlapped(n,"."+$s.gaugeValue)),n.toggleFocusLegend(r,!1),i.focusedTargetIds=i.focusedTargetIds.filter(function(t){return o(this,e),r.indexOf(t)<0}.bind(this)),i.defocusedTargetIds=r},revert:function(t){const e=this.internal,n=e.config,i=e.state,r=e.$el,o=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(o)).classed(Gs.focused,!1).classed(Gs.defocused,!1),e.hasArcType(null,["polar"])&&e.unexpandArc(o),n.legend_show&&(e.showLegend(o.filter(e.isLegendToShow.bind(e))),r.legend.selectAll(e.selectorLegends(o)).filter((function(){return Rn(this).classed(Gs.legendItemFocused)})).classed(Gs.legendItemFocused,!1)),i.focusedTargetIds=[],i.defocusedTargetIds=[]}};var Xh={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},$h={load:function(t){var e=this;const n=this.internal,i=n.config;t.xs&&n.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(n){o(this,e),i.data_classes[n]=t.classes[n]}.bind(this)),"categories"in t&&n.axis.isCategorized()&&(i.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(n){o(this,e),i.data_axes[n]=t.axes[n]}.bind(this)),"colors"in t&&Object.keys(t.colors).forEach(function(n){o(this,e),i.data_colors[n]=t.colors[n]}.bind(this)),"unload"in t&&!1!==t.unload?n.unload(n.mapToTargetIds(!0===t.unload?null:t.unload),function(){var i=this;o(this,e),zn(function(){return o(this,i),n.loadFromArgs(t)}.bind(this))}.bind(this)):n.loadFromArgs(t)},unload:function(t){var e=this;const n=this.internal;let i=t||{};Qo(i)&&this.tooltip.hide(),es(i)?i={ids:i}:Yo(i)&&(i={ids:[i]});const r=n.mapToTargetIds(i.ids);n.unload(r,function(){o(this,e),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.cache.remove(r),oc.call(n,i.done,i.resizeAfter)}.bind(this))}};function Uh(t,e,n){var i=this;const r=this.internal,s=r.mapToTargetIds(e),a=r.state.hiddenTargetIds.map(function(t){return o(this,i),s.indexOf(t)>-1&&t}.bind(this)).filter(Boolean);r.state.toggling=!0,r[(t?"remove":"add")+"HiddenTargetIds"](s);const c=r.$el.svg.selectAll(r.selectorTargets(s)),u=t?null:"0";t&&a.length&&(c.style("display",null),rs(r.config.data_onshown,this,a)),r.$T(c).style("opacity",u,"important").call(os,function(){o(this,i),t||0!==a.length||(c.style("display","none"),rs(r.config.data_onhidden,this,s)),c.style("opacity",u)}.bind(this)),n.withLegend&&r[(t?"show":"hide")+"Legend"](s),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),r.state.toggling=!1}var Yh={show:function(t,e){void 0===e&&(e={}),Uh.call(this,!0,t,e)},hide:function(t,e){void 0===e&&(e={}),Uh.call(this,!1,t,e)},toggle:function(t,e){var n=this;void 0===e&&(e={});const i=this.internal,r={show:[],hide:[]};i.mapToTargetIds(t).forEach(function(t){return o(this,n),r[i.isTargetToShow(t)?"hide":"show"].push(t)}.bind(this)),r.show.length&&this.show(r.show,e),r.hide.length&&setTimeout(function(){return o(this,n),this.hide(r.hide,e)}.bind(this),0)}};const Vh={show:function(t){var e=this;const n=this.internal,i=n.$el,r=n.config,s=n.state,a=s.eventReceiver,c=s.hasTreemap,u=s.inputType;let l,h;if(t.mouse&&(h=t.mouse),t.data){var f;const e=t.data,o=null==(f=n.getYScaleById(e.id))?void 0:f(e.value);if(c&&e.id)a.rect=i.main.select(""+n.selectorTarget(e.id,void 0,"rect"));else if(n.isMultipleX())h=[n.xx(e),o];else{var d,g;r.tooltip_grouped||(h=[0,o]),l=null!=(d=e.index)?d:n.hasArcType()&&e.id?null==(g=n.getArcElementByIdOrIndex(e.id))?void 0:g.datum().index:n.getIndexByX(e.x)}}else Ho(t.x)?l=n.getIndexByX(t.x):Ho(t.index)&&(l=t.index);("mouse"===u?["mouseover","mousemove"]:["touchstart"]).forEach(function(t){o(this,e),n.dispatchEvent(t,l,h)}.bind(this))},hide:function(){var t=this;const e=this.internal,n=e.state.inputType,i=e.$el.tooltip,r=null==i?void 0:i.datum();if(r){const i=JSON.parse(r.current)[0].index;("mouse"===n?["mouseout"]:["touchend"]).forEach(function(n){o(this,t),e.dispatchEvent(n,i)}.bind(this))}"touch"===n&&e.callOverOutForTouch(),e.hideTooltip(!0),null==e.hideGridFocus||e.hideGridFocus(),null==e.unexpandCircles||e.unexpandCircles(),null==e.expandBarTypeShapes||e.expandBarTypeShapes(!1)}};var Gh={tooltip:Vh};let Hh=function t(e){this.plugins=[],this.internal=void 0;const n=new Ch(this);this.internal=n,function t(e,n,i){var r=this;Object.keys(e).forEach(function(s){o(this,r);const a=Uo(e[s]),c=n!==i,u=ts(e[s]),l=u&&Object.keys(e[s]).length>0;n[s]=a&&(!c&&l||c)?e[s].bind(i):u&&!a?{}:e[s],l&&t(e[s],n[s],i)}.bind(this))}(t.prototype,this,this),Ih.call(n,e),n.beforeInit(),n.init()};function Wh(t,e,n){var i=this;const r=t.config,s=function(t,n){o(this,i);const s=Vo(n)?n:!1===n?void 0:null;null!==s&&(r["axis_"+t+"_"+e]=s)}.bind(this);Ho(n)&&(Jo(n)?Object.keys(n).forEach(function(t){o(this,i),s(t,n[t])}.bind(this)):(Vo(n)||!1===n)&&["y","y2"].forEach(function(t){o(this,i),s(t,n)}.bind(this)),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function qh(t,e){const n=t.config;return{x:n["axis_x_"+e],y:n["axis_y_"+e],y2:n["axis_y2_"+e]}}ps(Hh.prototype,[Ph,{color:function(t){return this.internal.color(t)}},Dh,jh,Bh,Xh,$h,Yh,Gh]);const Zh={labels:function(t){var e=this;const n=this.internal;let i;return t&&(Object.keys(t).forEach(function(i){o(this,e),n.axis.setLabelText(i,t[i])}.bind(this)),n.axis.updateLabels()),["x","y","y2"].forEach(function(t){o(this,e);const r=n.axis.getLabelText(t);r&&(i||(i={}),i[t]=r)}.bind(this)),i},min:function(t){const e=this.internal;return $o(t)||!1===t?Wh(e,"min",t):qh(e,"min")},max:function(t){const e=this.internal;return $o(t)||!1===t?Wh(e,"max",t):qh(e,"max")},range:function(t){const e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};{const n=t.min,i=t.max;Ho(i)&&e.max(i),Ho(n)&&e.min(n)}}};var Kh={axis:Zh};function Jh(t,e){const n=this.internal,i=n.config,r=i.transition_duration&&Os(),o="grid_"+e+"_lines";return t?(i[o]=t,n.updateGrid(),n.redrawGrid(r),i[o]):i[o]}function Qh(t,e){return Jh.bind(this)(this.internal.config["grid_"+e+"_lines"].concat(t||[]),e)}function tf(t,e){this.internal.removeGridLines(t,e)}const ef=function(t){return Jh.bind(this)(t,"x")};ps(ef,{add:function(t){return Qh.bind(this)(t,"x")},remove:function(t){return tf.bind(this)(t,!0)}});const nf=function(t){return Jh.bind(this)(t,"y")};ps(nf,{add:function(t){return Qh.bind(this)(t,"y")},remove:function(t){return tf.bind(this)(t,!1)}});var rf={xgrids:ef,ygrids:nf},of={groups:function(t){const e=this.internal,n=e.config;return Go(t)||(n.data_groups=t,e.redraw()),n.data_groups}};function sf(t,e){void 0===e&&(e=!1);const n=this.internal,i=n.config,r=i.transition_duration&&Os();return t?(i.regions=e?i.regions.concat(t):t,n.updateRegion(),n.redrawRegion(r),e?i.regions:t):i.regions}const af=function(t){return sf.bind(this)(t)};ps(af,{add:function(t){return sf.bind(this)(t,!0)},remove:function(t){var e=this;const n=this.internal,i=n.config,r=n.$T,s=t||{},a=is(s,"classes",[Ks.region]);let c=n.$el.main.select("."+Ks.regions).selectAll(a.map(function(t){return o(this,e),"."+t}.bind(this)));return r(c).style("opacity","0").remove(),c=i.regions,Object.keys(s).length?(c=c.filter(function(t){var n=this;o(this,e);let i=!1;return!t.class||(t.class.split(" ").forEach(function(t){o(this,n),a.indexOf(t)>=0&&(i=!0)}.bind(this)),!i)}.bind(this)),i.regions=c):i.regions=[],c}});var cf={regions:af},uf={x:function(t){const e=this.internal,n=e.axis,i=e.data,r=n.isCustomX()&&n.isCategorized();return es(t)&&(r?this.categories(t):(e.updateTargetX(i.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),r?this.categories():i.xs},xs:function(t){const e=this.internal;return ns(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},lf={flow:function(t){var e=this;const n=this.internal;let i;(t.json||t.rows||t.columns)&&n.convertData(t,function(r){o(this,e),i=r,function(){var e=this;let r,s,a,c=0,u=0;if(n.state.redrawing||!i||!Os())return;const l=[],h=n.getMaxDataCount(),f=n.convertDataToTargets(i,!0),d=n.axis.isTimeSeries();n.data.targets.forEach(function(t){o(this,e);let n=!1;for(let e=0;e1?g.values[g.values.length-1].x-p.x:p.x-n.getXDomain(n.data.targets)[0]:1,r=[p.x-s,p.x]);r&&n.updateXDomain(null,!0,!0,!1,r),n.updateTargets(n.data.targets),n.redraw({flow:{index:p.index,length:c,duration:$o(t.duration)?t.duration:n.config.transition_duration,done:t.done,orgDataCount:h},withLegend:!0,withTransition:h>1,withTrimXDomain:!1,withUpdateXAxis:!0})}()}.bind(this))}};function hf(t){return t}var ff=1,df=2,gf=3,pf=4,vf=1e-6;function yf(t){return"translate("+t+",0)"}function bf(t){return"translate(0,"+t+")"}function xf(t){var e=this;return function(n){return o(this,e),+t(n)}.bind(this)}function mf(t,e){var n=this;return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),function(i){return o(this,n),+t(i)+e}.bind(this)}function _f(){return!this.__axis}function Tf(t,e){var n=[],i=null,r=null,o=6,s=6,a=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=t===ff||t===pf?-1:1,l=t===pf||t===df?"x":"y",h=t===ff||t===gf?yf:bf;function f(f){var d=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,g=null==r?e.tickFormat?e.tickFormat.apply(e,n):hf:r,p=Math.max(o,0)+a,v=e.range(),y=+v[0]+c,b=+v[v.length-1]+c,x=(e.bandwidth?mf:xf)(e.copy(),c),m=f.selection?f.selection():f,_=m.selectAll(".domain").data([null]),T=m.selectAll(".tick").data(d,e).order(),w=T.exit(),A=T.enter().append("g").attr("class","tick"),S=T.select("line"),E=T.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(A),S=S.merge(A.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),E=E.merge(A.append("text").attr("fill","currentColor").attr(l,u*p).attr("dy",t===ff?"0em":t===gf?"0.71em":"0.32em")),f!==m&&(_=_.transition(f),T=T.transition(f),S=S.transition(f),E=E.transition(f),w=w.transition(f).attr("opacity",vf).attr("transform",(function(t){return isFinite(t=x(t))?h(t+c):this.getAttribute("transform")})),A.attr("opacity",vf).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:x(t))+c)}))),w.remove(),_.attr("d",t===pf||t===df?s?"M"+u*s+","+y+"H"+c+"V"+b+"H"+u*s:"M"+c+","+y+"V"+b:s?"M"+y+","+u*s+"V"+c+"H"+b+"V"+u*s:"M"+y+","+c+"H"+b),T.attr("opacity",1).attr("transform",(function(t){return h(x(t)+c)})),S.attr(l+"2",u*o),E.attr(l,u*p).text(g),m.filter(_f).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===df?"start":t===pf?"end":"middle"),m.each((function(){this.__axis=x}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),f):i&&i.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(o=s=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(s=+t,f):s},f.tickPadding=function(t){return arguments.length?(a=+t,f):a},f.offset=function(t){return arguments.length?(c=+t,f):c},f}function wf(t){return Tf(ff,t)}function Af(t){return Tf(df,t)}function Sf(t){return Tf(gf,t)}function Ef(t){return Tf(pf,t)}let kf=function(){function t(t){this.owner=void 0,this.config=void 0,this.scale=void 0;const e=pl(),n=t.config,i=t.params;this.owner=t,this.config=n,this.scale=e,!n.noTransition&&i.config.transition_duration||(n.withoutTransition=!0),n.range=this.scaleExtent((i.orgXScale||e).range())}t.getSizeFor1Char=function(t){var e=this;const n={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call(function(t){o(this,e);try{const e=t.node().getBBox(),i=e.width,r=e.height;i&&r&&(n.w=i,n.h=r)}catch(t){}finally{t.text("")}}.bind(this)),this.getSizeFor1Char=function(){return o(this,e),n}.bind(this),n};var e=t.prototype;return e.getTickTransformSetter=function(t){var e=this;const n=this.config,i="x"===t?function(t){return o(this,e),"translate("+(t+n.tickOffset)+",0)"}.bind(this):function(t){return o(this,e),"translate(0,"+t+")"}.bind(this);return function(t,n){var r=this;o(this,e),t.attr("transform",function(t){return o(this,r),$o(t)?i(Math.ceil(n(t))):null}.bind(this))}.bind(this)},e.scaleExtent=function(t){const e=t[0],n=t[t.length-1];return e0?s:1,a]).range(t.range());c=e.ticks();for(let t=a.toFixed().length;c.length>15;t--)c=e.ticks(t);c.splice(0,1,s),c.splice(c.length-1,1,a)}c=c.map(function(t){o(this,n);return Yo(t)&&Vo(t)&&!isNaN(t)&&Math.round(10*t)/10||t}.bind(this))}else{for(let t=Math.ceil(s);t0&&c[0]>0&&c.unshift(c[0]-(c[1]-c[0]))}return c},e.copyScale=function(){const t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t.type=this.scale.type,t},e.textFormatted=function(t){const e=this.config.tickFormat,n=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,i=e?e(n):n;return Ho(i)?i:""},e.transitionise=function(t){const e=this.config;let n=t;if(e.withoutTransition)n=t.interrupt();else if(e.transition||!this.owner.params.noTransition)try{n=t.transition(e.transition)}catch(t){}return n},t}(),Of=function(){function t(t){void 0===t&&(t={}),this.helper=void 0,this.config=void 0,this.params=void 0,this.g=void 0,this.generatedTicks=void 0;const e={innerTickSize:6,outerTickSize:t.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:t.noTransition};e.tickLength=Math.max(e.innerTickSize,0)+e.tickPadding,this.config=e,this.params=t,this.helper=new kf(this)}var e=t.prototype;return e.create=function(t){const e=this,n=e.config,i=e.helper,r=e.params,s=i.scale,a=n.orient,c=this.splitTickText.bind(e),u=/^(left|right)$/.test(a),l=/^(top|bottom)$/.test(a),h=i.getTickTransformSetter(l?"x":"y"),f=h===i.axisX?"y":"x",d=/^(top|left)$/.test(a)?-1:1,g=r.tickTextRotate;this.config.range=s.rangeExtent?s.rangeExtent():i.scaleExtent((r.orgXScale||s).range());const p=n.innerTickSize,v=n.tickLength,y=n.range,b=r.id,x=b&&/^(x|y|y2)$/.test(b)?r.config["axis_"+b+"_tick_text_position"]:{x:0,y:0},m="subX"===b?"subchart_axis_x":"axis_"+b,_=r.config[m+"_show"],T=!!_&&r.config[m+"_tick_show"],w=!!_&&r.config[m+"_tick_text_show"];let A;t.each((function(){var t=this;const b=Rn(this);let m=this.__chart__||s,_=i.copyScale();A=b,this.__chart__=_,n.tickOffset=r.isCategory?Math.ceil((_(1)-_(0))/2):0;const S=b.selectAll(".domain").data([0]);if(S.enter().append("path").attr("class","domain").merge(S).attr("d",function(){o(this,t);const e=n.outerTickSize*d;return l?"M"+y[0]+","+e+"V0H"+y[1]+"V"+e:"M"+e+","+y[0]+"H0V"+y[1]+"H"+e}.bind(this)),T||w){const s=n.tickValues||i.generateTicks(_,u);e.generatedTicks=s;let y=b.selectAll(".tick").data(s,_);const A=y.enter().insert("g",".domain").attr("class","tick"),S=y.exit().remove();y=A.merge(y),T&&A.append("line"),w&&A.append("text");const E=kf.getSizeFor1Char(y),k=[];let O=y.select("text").selectAll("tspan").data(function(e,n){var a=this;o(this,t);const l=r.tickMultiline?c(e,_,s,u,E.w):es(i.textFormatted(e))?i.textFormatted(e).concat():[i.textFormatted(e)];return k[n]=l.length,l.map(function(t){return o(this,a),{index:n,splitted:t}}.bind(this))}.bind(this));O.exit().remove(),O=O.enter().append("tspan").merge(O).text(function(e){return o(this,t),e.splitted}.bind(this)),O.attr("x",l?0:v*d).attr("dx",function(){o(this,t);let e=0;return/(top|bottom)/.test(a)&&g&&(e=8*Math.sin(Math.PI*(g/180))*("top"===a?-1:1)),e+(x.x||0)}.bind(this)()).attr("dy",function(e,n){o(this,t);let i=0;return"top"!==a&&(i=E.h,0===n&&(i=u?-((k[e.index]-1)*(E.h/2)-3):0===x.y?".71em":0)),Vo(i)&&x.y?i+x.y:i||".71em"}.bind(this));const M=y.select("line"),R=y.select("text");if(A.select("line").attr(f+"2",p*d),A.select("text").attr(f,v*d),e.setTickLineTextPosition(M,R),r.tickTitle){const e=R.select("title");(e.empty()?R.append("title"):e).text(function(e){return o(this,t),r.tickTitle[e]}.bind(this))}if(_.bandwidth){const e=_,n=e.bandwidth()/2;m=function(i){return o(this,t),e(i)+n}.bind(this),_=m}else m.bandwidth?m=_:h(S,_);y=r.owner.state.flowing?i.transitionise(y):r.owner.$T(y),h(A,m),h(y.style("opacity",null),_)}})),this.g=A},e.getGeneratedTicks=function(t){var e,n=this;const i=(null==(e=this.generatedTicks)?void 0:e.length)-1;let r=this.generatedTicks;if(i>t){const e=Math.round(i/t+.1);r=this.generatedTicks.map(function(t,i){return o(this,n),i%e==0?t:null}.bind(this)).filter(function(t){return o(this,n),null!==t}.bind(this)).splice(0,t)}return r},e.getTickXY=function(){const t=this.config,e={x:0,y:0};return this.params.isCategory&&(e.x=t.tickCentered?0:t.tickOffset,e.y=t.tickCentered?t.tickOffset:0),e},e.getTickSize=function(t){const e=this.helper.scale,n=this.config,i=n,r=i.innerTickSize,o=i.range,s=e(t)+(n.tickCentered?0:n.tickOffset);return o[0]0?0:1]:"middle"}.bind(this),f=function(t){return o(this,n),t?"rotate("+t+")":null}.bind(this),d=function(t){o(this,n);return t?11.5-2.5*(t/("bottom"===a?15:23))*(t>0?1:-1):c}.bind(this);switch(a){case"bottom":t.attr("x1",i.x).attr("x2",i.x).attr("y2",this.getTickSize.bind(this)),e.attr("x",0).attr("y",d(l)).style("text-anchor",h(l)).attr("transform",f(l));break;case"top":t.attr("x2",0).attr("y2",-s),e.attr("x",0).attr("y",2*-d(l)).style("text-anchor",h(l)).attr("transform",f(l));break;case"left":t.attr("x2",-s).attr("y1",i.y).attr("y2",i.y),e.attr("x",-c).attr("y",u).style("text-anchor","end");break;case"right":t.attr("x2",s).attr("y2",0),e.attr("x",c).attr("y",0).style("text-anchor","start")}},e.splitTickText=function(t,e,n,i,r){const o=this.params,s=this.helper.textFormatted(t),a=Yo(s)&&s.indexOf("\n")>-1?s.split("\n"):[];if(a.length)return a;if(es(s))return s;let c=o.tickWidth;return(!c||c<=0)&&(c=i?95:o.isCategory?Math.ceil(o.isInverted?e(n[0])-e(n[1]):e(n[1])-e(n[0]))-12:110),function t(e,n){let i,o,s;for(let a=1;a=0||n.hasRadar},e.isCustomX=function(){const t=this.owner.config;return!this.isTimeSeries()&&(t.data_x||ts(t.data_xs))},e.isTimeSeries=function(t){return void 0===t&&(t="x"),"timeseries"===this.owner.config["axis_"+t+"_type"]},e.isLog=function(t){return void 0===t&&(t="x"),"log"===this.owner.config["axis_"+t+"_type"]},e.isTimeSeriesY=function(){return this.isTimeSeries("y")},e.getAxisType=function(t){void 0===t&&(t="x");let e="linear";return this.isTimeSeries(t)?e=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(t)&&(e="log"),e},e.init=function(){var t=this;const e=this.owner,n=e.config,i=e.$el,r=i.main,s=i.axis,a=e.state.clip,c=n.axis_rotated,u=["x","y"];n.axis_y2_show&&u.push("y2"),u.forEach(function(i){var u=this;o(this,t);const l=this.getAxisClassName(i),h=Ns["axis"+i.toUpperCase()+"Label"];s[i]=r.append("g").attr("class",l).attr("clip-path",function(){o(this,u);let t=null;return"x"===i?t=a.pathXAxis:"y"===i&&(t=a.pathYAxis),t}.bind(this)).attr("transform",e.getTranslate(i)).style("visibility",n["axis_"+i+"_show"]?null:"hidden"),s[i].append("text").attr("class",h).attr("transform",["rotate(-90)",null]["x"===i?+!c:+c]).style("text-anchor",function(){return o(this,u),this.textAnchorForAxisLabel(i)}.bind(this)),this.generateAxes(i)}.bind(this))},e.setOrient=function(){const t=this.owner.config,e=t.axis_rotated,n=t.axis_y_inner,i=t.axis_y2_inner;this.orient={x:e?"left":"bottom",y:e?n?"top":"bottom":n?"right":"left",y2:e?i?"bottom":"top":i?"left":"right",subX:e?"left":"bottom"}},e.generateAxes=function(t){var e=this;const n=this.owner,i=n.config,r=[],s=i["axis_"+t+"_axes"],a=i.axis_rotated;let c;"x"===t?c=a?Ef:Sf:"y"===t?c=a?Sf:Ef:"y2"===t&&(c=a?wf:Af),s.length&&s.forEach(function(i){var s=this;o(this,e);const a=i.tick||{},u=n.scale[t].copy();i.domain&&u.domain(i.domain),r.push(c(u).ticks(a.count).tickFormat(Uo(a.format)?a.format.bind(n.api):function(t){return o(this,s),t}.bind(this)).tickValues(a.values).tickSizeOuter(!1===a.outer?0:6))}.bind(this)),this.axesList[t]=r},e.updateAxes=function(){var t=this;const e=this.owner,n=e.config,i=e.$el.main,r=e.$T;Object.keys(this.axesList).forEach(function(s){var a=this;o(this,t);const c=n["axis_"+s+"_axes"],u=e.scale[s].copy(),l=u.range();this.axesList[s].forEach(function(t,h){var f=this;o(this,a);const d=t.scale().range();l.every(function(t,e){return o(this,f),t===d[e]}.bind(this))||t.scale().range(l);const g=this.getAxisClassName(s)+"-"+(h+1);let p=i.select("."+g.replace(/\s/,"."));p.empty()?p=i.append("g").attr("class",g).style("visibility",n["axis_"+s+"_show"]?null:"hidden").call(t):(c[h].domain&&u.domain(c[h].domain),r(p).call(t.scale(u))),p.attr("transform",e.getTranslate(s,h+1))}.bind(this))}.bind(this))},e.setAxis=function(t,e,n,i){const r=this.owner;"subX"!==t&&(this.tick[t]=this.getTickValues(t)),this[t]=this.getAxis(t,e,n,!("x"!==t||!(r.scale.zoom||r.config.subchart_show||r.state.resizing))||i)},e.getAxis=function(t,e,n,i,r){var s=this;const a=this.owner,c=a.config,u=/^(x|subX)$/.test(t),l=u?"x":t,h=u&&this.isCategorized(),f=this.orient[t],d=r?0:a.getAxisTickRotate(l);let g;if(u)g="subX"===t?a.format.subXAxisTick:a.format.xAxisTick;else{const e=c["axis_"+t+"_tick_format"];Uo(e)&&(g=e.bind(a.api))}let p=this.tick[l];const v=_s({outerTick:n,noTransition:i,config:c,id:t,tickTextRotate:d,owner:a},u&&{isCategory:h,isInverted:c.axis_x_inverted,tickMultiline:c.axis_x_tick_multiline,tickWidth:c.axis_x_tick_width,tickTitle:h&&c.axis_x_tick_tooltip&&a.api.categories(),orgXScale:a.scale.x});u||(v.tickStepSize=c["axis_"+l+"_tick_stepSize"]);const y=new Of(v).scale(u&&a.scale.zoom||e).orient(f);if(u&&this.isTimeSeries()&&p&&!Uo(p)){const t=ks.bind(a);p=p.map(function(e){return o(this,s),t(e)}.bind(this))}else!u&&this.isTimeSeriesY()&&(y.ticks(c.axis_y_tick_time_value),p=null);p&&y.tickValues(p),y.tickFormat(g||!u&&a.isStackNormalized()&&function(t){return o(this,s),t+"%"}.bind(this)),h&&(y.tickCentered(c.axis_x_tick_centered),Qo(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1));const b=c["axis_"+l+"_tick_count"];return b&&y.ticks(b),y},e.updateXAxisTickValues=function(t,e){const n=this.owner,i=n.config,r=i.axis_x_tick_fit;let o,s=i.axis_x_tick_count;if((r||s&&r)&&(o=n.mapTargetsToUniqueXs(t),this.isCategorized()&&s>o.length&&(s=o.length),o=this.generateTickValues(o,s,this.isTimeSeries())),e)e.tickValues(o);else if(this.x){var a;this.x.tickValues(o),null==(a=this.subX)||a.tickValues(o)}return o},e.getId=function(t){const e=this.owner,n=e.config,i=e.scale;let r=n.data_axes[t];return r&&i[r]||(r="y"),r},e.getXAxisTickFormat=function(t){var e=this;const n=this.owner,i=n.config,r=n.format,s=t&&i.subchart_axis_x_tick_format||i.axis_x_tick_format,a=this.isTimeSeries(),c=this.isCategorized();let u;return s?Uo(s)?u=s.bind(n.api):a&&(u=function(t){return o(this,e),t?r.axisTime(s)(t):""}.bind(this)):u=a?r.defaultAxisTime:c?n.categoryName:function(t){return o(this,e),t<0?t.toFixed(0):t}.bind(this),Uo(u)?function(t){return o(this,e),u.apply(n,c?[t,n.categoryName(t)]:[t])}.bind(this):u},e.getTickValues=function(t){const e=this.owner,n=e.config["axis_"+t+"_tick_values"],i=e[t+"Axis"];return(Uo(n)?n.call(e.api):n)||(i?i.tickValues():void 0)},e.getLabelOptionByAxisId=function(t){return this.owner.config["axis_"+t+"_label"]},e.getLabelText=function(t){const e=this.getLabelOptionByAxisId(t);return Yo(e)?e:e?e.text:null},e.setLabelText=function(t,e){const n=this.owner.config,i=this.getLabelOptionByAxisId(t);Yo(i)?n["axis_"+t+"_label"]=e:i&&(i.text=e)},e.getLabelPosition=function(t,e){var n=this;const i=this.owner.config.axis_rotated,r=this.getLabelOptionByAxisId(t),s=Jo(r)&&r.position?r.position:e[+!i],a=function(t){return o(this,n),!!~s.indexOf(t)}.bind(this);return{isInner:a("inner"),isOuter:a("outer"),isLeft:a("left"),isCenter:a("center"),isRight:a("right"),isTop:a("top"),isMiddle:a("middle"),isBottom:a("bottom")}},e.getAxisLabelPosition=function(t){return this.getLabelPosition(t,"x"===t?["inner-top","inner-right"]:["inner-right","inner-top"])},e.getLabelPositionById=function(t){return this.getAxisLabelPosition(t)},e.xForAxisLabel=function(t){const e=this.owner,n=e.state,i=n.width,r=n.height,o=this.getAxisLabelPosition(t);let s=o.isMiddle?-r/2:0;return this.isHorizontal(e,"x"!==t)?s=o.isLeft?0:o.isCenter?i/2:i:o.isBottom&&(s=-r),s},e.dxForAxisLabel=function(t){const e=this.owner,n=this.getAxisLabelPosition(t);let i=n.isBottom?"0.5em":"0";return this.isHorizontal(e,"x"!==t)?i=n.isLeft?"0.5em":n.isRight?"-0.5em":"0":n.isTop&&(i="-0.5em"),i},e.textAnchorForAxisLabel=function(t){const e=this.owner,n=this.getAxisLabelPosition(t);let i=n.isMiddle?"middle":"end";return this.isHorizontal(e,"x"!==t)?i=n.isLeft?"start":n.isCenter?"middle":"end":n.isBottom&&(i="start"),i},e.dyForAxisLabel=function(t){const e=this.owner,n=e.config,i=n.axis_rotated,r=this.getAxisLabelPosition(t).isInner,o=n["axis_"+t+"_tick_rotate"]?e.getHorizontalAxisHeight(t):0,s=this.getMaxTickWidth(t);let a;if("x"===t){const t=n.axis_x_height;a=i?r?"1.2em":-25-s:r?"-0.5em":t?t-10:o?o-10:"3em"}else a={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[t],a=i?r?a[0]:o?o*("y2"===t?-1:1)-a[1]:a[2]:r?a[3]:(a[4]+(n["axis_"+t+"_inner"]?0:s+a[4]))*("y"===t?-1:1);return a},e.getMaxTickWidth=function(t,e){var n=this;const i=this.owner,r=i.config,s=i.state.current,a=i.$el,c=a.svg,u=a.chart,l=s.maxTickWidths[t];let h=0;if(e||!r["axis_"+t+"_show"]||l.size>0&&0===i.filterTargetsToShow().length)return l.size;if(c){const e=/^y2?$/.test(t),s=i.filterTargetsToShow(i.data.targets),a=i.scale[t].copy().domain(i["get"+(e?"Y":"X")+"Domain"](s,t)),c=a.domain(),f=c[0]===c[1]&&c.every(function(t){return o(this,n),t>0}.bind(this)),d=es(l.domain)&&l.domain[0]===l.domain[1]&&l.domain.every(function(t){return o(this,n),t>0}.bind(this));if(f||d)return l.size;l.domain=c,e||l.ticks.splice(0);const g=this.getAxis(t,a,!1,!1,!0),p=r["axis_"+t+"_tick_count"];!r["axis_"+t+"_tick_values"]&&p&&g.tickValues(this.generateTickValues(c,p,e?this.isTimeSeriesY():this.isTimeSeries())),e||this.updateXAxisTickValues(s,g);const v=u.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0");g.create(v),v.selectAll("text").each((function(t,n){const i=this.getBoundingClientRect().width;h=Math.max(h,i),e||(l.ticks[n]=i)})),v.remove()}return h>0&&(l.size=h),l.size},e.getXAxisTickTextY2Overflow=function(t){const e=this.owner,n=e.axis,i=e.config,r=e.state,o=e.getAxisTickRotate("x");if((n.isCategorized()||n.isTimeSeries())&&i.axis_x_tick_fit&&!i.axis_x_tick_culling&&!i.axis_x_tick_multiline&&o>0&&o<90){const n=r.current.width-e.getCurrentPaddingLeft(),i=this.getXAxisTickMaxOverflow(o,n-t),s=Math.max(0,i)+t;return Math.min(s,n/2)}return 0},e.getXAxisTickMaxOverflow=function(t,e){const n=this.owner,i=n.axis,r=n.config,o=n.state,s=i.isTimeSeries(),a=o.current.maxTickWidths.x.ticks,c=a.length,u=o.axis.x.padding,l=u.left,h=u.right;let f=0;const d=c-(s&&r.axis_x_tick_fit?.5:0);for(let n=0;n2){const e=this.isCategorized(),o=i-2,s=t[0],a=t[t.length-1];let c;r=[s];for(let t=0;t=f)&&(d=!0,e.preventDefault())}.bind(this);s.on("touchstart",function(n){o(this,t),i.event=n,e.updateEventRect()}.bind(this)).on("touchstart.eventRect touchmove.eventRect",function(n){if(o(this,t),i.event=n,!s.empty()&&s.classed(Vs.eventRect)){if(i.dragging||i.flowing||e.hasArcType()||n.touches.length>1)return;g(n),c(s.node())}else u()}.bind(this),!0).on("touchend.eventRect",function(n){o(this,t),i.event=n,!s.empty()&&s.classed(Vs.eventRect)&&(e.hasArcType()||!e.toggleShape||i.cancelClick)&&i.cancelClick&&(i.cancelClick=!1)}.bind(this),!0),a.on("touchstart",function(e){o(this,t),i.event=e;const n=e.target;n&&n!==s.node()&&u()}.bind(this))},updateEventRect:function(t,e){var n=this;void 0===e&&(e=!1);const i=this.state,r=this.$el,s=i,a=s.eventReceiver,c=s.width,u=s.height,l=s.rendered,h=s.resizing,f=t||r.eventRect,d=function(){o(this,n),a&&(a.rect=f.node().getBoundingClientRect())}.bind(this);(!l||h||e)&&(f.attr("x",0).attr("y",0).attr("width",c).attr("height",u),l&&!e||f.classed(Vs.eventRect,!0)),d()},updateEventRectData:function(){var t=this;const e=this,n=e.config,i=e.scale,r=e.state,s=i.zoom||i.x,a=n.axis_rotated;let c,u,l,h;if(e.isMultipleX())c=0,u=0,l=r.width,h=r.height;else{let n,i;if(e.axis.isCategorized())n=e.getEventRectWidth(),i=function(e){return o(this,t),s(e.x)-n/2}.bind(this);else{const c=function(n){let i=n.index;return o(this,t),{prev:e.getPrevX(i),next:e.getNextX(i)}}.bind(this);n=function(e){var n=this;o(this,t);const i=c(e),u=s.domain();let l;return null===i.prev&&null===i.next?l=a?r.height:r.width:null===i.prev?l=(s(i.next)+s(e.x))/2:null===i.next?l=s(u[1])-(s(i.prev)+s(e.x))/2:(Object.keys(i).forEach(function(t,e){var r;o(this,n),i[t]=null!=(r=i[t])?r:u[e]}.bind(this)),l=Math.max(0,(s(i.next)-s(i.prev))/2)),l}.bind(this),i=function(e){o(this,t);const n=c(e);let i;return i=null===n.prev&&null===n.next?0:null===n.prev?s(s.domain()[0]):(s(e.x)+s(n.prev))/2,i}.bind(this)}c=a?0:i,u=a?i:0,l=a?r.width:n,h=a?n:r.height}const f=r.eventReceiver,d=function(e,n){return o(this,t),Uo(e)?e(n):e}.bind(this);f.coords.splice(f.data.length),f.data.forEach(function(e,n){o(this,t),f.coords[n]={x:d(c,e),y:d(u,e),w:d(l,e),h:d(h,e)}}.bind(this))},selectRectForSingle:function(t,e){var n=this;const i=this,r=i.config,s=i.$el,a=s.main,c=s.circle,u=r.data_selection_enabled,l=r.data_selection_grouped,h=r.data_selection_isselectable,f=r.tooltip_grouped,d=i.getAllValuesOnIndex(e);if(f&&(i.showTooltip(d,t),null==i.showGridFocus||i.showGridFocus(d),!u||l))return;c||a.selectAll("."+Ps.EXPANDED+":not(."+Qs.shape+"-"+e+")").classed(Ps.EXPANDED,!1);const g=a.selectAll("."+Qs.shape+"-"+e).classed(Ps.EXPANDED,!0).style("cursor",h?"pointer":null).filter((function(t){return i.isWithinShape(this,t)}));g.empty()&&!f&&(null==i.hideGridFocus||i.hideGridFocus(),i.hideTooltip(),l||i.setExpand(e)),g.call(function(r){var s=this;o(this,n);const a=r.data();u&&(l||null!=h&&h.bind(i.api)(a))&&(t.style.cursor="pointer"),f||(i.showTooltip(a,t),null==i.showGridFocus||i.showGridFocus(a),null==i.unexpandCircles||i.unexpandCircles(),r.each(function(t){return o(this,s),i.setExpand(e,t.id)}.bind(this)))}.bind(this))},selectRectForMultipleXs:function(t,e){var n=this;void 0===e&&(e=!0);const i=this,r=i.config,s=i.state,a=i.filterTargetsToShow(i.data.targets);if(s.dragging||i.hasArcType(a))return;const c=us(s.event,t),u=i.findClosestFromTargets(a,c);if(!e||!s.mouseover||u&&u.id===s.mouseover.id||(r.data_onout.call(i.api,s.mouseover),s.mouseover=void 0),!u)return void i.unselectRect();const l=(i.isBubbleType(u)||i.isScatterType(u)||!r.tooltip_grouped?[u]:i.filterByX(a,u.x)).map(function(t){return o(this,n),i.addName(t)}.bind(this));i.showTooltip(l,t),i.setExpand(u.index,u.id,!0),i.showGridFocus(l);const h=i.dist(u,c);(i.isBarType(u.id)||h-1?s.data[i]:null}.bind(this);a.on("mouseover",function(t){o(this,e),r.event=t,n.updateEventRect()}.bind(this)).on("mousemove",(function(e){const o=t(e);if(r.event=e,!o)return;let a=o.index;const c=i.line_step_type;if(i.line_step_tooltipMatch&&n.hasType("step")&&/^step\-(before|after)$/.test(c)){const t=n.scale.zoom||n.scale.x,i=n.axis.xs[a],r=t.invert(us(e,this)[0]);"step-after"===c&&ri&&(a+=1)}const u=i.tooltip_grouped&&a===s.currentIdx;r.dragging||r.flowing||n.hasArcType()||u?u&&n.setTooltipPosition():(a!==s.currentIdx&&(n.setOverOut(!1,s.currentIdx),s.currentIdx=a),-1===a?n.unselectRect():n.selectRectForSingle(this,a),n.setOverOut(-1!==a,a))})).on("mouseout",function(t){o(this,e),r.event=t,i&&!n.hasArcType()&&-1!==s.currentIdx&&(n.unselectRect(),n.setOverOut(!1,s.currentIdx),s.currentIdx=-1)}.bind(this))}return a},clickHandlerForSingleX:function(t,e){const n=e,i=n.config,r=n.state,o=n.$el.main;if(!t||n.hasArcType()||r.cancelClick)return void(r.cancelClick&&(r.cancelClick=!1));const s=t.index;o.selectAll("."+Qs.shape+"-"+s).each((function(t){(i.data_selection_grouped||n.isWithinShape(this,t))&&(null==n.toggleShape||n.toggleShape(this,t,s),i.data_onclick.bind(n.api)(t,this))}))},generateEventRectsForMultipleXs:function(t){var e=this;const n=this,i=n.state;t.on("click",(function(t){i.event=t,n.clickHandlerForMultipleXS.bind(this)(n)})),"mouse"===i.inputType&&t.on("mouseover mousemove",(function(t){i.event=t,n.selectRectForMultipleXs(this)})).on("mouseout",function(t){o(this,e),i.event=t,n.config&&!n.hasArcType()&&n.unselectRect()}.bind(this))},clickHandlerForMultipleXS:function(t){const e=t,n=e.config,i=e.state,r=e.filterTargetsToShow(e.data.targets);if(e.hasArcType(r))return;const o=us(i.event,this),s=e.findClosestFromTargets(r,o);s&&(e.isBarType(s.id)||e.dist(s,o)1&&(i=i[n[1]]),null!=(e=i)&&e.size()&&(c[t]=i)}.bind(this)),e.hideGridFocus(),e.setFlowList(c,t)}},setFlowList:function(t,e){var n=this;const i=this,r=e.flow,s=e.targets,a=r,c=a.duration,u=void 0===c?e.duration:c,l=a.index,h=a.length,f=a.orgDataCount,d=i.getFlowTransform(s,f,l,h),g=La();let p;g.add(Object.keys(t).map(function(e){var r=this;return o(this,n),p=t[e].transition().ease(If).duration(u),p="axis.x"===e?p.call(function(t){o(this,r),i.axis.x.setTransition(t).create(t)}.bind(this)):"region.list"===e?p.filter(i.isRegionOnX).attr("transform",d):p.attr("transform",d),p}.bind(this))),p.call(g,function(){o(this,n),i.cleanUpFlow(t,e)}.bind(this))},cleanUpFlow:function(t,e){var n=this;const i=this,r=i.config,s=i.state,a=i.$el.svg,c=r.axis_rotated,u=e.flow,l=e.shape,h=e.xv,f=l.pos,d=f.cx,g=f.cy,p=f.xForText,v=f.yForText,y=u,b=y.done,x=void 0===b?function(){o(this,n)}.bind(this):b,m=y.length;m&&(["circle","text","shape","eventRect"].forEach(function(t){o(this,n);const e=[];for(let n=0;n=0?"":Fn.URL.split("#")[0])+"#"+t+")"},appendClip:function(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath:function(t){const e=this.config,n=this.state,i=n.margin,r=n.width,o=n.height,s=e.axis_rotated,a=Math.max(30,i.left)-(s?0:20),c=s?-(1+a):-(a-1),u=-Math.max(15,i.top),l=s?i.left+20:r+10+a,h=(s?i.top+o+10:i.bottom)+20;t.attr("x",c).attr("y",u).attr("width",l).attr("height",h)},setYAxisClipPath:function(t){var e;const n=this.config,i=this.state,r=i.margin,o=i.width,s=i.height,a=n.axis_rotated,c=Math.max(30,r.left)-(a?20:0),u=n.axis_y_inner,l=u&&!a?n.axis_y_label.text?-20:-1:a?-(1+c):-(c-1),h=-(a?20:r.top),f=(a?o+15+c:r.left+20)+(u?20:0),d=(a?r.bottom+("fit"===(null==(e=n.padding)?void 0:e.mode)?10:0):r.top+s)+10;t.attr("x",l).attr("y",h).attr("width",f).attr("height",d)},updateXAxisTickClip:function(){const t=this,e=t.config,n=t.state,i=n.clip,r=n.xAxisHeight,o=t.$el.defs,s=t.getHorizontalAxisHeight("x");if(o&&!i.idXAxisTickTexts){const e=i.id+"-xaxisticktexts";t.appendClip(o,e),i.pathXAxisTickTexts=t.getClipPath(i.idXAxisTickTexts),i.idXAxisTickTexts=e}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&s!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=s},setXAxisTickClipWidth:function(){const t=this,e=t.config,n=t.state.current.maxTickWidths,i=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&i){const e=Math.sin(Math.PI/180*Math.abs(i));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/e}else n.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){const t=this.state,e=t.clip,n=t.current,i=this.$el.svg;i&&i.select("#"+e.idXAxisTickTexts+" rect").attr("width",n.maxTickWidths.x.clipPath).attr("height",30)}},Df=void 0;const Nf=function(t){return o(this,Df),$o(t.position)||"end"}.bind(void 0),zf=function(t){return o(this,Df),"start"===t.position?4:"middle"===t.position?0:-4}.bind(void 0);function Ff(t,e,n){var i=this;return function(r){o(this,i);let s=t?0:e;return"start"===r.position?s=t?-n:0:"middle"===r.position&&(s=(t?-n:e)/2),s}.bind(this)}function jf(t,e){"grid"===e&&t.each((function(){var t=this;const e=Rn(this);["x1","x2","y1","y2"].forEach(function(n){return o(this,t),e.attr(n,Math.ceil(+e.attr(n)))}.bind(this))}))}var Bf={hasGrid:function(){var t=this;const e=this.config;return["x","y"].some(function(n){return o(this,t),e["grid_"+n+"_show"]||e["grid_"+n+"_lines"].length}.bind(this))},initGrid:function(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines:function(){const t=this,e=t.config,n=t.state.clip,i=t.$el;(e.grid_x_lines.length||e.grid_y_lines.length)&&(i.gridLines.main=i.main.insert("g","."+Ps.chart+(e.grid_lines_front?" + *":"")).attr("clip-path",n.pathGrid).attr("class",Hs.grid+" "+Hs.gridLines),i.gridLines.main.append("g").attr("class",Hs.xgridLines),i.gridLines.main.append("g").attr("class",Hs.ygridLines),i.gridLines.x=Th([]))},updateXGrid:function(t){var e=this;const n=this,i=n.config,r=n.scale,s=n.state,a=n.$el,c=a.main,u=a.grid,l=i.axis_rotated,h=n.generateGridData(i.grid_x_type,r.x),f=n.axis.isCategorized()?n.axis.x.tickOffset():0,d=function(t){return o(this,e),(r.zoom||r.x)(t)+f*(l?-1:1)}.bind(this);s.xgridAttr=l?{x1:0,x2:s.width,y1:d,y2:d}:{x1:d,x2:d,y1:0,y2:s.height},u.x=c.select("."+Hs.xgrids).selectAll("."+Hs.xgrid).data(h),u.x.exit().remove(),u.x=u.x.enter().append("line").attr("class",Hs.xgrid).merge(u.x),t||u.x.each((function(){var t=this;const e=Rn(this);Object.keys(s.xgridAttr).forEach(function(n){var i=this;o(this,t),e.attr(n,s.xgridAttr[n]).style("opacity",function(){return o(this,i),e.attr(l?"y1":"x1")===(l?s.height:0)?"0":null}.bind(this))}.bind(this))}))},updateYGrid:function(){var t=this;const e=this,n=e.axis,i=e.config,r=e.scale,s=e.state,a=e.$el,c=a.grid,u=a.main,l=i.axis_rotated,h=function(e){return o(this,t),Math.ceil(r.y(e))}.bind(this),f=n.y.getGeneratedTicks(i.grid_y_ticks)||e.scale.y.ticks(i.grid_y_ticks);c.y=u.select("."+Hs.ygrids).selectAll("."+Hs.ygrid).data(f),c.y.exit().remove(),c.y=c.y.enter().append("line").attr("class",Hs.ygrid).merge(c.y),c.y.attr("x1",l?h:0).attr("x2",l?h:s.width).attr("y1",l?0:h).attr("y2",l?s.height:h),jf(c.y,"grid")},updateGrid:function(){const t=this,e=t.$el,n=e.grid;e.gridLines.main||t.initGridLines(),n.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines:function(t){var e=this;const n=this,i=n.config,r=n.$el,s=r.gridLines,a=r.main,c=n.$T,u=i.axis_rotated;i["grid_"+t+"_show"]&&n["update"+t.toUpperCase()+"Grid"]();let l=a.select("."+Hs[t+"gridLines"]).selectAll("."+Hs[t+"gridLine"]).data(i["grid_"+t+"_lines"]);c(l.exit()).style("opacity","0").remove();const h=l.enter().append("g");h.append("line").style("opacity","0"),l=h.merge(l),l.each((function(t){const e=Rn(this);e.select("text").empty()&&t.text&&e.append("text").style("opacity","0")})),c(l.attr("class",function(n){return o(this,e),(Hs[t+"gridLine"]+" "+(n.class||"")).trim()}.bind(this)).select("text").attr("text-anchor",Nf).attr("transform",function(){return o(this,e),"x"===t?u?null:"rotate(-90)":u?"rotate(-90)":null}.bind(this)).attr("dx",zf).attr("dy",-5)).text((function(t){var e;return null!=(e=t.text)?e:this.remove()})),s[t]=l},redrawGrid:function(t){const e=this,n=e.config.axis_rotated,i=e.state,r=i.width,o=i.height,s=e.$el.gridLines,a=e.$T,c=e.xv.bind(e),u=e.yv.bind(e);let l=s.x.select("line"),h=s.x.select("text"),f=s.y.select("line"),d=s.y.select("text");return l=a(l,t).attr("x1",n?0:c).attr("x2",n?r:c).attr("y1",n?c:0).attr("y2",n?c:o),h=a(h,t).attr("x",Ff(!n,r,o)).attr("y",c),f=a(f,t).attr("x1",n?u:0).attr("x2",n?u:r).attr("y1",n?0:u).attr("y2",n?o:u),d=a(d,t).attr("x",Ff(n,r,o)).attr("y",u),[l.style("opacity",null),h.style("opacity",null),f.style("opacity",null),d.style("opacity",null)]},initFocusGrid:function(){const t=this,e=t.config,n=t.state.clip,i=t.$el,r=e.grid_front,o="."+(r&&i.gridLines.main?Hs.gridLines:Ps.chart)+(r?" + *":""),s=i.main.insert("g",o).attr("clip-path",n.pathGrid).attr("class",Hs.grid);i.grid.main=s,e.grid_x_show&&s.append("g").attr("class",Hs.xgrids),e.grid_y_show&&s.append("g").attr("class",Hs.ygrids),e.interaction_enabled&&e.grid_focus_show&&(s.append("g").attr("class",Gs.xgridFocus).append("line").attr("class",Gs.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&s.append("g").attr("class",Gs.ygridFocus).append("line").attr("class",Gs.ygridFocus))},showGridFocus:function(t){var e=this;const n=this,i=n.config,r=n.state,s=r.width,a=r.height,c=i.axis_rotated,u=n.$el.main.selectAll("line."+Gs.xgridFocus+", line."+Gs.ygridFocus),l=(t||[u.datum()]).filter(function(t){return o(this,e),t&&$o(n.getBaseValue(t))}.bind(this));if(!i.tooltip_show||0===l.length||n.hasType("bubble")||n.hasArcType())return;const h=i.grid_focus_edge&&!i.tooltip_grouped,f=n.xx.bind(n);u.style("visibility",null).data(l.concat(l)).each((function(t){var e=this;const i=Rn(this),r={x:f(t),y:n.getYScaleById(t.id)(t.value)};let u;if(i.classed(Gs.xgridFocus))u=c?[null,r.x,h?r.y:s,r.x]:[r.x,h?r.y:null,r.x,a];else{const e="y2"===n.axis.getId(t.id);u=c?[r.y,h&&!e?r.x:null,r.y,h&&e?r.x:a]:[h&&e?r.x:null,r.y,h&&!e?r.x:s,r.y]}["x1","y1","x2","y2"].forEach(function(t,n){return o(this,e),i.attr(t,u[n])}.bind(this))})),jf(u,"grid"),null==n.showCircleFocus||n.showCircleFocus(t)},hideGridFocus:function(){const t=this,e=t.state,n=e.inputType,i=e.resizing,r=t.$el.main;"mouse"!==n&&i||(r.selectAll("line."+Gs.xgridFocus+", line."+Gs.ygridFocus).style("visibility","hidden"),null==t.hideCircleFocus||t.hideCircleFocus())},updateGridFocus:function(){const t=this,e=t.state,n=e.inputType,i=e.width,r=e.height,o=e.resizing,s=t.$el.grid.main.select("line."+Gs.xgridFocus);if("touch"===n)s.empty()?o&&(null==t.showCircleFocus||t.showCircleFocus()):t.showGridFocus();else{const e=t.config.axis_rotated;s.attr("x1",e?0:-10).attr("x2",e?i:-10).attr("y1",e?-10:0).attr("y2",e?-10:r)}return!0},generateGridData:function(t,e){var n=this;const i=this,r=i.$el.main.select("."+Ns.axisX).selectAll(".tick").size();let s=[];if("year"===t){const t=i.getXDomain().map(function(t){return o(this,n),t.getFullYear()}.bind(this)),e=t[0],r=t[1];for(let t=e;t<=r;t++)s.push(new Date(t+"-01-01 00:00:00"))}else s=e.ticks(10),s.length>r&&(s=s.filter(function(t){return o(this,n),(t+"").indexOf(".")<0}.bind(this)));return s},getGridFilterToRemove:function(t){var e=this;return t?function(n){var i=this;o(this,e);let r=!1;return(es(t)?t.concat():[t]).forEach(function(t){o(this,i),("value"in t&&n.value===t.value||"class"in t&&n.class===t.class)&&(r=!0)}.bind(this)),r}.bind(this):function(){return o(this,e),!0}.bind(this)},removeGridLines:function(t,e){var n=this;const i=this,r=i.config,s=i.$T,a=i.getGridFilterToRemove(t),c=function(t){return o(this,n),!a(t)}.bind(this),u=e?Hs.xgridLines:Hs.ygridLines,l=e?Hs.xgridLine:Hs.ygridLine;s(i.$el.main.select("."+u).selectAll("."+l).filter(a)).style("opacity","0").remove();const h="grid_"+(e?"x":"y")+"_lines";r[h]=r[h].filter(c)}},Xf={initRegion:function(){const t=this.$el;t.region.main=t.main.insert("g",":first-child").attr("clip-path",this.state.clip.path).attr("class",Ks.regions)},updateRegion:function(){const t=this,e=t.config,n=t.$el.region,i=t.$T;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);const r=n.main.selectAll("."+Ks.region).data(e.regions);i(r.exit()).style("opacity","0").remove();const o=r.enter().append("g");o.append("rect").style("fill-opacity","0"),n.list=o.merge(r).attr("class",t.classRegion.bind(t)),n.list.each((function(t){var e;Rn(this).select("text").empty()&&null!=(e=t.label)&&e.text&&Rn(this).append("text").style("opacity","0")}))},redrawRegion:function(t){var e=this;const n=this,i=n.$el.region,r=n.$T;let s=i.list.select("rect"),a=i.list.selectAll("text");return s=r(s,t).attr("x",n.regionX.bind(n)).attr("y",n.regionY.bind(n)).attr("width",n.regionWidth.bind(n)).attr("height",n.regionHeight.bind(n)),a=r(a,t).attr("transform",function(t){var i;o(this,e);const r=null!=(i=t.label)?i:{},s=r.x,a=void 0===s?0:s,c=r.y,u=void 0===c?0:c,l=r.rotated,h=void 0!==l&&l;return"translate("+(n.regionX.bind(n)(t)+a)+", "+(n.regionY.bind(n)(t)+u)+")"+(h?" rotate(-90)":"")}.bind(this)).attr("text-anchor",function(t){var n;return o(this,e),null!=(n=t.label)&&n.rotated?"end":null}.bind(this)).attr("dy","1em").style("fill",function(t){var n,i;return o(this,e),null!=(n=null==(i=t.label)?void 0:i.color)?n:null}.bind(this)).text(function(t){var n;return o(this,e),null==(n=t.label)?void 0:n.text}.bind(this)),[s.style("fill-opacity",function(t){return o(this,e),$o(t.opacity)?t.opacity:null}.bind(this)).on("end",(function(){Rn(this.parentNode).selectAll("rect:not([x])").remove()})),a.style("opacity",null)]},getRegionXY:function(t,e){const n=this,i=n.config,r=n.scale,o=i.axis_rotated,s="x"===t;let a,c="start",u=0;return"y"===e.axis||"y2"===e.axis?(s||(c="end"),(s?o:!o)&&c in e&&(a=r[e.axis],u=a(e[c]))):(s?!o:o)&&c in e&&(a=r.zoom||r.x,u=a(n.axis.isTimeSeries()?ks.call(n,e[c]):e[c])),u},regionX:function(t){return this.getRegionXY("x",t)},regionY:function(t){return this.getRegionXY("y",t)},getRegionSize:function(t,e){const n=this,i=n.config,r=n.scale,o=n.state,s=i.axis_rotated,a="width"===t,c=n[a?"regionX":"regionY"](e);let u,l="end",h=o[t];return"y"===e.axis||"y2"===e.axis?(a||(l="start"),(a?s:!s)&&l in e&&(u=r[e.axis],h=u(e[l]))):(a?!s:s)&&l in e&&(u=r.zoom||r.x,h=u(n.axis.isTimeSeries()?ks.call(n,e[l]):e[l])),hs.height/2&&(g=s.height/2)),g+(i.axis.getLabelPositionById(t).isInner?0:10)+("y2"!==t||l?0:-10)},getEventRectWidth:function(){const t=this.config,e=this.axis,n=t.axis_x_inverted,i=e.x.tickInterval();return Math.max(0,n?Math.abs(i):i)},getAxisTickRotate:function(t){const e=this,n=e.axis,i=e.config,r=e.state,o=e.$el;let s=i["axis_"+t+"_tick_rotate"];if("x"===t){const t=n.isCategorized()||n.isTimeSeries();if(i.axis_x_tick_fit&&t){const t=i.axis_x_tick_count,n=r.current.maxTickWidths.x.ticks.length;let o=0;if(t?o=t>n?n:t:n&&(o=n),o!==r.axis.x.tickCount){const t=e.data.targets;r.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")],o)}r.axis.x.tickCount=o}o.svg&&i.axis_x_tick_fit&&!i.axis_x_tick_multiline&&!i.axis_x_tick_culling&&i.axis_x_tick_autorotate&&t&&(s=e.needToRotateXAxisTickTexts()?i.axis_x_tick_rotate:0)}return s},needToRotateXAxisTickTexts:function(){const t=this,e=t.state,n=e.axis,i=e.current.width-t.getCurrentPaddingLeft(!1)-t.getCurrentPaddingRight(),r=n.x.tickCount+n.x.padding.left+n.x.padding.right;return t.axis.getMaxTickWidth("x")>(r?i/r:0)}},Uf={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},Yf={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]};function Vf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Gf(t){for(var e,n=1;n1&&(i.axis_x_categories[t]=e,n.redraw()),i.axis_x_categories[t]},categories:function(t){const e=this.internal,n=e.config;return arguments.length?(n.axis_x_categories=t,e.redraw(),n.axis_x_categories):n.axis_x_categories}},lf,rf,of,cf,uf],qf=[Mf,Lf,Cf,Pf,Bf,Xf,$f],Zf=[{data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},Hf,{grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0}];var Kf,Jf,Qf,td,ed,nd,id,rd,od,sd,ad,cd,ud,ld;Array.prototype.slice;function hd(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function fd(t){return function(){return t}}function dd(t,e){return et?1:e>=t?0:NaN}function gd(t){return t}function pd(t,e){return e||(e=t.slice(0)),t.raw=e,t}const vd=Math.PI,yd=2*vd,bd=1e-6,xd=yd-bd;function md(t){this._+=t[0];for(let e=1,n=t.length;e=0))throw new Error("invalid digits: "+t);if(e>15)return md;const n=Math.pow(10,e);return function(t){this._+=t[0];for(let e=1,i=t.length;ebd)if(Math.abs(l*a-c*u)>bd&&r){let f=n-o,d=i-s,g=a*a+c*c,p=Math.sqrt(g),v=Math.sqrt(h),y=r*Math.tan((vd-Math.acos((g+h-(f*f+d*d))/(2*p*v)))/2),b=y/v,x=y/p;Math.abs(b-1)>bd&&this._append(rd||(rd=pd(["L",",",""])),t+b*u,e+b*l),this._append(od||(od=pd(["A",",",",0,0,",",",",",""])),r,r,+(l*f>u*d),this._x1=t+x*a,this._y1=e+x*c)}else this._append(id||(id=pd(["L",",",""])),this._x1=t,this._y1=e);else;},e.arc=function(t,e,n,i,r,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error("negative radius: "+n);let s=n*Math.cos(i),a=n*Math.sin(i),c=t+s,u=e+a,l=1^o,h=o?i-r:r-i;null===this._x1?this._append(sd||(sd=pd(["M",",",""])),c,u):(Math.abs(this._x1-c)>bd||Math.abs(this._y1-u)>bd)&&this._append(ad||(ad=pd(["L",",",""])),c,u),n&&(h<0&&(h=h%yd+yd),h>xd?this._append(cd||(cd=pd(["A",",",",0,1,",",",",","A",",",",0,1,",",",",",""])),n,n,l,t-s,e-a,n,n,l,this._x1=c,this._y1=u):h>bd&&this._append(ud||(ud=pd(["A",",",",0,",",",",",",",""])),n,n,+(h>=vd),l,this._x1=t+n*Math.cos(r),this._y1=e+n*Math.sin(r)))},e.rect=function(t,e,n,i){this._append(ld||(ld=pd(["M",",","h","v","h","Z"])),this._x0=this._x1=+t,this._y0=this._y1=+e,n=+n,+i,-n)},e.toString=function(){return this._},t}();function Td(t){var e=this;let n=3;return t.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError("invalid digits: "+e);n=t}return t},function(){return o(this,e),new _d(n)}.bind(this)}function wd(t){return t.innerRadius}function Ad(t){return t.outerRadius}function Sd(t){return t.startAngle}function Ed(t){return t.endAngle}function kd(t){return t&&t.padAngle}function Od(t,e,n,i,r,o,s){var a=t-n,c=e-i,u=(s?o:-o)/Bl(a*a+c*c),l=u*c,h=-u*a,f=t+l,d=e+h,g=n+l,p=i+h,v=(f+g)/2,y=(d+p)/2,b=g-f,x=p-d,m=b*b+x*x,_=r-o,T=f*p-g*d,w=(x<0?-1:1)*Bl(zl(0,_*_*m-T*T)),A=(T*x-b*w)/m,S=(-T*b-x*w)/m,E=(T*x+b*w)/m,k=(-T*b+x*w)/m,O=A-v,M=S-y,R=E-v,C=k-y;return O*O+M*M>R*R+C*C&&(A=E,S=k),{cx:A,cy:S,x01:-l,y01:-h,x11:A*(r/_-1),y11:S*(r/_-1)}}function Md(){var t=wd,e=Ad,n=fd(0),i=null,r=Sd,o=Ed,s=kd,a=null,c=Td(u);function u(){var u,l,h=+t.apply(this,arguments),f=+e.apply(this,arguments),d=r.apply(this,arguments)-Ul,g=o.apply(this,arguments)-Ul,p=Ll(g-d),v=g>d;if(a||(a=u=c()),fXl)if(p>Yl-Xl)a.moveTo(f*Nl(d),f*jl(d)),a.arc(0,0,f,d,g,!v),h>Xl&&(a.moveTo(h*Nl(g),h*jl(g)),a.arc(0,0,h,g,d,v));else{var y,b,x=d,m=g,_=d,T=g,w=p,A=p,S=s.apply(this,arguments)/2,E=S>Xl&&(i?+i.apply(this,arguments):Bl(h*h+f*f)),k=Fl(Ll(f-h)/2,+n.apply(this,arguments)),O=k,M=k;if(E>Xl){var R=Vl(E/h*jl(S)),C=Vl(E/f*jl(S));(w-=2*R)>Xl?(_+=R*=v?1:-1,T-=R):(w=0,_=T=(d+g)/2),(A-=2*C)>Xl?(x+=C*=v?1:-1,m-=C):(A=0,x=m=(d+g)/2)}var I=f*Nl(x),P=f*jl(x),L=h*Nl(T),D=h*jl(T);if(k>Xl){var N,z=f*Nl(m),F=f*jl(m),j=h*Nl(_),B=h*jl(_);if(p<$l)if(N=function(t,e,n,i,r,o,s,a){var c=n-t,u=i-e,l=s-r,h=a-o,f=h*c-l*u;if(!(f*f1?0:t<-1?$l:Math.acos(t)}((X*U+$*Y)/(Bl(X*X+$*$)*Bl(U*U+Y*Y)))/2),G=Bl(N[0]*N[0]+N[1]*N[1]);O=Fl(k,(h-G)/(V-1)),M=Fl(k,(f-G)/(V+1))}else O=M=0}A>Xl?M>Xl?(y=Od(j,B,I,P,f,M,v),b=Od(z,F,L,D,f,M,v),a.moveTo(y.cx+y.x01,y.cy+y.y01),MXl&&w>Xl?O>Xl?(y=Od(L,D,z,F,h,-O,v),b=Od(I,P,j,B,h,-O,v),a.lineTo(y.cx+y.x01,y.cy+y.y01),O0&&(d+=h);for(null!=e?g.sort((function(t,n){return e(p[t],p[n])})):null!=n&&g.sort((function(t,e){return n(s[t],s[e])})),a=0,u=d?(y-f*x)/d:0;a0?h*u:0)+x,p[c]={data:s[c],index:a,value:h,startAngle:v,endAngle:l,padAngle:b};return p}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:fd(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:fd(+t),s):i},s.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:fd(+t),s):r},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:fd(+t),s):o},s}().startAngle(s).endAngle(s+2*Math.PI).padAngle(a).value(function(e){var n=this;return o(this,t),e.values.reduce(function(t,e){return o(this,n),t+e.value}.bind(this),0)}.bind(this)).sort(e.getSortCompareFn.bind(e)(!0))},updateRadius:function(){const t=this,e=t.config,n=t.state,i=e[e.data_type+"_padding"],r=e.gauge_width||e.donut_width,o=t.filterTargetsToShow(t.data.targets).length*e.gauge_arcs_minWidth;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?.85:1),n.radius=.95*n.radiusExpanded,n.innerRadiusRatio=r?(n.radius-r)/n.radius:.6,n.gaugeArcWidth=r||(o<=n.radius-n.innerRadius?n.radius-n.innerRadius:o<=n.radius?o:n.radius);const s=e.pie_innerRadius||(i?i*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:s},getRadius:function(t){const e=this,n=null==t?void 0:t.data;let i=e.state,r=i.innerRadius,o=i.outerRadius;return!Vo(r)&&n&&(r=r[n.id]||0),ns(o)&&n&&n.id in o?o=o[n.id]:Vo(o)||(o=e.state.radius),{innerRadius:r,outerRadius:o}},updateArc:function(){const t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength:function(){const t=3.6*this.config.gauge_arcLength;let e=t/360*2;return t<-360?e=-2:t>360&&(e=2),e*Math.PI},getGaugeStartAngle:function(){const t=this.config,e=t.gauge_fullCircle,n=-1*Math.PI/2,i=Math.PI/2;let r=t.gauge_startingAngle;return!e&&r<=n?r=n:!e&&r>=i?r=i:(r>Math.PI||r<-1*Math.PI)&&(r=Math.PI),r},updateAngle:function(t){var e=this;const n=this,i=n.config,r=n.state;let s=n.pie,a=t,c=!1;if(!i)return null;const u=n.getGaugeStartAngle(),l=i.gauge_fullCircle?n.getArcLength():-2*u;if(a.data&&n.isGaugeType(a.data)&&!n.hasMultiArcGauge()){const t=i.gauge_min,e=i.gauge_max,o=n.getTotalDataSum(r.rendered);s=s.startAngle(u).endAngle(l*((o-t)/(e-t))+u)}if(s(n.filterTargetsToShow()).forEach(function(t,n){var i;o(this,e),c||t.data.id!==(null==(i=a.data)?void 0:i.id)||(c=!0,a=t,a.index=n)}.bind(this)),isNaN(a.startAngle)&&(a.startAngle=0),isNaN(a.endAngle)&&(a.endAngle=a.startAngle),a.data&&n.hasMultiArcGauge()){const t=i.gauge_min,e=i.gauge_max,n=a.value1){var c;let r=n.getRadius(t).outerRadius;n.hasType("polar")&&(r=n.getPolarOuterRadius(t,r));const u=this.svgArc.centroid(s).map(function(t){return o(this,e),isNaN(t)?0:t}.bind(this)),l=u[0],h=u[1],f=Math.sqrt(l*l+h*h);let d=null==(c=["donut","pie","polar"].filter(n.hasType.bind(n)).map(function(t){return o(this,e),i[t+"_label_ratio"]}.bind(this)))?void 0:c[0];d=d?Uo(d)?d.bind(n.api)(t,r,f):d:r&&(f?(36/r>.375?1.175-36/r:.8)*r/f:0),a="translate("+l*d+","+h*d+")"}return a},convertToArcData:function(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function(t){const e=this,n=e.hasType("gauge");e.shouldShowArcLabel()&&t.style("fill",e.updateTextColor.bind(e)).attr("filter",e.updateTextBacgroundColor.bind(e)).each((function(t){var i;const r=Rn(this),o=e.updateAngle(t),s=e.getRatio("arc",o);if(e.meetsLabelThreshold(s,null==(i=["donut","gauge","pie","polar"].filter(e.hasType.bind(e)))?void 0:i[0])){const i=(o||t).value;as(r,(e.getArcLabelFormat()||e.defaultArcValueFormat)(i,s,t.data.id).toString(),[-1,1],n)}else r.text("")}))},expandArc:function(t){var e=this;const n=this,i=n.state.transiting,r=n.$el;if(i){const s=setInterval(function(){o(this,e),i||(clearInterval(s),r.legend.selectAll("."+Gs.legendItemFocused).size()>0&&n.expandArc(t))}.bind(this),10);return}const s=n.mapToTargetIds(t);r.svg.selectAll(n.selectorTargets(s,"."+Ls.chartArc)).each((function(t){if(!n.shouldExpand(t.data.id))return;const e=n.getExpandConfig(t.data.id,"duration"),i=n.getSvgArcExpanded(n.getExpandConfig(t.data.id,"rate"));Rn(this).selectAll("path").transition().duration(e).attrTween("d",Pd(n.svgArcExpanded.bind(n))).transition().duration(2*e).attrTween("d",Pd(i.bind(n)))}))},unexpandArc:function(t){var e=this;const n=this,i=n.state.transiting,r=n.$el.svg;if(i)return;const s=n.mapToTargetIds(t);r.selectAll(n.selectorTargets(s,"."+Ls.chartArc)).selectAll("path").transition().duration(function(t){return o(this,e),n.getExpandConfig(t.data.id,"duration")}.bind(this)).attrTween("d",Pd(n.svgArc.bind(n))),r.selectAll(""+Ls.arc).style("opacity",null)},getExpandConfig:function(t,e){const n=this,i=n.config;let r;return n.isDonutType(t)?r="donut":n.isGaugeType(t)?r="gauge":n.isPieType(t)&&(r="pie"),r?i[r+"_expand_"+e]:{duration:50,rate:.98}[e]},shouldExpand:function(t){const e=this,n=e.config;return e.isDonutType(t)&&n.donut_expand||e.isGaugeType(t)&&n.gauge_expand||e.isPieType(t)&&n.pie_expand},shouldShowArcLabel:function(){var t=this;const e=this,n=e.config;return["donut","gauge","pie","polar"].some(function(i){return o(this,t),e.hasType(i)&&n[i+"_label_show"]}.bind(this))},getArcLabelFormat:function(){var t=this;const e=this,n=e.config;let i=function(e){return o(this,t),e}.bind(this);return["donut","gauge","pie","polar"].filter(e.hasType.bind(e)).forEach(function(e){o(this,t),i=n[e+"_label_format"]}.bind(this)),Uo(i)?i.bind(e.api):i},updateTargetsForArc:function(t){var e=this;const n=this,i=n.$el,r=n.hasType("gauge"),s=n.getChartClass("Arc"),a=n.getClass("arcs",!0),c=n.classFocus.bind(n),u=i.main.select("."+Ls.chartArcs),l=u.selectAll("."+Ls.chartArc).data(n.pie(t)).attr("class",function(t){return o(this,e),s(t)+c(t.data)}.bind(this)),h=l.enter().append("g").attr("class",s).call(this.setCssRule(!1,"."+Ls.chartArcs+" text",["pointer-events:none","text-anchor:middle"]));h.append("g").attr("class",a).merge(l),h.append("text").attr("dy",r&&!n.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor",n.getStylePropValue("middle")).style("pointer-events",n.getStylePropValue("none")),i.text=u.selectAll("."+Ps.target+" text")},initArc:function(){const t=this,e=t.$el;e.arcs=e.main.select("."+Ps.chart).append("g").attr("class",Ls.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle:function(t){const e=this,n=t||e.getArcTitle(),i=e.hasType("gauge");if(n){const t=i?$s.chartArcsGaugeTitle:Ls.chartArcsTitle;let r=e.$el.arcs.select("."+t);r.empty()&&(r=e.$el.arcs.append("text").attr("class",t).style("text-anchor","middle")),i&&r.attr("dy","-0.3em"),as(r,n,i?void 0:[-.6,1.35],!0)}},getArcTitle:function(){const t=this,e=t.hasType("donut")?"donut":t.hasType("gauge")&&"gauge";return e?t.config[e+"_title"]:""},getArcTitleWithNeedleValue:function(){const t=this,e=t.config,n=t.state,i=t.getArcTitle();if(i&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(i)){let t=n.current.needle;return Vo(t)||(t=e.arc_needle_value),Es(i,{NEEDLE_VALUE:Vo(t)?t:0})}return!1},redrawArc:function(t,e,n){var i=this;const r=this,s=r.config,a=r.state,c=r.$el.main,u=s.interaction_enabled,l=u&&s.data_selection_isselectable;let h=c.selectAll("."+Ls.arcs).selectAll("."+Ls.arc).data(r.arcData.bind(r));h.exit().transition().duration(e).style("opacity","0").remove(),h=h.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",function(t){return o(this,i),r.color(t.data)}.bind(this)).style("cursor",function(t){return o(this,i),null!=l&&null!=l.bind&&l.bind(r.api)(t)?"pointer":null}.bind(this)).style("opacity","0").each((function(t){r.isGaugeType(t.data)&&(t.startAngle=s.gauge_startingAngle,t.endAngle=s.gauge_startingAngle),this._current=t})).merge(h),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawMultiArcGauge()),h.attr("transform",function(t){return o(this,i),!r.isGaugeType(t.data)&&n?"scale(0)":""}.bind(this)).style("opacity",(function(t){return t===this._current?"0":null})).each(function(){o(this,i),a.transiting=!0}.bind(this)).transition().duration(t).attrTween("d",(function(t){var e=this;const n=r.updateAngle(t);if(!n)return function(){return o(this,e),"M 0 0"}.bind(this);isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const i=Ki(this._current,n);return this._current=i(0),function(e){const n=i(e);return n.data=t.data,r.getArc(n,!0)}})).attr("transform",n?"scale(1)":"").style("fill",function(t){let e;return o(this,i),r.levelColor?(e=r.levelColor(t.data.values[0].value),s.data_colors[t.data.id]=e):e=r.color(t.data),e}.bind(this)).style("opacity",null).call(os,(function(){if(r.levelColor){const t=Rn(this),e=t.datum(this._current);r.updateLegendItemColor(e.data.id,t.style("fill"))}a.transiting=!1,rs(s.onrendered,r.api)})),u&&r.bindArcEvent(h),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),s.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t)},redrawNeedle:function(){var t=this;const e=this,n=e.$el,i=e.config,r=e.state,s=r.hiddenTargetIds,a=(r.radius-1)/100*i.arc_needle_length,c=s.length!==e.data.targets.length;let u=e.$el.arcs.select("."+Ls.needle);const l=i.arc_needle_path,h=i.arc_needle_bottom_width/2,f=i.arc_needle_top_width/2,d=i.arc_needle_top_rx,g=i.arc_needle_top_ry,p=i.arc_needle_bottom_len,v=i.arc_needle_bottom_rx,y=i.arc_needle_bottom_ry,b=e.getNeedleAngle(),x=function(){o(this,t);const n=e.getArcTitleWithNeedleValue();n&&e.setArcTitle(n)}.bind(this);if(x(),u.empty()&&(u=n.arcs.append("path").classed(Ls.needle,!0),n.needle=u,n.needle.updateHelper=function(r,s){var a=this;void 0===s&&(s=!1),o(this,t),"none"!==n.needle.style("display")&&e.$T(n.needle).style("transform","rotate("+e.getNeedleAngle(r)+"deg)").call(os,function(){o(this,a),s&&(i.arc_needle_value=r),x()}.bind(this))}.bind(this)),c){const t=Uo(l)?l.call(e,a):"M-"+h+" "+p+" A"+v+" "+y+" 0 0 0 "+h+" "+p+" L"+f+" -"+a+" A"+d+" "+g+" 0 0 0 -"+f+" -"+a+" L-"+h+" "+p+" Z";e.$T(u).attr("d",t).style("fill",i.arc_needle_color).style("display",null).style("transform","rotate("+b+"deg)")}else u.style("display","none")},getNeedleAngle:function(t){const e=this,n=e.config,i=e.state,r=e.getArcLength(),o=e.hasType("gauge"),s=e.getTotalDataSum(!0);let a=Ho(t)?t:n.arc_needle_value,c=n[n.data_type+"_startingAngle"]||0,u=0;if(Vo(a)||(a=o&&1===e.data.targets.length?s:0),i.current.needle=a,o){c=e.getGaugeStartAngle();const t=n.gauge_fullCircle?r:-2*c,i=n.gauge_min;u=t*((a-i)/(n.gauge_max-i))}else u=r*(a/s);return(c+u)*(180/Math.PI)},redrawBackgroundArcs:function(){var t=this;const e=this,n=e.config,i=e.state,r=e.hasMultiArcGauge(),s=n.gauge_fullCircle,a=0===e.filterTargetsToShow(e.data.targets).length&&!!n.data_empty_label_text,c=e.getGaugeStartAngle(),u=s?c+e.getArcLength():-1*c;let l=e.$el.arcs.select((r?"g":"")+"."+Ls.chartArcsBackground);if(r){let r=0;l=l.selectAll("path."+Ls.chartArcsBackground).data(e.data.targets),l.enter().append("path").attr("class",function(e,n){return o(this,t),Ls.chartArcsBackground+" "+Ls.chartArcsBackground+"-"+n}.bind(this)).merge(l).style("fill",n.gauge_background||null).attr("d",function(s){let l=s.id;if(o(this,t),a||i.hiddenTargetIds.indexOf(l)>=0)return"M 0 0";const h={data:[{value:n.gauge_max}],startAngle:c,endAngle:u,index:r++};return e.getArc(h,!0,!0)}.bind(this)),l.exit().remove()}else l.attr("d",a?"M 0 0":function(){o(this,t);const i={data:[{value:n.gauge_max}],startAngle:c,endAngle:u};return e.getArc(i,!0,!0)}.bind(this))},bindArcEvent:function(t){var e=this;const n=this,i=n.config,r=n.state,s="touch"===r.inputType,a="mouse"===r.inputType;function c(t,e,i){n.expandArc(i),n.api.focus(i),n.toggleFocusLegend(i,!0),n.showTooltip([e],t)}function u(t){const e=(null==t?void 0:t.id)||void 0;n.unexpandArc(e),n.api.revert(),n.revertLegend(),n.hideTooltip()}if(t.on("click",(function(t,e,r){const o=n.updateAngle(e);let s;o&&(s=n.convertToArcData(o),null==n.toggleShape||n.toggleShape(this,s,r),i.data_onclick.bind(n.api)(s,this))})),a&&t.on("mouseover",(function(t,e){var i;if(r.transiting)return;r.event=t;const o=n.updateAngle(e),s=o?n.convertToArcData(o):null;c(this,s,(null==(i=s)?void 0:i.id)||void 0),n.setOverOut(!0,s)})).on("mouseout",function(t,i){if(o(this,e),r.transiting)return;r.event=t;const s=n.updateAngle(i),a=s?n.convertToArcData(s):null;u(),n.setOverOut(!1,a)}.bind(this)).on("mousemove",(function(t,e){const i=n.updateAngle(e),o=i?n.convertToArcData(i):null;r.event=t,n.showTooltip([o],this)})),s&&n.hasArcType()&&!n.radars){const t=function(t){o(this,e);const n=t.changedTouches[0];return Rn(Fn.elementFromPoint(n.clientX,n.clientY))}.bind(this);n.$el.svg.on("touchstart touchmove",(function(e){var i,o;if(r.transiting)return;r.event=e;const s=t(e).datum(),a=null!=(i=s)&&i.data&&s.data.id?n.updateAngle(s):null,l=a?n.convertToArcData(a):null,h=(null==(o=l)?void 0:o.id)||void 0;n.callOverOutForTouch(l),Go(h)?u():c(this,l,h)}))}},redrawArcText:function(t){var e=this;const n=this,i=n.config,r=n.state,s=n.$el,a=s.main,c=s.arcs,u=n.hasType("gauge"),l=n.hasMultiArcGauge();let h;if(u&&1===n.data.targets.length&&i.gauge_title||(h=a.selectAll("."+Ls.chartArc).select("text").style("opacity","0").attr("class",function(t){return o(this,e),n.isGaugeType(t.data)?$s.gaugeValue:null}.bind(this)).call(n.textForArcLabel.bind(n)).attr("transform",n.transformForArcLabel.bind(n)).style("font-size",function(t){return o(this,e),n.isGaugeType(t.data)&&1===n.data.targets.length&&!l?Math.round(r.radius/5)+"px":null}.bind(this)).transition().duration(t).style("opacity",function(t){return o(this,e),n.isTargetToShow(t.data.id)&&n.isArcType(t.data)?null:"0"}.bind(this)),l&&h.attr("dy","-.1em")),a.select("."+Ls.chartArcsTitle).style("opacity",n.hasType("donut")||u?null:"0"),u){var f;const t=i.gauge_fullCircle;t&&(null==(f=h)||f.attr("dy",""+(l?0:Math.round(r.radius/14)))),i.gauge_label_show&&(c.select("."+$s.chartArcsGaugeUnit).attr("dy",(t?1.5:.75)+"em").text(i.gauge_units),c.select("."+$s.chartArcsGaugeMin).attr("dx",-1*(r.innerRadius+(r.radius-r.innerRadius)/(t?1:2))+"px").attr("dy","1.2em").text(n.textForGaugeMinMax(i.gauge_min,!1)),t||c.select("."+$s.chartArcsGaugeMax).attr("dx",r.innerRadius+(r.radius-r.innerRadius)/2+"px").attr("dy","1.2em").text(n.textForGaugeMinMax(i.gauge_max,!0)))}},getArcElementByIdOrIndex:function(t){var e=this;const n=this.$el.arcs,i=Vo(t)?function(n){return o(this,e),n.index===t}.bind(this):function(n){return o(this,e),n.data.id===t}.bind(this);return null==n?void 0:n.selectAll("."+Ps.target+" path").filter(i)}};function Dd(t){return t[0]}function Nd(t){return t[1]}function zd(t,e){var n=fd(!0),i=null,r=gh,o=null,s=Td(a);function a(a){var c,u,l,h=(a=hd(a)).length,f=!1;for(null==i&&(o=r(l=s())),c=0;c<=h;++c)!(c=h;--f)a.point(y[f],b[f]);a.lineEnd(),a.areaEnd()}v&&(y[l]=+t(d,l,u),b[l]=+e(d,l,u),a.point(i?+i(d,l,u):y[l],n?+n(d,l,u):b[l]))}if(g)return a=null,g+""||null}function l(){return zd().defined(r).curve(s).context(o)}return t="function"==typeof t?t:void 0===t?Dd:fd(+t),e="function"==typeof e?e:fd(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Nd:fd(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:fd(+e),i=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:fd(+e),u):t},u.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:fd(+t),u):i},u.y=function(t){return arguments.length?(e="function"==typeof t?t:fd(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:fd(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:fd(+t),u):n},u.lineX0=u.lineY0=function(){return l().x(t).y(e)},u.lineY1=function(){return l().x(t).y(n)},u.lineX1=function(){return l().x(i).y(e)},u.defined=function(t){return arguments.length?(r="function"==typeof t?t:fd(!!t),u):r},u.curve=function(t){return arguments.length?(s=t,null!=o&&(a=s(o)),u):s},u.context=function(t){return arguments.length?(null==t?o=a=null:a=s(o=t),u):o},u}();n=a?n.y(l).x0(h).x1(f):n.x(l).y0(r.area_above?0:r.area_below?i.state.height:h).y1(f),s||(n=n.defined(function(t){return o(this,e),null!==i.getBaseValue(t)}.bind(this))),i.isStepType(t)&&(u=i.convertValuesToStep(u)),c=n.curve(i.getCurve(t))(u)}else u[0]&&(d=i.scale.x(u[0].x),g=i.getYScaleById(t.id)(u[0].value)),c=a?"M "+g+" "+d:"M "+d+" "+g;return c||"M 0 0"}.bind(this)},generateGetAreaPoints:function(t,e){const n=this,i=n.config,r=n.getShapeX(0,t,e),o=n.getShapeY(!!e),s=n.getShapeOffset(n.isAreaType,t,e),a=n.getYScaleById.bind(n);return function(t,c){const u=a.call(n,t.id,e)(n.getShapeYMin(t.id)),l=s(t,c)||u,h=r(t),f=t.value;let d=o(t);return i.axis_rotated&&(f>0&&d0?function(){return o(this,n),c}.bind(this):Vo(u)?function(t){return o(this,n),t*u}.bind(this):null;return function(t,e){o(this,n);const c=s(t,e),u=+a,h=+!u,f=t.value<0,d=r["axis_"+i.axis.getId(t.id)+"_inverted"],g=!d&&f||d&&!f,p=["",""];let v=0;const y=i.isGrouped(t.id),b=!(!l||!y)&&i.isStackingRadiusData(t);if(l){const t=a?h:u,e=c[2][t]-c[0][t];v=!y||b?l(e):0;const n="a"+v+","+v+" "+(g?"1 0 0":"0 0 1")+" ";p[+!a]=""+n+v+","+v,p[+a]=""+n+[-v,v][a?"sort":"reverse"](),g&&p.reverse()}const x=a?"H"+(c[1][u]+(g?v:-v))+" "+p[0]+"V"+(c[2][h]-v)+" "+p[1]+"H"+c[3][u]:"V"+(c[1][h]+(g?-v:v))+" "+p[0]+"H"+(c[2][u]-v)+" "+p[1]+"V"+c[3][h];return"M"+c[0][u]+","+c[0][h]+x+"z"}.bind(this)},isStackingRadiusData:function(t){var e=this;const n=this,i=n.$el,r=n.config,s=n.data,a=n.state,c=t.id,u=t.index,l=t.value;if(a.hiddenTargetIds.indexOf(c)>-1){const t=i.bar.filter(function(t){return o(this,e),t.id===c&&t.value===l}.bind(this));return!t.empty()&&/a\d+/i.test(t.attr("d"))}const h=r.data_groups.find(function(t){return o(this,e),t.indexOf(c)>-1}.bind(this)),f=n.orderTargets(n.filterTargetsToShow(s.targets.filter(n.isBarType,n))).filter(function(t){return o(this,e),h.indexOf(t.id)>-1}.bind(this)).map(function(t){var n=this;return o(this,e),t.values.filter(function(t){return o(this,n),t.index===u&&(Vo(l)&&l>0?t.value>0:t.value<0)}.bind(this))[0]}.bind(this)).filter(Boolean).map(function(t){return o(this,e),t.id}.bind(this));return 0!==l&&f.indexOf(c)===f.length-1},generateGetBarPoints:function(t,e){var n=this;const i=this,r=i.config,s=e?i.axis.subX:i.axis.x,a=i.getIndicesMax(t)+1,c=i.getBarW("bar",s,a),u=i.getShapeX(c,t,!!e),l=i.getShapeY(!!e),h=i.getShapeOffset(i.isBarType,t,!!e),f=i.getYScaleById.bind(i);return function(t,s){o(this,n);const a=t.id,d=f.call(i,a,e)(i.getShapeYMin(a)),g=h(t,s)||d,p=Vo(c)?c:c[t.id]||c._$width,v=r["axis_"+i.axis.getId(a)+"_inverted"],y=t.value,b=u(t);let x=l(t);r.axis_rotated&&!v&&(y>0&&x0&&n.start=e.open),e||null}},$d={initGauge:function(){var t=this;const e=this,n=e.config,i=e.$el.arcs,r=function(e){o(this,t),i.append("text").attr("class",e).style("text-anchor","middle").style("pointer-events","none")}.bind(this);if(e.hasType("gauge")){const t=e.hasMultiArcGauge();i.append(t?"g":"path").attr("class",Ls.chartArcsBackground).style("fill",!t&&n.gauge_background||null),n.gauge_units&&r($s.chartArcsGaugeUnit),n.gauge_label_show&&(r($s.chartArcsGaugeMin),n.gauge_fullCircle||r($s.chartArcsGaugeMax))}},updateGaugeMax:function(){const t=this,e=t.config,n=t.state,i=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);i+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=i-e.gauge_min)},redrawMultiArcGauge:function(){var t=this;const e=this,n=e.config,i=e.state,r=e.$el,s=e.state.hiddenTargetIds,a=r.main.selectAll("."+Ls.arcs).selectAll("."+Ls.arcLabelLine).data(e.arcData.bind(e));a.enter().append("rect").attr("class",function(e){return o(this,t),Ls.arcLabelLine+" "+Ps.target+" "+Ps.target+"-"+e.data.id}.bind(this)).merge(a).style("fill",function(n){return o(this,t),e.levelColor?e.levelColor(n.data.values[0].value):e.color(n.data)}.bind(this)).style("display",n.gauge_label_show?null:"none").each((function(t){let n=0,r=0,o=0,a="";if(s.indexOf(t.data.id)<0){const s=e.updateAngle(t),c=i.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length*(s.index+1),u=s.endAngle-Math.PI/2,l=i.radius-c,h=u-(0===l?0:1/l);n=i.radiusExpanded-i.radius+c,r=Math.cos(h)*l,o=Math.sin(h)*l,a="rotate("+180*u/Math.PI+", "+r+", "+o+")"}Rn(this).attr("x",r).attr("y",o).attr("width",n).attr("height",2).attr("transform",a).style("stroke-dasharray","0, "+(n+2)+", 0")}))},textForGaugeMinMax:function(t,e){const n=this.config.gauge_label_extents;return Uo(n)?n.bind(this.api)(t,e):t},getGaugeLabelHeight:function(){const t=this.config;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge:function(){return this.getGaugeLabelHeight()*(this.config.gauge_label_show?2:2.5)}},Ud={initBubble:function(){const t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle")},getBaseLength:function(){const t=this,e=t.state,n=e.width,i=e.height,r=_a;let o=t.cache.get(r);return o||t.cache.add(r,o=ws("min",[n,i])),o},getBubbleR:function(t){var e=this;const n=this;let i=n.config.bubble_maxR;Uo(i)?i=i.bind(n.api)(t):Vo(i)||(i=n.getBaseLength()/(2*n.getMaxDataCount())+12);const r=ws("max",n.getMinMaxData().max.map(function(t){return o(this,e),n.isBubbleZType(t)?n.getBubbleZData(t.value,"y"):ns(t.value)?t.value.mid:t.value}.bind(this))),s=i*i*Math.PI,a=(n.isBubbleZType(t)?n.getBubbleZData(t.value,"z"):t.value)*(s/r);return Math.sqrt(a/Math.PI)},getBubbleZData:function(t,e){return ns(t)?t[e]:t["y"===e?0:1]}},Yd={initLine:function(){const t=this.$el;t.line=t.main.select("."+Ps.chart).append("g").attr("class",Ys.chartLines).call(this.setCssRule(!1,"."+Ys.chartLines,["pointer-events:none"]))},updateTargetsForLine:function(t){var e=this;const n=this,i=n.$el,r=i.area,s=i.line,a=i.main,c=n.getChartClass("Line"),u=n.getClass("lines",!0),l=n.classFocus.bind(n);s||n.initLine();const h=t.filter(function(t){return o(this,e),!(n.isScatterType(t)||n.isBubbleType(t))}.bind(this)),f=a.select("."+Ys.chartLines).selectAll("."+Ys.chartLine).data(h).attr("class",function(t){return o(this,e),c(t)+l(t)}.bind(this)),d=f.enter().append("g").attr("class",c).style("opacity","0").style("pointer-events",n.getStylePropValue("none"));if(d.append("g").attr("class",u),n.hasTypeOf("Area")){const t=(!r&&d.empty()?f:d).filter(n.isAreaType.bind(n));n.initArea(t)}n.updateTargetForCircle(h,d)},updateLine:function(t,e){var n=this;void 0===e&&(e=!1);const i=this,r=i.format.extraLineClasses,s=i.$el,a=i.$T,c=e?s.subchart:s,u=c.main.selectAll("."+Ys.lines).selectAll("."+Ys.line).data(i.lineData.bind(i));a(u.exit(),t).style("opacity","0").remove(),c.line=u.enter().append("path").attr("class",function(t){return o(this,n),i.getClass("line",!0)(t)+" "+(r(t)||"")}.bind(this)).style("stroke",i.color).merge(u).style("opacity",i.initialOpacity.bind(i)).attr("transform",null)},redrawLine:function(t,e,n){void 0===n&&(n=!1);const i=this.$el;return[(0,this.$T)((n?i.subchart:i).line,e,fs()).attr("d",t).style("stroke",this.color).style("opacity",null)]},getCurve:function(t){var e=this;const n=this;return n.config.axis_rotated&&n.isStepType(t)?function(i){o(this,e);const r=n.getInterpolate(t)(i);return r.orgPoint=r.point,r.pointRotated=function(t,e){1===this._point&&(this._point=2);const n=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,n),this._context.lineTo(t,n),this._x=t,this._y=e},r.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},r}.bind(this):n.getInterpolate(t)},generateDrawLine:function(t,e){var n=this;const i=this,r=i.config,s=i.scale,a=r.line_connectNull,c=r.axis_rotated,u=i.generateGetLinePoints(t,e),l=i.getYScaleById.bind(i),h=function(t){return o(this,n),(e?i.subxx:i.xx).call(i,t)}.bind(this),f=function(t,r){return o(this,n),i.isGrouped(t.id)?u(t,r)[0][1]:l(t.id,e)(i.getBaseValue(t))}.bind(this);let d=zd();d=c?d.x(f).y(h):d.x(h).y(f),a||(d=d.defined(function(t){return o(this,n),null!==i.getBaseValue(t)}.bind(this)));const g=e?s.subX:s.x;return function(t){o(this,n);const u=l(t.id,e);let h,f=a?i.filterRemoveNull(t.values):t.values,p=0,v=0;if(i.isLineType(t)){const e=r.data_regions[t.id];e?h=i.lineWithRegions(f,s.zoom||g,u,e):(i.isStepType(t)&&(f=i.convertValuesToStep(f)),h=d.curve(i.getCurve(t))(f))}else f[0]&&(p=g(f[0].x),v=u(f[0].value)),h=c?"M "+v+" "+p:"M "+p+" "+v;return h||"M 0 0"}.bind(this)},lineWithRegions:function(t,e,n,i){var r=this;const s=this,a=s.config.axis_rotated,c=s.axis.isTimeSeries(),u=[];let l,h,f,d;if(Ho(i)){const e=function(t,e){return o(this,r),Go(t)?e:c?ks.call(s,t):t}.bind(this);for(let n,r=0;n=i[r];r++){const i=e(n.start,t[0].x),o=e(n.end,t[t.length-1].x),s=n.style||{dasharray:"2 2"};u[r]={start:i,end:o,style:s}}}const g=a?function(t){return o(this,r),n(t.value)}.bind(this):function(t){return o(this,r),e(t.x)}.bind(this),p=a?function(t){return o(this,r),e(t.x)}.bind(this):function(t){return o(this,r),n(t.value)}.bind(this),v=function(t){return o(this,r),"M"+t[0][0]+","+t[0][1]+"L"+t[1][0]+","+t[1][1]}.bind(this),y=c?function(t,i,s,c){o(this,r);const u=t.x.getTime(),l=i.x-t.x,d=new Date(u+l*s),g=new Date(u+l*(s+c)),p=a?[[n(h(s)),e(d)],[n(h(s+f)),e(g)]]:[[e(d),n(h(s))],[e(g),n(h(s+f))]];return v(p)}.bind(this):function(t,i,s,c){o(this,r);const u=a?[[n(h(s),!0),e(l(s))],[n(h(s+c),!0),e(l(s+c))]]:[[e(l(s),!0),n(h(s))],[e(l(s+c),!0),n(h(s+c))]];return v(u)}.bind(this),b={x:s.axis.getAxisType("x"),y:s.axis.getAxisType("y")};let x="";for(let i,r=0;i=t[r];r++){const o=t[r-1],a=o&&$o(o.value);let c=s.isWithinRegions(i.x,u);if($o(i.value))if(!Go(u)&&c&&a){if(a){try{c=c.dasharray.split(" ")}catch(t){c="2 2".split(" ")}l=pl(b.x,o.x,i.x),h=pl(b.y,o.value,i.value);const t=e(i.x)-e(o.x),r=n(i.value)-n(o.value),s=Math.sqrt(Math.pow(t,2)+Math.pow(r,2));f=c[0]/s,d=f*c[1];for(let t=f;t<=1;t+=d)x+=y(o,i,t,f),t+d>=1&&(x+=y(o,i,1,0))}}else x+=(r&&a?"L":"M")+g(i)+","+p(i)}return x},isWithinRegions:function(t,e){for(let n,i=0;n=e[i];i++)if(n.start-1?"0":null})),c&&h.forEach(function(t){var e=this;o(this,n),a.main.selectAll("."+Js.selectedCircles+i.getTargetSelectorSuffix(t.id)).selectAll(""+Js.selectedCircle).each(function(n){o(this,e),n.value=t.values[n.index].value}.bind(this))}.bind(this))},updateCircle:function(t){var e=this;void 0===t&&(t=!1);const n=this,i=n.config,r=n.state,s=n.$el,a=i.point_focus_only,c=t?s.subchart:s;if(i.point_show&&!r.toggling){const t=c.main.selectAll("."+js.circles).selectAll("."+js.circle).data(function(t){return o(this,e),n.isLineType(t)&&n.shouldDrawPointsForLine(t)||n.isBubbleType(t)||n.isRadarType(t)||n.isScatterType(t)?a?[t.values[0]]:t.values:[]}.bind(this));t.exit().remove(),t.enter().filter(Boolean).append(n.point("create",this,n.pointR.bind(n),n.getStylePropValue(n.color))),c.circle=c.main.selectAll("."+js.circles+" ."+js.circle).style("stroke",n.getStylePropValue(n.color)).style("opacity",n.initialOpacityForCircle.bind(n))}},redrawCircle:function(t,e,n,i,r){void 0===r&&(r=!1);const o=this,s=o.state.rendered,a=o.$el,c=o.$T,u=r?a.subchart:a,l=u.main.selectAll("."+Js.selectedCircle);if(!o.config.point_show)return[];const h=o.point("update",o,t,e,o.getStylePropValue(o.color),n,i,l),f=o.isCirclePoint()?"c":"",d=fs(),g=o.opacityForCircle.bind(o),p=[];return u.circle.each((function(t){let e=h.bind(this)(t);e=c(e,n||!s,d).style("opacity",g),p.push(e)})),[p,c(l,n).attr(f+"x",t).attr(f+"y",e)]},showCircleFocus:function(t){const e=this,n=e.config,i=e.state,r=i.hasRadar,s=i.resizing,a=i.toggling,c=i.transiting;let u=e.$el.circle;if(!1===c&&n.point_focus_only&&u){const n=(r?e.radarCircleX:e.circleX).bind(e),i=(r?e.radarCircleY:e.circleY).bind(e),c=a||Go(t),l=e.point("update",e,n,i,e.getStylePropValue(e.color),!s&&c);t&&(u=u.filter((function(e){var n=this;const i=null==t.filter?void 0:t.filter(function(t){return o(this,n),t.id===e.id}.bind(this));return!!i.length&&Rn(this).datum(i[0])}))),u.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each((function(t){const n=t.id,i=t.index,r=t.value;let o="hidden";$o(r)&&(l.bind(this)(t),e.expandCircles(i,n),o=""),this.style.visibility=o}))}},hideCircleFocus:function(){const t=this,e=t.config,n=t.$el.circle;e.point_focus_only&&n&&(t.unexpandCircles(),n.style("visibility","hidden"))},circleX:function(t){return this.xx(t)},updateCircleY:function(t){var e=this;void 0===t&&(t=!1);const n=this,i=n.generateGetLinePoints(n.getShapeIndices(n.isLineType),t);return function(r,s){o(this,e);const a=r.id;return n.isGrouped(a)?i(r,s)[0][1]:n.getYScaleById(a,t)(n.getBaseValue(r))}.bind(this)},expandCircles:function(t,e,n){const i=this,r=i.pointExpandedR.bind(i);n&&i.unexpandCircles();const o=i.getShapeByIndex("circle",t,e).classed(Ps.EXPANDED,!0),s=r(o)/i.config.point_r,a=1-s;i.isCirclePoint()?o.attr("r",r):o.each((function(){const t=Rn(this);if("circle"===this.tagName)t.attr("r",r);else{const e=this.getBBox(),n=e.width,i=e.height,r=a*(+t.attr("x")+n/2),o=a*(+t.attr("y")+i/2);t.attr("transform","translate("+r+" "+o+") scale("+s+")")}}))},unexpandCircles:function(t){const e=this,n=e.pointR.bind(e),i=e.getShapeByIndex("circle",t).filter((function(){return Rn(this).classed(Ps.EXPANDED)})).classed(Ps.EXPANDED,!1);if(i.attr("r",n),!e.isCirclePoint()){const t=n(i)/e.config.point_r;i.attr("transform",1!==t?"scale("+t+")":null)}},pointR:function(t){const e=this,n=e.config.point_r;let i=n;return e.isBubbleType(t)?i=e.getBubbleR(t):Uo(n)&&(i=n.bind(e.api)(t)),t.r=i,i},pointExpandedR:function(t){const e=this,n=e.config,i=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*i:e.pointR(t)},pointSelectR:function(t){const e=this.config.point_select_r;return Uo(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function(t,e){const n=us(this.state.event,t),i=Rn(t),r=this.isCirclePoint(t)?"c":"";let o=+i.attr(r+"x"),s=+i.attr(r+"y");if(!o&&!s&&1===t.nodeType){const e=hs(t);o=e.x,s=e.y}return Math.sqrt(Math.pow(o-n[0],2)+Math.pow(s-n[1],2))<(e||this.config.point_sensitivity)},getPointSensitivity:function(t){const e=this;let n=e.config.point_sensitivity;return Uo(n)?n=n.call(e.api,t):"radius"===n&&(n=t.r),n},insertPointInfoDefs:function(t,e){var n,i=this;const r=function(t,e){o(this,i);const n=t.attributes;for(let i,r=0;i=n[r];r++)i=i.name,e.setAttribute(i,t.getAttribute(i))}.bind(this),s=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,a=Fn.createElementNS(Ce.svg,s.nodeName.toLowerCase());if(a.id=e,a.style.fill="inherit",a.style.stroke="inherit",r(s,a),null!=(n=s.childNodes)&&n.length){const t=Rn(a);"innerHTML"in a?t.html(s.innerHTML):ys(s.childNodes).forEach(function(e){o(this,i),r(e,t.append(e.tagName).node())}.bind(this))}this.$el.defs.node().appendChild(a)},pointFromDefs:function(t){return this.$el.defs.select("#"+t)},updatePointClass:function(t){const e=this,n=e.$el.circle;let i=!1;return(ns(t)||n)&&(i=!0===t?n.each((function(t){let n=e.getClass("circle",!0)(t);this.getAttribute("class").indexOf(Ps.EXPANDED)>-1&&(n+=" "+Ps.EXPANDED),this.setAttribute("class",n)})):e.getClass("circle",!0)(t)),i},generateGetLinePoints:function(t,e){var n=this;const i=this,r=i.config,s=i.getShapeX(0,t,e),a=i.getShapeY(e),c=i.getShapeOffset(i.isLineType,t,e),u=i.getYScaleById.bind(i);return function(t,l){o(this,n);const h=u.call(i,t.id,e)(i.getShapeYMin(t.id)),f=c(t,l)||h,d=s(t);let g=a(t);r.axis_rotated&&(t.value>0&&g2?s-2:0),c=2;cn&&(n=e),n}var Wd={initPolar:function(){const t=this,e=t.$el.arcs,n=t.config,i=n.polar_level_text_show,r=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",qs),i&&r&&t.generateDataLabelBackgroundColorFilter(r)},getPolarOuterRadius:function(t,e){var n;const i=Hd(this);return(null!=(n=null==t?void 0:t.data.values[0].value)?n:0)/i*e},updateTargetsForPolar:function(t){this.updateTargetsForArc(t)},redrawPolar:function(){this.config.polar_level_show&&this.updatePolarLevel()},updatePolarLevel:function(){var t=this;const e=this,n=e.config,i=e.state,r=e.$el.arcs.levels,s=n.polar_level_depth,a=Hd(e),c=As(0,s),u=i.radius,l=c.map(function(e){return o(this,t),u*((e+1)/s)}.bind(this)),h=(n.polar_level_text_format||function(){}).bind(e.api),f=r.selectAll("."+Ws).data(c);f.exit().remove();const d=f.enter().append("g").attr("class",function(e,n){return o(this,t),Ws+" "+Ws+"-"+n}.bind(this));if(d.append("circle"),d.merge(f).selectAll("circle").style("visibility",n.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",function(e){return o(this,t),l[e]}.bind(this)),n.polar_level_text_show){const r=n.polar_level_text_backgroundColor,s="#"+i.datetimeId+"-labels-bg"+e.getTargetSelectorSuffix(r);d.append("text").style("text-anchor","middle"),d.merge(f).selectAll("text").attr("dy",function(e){return o(this,t),5-l[e]}.bind(this)).attr("filter",r?"url("+s+")":null).text(function(e){return o(this,t),h(a/c.length*(e+1))}.bind(this))}}};const qd=ka;var Zd={initRadar:function(){const t=this,e=t.config,n=t.state.current,i=t.$el;t.hasType("radar")&&(i.radar=i.main.select("."+Ps.chart).append("g").attr("class",Zs.chartRadars),i.radar.levels=i.radar.append("g").attr("class",qs),i.radar.axes=i.radar.append("g").attr("class",Ns.axis),i.radar.shapes=i.radar.append("g").attr("class",Qs.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function(){const t=this.config,e=this.state,n=e.arcWidth,i=e.arcHeight,r=t.axis_x_categories.length<4?-20:10,o=(Math.min(n,i)-r)/2;return[o,o]},updateTargetsForRadar:function(t){var e=this;const n=this.config;Qo(n.axis_x_categories)&&(n.axis_x_categories=As(0,ws("max",t.map(function(t){return o(this,e),t.values.length}.bind(this))))),this.generateRadarPoints()},getRadarPosition:function(t,e,n,i){var r=this;const s=this.config,a=this.getRadarSize(),c=a[0],u=a[1],l=s.axis_x_categories.length,h=s.radar_direction_clockwise,f=ys(t).map(function(a){return o(this,r),function(t,e,n,i,r,o){const s=t&&i>0?n-i:i,a=2*Math.PI;return r*(1-o*("x"===e?Math.sin:Math.cos)(s*a/n))}(h,a,l,e,Ho(n)?n:"x"===t?c:u,Vo(i)?i:s.radar_size_ratio)}.bind(this));return 1===f.length?f[0]:f},generateRadarPoints:function(){var t=this;const e=this,n=e.data.targets,i=e.getRadarSize(),r=i[0],s=i[1],a=e.cache.get(qd)||{},c=a._size;(!c||c.width!==r&&c.height!==s)&&(n.forEach(function(n){var i=this;o(this,t),a[n.id]=n.values.map(function(t,n){return o(this,i),e.getRadarPosition(["x","y"],n,void 0,e.getRatio("radar",t))}.bind(this))}.bind(this)),a._size={width:r,height:s},e.cache.add(qd,a))},redrawRadar:function(){const t=this,e=t.$el,n=e.radar,i=e.main,r=t.getTranslate("radar");r&&(n.attr("transform",r),i.select("."+ea.chartTexts).attr("transform",r),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints:function(){var t=this;const e=this.cache.get(qd);return function(n,i){o(this,t);const r=e[n.id][i];return[r,r,r,r]}.bind(this)},updateRadarLevel:function(){var t=this;const e=this,n=e.config,i=e.state,r=e.$el.radar,s=e.getRadarSize(),a=s[0],c=s[1],u=n.radar_level_depth,l=n.axis_x_categories.length,h=n.radar_level_text_show,f=r.levels,d=As(0,u),g=n.radar_size_ratio*Math.min(a,c),p=d.map(function(e){return o(this,t),g*((e+1)/u)}.bind(this)),v=(n.radar_level_text_format||function(){}).bind(e.api),y=d.map(function(n){var i=this;o(this,t);const r=p[n];return As(0,l).map(function(t){return o(this,i),e.getRadarPosition(["x","y"],t,r,1).join(",")}.bind(this)).join(" ")}.bind(this)),b=f.selectAll("."+Ws).data(d);b.exit().remove();const x=b.enter().append("g").attr("class",function(e,n){return o(this,t),Ws+" "+Ws+"-"+n}.bind(this));x.append("polygon").style("visibility",n.radar_level_show?null:"hidden"),h&&(f.select("text").empty()&&f.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return o(this,t),v(0)}.bind(this)),x.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(e){return o(this,t),v(i.current.dataMax/d.length*(e+1))}.bind(this))),x.merge(b).attr("transform",function(e){return o(this,t),"translate("+(a-p[e])+", "+(c-p[e])+")"}.bind(this)).selectAll("polygon").attr("points",function(e){return o(this,t),y[e]}.bind(this)),h&&f.selectAll("text").attr("x",function(e){return o(this,t),Go(e)?a:y[e].split(",")[0]}.bind(this)).attr("y",function(e){return o(this,t),Go(e)?c:0}.bind(this))},updateRadarAxes:function(){var t=this;const e=this,n=e.config,i=e.$el.radar,r=e.getRadarSize(),s=r[0],a=r[1],c=n.axis_x_categories;let u=i.axes.selectAll("g").data(c);u.exit().remove();const l=u.enter().append("g").attr("class",function(e,n){return o(this,t),Ns.axis+"-"+n}.bind(this));if(n.radar_axis_line_show&&l.append("line"),n.radar_axis_text_show&&l.append("text"),u=l.merge(u),n.radar_axis_line_show&&u.select("line").attr("x1",s).attr("y1",a).attr("x2",function(n,i){return o(this,t),e.getRadarPosition("x",i)}.bind(this)).attr("y2",function(n,i){return o(this,t),e.getRadarPosition("y",i)}.bind(this)),n.radar_axis_text_show){const i=n.radar_axis_text_position,r=i.x,c=void 0===r?0:r,l=i.y,h=void 0===l?0:l;u.select("text").style("text-anchor","middle").attr("dy",".5em").call(function(e){o(this,t),e.each((function(t){as(Rn(this),t+"",[-.6,1.2])}))}.bind(this)).datum(function(e,n){return o(this,t),{index:n}}.bind(this)).attr("transform",(function(t){Go(this.width)&&(this.width=this.getBoundingClientRect().width/2);let n=e.getRadarPosition("x",t.index,void 0,1),i=Math.round(e.getRadarPosition("y",t.index,void 0,1));return n>s?n+=this.width+c:Math.round(n)a?(i/2===a&&"tspan"===this.firstChild.tagName&&this.firstChild.setAttribute("dy","0em"),i+=h):if&&(f=a),v=l*l*p,(d=Math.max(f/v,v/h))>g){l-=a;break}g=d}y.push(s={value:l,dice:c1?e:1)},n}(tg);function ig(t){if("function"!=typeof t)throw new Error;return t}function rg(){return 0}function og(t){return function(){return t}}function sg(t){var e=0,n=t.children,i=n&&n.length;if(i)for(;--i>=0;)e+=n[i].value;else e=1;t.value=e}function ag(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return cg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cg(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function cg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function lg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0;--o)c.push(i=r[o]=new xg(r[o])),i.parent=n,i.depth=n.depth+1;return a.eachBefore(bg)}function pg(t){return t.children}function vg(t){return Array.isArray(t)?t[1]:null}function yg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function bg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function xg(t){this.data=t,this.depth=this.height=0,this.parent=null}function mg(t,e,n,i,r){var o,s,a=t.children,c=a.length,u=Array(c+1);for(u[0]=s=o=0;o=n-1){var l=a[e];return l.x0=r,l.y0=o,l.x1=s,void(l.y1=c)}var h=u[e],f=i/2+h,d=e+1,g=n-1;for(;d>>1;u[p]c-o){var b=i?(r*y+s*v)/i:s;t(e,d,v,r,o,b,c),t(d,n,y,b,o,s,c)}else{var x=i?(o*y+c*v)/i:c;t(e,d,v,r,o,s,x),t(d,n,y,r,x,s,c)}}(0,c,t.value,e,n,i,r)}function _g(t,e,n,i,r){(1&t.depth?Qd:Jd)(t,e,n,i,r)}xg.prototype=gg.prototype=(hg={constructor:xg,count:function(){return this.eachAfter(sg)},each:function(t,e){let n=-1;for(var i,r=ag(this);!(i=r()).done;){const r=i.value;t.call(e,r,++n,this)}return this},eachAfter:function(t,e){for(var n,i,r,o=this,s=[o],a=[],c=-1;o=s.pop();)if(a.push(o),n=o.children)for(i=0,r=n.length;i=0;--i)o.push(n[i]);return this},find:function(t,e){let n=-1;for(var i,r=ug(this);!(i=r()).done;){const r=i.value;if(t.call(e,r,++n,this))return r}},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;t=n.pop(),e=i.pop();for(;t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)e=e.parent,i.push(e);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return gg(this).eachBefore(yg)}},hg[Symbol.iterator]=dg,hg);var Tg=function t(e){function n(t,n,i,r,o){if((s=t._squarify)&&s.ratio===e)for(var s,a,c,u,l,h=-1,f=s.length,d=t.value;++h1?e:1)},n}(tg);function wg(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ag(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ag(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ag(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0,g=!n||n.indexOf(h)>=0,p=s.classed(Js.SELECTED);s.classed(Ys.line)||s.classed(Ds.area)||(t?d&&g&&c(o)&&!p?f(!0,s.classed(Js.SELECTED,!0),o,h):Ho(i)&&i&&p&&f(!1,s.classed(Js.SELECTED,!1),o,h):d&&g&&c(o)&&p&&f(!1,s.classed(Js.SELECTED,!1),o,h))}))}var fp={selected:function(t){var e=this;const n=this.internal,i=[];return n.$el.main.selectAll("."+(Qs.shapes+n.getTargetSelectorSuffix(t))).selectAll("."+Qs.shape).filter((function(){return Rn(this).classed(Js.SELECTED)})).each(function(t){return o(this,e),i.push(t)}.bind(this)),i},select:function(t,e,n){const i=this.internal;hp.bind(i)(!0,t,e,n)},unselect:function(t,e){const n=this.internal;hp.bind(n)(!1,t,e)}};const dp=function(t){var e=this;const n=this.internal,i=n.axis,r=n.brush,s=n.config,a=n.scale,c=a.x,u=a.subX,l=n.state;let h;if(s.subchart_show)if(h=t,Array.isArray(h)){i.isTimeSeries()&&(h=h.map(function(t){return o(this,e),ks.bind(n)(t)}.bind(this)));n.withinRange(h,n.getZoomDomain("subX",!0),n.getZoomDomain("subX"))&&(l.domain=h,r.move(r.getSelection(),h.map(u)))}else{var f;h=null!=(f=l.domain)?f:c.orgDomain()}return h};ps(dp,{show:function(){const t=this.internal,e=t.$el.subchart,n=t.config,i=n.subchart_show;if(!i){var r,o;t.unbindZoomEvent(),n.subchart_show=!i,e.main||t.initSubchart();let a=e.main.selectAll("."+Ps.target);var s;if(t.data.targets.length!==a.size())t.updateSizes(),t.updateTargetsForSubchart(t.data.targets),a=null==(s=e.main)?void 0:s.selectAll("."+Ps.target);null==(r=a)||r.style("opacity",null),null==(o=e.main)||o.style("display",null),this.resize()}},hide:function(){const t=this.internal,e=t.$el.subchart.main,n=t.config;n.subchart_show&&"none"!==(null==e?void 0:e.style("display"))&&(n.subchart_show=!1,e.style("display","none"),this.resize())},toggle:function(){const t=this.internal.config;this.subchart[t.subchart_show?"hide":"show"]()},reset:function(){const t=this.internal.brush;t.clear(t.getSelection())}});var gp={subchart:dp};function pp(t){return((t=Math.exp(t))+1/t)/2}var vp=function t(e,n,i){function r(t,r){var o,s,a=t[0],c=t[1],u=t[2],l=r[0],h=r[1],f=r[2],d=l-a,g=h-c,p=d*d+g*g;if(p<1e-12)s=Math.log(f/u)/e,o=function(t){return[a+t*d,c+t*g,u*Math.exp(e*t*s)]};else{var v=Math.sqrt(p),y=(f*f-u*u+i*p)/(2*u*n*v),b=(f*f-u*u-i*p)/(2*f*n*v),x=Math.log(Math.sqrt(y*y+1)-y),m=Math.log(Math.sqrt(b*b+1)-b);s=(m-x)/e,o=function(t){var i=t*s,r=pp(x),o=u/(n*v)*(r*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(e*i+x)-function(t){return((t=Math.exp(t))-1/t)/2}(x));return[a+o*d,c+o*g,u*r/pp(e*i+x)]}}return o.duration=1e3*s*e/Math.SQRT2,o}return r.rho=function(e){var n=Math.max(.001,+e),i=n*n;return t(n,i,i*i)},r}(Math.SQRT2,2,4),yp=function(t){var e=this;return o(this,undefined),function(){return o(this,e),t}.bind(this)}.bind(void 0);function bp(t,e){let n=e.sourceEvent,i=e.target,r=e.transform,o=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function xp(t,e,n){this.k=t,this.x=e,this.y=n}xp.prototype={constructor:xp,scale:function(t){return 1===t?this:new xp(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new xp(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var mp=new xp(1,0,0);function _p(t){for(;!t.__zoom;)if(!(t=t.parentNode))return mp;return t.__zoom}function Tp(t){t.stopImmediatePropagation()}function wp(t){t.preventDefault(),t.stopImmediatePropagation()}function Ap(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Sp(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Ep(){return this.__zoom||mp}function kp(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Op(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mp(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}_p.prototype=xp.prototype;const Rp=function(t){var e,n=this;const i=this.internal,r=i.$el,s=i.axis,a=i.config,c=i.org,u=i.scale,l=i.state,h=a.axis_rotated,f=s.isCategorized();let d;if(a.zoom_enabled)if(d=t,Array.isArray(d)){s.isTimeSeries()&&(d=d.map(function(t){return o(this,n),ks.bind(i)(t)}.bind(this)));if(i.withinRange(d,i.getZoomDomain("zoom",!0),i.getZoomDomain("zoom"))){if(l.domain=d,f&&(d=d.map(function(t,e){return o(this,n),+t+(0===e?0:1)}.bind(this))),i.api.tooltip.hide(),a.subchart_show){const t=u.zoom||u.x;i.brush.getSelection().call(i.brush.move,d.map(t))}else{var g;const t=f?u.x.orgScale():c.xScale||u.x,e=[-t(d[0]),0],n=(g=mp.scale(t.range()[1]/(t(d[1])-t(d[0])))).translate.apply(g,h?e.reverse():e);r.eventRect.call(i.zoom.transform,n)}i.setZoomResetButton()}}else d=i.zoom.getDomain();return null!=(e=l.domain)?e:d};ps(Rp,{enable:function(t){const e=this.internal,n=e.config;/^(drag|wheel)$/.test(t)&&(n.zoom_type=t),n.zoom_enabled=!!t,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function(t){const e=this.internal,n=e.config,i=e.org.xDomain;return(0===t||t)&&(n.zoom_x_max=ws("max",[i[1],t])),n.zoom_x_max},min:function(t){const e=this.internal,n=e.config,i=e.org.xDomain;return(0===t||t)&&(n.zoom_x_min=ws("min",[i[0],t])),n.zoom_x_min},range:function(t){const e=this.zoom;if(ns(t)){const n=t.min,i=t.max;Ho(n)&&e.min(n),Ho(i)&&e.max(i)}return{min:e.min(),max:e.max()}}});var Cp={zoom:Rp,unzoom:function(){const t=this.internal,e=t.config,n=t.$el,i=n.eventRect,r=n.zoomResetBtn,o=t.state;t.scale.zoom&&(e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(mp),t.updateZoom(!0),null==r||r.style("display","none"),_p(i.node())!==mp&&t.zoom.transform(i,mp),o.domain=void 0)}},Ip={drag:function(t){var e=this;const n=this,i=n.config,r=n.state,s=n.$el.main,a=i.data_selection_grouped,c=i.interaction_enabled&&i.data_selection_isselectable;if(n.hasArcType()||!i.data_selection_enabled||i.zoom_enabled&&!n.zoom.altDomain||!i.data_selection_multiple)return;const u=r.dragStart||[0,0],l=u[0],h=u[1],f=t[0],d=t[1],g=Math.min(l,f),p=Math.max(l,f),v=a?r.margin.top:Math.min(h,d),y=a?r.height:Math.max(h,d);s.select("."+Xs.dragarea).attr("x",g).attr("y",v).attr("width",p-g).attr("height",y-v),s.selectAll("."+Qs.shapes).selectAll("."+Qs.shape).filter(function(t){return o(this,e),null==c?void 0:c.bind(n.api)(t)}.bind(this)).each((function(t,e){const i=Rn(this),r=i.classed(Js.SELECTED),o=i.classed(Xs.INCLUDED);let s,a=!1;if(i.classed(js.circle)){const t=1*+i.attr("cx"),e=1*+i.attr("cy");s=n.togglePoint,a=g0?r:e]}.bind(this))),a&&s[1].reverse(),this.extent(s),this.update()},e.brush.getSelection=function(){return o(this,t),r.main?r.main.select("."+oa.brush):Rn([])}.bind(this)},initSubchart:function(){var t=this;const e=this,n=e.config,i=e.state,r=i.clip,s=i.hasAxis,a=e.$el,c=a.defs,u=a.svg,l=a.subchart,h=a.axis;if(!s)return;const f=n.subchart_show?null:"hidden",d=r.id+"-subchart",g=e.getClipPath(d);r.idSubchart=d,e.appendClip(c,d),e.initBrush(),l.main=u.append("g").classed(oa.subchart,!0).attr("transform",e.getTranslate("context"));const p=l.main;p.style("visibility",f),p.append("g").attr("clip-path",g).attr("class",oa.chart),["bar","line","bubble","candlestick","scatter"].forEach(function(n){o(this,t);const i=vs(/^(bubble|scatter)$/.test(n)?"circle":n);if(e.hasType(n)||e.hasTypeOf(i)){const t=p.select("."+oa.chart),e=oa["chart"+i+"s"];t.select("."+e).empty()&&t.append("g").attr("class",e)}}.bind(this));const v=p.append("g").attr("clip-path",g).attr("class",oa.brush).call(e.brush);n.subchart_showHandle&&e.addBrushHandle(v),h.subX=p.append("g").attr("class",oa.axisX).attr("transform",e.getTranslate("subX")).attr("clip-path",n.axis_rotated?"":r.pathXAxis).style("visibility",n.subchart_axis_x_show?f:"hidden")},addBrushHandle:function(t){var e=this;const n=this.config,i=n.axis_rotated,r=n.subchart_init_range,s=i?["M 5.2491724,29.749209 a 6,6 0 0 0 -5.50000003,-6.5 H -5.7508276 a 6,6 0 0 0 -6.0000004,6.5 z m -5.00000003,-2 H -6.7508276 m 6.99999997,-2 H -6.7508276Z","M 5.2491724,23.249172 a 6,-6 0 0 1 -5.50000003,6.5 H -5.7508276 a 6,-6 0 0 1 -6.0000004,-6.5 z m -5.00000003,2 H -6.7508276 m 6.99999997,2 H -6.7508276Z"]:["M 0 18 A 6 6 0 0 0 -6.5 23.5 V 29 A 6 6 0 0 0 0 35 Z M -2 23 V 30 M -4 23 V 30Z","M 0 18 A 6 6 0 0 1 6.5 23.5 V 29 A 6 6 0 0 1 0 35 Z M 2 23 V 30 M 4 23 V 30Z"];this.brush.handle=t.selectAll(".handle--custom").data(i?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class","handle--custom").attr("cursor",(i?"ns":"ew")+"-resize").attr("d",function(t){return o(this,e),s[+/[se]/.test(t.type)]}.bind(this)).attr("display",r?null:"none")},updateTargetsForSubchart:function(t){var e=this;const n=this,i=n.config,r=n.state,s=n.$el.subchart.main;i.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter(function(t){return o(this,e),n.hasType(t)||n.hasTypeOf(vs(t))}.bind(this)).forEach(function(i){o(this,e);const r=/^(bubble|scatter)$/.test(i),a=vs(r?"circle":i),c=n.getChartClass(a,!0),u=n.getClass(r?"circles":i+"s",!0),l=s.select("."+oa["chart"+a+"s"]);if(r){const e=l.selectAll("."+oa.circles).data(t.filter(n["is"+vs(i)+"Type"].bind(n))).attr("class",u);e.exit().remove(),e.enter().append("g").attr("class",u)}else{const e=l.selectAll("."+oa["chart"+a]).attr("class",c).data(t.filter(n["is"+a+"Type"].bind(n))),r=e.enter().append("g").style("opacity","0").attr("class",c).append("g").attr("class",u);e.exit().remove(),"line"===i&&n.hasTypeOf("Area")&&r.append("g").attr("class",n.getClass("areas",!0))}}.bind(this)),s.selectAll("."+oa.brush+" rect").attr(i.axis_rotated?"width":"height",i.axis_rotated?r.width2:r.height2))},redrawSubchart:function(t,e,n){var i=this;const r=this,s=r.config,a=r.$el.subchart.main,c=r.state,u=!!e;var l;if((a.style("visibility",s.subchart_show?null:"hidden"),s.subchart_show)&&("zoom"===(null==(l=c.event)?void 0:l.type)&&r.brush.update(),t)){const t=s.subchart_init_range;if(gs(r)||r.brush.update(),Object.keys(n.type).forEach(function(t){o(this,i);const e=vs(t),s=r["generateDraw"+e](n.indices[t],!0);r["update"+e](u,!0),r["redraw"+e](s,u,!0)}.bind(this)),r.hasType("bubble")||r.hasType("scatter")){const t=n.pos.cx,e=r.updateCircleY(!0);r.updateCircle(!0),r.redrawCircle(t,e,u,void 0,!0)}!c.rendered&&t&&(c.domain=t,r.brush.move(r.brush.getSelection(),t.map(r.scale.x)))}},redrawForBrush:function(t){var e;void 0===t&&(t=!0);const n=this,i=n.config,r=i.subchart_onbrush,o=i.zoom_rescale,s=n.scale,a=n.state;n.redraw({withTransition:!1,withY:o,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&a.rendered&&r.bind(n.api)(null!=(e=a.domain)?e:s.x.orgDomain())},transformContext:function(t,e){const n=this,i=n.$el.subchart,r=n.$T,o=null!=e&&e.axisSubX?e.axisSubX:r(i.main.select("."+oa.axisX),t);i.main.attr("transform",n.getTranslate("context")),o.attr("transform",n.getTranslate("subX"))},getExtent:function(){var t=this;const e=this,n=e.config,i=e.scale;let r=n.axis_x_extent;if(r)if(Uo(r))r=r.bind(e.api)(e.getXDomain(e.data.targets),i.subX);else if(e.axis.isTimeSeries()&&r.every(isNaN)){const n=ks.bind(e);r=r.map(function(e){return o(this,t),i.subX(n(e))}.bind(this))}return r}},zp={initZoom:function(){const t=this;t.scale.zoom=null,t.generateZoom(),t.initZoomBehaviour()},bindZoomEvent:function(t){void 0===t&&(t=!0);const e=this,n=e.config;n.zoom_enabled&&t?n.subchart_show||e.bindZoomOnEventRect():!1===t&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom:function(){var t=this;const e=this,n=e.config,i=e.org,r=e.scale,s=function(){var t,e,n,i=Ap,r=Sp,o=Mp,s=kp,a=Op,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],l=250,h=vp,f=Kn("start","zoom","end"),d=0,g=10;function p(t){t.property("__zoom",Ep).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",A).filter(a).on("touchstart.zoom",S).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(c[0],Math.min(c[1],e)))===t.k?t:new xp(e,t.x,t.y)}function y(t,e,n){var i=e[0]-n[0]*t.k,r=e[1]-n[1]*t.k;return i===t.x&&r===t.y?t:new xp(t.k,i,r)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,e,n,i){t.on("start.zoom",(function(){m(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){m(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,o=arguments,s=m(t,o).event(i),a=r.apply(t,o),c=null==n?b(a):"function"==typeof n?n.apply(t,o):n,u=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=t.__zoom,f="function"==typeof e?e.apply(t,o):e,d=h(l.invert(c).concat(u/l.k),f.invert(c).concat(u/f.k));return function(t){if(1===t)t=f;else{var e=d(t),n=u/e[2];t=new xp(n,c[0]-e[0]*n,c[1]-e[1]*n)}s.zoom(null,t)}}))}function m(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=r.apply(t,e),this.taps=0}function T(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r1?e-1:0),s=1;sd}c.event(t).zoom("mouse",o(y(c.that.__zoom,c.mouse[0]=Vn(t,a),c.mouse[1]),c.extent,u))}),!0).on("mouseup.zoom",(function(t){l.on("mousemove.zoom mouseup.zoom",null),ii(t.view,c.moved),wp(t),c.event(t).end()}),!0),h=Vn(t,a),f=t.clientX,g=t.clientY;ni(t.view),Tp(t),c.mouse=[h,this.__zoom.invert(h)],Rr(this),c.start()}}function A(t){for(var e=arguments.length,n=Array(e>1?e-1:0),s=1;s0?Rn(this).transition().duration(l).call(x,d,c,t):Rn(this).call(p.transform,d,c,t)}}function S(n){for(var r=arguments.length,o=Array(r>1?r-1:0),s=1;s1?e-1:0),i=1;i1?i-1:0),o=1;o-1&&1===(null==u?void 0:u.touches.length))return;t.sourceEvent&&(a.zooming=!0,a.domain=void 0);const h="mousemove"===(null==u?void 0:u.type),f=(null==u?void 0:u.wheelDelta)<0,d=t.transform;!h&&f&&s.x.domain().every(function(t,e){return o(this,n),t!==c.xDomain[e]}.bind(this))&&s.x.domain(c.xDomain),i.zoom.updateTransformScale(d,"wheel"===r.zoom_type&&u);const g=r.transition_duration>0&&!r.subchart_show&&(a.dragging||l||!t.sourceEvent);i.redraw({withTransition:g,withY:r.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),i.state.cancelClick=h,l||rs(r.zoom_onzoom,i.api,null!=(e=i.state.domain)?e:i.zoom.getDomain())},onZoomEnd:function(t){var e,n;const i=this,r=i.config,o=i.state;let s=i.zoom.startEvent,a=null==t?void 0:t.sourceEvent;const c=(null==t?void 0:t.transform)===mp;var u;(null==(e=s)?void 0:e.type.indexOf("touch"))>-1&&(s=s.changedTouches[0],a=null==(u=a)||null==(u=u.changedTouches)?void 0:u[0]);"drag"===r.zoom_type&&a&&s.clientX===a.clientX&&s.clientY===a.clientY||(i.redrawEventRect(),i.updateZoom(),o.zooming=!1,!c&&(a||o.dragging)&&rs(r.zoom_onzoomend,i.api,null!=(n=i.state.domain)?n:i.zoom.getDomain()))},updateZoom:function(t){const e=this,n=e.scale,i=n.subX,r=n.x,o=n.zoom;if(o){const n=o.domain(),s=i.domain(),a=.015,c=e.config.axis_x_inverted?(n[0]>=s[0]||n[0]+a>=s[0])&&(s[1]>=n[1]||s[1]>=n[1]+a):(n[0]<=s[0]||n[0]-a<=s[0])&&(s[1]<=n[1]||s[1]<=n[1]-a);(t||c)&&(e.axis.x.scale(i),r.domain(i.orgDomain()),e.scale.zoom=null)}},bindZoomOnEventRect:function(){var t=this;const e=this,n=e.config,i=e.$el.eventRect,r="drag"===n.zoom_type?e.zoomBehaviour:e.zoom;e.$el.svg.on("wheel",function(){o(this,t)}.bind(this)),i.call(r).on("dblclick.zoom",null)},initZoomBehaviour:function(){var t=this;const e=this,n=e.config,i=e.state,r=n.axis_rotated;let s,a=0,c=0;const u={axis:r?"y":"x",attr:r?"height":"width",index:r?1:0};e.zoomBehaviour=dc().clickDistance(4).on("start",(function(t){i.event=t,e.setDragStatus(!0),e.unselectRect(),s||(s=e.$el.main.append("rect").attr("clip-path",i.clip.path).attr("class",ra.zoomBrush).attr("width",r?i.width:0).attr("height",r?0:i.height)),a=us(t,this)[u.index],c=a,s.attr(u.axis,a).attr(u.attr,0),e.onZoomStart(t)})).on("drag",(function(t){c=us(t,this)[u.index],s.attr(u.axis,Math.min(a,c)).attr(u.attr,Math.abs(c-a))})).on("end",function(n){var r=this;o(this,t);const l=e.scale.zoom||e.scale.x;if(i.event=n,s.attr(u.axis,0).attr(u.attr,0),a>c){var h=[c,a];a=h[0],c=h[1]}a<0&&(c+=Math.abs(a),a=0),a!==c&&e.api.zoom([a,c].map(function(t){return o(this,r),l.invert(t)}.bind(this))),e.setDragStatus(!1)}.bind(this))},setZoomResetButton:function(){const t=this,e=t.config,n=t.$el,i=e.zoom_resetButton;i&&"drag"===e.zoom_type&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(Ps.button,!0).append("span").on("click",(function(){Uo(i.onclick)&&i.onclick.bind(t.api)(this),t.api.unzoom()})).classed(ra.buttonZoomReset,!0).text(i.text||"Reset Zoom"))}},Fp=void 0,jp={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return o(this,Fp),!0}.bind(void 0),data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:function(){o(this,Fp)}.bind(void 0),data_onunselected:function(){o(this,Fp)}.bind(void 0)},Bp={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:function(){o(this,undefined)}.bind(void 0)},Xp={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0},$p=void 0;let Up=function(){var t=this;return o(this,$p),ps(Ch.prototype,Dp),ps(Hh.prototype,fp),ma.setOptions([jp]),(Up=function(){return o(this,t),!0}.bind(this))()}.bind(void 0),Yp=function(){var t=this;return o(this,$p),ps(Ch.prototype,Np),ps(Hh.prototype,gp),ma.setOptions([Bp]),(Yp=function(){return o(this,t),!0}.bind(this))()}.bind(void 0),Vp=function(){var t=this;return o(this,$p),ps(Ch.prototype,zp),ps(Hh.prototype,Cp),ma.setOptions([Xp]),(Vp=function(){return o(this,t),!0}.bind(this))()}.bind(void 0),Gp={};const Hp={version:"3.9.3-nightly-20230822004557",generate:function(t){const e=_s({},Gp,t),n=new Hh(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults:function(t){return ns(t)&&(Gp=t),Gp},instance:[],plugin:{}};var Wp=void 0;Object.keys(i).forEach(function(t){return o(this,Wp),i[t]()}.bind(void 0)),Object.keys(r).forEach(function(t){return o(this,Wp),r[t]()}.bind(void 0))},function(t,e,n){var i=n(528)();t.exports=i;try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},function(t,e,n){var i=n(529).default;function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=r=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,o=n.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,n){return t[e]=n}}function f(t,e,n,i){var r=e&&e.prototype instanceof p?e:p,o=Object.create(r.prototype),a=new O(i||[]);return s(o,"_invoke",{value:A(t,n,a)}),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var g={};function p(){}function v(){}function y(){}var b={};h(b,c,(function(){return this}));var x=Object.getPrototypeOf,m=x&&x(x(M([])));m&&m!==n&&o.call(m,c)&&(b=m);var _=y.prototype=p.prototype=Object.create(b);function T(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(r,s,a,c){var u=d(t[r],t,s);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==i(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var r;s(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,r){n(t,i,e,r)}))}return r=r?r.then(o,o):o()}})}function A(t,e,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return{value:void 0,done:!0}}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=S(s,n);if(a){if(a===g)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=d(t,e,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function S(t,e){var n=e.method,i=t.iterator[n];if(void 0===i)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var r=d(i,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function M(t){if(t||""===t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n=0;--i){var r=this.tryEntries[i],s=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var a=o.call(r,"catchLoc"),c=o.call(r,"finallyLoc");if(a&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;k(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),g}},e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}],e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}return n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(0),n(526)}()})); \ No newline at end of file diff --git a/dist/plugin/billboardjs-plugin-bubblecompare.js b/dist/plugin/billboardjs-plugin-bubblecompare.js index f8b87e2ba..7033ae6ce 100644 --- a/dist/plugin/billboardjs-plugin-bubblecompare.js +++ b/dist/plugin/billboardjs-plugin-bubblecompare.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ @@ -186,7 +186,7 @@ let Plugin = /*#__PURE__*/function () { }; return Plugin; }(); -Plugin.version = "3.9.3-nightly-20230819004547"; +Plugin.version = "3.9.3-nightly-20230822004557"; ;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts diff --git a/dist/plugin/billboardjs-plugin-bubblecompare.min.js b/dist/plugin/billboardjs-plugin-bubblecompare.min.js index dc1c7aaf5..5fa9c192a 100644 --- a/dist/plugin/billboardjs-plugin-bubblecompare.min.js +++ b/dist/plugin/billboardjs-plugin-bubblecompare.min.js @@ -5,8 +5,8 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e={288:function(e){e.exports=t}},n={};function i(t){var o=n[t];if(void 0!==o)return o.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,i),r.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var o={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(o,{default:function(){return u}});var r=i(288);let s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.9.3-nightly-20230819004547";let u=function(i){var o,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(o=u).prototype=Object.create(s.prototype),o.prototype.constructor=o,n(o,s);var c=u.prototype;return c.$init=function(){const t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},c.pointExpandedR=function(t){const e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,r.select)(t.node().parentNode.parentNode).raise()},c.changeCursorPoint=function(){this.$$.$el.eventRect.style("cursor","pointer")},c.findClosest=function(e,n){var i=this;const o=this.$$;return e.filter(function(e){return t(this,i),e&&!o.isBarType(e.id)}.bind(this)).reduce(function(e,r){t(this,i);return o.dist(r,n)0&&a===c?0:s/a;return Math.abs(f)*(r-o)+o},c.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),o=o.default}()})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e={288:function(e){e.exports=t}},n={};function i(t){var o=n[t];if(void 0!==o)return o.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,i),r.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var o={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(o,{default:function(){return u}});var r=i(288);let s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.9.3-nightly-20230822004557";let u=function(i){var o,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(o=u).prototype=Object.create(s.prototype),o.prototype.constructor=o,n(o,s);var c=u.prototype;return c.$init=function(){const t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},c.pointExpandedR=function(t){const e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,r.select)(t.node().parentNode.parentNode).raise()},c.changeCursorPoint=function(){this.$$.$el.eventRect.style("cursor","pointer")},c.findClosest=function(e,n){var i=this;const o=this.$$;return e.filter(function(e){return t(this,i),e&&!o.isBarType(e.id)}.bind(this)).reduce(function(e,r){t(this,i);return o.dist(r,n)0&&a===c?0:s/a;return Math.abs(f)*(r-o)+o},c.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),o=o.default}()})); \ No newline at end of file diff --git a/dist/plugin/billboardjs-plugin-sparkline.js b/dist/plugin/billboardjs-plugin-sparkline.js index 3e0f54ccc..5f07c8307 100644 --- a/dist/plugin/billboardjs-plugin-sparkline.js +++ b/dist/plugin/billboardjs-plugin-sparkline.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ @@ -401,7 +401,7 @@ let Plugin = /*#__PURE__*/function () { }; return Plugin; }(); -Plugin.version = "3.9.3-nightly-20230819004547"; +Plugin.version = "3.9.3-nightly-20230822004557"; ;// CONCATENATED MODULE: ./src/Plugin/sparkline/Options.ts /** diff --git a/dist/plugin/billboardjs-plugin-sparkline.min.js b/dist/plugin/billboardjs-plugin-sparkline.min.js index 3ced6246d..8761d16ea 100644 --- a/dist/plugin/billboardjs-plugin-sparkline.min.js +++ b/dist/plugin/billboardjs-plugin-sparkline.min.js @@ -5,8 +5,8 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.sparkline=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n={514:function(t){t.exports=e},288:function(e){e.exports=t}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={exports:{}};return n[t](o,o.exports,r),o.exports}r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var o={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}function c(t,e,n){return(e=s(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function b(t){for(var e,n=1;n1?i-1:0),o=1;o0}.bind(this);i(n.axis_x_padding)&&(n.axis_x_padding={left:15,right:15,unit:"px"}),i(n.axis_y_padding)&&(n.axis_y_padding=5)}n.axis_y_show=!1,n.tooltip_position||(n.tooltip_position=function(t,e,n){const i=this.internal.state.event;let r=i.pageY-1.35*n,o=i.pageX-e/2;return r<0&&(r=0),o<0&&(o=0),{top:r,left:o}})},c.$init=function(){var t;const e=this.$$.$el;e.chart.style("width","0").style("height","0").style("pointer-events","none"),(null==(t=e.tooltip)?void 0:t.node())&&document.body.appendChild(e.tooltip.node())},c.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},c.bindEvents=function(e){var n=this;void 0===e&&(e=!0);const i=this.$$.config;if(i.interaction_enabled&&i.tooltip_show){const i=(e?"add":"remove")+"EventListener";this.element.forEach(function(e){t(this,n);const r=e.querySelector("svg");r[i]("mouseover",this.overHandler),r[i]("mousemove",this.moveHandler),r[i]("mouseout",this.outHandler)}.bind(this))}},c.overHandler=function(t){this.$$.state.eventReceiver.rect=t.target.getBoundingClientRect()},c.moveHandler=function(t){var e,n;const i=this.$$,r=i.getDataIndexFromEvent(t),o=null==(e=i.api.data(t.target.__id))?void 0:e[0],s=null==o||null==(n=o.values)?void 0:n[r];s&&!s.name&&(s.name=s.id),i.state.event=t,i.config.point_focus_only&&s&&(null==i.showCircleFocus||i.showCircleFocus([s])),i.setExpand(r,o.id,!0),i.showTooltip([s],t.target)},c.outHandler=function(t){const e=this.$$;e.state.event=t,e.config.point_focus_only?e.hideCircleFocus():e.unexpandCircles(),e.hideTooltip()},c.$redraw=function(){var e,n=this;const i=this.$$,r=i.$el;let o=this.element;const s=i.api.data(),c=null==(e=r.chart.html().match(/]*>/))?void 0:e[0];if(o.length0;e--)t.parentNode.insertBefore(o[0].cloneNode(),t.nextSibling);this.element=document.querySelectorAll(this.config.selector),o=this.element}s.map(function(e){return t(this,n),e.id}.bind(this)).forEach(function(e,i){t(this,n);const s="."+l.target+"-"+e,a=r.main.selectAll(s);let b=o[i].querySelector("svg");b||(o[i].innerHTML=c+"",b=o[i].querySelector("svg"),b.__id=e),b.querySelector(s)||a.style("opacity",null),a.style("fill","none").style("opacity",null),b.innerHTML="",b.appendChild(a.node())}.bind(this))},c.$willDestroy=function(){var e=this;this.bindEvents(!1),this.element.forEach(function(n){t(this,e),n.innerHTML=""}.bind(this))},s}(u);A.version="0.0.1"}(),o=o.default}()})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.sparkline=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n={514:function(t){t.exports=e},288:function(e){e.exports=t}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={exports:{}};return n[t](o,o.exports,r),o.exports}r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var o={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}function c(t,e,n){return(e=s(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function b(t){for(var e,n=1;n1?i-1:0),o=1;o0}.bind(this);i(n.axis_x_padding)&&(n.axis_x_padding={left:15,right:15,unit:"px"}),i(n.axis_y_padding)&&(n.axis_y_padding=5)}n.axis_y_show=!1,n.tooltip_position||(n.tooltip_position=function(t,e,n){const i=this.internal.state.event;let r=i.pageY-1.35*n,o=i.pageX-e/2;return r<0&&(r=0),o<0&&(o=0),{top:r,left:o}})},c.$init=function(){var t;const e=this.$$.$el;e.chart.style("width","0").style("height","0").style("pointer-events","none"),(null==(t=e.tooltip)?void 0:t.node())&&document.body.appendChild(e.tooltip.node())},c.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},c.bindEvents=function(e){var n=this;void 0===e&&(e=!0);const i=this.$$.config;if(i.interaction_enabled&&i.tooltip_show){const i=(e?"add":"remove")+"EventListener";this.element.forEach(function(e){t(this,n);const r=e.querySelector("svg");r[i]("mouseover",this.overHandler),r[i]("mousemove",this.moveHandler),r[i]("mouseout",this.outHandler)}.bind(this))}},c.overHandler=function(t){this.$$.state.eventReceiver.rect=t.target.getBoundingClientRect()},c.moveHandler=function(t){var e,n;const i=this.$$,r=i.getDataIndexFromEvent(t),o=null==(e=i.api.data(t.target.__id))?void 0:e[0],s=null==o||null==(n=o.values)?void 0:n[r];s&&!s.name&&(s.name=s.id),i.state.event=t,i.config.point_focus_only&&s&&(null==i.showCircleFocus||i.showCircleFocus([s])),i.setExpand(r,o.id,!0),i.showTooltip([s],t.target)},c.outHandler=function(t){const e=this.$$;e.state.event=t,e.config.point_focus_only?e.hideCircleFocus():e.unexpandCircles(),e.hideTooltip()},c.$redraw=function(){var e,n=this;const i=this.$$,r=i.$el;let o=this.element;const s=i.api.data(),c=null==(e=r.chart.html().match(/]*>/))?void 0:e[0];if(o.length0;e--)t.parentNode.insertBefore(o[0].cloneNode(),t.nextSibling);this.element=document.querySelectorAll(this.config.selector),o=this.element}s.map(function(e){return t(this,n),e.id}.bind(this)).forEach(function(e,i){t(this,n);const s="."+l.target+"-"+e,a=r.main.selectAll(s);let b=o[i].querySelector("svg");b||(o[i].innerHTML=c+"",b=o[i].querySelector("svg"),b.__id=e),b.querySelector(s)||a.style("opacity",null),a.style("fill","none").style("opacity",null),b.innerHTML="",b.appendChild(a.node())}.bind(this))},c.$willDestroy=function(){var e=this;this.bindEvents(!1),this.element.forEach(function(n){t(this,e),n.innerHTML=""}.bind(this))},s}(u);A.version="0.0.1"}(),o=o.default}()})); \ No newline at end of file diff --git a/dist/plugin/billboardjs-plugin-stanford.js b/dist/plugin/billboardjs-plugin-stanford.js index 480c9f2ab..551fa1d4a 100644 --- a/dist/plugin/billboardjs-plugin-stanford.js +++ b/dist/plugin/billboardjs-plugin-stanford.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ @@ -1395,7 +1395,7 @@ let Plugin = /*#__PURE__*/function () { }; return Plugin; }(); -Plugin.version = "3.9.3-nightly-20230819004547"; +Plugin.version = "3.9.3-nightly-20230822004557"; ;// CONCATENATED MODULE: ./src/Plugin/stanford/Options.ts /** diff --git a/dist/plugin/billboardjs-plugin-stanford.min.js b/dist/plugin/billboardjs-plugin-stanford.min.js index 1aad693fc..e9228a585 100644 --- a/dist/plugin/billboardjs-plugin-stanford.min.js +++ b/dist/plugin/billboardjs-plugin-stanford.min.js @@ -5,8 +5,8 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):"function"==typeof define&&define.amd?define("bb",["d3-interpolate","d3-color","d3-scale","d3-selection","d3-brush","d3-axis","d3-format"],e):"object"==typeof exports?exports.bb=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.stanford=e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,n,i,r,o,s){return function(){"use strict";var a={272:function(t){t.exports=o},514:function(t){t.exports=r},947:function(t){t.exports=e},936:function(t){t.exports=s},560:function(e){e.exports=t},379:function(t){t.exports=n},288:function(t){t.exports=i}},c={};function l(t){var e=c[t];if(void 0!==e)return e.exports;var n=c[t]={exports:{}};return a[t](n,n.exports,l),n.exports}l.d=function(t,e){for(var n in e)l.o(e,n)&&!l.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var b={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}l.d(b,{default:function(){return K}});var i=l(560),r=l(947),o=l(379);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t){var e=function(t,e){if("object"!==s(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===s(e)?e:String(e)}function c(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function d(t){for(var e,n=1;n1?i-1:0),o=1;oe.epochs?1:0}function V(t){const e=function(t){let e,n,i=0;for(let r=0,o=t.length,s=o-1;r';return n.forEach(function(e){t(this,s);const n=e.id,l=void 0===n?"":n,b=e.value,u=void 0===b?0:b,d=e.epochs,f=void 0===d?0:d,p=e.x;c+="\n\t\t\t\t\t\t\t"+(a||"")+'\n\t\t\t\t\t\t\t'+i(void 0===p?"":p)+"\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t"+e.id+'\n\t\t\t\t\t\t\t'+r(u)+'\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEpochs\n\t\t\t\t\t\t\t'+r(f)+"\n\t\t\t\t\t\t"}.bind(this)),c+""})},b.countEpochsInRegion=function(e){var n=this;const i=this.data.targets[0],r=i.values.reduce(function(e,i){return t(this,n),e+ +i.epochs}.bind(this),0),o=i.values.reduce(function(i,r){return t(this,n),function(t,e){const n=t.x,i=t.value;let r=!1;for(let t=0,o=e.length-1;ti!=l>i&&n<(c-s)*(i-a)/(l-a)+s&&(r=!r)}return r}(r,e)?i+ +r.epochs:i}.bind(this),0);return{value:o,percentage:0!==o?+(o/r*100).toFixed(1):0}},l}(q)}(),b=b.default}()})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):"function"==typeof define&&define.amd?define("bb",["d3-interpolate","d3-color","d3-scale","d3-selection","d3-brush","d3-axis","d3-format"],e):"object"==typeof exports?exports.bb=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.stanford=e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,n,i,r,o,s){return function(){"use strict";var a={272:function(t){t.exports=o},514:function(t){t.exports=r},947:function(t){t.exports=e},936:function(t){t.exports=s},560:function(e){e.exports=t},379:function(t){t.exports=n},288:function(t){t.exports=i}},c={};function l(t){var e=c[t];if(void 0!==e)return e.exports;var n=c[t]={exports:{}};return a[t](n,n.exports,l),n.exports}l.d=function(t,e){for(var n in e)l.o(e,n)&&!l.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var b={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}l.d(b,{default:function(){return K}});var i=l(560),r=l(947),o=l(379);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t){var e=function(t,e){if("object"!==s(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===s(e)?e:String(e)}function c(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function d(t){for(var e,n=1;n1?i-1:0),o=1;oe.epochs?1:0}function V(t){const e=function(t){let e,n,i=0;for(let r=0,o=t.length,s=o-1;r';return n.forEach(function(e){t(this,s);const n=e.id,l=void 0===n?"":n,b=e.value,u=void 0===b?0:b,d=e.epochs,f=void 0===d?0:d,p=e.x;c+="\n\t\t\t\t\t\t\t"+(a||"")+'\n\t\t\t\t\t\t\t'+i(void 0===p?"":p)+"\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t"+e.id+'\n\t\t\t\t\t\t\t'+r(u)+'\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEpochs\n\t\t\t\t\t\t\t'+r(f)+"\n\t\t\t\t\t\t"}.bind(this)),c+""})},b.countEpochsInRegion=function(e){var n=this;const i=this.data.targets[0],r=i.values.reduce(function(e,i){return t(this,n),e+ +i.epochs}.bind(this),0),o=i.values.reduce(function(i,r){return t(this,n),function(t,e){const n=t.x,i=t.value;let r=!1;for(let t=0,o=e.length-1;ti!=l>i&&n<(c-s)*(i-a)/(l-a)+s&&(r=!r)}return r}(r,e)?i+ +r.epochs:i}.bind(this),0);return{value:o,percentage:0!==o?+(o/r*100).toFixed(1):0}},l}(q)}(),b=b.default}()})); \ No newline at end of file diff --git a/dist/plugin/billboardjs-plugin-tableview.js b/dist/plugin/billboardjs-plugin-tableview.js index 2f9695aa1..eb9533ed2 100644 --- a/dist/plugin/billboardjs-plugin-tableview.js +++ b/dist/plugin/billboardjs-plugin-tableview.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ @@ -236,7 +236,7 @@ let Plugin = /*#__PURE__*/function () { }; return Plugin; }(); -Plugin.version = "3.9.3-nightly-20230819004547"; +Plugin.version = "3.9.3-nightly-20230822004557"; ;// CONCATENATED MODULE: ./src/Plugin/tableview/Options.ts /** diff --git a/dist/plugin/billboardjs-plugin-tableview.min.js b/dist/plugin/billboardjs-plugin-tableview.min.js index 67de7da07..f968e6dc5 100644 --- a/dist/plugin/billboardjs-plugin-tableview.min.js +++ b/dist/plugin/billboardjs-plugin-tableview.min.js @@ -5,8 +5,8 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.tableview=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n={514:function(t){t.exports=e},288:function(e){e.exports=t}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,o),r.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,n||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===t(n)?n:String(n)}function n(t,n,i){return(n=e(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}o.d(r,{default:function(){return B}});let u=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach(function(e){i(this,t),this[e]=null,delete this[e]}.bind(this))},t}();u.version="3.9.3-nightly-20230819004547";let l=function(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){let e=t;return this.$$.axis.isCategorized()?e=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(e=t.toLocaleDateString()),e},class:void 0,style:!0,title:void 0,updateOnToggle:!0}};const a="__tableview-style__",f="bb-tableview",b=".bb-tableview {\n\t\tborder-collapse:collapse;\n\t\tborder-spacing:0;\n\t\tbackground:#fff;\n\t\tmin-width:100%;\n\t\tmargin-top:10px;\n\t\tfont-family:sans-serif;\n\t\tfont-size:.9em;\n\t}\n\t.bb-tableview tr:hover {\n\t\tbackground:#eef7ff;\n\t}\n\t.bb-tableview thead tr {\n\t\tbackground:#f8f8f8;\n\t}\n\t.bb-tableview caption,.bb-tableview td,.bb-tableview th {\n\t\ttext-align: center;\n\t\tborder:1px solid silver;\n\t\tpadding:.5em;\n\t}\n\t.bb-tableview caption {\n\t\tfont-size:1.1em;\n\t\tfont-weight:700;\n\t\tmargin-bottom: -1px;\n\t}",d="{=title}\n\t\t{=thead}\n\t\t{=tbody}",h='{=title}',p='{=value}',v="{=value}";o(288),o(514);var g=void 0;const y=function(){i(this,g);return"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)(),m="function"==typeof y.requestAnimationFrame,w="function"==typeof y.requestIdleCallback,O=m?y.requestAnimationFrame:function(t){return i(this,g),setTimeout(t,1)}.bind(void 0),j=m?y.cancelAnimationFrame:function(t){return i(this,g),clearTimeout(t)}.bind(void 0),E=(w&&y.requestIdleCallback,w&&y.cancelIdleCallback,null==y?void 0:y.document);var T=void 0;(function(t){return i(this,T),t||0===t}).bind(void 0),function(t){return i(this,T),"function"==typeof t}.bind(void 0);const $=function(t){return i(this,T),"string"==typeof t}.bind(void 0),x=function(t){return i(this,T),"number"==typeof t}.bind(void 0),S=function(t){return i(this,T),void 0===t}.bind(void 0),P=function(t){return i(this,T),void 0!==t}.bind(void 0),C=(function(t){return i(this,T),"boolean"==typeof t}.bind(void 0),function(t){return i(this,T),10*Math.ceil(t/10)}.bind(void 0),function(t){return i(this,T),Math.ceil(t)+.5}.bind(void 0),function(t){return i(this,T),t[1]-t[0]}.bind(void 0),function(t){return i(this,T),"object"==typeof t}.bind(void 0)),k=function(t){return i(this,T),S(t)||null===t||$(t)&&0===t.length||C(t)&&!(t instanceof Date)&&0===Object.keys(t).length||x(t)&&isNaN(t)}.bind(void 0),M=(function(t){return i(this,T),!k(t)}.bind(void 0),function(t){return i(this,T),Array.isArray(t)}.bind(void 0)),_=function(t){return i(this,T),t&&!(null!=t&&t.nodeType)&&C(t)&&!M(t)}.bind(void 0);(function(t){return i(this,T),t.charAt(0).toUpperCase()+t.slice(1)}).bind(void 0);(function(t){return i(this,T),[].slice.call(t)}).bind(void 0);function q(t){for(var e=this,n=arguments.length,o=Array(n>1?n-1:0),r=1;r"+e.map(function(t,e){return i(this,o),A(e?v:p,{value:0===e?n.categoryFormat.bind(this)(t):x(t)?t.toLocaleString():""})}.bind(this)).join("")+""}.bind(this));const l=A(d,I(I({},n),{},{title:n.title||e.config.title_text||"",thead:c,tbody:s})).replace(/(<\/?(script|img)[^>]*>|<[^>]+><\/[^>]+>)/gi,"");o.innerHTML=l},r.$redraw=function(){const t=this.$$.state;t.resizing||!this.config.updateOnToggle&&t.toggling||this.generateTable()},r.$willDestroy=function(){var t;if(null==(t=this.element.parentNode)||t.removeChild(this.element),1===this.$$.charts.length){var e;const t=document.getElementById(a);null==t||null==(e=t.parentNode)||e.removeChild(t)}},o}(u)}(),r=r.default}()})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.tableview=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n={514:function(t){t.exports=e},288:function(e){e.exports=t}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,o),r.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,n||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===t(n)?n:String(n)}function n(t,n,i){return(n=e(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}o.d(r,{default:function(){return B}});let u=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach(function(e){i(this,t),this[e]=null,delete this[e]}.bind(this))},t}();u.version="3.9.3-nightly-20230822004557";let l=function(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){let e=t;return this.$$.axis.isCategorized()?e=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(e=t.toLocaleDateString()),e},class:void 0,style:!0,title:void 0,updateOnToggle:!0}};const a="__tableview-style__",f="bb-tableview",b=".bb-tableview {\n\t\tborder-collapse:collapse;\n\t\tborder-spacing:0;\n\t\tbackground:#fff;\n\t\tmin-width:100%;\n\t\tmargin-top:10px;\n\t\tfont-family:sans-serif;\n\t\tfont-size:.9em;\n\t}\n\t.bb-tableview tr:hover {\n\t\tbackground:#eef7ff;\n\t}\n\t.bb-tableview thead tr {\n\t\tbackground:#f8f8f8;\n\t}\n\t.bb-tableview caption,.bb-tableview td,.bb-tableview th {\n\t\ttext-align: center;\n\t\tborder:1px solid silver;\n\t\tpadding:.5em;\n\t}\n\t.bb-tableview caption {\n\t\tfont-size:1.1em;\n\t\tfont-weight:700;\n\t\tmargin-bottom: -1px;\n\t}",d="{=title}\n\t\t{=thead}\n\t\t{=tbody}",h='{=title}',p='{=value}',v="{=value}";o(288),o(514);var g=void 0;const y=function(){i(this,g);return"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)(),m="function"==typeof y.requestAnimationFrame,w="function"==typeof y.requestIdleCallback,O=m?y.requestAnimationFrame:function(t){return i(this,g),setTimeout(t,1)}.bind(void 0),j=m?y.cancelAnimationFrame:function(t){return i(this,g),clearTimeout(t)}.bind(void 0),E=(w&&y.requestIdleCallback,w&&y.cancelIdleCallback,null==y?void 0:y.document);var T=void 0;(function(t){return i(this,T),t||0===t}).bind(void 0),function(t){return i(this,T),"function"==typeof t}.bind(void 0);const $=function(t){return i(this,T),"string"==typeof t}.bind(void 0),x=function(t){return i(this,T),"number"==typeof t}.bind(void 0),S=function(t){return i(this,T),void 0===t}.bind(void 0),P=function(t){return i(this,T),void 0!==t}.bind(void 0),C=(function(t){return i(this,T),"boolean"==typeof t}.bind(void 0),function(t){return i(this,T),10*Math.ceil(t/10)}.bind(void 0),function(t){return i(this,T),Math.ceil(t)+.5}.bind(void 0),function(t){return i(this,T),t[1]-t[0]}.bind(void 0),function(t){return i(this,T),"object"==typeof t}.bind(void 0)),k=function(t){return i(this,T),S(t)||null===t||$(t)&&0===t.length||C(t)&&!(t instanceof Date)&&0===Object.keys(t).length||x(t)&&isNaN(t)}.bind(void 0),M=(function(t){return i(this,T),!k(t)}.bind(void 0),function(t){return i(this,T),Array.isArray(t)}.bind(void 0)),_=function(t){return i(this,T),t&&!(null!=t&&t.nodeType)&&C(t)&&!M(t)}.bind(void 0);(function(t){return i(this,T),t.charAt(0).toUpperCase()+t.slice(1)}).bind(void 0);(function(t){return i(this,T),[].slice.call(t)}).bind(void 0);function q(t){for(var e=this,n=arguments.length,o=Array(n>1?n-1:0),r=1;r"+e.map(function(t,e){return i(this,o),A(e?v:p,{value:0===e?n.categoryFormat.bind(this)(t):x(t)?t.toLocaleString():""})}.bind(this)).join("")+""}.bind(this));const l=A(d,I(I({},n),{},{title:n.title||e.config.title_text||"",thead:c,tbody:s})).replace(/(<\/?(script|img)[^>]*>|<[^>]+><\/[^>]+>)/gi,"");o.innerHTML=l},r.$redraw=function(){const t=this.$$.state;t.resizing||!this.config.updateOnToggle&&t.toggling||this.generateTable()},r.$willDestroy=function(){var t;if(null==(t=this.element.parentNode)||t.removeChild(this.element),1===this.$$.charts.length){var e;const t=document.getElementById(a);null==t||null==(e=t.parentNode)||e.removeChild(t)}},o}(u)}(),r=r.default}()})); \ No newline at end of file diff --git a/dist/plugin/billboardjs-plugin-textoverlap.js b/dist/plugin/billboardjs-plugin-textoverlap.js index fe08f2be1..09ed2d4b3 100644 --- a/dist/plugin/billboardjs-plugin-textoverlap.js +++ b/dist/plugin/billboardjs-plugin-textoverlap.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ @@ -1212,7 +1212,7 @@ let Plugin = /*#__PURE__*/function () { }; return Plugin; }(); -Plugin.version = "3.9.3-nightly-20230819004547"; +Plugin.version = "3.9.3-nightly-20230822004557"; ;// CONCATENATED MODULE: ./src/Plugin/textoverlap/Options.ts /** diff --git a/dist/plugin/billboardjs-plugin-textoverlap.min.js b/dist/plugin/billboardjs-plugin-textoverlap.min.js index c0e21be91..a2f290460 100644 --- a/dist/plugin/billboardjs-plugin-textoverlap.min.js +++ b/dist/plugin/billboardjs-plugin-textoverlap.min.js @@ -5,8 +5,8 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 * @requires billboard.js * @summary billboard.js plugin */ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-delaunay","d3-polygon","d3-selection","d3-brush"],n):"object"==typeof exports?exports.bb=n(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.textoverlap=n(t.d3,t.d3,t.d3,t.d3))}(this,(function(t,n,e,i){return function(){"use strict";var o={514:function(t){t.exports=i},175:function(n){n.exports=t},792:function(t){t.exports=n},288:function(t){t.exports=e}},r={};function s(t){var n=r[t];if(void 0!==n)return n.exports;var e=r[t]={exports:{}};return o[t](e,e.exports,s),e.exports}s.d=function(t,n){for(var e in n)s.o(n,e)&&!s.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},s.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)};var c={};return function(){function t(t,n){if(t!==n)throw new TypeError("Cannot instantiate an arrow function")}function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,n){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},e(t,n)}s.d(c,{default:function(){return M}});var i=s(175),o=s(792),r=(s(288),s(514),void 0);const u=function(){t(this,r);return"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)(),a="function"==typeof u.requestAnimationFrame,l="function"==typeof u.requestIdleCallback,d=a?u.requestAnimationFrame:function(n){return t(this,r),setTimeout(n,1)}.bind(void 0),f=a?u.cancelAnimationFrame:function(n){return t(this,r),clearTimeout(n)}.bind(void 0),h=(l&&u.requestIdleCallback,l&&u.cancelIdleCallback,null==u?void 0:u.document);var b=void 0;(function(n){return t(this,b),n||0===n}).bind(void 0),function(n){return t(this,b),"function"==typeof n}.bind(void 0);const p=function(n){return t(this,b),"string"==typeof n}.bind(void 0),v=function(n){return t(this,b),"number"==typeof n}.bind(void 0),y=function(n){return t(this,b),void 0===n}.bind(void 0),g=function(n){return t(this,b),void 0!==n}.bind(void 0),m=(function(n){return t(this,b),"boolean"==typeof n}.bind(void 0),function(n){return t(this,b),10*Math.ceil(n/10)}.bind(void 0),function(n){return t(this,b),Math.ceil(n)+.5}.bind(void 0),function(n){return t(this,b),n[1]-n[0]}.bind(void 0),function(n){return t(this,b),"object"==typeof n}.bind(void 0)),j=function(n){return t(this,b),y(n)||null===n||p(n)&&0===n.length||m(n)&&!(n instanceof Date)&&0===Object.keys(n).length||v(n)&&isNaN(n)}.bind(void 0),x=(function(n){return t(this,b),!j(n)}.bind(void 0),function(n){return t(this,b),Array.isArray(n)}.bind(void 0)),O=function(n){return t(this,b),n&&!(null!=n&&n.nodeType)&&m(n)&&!x(n)}.bind(void 0);(function(n){return t(this,b),n.charAt(0).toUpperCase()+n.slice(1)}).bind(void 0);(function(n){return t(this,b),[].slice.call(n)}).bind(void 0);function w(n){for(var e=this,i=arguments.length,o=Array(i>1?i-1:0),r=1;r1?i-1:0),r=1;rspan,.bb-tooltip td>svg{border:1px solid #000;border-radius:3px;display:inline-block;height:8px;margin-right:6px;vertical-align:middle;width:8px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:11px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:18px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:18px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-line{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value{fill:#3b6969}.bb-chart-arc path{stroke:#000;stroke-width:.5px}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:14px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:.7px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px} \ No newline at end of file diff --git a/dist/theme/graph.css b/dist/theme/graph.css index a100a9302..c8be35f21 100644 --- a/dist/theme/graph.css +++ b/dist/theme/graph.css @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */ /*-- Graph Theme --*/ /*-- Default color pattern --*/ diff --git a/dist/theme/graph.min.css b/dist/theme/graph.min.css index 2a92f33ae..e0bf5ba1e 100644 --- a/dist/theme/graph.min.css +++ b/dist/theme/graph.min.css @@ -5,5 +5,5 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */.bb-color-pattern{background-image:url(#65CFC2;#D0A45F;#64A4F5;#EF65A2;#A377FE;#8AAEC7;#FF7E5A;#898EFE;#FFAC35;#70B0FF;)}.bb svg{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#8c8c8c}.bb .bb-button,.bb text{fill:#555;font-size:12px;letter-spacing:-.3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-axis{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#8c8c8c}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ffb6b6;stroke-dasharray:3px}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_,rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region rect{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1px;opacity:.75}.bb-legend-item line{stroke-dasharray:1px}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-radius:2px;border-spacing:0;box-shadow:.5px .5px 1px #999;empty-cells:show;font-size:12px;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.bb-tooltip th{background-color:#efefef;border-bottom:1px dotted #000;color:#000;font-size:12px;padding:4px 8px;text-align:center}.bb-tooltip tr:last-child td{border-bottom:none}.bb-tooltip td{background-color:#fff;border-bottom:1px solid #eee;padding:3px 6px}.bb-tooltip td:first-child{border-right:1px solid #eee;padding-left:5px}.bb-tooltip td:last-child{padding-right:5px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:12px;margin-right:6px;vertical-align:middle;width:5px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:1px;font-size:12px}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#8c8c8c;font-size:16px!important;font-style:italic}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#8c8c8c;font-style:italic}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px;font-weight:700}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#8c8c8c}.bb-chart-radars .bb-axis line{stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em;font-weight:700}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;box-shadow:1px 1px 2px #ccc;cursor:pointer;opacity:.8;padding:5px} \ No newline at end of file diff --git a/dist/theme/insight.css b/dist/theme/insight.css index 5d466d93d..0ad226afa 100644 --- a/dist/theme/insight.css +++ b/dist/theme/insight.css @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */ /*-- Insight Theme --*/ /*-- Default color pattern --*/ diff --git a/dist/theme/insight.min.css b/dist/theme/insight.min.css index 8696a31cd..7017c1e31 100644 --- a/dist/theme/insight.min.css +++ b/dist/theme/insight.min.css @@ -5,5 +5,5 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.3-nightly-20230819004547 + * @version 3.9.3-nightly-20230822004557 */.bb-color-pattern{background-image:url(#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;)}.bb svg{font-family:sans-serif,Arial,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#c4c4c4}.bb .bb-button,.bb text{fill:#555;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-axis{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{fill:#fff!important;stroke-width:2px;stroke:red}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region rect{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:sans-serif,Arial,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-spacing:0;empty-cells:show;font-size:11px;text-align:left;white-space:nowrap}.bb-tooltip th{border-bottom:1px solid #eee;font-size:12px;padding:4px 8px;text-align:left}.bb-tooltip td{background-color:#fff;padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border-radius:5px;display:inline-block;height:10px;margin-right:6px;vertical-align:middle;width:10px}.bb-tooltip td.value{border-left:1px solid transparent}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:12px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:16px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px} \ No newline at end of file