UNPKG

448 kBJavaScriptView Raw
1/*!
2 * Copyright (c) 2017 ~ present NAVER Corp.
3 * billboard.js project is licensed under the MIT license
4 *
5 * billboard.js, JavaScript chart library
6 * http://naver.github.io/billboard.js/
7 *
8 * @version 1.12.1
9 *
10 * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
11 * - d3-axis ^1.0.12
12 * - d3-brush ^1.1.5
13 * - d3-color ^1.4.0
14 * - d3-drag ^1.2.5
15 * - d3-dsv ^1.2.0
16 * - d3-ease ^1.0.6
17 * - d3-interpolate ^1.4.0
18 * - d3-scale ^3.2.1
19 * - d3-selection ^1.4.1
20 * - d3-shape ^1.3.7
21 * - d3-time-format ^2.2.3
22 * - d3-transition ^1.3.2
23 * - d3-zoom ^1.8.3
24 */
25!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(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=377)}([,function(t,e,n){n(2),n(362);var i=n(37);t.exports=i},function(t,e,n){n(3),n(64),n(65),n(66),n(67),n(68),n(69),n(70),n(71),n(72),n(73),n(74),n(75),n(76),n(77),n(78),n(80),n(81),n(82),n(83),n(85),n(88),n(97),n(98),n(99),n(100),n(103),n(105),n(106),n(107),n(108),n(109),n(110),n(111),n(114),n(115),n(117),n(119),n(120),n(121),n(122),n(124),n(125),n(126),n(127),n(130),n(131),n(132),n(136),n(139),n(142),n(144),n(145),n(146),n(147),n(149),n(150),n(152),n(153),n(154),n(155),n(157),n(158),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(168),n(169),n(170),n(174),n(175),n(176),n(178),n(182),n(183),n(191),n(193),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(207),n(208),n(209),n(210),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(185),n(227),n(228),n(229),n(230),n(231),n(233),n(235),n(236),n(237),n(239),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(249),n(250),n(252),n(253),n(254),n(256),n(257),n(259),n(260),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(276),n(277),n(279),n(280),n(281),n(292),n(293),n(294),n(297),n(298),n(300),n(301),n(306),n(308),n(309),n(310),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361);var i=n(37);t.exports=i},function(t,e,n){"use strict";var i=n(4),r=n(5),a=n(36),o=n(31),s=n(7),c=n(47),u=n(48),l=n(8),f=n(17),h=n(49),d=n(16),g=n(22),p=n(50),v=n(11),y=n(15),x=n(10),_=n(51),m=n(53),b=n(38),w=n(55),T=n(45),A=n(6),S=n(21),k=n(9),M=n(20),E=n(23),C=n(30),L=n(29),O=n(33),R=n(32),I=n(56),D=n(57),P=n(58),F=n(59),z=n(27),N=n(60).forEach,X=L("hidden"),B=I("toPrimitive"),j=z.set,Y=z.getterFor("Symbol"),U=Object.prototype,V=r.Symbol,H=a("JSON","stringify"),W=A.f,G=S.f,q=w.f,$=k.f,Z=C("symbols"),K=C("op-symbols"),J=C("string-to-symbol-registry"),Q=C("symbol-to-string-registry"),tt=C("wks"),et=r.QObject,nt=!et||!et.prototype||!et.prototype.findChild,it=s&&l((function(){return 7!=_(G({},"a",{get:function(){return G(this,"a",{value:7}).a}})).a}))?function(t,e,n){var i=W(U,e);i&&delete U[e],G(t,e,n),i&&t!==U&&G(U,e,i)}:G,rt=function(t,e){var n=Z[t]=_(V.prototype);return j(n,{type:"Symbol",tag:t,description:e}),s||(n.description=e),n},at=u?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof V},ot=function(t,e,n){t===U&&ot(K,e,n),g(t);var i=y(e,!0);return g(n),f(Z,i)?(n.enumerable?(f(t,X)&&t[X][i]&&(t[X][i]=!1),n=_(n,{enumerable:x(0,!1)})):(f(t,X)||G(t,X,x(1,{})),t[X][i]=!0),it(t,i,n)):G(t,i,n)},st=function(t,e){g(t);var n=v(e),i=m(n).concat(ft(n));return N(i,(function(e){s&&!ct.call(n,e)||ot(t,e,n[e])})),t},ct=function(t){var e=y(t,!0),n=$.call(this,e);return!(this===U&&f(Z,e)&&!f(K,e))&&(!(n||!f(this,e)||!f(Z,e)||f(this,X)&&this[X][e])||n)},ut=function(t,e){var n=v(t),i=y(e,!0);if(n!==U||!f(Z,i)||f(K,i)){var r=W(n,i);return!r||!f(Z,i)||f(n,X)&&n[X][i]||(r.enumerable=!0),r}},lt=function(t){var e=q(v(t)),n=[];return N(e,(function(t){f(Z,t)||f(O,t)||n.push(t)})),n},ft=function(t){var e=t===U,n=q(e?K:v(t)),i=[];return N(n,(function(t){!f(Z,t)||e&&!f(U,t)||i.push(Z[t])})),i};(c||(E((V=function(){if(this instanceof V)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=R(t),n=function(t){this===U&&n.call(K,t),f(this,X)&&f(this[X],e)&&(this[X][e]=!1),it(this,e,x(1,t))};return s&&nt&&it(U,e,{configurable:!0,set:n}),rt(e,t)}).prototype,"toString",(function(){return Y(this).tag})),E(V,"withoutSetter",(function(t){return rt(R(t),t)})),k.f=ct,S.f=ot,A.f=ut,b.f=w.f=lt,T.f=ft,D.f=function(t){return rt(I(t),t)},s&&(G(V.prototype,"description",{configurable:!0,get:function(){return Y(this).description}}),o||E(U,"propertyIsEnumerable",ct,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:V}),N(m(tt),(function(t){P(t)})),i({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=String(t);if(f(J,e))return J[e];var n=V(e);return J[e]=n,Q[n]=e,n},keyFor:function(t){if(!at(t))throw TypeError(t+" is not a symbol");if(f(Q,t))return Q[t]},useSetter:function(){nt=!0},useSimple:function(){nt=!1}}),i({target:"Object",stat:!0,forced:!c,sham:!s},{create:function(t,e){return void 0===e?_(t):st(_(t),e)},defineProperty:ot,defineProperties:st,getOwnPropertyDescriptor:ut}),i({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:lt,getOwnPropertySymbols:ft}),i({target:"Object",stat:!0,forced:l((function(){T.f(1)}))},{getOwnPropertySymbols:function(t){return T.f(p(t))}}),H)&&i({target:"JSON",stat:!0,forced:!c||l((function(){var t=V();return"[null]"!=H([t])||"{}"!=H({a:t})||"{}"!=H(Object(t))}))},{stringify:function(t,e,n){for(var i,r=[t],a=1;arguments.length>a;)r.push(arguments[a++]);if(i=e,(d(e)||void 0!==t)&&!at(t))return h(e)||(e=function(t,e){if("function"==typeof i&&(e=i.call(this,t,e)),!at(e))return e}),r[1]=e,H.apply(null,r)}});V.prototype[B]||M(V.prototype,B,V.prototype.valueOf),F(V,"Symbol"),O[X]=!0},function(t,e,n){var i=n(5),r=n(6).f,a=n(20),o=n(23),s=n(24),c=n(34),u=n(46);t.exports=function(t,e){var n,l,f,h,d,g=t.target,p=t.global,v=t.stat;if(n=p?i:v?i[g]||s(g,{}):(i[g]||{}).prototype)for(l in e){if(h=e[l],f=t.noTargetGet?(d=r(n,l))&&d.value:n[l],!u(p?l:g+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof h==typeof f)continue;c(h,f)}(t.sham||f&&f.sham)&&a(h,"sham",!0),o(n,l,h,t)}}},function(t,e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||Function("return this")()},function(t,e,n){var i=n(7),r=n(9),a=n(10),o=n(11),s=n(15),c=n(17),u=n(18),l=Object.getOwnPropertyDescriptor;e.f=i?l:function(t,e){if(t=o(t),e=s(e,!0),u)try{return l(t,e)}catch(t){}if(c(t,e))return a(!r.f.call(t,e),t[e])}},function(t,e,n){var i=n(8);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!i.call({1:2},1);e.f=a?function(t){var e=r(this,t);return!!e&&e.enumerable}:i},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(12),r=n(14);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(8),r=n(13),a="".split;t.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?a.call(t,""):Object(t)}:Object},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(16);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(7),r=n(8),a=n(19);t.exports=!i&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var i=n(5),r=n(16),a=i.document,o=r(a)&&r(a.createElement);t.exports=function(t){return o?a.createElement(t):{}}},function(t,e,n){var i=n(7),r=n(21),a=n(10);t.exports=i?function(t,e,n){return r.f(t,e,a(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(7),r=n(18),a=n(22),o=n(15),s=Object.defineProperty;e.f=i?s:function(t,e,n){if(a(t),e=o(e,!0),a(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(16);t.exports=function(t){if(!i(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var i=n(5),r=n(20),a=n(17),o=n(24),s=n(25),c=n(27),u=c.get,l=c.enforce,f=String(String).split("String");(t.exports=function(t,e,n,s){var c=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,h=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||a(n,"name")||r(n,"name",e),l(n).source=f.join("string"==typeof e?e:"")),t!==i?(c?!h&&t[e]&&(u=!0):delete t[e],u?t[e]=n:r(t,e,n)):u?t[e]=n:o(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},function(t,e,n){var i=n(5),r=n(20);t.exports=function(t,e){try{r(i,t,e)}catch(n){i[t]=e}return e}},function(t,e,n){var i=n(26),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(t){return r.call(t)}),t.exports=i.inspectSource},function(t,e,n){var i=n(5),r=n(24),a=i["__core-js_shared__"]||r("__core-js_shared__",{});t.exports=a},function(t,e,n){var i,r,a,o=n(28),s=n(5),c=n(16),u=n(20),l=n(17),f=n(29),h=n(33),d=s.WeakMap;if(o){var g=new d,p=g.get,v=g.has,y=g.set;i=function(t,e){return y.call(g,t,e),e},r=function(t){return p.call(g,t)||{}},a=function(t){return v.call(g,t)}}else{var x=f("state");h[x]=!0,i=function(t,e){return u(t,x,e),e},r=function(t){return l(t,x)?t[x]:{}},a=function(t){return l(t,x)}}t.exports={set:i,get:r,has:a,enforce:function(t){return a(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=r(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var i=n(5),r=n(25),a=i.WeakMap;t.exports="function"==typeof a&&/native code/.test(r(a))},function(t,e,n){var i=n(30),r=n(32),a=i("keys");t.exports=function(t){return a[t]||(a[t]=r(t))}},function(t,e,n){var i=n(31),r=n(26);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.4",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+i).toString(36)}},function(t,e){t.exports={}},function(t,e,n){var i=n(17),r=n(35),a=n(6),o=n(21);t.exports=function(t,e){for(var n=r(e),s=o.f,c=a.f,u=0;u<n.length;u++){var l=n[u];i(t,l)||s(t,l,c(e,l))}}},function(t,e,n){var i=n(36),r=n(38),a=n(45),o=n(22);t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(o(t)),n=a.f;return n?e.concat(n(t)):e}},function(t,e,n){var i=n(37),r=n(5),a=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?a(i[t])||a(r[t]):i[t]&&i[t][e]||r[t]&&r[t][e]}},function(t,e,n){var i=n(5);t.exports=i},function(t,e,n){var i=n(39),r=n(44).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},function(t,e,n){var i=n(17),r=n(11),a=n(40).indexOf,o=n(33);t.exports=function(t,e){var n,s=r(t),c=0,u=[];for(n in s)!i(o,n)&&i(s,n)&&u.push(n);for(;e.length>c;)i(s,n=e[c++])&&(~a(u,n)||u.push(n));return u}},function(t,e,n){var i=n(11),r=n(41),a=n(43),o=function(t){return function(e,n,o){var s,c=i(e),u=r(c.length),l=a(o,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)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:o(!0),indexOf:o(!1)}},function(t,e,n){var i=n(42),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(42),r=Math.max,a=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):a(n,e)}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(8),r=/#|\.prototype\./,a=function(t,e){var n=s[o(t)];return n==u||n!=c&&("function"==typeof e?i(e):!!e)},o=a.normalize=function(t){return String(t).replace(r,".").toLowerCase()},s=a.data={},c=a.NATIVE="N",u=a.POLYFILL="P";t.exports=a},function(t,e,n){var i=n(8);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},function(t,e,n){var i=n(47);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var i=n(13);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){var i=n(14);t.exports=function(t){return Object(i(t))}},function(t,e,n){var i,r=n(22),a=n(52),o=n(44),s=n(33),c=n(54),u=n(19),l=n(29),f=l("IE_PROTO"),h=function(){},d=function(t){return"<script>"+t+"<\/script>"},g=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;g=i?function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e}(i):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F);for(var n=o.length;n--;)delete g.prototype[o[n]];return g()};s[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=r(t),n=new h,h.prototype=null,n[f]=t):n=g(),void 0===e?n:a(n,e)}},function(t,e,n){var i=n(7),r=n(21),a=n(22),o=n(53);t.exports=i?Object.defineProperties:function(t,e){a(t);for(var n,i=o(e),s=i.length,c=0;s>c;)r.f(t,n=i[c++],e[n]);return t}},function(t,e,n){var i=n(39),r=n(44);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e,n){var i=n(36);t.exports=i("document","documentElement")},function(t,e,n){var i=n(11),r=n(38).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return o&&"[object Window]"==a.call(t)?function(t){try{return r(t)}catch(t){return o.slice()}}(t):r(i(t))}},function(t,e,n){var i=n(5),r=n(30),a=n(17),o=n(32),s=n(47),c=n(48),u=r("wks"),l=i.Symbol,f=c?l:l&&l.withoutSetter||o;t.exports=function(t){return a(u,t)||(s&&a(l,t)?u[t]=l[t]:u[t]=f("Symbol."+t)),u[t]}},function(t,e,n){var i=n(56);e.f=i},function(t,e,n){var i=n(37),r=n(17),a=n(57),o=n(21).f;t.exports=function(t){var e=i.Symbol||(i.Symbol={});r(e,t)||o(e,t,{value:a.f(t)})}},function(t,e,n){var i=n(21).f,r=n(17),a=n(56)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,a)&&i(t,a,{configurable:!0,value:e})}},function(t,e,n){var i=n(61),r=n(12),a=n(50),o=n(41),s=n(63),c=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,l=4==t,f=6==t,h=5==t||f;return function(d,g,p,v){for(var y,x,_=a(d),m=r(_),b=i(g,p,3),w=o(m.length),T=0,A=v||s,S=e?A(d,w):n?A(d,0):void 0;w>T;T++)if((h||T in m)&&(x=b(y=m[T],T,_),t))if(e)S[T]=x;else if(x)switch(t){case 3:return!0;case 5:return y;case 6:return T;case 2:c.call(S,y)}else if(l)return!1;return f?-1:u||l?l:S}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},function(t,e,n){var i=n(62);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){var i=n(16),r=n(49),a=n(56)("species");t.exports=function(t,e){var n;return r(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!r(n.prototype)?i(n)&&null===(n=n[a])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},function(t,e,n){n(58)("asyncIterator")},function(t,e,n){"use strict";var i=n(4),r=n(7),a=n(5),o=n(17),s=n(16),c=n(21).f,u=n(34),l=a.Symbol;if(r&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var f={},h=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof h?new l(t):void 0===t?l():l(t);return""===t&&(f[e]=!0),e};u(h,l);var d=h.prototype=l.prototype;d.constructor=h;var g=d.toString,p="Symbol(test)"==String(l("test")),v=/^Symbol\((.*)\)[^)]+$/;c(d,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=g.call(t);if(o(f,t))return"";var n=p?e.slice(7,-1):e.replace(v,"$1");return""===n?void 0:n}}),i({global:!0,forced:!0},{Symbol:h})}},function(t,e,n){n(58)("hasInstance")},function(t,e,n){n(58)("isConcatSpreadable")},function(t,e,n){n(58)("iterator")},function(t,e,n){n(58)("match")},function(t,e,n){n(58)("matchAll")},function(t,e,n){n(58)("replace")},function(t,e,n){n(58)("search")},function(t,e,n){n(58)("species")},function(t,e,n){n(58)("split")},function(t,e,n){n(58)("toPrimitive")},function(t,e,n){n(58)("toStringTag")},function(t,e,n){n(58)("unscopables")},function(t,e,n){var i=n(4),r=n(79);i({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(t,e,n){"use strict";var i=n(7),r=n(8),a=n(53),o=n(45),s=n(9),c=n(50),u=n(12),l=Object.assign,f=Object.defineProperty;t.exports=!l||r((function(){if(i&&1!==l({b:1},l(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=l({},t)[n]||"abcdefghijklmnopqrst"!=a(l({},e)).join("")}))?function(t,e){for(var n=c(t),r=arguments.length,l=1,f=o.f,h=s.f;r>l;)for(var d,g=u(arguments[l++]),p=f?a(g).concat(f(g)):a(g),v=p.length,y=0;v>y;)d=p[y++],i&&!h.call(g,d)||(n[d]=g[d]);return n}:l},function(t,e,n){n(4)({target:"Object",stat:!0,sham:!n(7)},{create:n(51)})},function(t,e,n){var i=n(4),r=n(7);i({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:n(21).f})},function(t,e,n){var i=n(4),r=n(7);i({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:n(52)})},function(t,e,n){var i=n(4),r=n(84).entries;i({target:"Object",stat:!0},{entries:function(t){return r(t)}})},function(t,e,n){var i=n(7),r=n(53),a=n(11),o=n(9).f,s=function(t){return function(e){for(var n,s=a(e),c=r(s),u=c.length,l=0,f=[];u>l;)n=c[l++],i&&!o.call(s,n)||f.push(t?[n,s[n]]:s[n]);return f}};t.exports={entries:s(!0),values:s(!1)}},function(t,e,n){var i=n(4),r=n(86),a=n(8),o=n(16),s=n(87).onFreeze,c=Object.freeze;i({target:"Object",stat:!0,forced:a((function(){c(1)})),sham:!r},{freeze:function(t){return c&&o(t)?c(s(t)):t}})},function(t,e,n){var i=n(8);t.exports=!i((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){var i=n(33),r=n(16),a=n(17),o=n(21).f,s=n(32),c=n(86),u=s("meta"),l=0,f=Object.isExtensible||function(){return!0},h=function(t){o(t,u,{value:{objectID:"O"+ ++l,weakData:{}}})},d=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,u)){if(!f(t))return"F";if(!e)return"E";h(t)}return t[u].objectID},getWeakData:function(t,e){if(!a(t,u)){if(!f(t))return!0;if(!e)return!1;h(t)}return t[u].weakData},onFreeze:function(t){return c&&d.REQUIRED&&f(t)&&!a(t,u)&&h(t),t}};i[u]=!0},function(t,e,n){var i=n(4),r=n(89),a=n(96);i({target:"Object",stat:!0},{fromEntries:function(t){var e={};return r(t,(function(t,n){a(e,t,n)}),void 0,!0),e}})},function(t,e,n){var i=n(22),r=n(90),a=n(41),o=n(61),s=n(92),c=n(95),u=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,l,f){var h,d,g,p,v,y,x,_=o(e,n,l?2:1);if(f)h=t;else{if("function"!=typeof(d=s(t)))throw TypeError("Target is not iterable");if(r(d)){for(g=0,p=a(t.length);p>g;g++)if((v=l?_(i(x=t[g])[0],x[1]):_(t[g]))&&v instanceof u)return v;return new u(!1)}h=d.call(t)}for(y=h.next;!(x=y.call(h)).done;)if("object"==typeof(v=c(h,_,x.value,l))&&v&&v instanceof u)return v;return new u(!1)}).stop=function(t){return new u(!0,t)}},function(t,e,n){var i=n(56),r=n(91),a=i("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[a]===t)}},function(t,e){t.exports={}},function(t,e,n){var i=n(93),r=n(91),a=n(56)("iterator");t.exports=function(t){if(null!=t)return t[a]||t["@@iterator"]||r[i(t)]}},function(t,e,n){var i=n(94),r=n(13),a=n(56)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=i?r: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=Object(t),a))?n:o?r(e):"Object"==(i=r(e))&&"function"==typeof e.callee?"Arguments":i}},function(t,e,n){var i={};i[n(56)("toStringTag")]="z",t.exports="[object z]"===String(i)},function(t,e,n){var i=n(22);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var a=t.return;throw void 0!==a&&i(a.call(t)),e}}},function(t,e,n){"use strict";var i=n(15),r=n(21),a=n(10);t.exports=function(t,e,n){var o=i(e);o in t?r.f(t,o,a(0,n)):t[o]=n}},function(t,e,n){var i=n(4),r=n(8),a=n(11),o=n(6).f,s=n(7),c=r((function(){o(1)}));i({target:"Object",stat:!0,forced:!s||c,sham:!s},{getOwnPropertyDescriptor:function(t,e){return o(a(t),e)}})},function(t,e,n){var i=n(4),r=n(7),a=n(35),o=n(11),s=n(6),c=n(96);i({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(t){for(var e,n,i=o(t),r=s.f,u=a(i),l={},f=0;u.length>f;)void 0!==(n=r(i,e=u[f++]))&&c(l,e,n);return l}})},function(t,e,n){var i=n(4),r=n(8),a=n(55).f;i({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},function(t,e,n){var i=n(4),r=n(8),a=n(50),o=n(101),s=n(102);i({target:"Object",stat:!0,forced:r((function(){o(1)})),sham:!s},{getPrototypeOf:function(t){return o(a(t))}})},function(t,e,n){var i=n(17),r=n(50),a=n(29),o=n(102),s=a("IE_PROTO"),c=Object.prototype;t.exports=o?Object.getPrototypeOf:function(t){return t=r(t),i(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,e,n){var i=n(8);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){n(4)({target:"Object",stat:!0},{is:n(104)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var i=n(4),r=n(8),a=n(16),o=Object.isExtensible;i({target:"Object",stat:!0,forced:r((function(){o(1)}))},{isExtensible:function(t){return!!a(t)&&(!o||o(t))}})},function(t,e,n){var i=n(4),r=n(8),a=n(16),o=Object.isFrozen;i({target:"Object",stat:!0,forced:r((function(){o(1)}))},{isFrozen:function(t){return!a(t)||!!o&&o(t)}})},function(t,e,n){var i=n(4),r=n(8),a=n(16),o=Object.isSealed;i({target:"Object",stat:!0,forced:r((function(){o(1)}))},{isSealed:function(t){return!a(t)||!!o&&o(t)}})},function(t,e,n){var i=n(4),r=n(50),a=n(53);i({target:"Object",stat:!0,forced:n(8)((function(){a(1)}))},{keys:function(t){return a(r(t))}})},function(t,e,n){var i=n(4),r=n(16),a=n(87).onFreeze,o=n(86),s=n(8),c=Object.preventExtensions;i({target:"Object",stat:!0,forced:s((function(){c(1)})),sham:!o},{preventExtensions:function(t){return c&&r(t)?c(a(t)):t}})},function(t,e,n){var i=n(4),r=n(16),a=n(87).onFreeze,o=n(86),s=n(8),c=Object.seal;i({target:"Object",stat:!0,forced:s((function(){c(1)})),sham:!o},{seal:function(t){return c&&r(t)?c(a(t)):t}})},function(t,e,n){n(4)({target:"Object",stat:!0},{setPrototypeOf:n(112)})},function(t,e,n){var i=n(22),r=n(113);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,a){return i(n),r(a),e?t.call(n,a):n.__proto__=a,n}}():void 0)},function(t,e,n){var i=n(16);t.exports=function(t){if(!i(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,n){var i=n(4),r=n(84).values;i({target:"Object",stat:!0},{values:function(t){return r(t)}})},function(t,e,n){var i=n(94),r=n(23),a=n(116);i||r(Object.prototype,"toString",a,{unsafe:!0})},function(t,e,n){"use strict";var i=n(94),r=n(93);t.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},function(t,e,n){"use strict";var i=n(4),r=n(7),a=n(118),o=n(50),s=n(62),c=n(21);r&&i({target:"Object",proto:!0,forced:a},{__defineGetter__:function(t,e){c.f(o(this),t,{get:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(31),r=n(5),a=n(8);t.exports=i||!a((function(){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete r[t]}))},function(t,e,n){"use strict";var i=n(4),r=n(7),a=n(118),o=n(50),s=n(62),c=n(21);r&&i({target:"Object",proto:!0,forced:a},{__defineSetter__:function(t,e){c.f(o(this),t,{set:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(4),r=n(7),a=n(118),o=n(50),s=n(15),c=n(101),u=n(6).f;r&&i({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(t){var e,n=o(this),i=s(t,!0);do{if(e=u(n,i))return e.get}while(n=c(n))}})},function(t,e,n){"use strict";var i=n(4),r=n(7),a=n(118),o=n(50),s=n(15),c=n(101),u=n(6).f;r&&i({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(t){var e,n=o(this),i=s(t,!0);do{if(e=u(n,i))return e.set}while(n=c(n))}})},function(t,e,n){n(4)({target:"Function",proto:!0},{bind:n(123)})},function(t,e,n){"use strict";var i=n(62),r=n(16),a=[].slice,o={},s=function(t,e,n){if(!(e in o)){for(var i=[],r=0;r<e;r++)i[r]="a["+r+"]";o[e]=Function("C,a","return new C("+i.join(",")+")")}return o[e](t,n)};t.exports=Function.bind||function(t){var e=i(this),n=a.call(arguments,1),o=function(){var i=n.concat(a.call(arguments));return this instanceof o?s(e,i.length,i):e.apply(t,i)};return r(e.prototype)&&(o.prototype=e.prototype),o}},function(t,e,n){var i=n(7),r=n(21).f,a=Function.prototype,o=a.toString,s=/^\s*function ([^ (]*)/;i&&!("name"in a)&&r(a,"name",{configurable:!0,get:function(){try{return o.call(this).match(s)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var i=n(16),r=n(21),a=n(101),o=n(56)("hasInstance"),s=Function.prototype;o in s||r.f(s,o,{value:function(t){if("function"!=typeof this||!i(t))return!1;if(!i(this.prototype))return t instanceof this;for(;t=a(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){n(4)({global:!0},{globalThis:n(5)})},function(t,e,n){var i=n(4),r=n(128);i({target:"Array",stat:!0,forced:!n(129)((function(t){Array.from(t)}))},{from:r})},function(t,e,n){"use strict";var i=n(61),r=n(50),a=n(95),o=n(90),s=n(41),c=n(96),u=n(92);t.exports=function(t){var e,n,l,f,h,d,g=r(t),p="function"==typeof this?this:Array,v=arguments.length,y=v>1?arguments[1]:void 0,x=void 0!==y,_=u(g),m=0;if(x&&(y=i(y,v>2?arguments[2]:void 0,2)),null==_||p==Array&&o(_))for(n=new p(e=s(g.length));e>m;m++)d=x?y(g[m],m):g[m],c(n,m,d);else for(h=(f=_.call(g)).next,n=new p;!(l=h.call(f)).done;m++)d=x?a(f,y,[l.value,m],!0):l.value,c(n,m,d);return n.length=m,n}},function(t,e,n){var i=n(56)("iterator"),r=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){r=!0}};o[i]=function(){return this},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var a={};a[i]=function(){return{next:function(){return{done:n=!0}}}},t(a)}catch(t){}return n}},function(t,e,n){n(4)({target:"Array",stat:!0},{isArray:n(49)})},function(t,e,n){"use strict";var i=n(4),r=n(8),a=n(96);i({target:"Array",stat:!0,forced:r((function(){function t(){}return!(Array.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)a(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var i=n(4),r=n(8),a=n(49),o=n(16),s=n(50),c=n(41),u=n(96),l=n(63),f=n(133),h=n(56),d=n(134),g=h("isConcatSpreadable"),p=d>=51||!r((function(){var t=[];return t[g]=!1,t.concat()[0]!==t})),v=f("concat"),y=function(t){if(!o(t))return!1;var e=t[g];return void 0!==e?!!e:a(t)};i({target:"Array",proto:!0,forced:!p||!v},{concat:function(t){var e,n,i,r,a,o=s(this),f=l(o,0),h=0;for(e=-1,i=arguments.length;e<i;e++)if(a=-1===e?o:arguments[e],y(a)){if(h+(r=c(a.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<r;n++,h++)n in a&&u(f,h,a[n])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");u(f,h++,a)}return f.length=h,f}})},function(t,e,n){var i=n(8),r=n(56),a=n(134),o=r("species");t.exports=function(t){return a>=51||!i((function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){var i,r,a=n(5),o=n(135),s=a.process,c=s&&s.versions,u=c&&c.v8;u?r=(i=u.split("."))[0]+i[1]:o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(r=i[1]),t.exports=r&&+r},function(t,e,n){var i=n(36);t.exports=i("navigator","userAgent")||""},function(t,e,n){var i=n(4),r=n(137),a=n(138);i({target:"Array",proto:!0},{copyWithin:r}),a("copyWithin")},function(t,e,n){"use strict";var i=n(50),r=n(43),a=n(41),o=Math.min;t.exports=[].copyWithin||function(t,e){var n=i(this),s=a(n.length),c=r(t,s),u=r(e,s),l=arguments.length>2?arguments[2]:void 0,f=o((void 0===l?s:r(l,s))-u,s-c),h=1;for(u<c&&c<u+f&&(h=-1,u+=f-1,c+=f-1);f-- >0;)u in n?n[c]=n[u]:delete n[c],c+=h,u+=h;return n}},function(t,e,n){var i=n(56),r=n(51),a=n(21),o=i("unscopables"),s=Array.prototype;null==s[o]&&a.f(s,o,{configurable:!0,value:r(null)}),t.exports=function(t){s[o][t]=!0}},function(t,e,n){"use strict";var i=n(4),r=n(60).every,a=n(140),o=n(141),s=a("every"),c=o("every");i({target:"Array",proto:!0,forced:!s||!c},{every:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(8);t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e,n){var i=n(7),r=n(8),a=n(17),o=Object.defineProperty,s={},c=function(t){throw t};t.exports=function(t,e){if(a(s,t))return s[t];e||(e={});var n=[][t],u=!!a(e,"ACCESSORS")&&e.ACCESSORS,l=a(e,0)?e[0]:c,f=a(e,1)?e[1]:void 0;return s[t]=!!n&&!r((function(){if(u&&!i)return!0;var t={length:-1};u?o(t,1,{enumerable:!0,get:c}):t[1]=1,n.call(t,l,f)}))}},function(t,e,n){var i=n(4),r=n(143),a=n(138);i({target:"Array",proto:!0},{fill:r}),a("fill")},function(t,e,n){"use strict";var i=n(50),r=n(43),a=n(41);t.exports=function(t){for(var e=i(this),n=a(e.length),o=arguments.length,s=r(o>1?arguments[1]:void 0,n),c=o>2?arguments[2]:void 0,u=void 0===c?n:r(c,n);u>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var i=n(4),r=n(60).filter,a=n(133),o=n(141),s=a("filter"),c=o("filter");i({target:"Array",proto:!0,forced:!s||!c},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(4),r=n(60).find,a=n(138),o=n(141),s=!0,c=o("find");"find"in[]&&Array(1).find((function(){s=!1})),i({target:"Array",proto:!0,forced:s||!c},{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a("find")},function(t,e,n){"use strict";var i=n(4),r=n(60).findIndex,a=n(138),o=n(141),s=!0,c=o("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){s=!1})),i({target:"Array",proto:!0,forced:s||!c},{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a("findIndex")},function(t,e,n){"use strict";var i=n(4),r=n(148),a=n(50),o=n(41),s=n(42),c=n(63);i({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=a(this),n=o(e.length),i=c(e,0);return i.length=r(i,e,e,n,0,void 0===t?1:s(t)),i}})},function(t,e,n){"use strict";var i=n(49),r=n(41),a=n(61),o=function(t,e,n,s,c,u,l,f){for(var h,d=c,g=0,p=!!l&&a(l,f,3);g<s;){if(g in n){if(h=p?p(n[g],g,e):n[g],u>0&&i(h))d=o(t,e,h,r(h.length),d,u-1)-1;else{if(d>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[d]=h}d++}g++}return d};t.exports=o},function(t,e,n){"use strict";var i=n(4),r=n(148),a=n(50),o=n(41),s=n(62),c=n(63);i({target:"Array",proto:!0},{flatMap:function(t){var e,n=a(this),i=o(n.length);return s(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(4),r=n(151);i({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(t,e,n){"use strict";var i=n(60).forEach,r=n(140),a=n(141),o=r("forEach"),s=a("forEach");t.exports=o&&s?[].forEach:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){"use strict";var i=n(4),r=n(40).includes,a=n(138);i({target:"Array",proto:!0,forced:!n(141)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},function(t,e,n){"use strict";var i=n(4),r=n(40).indexOf,a=n(140),o=n(141),s=[].indexOf,c=!!s&&1/[1].indexOf(1,-0)<0,u=a("indexOf"),l=o("indexOf",{ACCESSORS:!0,1:0});i({target:"Array",proto:!0,forced:c||!u||!l},{indexOf:function(t){return c?s.apply(this,arguments)||0:r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(4),r=n(12),a=n(11),o=n(140),s=[].join,c=r!=Object,u=o("join",",");i({target:"Array",proto:!0,forced:c||!u},{join:function(t){return s.call(a(this),void 0===t?",":t)}})},function(t,e,n){var i=n(4),r=n(156);i({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(t,e,n){"use strict";var i=n(11),r=n(42),a=n(41),o=n(140),s=n(141),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,f=o("lastIndexOf"),h=s("indexOf",{ACCESSORS:!0,1:0}),d=l||!f||!h;t.exports=d?function(t){if(l)return u.apply(this,arguments)||0;var e=i(this),n=a(e.length),o=n-1;for(arguments.length>1&&(o=c(o,r(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in e&&e[o]===t)return o||0;return-1}:u},function(t,e,n){"use strict";var i=n(4),r=n(60).map,a=n(133),o=n(141),s=a("map"),c=o("map");i({target:"Array",proto:!0,forced:!s||!c},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(4),r=n(159).left,a=n(140),o=n(141),s=a("reduce"),c=o("reduce",{1:0});i({target:"Array",proto:!0,forced:!s||!c},{reduce:function(t){return r(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var i=n(62),r=n(50),a=n(12),o=n(41),s=function(t){return function(e,n,s,c){i(n);var u=r(e),l=a(u),f=o(u.length),h=t?f-1:0,d=t?-1:1;if(s<2)for(;;){if(h in l){c=l[h],h+=d;break}if(h+=d,t?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;t?h>=0:f>h;h+=d)h in l&&(c=n(c,l[h],h,u));return c}};t.exports={left:s(!1),right:s(!0)}},function(t,e,n){"use strict";var i=n(4),r=n(159).right,a=n(140),o=n(141),s=a("reduceRight"),c=o("reduce",{1:0});i({target:"Array",proto:!0,forced:!s||!c},{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(4),r=n(49),a=[].reverse,o=[1,2];i({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return r(this)&&(this.length=this.length),a.call(this)}})},function(t,e,n){"use strict";var i=n(4),r=n(16),a=n(49),o=n(43),s=n(41),c=n(11),u=n(96),l=n(56),f=n(133),h=n(141),d=f("slice"),g=h("slice",{ACCESSORS:!0,0:0,1:2}),p=l("species"),v=[].slice,y=Math.max;i({target:"Array",proto:!0,forced:!d||!g},{slice:function(t,e){var n,i,l,f=c(this),h=s(f.length),d=o(t,h),g=o(void 0===e?h:e,h);if(a(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!a(n.prototype)?r(n)&&null===(n=n[p])&&(n=void 0):n=void 0,n===Array||void 0===n))return v.call(f,d,g);for(i=new(void 0===n?Array:n)(y(g-d,0)),l=0;d<g;d++,l++)d in f&&u(i,l,f[d]);return i.length=l,i}})},function(t,e,n){"use strict";var i=n(4),r=n(60).some,a=n(140),o=n(141),s=a("some"),c=o("some");i({target:"Array",proto:!0,forced:!s||!c},{some:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(4),r=n(62),a=n(50),o=n(8),s=n(140),c=[],u=c.sort,l=o((function(){c.sort(void 0)})),f=o((function(){c.sort(null)})),h=s("sort");i({target:"Array",proto:!0,forced:l||!f||!h},{sort:function(t){return void 0===t?u.call(a(this)):u.call(a(this),r(t))}})},function(t,e,n){"use strict";var i=n(4),r=n(43),a=n(42),o=n(41),s=n(50),c=n(63),u=n(96),l=n(133),f=n(141),h=l("splice"),d=f("splice",{ACCESSORS:!0,0:0,1:2}),g=Math.max,p=Math.min;i({target:"Array",proto:!0,forced:!h||!d},{splice:function(t,e){var n,i,l,f,h,d,v=s(this),y=o(v.length),x=r(t,y),_=arguments.length;if(0===_?n=i=0:1===_?(n=0,i=y-x):(n=_-2,i=p(g(a(e),0),y-x)),y+n-i>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(l=c(v,i),f=0;f<i;f++)(h=x+f)in v&&u(l,f,v[h]);if(l.length=i,n<i){for(f=x;f<y-i;f++)d=f+n,(h=f+i)in v?v[d]=v[h]:delete v[d];for(f=y;f>y-i+n;f--)delete v[f-1]}else if(n>i)for(f=y-i;f>x;f--)d=f+n-1,(h=f+i-1)in v?v[d]=v[h]:delete v[d];for(f=0;f<n;f++)v[f+x]=arguments[f+2];return v.length=y-i+n,l}})},function(t,e,n){n(167)("Array")},function(t,e,n){"use strict";var i=n(36),r=n(21),a=n(56),o=n(7),s=a("species");t.exports=function(t){var e=i(t),n=r.f;o&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){n(138)("flat")},function(t,e,n){n(138)("flatMap")},function(t,e,n){"use strict";var i=n(11),r=n(138),a=n(91),o=n(27),s=n(171),c=o.set,u=o.getterFor("Array Iterator");t.exports=s(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:i(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,n=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var i=n(4),r=n(172),a=n(101),o=n(112),s=n(59),c=n(20),u=n(23),l=n(56),f=n(31),h=n(91),d=n(173),g=d.IteratorPrototype,p=d.BUGGY_SAFARI_ITERATORS,v=l("iterator"),y=function(){return this};t.exports=function(t,e,n,l,d,x,_){r(n,e,l);var m,b,w,T=function(t){if(t===d&&E)return E;if(!p&&t in k)return k[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},A=e+" Iterator",S=!1,k=t.prototype,M=k[v]||k["@@iterator"]||d&&k[d],E=!p&&M||T(d),C="Array"==e&&k.entries||M;if(C&&(m=a(C.call(new t)),g!==Object.prototype&&m.next&&(f||a(m)===g||(o?o(m,g):"function"!=typeof m[v]&&c(m,v,y)),s(m,A,!0,!0),f&&(h[A]=y))),"values"==d&&M&&"values"!==M.name&&(S=!0,E=function(){return M.call(this)}),f&&!_||k[v]===E||c(k,v,E),h[e]=E,d)if(b={values:T("values"),keys:x?E:T("keys"),entries:T("entries")},_)for(w in b)(p||S||!(w in k))&&u(k,w,b[w]);else i({target:e,proto:!0,forced:p||S},b);return b}},function(t,e,n){"use strict";var i=n(173).IteratorPrototype,r=n(51),a=n(10),o=n(59),s=n(91),c=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=r(i,{next:a(1,n)}),o(t,u,!1,!0),s[u]=c,t}},function(t,e,n){"use strict";var i,r,a,o=n(101),s=n(20),c=n(17),u=n(56),l=n(31),f=u("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(r=o(o(a)))!==Object.prototype&&(i=r):h=!0),null==i&&(i={}),l||c(i,f)||s(i,f,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:h}},function(t,e,n){var i=n(4),r=n(43),a=String.fromCharCode,o=String.fromCodePoint;i({target:"String",stat:!0,forced:!!o&&1!=o.length},{fromCodePoint:function(t){for(var e,n=[],i=arguments.length,o=0;i>o;){if(e=+arguments[o++],r(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?a(e):a(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var i=n(4),r=n(11),a=n(41);i({target:"String",stat:!0},{raw:function(t){for(var e=r(t.raw),n=a(e.length),i=arguments.length,o=[],s=0;n>s;)o.push(String(e[s++])),s<i&&o.push(String(arguments[s]));return o.join("")}})},function(t,e,n){"use strict";var i=n(4),r=n(177).codeAt;i({target:"String",proto:!0},{codePointAt:function(t){return r(this,t)}})},function(t,e,n){var i=n(42),r=n(14),a=function(t){return function(e,n){var a,o,s=String(r(e)),c=i(n),u=s.length;return c<0||c>=u?t?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===u||(o=s.charCodeAt(c+1))<56320||o>57343?t?s.charAt(c):a:t?s.slice(c,c+2):o-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!0)}},function(t,e,n){"use strict";var i,r=n(4),a=n(6).f,o=n(41),s=n(179),c=n(14),u=n(181),l=n(31),f="".endsWith,h=Math.min,d=u("endsWith");r({target:"String",proto:!0,forced:!!(l||d||(i=a(String.prototype,"endsWith"),!i||i.writable))&&!d},{endsWith:function(t){var e=String(c(this));s(t);var n=arguments.length>1?arguments[1]:void 0,i=o(e.length),r=void 0===n?i:h(o(n),i),a=String(t);return f?f.call(e,a,r):e.slice(r-a.length,r)===a}})},function(t,e,n){var i=n(180);t.exports=function(t){if(i(t))throw TypeError("The method doesn't accept regular expressions");return t}},function(t,e,n){var i=n(16),r=n(13),a=n(56)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==r(t))}},function(t,e,n){var i=n(56)("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(4),r=n(179),a=n(14);i({target:"String",proto:!0,forced:!n(181)("includes")},{includes:function(t){return!!~String(a(this)).indexOf(r(t),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(184),r=n(22),a=n(41),o=n(14),s=n(189),c=n(190);i("match",1,(function(t,e,n){return[function(e){var n=o(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,n):new RegExp(e)[t](String(n))},function(t){var i=n(e,t,this);if(i.done)return i.value;var o=r(t),u=String(this);if(!o.global)return c(o,u);var l=o.unicode;o.lastIndex=0;for(var f,h=[],d=0;null!==(f=c(o,u));){var g=String(f[0]);h[d]=g,""===g&&(o.lastIndex=s(u,a(o.lastIndex),l)),d++}return 0===d?null:h}]}))},function(t,e,n){"use strict";n(185);var i=n(23),r=n(8),a=n(56),o=n(186),s=n(20),c=a("species"),u=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l="$0"==="a".replace(/./,"$0"),f=a("replace"),h=!!/./[f]&&""===/./[f]("a","$0"),d=!r((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,f){var g=a(t),p=!r((function(){var e={};return e[g]=function(){return 7},7!=""[t](e)})),v=p&&!r((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[g]=/./[g]),n.exec=function(){return e=!0,null},n[g](""),!e}));if(!p||!v||"replace"===t&&(!u||!l||h)||"split"===t&&!d){var y=/./[g],x=n(g,""[t],(function(t,e,n,i,r){return e.exec===o?p&&!r?{done:!0,value:y.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:h}),_=x[0],m=x[1];i(String.prototype,t,_),i(RegExp.prototype,g,2==e?function(t,e){return m.call(t,this,e)}:function(t){return m.call(t,this)})}f&&s(RegExp.prototype[g],"sham",!0)}},function(t,e,n){"use strict";var i=n(4),r=n(186);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(t,e,n){"use strict";var i,r,a=n(187),o=n(188),s=RegExp.prototype.exec,c=String.prototype.replace,u=s,l=(i=/a/,r=/b*/g,s.call(i,"a"),s.call(r,"a"),0!==i.lastIndex||0!==r.lastIndex),f=o.UNSUPPORTED_Y||o.BROKEN_CARET,h=void 0!==/()??/.exec("")[1];(l||h||f)&&(u=function(t){var e,n,i,r,o=this,u=f&&o.sticky,d=a.call(o),g=o.source,p=0,v=t;return u&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),v=String(t).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==t[o.lastIndex-1])&&(g="(?: "+g+")",v=" "+v,p++),n=new RegExp("^(?:"+g+")",d)),h&&(n=new RegExp("^"+g+"$(?!\\s)",d)),l&&(e=o.lastIndex),i=s.call(u?n:o,v),u?i?(i.input=i.input.slice(p),i[0]=i[0].slice(p),i.index=o.lastIndex,o.lastIndex+=i[0].length):o.lastIndex=0:l&&i&&(o.lastIndex=o.global?i.index+i[0].length:e),h&&i&&i.length>1&&c.call(i[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)})),i}),t.exports=u},function(t,e,n){"use strict";var i=n(22);t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var i=n(8);function r(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=i((function(){var t=r("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=i((function(){var t=r("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,n){"use strict";var i=n(177).charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},function(t,e,n){var i=n(13),r=n(186);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var a=n.call(t,e);if("object"!=typeof a)throw TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==i(t))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(t,e)}},function(t,e,n){"use strict";var i=n(4),r=n(172),a=n(14),o=n(41),s=n(62),c=n(22),u=n(13),l=n(180),f=n(187),h=n(20),d=n(8),g=n(56),p=n(192),v=n(189),y=n(27),x=n(31),_=g("matchAll"),m=y.set,b=y.getterFor("RegExp String Iterator"),w=RegExp.prototype,T=w.exec,A="".matchAll,S=!!A&&!d((function(){"a".matchAll(/./)})),k=r((function(t,e,n,i){m(this,{type:"RegExp String Iterator",regexp:t,string:e,global:n,unicode:i,done:!1})}),"RegExp String",(function(){var t=b(this);if(t.done)return{value:void 0,done:!0};var e=t.regexp,n=t.string,i=function(t,e){var n,i=t.exec;if("function"==typeof i){if("object"!=typeof(n=i.call(t,e)))throw TypeError("Incorrect exec result");return n}return T.call(t,e)}(e,n);return null===i?{value:void 0,done:t.done=!0}:t.global?(""==String(i[0])&&(e.lastIndex=v(n,o(e.lastIndex),t.unicode)),{value:i,done:!1}):(t.done=!0,{value:i,done:!1})})),M=function(t){var e,n,i,r,a,s,u=c(this),l=String(t);return e=p(u,RegExp),void 0===(n=u.flags)&&u instanceof RegExp&&!("flags"in w)&&(n=f.call(u)),i=void 0===n?"":String(n),r=new e(e===RegExp?u.source:u,i),a=!!~i.indexOf("g"),s=!!~i.indexOf("u"),r.lastIndex=o(u.lastIndex),new k(r,l,a,s)};i({target:"String",proto:!0,forced:S},{matchAll:function(t){var e,n,i,r=a(this);if(null!=t){if(l(t)&&!~String(a("flags"in w?t.flags:f.call(t))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(S)return A.apply(r,arguments);if(void 0===(n=t[_])&&x&&"RegExp"==u(t)&&(n=M),null!=n)return s(n).call(t,r)}else if(S)return A.apply(r,arguments);return e=String(r),i=new RegExp(t,"g"),x?M.call(i,e):i[_](e)}}),x||_ in w||h(w,_,M)},function(t,e,n){var i=n(22),r=n(62),a=n(56)("species");t.exports=function(t,e){var n,o=i(t).constructor;return void 0===o||null==(n=i(o)[a])?e:r(n)}},function(t,e,n){"use strict";var i=n(4),r=n(194).end;i({target:"String",proto:!0,forced:n(196)},{padEnd:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var i=n(41),r=n(195),a=n(14),o=Math.ceil,s=function(t){return function(e,n,s){var c,u,l=String(a(e)),f=l.length,h=void 0===s?" ":String(s),d=i(n);return d<=f||""==h?l:(c=d-f,(u=r.call(h,o(c/h.length))).length>c&&(u=u.slice(0,c)),t?l+u:u+l)}};t.exports={start:s(!1),end:s(!0)}},function(t,e,n){"use strict";var i=n(42),r=n(14);t.exports="".repeat||function(t){var e=String(r(this)),n="",a=i(t);if(a<0||a==1/0)throw RangeError("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(n+=e);return n}},function(t,e,n){var i=n(135);t.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i)},function(t,e,n){"use strict";var i=n(4),r=n(194).start;i({target:"String",proto:!0,forced:n(196)},{padStart:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){n(4)({target:"String",proto:!0},{repeat:n(195)})},function(t,e,n){"use strict";var i=n(184),r=n(22),a=n(50),o=n(41),s=n(42),c=n(14),u=n(189),l=n(190),f=Math.max,h=Math.min,d=Math.floor,g=/\$([$&'`]|\d\d?|<[^>]*>)/g,p=/\$([$&'`]|\d\d?)/g;i("replace",2,(function(t,e,n,i){var v=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,y=i.REPLACE_KEEPS_$0,x=v?"$":"$0";return[function(n,i){var r=c(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r,i):e.call(String(r),n,i)},function(t,i){if(!v&&y||"string"==typeof i&&-1===i.indexOf(x)){var a=n(e,t,this,i);if(a.done)return a.value}var c=r(t),d=String(this),g="function"==typeof i;g||(i=String(i));var p=c.global;if(p){var m=c.unicode;c.lastIndex=0}for(var b=[];;){var w=l(c,d);if(null===w)break;if(b.push(w),!p)break;""===String(w[0])&&(c.lastIndex=u(d,o(c.lastIndex),m))}for(var T,A="",S=0,k=0;k<b.length;k++){w=b[k];for(var M=String(w[0]),E=f(h(s(w.index),d.length),0),C=[],L=1;L<w.length;L++)C.push(void 0===(T=w[L])?T:String(T));var O=w.groups;if(g){var R=[M].concat(C,E,d);void 0!==O&&R.push(O);var I=String(i.apply(void 0,R))}else I=_(M,d,E,C,O,i);E>=S&&(A+=d.slice(S,E)+I,S=E+M.length)}return A+d.slice(S)}];function _(t,n,i,r,o,s){var c=i+t.length,u=r.length,l=p;return void 0!==o&&(o=a(o),l=g),e.call(s,l,(function(e,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,i);case"'":return n.slice(c);case"<":s=o[a.slice(1,-1)];break;default:var l=+a;if(0===l)return e;if(l>u){var f=d(l/10);return 0===f?e:f<=u?void 0===r[f-1]?a.charAt(1):r[f-1]+a.charAt(1):e}s=r[l-1]}return void 0===s?"":s}))}}))},function(t,e,n){"use strict";var i=n(184),r=n(22),a=n(14),o=n(104),s=n(190);i("search",1,(function(t,e,n){return[function(e){var n=a(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,n):new RegExp(e)[t](String(n))},function(t){var i=n(e,t,this);if(i.done)return i.value;var a=r(t),c=String(this),u=a.lastIndex;o(u,0)||(a.lastIndex=0);var l=s(a,c);return o(a.lastIndex,u)||(a.lastIndex=u),null===l?-1:l.index}]}))},function(t,e,n){"use strict";var i=n(184),r=n(180),a=n(22),o=n(14),s=n(192),c=n(189),u=n(41),l=n(190),f=n(186),h=n(8),d=[].push,g=Math.min,p=!h((function(){return!RegExp(4294967295,"y")}));i("split",2,(function(t,e,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(o(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===t)return[i];if(!r(t))return e.call(i,t,a);for(var s,c,u,l=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,p=new RegExp(t.source,h+"g");(s=f.call(p,i))&&!((c=p.lastIndex)>g&&(l.push(i.slice(g,s.index)),s.length>1&&s.index<i.length&&d.apply(l,s.slice(1)),u=s[0].length,g=c,l.length>=a));)p.lastIndex===s.index&&p.lastIndex++;return g===i.length?!u&&p.test("")||l.push(""):l.push(i.slice(g)),l.length>a?l.slice(0,a):l}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var r=o(this),a=null==e?void 0:e[t];return void 0!==a?a.call(e,r,n):i.call(String(r),e,n)},function(t,r){var o=n(i,t,this,r,i!==e);if(o.done)return o.value;var f=a(t),h=String(this),d=s(f,RegExp),v=f.unicode,y=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(p?"y":"g"),x=new d(p?f:"^(?:"+f.source+")",y),_=void 0===r?4294967295:r>>>0;if(0===_)return[];if(0===h.length)return null===l(x,h)?[h]:[];for(var m=0,b=0,w=[];b<h.length;){x.lastIndex=p?b:0;var T,A=l(x,p?h:h.slice(b));if(null===A||(T=g(u(x.lastIndex+(p?0:b)),h.length))===m)b=c(h,b,v);else{if(w.push(h.slice(m,b)),w.length===_)return w;for(var S=1;S<=A.length-1;S++)if(w.push(A[S]),w.length===_)return w;b=m=T}}return w.push(h.slice(m)),w}]}),!p)},function(t,e,n){"use strict";var i,r=n(4),a=n(6).f,o=n(41),s=n(179),c=n(14),u=n(181),l=n(31),f="".startsWith,h=Math.min,d=u("startsWith");r({target:"String",proto:!0,forced:!!(l||d||(i=a(String.prototype,"startsWith"),!i||i.writable))&&!d},{startsWith:function(t){var e=String(c(this));s(t);var n=o(h(arguments.length>1?arguments[1]:void 0,e.length)),i=String(t);return f?f.call(e,i,n):e.slice(n,n+i.length)===i}})},function(t,e,n){"use strict";var i=n(4),r=n(204).trim;i({target:"String",proto:!0,forced:n(206)("trim")},{trim:function(){return r(this)}})},function(t,e,n){var i=n(14),r="["+n(205)+"]",a=RegExp("^"+r+r+"*"),o=RegExp(r+r+"*$"),s=function(t){return function(e){var n=String(i(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(o,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e,n){var i=n(8),r=n(205);t.exports=function(t){return i((function(){return!!r[t]()||"​…᠎"!="​…᠎"[t]()||r[t].name!==t}))}},function(t,e,n){"use strict";var i=n(4),r=n(204).start,a=n(206)("trimStart"),o=a?function(){return r(this)}:"".trimStart;i({target:"String",proto:!0,forced:a},{trimStart:o,trimLeft:o})},function(t,e,n){"use strict";var i=n(4),r=n(204).end,a=n(206)("trimEnd"),o=a?function(){return r(this)}:"".trimEnd;i({target:"String",proto:!0,forced:a},{trimEnd:o,trimRight:o})},function(t,e,n){"use strict";var i=n(177).charAt,r=n(27),a=n(171),o=r.set,s=r.getterFor("String Iterator");a(String,"String",(function(t){o(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=s(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=i(n,r),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("anchor")},{anchor:function(t){return r(this,"a","name",t)}})},function(t,e,n){var i=n(14),r=/"/g;t.exports=function(t,e,n,a){var o=String(i(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(a).replace(r,"&quot;")+'"'),s+">"+o+"</"+e+">"}},function(t,e,n){var i=n(8);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(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("big")},{big:function(){return r(this,"big","","")}})},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("blink")},{blink:function(){return r(this,"blink","","")}})},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("bold")},{bold:function(){return r(this,"b","","")}})},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("fontcolor")},{fontcolor:function(t){return r(this,"font","color",t)}})},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("fontsize")},{fontsize:function(t){return r(this,"font","size",t)}})},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("italics")},{italics:function(){return r(this,"i","","")}})},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("link")},{link:function(t){return r(this,"a","href",t)}})},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("small")},{small:function(){return r(this,"small","","")}})},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("strike")},{strike:function(){return r(this,"strike","","")}})},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("sub")},{sub:function(){return r(this,"sub","","")}})},function(t,e,n){"use strict";var i=n(4),r=n(211);i({target:"String",proto:!0,forced:n(212)("sup")},{sup:function(){return r(this,"sup","","")}})},function(t,e,n){var i=n(7),r=n(5),a=n(46),o=n(226),s=n(21).f,c=n(38).f,u=n(180),l=n(187),f=n(188),h=n(23),d=n(8),g=n(27).set,p=n(167),v=n(56)("match"),y=r.RegExp,x=y.prototype,_=/a/g,m=/a/g,b=new y(_)!==_,w=f.UNSUPPORTED_Y;if(i&&a("RegExp",!b||w||d((function(){return m[v]=!1,y(_)!=_||y(m)==m||"/a/i"!=y(_,"i")})))){for(var T=function(t,e){var n,i=this instanceof T,r=u(t),a=void 0===e;if(!i&&r&&t.constructor===T&&a)return t;b?r&&!a&&(t=t.source):t instanceof T&&(a&&(e=l.call(t)),t=t.source),w&&(n=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var s=o(b?new y(t,e):y(t,e),i?this:x,T);return w&&n&&g(s,{sticky:n}),s},A=function(t){t in T||s(T,t,{configurable:!0,get:function(){return y[t]},set:function(e){y[t]=e}})},S=c(y),k=0;S.length>k;)A(S[k++]);x.constructor=T,T.prototype=x,h(r,"RegExp",T)}p("RegExp")},function(t,e,n){var i=n(16),r=n(112);t.exports=function(t,e,n){var a,o;return r&&"function"==typeof(a=e.constructor)&&a!==n&&i(o=a.prototype)&&o!==n.prototype&&r(t,o),t}},function(t,e,n){var i=n(7),r=n(21),a=n(187),o=n(188).UNSUPPORTED_Y;i&&("g"!=/./g.flags||o)&&r.f(RegExp.prototype,"flags",{configurable:!0,get:a})},function(t,e,n){var i=n(7),r=n(188).UNSUPPORTED_Y,a=n(21).f,o=n(27).get,s=RegExp.prototype;i&&r&&a(RegExp.prototype,"sticky",{configurable:!0,get:function(){if(this!==s){if(this instanceof RegExp)return!!o(this).sticky;throw TypeError("Incompatible receiver, RegExp required")}}})},function(t,e,n){"use strict";n(185);var i,r,a=n(4),o=n(16),s=(i=!1,(r=/[ac]/).exec=function(){return i=!0,/./.exec.apply(this,arguments)},!0===r.test("abc")&&i),c=/./.test;a({target:"RegExp",proto:!0,forced:!s},{test:function(t){if("function"!=typeof this.exec)return c.call(this,t);var e=this.exec(t);if(null!==e&&!o(e))throw new Error("RegExp exec method returned something other than an Object or null");return!!e}})},function(t,e,n){"use strict";var i=n(23),r=n(22),a=n(8),o=n(187),s=RegExp.prototype,c=s.toString,u=a((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),l="toString"!=c.name;(u||l)&&i(RegExp.prototype,"toString",(function(){var t=r(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in s)?o.call(t):n)}),{unsafe:!0})},function(t,e,n){var i=n(4),r=n(232);i({global:!0,forced:parseInt!=r},{parseInt:r})},function(t,e,n){var i=n(5),r=n(204).trim,a=n(205),o=i.parseInt,s=/^[+-]?0[Xx]/,c=8!==o(a+"08")||22!==o(a+"0x16");t.exports=c?function(t,e){var n=r(String(t));return o(n,e>>>0||(s.test(n)?16:10))}:o},function(t,e,n){var i=n(4),r=n(234);i({global:!0,forced:parseFloat!=r},{parseFloat:r})},function(t,e,n){var i=n(5),r=n(204).trim,a=n(205),o=i.parseFloat,s=1/o(a+"-0")!=-1/0;t.exports=s?function(t){var e=r(String(t)),n=o(e);return 0===n&&"-"==e.charAt(0)?-0:n}:o},function(t,e,n){"use strict";var i=n(7),r=n(5),a=n(46),o=n(23),s=n(17),c=n(13),u=n(226),l=n(15),f=n(8),h=n(51),d=n(38).f,g=n(6).f,p=n(21).f,v=n(204).trim,y=r.Number,x=y.prototype,_="Number"==c(h(x)),m=function(t){var e,n,i,r,a,o,s,c,u=l(t,!1);if("string"==typeof u&&u.length>2)if(43===(e=(u=v(u)).charCodeAt(0))||45===e){if(88===(n=u.charCodeAt(2))||120===n)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+u}for(o=(a=u.slice(2)).length,s=0;s<o;s++)if((c=a.charCodeAt(s))<48||c>r)return NaN;return parseInt(a,i)}return+u};if(a("Number",!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var b,w=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof w&&(_?f((function(){x.valueOf.call(n)})):"Number"!=c(n))?u(new y(m(e)),n,w):m(e)},T=i?d(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),A=0;T.length>A;A++)s(y,b=T[A])&&!s(w,b)&&p(w,b,g(y,b));w.prototype=x,x.constructor=w,o(r,"Number",w)}},function(t,e,n){n(4)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,n){n(4)({target:"Number",stat:!0},{isFinite:n(238)})},function(t,e,n){var i=n(5).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&i(t)}},function(t,e,n){n(4)({target:"Number",stat:!0},{isInteger:n(240)})},function(t,e,n){var i=n(16),r=Math.floor;t.exports=function(t){return!i(t)&&isFinite(t)&&r(t)===t}},function(t,e,n){n(4)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,n){var i=n(4),r=n(240),a=Math.abs;i({target:"Number",stat:!0},{isSafeInteger:function(t){return r(t)&&a(t)<=9007199254740991}})},function(t,e,n){n(4)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){n(4)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var i=n(4),r=n(234);i({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(t,e,n){var i=n(4),r=n(232);i({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},function(t,e,n){"use strict";var i=n(4),r=n(42),a=n(248),o=n(195),s=n(8),c=1..toFixed,u=Math.floor,l=function(t,e,n){return 0===e?n:e%2==1?l(t,e-1,n*t):l(t*t,e/2,n)};i({target:"Number",proto:!0,forced:c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){c.call({})}))},{toFixed:function(t){var e,n,i,s,c=a(this),f=r(t),h=[0,0,0,0,0,0],d="",g="0",p=function(t,e){for(var n=-1,i=e;++n<6;)i+=t*h[n],h[n]=i%1e7,i=u(i/1e7)},v=function(t){for(var e=6,n=0;--e>=0;)n+=h[e],h[e]=u(n/t),n=n%t*1e7},y=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==h[t]){var n=String(h[t]);e=""===e?n:e+o.call("0",7-n.length)+n}return e};if(f<0||f>20)throw RangeError("Incorrect fraction digits");if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(d="-",c=-c),c>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}(c*l(2,69,1))-69)<0?c*l(2,-e,1):c/l(2,e,1),n*=4503599627370496,(e=52-e)>0){for(p(0,n),i=f;i>=7;)p(1e7,0),i-=7;for(p(l(10,i,1),0),i=e-1;i>=23;)v(1<<23),i-=23;v(1<<i),p(1,1),v(2),g=y()}else p(0,n),p(1<<-e,0),g=y()+o.call("0",f);return g=f>0?d+((s=g.length)<=f?"0."+o.call("0",f-s)+g:g.slice(0,s-f)+"."+g.slice(s-f)):d+g}})},function(t,e,n){var i=n(13);t.exports=function(t){if("number"!=typeof t&&"Number"!=i(t))throw TypeError("Incorrect invocation");return+t}},function(t,e,n){"use strict";var i=n(4),r=n(8),a=n(248),o=1..toPrecision;i({target:"Number",proto:!0,forced:r((function(){return"1"!==o.call(1,void 0)}))||!r((function(){o.call({})}))},{toPrecision:function(t){return void 0===t?o.call(a(this)):o.call(a(this),t)}})},function(t,e,n){var i=n(4),r=n(251),a=Math.acosh,o=Math.log,s=Math.sqrt,c=Math.LN2;i({target:"Math",stat:!0,forced:!a||710!=Math.floor(a(Number.MAX_VALUE))||a(1/0)!=1/0},{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?o(t)+c:r(t-1+s(t-1)*s(t+1))}})},function(t,e){var n=Math.log;t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:n(1+t)}},function(t,e,n){var i=n(4),r=Math.asinh,a=Math.log,o=Math.sqrt;i({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):a(e+o(e*e+1)):e}})},function(t,e,n){var i=n(4),r=Math.atanh,a=Math.log;i({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(t){return 0==(t=+t)?t:a((1+t)/(1-t))/2}})},function(t,e,n){var i=n(4),r=n(255),a=Math.abs,o=Math.pow;i({target:"Math",stat:!0},{cbrt:function(t){return r(t=+t)*o(a(t),1/3)}})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){var i=n(4),r=Math.floor,a=Math.log,o=Math.LOG2E;i({target:"Math",stat:!0},{clz32:function(t){return(t>>>=0)?31-r(a(t+.5)*o):32}})},function(t,e,n){var i=n(4),r=n(258),a=Math.cosh,o=Math.abs,s=Math.E;i({target:"Math",stat:!0,forced:!a||a(710)===1/0},{cosh:function(t){var e=r(o(t)-1)+1;return(e+1/(e*s*s))*(s/2)}})},function(t,e){var n=Math.expm1,i=Math.exp;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:i(t)-1}:n},function(t,e,n){var i=n(4),r=n(258);i({target:"Math",stat:!0,forced:r!=Math.expm1},{expm1:r})},function(t,e,n){n(4)({target:"Math",stat:!0},{fround:n(261)})},function(t,e,n){var i=n(255),r=Math.abs,a=Math.pow,o=a(2,-52),s=a(2,-23),c=a(2,127)*(2-s),u=a(2,-126);t.exports=Math.fround||function(t){var e,n,a=r(t),l=i(t);return a<u?l*(a/u/s+1/o-1/o)*u*s:(n=(e=(1+s/o)*a)-(e-a))>c||n!=n?l*(1/0):l*n}},function(t,e,n){var i=n(4),r=Math.hypot,a=Math.abs,o=Math.sqrt;i({target:"Math",stat:!0,forced:!!r&&r(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,i,r=0,s=0,c=arguments.length,u=0;s<c;)u<(n=a(arguments[s++]))?(r=r*(i=u/n)*i+1,u=n):r+=n>0?(i=n/u)*i:n;return u===1/0?1/0:u*o(r)}})},function(t,e,n){var i=n(4),r=n(8),a=Math.imul;i({target:"Math",stat:!0,forced:r((function(){return-5!=a(4294967295,5)||2!=a.length}))},{imul:function(t,e){var n=+t,i=+e,r=65535&n,a=65535&i;return 0|r*a+((65535&n>>>16)*a+r*(65535&i>>>16)<<16>>>0)}})},function(t,e,n){var i=n(4),r=Math.log,a=Math.LOG10E;i({target:"Math",stat:!0},{log10:function(t){return r(t)*a}})},function(t,e,n){n(4)({target:"Math",stat:!0},{log1p:n(251)})},function(t,e,n){var i=n(4),r=Math.log,a=Math.LN2;i({target:"Math",stat:!0},{log2:function(t){return r(t)/a}})},function(t,e,n){n(4)({target:"Math",stat:!0},{sign:n(255)})},function(t,e,n){var i=n(4),r=n(8),a=n(258),o=Math.abs,s=Math.exp,c=Math.E;i({target:"Math",stat:!0,forced:r((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(t){return o(t=+t)<1?(a(t)-a(-t))/2:(s(t-1)-s(-t-1))*(c/2)}})},function(t,e,n){var i=n(4),r=n(258),a=Math.exp;i({target:"Math",stat:!0},{tanh:function(t){var e=r(t=+t),n=r(-t);return e==1/0?1:n==1/0?-1:(e-n)/(a(t)+a(-t))}})},function(t,e,n){n(59)(Math,"Math",!0)},function(t,e,n){var i=n(4),r=Math.ceil,a=Math.floor;i({target:"Math",stat:!0},{trunc:function(t){return(t>0?a:r)(t)}})},function(t,e,n){n(4)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var i=n(4),r=n(8),a=n(50),o=n(15);i({target:"Date",proto:!0,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=a(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var i=n(4),r=n(275);i({target:"Date",proto:!0,forced:Date.prototype.toISOString!==r},{toISOString:r})},function(t,e,n){"use strict";var i=n(8),r=n(194).start,a=Math.abs,o=Date.prototype,s=o.getTime,c=o.toISOString;t.exports=i((function(){return"0385-07-25T07:06:39.999Z"!=c.call(new Date(-50000000000001))}))||!i((function(){c.call(new Date(NaN))}))?function(){if(!isFinite(s.call(this)))throw RangeError("Invalid time value");var t=this.getUTCFullYear(),e=this.getUTCMilliseconds(),n=t<0?"-":t>9999?"+":"";return n+r(a(t),n?6:4,0)+"-"+r(this.getUTCMonth()+1,2,0)+"-"+r(this.getUTCDate(),2,0)+"T"+r(this.getUTCHours(),2,0)+":"+r(this.getUTCMinutes(),2,0)+":"+r(this.getUTCSeconds(),2,0)+"."+r(e,3,0)+"Z"}:c},function(t,e,n){var i=n(23),r=Date.prototype,a=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&i(r,"toString",(function(){var t=o.call(this);return t==t?a.call(this):"Invalid Date"}))},function(t,e,n){var i=n(20),r=n(278),a=n(56)("toPrimitive"),o=Date.prototype;a in o||i(o,a,r)},function(t,e,n){"use strict";var i=n(22),r=n(15);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return r(i(this),"number"!==t)}},function(t,e,n){var i=n(4),r=n(36),a=n(8),o=r("JSON","stringify"),s=/[\uD800-\uDFFF]/g,c=/^[\uD800-\uDBFF]$/,u=/^[\uDC00-\uDFFF]$/,l=function(t,e,n){var i=n.charAt(e-1),r=n.charAt(e+1);return c.test(t)&&!u.test(r)||u.test(t)&&!c.test(i)?"\\u"+t.charCodeAt(0).toString(16):t},f=a((function(){return'"\\udf06\\ud834"'!==o("\udf06\ud834")||'"\\udead"'!==o("\udead")}));o&&i({target:"JSON",stat:!0,forced:f},{stringify:function(t,e,n){var i=o.apply(null,arguments);return"string"==typeof i?i.replace(s,l):i}})},function(t,e,n){var i=n(5);n(59)(i.JSON,"JSON",!0)},function(t,e,n){"use strict";var i,r,a,o,s=n(4),c=n(31),u=n(5),l=n(36),f=n(282),h=n(23),d=n(283),g=n(59),p=n(167),v=n(16),y=n(62),x=n(284),_=n(13),m=n(25),b=n(89),w=n(129),T=n(192),A=n(285).set,S=n(287),k=n(288),M=n(290),E=n(289),C=n(291),L=n(27),O=n(46),R=n(56),I=n(134),D=R("species"),P="Promise",F=L.get,z=L.set,N=L.getterFor(P),X=f,B=u.TypeError,j=u.document,Y=u.process,U=l("fetch"),V=E.f,H=V,W="process"==_(Y),G=!!(j&&j.createEvent&&u.dispatchEvent),q=O(P,(function(){if(!(m(X)!==String(X))){if(66===I)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0}if(c&&!X.prototype.finally)return!0;if(I>=51&&/native code/.test(X))return!1;var t=X.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[D]=e,!(t.then((function(){}))instanceof e)})),$=q||!w((function(t){X.all(t).catch((function(){}))})),Z=function(t){var e;return!(!v(t)||"function"!=typeof(e=t.then))&&e},K=function(t,e,n){if(!e.notified){e.notified=!0;var i=e.reactions;S((function(){for(var r=e.value,a=1==e.state,o=0;i.length>o;){var s,c,u,l=i[o++],f=a?l.ok:l.fail,h=l.resolve,d=l.reject,g=l.domain;try{f?(a||(2===e.rejection&&et(t,e),e.rejection=1),!0===f?s=r:(g&&g.enter(),s=f(r),g&&(g.exit(),u=!0)),s===l.promise?d(B("Promise-chain cycle")):(c=Z(s))?c.call(s,h,d):h(s)):d(r)}catch(t){g&&!u&&g.exit(),d(t)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&Q(t,e)}))}},J=function(t,e,n){var i,r;G?((i=j.createEvent("Event")).promise=e,i.reason=n,i.initEvent(t,!1,!0),u.dispatchEvent(i)):i={promise:e,reason:n},(r=u["on"+t])?r(i):"unhandledrejection"===t&&M("Unhandled promise rejection",n)},Q=function(t,e){A.call(u,(function(){var n,i=e.value;if(tt(e)&&(n=C((function(){W?Y.emit("unhandledRejection",i,t):J("unhandledrejection",t,i)})),e.rejection=W||tt(e)?2:1,n.error))throw n.value}))},tt=function(t){return 1!==t.rejection&&!t.parent},et=function(t,e){A.call(u,(function(){W?Y.emit("rejectionHandled",t):J("rejectionhandled",t,e.value)}))},nt=function(t,e,n,i){return function(r){t(e,n,r,i)}},it=function(t,e,n,i){e.done||(e.done=!0,i&&(e=i),e.value=n,e.state=2,K(t,e,!0))},rt=function(t,e,n,i){if(!e.done){e.done=!0,i&&(e=i);try{if(t===n)throw B("Promise can't be resolved itself");var r=Z(n);r?S((function(){var i={done:!1};try{r.call(n,nt(rt,t,i,e),nt(it,t,i,e))}catch(n){it(t,i,n,e)}})):(e.value=n,e.state=1,K(t,e,!1))}catch(n){it(t,{done:!1},n,e)}}};q&&(X=function(t){x(this,X,P),y(t),i.call(this);var e=F(this);try{t(nt(rt,this,e),nt(it,this,e))}catch(t){it(this,e,t)}},(i=function(t){z(this,{type:P,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(X.prototype,{then:function(t,e){var n=N(this),i=V(T(this,X));return i.ok="function"!=typeof t||t,i.fail="function"==typeof e&&e,i.domain=W?Y.domain:void 0,n.parent=!0,n.reactions.push(i),0!=n.state&&K(this,n,!1),i.promise},catch:function(t){return this.then(void 0,t)}}),r=function(){var t=new i,e=F(t);this.promise=t,this.resolve=nt(rt,t,e),this.reject=nt(it,t,e)},E.f=V=function(t){return t===X||t===a?new r(t):H(t)},c||"function"!=typeof f||(o=f.prototype.then,h(f.prototype,"then",(function(t,e){var n=this;return new X((function(t,e){o.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof U&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return k(X,U.apply(u,arguments))}}))),s({global:!0,wrap:!0,forced:q},{Promise:X}),g(X,P,!1,!0),p(P),a=l(P),s({target:P,stat:!0,forced:q},{reject:function(t){var e=V(this);return e.reject.call(void 0,t),e.promise}}),s({target:P,stat:!0,forced:c||q},{resolve:function(t){return k(c&&this===a?X:this,t)}}),s({target:P,stat:!0,forced:$},{all:function(t){var e=this,n=V(e),i=n.resolve,r=n.reject,a=C((function(){var n=y(e.resolve),a=[],o=0,s=1;b(t,(function(t){var c=o++,u=!1;a.push(void 0),s++,n.call(e,t).then((function(t){u||(u=!0,a[c]=t,--s||i(a))}),r)})),--s||i(a)}));return a.error&&r(a.value),n.promise},race:function(t){var e=this,n=V(e),i=n.reject,r=C((function(){var r=y(e.resolve);b(t,(function(t){r.call(e,t).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}})},function(t,e,n){var i=n(5);t.exports=i.Promise},function(t,e,n){var i=n(23);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,e,n){var i,r,a,o=n(5),s=n(8),c=n(13),u=n(61),l=n(54),f=n(19),h=n(286),d=o.location,g=o.setImmediate,p=o.clearImmediate,v=o.process,y=o.MessageChannel,x=o.Dispatch,_=0,m={},b=function(t){if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},w=function(t){return function(){b(t)}},T=function(t){b(t.data)},A=function(t){o.postMessage(t+"",d.protocol+"//"+d.host)};g&&p||(g=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++_]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},i(_),_},p=function(t){delete m[t]},"process"==c(v)?i=function(t){v.nextTick(w(t))}:x&&x.now?i=function(t){x.now(w(t))}:y&&!h?(a=(r=new y).port2,r.port1.onmessage=T,i=u(a.postMessage,a,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||s(A)?i="onreadystatechange"in f("script")?function(t){l.appendChild(f("script")).onreadystatechange=function(){l.removeChild(this),b(t)}}:function(t){setTimeout(w(t),0)}:(i=A,o.addEventListener("message",T,!1))),t.exports={set:g,clear:p}},function(t,e,n){var i=n(135);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(i)},function(t,e,n){var i,r,a,o,s,c,u,l,f=n(5),h=n(6).f,d=n(13),g=n(285).set,p=n(286),v=f.MutationObserver||f.WebKitMutationObserver,y=f.process,x=f.Promise,_="process"==d(y),m=h(f,"queueMicrotask"),b=m&&m.value;b||(i=function(){var t,e;for(_&&(t=y.domain)&&t.exit();r;){e=r.fn,r=r.next;try{e()}catch(t){throw r?o():a=void 0,t}}a=void 0,t&&t.enter()},_?o=function(){y.nextTick(i)}:v&&!p?(s=!0,c=document.createTextNode(""),new v(i).observe(c,{characterData:!0}),o=function(){c.data=s=!s}):x&&x.resolve?(u=x.resolve(void 0),l=u.then,o=function(){l.call(u,i)}):o=function(){g.call(f,i)}),t.exports=b||function(t){var e={fn:t,next:void 0};a&&(a.next=e),r||(r=e,o()),a=e}},function(t,e,n){var i=n(22),r=n(16),a=n(289);t.exports=function(t,e){if(i(t),r(e)&&e.constructor===t)return e;var n=a.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var i=n(62),r=function(t){var e,n;this.promise=new t((function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i})),this.resolve=i(e),this.reject=i(n)};t.exports.f=function(t){return new r(t)}},function(t,e,n){var i=n(5);t.exports=function(t,e){var n=i.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,n){"use strict";var i=n(4),r=n(62),a=n(289),o=n(291),s=n(89);i({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=a.f(e),i=n.resolve,c=n.reject,u=o((function(){var n=r(e.resolve),a=[],o=0,c=1;s(t,(function(t){var r=o++,s=!1;a.push(void 0),c++,n.call(e,t).then((function(t){s||(s=!0,a[r]={status:"fulfilled",value:t},--c||i(a))}),(function(t){s||(s=!0,a[r]={status:"rejected",reason:t},--c||i(a))}))})),--c||i(a)}));return u.error&&c(u.value),n.promise}})},function(t,e,n){"use strict";var i=n(4),r=n(31),a=n(282),o=n(8),s=n(36),c=n(192),u=n(288),l=n(23);i({target:"Promise",proto:!0,real:!0,forced:!!a&&o((function(){a.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,s("Promise")),n="function"==typeof t;return this.then(n?function(n){return u(e,t()).then((function(){return n}))}:t,n?function(n){return u(e,t()).then((function(){throw n}))}:t)}}),r||"function"!=typeof a||a.prototype.finally||l(a.prototype,"finally",s("Promise").prototype.finally)},function(t,e,n){"use strict";var i=n(295),r=n(296);t.exports=i("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r)},function(t,e,n){"use strict";var i=n(4),r=n(5),a=n(46),o=n(23),s=n(87),c=n(89),u=n(284),l=n(16),f=n(8),h=n(129),d=n(59),g=n(226);t.exports=function(t,e,n){var p=-1!==t.indexOf("Map"),v=-1!==t.indexOf("Weak"),y=p?"set":"add",x=r[t],_=x&&x.prototype,m=x,b={},w=function(t){var e=_[t];o(_,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!l(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(a(t,"function"!=typeof x||!(v||_.forEach&&!f((function(){(new x).entries().next()})))))m=n.getConstructor(e,t,p,y),s.REQUIRED=!0;else if(a(t,!0)){var T=new m,A=T[y](v?{}:-0,1)!=T,S=f((function(){T.has(1)})),k=h((function(t){new x(t)})),M=!v&&f((function(){for(var t=new x,e=5;e--;)t[y](e,e);return!t.has(-0)}));k||((m=e((function(e,n){u(e,m,t);var i=g(new x,e,m);return null!=n&&c(n,i[y],i,p),i}))).prototype=_,_.constructor=m),(S||M)&&(w("delete"),w("has"),p&&w("get")),(M||A)&&w(y),v&&_.clear&&delete _.clear}return b[t]=m,i({global:!0,forced:m!=x},b),d(m,t),v||n.setStrong(m,t,p),m}},function(t,e,n){"use strict";var i=n(21).f,r=n(51),a=n(283),o=n(61),s=n(284),c=n(89),u=n(171),l=n(167),f=n(7),h=n(87).fastKey,d=n(27),g=d.set,p=d.getterFor;t.exports={getConstructor:function(t,e,n,u){var l=t((function(t,i){s(t,l,e),g(t,{type:e,index:r(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=i&&c(i,t[u],t,n)})),d=p(e),v=function(t,e,n){var i,r,a=d(t),o=y(t,e);return o?o.value=n:(a.last=o={index:r=h(e,!0),key:e,value:n,previous:i=a.last,next:void 0,removed:!1},a.first||(a.first=o),i&&(i.next=o),f?a.size++:t.size++,"F"!==r&&(a.index[r]=o)),t},y=function(t,e){var n,i=d(t),r=h(e);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==e)return n};return a(l.prototype,{clear:function(){for(var t=d(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=d(this),n=y(this,t);if(n){var i=n.next,r=n.previous;delete e.index[n.index],n.removed=!0,r&&(r.next=i),i&&(i.previous=r),e.first==n&&(e.first=i),e.last==n&&(e.last=r),f?e.size--:this.size--}return!!n},forEach:function(t){for(var e,n=d(this),i=o(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(i(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),a(l.prototype,n?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),f&&i(l.prototype,"size",{get:function(){return d(this).size}}),l},setStrong:function(t,e,n){var i=e+" Iterator",r=p(e),a=p(i);u(t,e,(function(t,e){g(this,{type:i,target:t,state:r(t),kind:e,last:void 0})}),(function(){for(var t=a(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)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){"use strict";var i=n(295),r=n(296);t.exports=i("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r)},function(t,e,n){"use strict";var i,r=n(5),a=n(283),o=n(87),s=n(295),c=n(299),u=n(16),l=n(27).enforce,f=n(28),h=!r.ActiveXObject&&"ActiveXObject"in r,d=Object.isExtensible,g=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},p=t.exports=s("WeakMap",g,c);if(f&&h){i=c.getConstructor(g,"WeakMap",!0),o.REQUIRED=!0;var v=p.prototype,y=v.delete,x=v.has,_=v.get,m=v.set;a(v,{delete:function(t){if(u(t)&&!d(t)){var e=l(this);return e.frozen||(e.frozen=new i),y.call(this,t)||e.frozen.delete(t)}return y.call(this,t)},has:function(t){if(u(t)&&!d(t)){var e=l(this);return e.frozen||(e.frozen=new i),x.call(this,t)||e.frozen.has(t)}return x.call(this,t)},get:function(t){if(u(t)&&!d(t)){var e=l(this);return e.frozen||(e.frozen=new i),x.call(this,t)?_.call(this,t):e.frozen.get(t)}return _.call(this,t)},set:function(t,e){if(u(t)&&!d(t)){var n=l(this);n.frozen||(n.frozen=new i),x.call(this,t)?m.call(this,t,e):n.frozen.set(t,e)}else m.call(this,t,e);return this}})}},function(t,e,n){"use strict";var i=n(283),r=n(87).getWeakData,a=n(22),o=n(16),s=n(284),c=n(89),u=n(60),l=n(17),f=n(27),h=f.set,d=f.getterFor,g=u.find,p=u.findIndex,v=0,y=function(t){return t.frozen||(t.frozen=new x)},x=function(){this.entries=[]},_=function(t,e){return g(t.entries,(function(t){return t[0]===e}))};x.prototype={get:function(t){var e=_(this,t);if(e)return e[1]},has:function(t){return!!_(this,t)},set:function(t,e){var n=_(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=p(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,u){var f=t((function(t,i){s(t,f,e),h(t,{type:e,id:v++,frozen:void 0}),null!=i&&c(i,t[u],t,n)})),g=d(e),p=function(t,e,n){var i=g(t),o=r(a(e),!0);return!0===o?y(i).set(e,n):o[i.id]=n,t};return i(f.prototype,{delete:function(t){var e=g(this);if(!o(t))return!1;var n=r(t);return!0===n?y(e).delete(t):n&&l(n,e.id)&&delete n[e.id]},has:function(t){var e=g(this);if(!o(t))return!1;var n=r(t);return!0===n?y(e).has(t):n&&l(n,e.id)}}),i(f.prototype,n?{get:function(t){var e=g(this);if(o(t)){var n=r(t);return!0===n?y(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return p(this,t,e)}}:{add:function(t){return p(this,t,!0)}}),f}}},function(t,e,n){"use strict";n(295)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(299))},function(t,e,n){"use strict";var i=n(4),r=n(5),a=n(302),o=n(167),s=a.ArrayBuffer;i({global:!0,forced:r.ArrayBuffer!==s},{ArrayBuffer:s}),o("ArrayBuffer")},function(t,e,n){"use strict";var i=n(5),r=n(7),a=n(303),o=n(20),s=n(283),c=n(8),u=n(284),l=n(42),f=n(41),h=n(304),d=n(305),g=n(101),p=n(112),v=n(38).f,y=n(21).f,x=n(143),_=n(59),m=n(27),b=m.get,w=m.set,T=i.ArrayBuffer,A=T,S=i.DataView,k=S&&S.prototype,M=Object.prototype,E=i.RangeError,C=d.pack,L=d.unpack,O=function(t){return[255&t]},R=function(t){return[255&t,t>>8&255]},I=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},D=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},P=function(t){return C(t,23,4)},F=function(t){return C(t,52,8)},z=function(t,e){y(t.prototype,e,{get:function(){return b(this)[e]}})},N=function(t,e,n,i){var r=h(n),a=b(t);if(r+e>a.byteLength)throw E("Wrong index");var o=b(a.buffer).bytes,s=r+a.byteOffset,c=o.slice(s,s+e);return i?c:c.reverse()},X=function(t,e,n,i,r,a){var o=h(n),s=b(t);if(o+e>s.byteLength)throw E("Wrong index");for(var c=b(s.buffer).bytes,u=o+s.byteOffset,l=i(+r),f=0;f<e;f++)c[u+f]=l[a?f:e-f-1]};if(a){if(!c((function(){T(1)}))||!c((function(){new T(-1)}))||c((function(){return new T,new T(1.5),new T(NaN),"ArrayBuffer"!=T.name}))){for(var B,j=(A=function(t){return u(this,A),new T(h(t))}).prototype=T.prototype,Y=v(T),U=0;Y.length>U;)(B=Y[U++])in A||o(A,B,T[B]);j.constructor=A}p&&g(k)!==M&&p(k,M);var V=new S(new A(2)),H=k.setInt8;V.setInt8(0,2147483648),V.setInt8(1,2147483649),!V.getInt8(0)&&V.getInt8(1)||s(k,{setInt8:function(t,e){H.call(this,t,e<<24>>24)},setUint8:function(t,e){H.call(this,t,e<<24>>24)}},{unsafe:!0})}else A=function(t){u(this,A,"ArrayBuffer");var e=h(t);w(this,{bytes:x.call(new Array(e),0),byteLength:e}),r||(this.byteLength=e)},S=function(t,e,n){u(this,S,"DataView"),u(t,A,"DataView");var i=b(t).byteLength,a=l(e);if(a<0||a>i)throw E("Wrong offset");if(a+(n=void 0===n?i-a:f(n))>i)throw E("Wrong length");w(this,{buffer:t,byteLength:n,byteOffset:a}),r||(this.buffer=t,this.byteLength=n,this.byteOffset=a)},r&&(z(A,"byteLength"),z(S,"buffer"),z(S,"byteLength"),z(S,"byteOffset")),s(S.prototype,{getInt8:function(t){return N(this,1,t)[0]<<24>>24},getUint8:function(t){return N(this,1,t)[0]},getInt16:function(t){var e=N(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=N(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return D(N(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return D(N(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return L(N(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return L(N(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){X(this,1,t,O,e)},setUint8:function(t,e){X(this,1,t,O,e)},setInt16:function(t,e){X(this,2,t,R,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){X(this,2,t,R,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){X(this,4,t,I,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){X(this,4,t,I,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){X(this,4,t,P,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){X(this,8,t,F,e,arguments.length>2?arguments[2]:void 0)}});_(A,"ArrayBuffer"),_(S,"DataView"),t.exports={ArrayBuffer:A,DataView:S}},function(t,e){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,e,n){var i=n(42),r=n(41);t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw RangeError("Wrong length or index");return n}},function(t,e){var n=Math.abs,i=Math.pow,r=Math.floor,a=Math.log,o=Math.LN2;t.exports={pack:function(t,e,s){var c,u,l,f=new Array(s),h=8*s-e-1,d=(1<<h)-1,g=d>>1,p=23===e?i(2,-24)-i(2,-77):0,v=t<0||0===t&&1/t<0?1:0,y=0;for((t=n(t))!=t||t===1/0?(u=t!=t?1:0,c=d):(c=r(a(t)/o),t*(l=i(2,-c))<1&&(c--,l*=2),(t+=c+g>=1?p/l:p*i(2,1-g))*l>=2&&(c++,l/=2),c+g>=d?(u=0,c=d):c+g>=1?(u=(t*l-1)*i(2,e),c+=g):(u=t*i(2,g-1)*i(2,e),c=0));e>=8;f[y++]=255&u,u/=256,e-=8);for(c=c<<e|u,h+=e;h>0;f[y++]=255&c,c/=256,h-=8);return f[--y]|=128*v,f},unpack:function(t,e){var n,r=t.length,a=8*r-e-1,o=(1<<a)-1,s=o>>1,c=a-7,u=r-1,l=t[u--],f=127&l;for(l>>=7;c>0;f=256*f+t[u],u--,c-=8);for(n=f&(1<<-c)-1,f>>=-c,c+=e;c>0;n=256*n+t[u],u--,c-=8);if(0===f)f=1-s;else{if(f===o)return n?NaN:l?-1/0:1/0;n+=i(2,e),f-=s}return(l?-1:1)*n*i(2,f-e)}}},function(t,e,n){var i=n(4),r=n(307);i({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},function(t,e,n){"use strict";var i,r=n(303),a=n(7),o=n(5),s=n(16),c=n(17),u=n(93),l=n(20),f=n(23),h=n(21).f,d=n(101),g=n(112),p=n(56),v=n(32),y=o.Int8Array,x=y&&y.prototype,_=o.Uint8ClampedArray,m=_&&_.prototype,b=y&&d(y),w=x&&d(x),T=Object.prototype,A=T.isPrototypeOf,S=p("toStringTag"),k=v("TYPED_ARRAY_TAG"),M=r&&!!g&&"Opera"!==u(o.opera),E=!1,C={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},L=function(t){return s(t)&&c(C,u(t))};for(i in C)o[i]||(M=!1);if((!M||"function"!=typeof b||b===Function.prototype)&&(b=function(){throw TypeError("Incorrect invocation")},M))for(i in C)o[i]&&g(o[i],b);if((!M||!w||w===T)&&(w=b.prototype,M))for(i in C)o[i]&&g(o[i].prototype,w);if(M&&d(m)!==w&&g(m,w),a&&!c(w,S))for(i in E=!0,h(w,S,{get:function(){return s(this)?this[k]:void 0}}),C)o[i]&&l(o[i],k,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:M,TYPED_ARRAY_TAG:E&&k,aTypedArray:function(t){if(L(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(g){if(A.call(b,t))return t}else for(var e in C)if(c(C,i)){var n=o[e];if(n&&(t===n||A.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n){if(a){if(n)for(var i in C){var r=o[i];r&&c(r.prototype,t)&&delete r.prototype[t]}w[t]&&!n||f(w,t,n?e:M&&x[t]||e)}},exportTypedArrayStaticMethod:function(t,e,n){var i,r;if(a){if(g){if(n)for(i in C)(r=o[i])&&c(r,t)&&delete r[t];if(b[t]&&!n)return;try{return f(b,t,n?e:M&&y[t]||e)}catch(t){}}for(i in C)!(r=o[i])||r[t]&&!n||f(r,t,e)}},isView:function(t){var e=u(t);return"DataView"===e||c(C,e)},isTypedArray:L,TypedArray:b,TypedArrayPrototype:w}},function(t,e,n){"use strict";var i=n(4),r=n(8),a=n(302),o=n(22),s=n(43),c=n(41),u=n(192),l=a.ArrayBuffer,f=a.DataView,h=l.prototype.slice;i({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:r((function(){return!new l(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(void 0!==h&&void 0===e)return h.call(o(this),t);for(var n=o(this).byteLength,i=s(t,n),r=s(void 0===e?n:e,n),a=new(u(this,l))(c(r-i)),d=new f(this),g=new f(a),p=0;i<r;)g.setUint8(p++,d.getUint8(i++));return a}})},function(t,e,n){var i=n(4),r=n(302);i({global:!0,forced:!n(303)},{DataView:r.DataView})},function(t,e,n){n(311)("Int8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";var i=n(4),r=n(5),a=n(7),o=n(312),s=n(307),c=n(302),u=n(284),l=n(10),f=n(20),h=n(41),d=n(304),g=n(313),p=n(15),v=n(17),y=n(93),x=n(16),_=n(51),m=n(112),b=n(38).f,w=n(315),T=n(60).forEach,A=n(167),S=n(21),k=n(6),M=n(27),E=n(226),C=M.get,L=M.set,O=S.f,R=k.f,I=Math.round,D=r.RangeError,P=c.ArrayBuffer,F=c.DataView,z=s.NATIVE_ARRAY_BUFFER_VIEWS,N=s.TYPED_ARRAY_TAG,X=s.TypedArray,B=s.TypedArrayPrototype,j=s.aTypedArrayConstructor,Y=s.isTypedArray,U=function(t,e){for(var n=0,i=e.length,r=new(j(t))(i);i>n;)r[n]=e[n++];return r},V=function(t,e){O(t,e,{get:function(){return C(this)[e]}})},H=function(t){var e;return t instanceof P||"ArrayBuffer"==(e=y(t))||"SharedArrayBuffer"==e},W=function(t,e){return Y(t)&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},G=function(t,e){return W(t,e=p(e,!0))?l(2,t[e]):R(t,e)},q=function(t,e,n){return!(W(t,e=p(e,!0))&&x(n)&&v(n,"value"))||v(n,"get")||v(n,"set")||n.configurable||v(n,"writable")&&!n.writable||v(n,"enumerable")&&!n.enumerable?O(t,e,n):(t[e]=n.value,t)};a?(z||(k.f=G,S.f=q,V(B,"buffer"),V(B,"byteOffset"),V(B,"byteLength"),V(B,"length")),i({target:"Object",stat:!0,forced:!z},{getOwnPropertyDescriptor:G,defineProperty:q}),t.exports=function(t,e,n){var a=t.match(/\d+$/)[0]/8,s=t+(n?"Clamped":"")+"Array",c="get"+t,l="set"+t,p=r[s],v=p,y=v&&v.prototype,S={},k=function(t,e){O(t,e,{get:function(){return function(t,e){var n=C(t);return n.view[c](e*a+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,i){var r=C(t);n&&(i=(i=I(i))<0?0:i>255?255:255&i),r.view[l](e*a+r.byteOffset,i,!0)}(this,e,t)},enumerable:!0})};z?o&&(v=e((function(t,e,n,i){return u(t,v,s),E(x(e)?H(e)?void 0!==i?new p(e,g(n,a),i):void 0!==n?new p(e,g(n,a)):new p(e):Y(e)?U(v,e):w.call(v,e):new p(d(e)),t,v)})),m&&m(v,X),T(b(p),(function(t){t in v||f(v,t,p[t])})),v.prototype=y):(v=e((function(t,e,n,i){u(t,v,s);var r,o,c,l=0,f=0;if(x(e)){if(!H(e))return Y(e)?U(v,e):w.call(v,e);r=e,f=g(n,a);var p=e.byteLength;if(void 0===i){if(p%a)throw D("Wrong length");if((o=p-f)<0)throw D("Wrong length")}else if((o=h(i)*a)+f>p)throw D("Wrong length");c=o/a}else c=d(e),r=new P(o=c*a);for(L(t,{buffer:r,byteOffset:f,byteLength:o,length:c,view:new F(r)});l<c;)k(t,l++)})),m&&m(v,X),y=v.prototype=_(B)),y.constructor!==v&&f(y,"constructor",v),N&&f(y,N,s),S[s]=v,i({global:!0,forced:v!=p,sham:!z},S),"BYTES_PER_ELEMENT"in v||f(v,"BYTES_PER_ELEMENT",a),"BYTES_PER_ELEMENT"in y||f(y,"BYTES_PER_ELEMENT",a),A(s)}):t.exports=function(){}},function(t,e,n){var i=n(5),r=n(8),a=n(129),o=n(307).NATIVE_ARRAY_BUFFER_VIEWS,s=i.ArrayBuffer,c=i.Int8Array;t.exports=!o||!r((function(){c(1)}))||!r((function(){new c(-1)}))||!a((function(t){new c,new c(null),new c(1.5),new c(t)}),!0)||r((function(){return 1!==new c(new s(2),1,void 0).length}))},function(t,e,n){var i=n(314);t.exports=function(t,e){var n=i(t);if(n%e)throw RangeError("Wrong offset");return n}},function(t,e,n){var i=n(42);t.exports=function(t){var e=i(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},function(t,e,n){var i=n(50),r=n(41),a=n(92),o=n(90),s=n(61),c=n(307).aTypedArrayConstructor;t.exports=function(t){var e,n,u,l,f,h,d=i(t),g=arguments.length,p=g>1?arguments[1]:void 0,v=void 0!==p,y=a(d);if(null!=y&&!o(y))for(h=(f=y.call(d)).next,d=[];!(l=h.call(f)).done;)d.push(l.value);for(v&&g>2&&(p=s(p,arguments[2],2)),n=r(d.length),u=new(c(this))(n),e=0;n>e;e++)u[e]=v?p(d[e],e):d[e];return u}},function(t,e,n){n(311)("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){n(311)("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}),!0)},function(t,e,n){n(311)("Int16",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){n(311)("Uint16",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){n(311)("Int32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){n(311)("Uint32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){n(311)("Float32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){n(311)("Float64",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";var i=n(312);(0,n(307).exportTypedArrayStaticMethod)("from",n(315),i)},function(t,e,n){"use strict";var i=n(307),r=n(312),a=i.aTypedArrayConstructor;(0,i.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,n=new(a(this))(e);e>t;)n[t]=arguments[t++];return n}),r)},function(t,e,n){"use strict";var i=n(307),r=n(137),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(t,e){return r.call(a(this),t,e,arguments.length>2?arguments[2]:void 0)}))},function(t,e,n){"use strict";var i=n(307),r=n(60).every,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("every",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(307),r=n(143),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("fill",(function(t){return r.apply(a(this),arguments)}))},function(t,e,n){"use strict";var i=n(307),r=n(60).filter,a=n(192),o=i.aTypedArray,s=i.aTypedArrayConstructor;(0,i.exportTypedArrayMethod)("filter",(function(t){for(var e=r(o(this),t,arguments.length>1?arguments[1]:void 0),n=a(this,this.constructor),i=0,c=e.length,u=new(s(n))(c);c>i;)u[i]=e[i++];return u}))},function(t,e,n){"use strict";var i=n(307),r=n(60).find,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("find",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(307),r=n(60).findIndex,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("findIndex",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(307),r=n(60).forEach,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("forEach",(function(t){r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(307),r=n(40).includes,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("includes",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(307),r=n(40).indexOf,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("indexOf",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(5),r=n(307),a=n(170),o=n(56)("iterator"),s=i.Uint8Array,c=a.values,u=a.keys,l=a.entries,f=r.aTypedArray,h=r.exportTypedArrayMethod,d=s&&s.prototype[o],g=!!d&&("values"==d.name||null==d.name),p=function(){return c.call(f(this))};h("entries",(function(){return l.call(f(this))})),h("keys",(function(){return u.call(f(this))})),h("values",p,!g),h(o,p,!g)},function(t,e,n){"use strict";var i=n(307),r=i.aTypedArray,a=i.exportTypedArrayMethod,o=[].join;a("join",(function(t){return o.apply(r(this),arguments)}))},function(t,e,n){"use strict";var i=n(307),r=n(156),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("lastIndexOf",(function(t){return r.apply(a(this),arguments)}))},function(t,e,n){"use strict";var i=n(307),r=n(60).map,a=n(192),o=i.aTypedArray,s=i.aTypedArrayConstructor;(0,i.exportTypedArrayMethod)("map",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(s(a(t,t.constructor)))(e)}))}))},function(t,e,n){"use strict";var i=n(307),r=n(159).left,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduce",(function(t){return r(a(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(307),r=n(159).right,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduceRight",(function(t){return r(a(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(307),r=i.aTypedArray,a=i.exportTypedArrayMethod,o=Math.floor;a("reverse",(function(){for(var t,e=r(this).length,n=o(e/2),i=0;i<n;)t=this[i],this[i++]=this[--e],this[e]=t;return this}))},function(t,e,n){"use strict";var i=n(307),r=n(41),a=n(313),o=n(50),s=n(8),c=i.aTypedArray;(0,i.exportTypedArrayMethod)("set",(function(t){c(this);var e=a(arguments.length>1?arguments[1]:void 0,1),n=this.length,i=o(t),s=r(i.length),u=0;if(s+e>n)throw RangeError("Wrong length");for(;u<s;)this[e+u]=i[u++]}),s((function(){new Int8Array(1).set({})})))},function(t,e,n){"use strict";var i=n(307),r=n(192),a=n(8),o=i.aTypedArray,s=i.aTypedArrayConstructor,c=i.exportTypedArrayMethod,u=[].slice;c("slice",(function(t,e){for(var n=u.call(o(this),t,e),i=r(this,this.constructor),a=0,c=n.length,l=new(s(i))(c);c>a;)l[a]=n[a++];return l}),a((function(){new Int8Array(1).slice()})))},function(t,e,n){"use strict";var i=n(307),r=n(60).some,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("some",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(307),r=i.aTypedArray,a=i.exportTypedArrayMethod,o=[].sort;a("sort",(function(t){return o.call(r(this),t)}))},function(t,e,n){"use strict";var i=n(307),r=n(41),a=n(43),o=n(192),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("subarray",(function(t,e){var n=s(this),i=n.length,c=a(t,i);return new(o(n,n.constructor))(n.buffer,n.byteOffset+c*n.BYTES_PER_ELEMENT,r((void 0===e?i:a(e,i))-c))}))},function(t,e,n){"use strict";var i=n(5),r=n(307),a=n(8),o=i.Int8Array,s=r.aTypedArray,c=r.exportTypedArrayMethod,u=[].toLocaleString,l=[].slice,f=!!o&&a((function(){u.call(new o(1))}));c("toLocaleString",(function(){return u.apply(f?l.call(s(this)):s(this),arguments)}),a((function(){return[1,2].toLocaleString()!=new o([1,2]).toLocaleString()}))||!a((function(){o.prototype.toLocaleString.call([1,2])})))},function(t,e,n){"use strict";var i=n(307).exportTypedArrayMethod,r=n(8),a=n(5).Uint8Array,o=a&&a.prototype||{},s=[].toString,c=[].join;r((function(){s.call({})}))&&(s=function(){return c.call(this)});var u=o.toString!=s;i("toString",s,u)},function(t,e,n){var i=n(4),r=n(36),a=n(62),o=n(22),s=n(8),c=r("Reflect","apply"),u=Function.apply;i({target:"Reflect",stat:!0,forced:!s((function(){c((function(){}))}))},{apply:function(t,e,n){return a(t),o(n),c?c(t,e,n):u.call(t,e,n)}})},function(t,e,n){var i=n(4),r=n(36),a=n(62),o=n(22),s=n(16),c=n(51),u=n(123),l=n(8),f=r("Reflect","construct"),h=l((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),d=!l((function(){f((function(){}))})),g=h||d;i({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){a(t),o(e);var n=arguments.length<3?t:a(arguments[2]);if(d&&!h)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var i=[null];return i.push.apply(i,e),new(u.apply(t,i))}var r=n.prototype,l=c(s(r)?r:Object.prototype),g=Function.apply.call(t,l,e);return s(g)?g:l}})},function(t,e,n){var i=n(4),r=n(7),a=n(22),o=n(15),s=n(21);i({target:"Reflect",stat:!0,forced:n(8)((function(){Reflect.defineProperty(s.f({},1,{value:1}),1,{value:2})})),sham:!r},{defineProperty:function(t,e,n){a(t);var i=o(e,!0);a(n);try{return s.f(t,i,n),!0}catch(t){return!1}}})},function(t,e,n){var i=n(4),r=n(22),a=n(6).f;i({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var n=a(r(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){var i=n(4),r=n(16),a=n(22),o=n(17),s=n(6),c=n(101);i({target:"Reflect",stat:!0},{get:function t(e,n){var i,u,l=arguments.length<3?e:arguments[2];return a(e)===l?e[n]:(i=s.f(e,n))?o(i,"value")?i.value:void 0===i.get?void 0:i.get.call(l):r(u=c(e))?t(u,n,l):void 0}})},function(t,e,n){var i=n(4),r=n(7),a=n(22),o=n(6);i({target:"Reflect",stat:!0,sham:!r},{getOwnPropertyDescriptor:function(t,e){return o.f(a(t),e)}})},function(t,e,n){var i=n(4),r=n(22),a=n(101);i({target:"Reflect",stat:!0,sham:!n(102)},{getPrototypeOf:function(t){return a(r(t))}})},function(t,e,n){n(4)({target:"Reflect",stat:!0},{has:function(t,e){return e in t}})},function(t,e,n){var i=n(4),r=n(22),a=Object.isExtensible;i({target:"Reflect",stat:!0},{isExtensible:function(t){return r(t),!a||a(t)}})},function(t,e,n){n(4)({target:"Reflect",stat:!0},{ownKeys:n(35)})},function(t,e,n){var i=n(4),r=n(36),a=n(22);i({target:"Reflect",stat:!0,sham:!n(86)},{preventExtensions:function(t){a(t);try{var e=r("Object","preventExtensions");return e&&e(t),!0}catch(t){return!1}}})},function(t,e,n){var i=n(4),r=n(22),a=n(16),o=n(17),s=n(8),c=n(21),u=n(6),l=n(101),f=n(10);i({target:"Reflect",stat:!0,forced:s((function(){var t=c.f({},"a",{configurable:!0});return!1!==Reflect.set(l(t),"a",1,t)}))},{set:function t(e,n,i){var s,h,d=arguments.length<4?e:arguments[3],g=u.f(r(e),n);if(!g){if(a(h=l(e)))return t(h,n,i,d);g=f(0)}if(o(g,"value")){if(!1===g.writable||!a(d))return!1;if(s=u.f(d,n)){if(s.get||s.set||!1===s.writable)return!1;s.value=i,c.f(d,n,s)}else c.f(d,n,f(0,i));return!0}return void 0!==g.set&&(g.set.call(d,i),!0)}})},function(t,e,n){var i=n(4),r=n(22),a=n(113),o=n(112);o&&i({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){r(t),a(e);try{return o(t,e),!0}catch(t){return!1}}})},function(t,e,n){n(363),n(365),n(366),n(367),n(368),n(369),n(374),n(372);var i=n(37);t.exports=i},function(t,e,n){var i=n(5),r=n(364),a=n(151),o=n(20);for(var s in r){var c=i[s],u=c&&c.prototype;if(u&&u.forEach!==a)try{o(u,"forEach",a)}catch(t){u.forEach=a}}},function(t,e){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){var i=n(5),r=n(364),a=n(170),o=n(20),s=n(56),c=s("iterator"),u=s("toStringTag"),l=a.values;for(var f in r){var h=i[f],d=h&&h.prototype;if(d){if(d[c]!==l)try{o(d,c,l)}catch(t){d[c]=l}if(d[u]||o(d,u,f),r[f])for(var g in a)if(d[g]!==a[g])try{o(d,g,a[g])}catch(t){d[g]=a[g]}}}},function(t,e,n){var i=n(4),r=n(5),a=n(285);i({global:!0,bind:!0,enumerable:!0,forced:!r.setImmediate||!r.clearImmediate},{setImmediate:a.set,clearImmediate:a.clear})},function(t,e,n){var i=n(4),r=n(5),a=n(287),o=n(13),s=r.process,c="process"==o(s);i({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(t){var e=c&&s.domain;a(e?e.bind(t):t)}})},function(t,e,n){var i=n(4),r=n(5),a=n(135),o=[].slice,s=function(t){return function(e,n){var i=arguments.length>2,r=i?o.call(arguments,2):void 0;return t(i?function(){("function"==typeof e?e:Function(e)).apply(this,r)}:e,n)}};i({global:!0,bind:!0,forced:/MSIE .\./.test(a)},{setTimeout:s(r.setTimeout),setInterval:s(r.setInterval)})},function(t,e,n){"use strict";n(209);var i,r=n(4),a=n(7),o=n(370),s=n(5),c=n(52),u=n(23),l=n(284),f=n(17),h=n(79),d=n(128),g=n(177).codeAt,p=n(371),v=n(59),y=n(372),x=n(27),_=s.URL,m=y.URLSearchParams,b=y.getState,w=x.set,T=x.getterFor("URL"),A=Math.floor,S=Math.pow,k=/[A-Za-z]/,M=/[\d+\-.A-Za-z]/,E=/\d/,C=/^(0x|0X)/,L=/^[0-7]+$/,O=/^\d+$/,R=/^[\dA-Fa-f]+$/,I=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,D=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,P=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,F=/[\u0009\u000A\u000D]/g,z=function(t,e){var n,i,r;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(n=X(e.slice(1,-1))))return"Invalid host";t.host=n}else if(G(t)){if(e=p(e),I.test(e))return"Invalid host";if(null===(n=N(e)))return"Invalid host";t.host=n}else{if(D.test(e))return"Invalid host";for(n="",i=d(e),r=0;r<i.length;r++)n+=H(i[r],j);t.host=n}},N=function(t){var e,n,i,r,a,o,s,c=t.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(e=c.length)>4)return t;for(n=[],i=0;i<e;i++){if(""==(r=c[i]))return t;if(a=10,r.length>1&&"0"==r.charAt(0)&&(a=C.test(r)?16:8,r=r.slice(8==a?1:2)),""===r)o=0;else{if(!(10==a?O:8==a?L:R).test(r))return t;o=parseInt(r,a)}n.push(o)}for(i=0;i<e;i++)if(o=n[i],i==e-1){if(o>=S(256,5-e))return null}else if(o>255)return null;for(s=n.pop(),i=0;i<n.length;i++)s+=n[i]*S(256,3-i);return s},X=function(t){var e,n,i,r,a,o,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,f=0,h=function(){return t.charAt(f)};if(":"==h()){if(":"!=t.charAt(1))return;f+=2,l=++u}for(;h();){if(8==u)return;if(":"!=h()){for(e=n=0;n<4&&R.test(h());)e=16*e+parseInt(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,u>6)return;for(i=0;h();){if(r=null,i>0){if(!("."==h()&&i<4))return;f++}if(!E.test(h()))return;for(;E.test(h());){if(a=parseInt(h(),10),null===r)r=a;else{if(0==r)return;r=10*r+a}if(r>255)return;f++}c[u]=256*c[u]+r,2!=++i&&4!=i||u++}if(4!=i)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;c[u++]=e}else{if(null!==l)return;f++,l=++u}}if(null!==l)for(o=u-l,u=7;0!=u&&o>0;)s=c[u],c[u--]=c[l+o-1],c[l+--o]=s;else if(8!=u)return;return c},B=function(t){var e,n,i,r;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=A(t/256);return e.join(".")}if("object"==typeof t){for(e="",i=function(t){for(var e=null,n=1,i=null,r=0,a=0;a<8;a++)0!==t[a]?(r>n&&(e=i,n=r),i=null,r=0):(null===i&&(i=a),++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+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},j={},Y=h({},j,{" ":1,'"':1,"<":1,">":1,"`":1}),U=h({},Y,{"#":1,"?":1,"{":1,"}":1}),V=h({},U,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),H=function(t,e){var n=g(t,0);return n>32&&n<127&&!f(e,t)?t:encodeURIComponent(t)},W={ftp:21,file:null,http:80,https:443,ws:80,wss:443},G=function(t){return f(W,t.scheme)},q=function(t){return""!=t.username||""!=t.password},$=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},Z=function(t,e){var n;return 2==t.length&&k.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},K=function(t){var e;return t.length>1&&Z(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},J=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&Z(e[0],!0)||e.pop()},Q=function(t){return"."===t||"%2e"===t.toLowerCase()},tt={},et={},nt={},it={},rt={},at={},ot={},st={},ct={},ut={},lt={},ft={},ht={},dt={},gt={},pt={},vt={},yt={},xt={},_t={},mt={},bt=function(t,e,n,r){var a,o,s,c,u,l=n||tt,h=0,g="",p=!1,v=!1,y=!1;for(n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(P,"")),e=e.replace(F,""),a=d(e);h<=a.length;){switch(o=a[h],l){case tt:if(!o||!k.test(o)){if(n)return"Invalid scheme";l=nt;continue}g+=o.toLowerCase(),l=et;break;case et:if(o&&(M.test(o)||"+"==o||"-"==o||"."==o))g+=o.toLowerCase();else{if(":"!=o){if(n)return"Invalid scheme";g="",l=nt,h=0;continue}if(n&&(G(t)!=f(W,g)||"file"==g&&(q(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=g,n)return void(G(t)&&W[t.scheme]==t.port&&(t.port=null));g="","file"==t.scheme?l=dt:G(t)&&r&&r.scheme==t.scheme?l=it:G(t)?l=st:"/"==a[h+1]?(l=rt,h++):(t.cannotBeABaseURL=!0,t.path.push(""),l=xt)}break;case nt:if(!r||r.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==o){t.scheme=r.scheme,t.path=r.path.slice(),t.query=r.query,t.fragment="",t.cannotBeABaseURL=!0,l=mt;break}l="file"==r.scheme?dt:at;continue;case it:if("/"!=o||"/"!=a[h+1]){l=at;continue}l=ct,h++;break;case rt:if("/"==o){l=ut;break}l=yt;continue;case at:if(t.scheme=r.scheme,o==i)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query;else if("/"==o||"\\"==o&&G(t))l=ot;else if("?"==o)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query="",l=_t;else{if("#"!=o){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.path.pop(),l=yt;continue}t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query,t.fragment="",l=mt}break;case ot:if(!G(t)||"/"!=o&&"\\"!=o){if("/"!=o){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,l=yt;continue}l=ut}else l=ct;break;case st:if(l=ct,"/"!=o||"/"!=g.charAt(h+1))continue;h++;break;case ct:if("/"!=o&&"\\"!=o){l=ut;continue}break;case ut:if("@"==o){p&&(g="%40"+g),p=!0,s=d(g);for(var x=0;x<s.length;x++){var _=s[x];if(":"!=_||y){var m=H(_,V);y?t.password+=m:t.username+=m}else y=!0}g=""}else if(o==i||"/"==o||"?"==o||"#"==o||"\\"==o&&G(t)){if(p&&""==g)return"Invalid authority";h-=d(g).length+1,g="",l=lt}else g+=o;break;case lt:case ft:if(n&&"file"==t.scheme){l=pt;continue}if(":"!=o||v){if(o==i||"/"==o||"?"==o||"#"==o||"\\"==o&&G(t)){if(G(t)&&""==g)return"Invalid host";if(n&&""==g&&(q(t)||null!==t.port))return;if(c=z(t,g))return c;if(g="",l=vt,n)return;continue}"["==o?v=!0:"]"==o&&(v=!1),g+=o}else{if(""==g)return"Invalid host";if(c=z(t,g))return c;if(g="",l=ht,n==ft)return}break;case ht:if(!E.test(o)){if(o==i||"/"==o||"?"==o||"#"==o||"\\"==o&&G(t)||n){if(""!=g){var b=parseInt(g,10);if(b>65535)return"Invalid port";t.port=G(t)&&b===W[t.scheme]?null:b,g=""}if(n)return;l=vt;continue}return"Invalid port"}g+=o;break;case dt:if(t.scheme="file","/"==o||"\\"==o)l=gt;else{if(!r||"file"!=r.scheme){l=yt;continue}if(o==i)t.host=r.host,t.path=r.path.slice(),t.query=r.query;else if("?"==o)t.host=r.host,t.path=r.path.slice(),t.query="",l=_t;else{if("#"!=o){K(a.slice(h).join(""))||(t.host=r.host,t.path=r.path.slice(),J(t)),l=yt;continue}t.host=r.host,t.path=r.path.slice(),t.query=r.query,t.fragment="",l=mt}}break;case gt:if("/"==o||"\\"==o){l=pt;break}r&&"file"==r.scheme&&!K(a.slice(h).join(""))&&(Z(r.path[0],!0)?t.path.push(r.path[0]):t.host=r.host),l=yt;continue;case pt:if(o==i||"/"==o||"\\"==o||"?"==o||"#"==o){if(!n&&Z(g))l=yt;else if(""==g){if(t.host="",n)return;l=vt}else{if(c=z(t,g))return c;if("localhost"==t.host&&(t.host=""),n)return;g="",l=vt}continue}g+=o;break;case vt:if(G(t)){if(l=yt,"/"!=o&&"\\"!=o)continue}else if(n||"?"!=o)if(n||"#"!=o){if(o!=i&&(l=yt,"/"!=o))continue}else t.fragment="",l=mt;else t.query="",l=_t;break;case yt:if(o==i||"/"==o||"\\"==o&&G(t)||!n&&("?"==o||"#"==o)){if(".."===(u=(u=g).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(J(t),"/"==o||"\\"==o&&G(t)||t.path.push("")):Q(g)?"/"==o||"\\"==o&&G(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&Z(g)&&(t.host&&(t.host=""),g=g.charAt(0)+":"),t.path.push(g)),g="","file"==t.scheme&&(o==i||"?"==o||"#"==o))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==o?(t.query="",l=_t):"#"==o&&(t.fragment="",l=mt)}else g+=H(o,U);break;case xt:"?"==o?(t.query="",l=_t):"#"==o?(t.fragment="",l=mt):o!=i&&(t.path[0]+=H(o,j));break;case _t:n||"#"!=o?o!=i&&("'"==o&&G(t)?t.query+="%27":t.query+="#"==o?"%23":H(o,j)):(t.fragment="",l=mt);break;case mt:o!=i&&(t.fragment+=H(o,Y))}h++}},wt=function(t){var e,n,i=l(this,wt,"URL"),r=arguments.length>1?arguments[1]:void 0,o=String(t),s=w(i,{type:"URL"});if(void 0!==r)if(r instanceof wt)e=T(r);else if(n=bt(e={},String(r)))throw TypeError(n);if(n=bt(s,o,null,e))throw TypeError(n);var c=s.searchParams=new m,u=b(c);u.updateSearchParams(s.query),u.updateURL=function(){s.query=String(c)||null},a||(i.href=At.call(i),i.origin=St.call(i),i.protocol=kt.call(i),i.username=Mt.call(i),i.password=Et.call(i),i.host=Ct.call(i),i.hostname=Lt.call(i),i.port=Ot.call(i),i.pathname=Rt.call(i),i.search=It.call(i),i.searchParams=Dt.call(i),i.hash=Pt.call(i))},Tt=wt.prototype,At=function(){var t=T(this),e=t.scheme,n=t.username,i=t.password,r=t.host,a=t.port,o=t.path,s=t.query,c=t.fragment,u=e+":";return null!==r?(u+="//",q(t)&&(u+=n+(i?":"+i:"")+"@"),u+=B(r),null!==a&&(u+=":"+a)):"file"==e&&(u+="//"),u+=t.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},St=function(){var t=T(this),e=t.scheme,n=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&G(t)?e+"://"+B(t.host)+(null!==n?":"+n:""):"null"},kt=function(){return T(this).scheme+":"},Mt=function(){return T(this).username},Et=function(){return T(this).password},Ct=function(){var t=T(this),e=t.host,n=t.port;return null===e?"":null===n?B(e):B(e)+":"+n},Lt=function(){var t=T(this).host;return null===t?"":B(t)},Ot=function(){var t=T(this).port;return null===t?"":String(t)},Rt=function(){var t=T(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},It=function(){var t=T(this).query;return t?"?"+t:""},Dt=function(){return T(this).searchParams},Pt=function(){var t=T(this).fragment;return t?"#"+t:""},Ft=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(a&&c(Tt,{href:Ft(At,(function(t){var e=T(this),n=String(t),i=bt(e,n);if(i)throw TypeError(i);b(e.searchParams).updateSearchParams(e.query)})),origin:Ft(St),protocol:Ft(kt,(function(t){var e=T(this);bt(e,String(t)+":",tt)})),username:Ft(Mt,(function(t){var e=T(this),n=d(String(t));if(!$(e)){e.username="";for(var i=0;i<n.length;i++)e.username+=H(n[i],V)}})),password:Ft(Et,(function(t){var e=T(this),n=d(String(t));if(!$(e)){e.password="";for(var i=0;i<n.length;i++)e.password+=H(n[i],V)}})),host:Ft(Ct,(function(t){var e=T(this);e.cannotBeABaseURL||bt(e,String(t),lt)})),hostname:Ft(Lt,(function(t){var e=T(this);e.cannotBeABaseURL||bt(e,String(t),ft)})),port:Ft(Ot,(function(t){var e=T(this);$(e)||(""==(t=String(t))?e.port=null:bt(e,t,ht))})),pathname:Ft(Rt,(function(t){var e=T(this);e.cannotBeABaseURL||(e.path=[],bt(e,t+"",vt))})),search:Ft(It,(function(t){var e=T(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",bt(e,t,_t)),b(e.searchParams).updateSearchParams(e.query)})),searchParams:Ft(Dt),hash:Ft(Pt,(function(t){var e=T(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",bt(e,t,mt)):e.fragment=null}))}),u(Tt,"toJSON",(function(){return At.call(this)}),{enumerable:!0}),u(Tt,"toString",(function(){return At.call(this)}),{enumerable:!0}),_){var zt=_.createObjectURL,Nt=_.revokeObjectURL;zt&&u(wt,"createObjectURL",(function(t){return zt.apply(_,arguments)})),Nt&&u(wt,"revokeObjectURL",(function(t){return Nt.apply(_,arguments)}))}v(wt,"URL"),r({global:!0,forced:!o,sham:!a},{URL:wt})},function(t,e,n){var i=n(8),r=n(56),a=n(31),o=r("iterator");t.exports=!i((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,i){e.delete("b"),n+=i+t})),a&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[o]||"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"!==n||"x"!==new URL("http://x",void 0).host}))},function(t,e,n){"use strict";var i=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",o=Math.floor,s=String.fromCharCode,c=function(t){return t+22+75*(t<26)},u=function(t,e,n){var i=0;for(t=n?o(t/700):t>>1,t+=o(t/e);t>455;i+=36)t=o(t/35);return o(i+36*t/(t+38))},l=function(t){var e,n,i=[],r=(t=function(t){for(var e=[],n=0,i=t.length;n<i;){var r=t.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){var a=t.charCodeAt(n++);56320==(64512&a)?e.push(((1023&r)<<10)+(1023&a)+65536):(e.push(r),n--)}else e.push(r)}return e}(t)).length,l=128,f=0,h=72;for(e=0;e<t.length;e++)(n=t[e])<128&&i.push(s(n));var d=i.length,g=d;for(d&&i.push("-");g<r;){var p=2147483647;for(e=0;e<t.length;e++)(n=t[e])>=l&&n<p&&(p=n);var v=g+1;if(p-l>o((2147483647-f)/v))throw RangeError(a);for(f+=(p-l)*v,l=p,e=0;e<t.length;e++){if((n=t[e])<l&&++f>2147483647)throw RangeError(a);if(n==l){for(var y=f,x=36;;x+=36){var _=x<=h?1:x>=h+26?26:x-h;if(y<_)break;var m=y-_,b=36-_;i.push(s(c(_+m%b))),y=o(m/b)}i.push(s(c(y))),h=u(f,v,g==d),f=0,++g}}++f,++l}return i.join("")};t.exports=function(t){var e,n,a=[],o=t.toLowerCase().replace(r,".").split(".");for(e=0;e<o.length;e++)n=o[e],a.push(i.test(n)?"xn--"+l(n):n);return a.join(".")}},function(t,e,n){"use strict";n(170);var i=n(4),r=n(36),a=n(370),o=n(23),s=n(283),c=n(59),u=n(172),l=n(27),f=n(284),h=n(17),d=n(61),g=n(93),p=n(22),v=n(16),y=n(51),x=n(10),_=n(373),m=n(92),b=n(56),w=r("fetch"),T=r("Headers"),A=b("iterator"),S=l.set,k=l.getterFor("URLSearchParams"),M=l.getterFor("URLSearchParamsIterator"),E=/\+/g,C=Array(4),L=function(t){return C[t-1]||(C[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},O=function(t){try{return decodeURIComponent(t)}catch(e){return t}},R=function(t){var e=t.replace(E," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(L(n--),O);return e}},I=/[!'()~]|%20/g,D={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},P=function(t){return D[t]},F=function(t){return encodeURIComponent(t).replace(I,P)},z=function(t,e){if(e)for(var n,i,r=e.split("&"),a=0;a<r.length;)(n=r[a++]).length&&(i=n.split("="),t.push({key:R(i.shift()),value:R(i.join("="))}))},N=function(t){this.entries.length=0,z(this.entries,t)},X=function(t,e){if(t<e)throw TypeError("Not enough arguments")},B=u((function(t,e){S(this,{type:"URLSearchParamsIterator",iterator:_(k(t).entries),kind:e})}),"Iterator",(function(){var t=M(this),e=t.kind,n=t.iterator.next(),i=n.value;return n.done||(n.value="keys"===e?i.key:"values"===e?i.value:[i.key,i.value]),n})),j=function(){f(this,j,"URLSearchParams");var t,e,n,i,r,a,o,s,c,u=arguments.length>0?arguments[0]:void 0,l=this,d=[];if(S(l,{type:"URLSearchParams",entries:d,updateURL:function(){},updateSearchParams:N}),void 0!==u)if(v(u))if("function"==typeof(t=m(u)))for(n=(e=t.call(u)).next;!(i=n.call(e)).done;){if((o=(a=(r=_(p(i.value))).next).call(r)).done||(s=a.call(r)).done||!a.call(r).done)throw TypeError("Expected sequence with length 2");d.push({key:o.value+"",value:s.value+""})}else for(c in u)h(u,c)&&d.push({key:c,value:u[c]+""});else z(d,"string"==typeof u?"?"===u.charAt(0)?u.slice(1):u:u+"")},Y=j.prototype;s(Y,{append:function(t,e){X(arguments.length,2);var n=k(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){X(arguments.length,1);for(var e=k(this),n=e.entries,i=t+"",r=0;r<n.length;)n[r].key===i?n.splice(r,1):r++;e.updateURL()},get:function(t){X(arguments.length,1);for(var e=k(this).entries,n=t+"",i=0;i<e.length;i++)if(e[i].key===n)return e[i].value;return null},getAll:function(t){X(arguments.length,1);for(var e=k(this).entries,n=t+"",i=[],r=0;r<e.length;r++)e[r].key===n&&i.push(e[r].value);return i},has:function(t){X(arguments.length,1);for(var e=k(this).entries,n=t+"",i=0;i<e.length;)if(e[i++].key===n)return!0;return!1},set:function(t,e){X(arguments.length,1);for(var n,i=k(this),r=i.entries,a=!1,o=t+"",s=e+"",c=0;c<r.length;c++)(n=r[c]).key===o&&(a?r.splice(c--,1):(a=!0,n.value=s));a||r.push({key:o,value:s}),i.updateURL()},sort:function(){var t,e,n,i=k(this),r=i.entries,a=r.slice();for(r.length=0,n=0;n<a.length;n++){for(t=a[n],e=0;e<n;e++)if(r[e].key>t.key){r.splice(e,0,t);break}e===n&&r.push(t)}i.updateURL()},forEach:function(t){for(var e,n=k(this).entries,i=d(t,arguments.length>1?arguments[1]:void 0,3),r=0;r<n.length;)i((e=n[r++]).value,e.key,this)},keys:function(){return new B(this,"keys")},values:function(){return new B(this,"values")},entries:function(){return new B(this,"entries")}},{enumerable:!0}),o(Y,A,Y.entries),o(Y,"toString",(function(){for(var t,e=k(this).entries,n=[],i=0;i<e.length;)t=e[i++],n.push(F(t.key)+"="+F(t.value));return n.join("&")}),{enumerable:!0}),c(j,"URLSearchParams"),i({global:!0,forced:!a},{URLSearchParams:j}),a||"function"!=typeof w||"function"!=typeof T||i({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,n,i,r=[t];return arguments.length>1&&(e=arguments[1],v(e)&&(n=e.body,"URLSearchParams"===g(n)&&((i=e.headers?new T(e.headers):new T).has("content-type")||i.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=y(e,{body:x(0,String(n)),headers:x(0,i)}))),r.push(e)),w.apply(this,r)}}),t.exports={URLSearchParams:j,getState:k}},function(t,e,n){var i=n(22),r=n(92);t.exports=function(t){var e=r(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return i(e.call(t))}},function(t,e,n){"use strict";n(4)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(t,e,n){var i=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",o=i.toStringTag||"@@toStringTag";function s(t,e,n,i){var r=e&&e.prototype instanceof l?e:l,a=Object.create(r.prototype),o=new w(i||[]);return a._invoke=function(t,e,n){var i="suspendedStart";return function(r,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw a;return A()}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=_(o,n);if(s){if(s===u)continue;return s}}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 l=c(t,e,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}(t,n,o),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var u={};function l(){}function f(){}function h(){}var d={};d[r]=function(){return this};var g=Object.getPrototypeOf,p=g&&g(g(T([])));p&&p!==e&&n.call(p,r)&&(d=p);var v=h.prototype=l.prototype=Object.create(d);function y(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function x(t,e){var i;this._invoke=function(r,a){function o(){return new e((function(i,o){!function i(r,a,o,s){var u=c(t[r],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,o,s)}),(function(t){i("throw",t,o,s)})):e.resolve(f).then((function(t){l.value=t,o(l)}),(function(t){return i("throw",t,o,s)}))}s(u.arg)}(r,a,i,o)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var i=c(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,u;var r=i.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function m(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,this),this.reset(!0)}function T(t){if(t){var e=t[r];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function e(){for(;++i<t.length;)if(n.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:A}}function A(){return{value:void 0,done:!0}}return f.prototype=v.constructor=h,h.constructor=f,h[o]=f.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,o in t||(t[o]="GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},y(x.prototype),x.prototype[a]=function(){return this},t.AsyncIterator=x,t.async=function(e,n,i,r,a){void 0===a&&(a=Promise);var o=new x(s(e,n,i,r),a);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},y(v),v[o]="Generator",v[r]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var i=e.pop();if(i in t)return n.value=i,n.done=!1,n}return n.done=!0,n}},t.values=T,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(n,i){return o.type="throw",o.arg=t,e.next=n,i&&(e.method="next",e.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,u):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),u}},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;b(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}(t.exports);try{regeneratorRuntime=i}catch(t){Function("r","regeneratorRuntime = r")(i)}},function(t,e,n){t.exports=n(375)},function(t,e,n){n(1),t.exports=n(378)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function o(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}n.r(e),n.d(e,"bb",(function(){return Al}));var s=new Date,c=new Date;function u(t,e,n,i){function r(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return r.floor=function(e){return t(e=new Date(+e)),e},r.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},r.round=function(t){var e=r(t),n=r.ceil(t);return t-e<n-t?e:n},r.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},r.range=function(n,i,a){var o,s=[];if(n=r.ceil(n),a=null==a?1:Math.floor(a),!(n<i&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<i);return s},r.filter=function(n){return u((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,i){if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););}))},n&&(r.count=function(e,i){return s.setTime(+e),c.setTime(+i),t(s),t(c),Math.floor(n(s,c))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?function(e){return i(e)%t==0}:function(e){return r.count(0,e)%t==0}):r:null}),r}var l=u((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));l.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?u((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):l:null};var f=l,h=(l.range,u((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()}))),d=h,g=(h.range,u((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()}))),p=g,v=(g.range,u((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()}))),y=v,x=(v.range,u((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}))),_=x;x.range;function m(t){return u((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var b=m(0),w=m(1),T=m(2),A=m(3),S=m(4),k=m(5),M=m(6),E=(b.range,w.range,T.range,A.range,S.range,k.range,M.range,u((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),C=E,L=(E.range,u((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));L.every=function(t){return isFinite(t=Math.floor(t))&&t>0?u((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var O=L,R=(L.range,u((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()}))),I=(R.range,u((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()}))),D=(I.range,u((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}))),P=D;D.range;function F(t){return u((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var z=F(0),N=F(1),X=F(2),B=F(3),j=F(4),Y=F(5),U=F(6),V=(z.range,N.range,X.range,B.range,j.range,Y.range,U.range,u((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}))),H=(V.range,u((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));H.every=function(t){return isFinite(t=Math.floor(t))&&t>0?u((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var W=H;H.range;function G(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 q(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 $(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var Z,K,J,Q,tt,et={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,it=/^%/,rt=/[\\^$*+?|[\]().{}]/g;function at(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",a=r.length;return i+(a<n?Array(n-a+1).join(e)+r:r)}function ot(t){return t.replace(rt,"\\$&")}function st(t){return new RegExp("^(?:"+t.map(ot).join("|")+")","i")}function ct(t){for(var e={},n=-1,i=t.length;++n<i;)e[t[n].toLowerCase()]=n;return e}function ut(t,e,n){var i=nt.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function lt(t,e,n){var i=nt.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function ft(t,e,n){var i=nt.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function ht(t,e,n){var i=nt.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function dt(t,e,n){var i=nt.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function gt(t,e,n){var i=nt.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function pt(t,e,n){var i=nt.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function vt(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 yt(t,e,n){var i=nt.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function xt(t,e,n){var i=nt.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function _t(t,e,n){var i=nt.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function mt(t,e,n){var i=nt.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function bt(t,e,n){var i=nt.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function wt(t,e,n){var i=nt.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function Tt(t,e,n){var i=nt.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function At(t,e,n){var i=nt.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function St(t,e,n){var i=nt.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function kt(t,e,n){var i=it.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function Mt(t,e,n){var i=nt.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function Et(t,e,n){var i=nt.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function Ct(t,e){return at(t.getDate(),e,2)}function Lt(t,e){return at(t.getHours(),e,2)}function Ot(t,e){return at(t.getHours()%12||12,e,2)}function Rt(t,e){return at(1+_.count(O(t),t),e,3)}function It(t,e){return at(t.getMilliseconds(),e,3)}function Dt(t,e){return It(t,e)+"000"}function Pt(t,e){return at(t.getMonth()+1,e,2)}function Ft(t,e){return at(t.getMinutes(),e,2)}function zt(t,e){return at(t.getSeconds(),e,2)}function Nt(t){var e=t.getDay();return 0===e?7:e}function Xt(t,e){return at(b.count(O(t)-1,t),e,2)}function Bt(t,e){var n=t.getDay();return t=n>=4||0===n?S(t):S.ceil(t),at(S.count(O(t),t)+(4===O(t).getDay()),e,2)}function jt(t){return t.getDay()}function Yt(t,e){return at(w.count(O(t)-1,t),e,2)}function Ut(t,e){return at(t.getFullYear()%100,e,2)}function Vt(t,e){return at(t.getFullYear()%1e4,e,4)}function Ht(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+at(e/60|0,"0",2)+at(e%60,"0",2)}function Wt(t,e){return at(t.getUTCDate(),e,2)}function Gt(t,e){return at(t.getUTCHours(),e,2)}function qt(t,e){return at(t.getUTCHours()%12||12,e,2)}function $t(t,e){return at(1+P.count(W(t),t),e,3)}function Zt(t,e){return at(t.getUTCMilliseconds(),e,3)}function Kt(t,e){return Zt(t,e)+"000"}function Jt(t,e){return at(t.getUTCMonth()+1,e,2)}function Qt(t,e){return at(t.getUTCMinutes(),e,2)}function te(t,e){return at(t.getUTCSeconds(),e,2)}function ee(t){var e=t.getUTCDay();return 0===e?7:e}function ne(t,e){return at(z.count(W(t)-1,t),e,2)}function ie(t,e){var n=t.getUTCDay();return t=n>=4||0===n?j(t):j.ceil(t),at(j.count(W(t),t)+(4===W(t).getUTCDay()),e,2)}function re(t){return t.getUTCDay()}function ae(t,e){return at(N.count(W(t)-1,t),e,2)}function oe(t,e){return at(t.getUTCFullYear()%100,e,2)}function se(t,e){return at(t.getUTCFullYear()%1e4,e,4)}function ce(){return"+0000"}function ue(){return"%"}function le(t){return+t}function fe(t){return Math.floor(+t/1e3)}Z=function(t){function e(t,e){return function(n){var i,r,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null==(r=et[i=t.charAt(++s)])?r="e"===i?" ":"0":i=t.charAt(++s),(a=e[i])&&(i=a(n,r)),o.push(i),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function n(t,e){return function(n){var r,a,o=$(1900,void 0,1);if(i(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(e&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(a=(r=q($(o.y,0,1))).getUTCDay(),r=a>4||0===a?N.ceil(r):N(r),r=P.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(a=(r=G($(o.y,0,1))).getDay(),r=a>4||0===a?w.ceil(r):w(r),r=_.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.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),a="Z"in o?q($(o.y,0,1)).getUTCDay():G($(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(a+5)%7:o.w+7*o.U-(a+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,q(o)):G(o)}}function i(t,e,n,i){for(var r,a,o=0,s=e.length,c=n.length;o<s;){if(i>=c)return-1;if(37===(r=e.charCodeAt(o++))){if(r=e.charAt(o++),!(a=k[r in et?e.charAt(o++):r])||(i=a(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}var r=t.dateTime,a=t.date,o=t.time,s=t.periods,c=t.days,u=t.shortDays,l=t.months,f=t.shortMonths,h=st(s),d=ct(s),g=st(c),p=ct(c),v=st(u),y=ct(u),x=st(l),m=ct(l),b=st(f),T=ct(f),A={a:function(t){return u[t.getDay()]},A:function(t){return c[t.getDay()]},b:function(t){return f[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:null,d:Ct,e:Ct,f:Dt,H:Lt,I:Ot,j:Rt,L:It,m:Pt,M:Ft,p:function(t){return s[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:le,s:fe,S:zt,u:Nt,U:Xt,V:Bt,w:jt,W:Yt,x:null,X:null,y:Ut,Y:Vt,Z:Ht,"%":ue},S={a:function(t){return u[t.getUTCDay()]},A:function(t){return c[t.getUTCDay()]},b:function(t){return f[t.getUTCMonth()]},B:function(t){return l[t.getUTCMonth()]},c:null,d:Wt,e:Wt,f:Kt,H:Gt,I:qt,j:$t,L:Zt,m:Jt,M:Qt,p:function(t){return s[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:le,s:fe,S:te,u:ee,U:ne,V:ie,w:re,W:ae,x:null,X:null,y:oe,Y:se,Z:ce,"%":ue},k={a:function(t,e,n){var i=v.exec(e.slice(n));return i?(t.w=y[i[0].toLowerCase()],n+i[0].length):-1},A:function(t,e,n){var i=g.exec(e.slice(n));return i?(t.w=p[i[0].toLowerCase()],n+i[0].length):-1},b:function(t,e,n){var i=b.exec(e.slice(n));return i?(t.m=T[i[0].toLowerCase()],n+i[0].length):-1},B:function(t,e,n){var i=x.exec(e.slice(n));return i?(t.m=m[i[0].toLowerCase()],n+i[0].length):-1},c:function(t,e,n){return i(t,r,e,n)},d:_t,e:_t,f:St,H:bt,I:bt,j:mt,L:At,m:xt,M:wt,p:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.p=d[i[0].toLowerCase()],n+i[0].length):-1},q:yt,Q:Mt,s:Et,S:Tt,u:lt,U:ft,V:ht,w:ut,W:dt,x:function(t,e,n){return i(t,a,e,n)},X:function(t,e,n){return i(t,o,e,n)},y:pt,Y:gt,Z:vt,"%":kt};return A.x=e(a,A),A.X=e(o,A),A.c=e(r,A),S.x=e(a,S),S.X=e(o,S),S.c=e(r,S),{format:function(t){var n=e(t+="",A);return n.toString=function(){return t},n},parse:function(t){var e=n(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var n=e(t+="",S);return n.toString=function(){return t},n},utcParse:function(t){var e=n(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"]}),K=Z.format,J=Z.parse,Q=Z.utcFormat,tt=Z.utcParse;Date.prototype.toISOString||Q("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||tt("%Y-%m-%dT%H:%M:%S.%LZ");var he="http://www.w3.org/1999/xhtml",de={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},ge=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),de.hasOwnProperty(e)?{space:de[e],local:t}:t};function pe(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===he&&e.documentElement.namespaceURI===he?e.createElement(t):e.createElementNS(n,t)}}function ve(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var ye=function(t){var e=ge(t);return(e.local?ve:pe)(e)};function xe(){}var _e=function(t){return null==t?xe:function(){return this.querySelector(t)}};function me(){return[]}var be=function(t){return null==t?me:function(){return this.querySelectorAll(t)}},we=function(t){return function(){return this.matches(t)}},Te=function(t){return Array(t.length)};function Ae(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ae.prototype={constructor:Ae,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Se(t,e,n,i,r,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],i[s]=o):n[s]=new Ae(t,a[s]);for(;s<c;++s)(o=e[s])&&(r[s]=o)}function ke(t,e,n,i,r,a,o){var s,c,u,l={},f=e.length,h=a.length,d=Array(f);for(s=0;s<f;++s)(c=e[s])&&(d[s]=u="$"+o.call(c,c.__data__,s,e),u in l?r[s]=c:l[u]=c);for(s=0;s<h;++s)(c=l[u="$"+o.call(t,a[s],s,a)])?(i[s]=c,c.__data__=a[s],l[u]=null):n[s]=new Ae(t,a[s]);for(s=0;s<f;++s)(c=e[s])&&l[d[s]]===c&&(r[s]=c)}function Me(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ee(t){return function(){this.removeAttribute(t)}}function Ce(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Le(t,e){return function(){this.setAttribute(t,e)}}function Oe(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Re(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Ie(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)}}var De=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Pe(t){return function(){this.style.removeProperty(t)}}function Fe(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ze(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Ne(t,e){return t.style.getPropertyValue(e)||De(t).getComputedStyle(t,null).getPropertyValue(e)}function Xe(t){return function(){delete this[t]}}function Be(t,e){return function(){this[t]=e}}function je(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ye(t){return t.trim().split(/^|\s+/)}function Ue(t){return t.classList||new Ve(t)}function Ve(t){this._node=t,this._names=Ye(t.getAttribute("class")||"")}function He(t,e){for(var n=Ue(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function We(t,e){for(var n=Ue(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Ge(t){return function(){He(this,t)}}function qe(t){return function(){We(this,t)}}function $e(t,e){return function(){(e.apply(this,arguments)?He:We)(this,t)}}Ve.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ze(){this.textContent=""}function Ke(t){return function(){this.textContent=t}}function Je(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Qe(){this.innerHTML=""}function tn(t){return function(){this.innerHTML=t}}function en(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function nn(){this.nextSibling&&this.parentNode.appendChild(this)}function rn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function an(){return null}function on(){var t=this.parentNode;t&&t.removeChild(this)}function sn(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function cn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var un={},ln=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(un={mouseenter:"mouseover",mouseleave:"mouseout"}));function fn(t,e,n){return t=hn(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function hn(t,e,n){return function(i){var r=ln;ln=i;try{t.call(this,this.__data__,e,n)}finally{ln=r}}}function dn(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function gn(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,a=e.length;i<a;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.capture);++r?e.length=r:delete this.__on}}}function pn(t,e,n){var i=un.hasOwnProperty(t.type)?fn:hn;return function(r,a,o){var s,c=this.__on,u=i(e,a,o);if(c)for(var l=0,f=c.length;l<f;++l)if((s=c[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=u,s.capture=n),void(s.value=e);this.addEventListener(t.type,u,n),s={type:t.type,name:t.name,value:e,listener:u,capture:n},c?c.push(s):this.__on=[s]}}function vn(t,e,n,i){var r=ln;t.sourceEvent=ln,ln=t;try{return e.apply(n,i)}finally{ln=r}}function yn(t,e,n){var i=De(t),r=i.CustomEvent;"function"==typeof r?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function xn(t,e){return function(){return yn(this,t,e)}}function _n(t,e){return function(){return yn(this,t,e.apply(this,arguments))}}var mn=[null];function bn(t,e){this._groups=t,this._parents=e}function wn(){return new bn([[document.documentElement]],mn)}bn.prototype=wn.prototype={constructor:bn,select:function(t){"function"!=typeof t&&(t=_e(t));for(var e=this._groups,n=e.length,i=Array(n),r=0;r<n;++r)for(var a,o,s=e[r],c=s.length,u=i[r]=Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new bn(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=be(t));for(var e=this._groups,n=e.length,i=[],r=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(i.push(t.call(o,o.__data__,u,s)),r.push(o));return new bn(i,r)},filter:function(t){"function"!=typeof t&&(t=we(t));for(var e=this._groups,n=e.length,i=Array(n),r=0;r<n;++r)for(var a,o=e[r],s=o.length,c=i[r]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new bn(i,this._parents)},data:function(t,e){if(!t)return g=Array(this.size()),l=-1,this.each((function(t){g[++l]=t})),g;var n,i=e?ke:Se,r=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=Array(o),c=Array(o),u=Array(o),l=0;l<o;++l){var f=r[l],h=a[l],d=h.length,g=t.call(f,f&&f.__data__,l,r),p=g.length,v=c[l]=Array(p),y=s[l]=Array(p);i(f,h,v,y,u[l]=Array(d),g,e);for(var x,_,m=0,b=0;m<p;++m)if(x=v[m]){for(m>=b&&(b=m+1);!(_=y[b])&&++b<p;);x._next=_||null}}return(s=new bn(s,r))._enter=c,s._exit=u,s},enter:function(){return new bn(this._enter||this._groups.map(Te),this._parents)},exit:function(){return new bn(this._exit||this._groups.map(Te),this._parents)},join:function(t,e,n){var i=this.enter(),r=this,a=this.exit();return i="function"==typeof t?t(i):i.append(t+""),null!=e&&(r=e(r)),null==n?a.remove():n(a),i&&r?i.merge(r).order():r},merge:function(t){for(var e=this._groups,n=t._groups,i=e.length,r=n.length,a=Math.min(i,r),o=Array(i),s=0;s<a;++s)for(var c,u=e[s],l=n[s],f=u.length,h=o[s]=Array(f),d=0;d<f;++d)(c=u[d]||l[d])&&(h[d]=c);for(;s<i;++s)o[s]=e[s];return new bn(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,r=t[e],a=r.length-1,o=r[a];--a>=0;)(i=r[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Me);for(var n=this._groups,i=n.length,r=Array(i),a=0;a<i;++a){for(var o,s=n[a],c=s.length,u=r[a]=Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new bn(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,r=t[e],a=0,o=r.length;a<o;++a)if(i=r[a])return i;return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r,a=e[n],o=0,s=a.length;o<s;++o)(r=a[o])&&t.call(r,r.__data__,o,a);return this},attr:function(t,e){var n=ge(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?Ce:Ee:"function"==typeof e?n.local?Ie:Re:n.local?Oe:Le)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Pe:"function"==typeof e?ze:Fe)(t,e,null==n?"":n)):Ne(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Xe:"function"==typeof e?je:Be)(t,e)):this.node()[t]},classed:function(t,e){var n=Ye(t+"");if(arguments.length<2){for(var i=Ue(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?$e:e?Ge:qe)(n,e))},text:function(t){return arguments.length?this.each(null==t?Ze:("function"==typeof t?Je:Ke)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Qe:("function"==typeof t?en:tn)(t)):this.node().innerHTML},raise:function(){return this.each(nn)},lower:function(){return this.each(rn)},append:function(t){var e="function"==typeof t?t:ye(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ye(t),i=null==e?an:"function"==typeof e?e:_e(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(on)},clone:function(t){return this.select(t?cn:sn)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,r,a=dn(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?pn:gn,null==n&&(n=!1),i=0;i<o;++i)this.each(s(a[i],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(i=0,c=s[u];i<o;++i)if((r=a[i]).type===c.type&&r.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?_n:xn)(t,e))}};var Tn=wn,An=function(t){return"string"==typeof t?new bn([[document.querySelector(t)]],[document.documentElement]):new bn([[t]],mn)},Sn=0;function kn(){this._="@"+(++Sn).toString(36)}kn.prototype=function(){return new kn}.prototype={constructor:kn,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Mn=function(){for(var t,e=ln;t=e.sourceEvent;)e=t;return e},En=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]},Cn=function(t){var e=Mn();return e.changedTouches&&(e=e.changedTouches[0]),En(t,e)},Ln=function(t){return"string"==typeof t?new bn([document.querySelectorAll(t)],[document.documentElement]):new bn([null==t?[]:t],mn)},On=function(t,e,n){arguments.length<3&&(n=e,e=Mn().changedTouches);for(var i,r=0,a=e?e.length:0;r<a;++r)if((i=e[r]).identifier===n)return En(t,i);return null},Rn={value:function(){}};function In(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i)throw new Error("illegal type: "+t);i[t]=[]}return new Dn(i)}function Dn(t){this._=t}function Pn(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");if(i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Fn(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function zn(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Rn,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}Dn.prototype=In.prototype={constructor:Dn,on:function(t,e){var n,i=this._,r=Pn(t+"",i),a=-1,o=r.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=r[a]).type)i[n]=zn(i[n],t.name,e);else if(null==e)for(n in i)i[n]=zn(i[n],t.name,null);return this}for(;++a<o;)if((n=(t=r[a]).type)&&(n=Fn(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Dn(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=Array(n),a=0;a<n;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(i=this._[t]).length;a<n;++a)i[a].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,a=i.length;r<a;++r)i[r].value.apply(e,n)}};var Nn=In;function Xn(t){return(Xn="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)}var Bn,jn,Yn=0,Un=0,Vn=0,Hn=0,Wn=0,Gn=0,qn="object"===("undefined"==typeof performance?"undefined":Xn(performance))&&performance.now?performance:Date,$n="object"===("undefined"==typeof window?"undefined":Xn(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zn(){return Wn||($n(Kn),Wn=qn.now()+Gn)}function Kn(){Wn=0}function Jn(){this._call=this._time=this._next=null}function Qn(t,e,n){var i=new Jn;return i.restart(t,e,n),i}function ti(){Wn=(Hn=qn.now())+Gn,Yn=Un=0;try{!function(){Zn(),++Yn;for(var t,e=Bn;e;)(t=Wn-e._time)>=0&&e._call.call(null,t),e=e._next;--Yn}()}finally{Yn=0,function(){for(var t,e,n=Bn,i=1/0;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:Bn=e);jn=t,ni(i)}(),Wn=0}}function ei(){var t=qn.now(),e=t-Hn;e>1e3&&(Gn-=e,Hn=t)}function ni(t){Yn||(Un&&(Un=clearTimeout(Un)),t-Wn>24?(t<1/0&&(Un=setTimeout(ti,t-qn.now()-Gn)),Vn&&(Vn=clearInterval(Vn))):(!Vn&&(Hn=qn.now(),Vn=setInterval(ei,1e3)),Yn=1,$n(ti)))}Jn.prototype=Qn.prototype={constructor:Jn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Zn():+n)+(null==e?0:+e),this._next||jn===this||(jn?jn._next=this:Bn=this,jn=this),this._call=t,this._time=n,ni()},stop:function(){this._call&&(this._call=null,this._time=1/0,ni())}};var ii=function(t,e,n){var i=new Jn;return e=null==e?0:+e,i.restart((function(n){i.stop(),t(n+e)}),e,n),i},ri=Nn("start","end","cancel","interrupt"),ai=[],oi=function(t,e,n,i,r,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){function i(c){var u,l,f,h;if(1!==n.state)return a();for(u in s)if((h=s[u]).name===n.name){if(3===h.state)return ii(i);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete s[u]):+u<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete s[u])}if(ii((function(){3===n.state&&(n.state=4,n.timer.restart(r,n.delay,n.time),r(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,o=Array(f=n.tween.length),u=0,l=-1;u<f;++u)(h=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(o[++l]=h);o.length=l+1}}function r(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=5,1),r=-1,s=o.length;++r<s;)o[r].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){for(var i in n.state=6,n.timer.stop(),delete s[e],s)return;delete t.__transition}var o,s=t.__transition;s[e]=n,n.timer=Qn((function(t){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=t&&i(t-n.delay)}),0,n.time)}(t,n,{name:e,index:i,group:r,on:ri,tween:ai,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})};function si(t,e){var n=ui(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ci(t,e){var n=ui(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ui(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var li=function(t,e){var n,i,r,a=t.__transition,o=!0;if(a){for(r in e=null==e?null:e+"",a)(n=a[r]).name===e?(i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[r]):o=!1;o&&delete t.__transition}},fi=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function hi(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function di(){}var gi=/^#([0-9a-f]{3,8})$/,pi=new RegExp("^rgb\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*\\)$"),vi=new RegExp("^rgb\\(\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),yi=new RegExp("^rgba\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),xi=new RegExp("^rgba\\(\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),_i=new RegExp("^hsl\\(\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),mi=new RegExp("^hsla\\(\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),bi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function wi(){return this.rgb().formatHex()}function Ti(){return this.rgb().formatRgb()}function Ai(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=gi.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Si(e):3===n?new Ci(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ci(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ci(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=pi.exec(t))?new Ci(e[1],e[2],e[3],1):(e=vi.exec(t))?new Ci(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=yi.exec(t))?ki(e[1],e[2],e[3],e[4]):(e=xi.exec(t))?ki(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=_i.exec(t))?Ii(e[1],e[2]/100,e[3]/100,1):(e=mi.exec(t))?Ii(e[1],e[2]/100,e[3]/100,e[4]):bi.hasOwnProperty(t)?Si(bi[t]):"transparent"===t?new Ci(NaN,NaN,NaN,0):null}function Si(t){return new Ci(t>>16&255,t>>8&255,255&t,1)}function ki(t,e,n,i){return i<=0&&(t=e=n=NaN),new Ci(t,e,n,i)}function Mi(t){return t instanceof di||(t=Ai(t)),t?new Ci((t=t.rgb()).r,t.g,t.b,t.opacity):new Ci}function Ei(t,e,n,i){return 1===arguments.length?Mi(t):new Ci(t,e,n,null==i?1:i)}function Ci(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Li(){return"#"+Ri(this.r)+Ri(this.g)+Ri(this.b)}function Oi(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Ri(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ii(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Fi(t,e,n,i)}function Di(t){if(t instanceof Fi)return new Fi(t.h,t.s,t.l,t.opacity);if(t instanceof di||(t=Ai(t)),!t)return new Fi;if(t instanceof Fi)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),a=Math.max(e,n,i),o=NaN,s=a-r,c=(a+r)/2;return s?(o=e===a?(n-i)/s+6*(n<i):n===a?(i-e)/s+2:(e-n)/s+4,s/=c<.5?a+r:2-a-r,o*=60):s=c>0&&c<1?0:o,new Fi(o,s,c,t.opacity)}function Pi(t,e,n,i){return 1===arguments.length?Di(t):new Fi(t,e,n,null==i?1:i)}function Fi(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function zi(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}fi(di,Ai,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:wi,formatHex:wi,formatHsl:function(){return Di(this).formatHsl()},formatRgb:Ti,toString:Ti}),fi(Ci,Ei,hi(di,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ci(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ci(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},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:Li,formatHex:Li,formatRgb:Oi,toString:Oi})),fi(Fi,Pi,hi(di,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Fi(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Fi(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 Ci(zi(t>=240?t-240:t+120,r,i),zi(t,r,i),zi(t<120?t+240:t-120,r,i),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(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Ni=Math.PI/180,Xi=180/Math.PI;function Bi(t){if(t instanceof Yi)return new Yi(t.l,t.a,t.b,t.opacity);if(t instanceof $i)return Zi(t);t instanceof Ci||(t=Mi(t));var e,n,i=Wi(t.r),r=Wi(t.g),a=Wi(t.b),o=Ui((.2225045*i+.7168786*r+.0606169*a)/1);return i===r&&r===a?e=n=o:(e=Ui((.4360747*i+.3850649*r+.1430804*a)/.96422),n=Ui((.0139322*i+.0971045*r+.7141733*a)/.82521)),new Yi(116*o-16,500*(e-o),200*(o-n),t.opacity)}function ji(t,e,n,i){return 1===arguments.length?Bi(t):new Yi(t,e,n,null==i?1:i)}function Yi(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}function Ui(t){return t>6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function Vi(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function Hi(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Wi(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Gi(t){if(t instanceof $i)return new $i(t.h,t.c,t.l,t.opacity);if(t instanceof Yi||(t=Bi(t)),0===t.a&&0===t.b)return new $i(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Xi;return new $i(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function qi(t,e,n,i){return 1===arguments.length?Gi(t):new $i(t,e,n,null==i?1:i)}function $i(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function Zi(t){if(isNaN(t.h))return new Yi(t.l,0,0,t.opacity);var e=t.h*Ni;return new Yi(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}fi(Yi,ji,hi(di,{brighter:function(t){return new Yi(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Yi(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ci(Hi(3.1338561*(e=.96422*Vi(e))-1.6168667*(t=1*Vi(t))-.4906146*(n=.82521*Vi(n))),Hi(-.9787684*e+1.9161415*t+.033454*n),Hi(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),fi($i,qi,hi(di,{brighter:function(t){return new $i(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new $i(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Zi(this).rgb()}}));var Ki=-.14861,Ji=1.78277,Qi=-.29227,tr=-1.7884503806,er=1.97294*Ji,nr=Ji*Qi- -.90649*Ki;function ir(t){if(t instanceof ar)return new ar(t.h,t.s,t.l,t.opacity);t instanceof Ci||(t=Mi(t));var e=t.r/255,n=t.g/255,i=t.b/255,r=(nr*i+tr*e-er*n)/(nr+tr-er),a=i-r,o=(1.97294*(n-r)-Qi*a)/-.90649,s=Math.sqrt(o*o+a*a)/(1.97294*r*(1-r)),c=s?Math.atan2(o,a)*Xi-120:NaN;return new ar(c<0?c+360:c,s,r,t.opacity)}function rr(t,e,n,i){return 1===arguments.length?ir(t):new ar(t,e,n,null==i?1:i)}function ar(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function or(t,e,n,i,r){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*i+o*r)/6}fi(ar,rr,hi(di,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ar(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ar(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Ni,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),i=Math.cos(t),r=Math.sin(t);return new Ci(255*(e+n*(Ki*i+Ji*r)),255*(e+n*(Qi*i+-.90649*r)),255*(e+n*(1.97294*i)),this.opacity)}}));var sr=function(t){return function(){return t}};function cr(t,e){return function(n){return t+n*e}}function ur(t,e){var n=e-t;return n?cr(t,n>180||n<-180?n-360*Math.round(n/360):n):sr(isNaN(t)?e:t)}function lr(t){return 1==(t=+t)?fr: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):sr(isNaN(e)?n:e)}}function fr(t,e){var n=e-t;return n?cr(t,n):sr(isNaN(t)?e:t)}var hr=function t(e){function n(t,e){var n=i((t=Ei(t)).r,(e=Ei(e)).r),r=i(t.g,e.g),a=i(t.b,e.b),o=fr(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=r(e),t.b=a(e),t.opacity=o(e),t+""}}var i=lr(e);return n.gamma=t,n}(1);function dr(t){return function(e){var n,i,r=e.length,a=Array(r),o=Array(r),s=Array(r);for(n=0;n<r;++n)i=Ei(e[n]),a[n]=i.r||0,o[n]=i.g||0,s[n]=i.b||0;return a=t(a),o=t(o),s=t(s),i.opacity=1,function(t){return i.r=a(t),i.g=o(t),i.b=s(t),i+""}}}dr((function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),r=t[i],a=t[i+1],o=i>0?t[i-1]:2*r-a,s=i<e-1?t[i+2]:2*a-r;return or((n-i/e)*e,o,r,a,s)}})),dr((function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),r=t[(i+e-1)%e],a=t[i%e],o=t[(i+1)%e],s=t[(i+2)%e];return or((n-i/e)*e,r,a,o,s)}}));var gr=function(t,e){e||(e=[]);var n,i=t?Math.min(e.length,t.length):0,r=e.slice();return function(a){for(n=0;n<i;++n)r[n]=t[n]*(1-a)+e[n]*a;return r}};function pr(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function vr(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,a=Array(r),o=Array(i);for(n=0;n<r;++n)a[n]=Mr(t[n],e[n]);for(;n<i;++n)o[n]=e[n];return function(t){for(n=0;n<r;++n)o[n]=a[n](t);return o}}var yr=function(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}},xr=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},_r=function(t,e){var n,i={},r={};for(n in(null===t||"object"!==Xn(t))&&(t={}),(null===e||"object"!==Xn(e))&&(e={}),e)n in t?i[n]=Mr(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}},mr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,br=new RegExp(mr.source,"g");var wr,Tr,Ar,Sr,kr=function(t,e){var n,i,r,a=mr.lastIndex=br.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=mr.exec(t))&&(i=br.exec(e));)(r=i.index)>a&&(r=e.slice(a,r),s[o]?s[o]+=r:s[++o]=r),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:xr(n,i)})),a=br.lastIndex;return a<e.length&&(r=e.slice(a),s[o]?s[o]+=r:s[++o]=r),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,i=0;i<e;++i)s[(n=c[i]).i]=n.x(t);return s.join("")})},Mr=function(t,e){var n,i=Xn(e);return null==e||"boolean"===i?sr(e):("number"===i?xr:"string"===i?(n=Ai(e))?(e=n,hr):kr:e instanceof Ai?hr:e instanceof Date?yr:pr(e)?gr:Array.isArray(e)?vr:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?_r:xr)(t,e)},Er=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},Cr=180/Math.PI,Lr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Or=function(t,e,n,i,r,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*i)&&(n-=t*c,i-=e*c),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,c/=s),t*i<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:r,translateY:a,rotate:Math.atan2(e,t)*Cr,skewX:Math.atan(c)*Cr,scaleX:o,scaleY:s}};function Rr(t,e,n,i){function r(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,i,r,a,o,s){if(t!==r||i!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:xr(t,r)},{i:c-2,x:xr(i,a)})}else(r||a)&&o.push("translate("+r+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t===e?e&&n.push(r(n)+"rotate("+e+i):(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(r(n)+"rotate(",null,i)-2,x:xr(t,e)}))}(a.rotate,o.rotate,s,c),function(t,e,n,a){t===e?e&&n.push(r(n)+"skewX("+e+i):a.push({i:n.push(r(n)+"skewX(",null,i)-2,x:xr(t,e)})}(a.skewX,o.skewX,s,c),function(t,e,n,i,a,o){if(t!==n||e!==i){var s=a.push(r(a)+"scale(",null,",",null,")");o.push({i:s-4,x:xr(t,n)},{i:s-2,x:xr(e,i)})}else(1!==n||1!==i)&&a.push(r(a)+"scale("+n+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,i=c.length;++n<i;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var Ir=Rr((function(t){return"none"===t?Lr:(wr||(wr=document.createElement("DIV"),Tr=document.documentElement,Ar=document.defaultView),wr.style.transform=t,t=Ar.getComputedStyle(Tr.appendChild(wr),null).getPropertyValue("transform"),Tr.removeChild(wr),t=t.slice(7,-1).split(","),Or(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Dr=Rr((function(t){return null==t?Lr:(Sr||(Sr=document.createElementNS("http://www.w3.org/2000/svg","g")),Sr.setAttribute("transform",t),(t=Sr.transform.baseVal.consolidate())?(t=t.matrix,Or(t.a,t.b,t.c,t.d,t.e,t.f)):Lr)}),", ",")",")"),Pr=Math.SQRT2;function Fr(t){return((t=Math.exp(t))+1/t)/2}var zr=function(t,e){var n,i,r=t[0],a=t[1],o=t[2],s=e[0],c=e[1],u=e[2],l=s-r,f=c-a,h=l*l+f*f;if(h<1e-12)i=Math.log(u/o)/Pr,n=function(t){return[r+t*l,a+t*f,o*Math.exp(Pr*t*i)]};else{var d=Math.sqrt(h),g=(u*u-o*o+4*h)/(2*o*2*d),p=(u*u-o*o-4*h)/(2*u*2*d),v=Math.log(Math.sqrt(g*g+1)-g),y=Math.log(Math.sqrt(p*p+1)-p);i=(y-v)/Pr,n=function(t){var e,n=t*i,s=Fr(v),c=o/(2*d)*(s*(e=Pr*n+v,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[r+c*l,a+c*f,o*s/Fr(Pr*n+v)]}}return n.duration=1e3*i,n};function Nr(t){return function(e,n){var i=t((e=Pi(e)).h,(n=Pi(n)).h),r=fr(e.s,n.s),a=fr(e.l,n.l),o=fr(e.opacity,n.opacity);return function(t){return e.h=i(t),e.s=r(t),e.l=a(t),e.opacity=o(t),e+""}}}Nr(ur),Nr(fr);function Xr(t){return function(e,n){var i=t((e=qi(e)).h,(n=qi(n)).h),r=fr(e.c,n.c),a=fr(e.l,n.l),o=fr(e.opacity,n.opacity);return function(t){return e.h=i(t),e.c=r(t),e.l=a(t),e.opacity=o(t),e+""}}}Xr(ur),Xr(fr);function Br(t){return function e(n){function i(e,i){var r=t((e=rr(e)).h,(i=rr(i)).h),a=fr(e.s,i.s),o=fr(e.l,i.l),s=fr(e.opacity,i.opacity);return function(t){return e.h=r(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,i.gamma=e,i}(1)}Br(ur),Br(fr);function jr(t,e){var n,i;return function(){var r=ci(this,t),a=r.tween;if(a!==n)for(var o=0,s=(i=n=a).length;o<s;++o)if(i[o].name===e){(i=i.slice()).splice(o,1);break}r.tween=i}}function Yr(t,e,n){var i,r;if("function"!=typeof n)throw new Error;return function(){var a=ci(this,t),o=a.tween;if(o!==i){r=(i=o).slice();for(var s={name:e,value:n},c=0,u=r.length;c<u;++c)if(r[c].name===e){r[c]=s;break}c===u&&r.push(s)}a.tween=r}}function Ur(t,e,n){var i=t._id;return t.each((function(){var t=ci(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ui(t,i).value[e]}}var Vr=function(t,e){var n;return("number"==typeof e?xr:e instanceof Ai?hr:(n=Ai(e))?(e=n,hr):kr)(t,e)};function Hr(t){return function(){this.removeAttribute(t)}}function Wr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Gr(t,e,n){var i,r;return function(){var a=this.getAttribute(t);return a===n+""?null:a===i?r:r=e(i=a,n)}}function qr(t,e,n){var i,r;return function(){var a=this.getAttributeNS(t.space,t.local);return a===n+""?null:a===i?r:r=e(i=a,n)}}function $r(t,e,n){var i,r,a;return function(){var o,s,c=n(this);return null==c?void this.removeAttribute(t):(o=this.getAttribute(t))===(s=c+"")?null:o===i&&s===r?a:(r=s,a=e(i=o,c))}}function Zr(t,e,n){var i,r,a;return function(){var o,s,c=n(this);return null==c?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===i&&s===r?a:(r=s,a=e(i=o,c))}}function Kr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Jr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Qr(t,e){function n(){var n=e.apply(this,arguments);return n!==r&&(i=(r=n)&&Jr(t,n)),i}var i,r;return n._value=e,n}function ta(t,e){function n(){var n=e.apply(this,arguments);return n!==r&&(i=(r=n)&&Kr(t,n)),i}var i,r;return n._value=e,n}function ea(t,e){return function(){si(this,t).delay=+e.apply(this,arguments)}}function na(t,e){return e=+e,function(){si(this,t).delay=e}}function ia(t,e){return function(){ci(this,t).duration=+e.apply(this,arguments)}}function ra(t,e){return e=+e,function(){ci(this,t).duration=e}}function aa(t,e){if("function"!=typeof e)throw new Error;return function(){ci(this,t).ease=e}}function oa(t,e,n){var i,r,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?si:ci;return function(){var o=a(this,t),s=o.on;s!==i&&(r=(i=s).copy()).on(e,n),o.on=r}}var sa=Tn.prototype.constructor;function ca(t){return function(){this.style.removeProperty(t)}}function ua(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function la(t,e,n){function i(){var i=e.apply(this,arguments);return i!==a&&(r=(a=i)&&ua(t,i,n)),r}var r,a;return i._value=e,i}function fa(t){return function(e){this.textContent=t.call(this,e)}}function ha(t){function e(){var e=t.apply(this,arguments);return e!==i&&(n=(i=e)&&fa(e)),n}var n,i;return e._value=t,e}var da=0;function ga(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function pa(t){return Tn().transition(t)}function va(){return++da}var ya=Tn.prototype;function xa(t){return+t}ga.prototype=pa.prototype={constructor:ga,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=_e(t));for(var i=this._groups,r=i.length,a=Array(r),o=0;o<r;++o)for(var s,c,u=i[o],l=u.length,f=a[o]=Array(l),h=0;h<l;++h)(s=u[h])&&(c=t.call(s,s.__data__,h,u))&&("__data__"in s&&(c.__data__=s.__data__),f[h]=c,oi(f[h],e,n,h,f,ui(s,n)));return new ga(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=be(t));for(var i=this._groups,r=i.length,a=[],o=[],s=0;s<r;++s)for(var c,u=i[s],l=u.length,f=0;f<l;++f)if(c=u[f]){for(var h,d=t.call(c,c.__data__,f,u),g=ui(c,n),p=0,v=d.length;p<v;++p)(h=d[p])&&oi(h,e,n,p,d,g);a.push(d),o.push(c)}return new ga(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=we(t));for(var e=this._groups,n=e.length,i=Array(n),r=0;r<n;++r)for(var a,o=e[r],s=o.length,c=i[r]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new ga(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,a=Math.min(i,r),o=Array(i),s=0;s<a;++s)for(var c,u=e[s],l=n[s],f=u.length,h=o[s]=Array(f),d=0;d<f;++d)(c=u[d]||l[d])&&(h[d]=c);for(;s<i;++s)o[s]=e[s];return new ga(o,this._parents,this._name,this._id)},selection:function(){return new sa(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=va(),i=this._groups,r=i.length,a=0;a<r;++a)for(var o,s=i[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=ui(o,e);oi(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new ga(i,this._parents,t,n)},call:ya.call,nodes:ya.nodes,node:ya.node,size:ya.size,empty:ya.empty,each:ya.each,on:function(t,e){var n=this._id;return arguments.length<2?ui(this.node(),n).on.on(t):this.each(oa(n,t,e))},attr:function(t,e){var n=ge(t),i="transform"===n?Dr:Vr;return this.attrTween(t,"function"==typeof e?(n.local?Zr:$r)(n,i,Ur(this,"attr."+t,e)):null==e?(n.local?Wr:Hr)(n):(n.local?qr:Gr)(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=ge(t);return this.tween(n,(i.local?Qr:ta)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Ir:Vr;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var a=Ne(this,t),o=(this.style.removeProperty(t),Ne(this,t));return a===o?null:a===n&&o===i?r:r=e(n=a,i=o)}}(t,i)).on("end.style."+t,ca(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,a;return function(){var o=Ne(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Ne(this,t)),o===c?null:o===i&&c===r?a:(r=c,a=e(i=o,s))}}(t,i,Ur(this,"style."+t,e))).each(function(t,e){var n,i,r,a,o="style."+e;return function(){var s=ci(this,t),c=s.on,u=null==s.value[o]?a||(a=ca(e)):void 0;(c!==n||r!==u)&&(i=(n=c).copy()).on("end."+o,r=u),s.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r;return function(){var a=Ne(this,t);return a===n+""?null:a===i?r:r=e(i=a,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,la(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}}(Ur(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,ha(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=ui(this.node(),n).tween,a=0,o=r.length;a<o;++a)if((i=r[a]).name===t)return i.value;return null}return this.each((null==e?jr:Yr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ea:na)(e,t)):ui(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ia:ra)(e,t)):ui(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(aa(e,t)):ui(this.node(),e).ease},end:function(){var t,e,n=this,i=n._id,r=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--r&&a()}};n.each((function(){var n=ci(this,i),r=n.on;r!==t&&((e=(t=r).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e}))}))}};(function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n})(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Math.PI;(function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n})(1.70158),function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158);var _a=2*Math.PI,ma=(function t(e,n){function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}var r=Math.asin(1/(e=Math.max(1,e)))*(n/=_a);return i.amplitude=function(e){return t(e,n*_a)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}var r=Math.asin(1/(e=Math.max(1,e)))*(n/=_a);return i.amplitude=function(e){return t(e,n*_a)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}var r=Math.asin(1/(e=Math.max(1,e)))*(n/=_a);return i.amplitude=function(e){return t(e,n*_a)},i.period=function(n){return t(e,n)},i}(1,.3),{time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}});function ba(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return ma.time=Zn(),ma;return n}Tn.prototype.interrupt=function(t){return this.each((function(){li(this,t)}))},Tn.prototype.transition=function(t){var e,n;t instanceof ga?(e=t._id,t=t._name):(e=va(),(n=ma).time=Zn(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,a=0;a<r;++a)for(var o,s=i[a],c=s.length,u=0;u<c;++u)(o=s[u])&&oi(o,t,e,u,s,n||ba(o,e));return new ga(i,this._parents,t,e)};var wa=Array.prototype.slice,Ta=function(t){return t};function Aa(t){return"translate("+(t+.5)+",0)"}function Sa(t){return"translate(0,"+(t+.5)+")"}function ka(t){return function(e){return+t(e)}}function Ma(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Ea(){return!this.__axis}function Ca(t,e){function n(n){var h=null==r?e.ticks?e.ticks.apply(e,i):e.domain():r,d=null==a?e.tickFormat?e.tickFormat.apply(e,i):Ta:a,g=Math.max(o,0)+c,p=e.range(),v=+p[0]+.5,y=+p[p.length-1]+.5,x=(e.bandwidth?Ma:ka)(e.copy()),_=n.selection?n.selection():n,m=_.selectAll(".domain").data([null]),b=_.selectAll(".tick").data(h,e).order(),w=b.exit(),T=b.enter().append("g").attr("class","tick"),A=b.select("line"),S=b.select("text");m=m.merge(m.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(T),A=A.merge(T.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),S=S.merge(T.append("text").attr("fill","currentColor").attr(l,u*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),n!==_&&(m=m.transition(n),b=b.transition(n),A=A.transition(n),S=S.transition(n),w=w.transition(n).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=x(t))?f(t):this.getAttribute("transform")})),T.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return f(e&&isFinite(e=e(t))?e:x(t))}))),w.remove(),m.attr("d",4===t||2==t?s?"M"+u*s+","+v+"H0.5V"+y+"H"+u*s:"M0.5,"+v+"V"+y:s?"M"+v+","+u*s+"V0.5H"+y+"V"+u*s:"M"+v+",0.5H"+y),b.attr("opacity",1).attr("transform",(function(t){return f(x(t))})),A.attr(l+"2",u*o),S.attr(l,u*g).text(d),_.filter(Ea).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each((function(){this.__axis=x}))}var i=[],r=null,a=null,o=6,s=6,c=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",f=1===t||3===t?Aa:Sa;return n.scale=function(t){return arguments.length?(e=t,n):e},n.ticks=function(){return i=wa.call(arguments),n},n.tickArguments=function(t){return arguments.length?(i=null==t?[]:wa.call(t),n):i.slice()},n.tickValues=function(t){return arguments.length?(r=null==t?null:wa.call(t),n):r&&r.slice()},n.tickFormat=function(t){return arguments.length?(a=t,n):a},n.tickSize=function(t){return arguments.length?(o=s=+t,n):o},n.tickSizeInner=function(t){return arguments.length?(o=+t,n):o},n.tickSizeOuter=function(t){return arguments.length?(s=+t,n):s},n.tickPadding=function(t){return arguments.length?(c=+t,n):c},n}function La(t){return Ca(1,t)}function Oa(t){return Ca(2,t)}function Ra(t){return Ca(3,t)}function Ia(t){return Ca(4,t)}var Da=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},Pa=function(t){return 1===t.length&&(e=t,t=function(t,n){return Da(e(t),n)}),{left:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i<r;){var a=i+r>>>1;t(e[a],n)<0?i=a+1:r=a}return i},right:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i<r;){var a=i+r>>>1;t(e[a],n)>0?r=a:i=a+1}return i}};var e};var Fa=Pa(Da),za=Fa.right,Na=(Fa.left,za);function Xa(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Ba=Array.prototype,ja=(Ba.slice,Ba.map,Math.sqrt(50)),Ya=Math.sqrt(10),Ua=Math.sqrt(2),Va=function(t,e,n){var i,r,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((i=e<t)&&(r=t,t=e,e=r),0===(o=Ha(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=Array(r=Math.ceil(e-t+1));++s<r;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=Array(r=Math.ceil(t-e+1));++s<r;)a[s]=(t-s)/o;return i&&a.reverse(),a};function Ha(t,e,n){var i=(e-t)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),a=i/Math.pow(10,r);return r>=0?(a>=ja?10:a>=Ya?5:a>=Ua?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(a>=ja?10:a>=Ya?5:a>=Ua?2:1)}function Wa(t,e,n){var i=Math.abs(e-t)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/r;return a>=ja?r*=10:a>=Ya?r*=5:a>=Ua&&(r*=2),e<t?-r:r}n(376);function Ga(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var qa=Symbol("implicit");function $a(){function t(t){var a=t+"",o=e.get(a);if(!o){if(r!==qa)return r;e.set(a,o=n.push(t))}return i[(o-1)%i.length]}var e=new Map,n=[],i=[],r=qa;return t.domain=function(i){if(!arguments.length)return n.slice();n=[],e=new Map;var r=!0,a=!1,o=void 0;try{for(var s,c=i[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var u=s.value,l=u+"";e.has(l)||e.set(l,n.push(u))}}catch(t){a=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return t},t.range=function(e){return arguments.length?(i=Array.from(e),t):i.slice()},t.unknown=function(e){return arguments.length?(r=e,t):r},t.copy=function(){return $a(n,i).unknown(r)},Ga.apply(t,arguments),t}var Za=function(t){return+t},Ka=[0,1];function Ja(t){return t}function Qa(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function to(t,e,n){var i=t[0],r=t[1],a=e[0],o=e[1];return r<i?(i=Qa(r,i),a=n(o,a)):(i=Qa(i,r),a=n(a,o)),function(t){return a(i(t))}}function eo(t,e,n){var i=Math.min(t.length,e.length)-1,r=Array(i),a=Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)r[o]=Qa(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Na(t,e,1,i)-1;return a[n](r[n](e))}}function no(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function io(){function t(){var t,n,i,r=Math.min(c.length,u.length);return f!==Ja&&(t=c[0],n=c[r-1],t>n&&(i=t,t=n,n=i),f=function(e){return Math.max(t,Math.min(n,e))}),a=r>2?eo:to,o=s=null,e}function e(t){return isNaN(t=+t)?r:(o||(o=a(c.map(n),u,l)))(n(f(t)))}var n,i,r,a,o,s,c=Ka,u=Ka,l=Mr,f=Ja;return e.invert=function(t){return f(i((s||(s=a(u,c.map(n),xr)))(t)))},e.domain=function(e){return arguments.length?(c=Array.from(e,Za),t()):c.slice()},e.range=function(e){return arguments.length?(u=Array.from(e),t()):u.slice()},e.rangeRound=function(e){return u=Array.from(e),l=Er,t()},e.clamp=function(e){return arguments.length?(f=!!e||Ja,t()):f!==Ja},e.interpolate=function(e){return arguments.length?(l=e,t()):l},e.unknown=function(t){return arguments.length?(r=t,e):r},function(e,r){return n=e,i=r,t()}}function ro(){return io()(Ja,Ja)}var ao=function(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)]},oo=function(t){return(t=ao(Math.abs(t)))?t[1]:NaN},so=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function co(t){if(!(e=so.exec(t)))throw new Error("invalid format: "+t);var e;return new uo({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 uo(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+""}co.prototype=uo.prototype,uo.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 lo,fo,ho,go,po=function(t,e){var n=ao(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")},vo={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return po(100*t,e)},r:po,s:function(t,e){var n=ao(t,e);if(!n)return t+"";var i=n[0],r=n[1],a=r-(lo=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=i.length;return a===o?i:a>o?i+Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+Array(1-a).join("0")+ao(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},yo=function(t){return t},xo=Array.prototype.map,_o=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],mo=function(t){function e(t){function e(t){var e,a,o,u=m,d=b;if("c"===_)d=w(t)+d,t="";else{var A=(t=+t)<0;if(t=isNaN(t)?f:w(Math.abs(t),y),x&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i<n;++i)switch(t[i]){case".":r=e=i;break;case"0":0===r&&(r=i),e=i;break;default:if(!+t[i])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),A&&0==+t&&(A=!1),u=(A?"("===h?h:l:"-"===h||"("===h?"":h)+u,d=("s"===_?_o[8+lo/3]:"")+d+(A&&"("===h?")":""),T)for(e=-1,a=t.length;++e<a;)if(48>(o=t.charCodeAt(e))||o>57){d=(46===o?s+t.slice(e+1):t.slice(e))+d,t=t.slice(0,e);break}}v&&!g&&(t=r(t,1/0));var S=u.length+t.length+d.length,k=S<p?Array(p-S+1).join(n):"";switch(v&&g&&(t=r(k+t,k.length?p-d.length:1/0),k=""),i){case"<":t=u+t+d+k;break;case"=":t=u+k+t+d;break;case"^":t=k.slice(0,S=k.length>>1)+u+t+d+k.slice(S);break;default:t=k+u+t+d}return c(t)}var n=(t=co(t)).fill,i=t.align,h=t.sign,d=t.symbol,g=t.zero,p=t.width,v=t.comma,y=t.precision,x=t.trim,_=t.type;"n"===_?(v=!0,_="g"):!vo[_]&&(void 0===y&&(y=12),x=!0,_="g"),(g||"0"===n&&"="===i)&&(g=!0,n="0",i="=");var m="$"===d?a:"#"===d&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",b="$"===d?o:/[%p]/.test(_)?u:"",w=vo[_],T=/[defgprs%]/.test(_);return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),e.toString=function(){return t+""},e}var n,i,r=void 0===t.grouping||void 0===t.thousands?yo:(n=xo.call(t.grouping,Number),i=t.thousands+"",function(t,e){for(var r=t.length,a=[],o=0,s=n[0],c=0;r>0&&s>0&&(c+s+1>e&&(s=Math.max(1,e-c)),a.push(t.substring(r-=s,r+s)),!((c+=s+1)>e));)s=n[o=(o+1)%n.length];return a.reverse().join(i)}),a=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",c=void 0===t.numerals?yo:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(xo.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";return{format:e,formatPrefix:function(t,n){var i=e(((t=co(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(oo(n)/3))),a=Math.pow(10,-r),o=_o[8+r/3];return function(t){return i(a*t)+o}}}};!function(t){fo=mo(t),ho=fo.format,go=fo.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var bo=function(t,e,n,i){var r,a=Wa(t,e,n);switch((i=co(null==i?",f":i)).type){case"s":var o=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(oo(e)/3)))-oo(Math.abs(t)))}(a,o))||(i.precision=r),go(i,o);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,oo(e)-oo(t))+1}(a,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,-oo(Math.abs(t)))}(a))||(i.precision=r-2*("%"===i.type))}return ho(i)};function wo(t){var e=t.domain;return t.ticks=function(t){var n=e();return Va(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return bo(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r=e(),a=0,o=r.length-1,s=r[a],c=r[o];return c<s&&(i=s,s=c,c=i,i=a,a=o,o=i),(i=Ha(s,c,n))>0?i=Ha(s=Math.floor(s/i)*i,c=Math.ceil(c/i)*i,n):i<0&&(i=Ha(s=Math.ceil(s*i)/i,c=Math.floor(c*i)/i,n)),i>0?(r[a]=Math.floor(s/i)*i,r[o]=Math.ceil(c/i)*i,e(r)):i<0&&(r[a]=Math.ceil(s*i)/i,r[o]=Math.floor(c*i)/i,e(r)),t},t}function To(){var t=ro();return t.copy=function(){return no(t,To())},Ga.apply(t,arguments),wo(t)}var Ao=function(t,e){var n,i=0,r=(t=t.slice()).length-1,a=t[i],o=t[r];return o<a&&(n=i,i=r,r=n,n=a,a=o,o=n),t[i]=e.floor(a),t[r]=e.ceil(o),t};function So(t){return new Date(t)}function ko(t){return t instanceof Date?+t:+new Date(+t)}function Mo(t,e,n,i,r,a,o,s,c){function u(s){return(o(s)<s?g:a(s)<s?p:r(s)<s?v:i(s)<s?y:e(s)<s?n(s)<s?x:_:t(s)<s?m:b)(s)}function l(e,n,i){if(null==e&&(e=10),"number"==typeof e){var r,a=Math.abs(i-n)/e,o=Pa((function(t){return t[2]})).right(w,a);return o===w.length?(r=Wa(n/31536e6,i/31536e6,e),e=t):o?(r=(o=w[a/w[o-1][2]<w[o][2]/a?o-1:o])[1],e=o[0]):(r=Math.max(Wa(n,i,e),1),e=s),e.every(r)}return e}var f=ro(),h=f.invert,d=f.domain,g=c(".%L"),p=c(":%S"),v=c("%I:%M"),y=c("%I %p"),x=c("%a %d"),_=c("%b %d"),m=c("%B"),b=c("%Y"),w=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[r,1,36e5],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,864e5],[i,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];return f.invert=function(t){return new Date(h(t))},f.domain=function(t){return arguments.length?d(Array.from(t,ko)):d().map(So)},f.ticks=function(t){var e,n=d(),i=n[0],r=n[n.length-1],a=r<i;return a&&(e=i,i=r,r=e),e=(e=l(t,i,r))?e.range(i,r+1):[],a?e.reverse():e},f.tickFormat=function(t,e){return null==e?u:c(e)},f.nice=function(t){var e=d();return(t=l(t,e[0],e[e.length-1]))?d(Ao(e,t)):f},f.copy=function(){return no(f,Mo(t,e,n,i,r,a,o,s,c))},f}var Eo={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",area:"bb-area",areas:"bb-areas",axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",bar:"bb-bar",bars:"bb-bars",brush:"bb-brush",button:"bb-button",buttonZoomReset:"bb-zoom-reset",chart:"bb-chart",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsTitle:"bb-chart-arcs-title",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",chartLine:"bb-chart-line",chartLines:"bb-chart-lines",chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars",chartText:"bb-chart-text",chartTexts:"bb-chart-texts",circle:"bb-circle",circles:"bb-circles",colorPattern:"bb-color-pattern",colorScale:"bb-colorscale",defocused:"bb-defocused",dragarea:"bb-dragarea",empty:"bb-empty",eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single",focused:"bb-focused",gaugeValue:"bb-gauge-value",grid:"bb-grid",gridLines:"bb-grid-lines",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemFocused:"bb-legend-item-focused",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile",level:"bb-level",levels:"bb-levels",line:"bb-line",lines:"bb-lines",region:"bb-region",regions:"bb-regions",selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",shape:"bb-shape",shapes:"bb-shapes",stanfordElements:"bb-stanford-elements",stanfordLine:"bb-stanford-line",stanfordLines:"bb-stanford-lines",stanfordRegion:"bb-stanford-region",stanfordRegions:"bb-stanford-regions",target:"bb-target",text:"bb-text",texts:"bb-texts",title:"bb-title",tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name",xgrid:"bb-xgrid",xgridFocus:"bb-xgrid-focus",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridFocus:"bb-ygrid-focus",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids",zoomBrush:"bb-zoom-brush",zoomRect:"bb-zoom-rect",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_",TextOverlapping:"text-overlapping"};function Co(){ln.stopImmediatePropagation()}var Lo=function(){ln.preventDefault(),ln.stopImmediatePropagation()},Oo=function(t){var e=t.document.documentElement,n=An(t).on("dragstart.drag",Lo,!0);"onselectstart"in e?n.on("selectstart.drag",Lo,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function Ro(t,e){var n=t.document.documentElement,i=An(t).on("dragstart.drag",null);e&&(i.on("click.drag",Lo,!0),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Io=function(t){return function(){return t}};function Do(t,e,n,i,r,a,o,s,c,u){this.target=t,this.type=e,this.subject=n,this.identifier=i,this.active=r,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=u}function Po(){return!ln.ctrlKey&&!ln.button}function Fo(){return this.parentNode}function zo(t){return null==t?{x:ln.x,y:ln.y}:t}function No(){return navigator.maxTouchPoints||"ontouchstart"in this}Do.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Xo=function(){function t(t){t.on("mousedown.drag",e).filter(p).on("touchstart.drag",r).on("touchmove.drag",a).on("touchend.drag touchcancel.drag",o).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(){if(!f&&h.apply(this,arguments)){var t=s("mouse",d.apply(this,arguments),Cn,this,arguments);t&&(An(ln.view).on("mousemove.drag",n,!0).on("mouseup.drag",i,!0),Oo(ln.view),Co(),l=!1,c=ln.clientX,u=ln.clientY,t("start"))}}function n(){if(Lo(),!l){var t=ln.clientX-c,e=ln.clientY-u;l=t*t+e*e>_}v.mouse("drag")}function i(){An(ln.view).on("mousemove.drag mouseup.drag",null),Ro(ln.view,l),Lo(),v.mouse("end")}function r(){if(h.apply(this,arguments)){var t,e,n=ln.changedTouches,i=d.apply(this,arguments),r=n.length;for(t=0;t<r;++t)(e=s(n[t].identifier,i,On,this,arguments))&&(Co(),e("start"))}}function a(){var t,e,n=ln.changedTouches,i=n.length;for(t=0;t<i;++t)(e=v[n[t].identifier])&&(Lo(),e("drag"))}function o(){var t,e,n=ln.changedTouches,i=n.length;for(f&&clearTimeout(f),f=setTimeout((function(){f=null}),500),t=0;t<i;++t)(e=v[n[t].identifier])&&(Co(),e("end"))}function s(e,n,i,r,a){var o,s,c,u=i(n,e),l=y.copy();return vn(new Do(t,"beforestart",o,e,x,u[0],u[1],0,0,l),(function(){return null!=(ln.subject=o=g.apply(r,a))&&(s=o.x-u[0]||0,c=o.y-u[1]||0,!0)}))?function f(h){var d,g=u;switch(h){case"start":v[e]=f,d=x++;break;case"end":delete v[e],--x;case"drag":u=i(n,e),d=x}vn(new Do(t,h,o,e,d,u[0]+s,u[1]+c,u[0]-g[0],u[1]-g[1],l),l.apply,l,[h,r,a])}:void 0}var c,u,l,f,h=Po,d=Fo,g=zo,p=No,v={},y=Nn("start","drag","end"),x=0,_=0;return t.filter=function(e){return arguments.length?(h="function"==typeof e?e:Io(!!e),t):h},t.container=function(e){return arguments.length?(d="function"==typeof e?e:Io(e),t):d},t.subject=function(e){return arguments.length?(g="function"==typeof e?e:Io(e),t):g},t.touchable=function(e){return arguments.length?(p="function"==typeof e?e:Io(!!e),t):p},t.on=function(){var e=y.on.apply(y,arguments);return e===y?t:e},t.clickDistance=function(e){return arguments.length?(_=(e=+e)*e,t):Math.sqrt(_)},t},Bo=function(t){return function(){return t}},jo=function(t,e,n){this.target=t,this.type=e,this.selection=n};function Yo(){ln.stopImmediatePropagation()}var Uo=function(){ln.preventDefault(),ln.stopImmediatePropagation()},Vo={name:"drag"},Ho={name:"space"},Wo={name:"handle"},Go={name:"center"};function qo(t){return[+t[0],+t[1]]}function $o(t){return[qo(t[0]),qo(t[1])]}function Zo(t){return function(e){return On(e,ln.touches,t)}}var Ko={name:"x",handles:["w","e"].map(rs),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Jo={name:"y",handles:["n","s"].map(rs),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Qo=(["n","w","e","s","nw","ne","sw","se"].map(rs),{overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"}),ts={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},es={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ns={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},is={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function rs(t){return{type:t}}function as(){return!ln.ctrlKey&&!ln.button}function os(){var t=this.ownerSVGElement||this;return 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]]}function ss(){return navigator.maxTouchPoints||"ontouchstart"in this}function cs(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function us(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function ls(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function fs(t){function e(e){var i=e.property("__brush",c).selectAll(".overlay").data([rs("overlay")]);i.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Qo.overlay).merge(i).each((function(){var t=cs(this).extent;An(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([rs("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Qo.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return Qo[t.type]})),e.each(n).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",a).filter(h).on("touchstart.brush",a).on("touchmove.brush",o).on("touchend.brush touchcancel.brush",s).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function n(){var t=An(this),e=cs(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-p/2:e[0][0]-p/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-p/2:e[0][1]-p/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+p:p})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+p:p}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function i(t,e,n){return!n&&t.__brush.emitter||new r(t,e)}function r(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function a(){function e(){var t=z(w);!F||m||b||(Math.abs(t[0]-X[0])>Math.abs(t[1]-X[1])?b=!0:m=!0),X=t,_=!0,Uo(),r()}function r(){var t;switch(D=X[0]-N[0],P=X[1]-N[1],A){case Ho:case Vo:S&&(D=Math.max(L-c,Math.min(R-p,D)),l=c+D,v=p+D),k&&(P=Math.max(O-h,Math.min(I-y,P)),g=h+P,x=y+P);break;case Wo:S<0?(D=Math.max(L-c,Math.min(R-c,D)),l=c+D,v=p):S>0&&(D=Math.max(L-p,Math.min(R-p,D)),l=c,v=p+D),k<0?(P=Math.max(O-h,Math.min(I-h,P)),g=h+P,x=y):k>0&&(P=Math.max(O-y,Math.min(I-y,P)),g=h,x=y+P);break;case Go:S&&(l=Math.max(L,Math.min(R,c-D*S)),v=Math.max(L,Math.min(R,p+D*S))),k&&(g=Math.max(O,Math.min(I,h-P*k)),x=Math.max(O,Math.min(I,y+P*k)))}v<l&&(S*=-1,t=c,c=p,p=t,t=l,l=v,v=t,T in ts&&Y.attr("cursor",Qo[T=ts[T]])),x<g&&(k*=-1,t=h,h=y,y=t,t=g,g=x,x=t,T in es&&Y.attr("cursor",Qo[T=es[T]])),M.selection&&(C=M.selection),m&&(l=C[0][0],v=C[1][0]),b&&(g=C[0][1],x=C[1][1]),(C[0][0]!==l||C[0][1]!==g||C[1][0]!==v||C[1][1]!==x)&&(M.selection=[[l,g],[v,x]],n.call(w),B.brush())}function a(){if(Yo(),ln.touches){if(ln.touches.length)return;u&&clearTimeout(u),u=setTimeout((function(){u=null}),500)}else Ro(ln.view,_),U.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);j.attr("pointer-events","all"),Y.attr("cursor",Qo.overlay),M.selection&&(C=M.selection),us(C)&&(M.selection=null,n.call(w)),B.end()}function o(){switch(ln.keyCode){case 16:F=S&&k;break;case 18:A===Wo&&(S&&(p=v-D*S,c=l+D*S),k&&(y=x-P*k,h=g+P*k),A=Go,r());break;case 32:(A===Wo||A===Go)&&(S<0?p=v-D:S>0&&(c=l-D),k<0?y=x-P:k>0&&(h=g-P),A=Ho,Y.attr("cursor",Qo.selection),r());break;default:return}Uo()}function s(){switch(ln.keyCode){case 16:F&&(m=b=F=!1,r());break;case 18:A===Go&&(S<0?p=v:S>0&&(c=l),k<0?y=x:k>0&&(h=g),A=Wo,r());break;case 32:A===Ho&&(ln.altKey?(S&&(p=v-D*S,c=l+D*S),k&&(y=x-P*k,h=g+P*k),A=Go):(S<0?p=v:S>0&&(c=l),k<0?y=x:k>0&&(h=g),A=Wo),Y.attr("cursor",Qo[T]),r());break;default:return}Uo()}if((!u||ln.touches)&&f.apply(this,arguments)){var c,l,h,g,p,v,y,x,_,m,b,w=this,T=ln.target.__data__.type,A="selection"===(d&&ln.metaKey?T="overlay":T)?Vo:d&&ln.altKey?Go:Wo,S=t===Jo?null:ns[T],k=t===Ko?null:is[T],M=cs(w),E=M.extent,C=M.selection,L=E[0][0],O=E[0][1],R=E[1][0],I=E[1][1],D=0,P=0,F=S&&k&&d&&ln.shiftKey,z=ln.touches?Zo(ln.changedTouches[0].identifier):Cn,N=z(w),X=N,B=i(w,arguments,!0).beforestart();"overlay"===T?(C&&(_=!0),M.selection=C=[[c=t===Jo?L:N[0],h=t===Ko?O:N[1]],[p=t===Jo?R:c,y=t===Ko?I:h]]):(c=C[0][0],h=C[0][1],p=C[1][0],y=C[1][1]),l=c,g=h,v=p,x=y;var j=An(w).attr("pointer-events","none"),Y=j.selectAll(".overlay").attr("cursor",Qo[T]);if(ln.touches)B.moved=e,B.ended=a;else{var U=An(ln.view).on("mousemove.brush",e,!0).on("mouseup.brush",a,!0);d&&U.on("keydown.brush",o,!0).on("keyup.brush",s,!0),Oo(ln.view)}Yo(),li(w),n.call(w),B.start()}}function o(){i(this,arguments).moved()}function s(){i(this,arguments).ended()}function c(){var e=this.__brush||{selection:null};return e.extent=$o(l.apply(this,arguments)),e.dim=t,e}var u,l=os,f=as,h=ss,d=!0,g=Nn("start","brush","end"),p=6;return e.move=function(e,r){e.selection?e.on("start.brush",(function(){i(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){i(this,arguments).end()})).tween("brush",(function(){function e(t){o.selection=1===t&&null===u?null:l(t),n.call(a),s.brush()}var a=this,o=a.__brush,s=i(a,arguments),c=o.selection,u=t.input("function"==typeof r?r.apply(this,arguments):r,o.extent),l=Mr(c,u);return null!==c&&null!==u?e:e(1)})):e.each((function(){var e=this,a=arguments,o=e.__brush,s=t.input("function"==typeof r?r.apply(e,a):r,o.extent),c=i(e,a).beforestart();li(e),o.selection=null===s?null:s,n.call(e),c.start().brush().end()}))},e.clear=function(t){e.move(t,null)},r.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(n){vn(new jo(e,n,t.output(this.state.selection)),g.apply,g,[n,this.that,this.args])}},e.extent=function(t){return arguments.length?(l="function"==typeof t?t:Bo($o(t)),e):l},e.filter=function(t){return arguments.length?(f="function"==typeof t?t:Bo(!!t),e):f},e.touchable=function(t){return arguments.length?(h="function"==typeof t?t:Bo(!!t),e):h},e.handleSize=function(t){return arguments.length?(p=+t,e):p},e.keyModifiers=function(t){return arguments.length?(d=!!t,e):d},e.on=function(){var t=g.on.apply(g,arguments);return t===g?e:t},e}var hs,ds=(hs=function(t){return void 0!==t&&t})(self)||hs(window)||hs(global)||hs(globalThis)||Function("return this")(),gs=ds&&ds.document,ps=function(t){return t||0===t},vs=function(t){return"function"==typeof t},ys=function(t){return"string"==typeof t},xs=function(t){return"number"==typeof t},_s=function(t){return void 0===t},ms=function(t){return void 0!==t},bs=function(t){return"boolean"==typeof t},ws=function(t){return 10*Math.ceil(t/10)},Ts=function(t){return Math.ceil(t)+.5},As=function(t){return t[1]-t[0]},Ss=function(t){return"object"===Xn(t)},ks=function(t){return _s(t)||null===t||ys(t)&&0===t.length||Ss(t)&&!(t instanceof Date)&&0===Object.keys(t).length||xs(t)&&isNaN(t)},Ms=function(t){return!ks(t)},Es=function(t){return t&&t.constructor===Array},Cs=function(t){return t&&!t.nodeType&&Ss(t)&&!Es(t)},Ls=function(t,e,n){return ms(t[e])?t[e]:n},Os=function(t){for(var e=vs(t),n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return e&&t.call.apply(t,i),e},Rs=function(t){return ys(t)?t.replace(/</g,"&lt;").replace(/>/g,"&gt;"):t},Is=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[-1,1],i=!!(arguments.length>3&&void 0!==arguments[3])&&arguments[3];if(t&&ys(e))if(-1===e.indexOf("\n"))t.text(e);else{var r=[t.text(),e].map((function(t){return t.replace(/[\s\n]/g,"")}));if(r[0]!==r[1]){var a=e.split("\n"),o=i?a.length-1:1;t.html(""),a.forEach((function(e,i){t.append("tspan").attr("x",0).attr("dy","".concat(0===i?n[0]*o:n[1],"em")).text(e)}))}}},Ds=function(t){var e=t.getBBox(),n=e.x,i=e.y,r=e.width,a=e.height;return[{x:n,y:i+a},{x:n,y:i},{x:n+r,y:i},{x:n+r,y:i+a}]},Ps=function(t){var e=null,n=ln,i=t.context||t.main;return n&&"BrushEvent"===n.constructor.name?e=n.selection:i&&(e=i.select(".".concat(Eo.brush)).node())&&(e=ls(e)),e},Fs=function(t){return t.rect||(t.rect=t.getBoundingClientRect())},zs=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Math.random()+(t?"":0)},Ns=function(t){var e=Ps(t);return!e||e[0]===e[1]},Xs=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;for(var n in e)t[n]=e[n];return t},Bs=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},js=function(t){return[].slice.call(t)},Ys=function(t){var e=t?t.transform:null,n=e?e.baseVal:[];return n.length?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}},Us=function(t){var e=t[0]instanceof Date,n=(e?t.map(Number):t).filter((function(t,e,n){return n.indexOf(t)===e}));return e?n.map((function(t){return new Date(t)})):n},Vs=function(t){return t&&t.length?t.reduce((function(t,e){return t.concat(e)})):[]},Hs=function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];if(!n.length||1===n.length&&!n[0])return t;var r=n.shift();return Cs(t)&&Cs(r)&&Object.keys(r).forEach((function(e){var n=r[e];Cs(n)?(!t[e]&&(t[e]={}),t[e]=Hs(t[e],n)):t[e]=Es(n)?n.concat():n})),Hs.apply(void 0,[t].concat(n))})),Ws=function(t){var e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t[0]instanceof Date?e=n?function(t,e){return t-e}:function(t,e){return e-t}:n&&!t.every(isNaN)?e=function(t,e){return t-e}:!n&&(e=function(t,e){return(t>e?-1:t<e&&1)||t===e&&0}),t.concat().sort(e)},Gs=function(t,e){var n=e.filter((function(t){return Ms(t)}));return n.length?xs(n[0])?n=Math[t].apply(Math,Xa(n)):n[0]instanceof Date&&(n=Ws(n,"min"===t)[0]):n=void 0,n},qs=function(t,e){for(var n=[],i=t;i<e;i++)n.push(i);return n},$s={mouse:function(){try{return new MouseEvent("t"),function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0};t.dispatchEvent(new MouseEvent(e,n))}}catch(t){return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0},i=gs.createEvent("MouseEvent");i.initMouseEvent(e,n.bubbles,n.cancelable,ds,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(i)}}}(),touch:function(t,e,n){var i=new Touch(Hs({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[i],targetTouches:[],changedTouches:[i]}))}},Zs=function(t,e){var n=t;for(var i in e)n=n.replace(new RegExp("{=".concat(i,"}"),"g"),e[i]);return n},Ks=function(){function t(e){i(this,t);var n=To(),r=e.config,a=e.params;this.owner=e,this.config=r,this.scale=n,(r.noTransition||!a.config.transition_duration)&&(r.withoutTransition=!0),r.range=n.rangeExtent?n.rangeExtent():this.scaleExtent((a.orgXScale||n).range())}return o(t,[{key:"getTickTransformSetter",value:function(t){var e=this.config,n="x"===t?function(t){return"translate(".concat(t+e.tickOffset,",0)")}:function(t){return"translate(0,".concat(t,")")};return function(t,e){t.attr("transform",(function(t){return n(Math.ceil(e(t)))}))}}},{key:"scaleExtent",value:function(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]}},{key:"generateTicks",value:function(t,e){var n=this.owner.params.tickStepSize,i=[];if(e&&n)for(var a=r(t.domain(),2),o=a[0],s=a[1],c=o;c<=s;)i.push(c),c+=n;else if(t.ticks)i=t.ticks.apply(t,Xa(this.config.tickArguments||[])).map((function(t){return ys(t)&&xs(t)&&!isNaN(t)&&Math.round(10*t)/10||t}));else{for(var u=t.domain(),l=Math.ceil(u[0]);l<u[1];l++)i.push(l);i.length>0&&i[0]>0&&i.unshift(i[0]-(i[1]-i[0]))}return i}},{key:"copyScale",value:function(){var t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t}},{key:"textFormatted",value:function(t){var e=this.config.tickFormat,n=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,i=e?e(n):n;return ms(i)?i:""}},{key:"transitionise",value:function(t){var e=this.config;return e.withoutTransition?t.interrupt():t.transition(e.transition)}}],[{key:"getSizeFor1Char",value:function(t){var e={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call((function(t){try{var n=t.node().getBBox(),i=n.width,r=n.height;i&&r&&(e.w=i,e.h=r)}catch(t){}finally{t.text("")}})),this.getSizeFor1Char=function(){return e},e}}]),t}(),Js=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var n={innerTickSize:6,outerTickSize:e.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:e.noTransition};n.tickLength=Math.max(n.innerTickSize,0)+n.tickPadding,this.config=n,this.params=e,this.helper=new Ks(this)}return o(t,[{key:"create",value:function(t){var e=this,n=this.config,i=this.params,r=this.helper,a=r.scale,o=n.orient,s=this.splitTickText.bind(this),c=/^(left|right)$/.test(o),u=/^(top|bottom)$/.test(o),l=r.getTickTransformSetter(u?"x":"y"),f=l===r.axisX?"y":"x",h=/^(top|left)$/.test(o)?-1:1,d=i.tickTextRotate;this.config.range=a.rangeExtent?a.rangeExtent():r.scaleExtent((i.orgXScale||a).range());var g=n,p=g.innerTickSize,v=g.tickLength,y=g.range,x=i.name,_=x&&/^(x|y|y2)$/.test(x)?i.config["axis_".concat(x,"_tick_text_position")]:{x:0,y:0},m="subX"===x?"subchart_axis_x":"axis_".concat(x),b=i.config["".concat(m,"_show")],w=!!b&&i.config["".concat(m,"_tick_show")],T=!!b&&i.config["".concat(m,"_tick_text_show")],A=null;t.each((function(){var t=An(this),g=this.__chart__||a,x=r.copyScale();A=t,this.__chart__=x,n.tickOffset=i.isCategory?Math.ceil((x(1)-x(0))/2):0;var m=t.selectAll(".domain").data([0]);if(m.enter().append("path").attr("class","domain").merge(r.transitionise(m)).attr("d",(function(){var t=n.outerTickSize*h;return u?"M".concat(y[0],",").concat(t,"V0H").concat(y[1],"V").concat(t):"M".concat(t,",").concat(y[0],"H0V").concat(y[1],"H").concat(t)})),w||T){var b=n.tickValues||r.generateTicks(x,c),S=t.selectAll(".tick").data(b,x),k=S.enter().insert("g",".domain").attr("class","tick").style("opacity","1"),M=S.exit().remove();S=k.merge(S),w&&k.append("line"),T&&k.append("text");var E=Ks.getSizeFor1Char(S),C=[],L=S.select("text").selectAll("tspan").data((function(t,e){var n=i.tickMultiline?s(t,x,b,c,E.w):Es(r.textFormatted(t))?r.textFormatted(t).concat():[r.textFormatted(t)];return C[e]=n.length,n.map((function(t){return{index:e,splitted:t}}))}));L.exit().remove(),(L=L.enter().append("tspan").merge(L).text((function(t){return t.splitted}))).attr("x",u?0:v*h).attr("dx",function(){var t=0;return/(top|bottom)/.test(o)&&d&&(t=8*Math.sin(Math.PI*(d/180))*("top"===o?-1:1)),t+(_.x||0)}()).attr("dy",(function(t,e){var n=0;return"top"!==o&&(n=E.h,0===e&&(n=c?-((C[t.index]-1)*(E.h/2)-3):0===_.y?".71em":0)),xs(n)&&_.y?n+_.y:n||".71em"}));var O=S.select("line"),R=S.select("text");if(k.select("line").attr("".concat(f,"2"),p*h),k.select("text").attr(f,v*h),e.setTickLineTextPosition(O,R),i.tickTitle){var I=R.select("title");(I.empty()?R.append("title"):I).text((function(t){return i.tickTitle[t]}))}if(x.bandwidth){var D=x,P=D.bandwidth()/2;x=g=function(t){return D(t)+P}}else g.bandwidth?g=x:l(M,x);l(k,g),l(r.transitionise(S).style("opacity","1"),x)}})),this.g=A}},{key:"getTickXY",value:function(){var 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}},{key:"getTickSize",value:function(t){var e=this.helper.scale,n=this.config,i=n.innerTickSize,r=n.range,a=e(t)+(n.tickCentered?0:n.tickOffset);return r[0]<a&&a<r[1]?i:0}},{key:"setTickLineTextPosition",value:function(t,e){var n=this.getTickXY(),i=this.config,r=i.innerTickSize,a=i.orient,o=i.tickLength,s=i.tickOffset,c=this.params.tickTextRotate,u=function(t){var e=["start","end"];return"top"===a&&e.reverse(),t?t>0?e[0]:e[1]:"middle"},l=function(t){return t?"rotate(".concat(t,")"):null},f=function(t){return t?11.5-2.5*(t/("bottom"===a?15:23))*(t>0?1:-1):o};"bottom"===a?(t.attr("x1",n.x).attr("x2",n.x).attr("y2",this.getTickSize.bind(this)),e.attr("x",0).attr("y",f(c)).style("text-anchor",u(c)).attr("transform",l(c))):"top"===a?(t.attr("x2",0).attr("y2",-r),e.attr("x",0).attr("y",2*-f(c)).style("text-anchor",u(c)).attr("transform",l(c))):"left"===a?(t.attr("x2",-r).attr("y1",n.y).attr("y2",n.y),e.attr("x",-o).attr("y",s).style("text-anchor","end")):"right"===a&&(t.attr("x2",r).attr("y2",0),e.attr("x",o).attr("y",0).style("text-anchor","start"))}},{key:"splitTickText",value:function(t,e,n,i,r){var a=this.params,o=this.helper.textFormatted(t),s=ys(o)&&o.indexOf("\n")>-1?o.split("\n"):[];if(s.length)return s;if(Es(o))return o;var c=a.tickWidth;return(!c||c<=0)&&(c=i?95:a.isCategory?Math.ceil(e(n[1])-e(n[0]))-12:110),function t(e,n){for(var i,a,o,s=1;s<n.length;s++)if(" "===n.charAt(s)&&(a=s),i=n.substr(0,s+1),o=r*i.length,c<o)return t(e.concat(n.substr(0,a||s)),n.slice(a?a+1:s));return e.concat(n)}(s,o+"")}},{key:"scale",value:function(t){return arguments.length?(this.helper.scale=t,this):this.helper.scale}},{key:"orient",value:function(t){return arguments.length?(this.config.orient=t in{top:1,right:1,bottom:1,left:1}?t+"":"bottom",this):this.config.orient}},{key:"tickFormat",value:function(t){return arguments.length?(this.config.tickFormat=t,this):this.config.tickFormat}},{key:"tickCentered",value:function(t){var e=this.config;return arguments.length?(e.tickCentered=t,this):e.tickCentered}},{key:"tickOffset",value:function(){return this.config.tickOffset}},{key:"tickInterval",value:function(t){var e;this.params.isCategory?e=2*this.config.tickOffset:e=(this.g.select("path.domain").node().getTotalLength()-2*this.config.outerTickSize)/(t||this.g.selectAll("line").size());return e===1/0?0:e}},{key:"ticks",value:function(){for(var t=this.config,e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return n.length?(t.tickArguments=js(n),this):t.tickArguments}},{key:"tickCulling",value:function(t){var e=this.config;return arguments.length?(e.tickCulling=t,this):e.tickCulling}},{key:"tickValues",value:function(t){var e=this,n=this.config;if(vs(t))n.tickValues=function(){return t(e.helper.scale.domain())};else{if(!arguments.length)return n.tickValues;n.tickValues=t}return this}},{key:"setTransition",value:function(t){return this.config.transition=t,this}}]),t}(),Qs=function(t,e){var n=t.config.axis_rotated;return e?n:!n},tc=function(t){return"".concat(Eo.axis," ").concat(Eo["axis".concat(Bs(t))])},ec=function(){function t(e){i(this,t),this.owner=e,this.setOrient()}return o(t,[{key:"init",value:function(){var t=this,e=this.owner,n=e.config,i=n.axis_rotated,r=e.main,a=["x","y"];n.axis_y2_show&&a.push("y2"),e.axesList={},a.forEach((function(a){var o=tc(a),s=Eo["axis".concat(a.toUpperCase(),"Label")];e.axes[a]=r.append("g").attr("class",o).attr("clip-path",(function(){var t=null;return"x"===a?t=e.clipPathForXAxis:"y"===a&&n.axis_y_inner&&(t=e.clipPathForYAxis),t})).attr("transform",e.getTranslate(a)).style("visibility",n["axis_".concat(a,"_show")]?"visible":"hidden"),e.axes[a].append("text").attr("class",s).attr("transform",["rotate(-90)",null]["x"===a?+!i:+i]).style("text-anchor",(function(){return t.textAnchorForAxisLabel(a)})),t.generateAxes(a)}))}},{key:"setOrient",value:function(){var t=this.owner,e=t.config,n=e.axis_rotated,i=e.axis_y_inner,r=e.axis_y2_inner;t.xOrient=n?"left":"bottom",t.yOrient=n?i?"top":"bottom":i?"right":"left",t.y2Orient=n?r?"bottom":"top":r?"left":"right",t.subXOrient=n?"left":"bottom"}},{key:"generateAxes",value:function(t){var e,n=this.owner,i=n.config,r=[],a=i["axis_".concat(t,"_axes")],o=i.axis_rotated;"x"===t?e=o?Ia:Ra:"y"===t?e=o?Ra:Ia:"y2"===t&&(e=o?La:Oa),a.length&&a.forEach((function(i){var a=i.tick||{},o=n[t].copy();i.domain&&o.domain(i.domain),r.push(e(o).ticks(a.count).tickFormat(a.format||function(t){return t}).tickValues(a.values).tickSizeOuter(!1===a.outer?0:6))})),n.axesList[t]=r}},{key:"updateAxes",value:function(){var t=this.owner,e=t.config;Object.keys(t.axesList).forEach((function(n){var i=e["axis_".concat(n,"_axes")],r=t[n].copy(),a=r.range();t.axesList[n].forEach((function(o,s){var c=o.scale().range();a.every((function(t,e){return t===c[e]}))||o.scale().range(a);var u="".concat(tc(n),"-").concat(s+1),l=t.main.select(".".concat(u.replace(/\s/,".")));l.empty()?l=t.main.append("g").attr("class",u).style("visibility",e["axis_".concat(n,"_show")]?"visible":"hidden").call(o):(i[s].domain&&r.domain(i[s].domain),t.xAxis.helper.transitionise(l).call(o.scale(r))),l.attr("transform",t.getTranslate(n,s+1))}))}))}},{key:"getAxis",value:function(t,e,n,i,r){var a=this.owner,o=a.config,s=/^(x|subX)$/.test(t),c=s?"x":t,u=s&&a.isCategorized(),l=a["".concat(t,"Orient")],f=s?a.xAxisTickFormat:o["axis_".concat(t,"_tick_format")],h=r?0:a.getAxisTickRotate(c),d=s?a.xAxisTickValues:a["".concat(t,"AxisTickValues")],g=Hs({outerTick:n,noTransition:i,config:o,name:t,tickTextRotate:h},s&&{isCategory:u,tickMultiline:o.axis_x_tick_multiline,tickWidth:o.axis_x_tick_width,tickTitle:u&&o.axis_x_tick_tooltip&&a.api.categories(),orgXScale:a.x});s||(g.tickStepSize=o["axis_".concat(c,"_tick_stepSize")]);var p=new Js(g).scale(s&&a.zoomScale||e).orient(l);s&&a.isTimeSeries()&&d&&!vs(d)?d=d.map((function(t){return a.parseDate(t)})):!s&&a.isTimeSeriesY()&&(p.ticks(o.axis_y_tick_time_value),d=null),d&&p.tickValues(d),p.tickFormat(f||!s&&a.isStackNormalized()&&function(t){return"".concat(t,"%")}),u&&(p.tickCentered(o.axis_x_tick_centered),ks(o.axis_x_tick_culling)&&(o.axis_x_tick_culling=!1));var v=o["axis_".concat(c,"_tick_count")];return v&&p.ticks(v),p}},{key:"updateXAxisTickValues",value:function(t,e){var n,i=this.owner,r=i.config,a=r.axis_x_tick_fit,o=r.axis_x_tick_count;return(a||o&&a)&&(n=this.generateTickValues(i.mapTargetsToUniqueXs(t),o,i.isTimeSeries())),e?e.tickValues(n):i.xAxis&&(i.xAxis.tickValues(n),i.subXAxis.tickValues(n)),n}},{key:"getId",value:function(t){var e=this.owner.config;return t in e.data_axes?e.data_axes[t]:"y"}},{key:"getXAxisTickFormat",value:function(){var t,e=this.owner,n=e.config.axis_x_tick_format,i=e.isTimeSeries(),r=e.isCategorized();return n?vs(n)?t=n:i&&(t=function(t){return t?e.axisTimeFormat(n)(t):""}):t=i?e.defaultAxisTimeFormat:r?e.categoryName:function(t){return t<0?t.toFixed(0):t},vs(t)?function(n){return t.apply(e,r?[n,e.categoryName(n)]:[n])}:t}},{key:"getTickValues",value:function(t){var e=this.owner,n=e.config["axis_".concat(t,"_tick_values")],i=e["".concat(t,"Axis")];return(vs(n)?n():n)||(i?i.tickValues():void 0)}},{key:"getLabelOptionByAxisId",value:function(t){return this.owner.config["axis_".concat(t,"_label")]}},{key:"getLabelText",value:function(t){var e=this.getLabelOptionByAxisId(t);return ys(e)?e:e?e.text:null}},{key:"setLabelText",value:function(t,e){var n=this.owner.config,i=this.getLabelOptionByAxisId(t);ys(i)?n["axis_".concat(t,"_label")]=e:i&&(i.text=e)}},{key:"getLabelPosition",value:function(t,e){var n=this.owner.config.axis_rotated,i=this.getLabelOptionByAxisId(t),r=Ss(i)&&i.position?i.position:e[+!n],a=function(t){return!!~r.indexOf(t)};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")}}},{key:"getAxisLabelPosition",value:function(t){return this.getLabelPosition(t,"x"===t?["inner-top","inner-right"]:["inner-right","inner-top"])}},{key:"getLabelPositionById",value:function(t){return this.getAxisLabelPosition(t)}},{key:"xForAxisLabel",value:function(t){var e=this.owner,n=this.getAxisLabelPosition(t),i=n.isMiddle?-e.height/2:0;return Qs(e,"x"!==t)?i=n.isLeft?0:n.isCenter?e.width/2:e.width:n.isBottom&&(i=-e.height),i}},{key:"dxForAxisLabel",value:function(t){var e=this.owner,n=this.getAxisLabelPosition(t),i=n.isBottom?"0.5em":"0";return Qs(e,"x"!==t)?i=n.isLeft?"0.5em":n.isRight?"-0.5em":"0":n.isTop&&(i="-0.5em"),i}},{key:"textAnchorForAxisLabel",value:function(t){var e=this.owner,n=this.getAxisLabelPosition(t),i=n.isMiddle?"middle":"end";return Qs(e,"x"!==t)?i=n.isLeft?"start":n.isCenter?"middle":"end":n.isBottom&&(i="start"),i}},{key:"dyForAxisLabel",value:function(t){var e,n=this.owner,i=n.config,r=i.axis_rotated,a=this.getAxisLabelPosition(t).isInner,o=i["axis_".concat(t,"_tick_rotate")]?n.getHorizontalAxisHeight(t):0,s=this.getMaxTickWidth(t);if("x"===t){var c=i.axis_x_height;e=r?a?"1.2em":-25-s:a?"-0.5em":c?c-10:o?o-10:"3em"}else e={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[t],e=r?a?e[0]:o?o*("y2"===t?-1:1)-e[1]:e[2]:a?e[3]:(e[4]+(i["axis_".concat(t,"_inner")]?0:s+e[4]))*("y"===t?-1:1);return e}},{key:"getMaxTickWidth",value:function(t,e){var n=this.owner,i=n.config,r=n.currentMaxTickWidths[t],a=0;if(e||!i["axis_".concat(t,"_show")]||0===n.filterTargetsToShow().length)return r.size;if(n.svg){var o=/^y2?$/.test(t),s=n.filterTargetsToShow(n.data.targets),c=n[t].copy().domain(n["get".concat(o?"Y":"X","Domain")](s,t)),u=c.domain();if(u[0]===u[1]||Es(r.domain)&&r.domain[0]===r.domain[1])return r.size;r.domain=u;var l=this.getAxis(t,c,!1,!1,!0),f=i["axis_".concat(t,"_tick_count")];!i["axis_".concat(t,"_tick_values")]&&f&&l.tickValues(this.generateTickValues(u,f,o?n.isTimeSeriesY():n.isTimeSeries())),o||this.updateXAxisTickValues(s,l);var h=n.selectChart.append("svg").style("visibility","hidden").style("position","fixed").style("top","0px").style("left","0px");l.create(h),h.selectAll("text").each((function(e,i){var r=this.getBoundingClientRect().width;a=Math.max(a,r),"x"===t&&(n.currentMaxTickWidths.x.ticks[i]=r)})),h.remove()}return a>0&&(r.size=a),r.size}},{key:"getXAxisTickTextY2Overflow",value:function(t){var e=this.owner,n=e.config,i=e.getAxisTickRotate("x");if((e.isCategorized()||e.isTimeSeries())&&n.axis_x_tick_fit&&!n.axis_x_tick_culling&&!n.axis_x_tick_multiline&&i>0&&i<90){var r=e.currentWidth-e.getCurrentPaddingLeft(),a=this.getXAxisTickMaxOverflow(i,r-t),o=Math.max(0,a)+t;return Math.min(o,r/2)}return 0}},{key:"getXAxisTickMaxOverflow",value:function(t,e){for(var n=this.owner,i=n.config,r=n.isTimeSeries(),a=n.currentMaxTickWidths.x.ticks,o=a.length,s=this.x.padding,c=s.left,u=s.right,l=0,f=o-(r&&i.axis_x_tick_fit?.5:0),h=0;h<o;h++){var d=h+1,g=Math.cos(Math.PI*t/180)*a[h],p=d-(r?1:.5)+c;if(!(p<=0)){var v=(e-g)/p;l=Math.max(l,g-v/2-((f-d)*v+u*v))}}var y=0;if(!r){var x=To().domain([-1*c,n.getXDomainMax(n.data.targets)+1+u]).range([0,e-l]);y=Math.ceil((x(1)-x(0))/2)}return l+y}},{key:"getXAxisPadding",value:function(t){var e=this.owner,n=e.config.axis_x_padding;if(ks(n)?n={left:0,right:0}:(n.left=n.left||0,n.right=n.right||0),e.isTimeSeries()){var i=+e.getXDomainMin(e.data.targets),r=+e.getXDomainMax(e.data.targets)-i,a=r+n.left+n.right,o=r/t/a;n={left:n.left/a/o||0,right:n.right/a/o||0}}return n}},{key:"updateLabels",value:function(t){var e=this,n=this.owner,i={x:n.main.select(".".concat(Eo.axisX," .").concat(Eo.axisXLabel)),y:n.main.select(".".concat(Eo.axisY," .").concat(Eo.axisYLabel)),y2:n.main.select(".".concat(Eo.axisY2," .").concat(Eo.axisY2Label))};Object.keys(i).filter((function(t){return!i[t].empty()})).forEach((function(n){var r=i[n];(t?r.transition():r).attr("x",(function(){return e.xForAxisLabel(n)})).attr("dx",(function(){return e.dxForAxisLabel(n)})).attr("dy",(function(){return e.dyForAxisLabel(n)})).text((function(){return e.getLabelText(n)}))}))}},{key:"getPadding",value:function(t,e,n,i){var r=xs(t)?t:t[e];return ps(r)?this.convertPixelsToAxisPadding(r,i):n}},{key:"convertPixelsToAxisPadding",value:function(t,e){var n=this.owner;return e*(t/(n.config.axis_rotated?n.width:n.height))}},{key:"generateTickValues",value:function(t,e,n){var i,r,a,o,s,c,u=t;if(e){var l=vs(e)?e():e;if(1===l)u=[t[0]];else if(2===l)u=[t[0],t[t.length-1]];else if(l>2){var f=this.owner.isCategorized();for(a=l-2,i=t[0],o=((r=t[t.length-1])-i)/(a+1),u=[i],s=0;s<a;s++)c=+i+o*(s+1),u.push(n?new Date(c):f?Math.round(c):c);u.push(r)}}return n||(u=u.sort((function(t,e){return t-e}))),u}},{key:"generateTransitions",value:function(t){var e=this.owner.axes,n=r(["x","y","y2","subx"].map((function(n){var i=e[n];return i&&t&&(i=i.transition().duration(t)),i})),4);return{axisX:n[0],axisY:n[1],axisY2:n[2],axisSubX:n[3]}}},{key:"redraw",value:function(t,e,n){var i=this.owner,r=e?"0":"1";["x","y","y2","subX"].forEach((function(e){var a=i["".concat(e,"Axis")];a&&(!n&&(a.config.withoutTransition=!i.config.transition_duration),i.axes[e.toLowerCase()].style("opacity",r),a.create(t["axis".concat(Bs(e))]))})),this.updateAxes()}},{key:"redrawAxis",value:function(t,e,n,i,r){var a,o=this,s=this.owner,c=s.config,u=!!s.zoomScale;!u&&s.isCategorized()&&0===t.length&&s.x.domain([0,s.axes.x.selectAll(".tick").size()]),s.x&&t.length?(!u&&s.updateXDomain(t,e.UpdateXDomain,e.UpdateOrgXDomain,e.TrimXDomain),!c.axis_x_tick_values&&this.updateXAxisTickValues(t)):s.xAxis&&(s.xAxis.tickValues([]),s.subXAxis.tickValues([])),c.zoom_rescale&&!i&&(a=s.x.orgDomain()),["y","y2"].forEach((function(e){var n=s[e];if(n){var i=c["axis_".concat(e,"_tick_values")],r=c["axis_".concat(e,"_tick_count")];if(n.domain(s.getYDomain(t,e,a)),!i&&r){var u=n.domain();s["".concat(e,"Axis")].tickValues(o.generateTickValues(u,u.every((function(t){return 0===t}))?1:r,s.isTimeSeriesY()))}}})),this.redraw(n,s.hasArcType(),r),this.updateLabels(e.Transition),(e.UpdateXDomain||e.UpdateXAxis||e.Y)&&t.length&&this.setCulling(),e.Y&&(s.subY&&s.subY.domain(s.getYDomain(t,"y")),s.subY2&&s.subY2.domain(s.getYDomain(t,"y2")))}},{key:"setCulling",value:function(){var t=this.owner,e=t.config;["subx","x","y","y2"].forEach((function(n){var i=t.axes[n],r="subx"===n?"x":n,a=e["axis_".concat(r,"_tick_culling")];if(i&&a){var o,s=i.selectAll(".tick text"),c=Ws(s.data()),u=c.length,l=e["axis_".concat(r,"_tick_culling_max")];if(u){for(var f=1;f<u;f++)if(u/f<l){o=f;break}s.each((function(t){this.style.display=c.indexOf(t)%o?"none":"block"}))}else s.style("display","block");if("x"===n){var h=t.clipXAxisTickMaxWidth?t.clipPathForXAxisTickTexts:null;t.svg.selectAll(".".concat(Eo.axisX," .tick text")).attr("clip-path",h)}}}))}}]),t}(),nc=function(){function t(e){i(this,t);var n=this;n.api=e,n.config=n.getOptions(),n.data={},n.cache={},n.axes={},n.rendered=!1}return o(t,[{key:"beforeInit",value:function(){this.callPluginHook("$beforeInit"),Os(this.config.onbeforeinit,this,this.api)}},{key:"afterInit",value:function(){this.callPluginHook("$afterInit"),Os(this.config.onafterinit,this,this.api)}},{key:"init",value:function(){var t=this,e=t.config;t.initParams();var n={element:e.bindto,classname:"bb"};Cs(e.bindto)&&(n.element=e.bindto.element||"#chart",n.classname=e.bindto.classname||n.classname),t.selectChart=vs(n.element.node)?e.bindto.element:An(n.element||[]),t.selectChart.empty()&&(t.selectChart=An(gs.body.appendChild(gs.createElement("div")))),t.selectChart.html("").classed(n.classname,!0),t.initToRender()}},{key:"initToRender",value:function(t){var e=this,n=e.config,i=e.selectChart,r=function(){return"none"===i.style("display")||"hidden"===i.style("visibility")},a=n.render.lazy||r(),o=ds.MutationObserver;if(a&&o&&!1!==n.render.observe&&!t&&new o((function(t,n){r()||(n.disconnect(),!e.rendered&&e.initToRender(!0))})).observe(i.node(),{attributes:!0,attributeFilter:["class","style"]}),!a||t){var s=e.convertData(n,e.initWithData);s&&e.initWithData(s),e.afterInit()}}},{key:"initParams",value:function(){var t=this,e=this,n=e.config,i=n.axis_rotated;e.datetimeId="bb-".concat(+new Date),e.initClip(),e.dragStart=null,e.dragging=!1,e.flowing=!1,e.cancelClick=!1,e.mouseover=!1,e.transiting=!1,e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),e.point=e.generatePoint(),e.extraLineClasses=e.generateExtraLineClass(),e.dataTimeFormat=n.data_xLocaltime?J:tt,e.axisTimeFormat=n.axis_x_localtime?K:Q;var r=e.config.zoom_enabled&&"drag"===e.config.zoom_enabled.type;e.defaultAxisTimeFormat=function(n){var i=r?t.zoomScale:t.zoomScale&&e.x.orgDomain().toString()!==t.zoomScale.domain().toString(),a=(n.getMilliseconds()?".%L":n.getSeconds()&&".:%S")||n.getMinutes()&&"%I:%M"||n.getHours()&&"%I %p"||1!==n.getDate()&&"%b %d"||i&&1===n.getDate()&&"%b'%y"||n.getMonth()&&"%-m/%-d"||"%Y";return e.axisTimeFormat(a)(n)},e.hiddenTargetIds=[],e.hiddenLegendIds=[],e.focusedTargetIds=[],e.defocusedTargetIds=[],e.isLegendRight="right"===n.legend_position,e.isLegendInset="inset"===n.legend_position,e.isLegendTop="top-left"===n.legend_inset_anchor||"top-right"===n.legend_inset_anchor,e.isLegendLeft="top-left"===n.legend_inset_anchor||"bottom-left"===n.legend_inset_anchor,e.legendStep=0,e.legendItemWidth=0,e.legendItemHeight=0,e.currentMaxTickWidths={x:{size:0,ticks:[],domain:""},y:{size:0,domain:""},y2:{size:0,domain:""}},e.rotated_padding_left=30,e.rotated_padding_right=i&&!n.axis_x_show?0:30,e.rotated_padding_top=5,e.withoutFadeIn={},e.inputType=e.convertInputType(),e.axes.subx=Ln([])}},{key:"initWithData",value:function(t){var e=this,n=e.config;if(e.axis=new ec(e),n.zoom_enabled&&e.initZoom(),e.data.xs={},e.data.targets=e.convertDataToTargets(t),n.data_filter&&(e.data.targets=e.data.targets.filter(n.data_filter)),n.data_hide&&e.addHiddenTargetIds(!0===n.data_hide?e.mapToIds(e.data.targets):n.data_hide),n.legend_hide&&e.addHiddenLegendIds(!0===n.legend_hide?e.mapToIds(e.data.targets):n.legend_hide),e.updateSizes(),e.updateScales(!0),e.x&&(e.x.domain(Ws(e.getXDomain(e.data.targets))),e.subX.domain(e.x.domain()),e.orgXDomain=e.x.domain()),e.y&&(e.y.domain(e.getYDomain(e.data.targets,"y")),e.subY.domain(e.y.domain())),e.y2&&(e.y2.domain(e.getYDomain(e.data.targets,"y2")),e.subY2&&e.subY2.domain(e.y2.domain())),e.svg=e.selectChart.append("svg").style("overflow","hidden").style("display","block"),n.interaction_enabled&&e.inputType){var i="touch"===e.inputType;e.svg.on(i?"touchstart":"mouseenter",(function(){return Os(n.onover,e,e.api)})).on(i?"touchend":"mouseleave",(function(){return Os(n.onout,e,e.api)}))}n.svg_classname&&e.svg.attr("class",n.svg_classname),e.defs=e.svg.append("defs"),e.clipChart=e.appendClip(e.defs,e.clipId),e.clipXAxis=e.appendClip(e.defs,e.clipIdForXAxis),e.clipXAxisTickTexts=e.appendClip(e.defs,e.clipIdForXAxisTickTexts),e.clipYAxis=e.appendClip(e.defs,e.clipIdForYAxis),e.clipGrid=e.appendClip(e.defs,e.clipIdForGrid),vs(n.color_tiles)&&e.patterns&&e.patterns.forEach((function(t){return e.defs.append((function(){return t.node}))})),e.updateSvgSize(),e.bindResize();var r=e.svg.append("g").attr("transform",e.getTranslate("main"));if(e.main=r,n.subchart_show&&e.initSubchart(),e.initTooltip&&e.initTooltip(),e.initLegend&&e.initLegend(),e.initTitle&&e.initTitle(),n.data_empty_label_text&&r.append("text").attr("class","".concat(Eo.text," ").concat(Eo.empty)).attr("text-anchor","middle").attr("dominant-baseline","middle"),e.initRegion(),n.clipPath||e.axis.init(),r.append("g").attr("class",Eo.chart).attr("clip-path",e.clipPath),e.callPluginHook("$init"),e.initEventRect(),e.initChartElements(),e.initGrid(),r.insert("rect",n.zoom_privileged?null:"g.".concat(Eo.regions)).attr("class",Eo.zoomRect).attr("width",e.width).attr("height",e.height).style("opacity","0").on("dblclick.zoom",null),n.clipPath&&e.axis.init(),e.updateTargets(e.data.targets),e.updateDimension(),Os(n.oninit,e,e.api),e.setBackground(),e.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),n.data_onmin||n.data_onmax){var a=e.getMinMaxData();Os(n.data_onmin,e,a.min),Os(n.data_onmax,e,a.max)}e.api.element=e.selectChart.node(),e.rendered=!0}},{key:"initChartElements",value:function(){var t=this;["Bar","Radar","Line","Bubble","Arc","Gauge","Pie"].forEach((function(e){t["init".concat(e)]()})),Ms(t.config.data_labels)&&t.initText()}},{key:"setChartElements",value:function(){var t=this;t.api.$={chart:t.selectChart,svg:t.svg,defs:t.defs,main:t.main,tooltip:t.tooltip,legend:t.legend,title:t.title,grid:t.grid,arc:t.arcs,bar:{bars:t.mainBar},line:{lines:t.mainLine,areas:t.mainArea,circles:t.mainCircle},text:{texts:t.mainText}}}},{key:"setBackground",value:function(){var t=this.config.background;if(Ms(t)){var e=this.svg.select(".".concat(Eo[this.hasArcType()?"chart":"regions"])).insert(t.imgUrl?"image":"rect",":first-child");t.imgUrl?e.attr("href",t.imgUrl):t.color&&e.style("fill",t.color),e.attr("class",t.class||null).attr("width","100%").attr("height","100%")}}},{key:"smoothLines",value:function(t,e){"grid"===e&&t.each((function(){var t=An(this);["x1","x2","y1","y2"].forEach((function(e){return t.attr(e,Math.ceil(t.attr(e)))}))}))}},{key:"updateSizes",value:function(t){var e=this;t||e.setContainerSize();var n=e.config,i=n.axis_rotated,r=e.hasArcType(),a={width:e.legend?e.getLegendWidth():0,height:e.legend?e.getLegendHeight():0},o=e.isLegendRight||e.isLegendInset?0:a.height,s=i||r?0:e.getHorizontalAxisHeight("x"),c=n.subchart_axis_x_show&&n.subchart_axis_x_tick_text_show?s:30,u=n.subchart_show&&!r?n.subchart_size_height+c:0;e.margin=i?{top:e.getHorizontalAxisHeight("y2")+e.getCurrentPaddingTop(),right:r?0:e.getCurrentPaddingRight(),bottom:e.getHorizontalAxisHeight("y")+o+e.getCurrentPaddingBottom(),left:u+(r?0:e.getCurrentPaddingLeft())}:{top:4+e.getCurrentPaddingTop(),right:r?0:e.getCurrentPaddingRight(),bottom:s+u+o+e.getCurrentPaddingBottom(),left:r?0:e.getCurrentPaddingLeft()},e.margin2=i?{top:e.margin.top,right:NaN,bottom:20+o,left:e.rotated_padding_left}:{top:e.currentHeight-u-o,right:NaN,bottom:c+o,left:e.margin.left},e.margin3={top:0,right:NaN,bottom:0,left:0},e.updateSizeForLegend&&e.updateSizeForLegend(a),e.width=e.currentWidth-e.margin.left-e.margin.right,e.height=e.currentHeight-e.margin.top-e.margin.bottom,e.width<0&&(e.width=0),e.height<0&&(e.height=0),e.width2=i?e.margin.left-e.rotated_padding_left-e.rotated_padding_right:e.width,e.height2=i?e.height:e.currentHeight-e.margin2.top-e.margin2.bottom,e.width2<0&&(e.width2=0),e.height2<0&&(e.height2=0),e.arcWidth=e.width-(e.isLegendRight?a.width+10:0),e.arcHeight=e.height-(e.isLegendRight?0:10),e.hasType("gauge")&&!n.gauge_fullCircle&&(e.arcHeight+=e.height-e.getGaugeLabelHeight()),e.updateRadius&&e.updateRadius(),e.isLegendRight&&r&&(e.margin3.left=e.arcWidth/2+1.1*e.radiusExpanded),!r&&n.axis_x_show&&e.updateXAxisTickClip()}},{key:"updateTargets",value:function(t){var e=this;e.updateTargetsForText(t),e.updateTargetsForBar(t),e.updateTargetsForLine(t),e.hasArcType(t)&&(e.hasType("radar")?e.updateTargetsForRadar(t):e.updateTargetsForArc(t)),e.updateTargetsForSubchart&&e.updateTargetsForSubchart(t),e.showTargets()}},{key:"showTargets",value:function(){var t=this;t.svg.selectAll(".".concat(Eo.target)).filter((function(e){return t.isTargetToShow(e.id)})).transition().duration(t.config.transition_duration).style("opacity","1")}},{key:"getWithOption",value:function(t){var e={Y:!0,Subchart:!0,Transition:!0,EventRect:!0,Dimension:!0,TrimXDomain:!0,Transform:!1,UpdateXDomain:!1,UpdateOrgXDomain:!1,Legend:!1,UpdateXAxis:"UpdateXDomain",TransitionForExit:"Transition",TransitionForAxis:"Transition"};return Object.keys(e).forEach((function(n){var i=e[n];ys(i)&&(i=e[i]),e[n]=Ls(t,"with".concat(n),i)})),e}},{key:"redraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=this,i=n.main,r=n.config,a=n.filterTargetsToShow(n.data.targets),o=t.initializing,s=t.flow,c=n.getWithOption(t),u=c.Transition?r.transition_duration:0,l=c.TransitionForExit?u:0,f=c.TransitionForAxis?u:0,h=e||n.axis.generateTransitions(f);n.updateSizes(o),c.Legend&&r.legend_show?n.updateLegend(n.mapToIds(n.data.targets),t,h):c.Dimension&&n.updateDimension(!0),n.axis.redrawAxis(a,c,h,s,o),n.updateCircleY(),r.data_empty_label_text&&i.select("text.".concat(Eo.text,".").concat(Eo.empty)).attr("x",n.width/2).attr("y",n.height/2).text(r.data_empty_label_text).style("display",a.length?"none":null),n.updateGrid(u),n.updateRegion(u),n.updateBar(l),n.updateLine(l),n.updateArea(l),n.updateCircle(),n.hasDataLabel()&&n.updateText(l),n.redrawTitle&&n.redrawTitle(),n.arcs&&n.redrawArc(u,l,c.Transform),n.radars&&n.redrawRadar(l),n.mainText&&i.selectAll(".".concat(Eo.selectedCircles)).filter(n.isBarType.bind(n)).selectAll("circle").remove(),r.interaction_enabled&&!s&&c.EventRect&&n.bindZoomEvent(),o&&n.setChartElements(),n.generateRedrawList(a,s,u,c.Subchart),n.callPluginHook("$redraw",t,u)}},{key:"generateRedrawList",value:function(t,e,n,i){var r=this,a=r.config,o=r.getDrawShape();a.subchart_show&&r.redrawSubchart(i,n,o);var s=e&&r.generateFlow({targets:t,flow:e,duration:e.duration,shape:o,xv:r.xv.bind(r)}),c=(n||s)&&r.isTabVisible(),u=r.getRedrawList(o,e,s,c),l=e||a.onrendered?function(){s&&s(),Os(a.onrendered,r,r.api)}:null;if(l)if(c&&u.length){var f=r.generateWait();pa().duration(n).each((function(){u.reduce((function(t,e){return t.concat(e)}),[]).forEach((function(t){return f.add(t)}))})).call(f,l)}else r.transiting||l();r.mapToIds(r.data.targets).forEach((function(t){r.withoutFadeIn[t]=!0}))}},{key:"getDrawShape",value:function(){var t=this,e=t.config.axis_rotated,n=t.hasType("radar"),i={type:{},indices:{}};if(t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")){var r=t.getShapeIndices(t.isLineType);if(i.indices.line=r,i.type.line=t.generateDrawLine?t.generateDrawLine(r,!1):void 0,t.hasTypeOf("Area")){var a=t.getShapeIndices(t.isAreaType);i.indices.area=a,i.type.area=t.generateDrawArea?t.generateDrawArea(a,!1):void 0}}if(t.hasType("bar")){var o=t.getShapeIndices(t.isBarType);i.indices.bar=o,i.type.bar=t.generateDrawBar?t.generateDrawBar(o):void 0}return i.pos={xForText:t.generateXYForText(i.indices,!0),yForText:t.generateXYForText(i.indices,!1),cx:(n?t.radarCircleX:e?t.circleY:t.circleX).bind(t),cy:(n?t.radarCircleY:e?t.circleX:t.circleY).bind(t)},i}},{key:"getRedrawList",value:function(t,e,n,i){var r=this,a=r.config,o=r.hasArcType(),s=t.pos,c=s.cx,u=s.cy,l=s.xForText,f=s.yForText,h=[];if(!o){var d=t.type,g=d.area,p=d.bar,v=d.line;(a.grid_x_lines.length||a.grid_y_lines.length)&&h.push(r.redrawGrid(i)),a.regions.length&&h.push(r.redrawRegion(i)),r.hasTypeOf("Line")&&(h.push(r.redrawLine(v,i)),r.hasTypeOf("Area")&&h.push(r.redrawArea(g,i))),r.hasType("bar")&&h.push(r.redrawBar(p,i)),e||h.push(r.updategridFocus())}return(!o||r.hasType("radar"))&&(Ms(a.data_labels)&&h.push(r.redrawText(l,f,e,i)),h.push(r.redrawCircle(c,u,i,n))),h}},{key:"updateAndRedraw",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this,i=n.config;e.withTransition=Ls(e,"withTransition",!0),e.withTransform=Ls(e,"withTransform",!1),e.withLegend=Ls(e,"withLegend",!1),e.withUpdateXDomain=!0,e.withUpdateOrgXDomain=!0,e.withTransitionForExit=!1,e.withTransitionForTransform=Ls(e,"withTransitionForTransform",e.withTransition),e.withLegend&&i.legend_show||(t=n.axis.generateTransitions(e.withTransitionForAxis?i.transition_duration:0),n.updateScales(),n.updateSvgSize(),n.transformAll(e.withTransitionForTransform,t)),n.redraw(e,t)}},{key:"redrawWithoutRescale",value:function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})}},{key:"isTimeSeries",value:function(){return"timeseries"===this.config.axis_x_type}},{key:"isCategorized",value:function(){return this.config.axis_x_type.indexOf("category")>=0||this.hasType("radar")}},{key:"isCustomX",value:function(){var t=this.config;return!this.isTimeSeries()&&(t.data_x||Ms(t.data_xs))}},{key:"isTimeSeriesY",value:function(){return"timeseries"===this.config.axis_y_type}},{key:"getTranslate",value:function(t){var e,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=this,o=a.config,s=o.axis_rotated,c=a.hasType("gauge"),u=0;if(i&&/^(x|y2?)$/.test(t)&&(u=a.getAxisSize(t)*i),"main"===t)e=Ts(a.margin.left),n=Ts(a.margin.top);else if("context"===t)e=Ts(a.margin2.left),n=Ts(a.margin2.top);else if("legend"===t)e=a.margin3.left,n=a.margin3.top+(c?10:0);else if("x"===t)e=s?-u:0,n=s?0:a.height+u;else if("y"===t)e=s?0:-u,n=s?a.height+u:0;else if("y2"===t)e=s?0:a.width+u,n=s?1-u:0;else if("subx"===t)e=0,n=s?0:a.height2;else if("arc"===t)e=a.arcWidth/2,n=a.arcHeight/2;else if("radar"===t){var l=a.getRadarSize(),f=r(l,1),h=f[0];e=a.width/2-h,n=Ts(a.margin.top)}return"translate(".concat(e,", ").concat(n,")")}},{key:"initialOpacity",value:function(t){return null!==this.getBaseValue(t)&&this.withoutFadeIn[t.id]?"1":"0"}},{key:"initialOpacityForCircle",value:function(t){return null!==this.getBaseValue(t)&&this.withoutFadeIn[t.id]?this.opacityForCircle(t):"0"}},{key:"opacityForCircle",value:function(t){var e=this.config.point_show?"1":"0";return ps(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":e:"0"}},{key:"opacityForText",value:function(){return this.hasDataLabel()?"1":"0"}},{key:"xx",value:function(t){var e=this.config.zoom_enabled&&this.zoomScale?this.zoomScale:this.x;return t?e(ps(t.x)?t.x:t):null}},{key:"xv",value:function(t){var e=this,n=e.getBaseValue(t);return e.isTimeSeries()?n=e.parseDate(n):e.isCategorized()&&ys(n)&&(n=e.config.axis_x_categories.indexOf(n)),Math.ceil(e.x(n))}},{key:"yv",value:function(t){var e=t.axis&&"y2"===t.axis?this.y2:this.y;return Math.ceil(e(this.getBaseValue(t)))}},{key:"subxx",value:function(t){return t?this.subX(t.x):null}},{key:"transformMain",value:function(t,e){var n,i,r,a=this;e&&e.axisX?n=e.axisX:(n=a.main.select(".".concat(Eo.axisX)),t&&(n=n.transition())),e&&e.axisY?i=e.axisY:(i=a.main.select(".".concat(Eo.axisY)),t&&(i=i.transition())),e&&e.axisY2?r=e.axisY2:(r=a.main.select(".".concat(Eo.axisY2)),t&&(r=r.transition())),(t?a.main.transition():a.main).attr("transform",a.getTranslate("main")),n.attr("transform",a.getTranslate("x")),i.attr("transform",a.getTranslate("y")),r.attr("transform",a.getTranslate("y2")),a.main.select(".".concat(Eo.chartArcs)).attr("transform",a.getTranslate("arc"))}},{key:"transformAll",value:function(t,e){var n=this;n.transformMain(t,e),n.config.subchart_show&&n.transformContext(t,e),n.legend&&n.transformLegend(t)}},{key:"updateSvgSize",value:function(){var t=this,e=t.svg.select(".".concat(Eo.brush," .overlay")),n={width:0,height:0};e.size()&&(n.width=+e.attr("width"),n.height=+e.attr("height")),t.svg.attr("width",t.currentWidth).attr("height",t.currentHeight),t.svg.selectAll(["#".concat(t.clipId),"#".concat(t.clipIdForGrid)]).select("rect").attr("width",t.width).attr("height",t.height),t.svg.select("#".concat(t.clipIdForXAxis)).select("rect").attr("x",t.getXAxisClipX.bind(t)).attr("y",t.getXAxisClipY.bind(t)).attr("width",t.getXAxisClipWidth.bind(t)).attr("height",t.getXAxisClipHeight.bind(t)),t.svg.select("#".concat(t.clipIdForYAxis)).select("rect").attr("x",t.getYAxisClipX.bind(t)).attr("y",t.getYAxisClipY.bind(t)).attr("width",t.getYAxisClipWidth.bind(t)).attr("height",t.getYAxisClipHeight.bind(t)),t.svg.select("#".concat(t.clipIdForSubchart)).select("rect").attr("width",t.width).attr("height",n.height),t.svg.select(".".concat(Eo.zoomRect)).attr("width",t.width).attr("height",t.height)}},{key:"updateDimension",value:function(t){var e=this;t||(e.xAxis&&e.config.axis_rotated?(e.xAxis.create(e.axes.x),e.subXAxis.create(e.axes.subx)):(e.yAxis&&e.yAxis.create(e.axes.y),e.y2Axis&&e.y2Axis.create(e.axes.y2))),e.updateScales(t),e.updateSvgSize(),e.transformAll(!1)}},{key:"bindResize",value:function(){var t=this,e=t.config,n=t.generateResize(),i=[];i.push((function(){return Os(e.onresize,t,t.api)})),e.resize_auto&&i.push((function(){return t.api.flush(!1,!0)})),i.push((function(){return Os(e.onresized,t,t.api)})),i.forEach((function(t){return n.add(t)})),ds.addEventListener("resize",t.resizeFunction=n)}},{key:"generateResize",value:function(){function t(){t.timeout&&(ds.clearTimeout(t.timeout),t.timeout=null),t.timeout=ds.setTimeout((function(){e.forEach((function(t){return t()}))}),200)}var e=[];return t.add=function(t){return e.push(t)},t.remove=function(t){return e.splice(e.indexOf(t),1)},t}},{key:"endall",value:function(t,e){var n=0;t.each((function(){return++n})).on("end",(function(){for(var t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];--n||e.apply.apply(e,[this].concat(i))}))}},{key:"generateWait",value:function(){var t=[],e=function(e,n){var i;!function e(){for(var r,a=0,o=0;r=t[o];o++)if(r.empty())a++;else try{r.transition()}catch(t){a++}i&&clearTimeout(i),a===t.length?n&&n():i=setTimeout(e,50)}()};return e.add=function(e){Es(e)?t=t.concat(e):t.push(e)},e}},{key:"parseDate",value:function(t){var e;return t instanceof Date?e=t:ys(t)?e=this.dataTimeFormat(this.config.data_xFormat)(t):xs(t)&&!isNaN(t)&&(e=new Date(+t)),(!e||isNaN(+e))&&console&&console.error&&console.error("Failed to parse x '".concat(t,"' to Date object")),e}},{key:"isTabVisible",value:function(){return!gs.hidden}},{key:"convertInputType",value:function(){var t=this.config,e=!1;if(/Mobi/.test(ds.navigator.userAgent)&&t.interaction_inputType_touch){var n=ds.navigator&&"maxTouchPoints"in ds.navigator&&ds.navigator.maxTouchPoints>0,i="ontouchmove"in ds||ds.DocumentTouch&&gs instanceof ds.DocumentTouch;e=n||i}return(t.interaction_inputType_mouse&&!e&&"onmouseover"in ds?"mouse":e&&"touch")||null}},{key:"callPluginHook",value:function(t){for(var e=this,n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.config.plugins.forEach((function(n){"$beforeInit"===t&&(n.$$=e,e.api.plugins.push(n)),n[t].apply(n,i)}))}}]),t}(),ic=function t(e){i(this,t);var n=new nc(this);this.plugins=[],this.internal=n,n.loadConfig(e),n.beforeInit(e),n.init(),function t(e,n,i){Object.keys(e).forEach((function(r){n[r]=e[r].bind(i),Object.keys(e[r]).length&&t(e[r],n[r],i)}))}(t.prototype,this,this)},rc=function t(){return i(this,t),{bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,zoom_enabled:void 0,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,interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:350,data_x:void 0,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function(t){return t},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:void 0,data_types:{},data_labels:{},data_labels_colors:void 0,data_labels_position:{},data_order:"desc",data_regions:{},data_color:void 0,data_colors:{},data_hide:!1,data_filter:void 0,data_stack_normalize:!1,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function(){},data_onover:function(){},data_onout:function(){},data_onselected:function(){},data_onunselected:function(){},data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:"csv",data_keys:void 0,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_text_show:!0,subchart_onbrush:function(){},color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0,legend_show:!0,legend_hide:!1,legend_contents_bindto:void 0,legend_contents_template:void 0,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,legend_usePoint:!1,axis_rotated:!1,axis_x_clipPath:!0,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:void 0,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[],axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:void 0,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_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:[],axis_y2_show:!1,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_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:[],grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0,point_show:!0,point_r:2.5,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle",line_connectNull:!1,line_step_type:"step",line_zerobased:!1,line_classes:void 0,line_point:!0,scatter_zerobased:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0,bubble_maxR:35,bubble_zerobased:!1,area_zerobased:!0,area_above:!1,area_linearGradient:!1,pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_label_ratio:void 0,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0,plugins:[],gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_format:void 0,gauge_min:0,gauge_max:100,gauge_type:"single",gauge_startingAngle:-1*Math.PI/2,gauge_label_extents:void 0,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_rate:.98,gauge_expand_duration:50,donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_rate:.98,donut_expand_duration:50,donut_padAngle:0,donut_startingAngle:0,spline_interpolation_type:"cardinal",radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_axis_text_position:{},radar_level_depth:3,radar_level_show:!0,radar_level_text_format:function(t){return t%1==0?t:t.toFixed(2)},radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1,render:{},regions:[],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(){},tooltip_onhide:function(){},tooltip_onshown:function(){},tooltip_onhidden:function(){},tooltip_order:null,title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"}};Xs(nc.prototype,{getOptions:function(){return new rc},loadConfig:function(t){var e,n,i,r=this.config,a=function(){var t=n.shift();return t&&e&&Ss(e)&&t in e?(e=e[t],a()):t?void 0:e};Object.keys(r).forEach((function(o){e=t,n=o.split("_"),i=a(),ms(i)&&(r[o]=i)}))}}),Xs(nc.prototype,{getScale:function(t,e,n){return(n?function(){return Ga.apply(Mo(O,C,b,_,y,p,d,f,K).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():To()).range([t,e])},getX:function(t,e,n,i){var r=this.zoomScale||this.getScale(t,e,this.isTimeSeries());return this.getCustomizedScale(n?r.domain(n):r,i)},getY:function(t,e,n){var i=this.getScale(t,e,this.isTimeSeriesY());return n&&i.domain(n),i},getCustomizedScale:function(t,e){var n=this,i=e||function(){return n.xAxis.tickOffset()},r=function(e,n){var r=t(e)+i();return n?r:Math.ceil(r)};for(var a in t)r[a]=t[a];return r.orgDomain=function(){return t.domain()},r.orgScale=function(){return t},n.isCategorized()&&(r.domain=function(e){var n=e;return arguments.length?(t.domain(n),r):[(n=this.orgDomain())[0],n[1]+1]}),r},getYScale:function(t){return"y2"===this.axis.getId(t)?this.y2:this.y},getSubYScale:function(t){return"y2"===this.axis.getId(t)?this.subY2:this.subY},updateScales:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,i=n.config,r=i.axis_rotated;n.xMin=r?1:0,n.xMax=r?n.height:n.width,n.yMin=r?0:n.height,n.yMax=r?n.width:1,n.subXMin=n.xMin,n.subXMax=n.xMax,n.subYMin=r?0:n.height2,n.subYMax=r?n.width2:1;var a=e&&n.x&&n.x.orgDomain(),o=e&&n.orgXDomain;n.x=n.getX(n.xMin,n.xMax,a,(function(){return n.xAxis.tickOffset()})),n.subX=n.getX(n.xMin,n.xMax,o,(function(t){return t%1?0:n.subXAxis.tickOffset()})),n.xAxisTickFormat=n.axis.getXAxisTickFormat(),n.xAxisTickValues=n.axis.getTickValues("x"),n.xAxis=n.axis.getAxis("x",n.x,i.axis_x_tick_outer,t),n.subXAxis=n.axis.getAxis("subX",n.subX,i.axis_x_tick_outer,t),n.y=n.getY(n.yMin,n.yMax,n.y?n.y.domain():i.axis_y_default),n.subY=n.getY(n.subYMin,n.subYMax,n.subY?n.subY.domain():i.axis_y_default),n.yAxisTickValues=n.axis.getTickValues("y"),n.yAxis=n.axis.getAxis("y",n.y,i.axis_y_tick_outer,t),i.axis_y2_show&&(n.y2=n.getY(n.yMin,n.yMax,n.y2?n.y2.domain():i.axis_y2_default),n.subY2=n.getY(n.subYMin,n.subYMax,n.subY2?n.subY2.domain():i.axis_y2_default),n.y2AxisTickValues=n.axis.getTickValues("y2"),n.y2Axis=n.axis.getAxis("y2",n.y2,i.axis_y2_tick_outer,t)),n.updateArc&&n.updateArc()}}),Xs(nc.prototype,{getYDomainMinMax:function(t,e){var n=this,i=n.config,r="min"===e,a=i.data_groups,o=n.mapToIds(t),s=n.getValuesAsIdKeyed(t);return a.length>0&&function(){for(var e,i=n["has".concat(r?"Negative":"Positive","ValueInTargets")](t),c=function(t,a){if(0===(a=a.filter((function(t){return o.indexOf(t)>=0}))).length)return e=a,"continue";var c=a[0],u=n.axis.getId(c);i&&s[c]&&(s[c]=s[c].map((function(t){return(r?t<0:t>0)?t:0})));for(var l,f=function(t,e){if(!s[e])return"continue";var a=n.axis.getId(e);s[e].forEach((function(t,e){var n=+t;a!==u||i&&(r?n>0:n<0)||(s[c][e]+=n)}))},h=1;l=a[h];h++)f(0,l);e=a},u=0;e=a[u];u++)c(0,e)}(),Gs(e,Object.keys(s).map((function(t){return Gs(e,s[t])})))},getYDomainMin:function(t){return this.getYDomainMinMax(t,"min")},getYDomainMax:function(t){return this.getYDomainMinMax(t,"max")},isHiddenTargetWithYDomain:function(t){var e=this;return e.hiddenTargetIds.some((function(n){return e.axis.getId(n)===t}))},getYDomain:function(t,e,n){var i=this,r=i.config,a="axis_".concat(e);if(i.isStackNormalized())return[0,100];var o=t.filter((function(t){return i.axis.getId(t.id)===e})),s=n?i.filterByXDomain(o,n):o;if(0===s.length)return i.isHiddenTargetWithYDomain(e)?i[e].domain():"y2"===e?i.y.domain():i.getYDomain(t,"y2",n);var c=r["".concat(a,"_min")],u=r["".concat(a,"_max")],l=i.getYDomainMin(s),f=i.getYDomainMax(s),h=r["".concat(a,"_center")],d=["area","bar","bubble","line","scatter"].some((function(t){return i.hasType(t,s)&&r["".concat(t,"_zerobased")]})),g=r["".concat(a,"_inverted")],p=i.hasDataLabel()&&r.axis_rotated,v=i.hasDataLabel()&&!r.axis_rotated;l=ps(c)?c:ps(u)?l<u?l:u-10:l,f=ps(u)?u:ps(c)?c<f?f:c+10:f,isNaN(l)&&(l=0),isNaN(f)&&(f=l),l===f&&(l<0?f=0:l=0);var y=l>=0&&f>=0,x=l<=0&&f<=0;(ps(c)&&y||ps(u)&&x)&&(d=!1),d&&(y&&(l=0),x&&(f=0));var _=Math.abs(f-l),m={top:.1*_,bottom:.1*_};if(ms(h)){var b=Math.max(Math.abs(l),Math.abs(f));f=h+b,l=h-b}if(p){var w=As(i.y.range()),T=i.getDataLabelLength(l,f,"width").map((function(t){return t/w}));["bottom","top"].forEach((function(t,e){m[t]+=_*(T[e]/(1-T[0]-T[1]))}))}else if(v){var A=i.getDataLabelLength(l,f,"height");["bottom","top"].forEach((function(t,e){m[t]+=i.axis.convertPixelsToAxisPadding(A[e],_)}))}var S=r["".concat(a,"_padding")];Ms(S)&&["bottom","top"].forEach((function(t){m[t]=i.axis.getPadding(S,t,m[t],_)})),d&&(y&&(m.bottom=l),x&&(m.top=-f));var k=[l-m.bottom,f+m.top];return g?k.reverse():k},getXDomainMinMax:function(t,e){var n=this.config["axis_x_".concat(e)],i=Gs(e,t.map((function(t){return Gs(e,t.values.map((function(t){return t.x})))}))),r=Cs(n)?n.value:n;return r=ms(r)&&this.isTimeSeries()?this.parseDate(r):r,Cs(n)&&n.fit&&("min"===e&&r<i||"max"===e&&r>i)&&(r=void 0),ms(r)?r:i},getXDomainMin:function(t){return this.getXDomainMinMax(t,"min")},getXDomainMax:function(t){return this.getXDomainMinMax(t,"max")},getXDomainPadding:function(t){var e,n,i=this.config,r=t[1]-t[0],a=i.axis_x_padding;this.isCategorized()?n=0:this.hasType("bar")?n=(e=this.getMaxDataCount())>1?r/(e-1)/2:.5:n=.01*r;var o=n,s=n;return Cs(a)&&Ms(a)?(o=ps(a.left)?a.left:n,s=ps(a.right)?a.right:n):xs(i.axis_x_padding)&&(o=a,s=a),{left:o,right:s}},getXDomain:function(t){var e=this,n=[e.getXDomainMin(t),e.getXDomainMax(t)],i=r(n,2),a=i[0],o=i[1],s=e.getXDomainPadding(n),c=0,u=0;return a-o!=0||e.isCategorized()||(e.isTimeSeries()?(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=e.isTimeSeries()?new Date(a.getTime()-s.left):a-s.left),(o||0===o)&&(u=e.isTimeSeries()?new Date(o.getTime()+s.right):o+s.right),[c,u]},updateXDomain:function(t,e,n,i,r){var a=this,o=a.config.zoom_enabled;if(n&&(a.x.domain(r||Ws(a.getXDomain(t))),a.orgXDomain=a.x.domain(),o&&a.zoom.updateScaleExtent(),a.subX.domain(a.x.domain()),a.brush&&a.brush.scale(a.subX)),e){var s=r||!a.brush||Ns(a)?a.orgXDomain:Ps(a).map(a.subX.invert);a.x.domain(s),o&&a.zoom.updateScaleExtent()}return i&&a.x.domain(a.trimXDomain(a.x.orgDomain())),a.x.domain()},trimXDomain:function(t){var e=r(this.getZoomDomain(),2),n=e[0],i=e[1];return t[0]<=n&&(t[1]=+t[1]+(n-t[0]),t[0]=n),i<=t[1]&&(t[0]=+t[0]-(t[1]-i),t[1]=i),t}}),Xs(nc.prototype,{isX:function(t){var e,n,i,r=this.config,a=r.data_x&&t===r.data_x,o=Ms(r.data_xs)&&(e=r.data_xs,n=t,i=!1,Object.keys(e).forEach((function(t){return e[t]===n&&(i=!0)})),i);return a||o},isNotX:function(t){return!this.isX(t)},isStackNormalized:function(){var t=this.config;return t.data_stack_normalize&&t.data_groups.length},isGrouped:function(t){return this.config.data_groups.map((function(e){return e.indexOf(t)>=0}))[0]},getXKey:function(t){var e=this.config;return e.data_x?e.data_x:Ms(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n,i=this;return(e&&Ms(e)?i.mapToIds(e):[]).forEach((function(e){i.getXKey(e)===t&&(n=i.data.xs[e])})),n},getIndexByX:function(t,e){return e?e.indexOf(ys(t)?t:+t):(this.filterByX(this.data.targets,t)[0]||{index:null}).index},getXValue:function(t,e){return t in this.data.xs&&this.data.xs[t]&&ps(this.data.xs[t][e])?this.data.xs[t][e]:e},getOtherTargetXs:function(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function(t){var e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs:function(t){var e=this;Object.keys(t).forEach((function(n){e.config.data_xs[n]=t[n]}))},isMultipleX:function(){return Ms(this.config.data_xs)||!this.config.data_xSort||this.hasType("bubble")||this.hasType("scatter")},addName:function(t){var e;return t&&(e=this.config.data_names[t.id],t.name=void 0===e?t.id:e),t},getAllValuesOnIndex:function(t){var e=this;return e.filterTargetsToShow(e.data.targets).map((function(n){return e.addName(e.getValueOnIndex(n.values,t))}))},getValueOnIndex:function(t,e){var n=t.filter((function(t){return t.index===e}));return n.length?n[0]:null},updateTargetX:function(t,e){var n=this;t.forEach((function(t){t.values.forEach((function(i,r){i.x=n.generateTargetX(e[r],t.id,r)})),n.data.xs[t.id]=e}))},updateTargetXs:function(t,e){var n=this;t.forEach((function(t){e[t.id]&&n.updateTargetX([t],e[t.id])}))},generateTargetX:function(t,e,n){var i=this,r=i.isCategorized()?n:t||n;return i.isTimeSeries()?r=t?i.parseDate(t):i.parseDate(i.getXValue(e,n)):i.isCustomX()&&!i.isCategorized()&&(r=ps(t)?+t:i.getXValue(e,n)),r},cloneTarget:function(t){return{id:t.id,id_org:t.id_org,values:t.values.map((function(t){return{x:t.x,value:t.value,id:t.id}}))}},updateXs:function(t){t.length&&(this.xs=t.map((function(t){return t.x})))},getPrevX:function(t){var e=this.xs[t-1];return ms(e)?e:null},getNextX:function(t){var e=this.xs[t+1];return ms(e)?e:null},getBaseValue:function(t){var e=t.value;return e&&(this.isAreaRangeType(t)?e=this.getAreaRangeData(t,"mid"):this.isBubbleZType(t)&&(e=this.getBubbleZData(e,"y"))),e},getMinMaxValue:function(t){var e,n,i=this.getBaseValue.bind(this);return(t||this.data.targets.map((function(t){return t.values}))).forEach((function(t,r){var a=t.map(i).filter(xs);e=Math.min.apply(Math,[r?e:1/0].concat(Xa(a))),n=Math.max.apply(Math,[r?n:-1/0].concat(Xa(a)))})),{min:e,max:n}},getMinMaxData:function(){var t=this,e=t.getCache("$minMaxData");if(!e){var n=t.data.targets.map((function(t){return t.values})),i=t.getMinMaxValue(n),r=[],a=[];n.forEach((function(e){var n=t.getFilteredDataByValue(e,i.min),o=t.getFilteredDataByValue(e,i.max);n.length&&(r=r.concat(n)),o.length&&(a=a.concat(o))})),t.addCache("$minMaxData",e={min:r,max:a})}return e},getTotalPerIndex:function(){var t=this.getCache("$totalPerIndex");return this.isStackNormalized()&&!t&&(t=[],this.data.targets.forEach((function(e){e.values.forEach((function(e,n){t[n]||(t[n]=0),t[n]+=xs(e.value)?e.value:0}))}))),t},getTotalDataSum:function(){var t=this.getCache("$totalDataSum");if(!t){var e=Vs(this.data.targets.map((function(t){return t.values}))).map((function(t){return t.value})).reduce((function(t,e){return t+e}));this.addCache("$totalDataSum",t=e)}return t},getFilteredDataByValue:function(t,e){var n=this;return t.filter((function(t){return n.getBaseValue(t)===e}))},getMaxDataCount:function(){return Math.max.apply(Math,Xa(this.data.targets.map((function(t){return t.values.length}))))},getMaxDataCountTarget:function(){var t=this.filterTargetsToShow()||[],e=t.length;return e>1?(t=t.map((function(t){return t.values})).reduce((function(t,e){return t.concat(e)})).map((function(t){return t.x})),t=Ws(Us(t)).map((function(t,e){return{x:t,index:e}}))):e&&(t=t[0].values),t},mapToIds:function(t){return t.map((function(t){return t.id}))},mapToTargetIds:function(t){return t?Es(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function(t,e){for(var n,i=this.mapToIds(t),r=0;n=i[r];r++)if(n===e)return!0;return!1},isTargetToShow:function(t){return this.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function(t){return this.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function(t){var e=this;return(t||e.data.targets).filter((function(t){return e.isTargetToShow(t.id)}))},mapTargetsToUniqueXs:function(t){var e=[];return t&&t.length&&(e=Us(Vs(t.map((function(t){return t.values.map((function(t){return+t.x}))})))),e=this.isTimeSeries()?e.map((function(t){return new Date(+t)})):e.map((function(t){return+t}))),Ws(e)},addHiddenTargetIds:function(t){this.hiddenTargetIds=this.hiddenTargetIds.concat(t)},removeHiddenTargetIds:function(t){this.hiddenTargetIds=this.hiddenTargetIds.filter((function(e){return t.indexOf(e)<0}))},addHiddenLegendIds:function(t){this.hiddenLegendIds=this.hiddenLegendIds.concat(t)},removeHiddenLegendIds:function(t){this.hiddenLegendIds=this.hiddenLegendIds.filter((function(e){return t.indexOf(e)<0}))},getValuesAsIdKeyed:function(t){var e=this,n={},i=e.isMultipleX(),r=i?e.mapTargetsToUniqueXs(t).map((function(t){return ys(t)?t:+t})):null;return t.forEach((function(t){var a=[];t.values.forEach((function(t){var n=t.value;Es(n)?a.push.apply(a,Xa(n)):Cs(n)&&"high"in n?a.push.apply(a,Xa(Object.values(n))):e.isBubbleZType(t)?a.push(e.getBubbleZData(n,"y")):i?a[e.getIndexByX(t.x,r)]=n:a.push(n)})),n[t.id]=a})),n},checkValueInTargets:function(t,e){for(var n,i=Object.keys(t),r=0;r<i.length;r++){n=t[i[r]].values;for(var a=0;a<n.length;a++)if(e(n[a].value))return!0}return!1},hasMultiTargets:function(){return this.filterTargetsToShow().length>1},hasNegativeValueInTargets:function(t){return this.checkValueInTargets(t,(function(t){return t<0}))},hasPositiveValueInTargets:function(t){return this.checkValueInTargets(t,(function(t){return t>0}))},_checkOrder:function(t){var e=this.config.data_order;return ys(e)&&e.toLowerCase()===t},isOrderDesc:function(){return this._checkOrder("desc")},isOrderAsc:function(){return this._checkOrder("asc")},orderTargets:function(t){var e=this.config,n=Xa(t),i=this.isOrderAsc(),r=this.isOrderDesc();return i||r?n.sort((function(t,e){var n=function(t,e){return t+Math.abs(e.value)},r=t.values.reduce(n,0),a=e.values.reduce(n,0);return i?a-r:r-a})):vs(e.data_order)&&n.sort(e.data_order),n},filterByX:function(t,e){return Vs(t.map((function(t){return t.values}))).filter((function(t){return t.x-e==0}))},filterRemoveNull:function(t){var e=this;return t.filter((function(t){return ps(e.getBaseValue(t))}))},filterByXDomain:function(t,e){return t.map((function(t){return{id:t.id,id_org:t.id_org,values:t.values.filter((function(t){return e[0]<=t.x&&t.x<=e[1]}))}}))},hasDataLabel:function(){var t=this.config.data_labels;return bs(t)&&t||Ss(t)&&Ms(t)},getDataLabelLength:function(t,e,n){var i=this,r=[0,0];return i.selectChart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text((function(t){return i.dataLabelFormat(t.id)(t)})).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){var n,i=t[e].x,r=[];for(n=e-1;n>=0&&i===t[n].x;n--)r.push(t[n]);for(n=e;n<t.length&&i===t[n].x;n++)r.push(t[n]);return r},findClosestFromTargets:function(t,e){var n=this,i=t.map((function(t){return n.findClosest(t.values,e)}));return n.findClosest(i,e)},findClosest:function(t,e){var n,i=this,r=t.filter((function(t){return t&&ps(t.value)})),a=i.config.point_sensitivity;return r.filter((function(t){return i.isBarType(t.id)})).forEach((function(t){var e=i.main.select(".".concat(Eo.bars).concat(i.getTargetSelectorSuffix(t.id)," .").concat(Eo.bar,"-").concat(t.index)).node();!n&&i.isWithinBar(e)&&(n=t)})),r.filter((function(t){return!i.isBarType(t.id)})).forEach((function(t){var r=i.dist(t,e);r<a&&(a=r,n=t)})),n},dist:function(t,e){var n=this.config.axis_rotated,i=n?1:0,r=n?0:1,a=this.circleY(t,t.index),o=(this.zoomScale||this.x)(t.x);return Math.sqrt(Math.pow(o-e[i],2)+Math.pow(a-e[r],2))},convertValuesToStep:function(t){var e=this.config,n=e.axis_rotated,i=e.line_step_type,r=this.isCategorized(),a=Es(t)?t.concat():[t];if(!n&&!r)return t;var o=a[0].id,s=a[0].x-1,c=a[0].value;return r&&a.unshift({x:s,value:c,id:o}),"step-after"===i&&a.unshift({x:s-1,value:c,id:o}),c=a[(s=a.length)-1].value,r&&a.push({x:s,value:c,id:o}),"step-before"===i&&a.push({x:s+1,value:c,id:o}),a},convertValuesToRange:function(t){var e=Es(t)?t.concat():[t],n=[];return e.forEach((function(t){var e=t.x,i=t.id;n.push({x:e,id:i,value:t.value[0]}),n.push({x:e,id:i,value:t.value[2]})})),n},updateDataAttributes:function(t,e){var n=this.config["data_".concat(t)];return _s(e)||(Object.keys(e).forEach((function(t){n[t]=e[t]})),this.redraw({withLegend:!0})),n},getAreaRangeData:function(t,e){var n=t.value;if(Es(n)){var i=["high","mid","low"].indexOf(e);return-1===i?null:n[i]}return n[e]},getRatio:function(t,e,n){var i=this,r=i.config,a=i.api,o=0;if(e&&a.data.shown.call(a).length){var s=a.data.values.bind(a);if(o=e.ratio||e.value,"arc"===t)if(i.pie.padAngle()()){var c=i.getTotalDataSum();i.hiddenTargetIds.length&&(c-=s(i.hiddenTargetIds).reduce((function(t,e){return t+e}))),o=e.value/c}else o=(e.endAngle-e.startAngle)/(Math.PI*(i.hasType("gauge")&&!r.gauge_fullCircle?1:2));else if("index"===t){var u=this.getTotalPerIndex();if(i.hiddenTargetIds.length){var l=s(i.hiddenTargetIds,!1);l.length&&(l=l.reduce((function(t,e){return t.map((function(t,n){return(xs(t)?t:0)+e[n]}))})),u=u.map((function(t,e){return t-l[e]})))}e.ratio=xs(e.value)&&u&&u[e.index]>0?e.value/u[e.index]:0,o=e.ratio}else"radar"===t&&(o=parseFloat(Math.max(e.value,0))/i.maxValue*r.radar_size_ratio)}return n&&o?100*o:o},updateDataIndexByX:function(t){var e=t.reduce((function(t,e,n){return t[+e.x]=n,t}),{});this.data.targets.forEach((function(t){t.values.forEach((function(t,n){var i=e[+t.x];void 0===i&&(i=n),t.index=i}))}))}});var ac={},oc={};function sc(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function cc(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var i in t)i in e||n.push(e[i]=i)})),n}function uc(t,e){var n=t+"",i=n.length;return i<e?Array(e-i+1).join(0)+n:n}function lc(t){var e,n=t.getUTCHours(),i=t.getUTCMinutes(),r=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+uc(-e,6):e>9999?"+"+uc(e,6):uc(e,4))+"-"+uc(t.getUTCMonth()+1,2)+"-"+uc(t.getUTCDate(),2)+(a?"T"+uc(n,2)+":"+uc(i,2)+":"+uc(r,2)+"."+uc(a,3)+"Z":r?"T"+uc(n,2)+":"+uc(i,2)+":"+uc(r,2)+"Z":i||n?"T"+uc(n,2)+":"+uc(i,2)+"Z":"")}var fc=function(t){function e(t,e){function n(){if(u)return oc;if(l)return l=!1,ac;var e,n,i=s;if(34===t.charCodeAt(i)){for(;s++<a&&34!==t.charCodeAt(s)||34===t.charCodeAt(++s););return(e=s)>=a?u=!0:10===(n=t.charCodeAt(s++))?l=!0:13===n&&(l=!0,10===t.charCodeAt(s)&&++s),t.slice(i+1,e-1).replace(/""/g,'"')}for(;s<a;){if(10===(n=t.charCodeAt(e=s++)))l=!0;else if(13===n)l=!0,10===t.charCodeAt(s)&&++s;else if(n!==o)continue;return t.slice(i,e)}return u=!0,t.slice(i,a)}var i,r=[],a=t.length,s=0,c=0,u=a<=0,l=!1;for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(i=n())!==oc;){for(var f=[];i!==ac&&i!==oc;)f.push(i),i=n();e&&null==(f=e(f,c++))||r.push(f)}return r}function n(e,n){return e.map((function(e){return n.map((function(t){return r(e[t])})).join(t)}))}function i(e){return e.map(r).join(t)}function r(t){return null==t?"":t instanceof Date?lc(t):a.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}var a=new RegExp('["'+t+"\n\r]"),o=t.charCodeAt(0);return{parse:function(t,n){var i,r,a=e(t,(function(t,e){return i?i(t,e-1):(r=t,void(i=n?function(t,e){var n=sc(t);return function(i,r){return e(n(i),r,t)}}(t,n):sc(t)))}));return a.columns=r||[],a},parseRows:e,format:function(e,i){return null==i&&(i=cc(e)),[i.map(r).join(t)].concat(n(e,i)).join("\n")},formatBody:function(t,e){return null==e&&(e=cc(t)),n(t,e).join("\n")},formatRows:function(t){return t.map(i).join("\n")},formatRow:i,formatValue:r}},hc=fc(","),dc=hc.parse,gc=hc.parseRows,pc=(hc.format,hc.formatBody,hc.formatRows,hc.formatRow,hc.formatValue,fc("\t")),vc=pc.parse,yc=pc.parseRows;pc.format,pc.formatBody,pc.formatRows,pc.formatRow,pc.formatValue;new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var xc=function(t,e){var n,i=t.rows(e);return 1===i.length?(n=[{}],i[0].forEach((function(t){n[0][t]=null}))):n=t.parse(e),n};Xs(nc.prototype,{convertData:function(t,e){var n;if(t.bindto?(n={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach((function(e){var i="data_".concat(e);i in t&&(n[e]=t[i])}))):n=t,n.url&&e)this.convertUrlToData(n.url,n.mimeType,n.headers,n.keys,e);else if(n.json)n=this.convertJsonToData(n.json,n.keys);else if(n.rows)n=this.convertRowsToData(n.rows);else if(n.columns)n=this.convertColumnsToData(n.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.");return Es(n)&&n},convertUrlToData:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"csv",i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,o=new XMLHttpRequest;o.open("GET",t),i&&Object.keys(i).forEach((function(t){o.setRequestHeader(t,i[t])})),o.onreadystatechange=function(){if(4===o.readyState){if(200!==o.status)throw new Error("".concat(t,": Something went wrong loading!"));var i=o.responseText;i&&a.call(e,e["convert".concat(Bs(n),"ToData")]("json"===n?JSON.parse(i):i,r))}},o.send()},convertCsvToData:function(t){return xc({rows:gc,parse:dc},t)},convertTsvToData:function(t){return xc({rows:yc,parse:vc},t)},convertJsonToData:function(t,e){var n,i,r=this,a=this.config,o=[];if(Es(t)){var s=e||a.data_keys;s.x?(n=s.value.concat(s.x),a.data_x=s.x):n=s.value,o.push(n),t.forEach((function(t){var e=n.map((function(e){var n=r.findValueInJson(t,e);return _s(n)&&(n=null),n}));o.push(e)})),i=this.convertRowsToData(o)}else Object.keys(t).forEach((function(e){var n=t[e].concat();n.unshift(e),o.push(n)})),i=this.convertColumnsToData(o);return i},findValueInJson:function(t,e){if(void 0!==t[e])return t[e];var n=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),i=t;return n.some((function(t){return!(i=i&&t in i?i[t]:void 0)})),i},convertRowsToData:function(t){var e=t[0],n=[];return t.forEach((function(t,i){if(i>0){var r={};t.forEach((function(t,n){if(_s(t))throw new Error("Source data is missing a component at (".concat(i,", ").concat(n,")!"));r[e[n]]=t})),n.push(r)}})),n},convertColumnsToData:function(t){var e=[];return t.forEach((function(t,n){var i=t[0];t.forEach((function(t,r){if(r>0){if(_s(e[r-1])&&(e[r-1]={}),_s(t))throw new Error("Source data is missing a component at (".concat(n,", ").concat(r,")!"));e[r-1][i]=t}}))})),e},convertDataToTargets:function(t,e){var n,i=this,r=this,a=r.config,o=r.isTimeSeries(),s=Object.keys(t[0]||{}),c=s.length?s.filter(r.isNotX,r):[],u=s.length?s.filter(r.isX,r):[];c.forEach((function(s){var c=i.getXKey(s);i.isCustomX()||o?u.indexOf(c)>=0?n=(e&&r.data.xs[s]||[]).concat(t.map((function(t){return t[c]})).filter(ps).map((function(t,e){return r.generateTargetX(t,s,e)}))):a.data_x?n=i.getOtherTargetXs():Ms(a.data_xs)&&(n=r.getXValuesOfXKey(c,r.data.targets)):n=t.map((function(t,e){return e})),n&&(i.data.xs[s]=n)})),c.forEach((function(t){if(!i.data.xs[t])throw new Error('x is not defined for id = "'.concat(t,'".'))}));var l=c.map((function(e,n){var i=a.data_idConverter(e),o=r.getXKey(e),s=r.isCustomX()&&r.isCategorized(),c=s&&t.map((function(t){return t.x})).every((function(t){return a.axis_x_categories.indexOf(t)>-1}));return{id:i,id_org:e,values:t.map((function(t,u){var l,f=t[o],h=t[e];return h=null===h||isNaN(h)||Cs(h)?Es(h)||Cs(h)?h:null:+h,s&&0===n&&!_s(f)?(!c&&0===n&&0===u&&(a.axis_x_categories=[]),-1===(l=a.axis_x_categories.indexOf(f))&&(l=a.axis_x_categories.length,a.axis_x_categories.push(f))):l=r.generateTargetX(f,e,u),(_s(h)||r.data.xs[e].length<=u)&&(l=void 0),{x:l,value:h,id:i}})).filter((function(t){return ms(t.x)}))}}));return l.forEach((function(t){a.data_xSort&&(t.values=t.values.sort((function(t,e){return(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)}))),t.values.forEach((function(t,e){return t.index=e})),r.data.xs[t.id].sort((function(t,e){return t-e}))})),r.hasNegativeValue=r.hasNegativeValueInTargets(l),r.hasPositiveValue=r.hasPositiveValueInTargets(l),a.data_type&&r.setTargetType(r.mapToIds(l).filter((function(t){return!(t in a.data_types)})),a.data_type),l.forEach((function(t){return r.addCache(t.id_org,t,!0)})),l}}),Xs(nc.prototype,{load:function(t,e){var n=this,i=t;i&&(e.filter&&(i=i.filter(e.filter)),(e.type||e.types)&&i.forEach((function(t){var i=e.types&&e.types[t.id]||e.type;n.setTargetType(t.id,i)})),n.data.targets.forEach((function(t){for(var e=0;e<i.length;e++)if(t.id===i[e].id){t.values=i[e].values,i.splice(e,1);break}})),n.data.targets=n.data.targets.concat(i)),n.updateTargets(n.data.targets),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.done&&e.done()},loadFromArgs:function(t){var e=this;if(e.config){e.resetCache();var n=t.data||e.convertData(t,(function(n){return e.load(e.convertDataToTargets(n),t)}));n&&e.load(e.convertDataToTargets(n),t)}},unload:function(t,e){var n=this,i=e,r=t;return n.resetCache(),i||(i=function(){}),(r=r.filter((function(t){return n.hasTarget(n.data.targets,t)})))&&0!==r.length?(n.svg.selectAll(r.map((function(t){return n.selectorTarget(t)}))).transition().style("opacity","0").remove().call(n.endall,i),void r.forEach((function(t){n.withoutFadeIn[t]=!1,n.legend&&n.legend.selectAll(".".concat(Eo.legendItem).concat(n.getTargetSelectorSuffix(t))).remove(),n.data.targets=n.data.targets.filter((function(e){return e.id!==t}))}))):void i()}}),Xs(nc.prototype,{categoryName:function(t){var e=this.config;return t<e.axis_x_categories.length?e.axis_x_categories[t]:t}}),Xs(nc.prototype,{initEventRect:function(){this.main.select(".".concat(Eo.chart)).append("g").attr("class",Eo.eventRects).style("fill-opacity","0")},redrawEventRect:function(){var t,e=this,n=e.config,i=e.isMultipleX(),r=n.zoom_enabled,a=e.main.select(".".concat(Eo.eventRects)).style("cursor",r&&"drag"!==r.type?n.axis_rotated?"ns-resize":"ew-resize":null).classed(Eo.eventRectsMultiple,i).classed(Eo.eventRectsSingle,!i);if(a.selectAll(".".concat(Eo.eventRect)).remove(),e.eventRect=a.selectAll(".".concat(Eo.eventRect)),i)t=e.eventRect.data([0]),t=e.generateEventRectsForMultipleXs(t.enter()).merge(t);else{var o=e.getMaxDataCountTarget();e.updateDataIndexByX(o),e.updateXs(o),e.updatePointClass(!0),a.datum(o),e.eventRect=a.selectAll(".".concat(Eo.eventRect)),(t=e.eventRect.data((function(t){return t}))).exit().remove(),t=e.generateEventRectsForSingleX(t.enter()).merge(t)}e.eventRect=t,e.updateEventRect(t),"touch"!==e.inputType||e.svg.on("touchstart.eventRect")||e.hasArcType()||e.bindTouchOnEventRect(i)},bindTouchOnEventRect:function(t){var e,n=this,i=n.config,r=function(){var t=ln.changedTouches[0];return An(gs.elementFromPoint(t.clientX,t.clientY))},a=function(e){if(t)n.selectRectForMultipleXs(e);else{var i=r(),a=function(t){var e=t&&t.attr("class")&&1*t.attr("class").replace(new RegExp("(".concat(Eo.eventRect,"-?|s)"),"g"),"");return(isNaN(e)||null===e)&&(e=-1),e}(i);n.callOverOutForTouch(a),-1===a?n.unselectRect():n.selectRectForSingle(e,i,a)}},o=i.interaction_inputType_touch.preventDefault,s=bs(o)&&o||!1,c=!isNaN(o)&&o||null;n.svg.on("touchstart.eventRect touchmove.eventRect",(function(){var t=r(),o=ln;if(!t.empty()&&t.classed(Eo.eventRect)){if(n.dragging||n.flowing||n.hasArcType()||o.touches.length>1)return;(function(t){var n=t.type,r=t.changedTouches[0]["client".concat(i.axis_rotated?"Y":"X")];"touchstart"===n?s?t.preventDefault():null!==c&&(e=r):"touchmove"===n&&(s||!0===e||null!==c&&Math.abs(e-r)>=c)&&(e=!0,t.preventDefault())})(o),a(this)}else n.unselectRect(),n.callOverOutForTouch()}),!0).on("touchend.eventRect",(function(){var t=r();!t.empty()&&t.classed(Eo.eventRect)&&(n.hasArcType()||!n.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)}),!0)},updateEventRect:function(t){var e,n,i,r,a=this,o=a.config,s=a.zoomScale||a.x,c=t||a.eventRect.data(),u=o.axis_rotated;if(a.isMultipleX())e=0,n=0,i=a.width,r=a.height;else{var l,f;if(a.isCategorized())l=a.getEventRectWidth(),f=function(t){return s(t.x)-l/2};else{var h=function(t){var e=t.index;return{prev:a.getPrevX(e),next:a.getNextX(e)}};l=function(t){var e=h(t);return null===e.prev&&null===e.next?u?a.height:a.width:(null===e.prev&&(e.prev=s.domain()[0]),null===e.next&&(e.next=s.domain()[1]),Math.max(0,(s(e.next)-s(e.prev))/2))},f=function(t){var e=h(t),n=t.x;return null===e.prev&&null===e.next?0:(null===e.prev&&(e.prev=s.domain()[0]),(s(n)+s(e.prev))/2)}}e=u?0:f,n=u?f:0,i=u?a.width:l,r=u?l:a.height}c.attr("class",a.classEvent.bind(a)).attr("x",e).attr("y",n).attr("width",i).attr("height",r)},selectRectForSingle:function(t,e,n){var i=this,r=i.config,a=r.data_selection_enabled,o=r.data_selection_grouped,s=r.tooltip_grouped,c=i.getAllValuesOnIndex(n);s&&(i.showTooltip(c,t),i.showGridFocus(c),!a||o)||i.main.selectAll(".".concat(Eo.shape,"-").concat(n)).each((function(){An(this).classed(Eo.EXPANDED,!0),a&&e.style("cursor",o?"pointer":null),s||(i.hideGridFocus(),i.hideTooltip(),!o&&i.expandCirclesBars(n))})).filter((function(t){return i.isWithinShape(this,t)})).call((function(c){var u=c.data();a&&(o||r.data_selection_isselectable(u))&&e.style("cursor","pointer"),s||(i.showTooltip(u,t),i.showGridFocus(u),i.unexpandCircles(),c.each((function(t){return i.expandCirclesBars(n,t.id)})))}))},expandCirclesBars:function(t,e,n){this.config.point_focus_expand_enabled&&this.expandCircles(t,e,n),this.expandBars(t,e,n)},selectRectForMultipleXs:function(t){var e=this,n=e.config,i=e.filterTargetsToShow(e.data.targets);if(!e.dragging&&!e.hasArcType(i)){var r=Cn(t),a=e.findClosestFromTargets(i,r);if(e.mouseover&&(!a||a.id!==e.mouseover.id)&&(n.data_onout.call(e.api,e.mouseover),e.mouseover=void 0),!a)return void e.unselectRect();var o=(e.isBubbleType(a)||e.isScatterType(a)||!n.tooltip_grouped?[a]:e.filterByX(i,a.x)).map((function(t){return e.addName(t)}));e.showTooltip(o,t),e.expandCirclesBars(a.index,a.id,!0),e.showGridFocus(o),(e.isBarType(a.id)||e.dist(a,r)<n.point_sensitivity)&&(e.svg.select(".".concat(Eo.eventRect)).style("cursor","pointer"),!e.mouseover&&(n.data_onover.call(e.api,a),e.mouseover=a))}},unselectRect:function(){var t=this;t.svg.select(".".concat(Eo.eventRect)).style("cursor",null),t.hideGridFocus(),t.hideTooltip(),t._handleLinkedCharts(!1),t.unexpandCircles(),t.unexpandBars()},setOverOut:function(t,e){var n=this,i=n.config,r=Cs(e);if(r||-1!==e){var a=i[t?"data_onover":"data_onout"].bind(n.api);if(i.color_onover&&n.setOverColor(t,e,r),r)a(e,n.main.select(".".concat(Eo.arc).concat(n.getTargetSelectorSuffix(e.id))).node());else if(i.tooltip_grouped)t&&n.expandCirclesBars(e,null,!0),n.isMultipleX()||n.main.selectAll(".".concat(Eo.shape,"-").concat(e)).each((function(t){a(t,this)}));else{var o=n.setOverOut,s=o.last||[],c=n.main.selectAll(".".concat(Eo.shape,"-").concat(e)).filter((function(t){return n.isWithinShape(this,t)}));c.each((function(t){var e=this;(0===s.length||s.every((function(t){return t!==e})))&&(a(t,this),s.push(this))})),s.length>0&&c.empty()&&(a=i.data_onout.bind(n.api),s.forEach((function(t){return a(An(t).datum(),t)})),s=[]),o.last=s}}},callOverOutForTouch:function(t){var e=this.callOverOutForTouch,n=e.last;(Cs(t)&&n?t.id!==n.id:t!==n)&&((n||xs(n))&&this.setOverOut(!1,n),(t||xs(t))&&this.setOverOut(!0,t),e.last=t)},getDraggableSelection:function(){var t=this,e=t.config;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?Xo().on("drag",(function(){t.drag(Cn(this))})).on("start",(function(){t.dragstart(Cn(this))})).on("end",(function(){t.dragend()})):function(){}},generateEventRectsForSingleX:function(t){var e=this,n=e.config,i=t.append("rect").attr("class",e.classEvent.bind(e)).style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",(function(t){e.clickHandlerForSingleX.bind(this)(t,e)})).call(e.getDraggableSelection());return"mouse"===e.inputType&&i.on("mouseover",(function(t){e.dragging||e.flowing||e.hasArcType()||e.config.tooltip_grouped&&e.setOverOut(!0,t.index)})).on("mousemove",(function(t){if(!(e.dragging||e.flowing||e.hasArcType())){var n=t.index,i=e.svg.select(".".concat(Eo.eventRect,"-").concat(n));e.isStepType(t)&&"step-after"===e.config.line_step_type&&Cn(this)[0]<e.x(e.getXValue(t.id,n))&&(n-=1),-1===n?e.unselectRect():e.selectRectForSingle(this,i,n),e.config.tooltip_grouped||e.setOverOut(-1!==n,t.index)}})).on("mouseout",(function(t){!e.config||e.hasArcType()||(e.unselectRect(),e.setOverOut(!1,t.index))})),i},clickHandlerForSingleX:function(t,e){var n=e,i=n.config;if(n.hasArcType()||!n.toggleShape||n.cancelClick)n.cancelClick&&(n.cancelClick=!1);else{var r=t.index;n.main.selectAll(".".concat(Eo.shape,"-").concat(r)).each((function(t){(i.data_selection_grouped||n.isWithinShape(this,t))&&(n.toggleShape(this,t,r),i.data_onclick.call(n.api,t,this))}))}},generateEventRectsForMultipleXs:function(t){var e=this,n=t.append("rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height).attr("class",Eo.eventRect).on("click",(function(){e.clickHandlerForMultipleXS.bind(this)(e)})).call(e.getDraggableSelection());return"mouse"===e.inputType&&n.on("mouseover mousemove",(function(){e.selectRectForMultipleXs(this)})).on("mouseout",(function(){!e.config||e.hasArcType()||e.unselectRect()})),n},clickHandlerForMultipleXS:function(t){var e=t,n=e.config,i=e.filterTargetsToShow(e.data.targets);if(!e.hasArcType(i)){var r=Cn(this),a=e.findClosestFromTargets(i,r);!a||(e.isBarType(a.id)||e.dist(a,r)<n.point_sensitivity)&&e.main.selectAll(".".concat(Eo.shapes).concat(e.getTargetSelectorSuffix(a.id))).selectAll(".".concat(Eo.shape,"-").concat(a.index)).each((function(){(n.data_selection_grouped||e.isWithinShape(this,a))&&(e.toggleShape(this,a,a.index),n.data_onclick.call(e.api,a,this))}))}},dispatchEvent:function(t,e,n){var i=this.isMultipleX(),r=".".concat(i?Eo.eventRect:"".concat(Eo.eventRect,"-").concat(e)),a=this.main.select(r).node(),o=a.getBoundingClientRect(),s=o.width,c=o.left,u=o.top,l=c+(n?n[0]:0)+(i||this.config.axis_rotated?0:s/2),f=u+(n?n[1]:0);$s[/^(mouse|click)/.test(t)?"mouse":"touch"](a,t,{screenX:l,screenY:f,clientX:l,clientY:f})}}),Xs(nc.prototype,{setContainerSize:function(){this.currentWidth=this.getCurrentWidth(),this.currentHeight=this.getCurrentHeight()},getCurrentWidth:function(){return this.config.size_width||this.getParentWidth()},getCurrentHeight:function(){var t=this.config,e=t.size_height||this.getParentHeight();return e>0?e:320/(this.hasType("gauge")&&!t.gauge_fullCircle?2:1)},getAxisSize:function(t){var e=this.config.axis_rotated;return e&&"x"===t||!e&&/y2?/.test(t)?this.getAxisWidthByAxisId(t,!0):this.getHorizontalAxisHeight(t)},getCurrentPaddingTop:function(){var t=this,e=t.config,n=e.axis_y2_axes.length,i=ps(e.padding_top)?e.padding_top:0;return t.title&&t.title.node()&&(i+=t.getTitlePadding()),n&&e.axis_rotated&&(i+=t.getHorizontalAxisHeight("y2")*n),i},getCurrentPaddingBottom:function(){var t=this.config,e=t.axis_rotated?"y":"x",n=t["axis_".concat(e,"_axes")].length;return(ps(t.padding_bottom)?t.padding_bottom:0)+(n?this.getHorizontalAxisHeight(e)*n:0)},getCurrentPaddingLeft:function(t){var e=this.config,n=e.axis_rotated,i=n?"x":"y",r=e["axis_".concat(i,"_axes")].length,a=this.getAxisWidthByAxisId(i,t);return(ps(e.padding_left)?e.padding_left:n?e.axis_x_show?Math.max(ws(a),40):1:!e.axis_y_show||e.axis_y_inner?this.axis.getAxisLabelPosition("y").isOuter?30:1:ws(a))+a*r},getCurrentPaddingRight:function(){var t=!!(arguments.length>0&&void 0!==arguments[0])&&arguments[0],e=this,n=e.config,i=10,r=e.isLegendRight?e.getLegendWidth()+20:0,a=n.axis_y2_axes.length,o=e.getAxisWidthByAxisId("y2"),s=t?0:e.axis.getXAxisTickTextY2Overflow(i);return(ps(n.padding_right)?n.padding_right+1:n.axis_rotated?i+r:!n.axis_y2_show||n.axis_y2_inner?Math.max(2+r+(e.axis.getAxisLabelPosition("y2").isOuter?20:0),s):Math.max(ws(o)+r,s))+o*a},getParentRectValue:function(t){for(var e,n="offset".concat(Bs(t)),i=this.selectChart.node();!e&&i&&"BODY"!==i.tagName;){try{e=i.getBoundingClientRect()[t]}catch(t){n in i&&(e=i[n])}i=i.parentNode}if("width"===t){var r=gs.body.offsetWidth;e>r&&(e=r)}return e},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){var t=this.selectChart.style("height");return t.indexOf("px")>0?parseInt(t,10):0},getSvgLeft:function(t){var e=this,n=e.config,i=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,r=n.axis_rotated?Eo.axisX:Eo.axisY,a=e.main.select(".".concat(r)).node(),o=a&&i?a.getBoundingClientRect():{right:0},s=e.selectChart.node().getBoundingClientRect(),c=e.hasArcType(),u=o.right-s.left-(c?0:e.getCurrentPaddingLeft(t));return u>0?u:0},getAxisWidthByAxisId:function(t,e){var n=this.axis.getLabelPositionById(t);return this.axis.getMaxTickWidth(t,e)+(n.isInner?20:40)},getHorizontalAxisHeight:function(t){var e=this,n=e.config,i=n.axis_rotated,r=30;if("x"===t&&!n.axis_x_show)return 8;if("x"===t&&n.axis_x_height)return n.axis_x_height;if("y"===t&&!n.axis_y_show)return!n.legend_show||e.isLegendRight||e.isLegendInset?1:10;if("y2"===t&&!n.axis_y2_show)return e.rotated_padding_top;var a=e.getAxisTickRotate(t);return("x"===t&&!i||/y2?/.test(t)&&i)&&a&&(r=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-a)/180),!n.axis_x_tick_multiline&&e.currentHeight&&r>e.currentHeight/2&&(r=e.currentHeight/2)),r+(e.axis.getLabelPositionById(t).isInner?0:10)+("y2"!==t||i?0:-10)},getEventRectWidth:function(){return Math.max(0,this.xAxis.tickInterval())},getAxisTickRotate:function(t){var e=this,n=e.config,i=n["axis_".concat(t,"_tick_rotate")];if("x"===t){var r=e.isCategorized(),a=e.isTimeSeries(),o=r||a,s=0;n.axis_x_tick_fit&&o&&(e.axis.x={padding:{left:0,right:0},tickCount:0},(s=e.currentMaxTickWidths.x.ticks.length+(a?-1:1))!==e.axis.x.tickCount&&(e.axis.x.padding=e.axis.getXAxisPadding(s)),e.axis.x.tickCount=s),e.svg&&n.axis_x_tick_fit&&!n.axis_x_tick_multiline&&!n.axis_x_tick_culling&&n.axis_x_tick_autorotate&&o&&(i=e.needToRotateXAxisTickTexts()?n.axis_x_tick_rotate:0)}return i},needToRotateXAxisTickTexts:function(){var t=this,e=t.currentWidth-t.getCurrentPaddingLeft(!1)-t.getCurrentPaddingRight(!0),n=t.axis.x.tickCount+t.axis.x.padding.left+t.axis.x.padding.right;return t.axis.getMaxTickWidth("x")>(e/n||0)}});var _c=Math.PI,mc=2*_c,bc=mc-1e-6;function wc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Tc(){return new wc}wc.prototype=Tc.prototype={constructor:wc,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+a)},arcTo:function(t,e,n,i,r){t=+t,e=+e,n=+n,i=+i,r=+r;var a=this._x1,o=this._y1,s=n-t,c=i-e,u=a-t,l=o-e,f=u*u+l*l;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(l*s-c*u)>1e-6&&r){var h=n-a,d=i-o,g=s*s+c*c,p=Math.sqrt(g),v=Math.sqrt(f),y=r*Math.tan((_c-Math.acos((g+f-(h*h+d*d))/(2*p*v)))/2),x=y/v,_=y/p;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*u)+","+(e+x*l)),this._+="A"+r+","+r+",0,0,"+ +(l*h>u*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,i,r,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(i),s=n*Math.sin(i),c=t+o,u=e+s,l=1^a,f=a?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+c+","+u),n&&(f<0&&(f=f%mc+mc),f>bc?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=_c)+","+l+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var Ac=Tc,Sc=function(t){return function(){return t}},kc=Math.abs,Mc=Math.atan2,Ec=Math.cos,Cc=Math.max,Lc=Math.min,Oc=Math.sin,Rc=Math.sqrt,Ic=Math.PI,Dc=Ic/2,Pc=2*Ic;function Fc(t){return t>1?0:t<-1?Ic:Math.acos(t)}function zc(t){return t>=1?Dc:t<=-1?-Dc:Math.asin(t)}function Nc(t){return t.innerRadius}function Xc(t){return t.outerRadius}function Bc(t){return t.startAngle}function jc(t){return t.endAngle}function Yc(t){return t&&t.padAngle}function Uc(t,e,n,i,r,a,o,s){var c=n-t,u=i-e,l=o-r,f=s-a,h=f*c-l*u;if(!(h*h<1e-12))return[t+(h=(l*(e-a)-f*(t-r))/h)*c,e+h*u]}function Vc(t,e,n,i,r,a,o){var s=t-n,c=e-i,u=(o?a:-a)/Rc(s*s+c*c),l=u*c,f=-u*s,h=t+l,d=e+f,g=n+l,p=i+f,v=(h+g)/2,y=(d+p)/2,x=g-h,_=p-d,m=x*x+_*_,b=r-a,w=h*p-g*d,T=(_<0?-1:1)*Rc(Cc(0,b*b*m-w*w)),A=(w*_-x*T)/m,S=(-w*x-_*T)/m,k=(w*_+x*T)/m,M=(-w*x+_*T)/m,E=A-v,C=S-y,L=k-v,O=M-y;return E*E+C*C>L*L+O*O&&(A=k,S=M),{cx:A,cy:S,x01:-l,y01:-f,x11:A*(r/b-1),y11:S*(r/b-1)}}var Hc=function(){function t(){var t,u,l=+e.apply(this,arguments),f=+n.apply(this,arguments),h=a.apply(this,arguments)-Dc,d=o.apply(this,arguments)-Dc,g=kc(d-h),p=d>h;if(c||(c=t=Ac()),f<l&&(u=f,f=l,l=u),f>1e-12)if(g>Pc-1e-12)c.moveTo(f*Ec(h),f*Oc(h)),c.arc(0,0,f,h,d,!p),l>1e-12&&(c.moveTo(l*Ec(d),l*Oc(d)),c.arc(0,0,l,d,h,p));else{var v,y,x=h,_=d,m=h,b=d,w=g,T=g,A=s.apply(this,arguments)/2,S=A>1e-12&&(r?+r.apply(this,arguments):Rc(l*l+f*f)),k=Lc(kc(f-l)/2,+i.apply(this,arguments)),M=k,E=k;if(S>1e-12){var C=zc(S/l*Oc(A)),L=zc(S/f*Oc(A));(w-=2*C)>1e-12?(m+=C*=p?1:-1,b-=C):(w=0,m=b=(h+d)/2),(T-=2*L)>1e-12?(x+=L*=p?1:-1,_-=L):(T=0,x=_=(h+d)/2)}var O=f*Ec(x),R=f*Oc(x),I=l*Ec(b),D=l*Oc(b);if(k>1e-12){var P,F=f*Ec(_),z=f*Oc(_),N=l*Ec(m),X=l*Oc(m);if(g<Ic&&(P=Uc(O,R,N,X,F,z,I,D))){var B=O-P[0],j=R-P[1],Y=F-P[0],U=z-P[1],V=1/Oc(Fc((B*Y+j*U)/(Rc(B*B+j*j)*Rc(Y*Y+U*U)))/2),H=Rc(P[0]*P[0]+P[1]*P[1]);M=Lc(k,(l-H)/(V-1)),E=Lc(k,(f-H)/(V+1))}}T>1e-12?E>1e-12?(v=Vc(N,X,O,R,f,E,p),y=Vc(F,z,I,D,f,E,p),c.moveTo(v.cx+v.x01,v.cy+v.y01),E<k?c.arc(v.cx,v.cy,E,Mc(v.y01,v.x01),Mc(y.y01,y.x01),!p):(c.arc(v.cx,v.cy,E,Mc(v.y01,v.x01),Mc(v.y11,v.x11),!p),c.arc(0,0,f,Mc(v.cy+v.y11,v.cx+v.x11),Mc(y.cy+y.y11,y.cx+y.x11),!p),c.arc(y.cx,y.cy,E,Mc(y.y11,y.x11),Mc(y.y01,y.x01),!p))):(c.moveTo(O,R),c.arc(0,0,f,x,_,!p)):c.moveTo(O,R),l>1e-12&&w>1e-12?M>1e-12?(v=Vc(I,D,F,z,l,-M,p),y=Vc(O,R,N,X,l,-M,p),c.lineTo(v.cx+v.x01,v.cy+v.y01),M<k?c.arc(v.cx,v.cy,M,Mc(v.y01,v.x01),Mc(y.y01,y.x01),!p):(c.arc(v.cx,v.cy,M,Mc(v.y01,v.x01),Mc(v.y11,v.x11),!p),c.arc(0,0,l,Mc(v.cy+v.y11,v.cx+v.x11),Mc(y.cy+y.y11,y.cx+y.x11),p),c.arc(y.cx,y.cy,M,Mc(y.y11,y.x11),Mc(y.y01,y.x01),!p))):c.arc(0,0,l,b,m,p):c.lineTo(I,D)}else c.moveTo(0,0);return c.closePath(),t?(c=null,t+""||null):void 0}var e=Nc,n=Xc,i=Sc(0),r=null,a=Bc,o=jc,s=Yc,c=null;return t.centroid=function(){var t=(+e.apply(this,arguments)+ +n.apply(this,arguments))/2,i=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Ic/2;return[Ec(i)*t,Oc(i)*t]},t.innerRadius=function(n){return arguments.length?(e="function"==typeof n?n:Sc(+n),t):e},t.outerRadius=function(e){return arguments.length?(n="function"==typeof e?e:Sc(+e),t):n},t.cornerRadius=function(e){return arguments.length?(i="function"==typeof e?e:Sc(+e),t):i},t.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Sc(+e),t):r},t.startAngle=function(e){return arguments.length?(a="function"==typeof e?e:Sc(+e),t):a},t.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:Sc(+e),t):o},t.padAngle=function(e){return arguments.length?(s="function"==typeof e?e:Sc(+e),t):s},t.context=function(e){return arguments.length?(c=null==e?null:e,t):c},t};function Wc(t){this._context=t}Wc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(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;default:this._context.lineTo(t,e)}}};var Gc=function(t){return new Wc(t)};function qc(t){return t[0]}function $c(t){return t[1]}var Zc=function(){function t(t){var s,c,u,l=t.length,f=!1;for(null==r&&(o=a(u=Ac())),s=0;s<=l;++s)!(s<l&&i(c=t[s],s,t))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(c,s,t),+n(c,s,t));if(u)return o=null,u+""||null}var e=qc,n=$c,i=Sc(!0),r=null,a=Gc,o=null;return t.x=function(n){return arguments.length?(e="function"==typeof n?n:Sc(+n),t):e},t.y=function(e){return arguments.length?(n="function"==typeof e?e:Sc(+e),t):n},t.defined=function(e){return arguments.length?(i="function"==typeof e?e:Sc(!!e),t):i},t.curve=function(e){return arguments.length?(a=e,null!=r&&(o=a(r)),t):a},t.context=function(e){return arguments.length?(null==e?r=o=null:o=a(r=e),t):r},t},Kc=function(){function t(t){var e,l,f,h,d,g=t.length,p=!1,v=Array(g),y=Array(g);for(null==s&&(u=c(d=Ac())),e=0;e<=g;++e){if(!(e<g&&o(h=t[e],e,t))===p)if(p=!p)l=e,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),f=e-1;f>=l;--f)u.point(v[f],y[f]);u.lineEnd(),u.areaEnd()}p&&(v[e]=+n(h,e,t),y[e]=+r(h,e,t),u.point(i?+i(h,e,t):v[e],a?+a(h,e,t):y[e]))}if(d)return u=null,d+""||null}function e(){return Zc().defined(o).curve(c).context(s)}var n=qc,i=null,r=Sc(0),a=$c,o=Sc(!0),s=null,c=Gc,u=null;return t.x=function(e){return arguments.length?(n="function"==typeof e?e:Sc(+e),i=null,t):n},t.x0=function(e){return arguments.length?(n="function"==typeof e?e:Sc(+e),t):n},t.x1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:Sc(+e),t):i},t.y=function(e){return arguments.length?(r="function"==typeof e?e:Sc(+e),a=null,t):r},t.y0=function(e){return arguments.length?(r="function"==typeof e?e:Sc(+e),t):r},t.y1=function(e){return arguments.length?(a=null==e?null:"function"==typeof e?e:Sc(+e),t):a},t.lineX0=t.lineY0=function(){return e().x(n).y(r)},t.lineY1=function(){return e().x(n).y(a)},t.lineX1=function(){return e().x(i).y(r)},t.defined=function(e){return arguments.length?(o="function"==typeof e?e:Sc(!!e),t):o},t.curve=function(e){return arguments.length?(c=e,null!=s&&(u=c(s)),t):c},t.context=function(e){return arguments.length?(null==e?s=u=null:u=c(s=e),t):s},t},Jc=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Qc=function(t){return t};eu(Gc);function tu(t){this._curve=t}function eu(t){function e(e){return new tu(t(e))}return e._curve=t,e}tu.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};Array.prototype.slice;Math.sqrt(1/3);var nu=Math.sin(Ic/10)/Math.sin(7*Ic/10),iu=(Math.sin(Pc/10),Math.cos(Pc/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12),function(){});function ru(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function au(t){this._context=t}au.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ru(this,this._x1,this._y1);case 2:this._context.lineTo(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ru(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var ou=function(t){return new au(t)};function su(t){this._context=t}su.prototype={areaStart:iu,areaEnd:iu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ru(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var cu=function(t){return new su(t)};function uu(t){this._context=t}uu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=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;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:ru(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var lu=function(t){return new uu(t)};function fu(t,e){this._basis=new au(t),this._beta=e}fu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i,r=t[0],a=e[0],o=t[n]-r,s=e[n]-a,c=-1;++c<=n;)i=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(r+i*o),this._beta*e[c]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var hu=function t(e){function n(t){return 1===e?new au(t):new fu(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function du(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 gu(t,e){this._context=t,this._k=(1-e)/6}gu.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:du(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:du(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 pu=function t(e){function n(t){return new gu(t,e)}return n.tension=function(e){return t(+e)},n}(0);function vu(t,e){this._context=t,this._k=(1-e)/6}vu.prototype={areaStart:iu,areaEnd:iu,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:du(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 yu=function t(e){function n(t){return new vu(t,e)}return n.tension=function(e){return t(+e)},n}(0);function xu(t,e){this._context=t,this._k=(1-e)/6}xu.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:du(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 _u=function t(e){function n(t){return new xu(t,e)}return n.tension=function(e){return t(+e)},n}(0);function mu(t,e,n){var i=t._x1,r=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=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*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){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);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(i,r,a,o,t._x2,t._y2)}function bu(t,e){this._context=t,this._alpha=e}bu.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:mu(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 wu=function t(e){function n(t){return e?new bu(t,e):new gu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Tu(t,e){this._context=t,this._alpha=e}Tu.prototype={areaStart:iu,areaEnd:iu,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:mu(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 Au=function t(e){function n(t){return e?new Tu(t,e):new vu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Su(t,e){this._context=t,this._alpha=e}Su.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:mu(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 ku=function t(e){function n(t){return e?new Su(t,e):new xu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Mu(t){this._context=t}Mu.prototype={areaStart:iu,areaEnd:iu,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var Eu=function(t){return new Mu(t)};function Cu(t){return t<0?-1:1}function Lu(t,e,n){var i=t._x1-t._x0,r=e-t._x1,a=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0);return(Cu(a)+Cu(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*r+o*i)/(i+r)))||0}function Ou(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ru(t,e,n){var i=t._x0,r=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,r+s*e,a-s,o-s*n,a,o)}function Iu(t){this._context=t}function Du(t){this._context=new Pu(t)}function Pu(t){this._context=t}function Fu(t){return new Iu(t)}function zu(t){return new Du(t)}function Nu(t){this._context=t}function Xu(t){var e,n,i=t.length-1,r=Array(i),a=Array(i),o=Array(i);for(r[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<i-1;++e)r[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(r[i-1]=2,a[i-1]=7,o[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)n=r[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(r[i-1]=o[i-1]/a[i-1],e=i-2;e>=0;--e)r[e]=(o[e]-r[e+1])/a[e];for(a[i-1]=(t[i]+r[i-1])/2,e=0;e<i-1;++e)a[e]=2*t[e+1]-r[e+1];return[r,a]}Iu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ru(this,this._t0,Ou(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){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,Ru(this,Ou(this,n=Lu(this,t,e)),n);break;default:Ru(this,this._t0,n=Lu(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Du.prototype=Object.create(Iu.prototype)).point=function(t,e){Iu.prototype.point.call(this,e,t)},Pu.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,a){this._context.bezierCurveTo(e,t,i,n,a,r)}},Nu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var i=Xu(t),r=Xu(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(i[0][a],r[0][a],i[1][a],r[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Bu=function(t){return new Nu(t)};function ju(t,e){this._context=t,this._t=e}ju.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=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 Yu=function(t){return new ju(t,.5)};function Uu(t){return new ju(t,0)}function Vu(t){return new ju(t,1)}Xs(nc.prototype,{getShapeIndices:function(t){var e=this.config,n=e.data_xs,i=Ms(n),r={},a=i?{}:0;return i&&Us(Object.keys(n).map((function(t){return n[t]}))).forEach((function(t){a[t]=0,r[t]={}})),this.filterTargetsToShow(this.data.targets.filter(t,this)).forEach((function(t){for(var i,o=(t.id in n?n[t.id]:""),s=o?r[o]:r,c=0;i=e.data_groups[c];c++)if(!(i.indexOf(t.id)<0))for(var u,l=0;u=i[l];l++)if(u in s){s[t.id]=s[u];break}_s(s[t.id])&&(s[t.id]=o?a[o]++:a++,s.__max__=(o?a[o]:a)-1)})),r},getIndices:function(t,e){var n=this.config.data_xs;return Ms(n)?t[n[e]]:t},getIndicesMax:function(t){return Ms(this.config.data_xs)?Object.keys(t).map((function(e){return t[e].__max__||0})).reduce((function(t,e){return t+e})):t.__max__},getShapeX:function(t,e,n){var i=this,r=n?i.subX:i.zoomScale||i.x,a=i.config.bar_padding,o=function(t,e){return t+e},s=Ss(t)&&t.total.length?t.total.reduce(o)/2:0;return function(n){var c=i.getIndices(e,n.id),u=n.id in c?c[n.id]:0,l=(c.__max__||0)+1,f=0;if(Ms(n.x)){var h=r(n.x);f=s?h-(t[n.id]||t.width)+t.total.slice(0,u+1).reduce(o)-s:h-(xs(t)?t:t.width)*(l/2-u)}return t&&f&&l>1&&a&&(u&&(f+=a*u),l>2?f-=(l-1)*a/2:2===l&&(f-=a/2)),f}},getShapeY:function(t){var e=this,n=e.isStackNormalized();return function(i){var r=n?e.getRatio("index",i,!0):e.isBubbleZType(i)?e.getBubbleZData(i.value,"y"):i.value;return(t?e.getSubYScale(i.id):e.getYScale(i.id))(r)}},getShapeOffsetData:function(t){var e=this,n=e.orderTargets(e.filterTargetsToShow(e.data.targets.filter(t,e))),i=n.map((function(t){var n=t.values;e.isStepType(t)&&(n=e.convertValuesToStep(n));var i,r=n.reduce((function(t,e){return t[+e.x]=e,t}),{});return i=e.isStackNormalized()?n.map((function(t){return e.getRatio("index",t,!0)})):n.map((function(t){return t.value})),{id:t.id,rowValues:n,rowValueMapByXValue:r,values:i}}));return{indexMapByTargetId:n.reduce((function(t,e,n){return t[e.id]=n,t}),{}),shapeOffsetTargets:i}},getShapeOffset:function(t,e,n){var i=this,r=i.getShapeOffsetData(t),a=r.shapeOffsetTargets,o=r.indexMapByTargetId;return function(t,r){var s=i.getIndices(e,t.id),c=n?i.getSubYScale(t.id):i.getYScale(t.id),u=c(0),l=+t.x,f=u;return a.forEach((function(e){var n=e.rowValues,i=e.values;if(e.id!==t.id&&s[e.id]===s[t.id]&&o[e.id]<o[t.id]){var a=n[r];a&&+a.x===l||(a=e.rowValueMapByXValue[l]),a&&a.value*t.value>=0&&(f+=c(i[a.index])-u)}})),f}},isWithinShape:function(t,e){var n,i=this,r=An(t);return i.isTargetToShow(e.id)?i.hasValidPointType(t.nodeName)?n=i.isStepType(e)?i.isWithinStep(t,i.getYScale(e.id)(e.value)):i.isWithinCircle(t,i.isBubbleType(e)?1.5*i.pointSelectR(e):0):"path"===t.nodeName&&(n=!r.classed(Eo.bar)||i.isWithinBar(t)):n=!1,n},getInterpolate:function(t){var e=this.getInterpolateType(t);return{basis:ou,"basis-closed":cu,"basis-open":lu,bundle:hu,cardinal:pu,"cardinal-closed":yu,"cardinal-open":_u,"catmull-rom":wu,"catmull-rom-closed":Au,"catmull-rom-open":ku,"monotone-x":Fu,"monotone-y":zu,natural:Bu,"linear-closed":Eu,linear:Gc,step:Yu,"step-after":Vu,"step-before":Uu}[e]},getInterpolateType:function(t){var e=this,n=e.config.spline_interpolation_type,i=e.isInterpolationType(n)?n:"cardinal";return e.isSplineType(t)?i:e.isStepType(t)?e.config.line_step_type:"linear"}}),Xs(nc.prototype,{initPie:function(){var t=this,e=t.config,n=e.data_type,i=e.pie_padding,r=e["".concat(n,"_startingAngle")]||0,a=(t.hasType("pie")&&i?.01*i:e["".concat(n,"_padAngle")])||0;t.pie=function(){function t(t){var s,c,u,l,f,h=t.length,d=0,g=Array(h),p=Array(h),v=+r.apply(this,arguments),y=Math.min(Pc,Math.max(-Pc,a.apply(this,arguments)-v)),x=Math.min(Math.abs(y)/h,o.apply(this,arguments)),_=x*(y<0?-1:1);for(s=0;s<h;++s)(f=p[g[s]=s]=+e(t[s],s,t))>0&&(d+=f);for(null==n?null!=i&&g.sort((function(e,n){return i(t[e],t[n])})):g.sort((function(t,e){return n(p[t],p[e])})),s=0,u=d?(y-h*_)/d:0;s<h;++s,v=l)c=g[s],l=v+((f=p[c])>0?f*u:0)+_,p[c]={data:t[c],index:s,value:f,startAngle:v,endAngle:l,padAngle:x};return p}var e=Qc,n=Jc,i=null,r=Sc(0),a=Sc(Pc),o=Sc(0);return t.value=function(n){return arguments.length?(e="function"==typeof n?n:Sc(+n),t):e},t.sortValues=function(e){return arguments.length?(n=e,i=null,t):n},t.sort=function(e){return arguments.length?(i=e,n=null,t):i},t.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:Sc(+e),t):r},t.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:Sc(+e),t):a},t.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:Sc(+e),t):o},t}().startAngle(r).endAngle(r+2*Math.PI).padAngle(a).sortValues(t.isOrderAsc()||t.isOrderDesc()?function(e,n){return t.isOrderAsc()?e-n:n-e}:null).value((function(t){return t.values.reduce((function(t,e){return t+e.value}),0)}))},updateRadius:function(){var t=this,e=t.config,n=e.pie_innerRadius,i=e.pie_padding,r=e.gauge_width||e.donut_width,a=t.filterTargetsToShow(t.data.targets).length*e.gauge_arcs_minWidth;t.radiusExpanded=Math.min(t.arcWidth,t.arcHeight)/2*(t.hasMultiArcGauge()?.85:1),t.radius=.95*t.radiusExpanded,t.innerRadiusRatio=r?(t.radius-r)/t.radius:.6,t.gaugeArcWidth=r||(a<=t.radius-t.innerRadius?t.radius-t.innerRadius:a<=t.radius?a:t.radius);var o=n||(i?i*(t.innerRadiusRatio+.1):0);t.innerRadius=t.hasType("donut")||t.hasType("gauge")?t.radius*t.innerRadiusRatio:o},getInnerRadius:function(t){var e=this.innerRadius;return!xs(e)&&t&&(e=e[t.data.id]||0),e},updateArc:function(){this.svgArc=this.getSvgArc(),this.svgArcExpanded=this.getSvgArcExpanded()},updateAngle:function(t){var e=this,n=e.config,i=e.pie,r=t,a=!1;if(!n)return null;var o=Math.PI*(n.gauge_fullCircle?2:1),s=n.gauge_startingAngle;if(r.data&&e.isGaugeType(r.data)&&!e.hasMultiArcGauge()){var c=e.getTotalDataSum();c>n.gauge_max&&(n.gauge_max=c);var u=o*(c/(n.gauge_max-n.gauge_min));i=i.startAngle(s).endAngle(u+s)}if(i(e.filterTargetsToShow()).forEach((function(t,e){a||t.data.id!==r.data.id||(a=!0,(r=t).index=e)})),isNaN(r.startAngle)&&(r.startAngle=0),isNaN(r.endAngle)&&(r.endAngle=r.startAngle),r.data&&e.hasMultiArcGauge()){var l=e.getMinMaxData().max[0].value;l>n.gauge_max&&(n.gauge_max=l);var f=n.gauge_min,h=n.gauge_max,d=r.value<f?0:r.value<h?r.value-f:h-f;r.startAngle=s,r.endAngle=s+o/(h-f)*d}return a?r:null},getSvgArc:function(){var t=this,e=t.getInnerRadius(),n=t.gaugeArcWidth/t.filterTargetsToShow(t.data.targets).length,i=t.hasMultiArcGauge(),r=Hc().outerRadius((function(e){return i?t.radius-n*e.index:t.radius})).innerRadius((function(r){return i?t.radius-n*(r.index+1):xs(e)?e:0})),a=function(n,i){var a="M 0 0";if(n.value||n.data){xs(e)||(r=r.innerRadius(t.getInnerRadius(n)));var o=!i&&t.updateAngle(n);i?a=r(n):o&&(a=r(o))}return a};return a.centroid=r.centroid,a},getSvgArcExpanded:function(t){var e=this,n=t||1,i=e.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length,r=e.hasMultiArcGauge(),a=Math.min(e.radiusExpanded*n-e.radius,.8*i-100*(1-n)),o=Hc().outerRadius((function(t){return r?e.radius-i*t.index+a:e.radiusExpanded*n})).innerRadius((function(t){return r?e.radius-i*(t.index+1):e.innerRadius}));return function(t){var n=e.updateAngle(t);return n?(r?o:o.innerRadius(e.getInnerRadius(t)))(n):"M 0 0"}},getArc:function(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},transformForArcLabel:function(t){var e=this,n=e.config,i=e.updateAngle(t),r="";if(i)if(e.hasMultiArcGauge()){var a=Math.sin(i.endAngle-Math.PI/2),o=Math.cos(i.endAngle-Math.PI/2)*(e.radiusExpanded+25),s=a*(e.radiusExpanded+15-Math.abs(10*a))+3;r="translate(".concat(o,",").concat(s,")")}else if(!e.hasType("gauge")||e.data.targets.length>1){var c=this.svgArc.centroid(i),u=(o=isNaN(c[0])?0:c[0],s=isNaN(c[1])?0:c[1],Math.sqrt(o*o+s*s)),l=e.hasType("donut")&&n.donut_label_ratio||e.hasType("pie")&&n.pie_label_ratio;l=l?vs(l)?l(t,e.radius,u):l:e.radius&&(u?(36/e.radius>.375?1.175-36/e.radius:.8)*e.radius/u:0),r="translate(".concat(o*l,",").concat(s*l,")")}return r},convertToArcData:function(t){return this.addName({id:t.data.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function(t){var e=this;e.shouldShowArcLabel()&&t.each((function(t){var n=An(this),i=e.updateAngle(t),r=i?i.value:t.value,a=e.getRatio("arc",i),o=t.data.id,s=e.hasType("gauge");if(s||e.meetsArcLabelThreshold(a)){var c=(e.getArcLabelFormat()||e.defaultArcValueFormat)(r,a,o).toString();Is(n,c,[-1,1],s)}}))},textForGaugeMinMax:function(t,e){var n=this.getGaugeLabelExtents();return n?n(t,e):t},expandArc:function(t){var e=this;if(e.transiting)var n=setInterval((function(){e.transiting||(clearInterval(n),e.legend.selectAll(".".concat(Eo.legendItemFocused)).size()>0&&e.expandArc(t))}),10);else{var i=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(i,".".concat(Eo.chartArc))).each((function(t){if(e.shouldExpand(t.data.id)){var n=e.getExpandConfig(t.data.id,"duration"),i=e.getSvgArcExpanded(e.getExpandConfig(t.data.id,"rate"));An(this).selectAll("path").transition().duration(n).attr("d",e.svgArcExpanded).transition().duration(2*n).attr("d",i)}}))}},unexpandArc:function(t){var e=this;if(!e.transiting){var n=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(n,".".concat(Eo.chartArc))).selectAll("path").transition().duration((function(t){return e.getExpandConfig(t.data.id,"duration")})).attr("d",e.svgArc),e.svg.selectAll("".concat(Eo.arc)).style("opacity","1")}},getExpandConfig:function(t,e){var n,i=this.config;return this.isDonutType(t)?n="donut":this.isGaugeType(t)?n="gauge":this.isPieType(t)&&(n="pie"),n?i["".concat(n,"_expand_").concat(e)]:{duration:50,rate:.98}[e]},shouldExpand:function(t){var e=this.config;return this.isDonutType(t)&&e.donut_expand||this.isGaugeType(t)&&e.gauge_expand||this.isPieType(t)&&e.pie_expand},shouldShowArcLabel:function(){var t=this,e=t.config;return["pie","donut","gauge"].some((function(n){return t.hasType(n)&&e["".concat(n,"_label_show")]}))},meetsArcLabelThreshold:function(t){var e=this.config;return t>=(this.hasType("donut")?e.donut_label_threshold:e.pie_label_threshold)},getArcLabelFormat:function(){var t=this.config,e=t.pie_label_format;return this.hasType("gauge")?e=t.gauge_label_format:this.hasType("donut")&&(e=t.donut_label_format),e},getGaugeLabelExtents:function(){return this.config.gauge_label_extents},getArcTitle:function(){var t=this.hasType("donut")?"donut":this.hasType("gauge")&&"gauge";return t?this.config["".concat(t,"_title")]:""},updateTargetsForArc:function(t){var e=this,n=e.main,i=e.hasType("gauge"),r=e.classChartArc.bind(e),a=e.classArcs.bind(e),o=e.classFocus.bind(e),s=n.select(".".concat(Eo.chartArcs)).selectAll(".".concat(Eo.chartArc)).data(e.pie(t)).attr("class",(function(t){return r(t)+o(t.data)})),c=s.enter().append("g").attr("class",r);c.append("g").attr("class",a).merge(s),c.append("text").attr("dy",i&&!e.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor","middle").style("pointer-events","none")},initArc:function(){this.arcs=this.main.select(".".concat(Eo.chart)).append("g").attr("class",Eo.chartArcs).attr("transform",this.getTranslate("arc")),this.setArcTitle()},setArcTitle:function(){var t=this.getArcTitle(),e=this.hasType("gauge");if(t){var n=this.arcs.append("text").attr("class",Eo[e?"chartArcsGaugeTitle":"chartArcsTitle"]).style("text-anchor","middle");e&&n.attr("dy","-0.3em").style("font-size","27px"),Is(n,t,e?void 0:[-.6,1.35],!0)}},redrawArc:function(t,e,n){var i=this,r=i.config,a=i.main,o=r.interaction_enabled,s=a.selectAll(".".concat(Eo.arcs)).selectAll(".".concat(Eo.arc)).data(i.arcData.bind(i));s.exit().transition().duration(e).style("opacity","0").remove(),s=s.enter().append("path").attr("class",i.classArc.bind(i)).style("fill",(function(t){return i.color(t.data)})).style("cursor",(function(t){return o&&r.data_selection_isselectable(t)?"pointer":null})).style("opacity","0").each((function(t){i.isGaugeType(t.data)&&(t.startAngle=r.gauge_startingAngle,t.endAngle=r.gauge_startingAngle),this._current=t})).merge(s),i.hasMultiArcGauge()&&i.redrawMultiArcGauge(),s.attr("transform",(function(t){return!i.isGaugeType(t.data)&&n?"scale(0)":""})).style("opacity",(function(t){return t===this._current?"0":"1"})).each((function(){i.transiting=!0})).transition().duration(t).attrTween("d",(function(t){var e=i.updateAngle(t);if(!e)return function(){return"M 0 0"};isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var n=Mr(this._current,e);return this._current=n(0),function(e){var r=n(e);return r.data=t.data,i.getArc(r,!0)}})).attr("transform",n?"scale(1)":"").style("fill",(function(t){var e;return i.levelColor?(e=i.levelColor(t.data.values[0].value),r.data_colors[t.data.id]=e):e=i.color(t.data.id),e})).style("opacity","1").call(i.endall,(function(){if(i.levelColor){var t=An(this),e=t.datum();i.updateLegendItemColor(e.data.id,t.style("fill"))}i.transiting=!1,Os(r.onrendered,i,i.api)})),o&&i.bindArcEvent(s),i.redrawArcText(t)},redrawMultiArcGauge:function(){var t=this,e=t.config,n=t.main.selectAll(".".concat(Eo.arcs)).selectAll(".".concat(Eo.arcLabelLine)).data(t.arcData.bind(t));n.enter().append("rect").attr("class",(function(t){return"".concat(Eo.arcLabelLine," ").concat(Eo.target," ").concat(Eo.target,"-").concat(t.data.id)})).merge(n).style("fill",(function(e){return t.levelColor?t.levelColor(e.data.values[0].value):t.color(e.data)})).style("display",e.gauge_label_show?"":"none").each((function(e){var n=0,i=0,r=0,a="";if(t.hiddenTargetIds.indexOf(e.data.id)<0){var o=t.updateAngle(e),s=t.gaugeArcWidth/t.filterTargetsToShow(t.data.targets).length*(o.index+1),c=o.endAngle-Math.PI/2,u=t.radius-s,l=c-(0===u?0:1/u);n=t.radiusExpanded-t.radius+s,i=Math.cos(l)*u,r=Math.sin(l)*u,a="rotate(".concat(180*c/Math.PI,", ").concat(i,", ").concat(r,")")}An(this).attr("x",i).attr("y",r).attr("width",n).attr("height",2).attr("transform",a).style("stroke-dasharray","0, ".concat(n+2,", 0"))}))},bindArcEvent:function(t){function e(t,e,n){i.expandArc(n),i.api.focus(n),i.toggleFocusLegend(n,!0),i.showTooltip([e],t)}function n(t){var e=t&&t.id||void 0;i.unexpandArc(e),i.api.revert(),i.revertLegend(),i.hideTooltip()}var i=this,r="touch"===i.inputType,a="mouse"===i.inputType;if(t.on("click",(function(t,e){var n,r=i.updateAngle(t);r&&(n=i.convertToArcData(r),i.toggleShape&&i.toggleShape(this,n,e),i.config.data_onclick.call(i.api,n,this))})),a&&t.on("mouseover",(function(t){if(!i.transiting){var n=i.updateAngle(t),r=n?i.convertToArcData(n):null;e(this,r,r&&r.id||void 0),i.setOverOut(!0,r)}})).on("mouseout",(function(t){if(!i.transiting){var e=i.updateAngle(t),r=e?i.convertToArcData(e):null;n(),i.setOverOut(!1,r)}})).on("mousemove",(function(t){var e=i.updateAngle(t),n=e?i.convertToArcData(e):null;i.showTooltip([n],this)})),r&&i.hasArcType()&&!i.radars){var o=function(){if(!i.transiting){var t=(s=ln.changedTouches[0],An(gs.elementFromPoint(s.clientX,s.clientY))).datum(),r=t&&t.data&&t.data.id?i.updateAngle(t):null,a=r?i.convertToArcData(r):null,o=a&&a.id||void 0;i.callOverOutForTouch(a),_s(o)?n():e(this,a,o)}var s};i.svg.on("touchstart",o).on("touchmove",o)}},redrawArcText:function(t){var e,n=this,i=n.config,r=n.main,a=n.hasType("gauge"),o=n.hasMultiArcGauge();if(a&&1===n.data.targets.length&&i.gauge_title||(e=r.selectAll(".".concat(Eo.chartArc)).select("text").style("opacity","0").attr("class",(function(t){return n.isGaugeType(t.data)?Eo.gaugeValue:null})).call(n.textForArcLabel.bind(n)).attr("transform",n.transformForArcLabel.bind(n)).style("font-size",(function(t){return n.isGaugeType(t.data)&&1===n.data.targets.length&&!o?"".concat(Math.round(n.radius/5),"px"):null})).transition().duration(t).style("opacity",(function(t){return n.isTargetToShow(t.data.id)&&n.isArcType(t.data)?"1":"0"})),o&&e.attr("dy","-.1em")),r.select(".".concat(Eo.chartArcsTitle)).style("opacity",n.hasType("donut")||a?"1":"0"),a){var s=i.gauge_fullCircle,c=-1*Math.PI/2,u=(s?-4:-1)*c;s&&e&&e.attr("dy","".concat(Math.round(n.radius/14)));var l=n.arcs.select("".concat(o?"g":"",".").concat(Eo.chartArcsBackground));if(o){var f=0;(l=l.selectAll("path.".concat(Eo.chartArcsBackground)).data(n.data.targets)).enter().append("path").attr("class",(function(t,e){return"".concat(Eo.chartArcsBackground," ").concat(Eo.chartArcsBackground,"-").concat(e)})).merge(l).attr("d",(function(t){if(n.hiddenTargetIds.indexOf(t.id)>=0)return"M 0 0";var e={data:[{value:i.gauge_max}],startAngle:c,endAngle:u,index:f++};return n.getArc(e,!0,!0)})),l.exit().remove()}else l.attr("d",(function(){var t={data:[{value:i.gauge_max}],startAngle:c,endAngle:u};return n.getArc(t,!0,!0)}));n.arcs.select(".".concat(Eo.chartArcsGaugeUnit)).attr("dy",".75em").text(i.gauge_label_show?i.gauge_units:""),i.gauge_label_show&&(n.arcs.select(".".concat(Eo.chartArcsGaugeMin)).attr("dx","".concat(-1*(n.innerRadius+(n.radius-n.innerRadius)/(s?1:2)),"px")).attr("dy","1.2em").text(n.textForGaugeMinMax(i.gauge_min,!1)),!s&&n.arcs.select(".".concat(Eo.chartArcsGaugeMax)).attr("dx","".concat(n.innerRadius+(n.radius-n.innerRadius)/2,"px")).attr("dy","1.2em").text(n.textForGaugeMinMax(i.gauge_max,!0)))}},initGauge:function(){var t=this.config,e=this.arcs,n=function(t){e.append("text").attr("class",t).style("text-anchor","middle").style("pointer-events","none")};this.hasType("gauge")&&(e.append(this.hasMultiArcGauge()?"g":"path").attr("class",Eo.chartArcsBackground),t.gauge_units&&n(Eo.chartArcsGaugeUnit),t.gauge_label_show&&(n(Eo.chartArcsGaugeMin),!t.gauge_fullCircle&&n(Eo.chartArcsGaugeMax)))},getGaugeLabelHeight:function(){return this.config.gauge_label_show?20:0}}),Xs(nc.prototype,{initBar:function(){this.main.select(".".concat(Eo.chart)).append("g").attr("class",Eo.chartBars)},updateTargetsForBar:function(t){var e=this,n=e.config,i=e.classChartBar.bind(e),r=e.classBars.bind(e),a=e.classFocus.bind(e);e.main.select(".".concat(Eo.chartBars)).selectAll(".".concat(Eo.chartBar)).data(t).attr("class",(function(t){return i(t)+a(t)})).enter().append("g").attr("class",i).style("opacity","0").style("pointer-events","none").append("g").attr("class",r).style("cursor",(function(t){return n.data_selection_isselectable(t)?"pointer":null}))},updateBar:function(t){var e=this,n=e.barData.bind(e),i=e.classBar.bind(e),r=e.initialOpacity.bind(e);e.mainBar=e.main.selectAll(".".concat(Eo.bars)).selectAll(".".concat(Eo.bar)).data(n),e.mainBar.exit().transition().duration(t).style("opacity","0").remove(),e.mainBar=e.mainBar.enter().append("path").attr("class",i).style("fill",e.color).merge(e.mainBar).style("opacity",r)},redrawBar:function(t,e){return[(e?this.mainBar.transition(zs()):this.mainBar).attr("d",t).style("fill",this.color).style("opacity","1")]},getBarW:function(t,e){var n,i=this,r=i.config,a=i.getMaxDataCount(),o=r.data_groups.length,s=!i.zoomScale&&!i||i.isCategorized()?t.tickInterval(a):i.xx(i.subX.domain()[1])/a,c=function(t){var n=t?r.bar_width[t]:r.bar_width,i=t?n.ratio:r.bar_width_ratio,a=t?n.max:r.bar_width_max,o=xs(n)?n:e?s*i/e:0;return a&&o>a?a:o};return n=c(),!o&&Ss(r.bar_width)&&(n={width:n,total:[]},i.filterTargetsToShow(i.data.targets).forEach((function(t){r.bar_width[t.id]&&(n[t.id]=c(t.id),n.total.push(n[t.id]||n.width))}))),n},getBars:function(t,e){var n=ps(t)?"-".concat(t):"";return(e?this.main.selectAll(".".concat(Eo.bars).concat(this.getTargetSelectorSuffix(e))):this.main).selectAll(".".concat(Eo.bar).concat(n))},expandBars:function(t,e,n){n&&this.unexpandBars(),this.getBars(t,e).classed(Eo.EXPANDED,!0)},unexpandBars:function(t){this.getBars(t).classed(Eo.EXPANDED,!1)},generateDrawBar:function(t,e){var n=this.config,i=this.generateGetBarPoints(t,e),r=n.axis_rotated,a=n.data_groups.length,o=n.bar_radius,s=n.bar_radius_ratio,c=xs(o)&&o>0?function(){return o}:xs(s)?function(t){return t*s}:null;return function(t,e){var n=i(t,e),o=+r,s=+!o,u=t.value<0,l=["",""],f=0;if(c&&!a){var h=r?s:o,d=n[2][h]-n[0][h];f=c(d);var g="a".concat(f,",").concat(f," ").concat(u?"1 0 0":"0 0 1"," ");l[+!r]="".concat(g).concat(f,",").concat(f),l[+r]="".concat(g).concat([-f,f][r?"sort":"reverse"]()),u&&l.reverse()}var p=r?"H".concat(n[1][o]-f," ").concat(l[0],"V").concat(n[2][s]-f," ").concat(l[1],"H").concat(n[3][o]):"V".concat(n[1][s]+(u?-f:f)," ").concat(l[0],"H").concat(n[2][o]-f," ").concat(l[1],"V").concat(n[3][s]);return"M".concat(n[0][o],",").concat(n[0][s]).concat(p,"z")}},generateGetBarPoints:function(t,e){var n=this,i=e?n.subXAxis:n.xAxis,r=n.getIndicesMax(t)+1,a=n.getBarW(i,r),o=n.getShapeX(a,t,!!e),s=n.getShapeY(!!e),c=n.getShapeOffset(n.isBarType,t,!!e),u=e?n.getSubYScale:n.getYScale;return function(t,e){var i=u.call(n,t.id)(0),r=c(t,e)||i,l=xs(a)?a:a[t.id]||a.width,f=o(t),h=s(t);return n.config.axis_rotated&&(t.value>0&&h<i||t.value<0&&i<h)&&(h=i),[[f,r],[f,h-=i-r],[f+l,h],[f+l,r]]}},isWithinBar:function(t){var e=Cn(t),n=r(Ds(t),2),i=n[0],a=n[1],o=Math.min(i.x,a.x),s=Math.min(i.y,a.y),c=this.config.bar_sensitivity,u=t.getBBox(),l=u.width,f=u.height;return o-c<e[0]&&e[0]<o+l+c&&s-c<e[1]&&e[1]<s+f+c}}),Xs(nc.prototype,{initBubble:function(){var t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle",t.point_sensitivity=25)},getBaseLength:function(){var t=this.getCache("$baseLength");return t||this.addCache("$baseLength",t=Gs("min",[this.axes.x.select("path").node().getTotalLength(),this.axes.y.select("path").node().getTotalLength()])),t},getBubbleR:function(t){var e=this,n=e.config.bubble_maxR;vs(n)?n=n(t):!xs(n)&&(n=e.getBaseLength()/(2*e.getMaxDataCount())+12);var i=Gs("max",e.getMinMaxData().max.map((function(t){return e.isBubbleZType(t)?e.getBubbleZData(t.value,"y"):Cs(t.value)?t.value.mid:t.value}))),r=n*n*Math.PI,a=(e.isBubbleZType(t)?e.getBubbleZData(t.value,"z"):t.value)*(r/i);return Math.sqrt(a/Math.PI)},getBubbleZData:function(t,e){return Cs(t)?t[e]:t["y"===e?0:1]},isBubbleZType:function(t){return this.isBubbleType(t)&&(Cs(t.value)&&("z"in t.value||"y"in t.value)||Es(t.value)&&2===t.value.length)}}),Xs(nc.prototype,{initLine:function(){this.main.select(".".concat(Eo.chart)).append("g").attr("class",Eo.chartLines)},updateTargetsForLine:function(t){var e=this,n=e.config,i=e.classChartLine.bind(e),r=e.classLines.bind(e),a=e.classAreas.bind(e),o=e.classCircles.bind(e),s=e.classFocus.bind(e),c=e.main.select(".".concat(Eo.chartLines)).selectAll(".".concat(Eo.chartLine)).data(t).attr("class",(function(t){return i(t)+s(t)})).enter().append("g").attr("class",i).style("opacity","0").style("pointer-events","none");c.append("g").attr("class",r),c.append("g").attr("class",a),n.point_show&&(n.data_selection_enabled&&c.append("g").attr("class",(function(t){return e.generateClass(Eo.selectedCircles,t.id)})),c.append("g").attr("class",o).style("cursor",(function(t){return n.data_selection_isselectable(t)?"pointer":null}))),t.forEach((function(t){e.main.selectAll(".".concat(Eo.selectedCircles).concat(e.getTargetSelectorSuffix(t.id))).selectAll("".concat(Eo.selectedCircle)).each((function(e){e.value=t.values[e.index].value}))}))},updateLine:function(t){var e=this;e.mainLine=e.main.selectAll(".".concat(Eo.lines)).selectAll(".".concat(Eo.line)).data(e.lineData.bind(e)),e.mainLine.exit().transition().duration(t).style("opacity","0").remove(),e.mainLine=e.mainLine.enter().append("path").attr("class",(function(t){return"".concat(e.classLine.bind(e)(t)," ").concat(e.extraLineClasses(t)||"")})).style("stroke",e.color).merge(e.mainLine).style("opacity",e.initialOpacity.bind(e)).style("shape-rendering",(function(t){return e.isStepType(t)?"crispEdges":""})).attr("transform",null)},redrawLine:function(t,e){return[(e?this.mainLine.transition(zs()):this.mainLine).attr("d",t).style("stroke",this.color).style("opacity","1")]},getCurve:function(t){var e=this;return e.config.axis_rotated&&e.isStepType(t)?function(n){var i=e.getInterpolate(t)(n);return i.orgPoint=i.point,i.pointRotated=function(t,e){1===this._point&&(this._point=2);var 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},i.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},i}:e.getInterpolate(t)},generateDrawLine:function(t,e){var n=this,i=n.config,r=i.line_connectNull,a=i.axis_rotated,o=n.generateGetLinePoints(t,e),s=e?n.getSubYScale:n.getYScale,c=function(t){return(e?n.subxx:n.xx).call(n,t)},u=function(t,e){return n.isGrouped(t.id)?o(t,e)[0][1]:s.call(n,t.id)(n.getBaseValue(t))},l=Zc();l=a?l.x(u).y(c):l.x(c).y(u),r||(l=l.defined((function(t){return null!==n.getBaseValue(t)})));var f=e?n.subX:n.x;return function(t){var e,o=s.call(n,t.id),c=r?n.filterRemoveNull(t.values):t.values,u=0,h=0;if(n.isLineType(t)){var d=i.data_regions[t.id];d?e=n.lineWithRegions(c,f,o,d):(n.isStepType(t)&&(c=n.convertValuesToStep(c)),e=l.curve(n.getCurve(t))(c))}else c[0]&&(u=f(c[0].x),h=o(c[0].value)),e=a?"M ".concat(h," ").concat(u):"M ".concat(u," ").concat(h);return e||"M 0 0"}},generateGetLinePoints:function(t,e){var n=this,i=n.config,r=!!e,a=n.getShapeX(0,t,r),o=n.getShapeY(r),s=n.getShapeOffset(n.isLineType,t,r),c=r?n.getSubYScale:n.getYScale;return function(t,e){var r=c.call(n,t.id)(0),u=s(t,e)||r,l=a(t),f=o(t);i.axis_rotated&&(t.value>0&&f<r||t.value<0&&r<f)&&(f=r);var h=[l,f-(r-u)];return[h,h,h,h]}},lineWithRegions:function(t,e,n,i){var r,a,o,s,c=this,u=c.config.axis_rotated,l=c.isTimeSeries(),f=c.isCategorized()?.5:0,h=[],d=function(t,e){for(var n,i=0;n=e[i];i++)if(n.start<t&&t<=n.end)return n.style;return!1};if(ms(i))for(var g,p=function(t,e){return _s(t)?e:l?c.parseDate(t):t},v=0;g=i[v];v++){var y=p(g.start,t[0].x),x=p(g.end,t[t.length-1].x),_=g.style||{dasharray:"2 2"};h[v]={start:y,end:x,style:_}}for(var m,b=u?function(t){return n(t.value)}:function(t){return e(t.x)},w=u?function(t){return e(t.x)}:function(t){return n(t.value)},T=function(t){return"M".concat(t[0][0],",").concat(t[0][1],"L").concat(t[1][0],",").concat(t[1][1])},A=l?function(t,i,r,s){var c=t.x.getTime(),l=i.x-t.x,f=new Date(c+l*r),h=new Date(c+l*(r+s)),d=u?[[n(a(r)),e(f)],[n(a(r+o)),e(h)]]:[[e(f),n(a(r))],[e(h),n(a(r+o))]];return T(d)}:function(t,i,o,s){var c=u?[[n(a(o),!0),e(r(o))],[n(a(o+s),!0),e(r(o+s))]]:[[e(r(o),!0),n(a(o))],[e(r(o+s),!0),n(a(o+s))]];return T(c)},S="",k=0;m=t[k];k++){var M=t[k-1],E=M&&ps(M.value);_=d(m.x,h);if(ps(m.value))if(!_s(h)&&_&&E){if(E){try{_=_.dasharray.split(" ")}catch(t){_="2 2".split(" ")}r=c.getScale(M.x+f,m.x+f,l),a=c.getScale(M.value,m.value);var C=e(m.x)-e(M.x),L=n(m.value)-n(M.value),O=Math.sqrt(Math.pow(C,2)+Math.pow(L,2));s=(o=_[0]/O)*_[1];for(var R=o;R<=1;R+=s)S+=A(M,m,R,o),R+s>=1&&(S+=A(M,m,1,0))}}else S+="".concat(k&&E?"L":"M").concat(b(m),",").concat(w(m))}return S},updateAreaGradient:function(){var t=this;t.data.targets.forEach((function(e){var n="".concat(t.datetimeId,"-areaGradient").concat(t.getTargetSelectorSuffix(e.id));if(t.isAreaType(e)&&t.defs.select("#".concat(n)).empty()){var i=t.color(e),r=t.config.area_linearGradient,a=r.x,o=void 0===a?[0,0]:a,s=r.y,c=void 0===s?[0,1]:s,u=r.stops,l=void 0===u?[[0,i,1],[1,i,0]]:u,f=t.defs.append("linearGradient").attr("id","".concat(n)).attr("x1",o[0]).attr("x2",o[1]).attr("y1",c[0]).attr("y2",c[1]);l.forEach((function(t){var n=vs(t[1])?t[1](e.id):t[1];f.append("stop").attr("offset",t[0]).attr("stop-color",n||i).attr("stop-opacity",t[2])}))}}))},updateAreaColor:function(t){return this.config.area_linearGradient?"url(#".concat(this.datetimeId,"-areaGradient").concat(this.getTargetSelectorSuffix(t.id),")"):this.color(t)},updateArea:function(t){var e=this;e.config.area_linearGradient&&e.updateAreaGradient(),e.mainArea=e.main.selectAll(".".concat(Eo.areas)).selectAll(".".concat(Eo.area)).data(e.lineData.bind(e)),e.mainArea.exit().transition().duration(t).style("opacity","0").remove(),e.mainArea=e.mainArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.updateAreaColor.bind(e)).style("opacity",(function(){return e.orgAreaOpacity=An(this).style("opacity"),"0"})).merge(e.mainArea),e.mainArea.style("opacity",e.orgAreaOpacity)},redrawArea:function(t,e){var n=this;return[(e?n.mainArea.transition(zs()):n.mainArea).attr("d",t).style("fill",n.updateAreaColor.bind(n)).style("opacity",(function(t){return(n.isAreaRangeType(t)?n.orgAreaOpacity/1.75:n.orgAreaOpacity)+""}))]},generateDrawArea:function(t,e){var n=this,i=n.config,r=i.line_connectNull,a=i.axis_rotated,o=n.generateGetAreaPoints(t,e),s=e?n.getSubYScale:n.getYScale,c=function(t){return(e?n.subxx:n.xx).call(n,t)},u=function(t,e){return n.isGrouped(t.id)?o(t,e)[0][1]:s.call(n,t.id)(n.isAreaRangeType(t)?n.getAreaRangeData(t,"high"):0)},l=function(t,e){return n.isGrouped(t.id)?o(t,e)[1][1]:s.call(n,t.id)(n.isAreaRangeType(t)?n.getAreaRangeData(t,"low"):t.value)};return function(t){var e,o=r?n.filterRemoveNull(t.values):t.values,s=0,f=0;if(n.isAreaType(t)){var h=Kc();h=a?h.y(c).x0(u).x1(l):h.x(c).y0(i.area_above?0:u).y1(l),r||(h=h.defined((function(t){return null!==n.getBaseValue(t)}))),n.isStepType(t)&&(o=n.convertValuesToStep(o)),e=h.curve(n.getCurve(t))(o)}else o[0]&&(s=n.x(o[0].x),f=n.getYScale(t.id)(o[0].value)),e=a?"M ".concat(f," ").concat(s):"M ".concat(s," ").concat(f);return e||"M 0 0"}},generateGetAreaPoints:function(t,e){var n=this,i=n.config,r=n.getShapeX(0,t,!!e),a=n.getShapeY(!!e),o=n.getShapeOffset(n.isAreaType,t,!!e),s=e?n.getSubYScale:n.getYScale;return function(t,e){var c=s.call(n,t.id)(0),u=o(t,e)||c,l=r(t),f=a(t);return i.axis_rotated&&(t.value>0&&f<c||t.value<0&&c<f)&&(f=c),[[l,u],[l,f-(c-u)],[l,f-(c-u)],[l,u]]}},updateCircle:function(){var t=this;if(t.config.point_show){t.mainCircle=t.main.selectAll(".".concat(Eo.circles)).selectAll(".".concat(Eo.circle)).data((function(e){return!t.isBarType(e)&&(!t.isLineType(e)||t.shouldDrawPointsForLine(e))&&t.labelishData(e)})),t.mainCircle.exit().remove();var e=t.point("create",this,t.pointR.bind(t),t.color);t.mainCircle=t.mainCircle.enter().append(e).merge(t.mainCircle).style("stroke",t.color).style("opacity",t.initialOpacityForCircle.bind(t))}},redrawCircle:function(t,e,n,i){var r=this,a=r.main.selectAll(".".concat(Eo.selectedCircle));if(!r.config.point_show)return[];var o=[];r.mainCircle.each((function(s){var c=r.point("update",r,t,e,r.opacityForCircle.bind(r),r.color,n,i,a).bind(this)(s);o.push(c)}));var s=r.isCirclePoint()?"c":"";return[o,a.attr("".concat(s,"x"),t).attr("".concat(s,"y"),e)]},circleX:function(t){var e=ps(t.x);return this.config.zoom_enabled&&this.zoomScale?e?this.zoomScale(t.x):null:e?this.x(t.x):null},updateCircleY:function(){var t=this,e=t.generateGetLinePoints(t.getShapeIndices(t.isLineType),!1);t.circleY=function(n,i){var r=n.id;return t.isGrouped(r)?e(n,i)[0][1]:t.getYScale(r)(t.getBaseValue(n))}},getCircles:function(t,e){var n=ps(t)?"-".concat(t):"";return(e?this.main.selectAll(".".concat(Eo.circles).concat(this.getTargetSelectorSuffix(e))):this.main).selectAll(".".concat(Eo.circle).concat(n))},expandCircles:function(t,e,n){var i=this,r=i.pointExpandedR.bind(i);n&&i.unexpandCircles();var a=i.getCircles(t,e).classed(Eo.EXPANDED,!0),o=r(a)/i.config.point_r,s=1-o;i.isCirclePoint()?a.attr("r",r):a.each((function(){var t=An(this);if("circle"===this.tagName)t.attr("r",r);else{var e=this.getBBox(),n=e.width,i=e.height,a=s*(+t.attr("x")+n/2),c=s*(+t.attr("y")+i/2);t.attr("transform","translate(".concat(a," ").concat(c,") scale(").concat(o,")"))}}))},unexpandCircles:function(t){var e=this,n=e.pointR.bind(e),i=e.getCircles(t).filter((function(){return An(this).classed(Eo.EXPANDED)})).classed(Eo.EXPANDED,!1);i.attr("r",n),e.isCirclePoint()||i.attr("transform","scale(".concat(n(i)/e.config.point_r,")"))},pointR:function(t){var e=this.config.point_r,n=e;return this.isStepType(t)?n=0:this.isBubbleType(t)?n=this.getBubbleR(t):vs(e)&&(n=e(t)),n},pointExpandedR:function(t){var e=this.config,n=this.isBubbleType(t)?1.15:1.75;return e.point_focus_expand_enabled?e.point_focus_expand_r||this.pointR(t)*n:this.pointR(t)},pointSelectR:function(t){var e=this.config.point_select_r;return vs(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function(t,e){var n=Cn(t),i=An(t),r=this.isCirclePoint()?"c":"",a=+i.attr("".concat(r,"x")),o=+i.attr("".concat(r,"y"));if(!a&&!o&&1===t.nodeType){var s=t.getBBox?t.getBBox():t.getBoundingClientRect();a=s.x,o=s.y}return Math.sqrt(Math.pow(a-n[0],2)+Math.pow(o-n[1],2))<(e||this.config.point_sensitivity)},isWithinStep:function(t,e){return Math.abs(e-Cn(t)[1])<30},shouldDrawPointsForLine:function(t){var e=this.config.line_point;return!0===e||Es(e)&&-1!==e.indexOf(t.id)}}),Xs(nc.prototype,{hasValidPointType:function(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasValidPointDrawMethods:function(t){var e=t||this.config.point_type;return Ss(e)&&vs(e.create)&&vs(e.update)},insertPointInfoDefs:function(t,e){var n=function(t,e){for(var n,i=t.attributes,r=0;n=i[r];r++)n=n.name,e.setAttribute(n,t.getAttribute(n))},i=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,r=gs.createElementNS(de.svg,i.nodeName.toLowerCase());if(r.id=e,r.style.fill="inherit",r.style.stroke="inherit",n(i,r),i.childNodes&&i.childNodes.length){var a=An(r);"innerHTML"in r?a.html(i.innerHTML):js(i.childNodes).forEach((function(t){n(t,a.append(t.tagName).node())}))}this.defs.node().appendChild(r)},pointFromDefs:function(t){return this.defs.select("#".concat(t))},updatePointClass:function(t){var e=this,n=!1;return(Cs(t)||e.mainCircle)&&(n=!0===t?e.mainCircle.each((function(t){var n=e.classCircle.bind(e)(t);this.getAttribute("class").indexOf(Eo.EXPANDED)>-1&&(n+=" ".concat(Eo.EXPANDED)),this.setAttribute("class",n)})):e.classCircle(t)),n},generatePoint:function(){var t=this,e=t.config,n=[],i=Ms(e.point_pattern)?e.point_pattern:[e.point_type];return function(e,r){for(var a=arguments.length,o=Array(a>2?a-2:0),s=2;s<a;s++)o[s-2]=arguments[s];return function(a){var s=a.id||a.data&&a.data.id||a,c=An(this);n.indexOf(s)<0&&n.push(s);var u=i[n.indexOf(s)%i.length];if(t.hasValidPointType(u))u=t[u];else if(!t.hasValidPointDrawMethods(u)){var l="".concat(t.datetimeId,"-point-").concat(s);if(t.pointFromDefs(l).size()<1&&t.insertPointInfoDefs(u,l),"create"===e)return t.custom.create.bind(r).apply(void 0,[c,l].concat(o));if("update"===e)return t.custom.update.bind(r).apply(void 0,[c].concat(o))}return u[e].bind(r).apply(void 0,[c].concat(o))}}},getTransitionName:function(){return zs()},custom:{create:function(t,e,n,i){return t.append("use").attr("xlink:href","#".concat(e)).attr("class",this.updatePointClass.bind(this)).style("fill",i).node()},update:function(t,e,n,i,r,a,o,s){var c=t.node().getBBox(),u=c.width,l=c.height,f=function(t){return e(t)-u/2},h=t;if(a){var d=this.getTransitionName();o&&h.attr("x",f),h=h.transition(d),s.transition(this.getTransitionName())}return h.attr("x",f).attr("y",(function(t){return n(t)-l/2})).style("opacity",i).style("fill",r)}},circle:{create:function(t,e,n){return t.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",e).style("fill",n).node()},update:function(t,e,n,i,r,a,o,s){var c=this,u=t;if(c.hasType("bubble")&&u.attr("r",c.pointR.bind(c)),a){var l=c.getTransitionName();o&&u.attr("cx",e),u.attr("cx")&&(u=u.transition(l)),s.transition(c.getTransitionName())}return u.attr("cx",e).attr("cy",n).style("opacity",i).style("fill",r)}},rectangle:{create:function(t,e,n){var i=function(t){return 2*e(t)};return t.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",i).attr("height",i).style("fill",n).node()},update:function(t,e,n,i,r,a,o,s){var c=this.config.point_r,u=function(t){return e(t)-c},l=t;if(a){var f=this.getTransitionName();o&&l.attr("x",u),l=l.transition(f),s.transition(this.getTransitionName())}return l.attr("x",u).attr("y",(function(t){return n(t)-c})).style("opacity",i).style("fill",r)}}});Xs(nc.prototype,{initRadar:function(){var t=this,e=t.config;t.hasType("radar")&&(t.radars=t.main.select(".".concat(Eo.chart)).append("g").attr("class",Eo.chartRadars),t.radars.levels=t.radars.append("g").attr("class",Eo.levels),t.radars.axes=t.radars.append("g").attr("class",Eo.axis),t.radars.shapes=t.radars.append("g").attr("class",Eo.shapes),t.maxValue=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function(){var t=this.config.axis_x_categories.length<4?-20:10,e=(Math.min(this.arcWidth,this.arcHeight)-t)/2;return[e,e]},updateTargetsForRadar:function(t){var e=this.config;ks(e.axis_x_categories)&&(e.axis_x_categories=qs(0,Gs("max",t.map((function(t){return t.values.length}))))),this.generateRadarPoints()},getRadarPosition:function(t,e,n,i){var a=this.config,o=r(this.getRadarSize(),2),s=o[0],c=o[1],u=a.axis_x_categories.length,l=a.radar_direction_clockwise,f=js(t).map((function(r){return function(t,e,n,i,r,a){var o=t&&i>0?n-i:i,s=2*Math.PI;return r*(1-a*("x"===e?Math.sin:Math.cos)(o*s/n))}(l,r,u,e,ms(n)?n:"x"===t?s:c,xs(i)?i:a.radar_size_ratio)}));return 1===f.length?f[0]:f},generateRadarPoints:function(){var t=this,e=t.data.targets,n=r(t.getRadarSize(),2),i=n[0],a=n[1],o=t.getCache("$radarPoints")||{},s=o._size;s&&(s.width===i||s.height===a)||(e.forEach((function(e){o[e.id]=e.values.map((function(e,n){return t.getRadarPosition(["x","y"],n,void 0,t.getRatio("radar",e))}))})),o._size={width:i,height:a},t.addCache("$radarPoints",o))},redrawRadar:function(t){var e=this,n=e.getTranslate("radar");n&&(e.radars.attr("transform",n),e.main.selectAll(".".concat(Eo.circles)).attr("transform",n),e.main.select(".".concat(Eo.chartTexts)).attr("transform",n),e.generateRadarPoints(),e.updateRadarLevel(),e.updateRadarAxes(),e.updateRadarShape(t))},generateGetRadarPoints:function(){var t=this.getCache("$radarPoints");return function(e,n){var i=t[e.id][n];return[i,i,i,i]}},updateRadarLevel:function(){var t=this,e=t.config,n=r(t.getRadarSize(),2),i=n[0],a=n[1],o=e.radar_level_depth,s=e.axis_x_categories.length,c=e.radar_level_text_show,u=t.radars.levels,l=qs(0,o),f=e.radar_size_ratio*Math.min(i,a),h=l.map((function(t){return f*((t+1)/o)})),d=e.radar_level_text_format,g=l.map((function(e){var n=h[e];return qs(0,s).map((function(e){return t.getRadarPosition(["x","y"],e,n,1).join(",")})).join(" ")})),p=u.selectAll(".".concat(Eo.level)).data(l);p.exit().remove();var v=p.enter().append("g").attr("class",(function(t,e){return"".concat(Eo.level," ").concat(Eo.level,"-").concat(e)}));v.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),c&&(u.select("text").empty()&&u.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text((function(){return d(0)})),v.append("text").attr("dx","-.5em").style("text-anchor","end").text((function(e){return d(t.maxValue/l.length*(e+1))}))),v.merge(p).attr("transform",(function(t){return"translate(".concat(i-h[t],", ").concat(a-h[t],")")})).selectAll("polygon").attr("points",(function(t){return g[t]})),c&&u.selectAll("text").attr("x",(function(t){return _s(t)?i:g[t].split(",")[0]})).attr("y",(function(t){return _s(t)?a:0}))},updateRadarAxes:function(){var t=this,e=t.config,n=r(t.getRadarSize(),2),i=n[0],a=n[1],o=e.axis_x_categories,s=t.radars.axes.selectAll("g").data(o);s.exit().remove();var c=s.enter().append("g").attr("class",(function(t,e){return"".concat(Eo.axis,"-").concat(e)}));if(e.radar_axis_line_show&&c.append("line"),e.radar_axis_text_show&&c.append("text"),s=c.merge(s),e.radar_axis_line_show&&s.select("line").attr("x1",i).attr("y1",a).attr("x2",(function(e,n){return t.getRadarPosition("x",n)})).attr("y2",(function(e,n){return t.getRadarPosition("y",n)})),e.radar_axis_text_show){var u=e.radar_axis_text_position,l=u.x,f=void 0===l?0:l,h=u.y,d=void 0===h?0:h;s.select("text").style("text-anchor","middle").attr("dy",".5em").call((function(t){t.each((function(t){Is(An(this),t+"",[-.6,1.2])}))})).datum((function(t,e){return{index:e}})).attr("transform",(function(e){_s(this.width)&&(this.width=this.getBoundingClientRect().width/2);var n=t.getRadarPosition("x",e.index,void 0,1),r=Math.round(t.getRadarPosition("y",e.index,void 0,1));return n>i?n+=this.width+f:Math.round(n)<i&&(n-=this.width+f),r>a?(r/2===a&&"tspan"===this.firstChild.tagName&&this.firstChild.setAttribute("dy","0em"),r+=d):r<a&&(r-=d),"translate(".concat(n," ").concat(r,")")}))}t.bindEvent()},bindEvent:function(){var t=this,e=this;if(e.config.interaction_enabled){var n="mouse"===e.inputType,i=function(){var t=ln.target;/tspan/i.test(t.tagName)&&(t=t.parentNode);var e=An(t).datum();return e&&1===Object.keys(e).length?e.index:void 0},r=function(){var r=i(),a=_s(r);(n||a)&&(t.hideTooltip(),t.unexpandCircles(),n?e.setOverOut(!1,r):a&&e.callOverOutForTouch())};e.radars.select(".".concat(Eo.axis)).on(n?"mouseover ":"touchstart",(function(){if(!e.transiting){var t=i();e.selectRectForSingle(e.svg.node(),null,t),n?e.setOverOut(!0,t):e.callOverOutForTouch(t)}})).on("mouseout",n?r:null),n||e.svg.on("touchstart",r)}},updateRadarShape:function(t){var e=this,n=e.data.targets,i=e.getCache("$radarPoints"),r=e.radars.shapes.selectAll("polygon").data(n),a=r.enter().append("g").attr("class",e.classChartRadar.bind(e));r.exit().transition().duration(t).remove(),a.append("polygon").merge(r).style("fill",e.color).style("stroke",e.color).attr("points",(function(t){return i[t.id].join(" ")}))},radarCircleX:function(t){return this.getCache("$radarPoints")[t.id][t.index][0]},radarCircleY:function(t){return this.getCache("$radarPoints")[t.id][t.index][1]}}),Xs(nc.prototype,{initText:function(){this.main.select(".".concat(Eo.chart)).append("g").attr("class",Eo.chartTexts),this.mainText=Ln([])},updateTargetsForText:function(t){var e=this,n=e.classChartText.bind(e),i=e.classTexts.bind(e),r=e.classFocus.bind(e);e.main.select(".".concat(Eo.chartTexts)).selectAll(".".concat(Eo.chartText)).data(t).attr("class",(function(t){return n(t)+r(t)})).enter().append("g").attr("class",n).style("opacity","0").style("pointer-events","none").append("g").attr("class",i)},updateText:function(t){var e=this,n=this,i=n.config,r=n.labelishData.bind(n),a=n.classText.bind(n);n.mainText=n.main.selectAll(".".concat(Eo.texts)).selectAll(".".concat(Eo.text)).data((function(t){return e.isRadarType(t)?t.values:r(t)})),n.mainText.exit().transition().duration(t).style("fill-opacity","0").remove(),n.mainText=n.mainText.enter().append("text").merge(n.mainText).attr("class",a).attr("text-anchor",(function(t){return i.axis_rotated?t.value<0?"end":"start":"middle"})).style("fill",n.updateTextColor.bind(n)).style("fill-opacity","0").text((function(t,e,i){var r=n.isBubbleZType(t)?n.getBubbleZData(t.value,"z"):t.value;return n.dataLabelFormat(t.id)(r,t.id,e,i)}))},updateTextColor:function(t){var e,n=this.config.data_labels_colors;return ys(n)?e=n:Cs(n)&&(e=n[t.id]),e||this.color(t)},redrawText:function(t,e,n,i){var r=this,a=zs(),o=n?0:r.opacityForText.bind(r);return[r.mainText.each((function(n,s){var c=An(this);(i&&c.attr("x")?c.transition(a):c).attr("x",t.bind(this)(n,s)).attr("y",e.bind(this)(n,s)).style("fill",r.updateTextColor.bind(r)).style("fill-opacity",o)}))]},getTextRect:function(t,e){var n=t.node?t.node():t;/text/i.test(n.tagName)||(n=n.querySelector("text"));var i=n.textContent,r="$".concat(i.replace(/\W/g,"_")),a=this.getCache(r);return a||(this.svg.append("text").style("visibility","hidden").style("font",An(n).style("font")).classed(e,!0).text(i).call((function(t){a=Fs(t.node())})).remove(),this.addCache(r,a)),a},generateXYForText:function(t,e){var n=this,i=Object.keys(t),r={},a=e?n.getXForText:n.getYForText;return n.hasType("radar")&&i.push("radar"),i.forEach((function(e){r[e]=n["generateGet".concat(Bs(e),"Points")](t[e],!1)})),function(t,e){var i=(n.isAreaType(t)?"area":n.isBarType(t)&&"bar")||n.isRadarType(t)&&"radar"||"line";return a.call(n,r[i](t,e),t,this)}},getCenteredTextPos:function(t,e,n){var i=this.config,r=i.axis_rotated;if(i.data_labels.centered&&this.isBarType(t)){var a=Fs(n),o=t.value>=0;if(r){var s=(o?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+a.width/2;return o?-s-3:s+2}var c=(o?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+a.height/2;return o?c:-c-2}return 0},getTextPos:function(t,e){var n=this.config.data_labels_position;return(t in n?n[t]:n)[e]||0},getXForText:function(t,e,n){var i,r,a=this,o=a.config.axis_rotated;if(o?(r=a.isBarType(e)?4:6,i=t[2][1]+r*(e.value<0?-1:1)):i=a.hasType("bar")?(t[2][0]+t[0][0])/2:t[0][0],null===e.value)if(i>a.width){var s=Fs(n).width;i=a.width-s}else i<0&&(i=4);return o&&(i+=a.getCenteredTextPos(e,t,n)),i+a.getTextPos(e.id,"x")},getYForText:function(t,e,n){var i,r=this,a=r.config,o=a.axis_rotated,s=a.point_r,c=Fs(n),u=3;if(o)i=(t[0][0]+t[2][0]+.6*c.height)/2;else if(i=t[2][1],xs(s)&&s>5&&(r.isLineType(e)||r.isScatterType(e))&&(u+=a.point_r/2.3),e.value<0||0===e.value&&!r.hasPositiveValue&&r.hasNegativeValue)i+=c.height+(r.isBarType(e)?-u:u);else{var l=2*-u;r.isBarType(e)?l=-u:r.isBubbleType(e)&&(l=u),i+=l}if(null===e.value&&!o){var f=c.height;i<f?i=f:i>this.height&&(i=this.height-4)}return o||(i+=r.getCenteredTextPos(e,t,n)),i+r.getTextPos(e.id,"y")},markOverlapped:function(t,e,n){var i=e.arcs.selectAll(n),r=i.filter((function(e){return e.data.id!==t})),a=i.filter((function(e){return e.data.id===t})),o=Ys(a.node()),s=function(t,e){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2))};a.node()&&r.each((function(){var t=Ys(this),e=An(this),n=s(o.e,o.f)>s(t.e,t.f)?a:e,i=Math.ceil(Math.abs(o.e-t.e))<Math.ceil(n.node().getComputedTextLength()),r=Math.ceil(Math.abs(o.f-t.f))<parseInt(a.style("font-size"),0);e.classed(Eo.TextOverlapping,i&&r)}))},undoMarkOverlapped:function(t,e){t.arcs.selectAll(e).each((function(){Ln([this,this.previousSibling]).classed(Eo.TextOverlapping,!1)}))}});var Hu={Area:["area","area-spline","area-spline-range","area-line-range","area-step"],AreaRange:["area-spline-range","area-line-range"],Arc:["pie","donut","gauge","radar"],Line:["line","spline","area","area-spline","area-spline-range","area-line-range","step","area-step"],Step:["step","area-step"],Spline:["spline","area-spline","area-spline-range"]};Xs(nc.prototype,{setTargetType:function(t,e){var n=this,i=n.config;n.mapToTargetIds(t).forEach((function(t){n.withoutFadeIn[t]=e===i.data_types[t],i.data_types[t]=e})),t||(i.data_type=e)},hasType:function(t,e){var n=this.config.data_types,i=e||this.data.targets,r=!1;return i&&i.length?i.forEach((function(e){var i=n[e.id];(i&&i.indexOf(t)>=0||!i&&"line"===t)&&(r=!0)})):Object.keys(n).length?Object.keys(n).forEach((function(e){n[e]===t&&(r=!0)})):r=this.config.data_type===t,r},hasTypeOf:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!Hu[t].filter((function(t){return-1===i.indexOf(t)})).every((function(t){return!n.hasType(t,e)}))},isTypeOf:function(t,e){var n=ys(t)?t:t.id,i=this.config.data_types[n];return Es(e)?e.indexOf(i)>=0:i===e},hasArcType:function(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge:function(){return this.hasType("gauge")&&"multi"===this.config.gauge_type},isLineType:function(t){var e=ys(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,Hu.Line)},isStepType:function(t){return this.isTypeOf(t,Hu.Step)},isSplineType:function(t){return this.isTypeOf(t,Hu.Spline)},isAreaType:function(t){return this.isTypeOf(t,Hu.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,Hu.AreaRange)},isBarType:function(t){return this.isTypeOf(t,"bar")},isBubbleType:function(t){return this.isTypeOf(t,"bubble")},isScatterType:function(t){return this.isTypeOf(t,"scatter")},isPieType:function(t){return this.isTypeOf(t,"pie")},isGaugeType:function(t){return this.isTypeOf(t,"gauge")},isDonutType:function(t){return this.isTypeOf(t,"donut")},isRadarType:function(t){return this.isTypeOf(t,"radar")},isArcType:function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isRadarType(t)},isCirclePoint:function(){var t=this.config,e=t.point_pattern;return"circle"===t.point_type&&(!e||Es(e)&&0===e.length)},lineData:function(t){return this.isLineType(t)?[t]:[]},arcData:function(t){return this.isArcType(t.data)?[t]:[]},barData:function(t){return this.isBarType(t)?t.values:[]},labelishData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isRadarType(t)?t.values:[]},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}});var Wu=function(t){return ps(t.position)||"end"},Gu=function(t){return"start"===t.position?4:"middle"===t.position?0:-4},qu=function(t,e,n){return function(i){var r=t?0:e;return"start"===i.position?r=t?-n:0:"middle"===i.position&&(r=(t?-n:e)/2),r}};Xs(nc.prototype,{initGrid:function(){this.xgrid=Ln([]),this.initGridLines(),this.initFocusGrid()},initGridLines:function(){var t=this,e=t.config;(e.grid_x_lines.length||e.grid_y_lines.length)&&(t.gridLines=t.main.insert("g",".".concat(Eo.chart).concat(e.grid_lines_front?" + *":"")).attr("clip-path",t.clipPathForGrid).attr("class","".concat(Eo.grid," ").concat(Eo.gridLines)),t.gridLines.append("g").attr("class",Eo.xgridLines),t.gridLines.append("g").attr("class",Eo.ygridLines),t.xgridLines=Ln([]))},updateXGrid:function(t){var e=this,n=e.config,i=n.axis_rotated,r=e.generateGridData(n.grid_x_type,e.x),a=e.isCategorized()?e.xAxis.tickOffset():0,o=function(t){return((e.zoomScale||e.x)(t)+a)*(i?-1:1)};e.xgridAttr=i?{x1:0,x2:e.width,y1:o,y2:o}:{x1:o,x2:o,y1:0,y2:e.height},e.xgrid=e.main.select(".".concat(Eo.xgrids)).selectAll(".".concat(Eo.xgrid)).data(r),e.xgrid.exit().remove(),e.xgrid=e.xgrid.enter().append("line").attr("class",Eo.xgrid).merge(e.xgrid),t||e.xgrid.each((function(){var t=An(this);Object.keys(e.xgridAttr).forEach((function(n){t.attr(n,e.xgridAttr[n]).style("opacity",(function(){return t.attr(i?"y1":"x1")===(i?e.height:0)?"0":"1"}))}))}))},updateYGrid:function(){var t=this,e=t.config,n=e.axis_rotated,i=t.yAxis.tickValues()||t.y.ticks(e.grid_y_ticks),r=function(e){return Math.ceil(t.y(e))};t.ygrid=t.main.select(".".concat(Eo.ygrids)).selectAll(".".concat(Eo.ygrid)).data(i),t.ygrid.exit().remove(),t.ygrid=t.ygrid.enter().append("line").attr("class",Eo.ygrid).merge(t.ygrid),t.ygrid.attr("x1",n?r:0).attr("x2",n?r:t.width).attr("y1",n?0:r).attr("y2",n?t.height:r),t.smoothLines(t.ygrid,"grid")},updateGrid:function(t){var e=this;e.gridLines||e.initGridLines(),e.grid.style("visibility",e.hasArcType()?"hidden":"visible"),e.hideGridFocus(),e.updateXGridLines(t),e.updateYGridLines(t)},updateXGridLines:function(t){var e=this,n=e.main,i=e.config,r=i.axis_rotated;i.grid_x_show&&e.updateXGrid(),e.xgridLines=n.select(".".concat(Eo.xgridLines)).selectAll(".".concat(Eo.xgridLine)).data(i.grid_x_lines),e.xgridLines.exit().transition().duration(t).style("opacity","0").remove();var a=e.xgridLines.enter().append("g");a.append("line").style("opacity","0"),a.append("text").attr("transform",r?"":"rotate(-90)").attr("dy",-5).style("opacity","0"),e.xgridLines=a.merge(e.xgridLines),e.xgridLines.attr("class",(function(t){return"".concat(Eo.xgridLine," ").concat(t.class||"").trim()})).select("text").attr("text-anchor",Wu).attr("dx",Gu).transition().duration(t).text((function(t){return t.text})).transition().style("opacity","1")},updateYGridLines:function(t){var e=this,n=e.main,i=e.config,r=i.axis_rotated;i.grid_y_show&&e.updateYGrid(),e.ygridLines=n.select(".".concat(Eo.ygridLines)).selectAll(".".concat(Eo.ygridLine)).data(i.grid_y_lines),e.ygridLines.exit().transition().duration(t).style("opacity","0").remove();var a=e.ygridLines.enter().append("g");a.append("line").style("opacity","0"),a.append("text").attr("transform",r?"rotate(-90)":"").style("opacity","0"),e.ygridLines=a.merge(e.ygridLines);var o=e.yv.bind(e);e.ygridLines.attr("class",(function(t){return"".concat(Eo.ygridLine," ").concat(t.class||"").trim()})).select("line").transition().duration(t).attr("x1",r?o:0).attr("x2",r?o:e.width).attr("y1",r?0:o).attr("y2",r?e.height:o).transition().style("opacity","1"),e.ygridLines.select("text").attr("text-anchor",Wu).attr("dx",Gu).transition().duration(t).attr("dy",-5).attr("x",qu(r,e.width,e.height)).attr("y",o).text((function(t){return t.text})).transition().style("opacity","1")},redrawGrid:function(t){var e=this,n=e.config.axis_rotated,i=e.xv.bind(e),r=e.xgridLines.select("line"),a=e.xgridLines.select("text");return r=(t?r.transition():r).attr("x1",n?0:i).attr("x2",n?e.width:i).attr("y1",n?i:0).attr("y2",n?i:e.height),a=(t?a.transition():a).attr("x",qu(!n,e.width,e.height)).attr("y",i).text((function(t){return t.text})),[(t?r.transition():r).style("opacity","1"),(t?a.transition():a).style("opacity","1")]},initFocusGrid:function(){var t=this,e=t.config,n=e.grid_front,i=".".concat(Eo[n&&t.gridLines?"gridLines":"chart"]).concat(n?" + *":"");t.grid=t.main.insert("g",i).attr("clip-path",t.clipPathForGrid).attr("class",Eo.grid),e.grid_x_show&&t.grid.append("g").attr("class",Eo.xgrids),e.grid_y_show&&t.grid.append("g").attr("class",Eo.ygrids),e.grid_focus_show&&(t.grid.append("g").attr("class",Eo.xgridFocus).append("line").attr("class",Eo.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&t.grid.append("g").attr("class",Eo.ygridFocus).append("line").attr("class",Eo.ygridFocus))},showGridFocus:function(t){var e=this,n=e.config,i=n.axis_rotated,r=t.filter((function(t){return t&&ps(e.getBaseValue(t))}));if(n.tooltip_show&&0!==r.length&&!e.hasType("bubble")&&!e.hasArcType()){var a=e.main.selectAll("line.".concat(Eo.xgridFocus,", line.").concat(Eo.ygridFocus)),o=n.grid_focus_edge&&!n.tooltip_grouped,s=e.xx.bind(e);a.style("visibility","visible").data(r.concat(r)).each((function(t){var n,r=An(this),a={x:s(t),y:e.getYScale(t.id)(t.value)};if(r.classed(Eo.xgridFocus))n=i?[null,a.x,o?a.y:e.width,a.x]:[a.x,o?a.y:null,a.x,e.height];else{var c="y2"===e.axis.getId(t.id);n=i?[a.y,o&&!c?a.x:null,a.y,o&&c?a.x:e.height]:[o&&c?a.x:null,a.y,o&&!c?a.x:e.width,a.y]}["x1","y1","x2","y2"].forEach((function(t,e){return r.attr(t,n[e])}))})),e.smoothLines(a,"grid")}},hideGridFocus:function(){"mouse"===this.inputType&&this.main.selectAll("line.".concat(Eo.xgridFocus,", line.").concat(Eo.ygridFocus)).style("visibility","hidden")},updategridFocus:function(){var t=this;if("touch"===t.inputType){var e=t.grid.select("line.".concat(Eo.xgridFocus)).datum();e&&t.showGridFocus([e])}else{var n=t.config.axis_rotated;t.main.select("line.".concat(Eo.xgridFocus)).attr("x1",n?0:-10).attr("x2",n?t.width:-10).attr("y1",n?-10:0).attr("y2",n?-10:t.height)}},generateGridData:function(t,e){var n=this.main.select(".".concat(Eo.axisX)).selectAll(".tick").size(),i=[];if("year"===t)for(var r=this.getXDomain(),a=r[0].getFullYear(),o=r[1].getFullYear(),s=a;s<=o;s++)i.push(new Date("".concat(s,"-01-01 00:00:00")));else(i=e.ticks(10)).length>n&&(i=i.filter((function(t){return(t+"").indexOf(".")<0})));return i},getGridFilterToRemove:function(t){return t?function(e){var n=!1;return(Es(t)?t.concat():[t]).forEach((function(t){("value"in t&&e.value===t.value||"class"in t&&e.class===t.class)&&(n=!0)})),n}:function(){return!0}},removeGridLines:function(t,e){var n=this.config,i=this.getGridFilterToRemove(t),r=e?Eo.xgridLines:Eo.ygridLines,a=e?Eo.xgridLine:Eo.ygridLine;this.main.select(".".concat(r)).selectAll(".".concat(a)).filter(i).transition().duration(n.transition_duration).style("opacity","0").remove();var o="grid_".concat(e?"x":"y","_lines");n[o]=n[o].filter((function(t){return!i(t)}))}}),Xs(nc.prototype,{initTooltip:function(){var t=this,e=t.config,n=e.tooltip_contents.bindto;if(t.tooltip=An(n),t.tooltip.empty()&&(t.tooltip=t.selectChart.style("position","relative").append("div").attr("class",Eo.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),e.tooltip_init_show){if(t.isTimeSeries()&&ys(e.tooltip_init_x)){var i,r,a=t.data.targets[0];for(e.tooltip_init_x=t.parseDate(e.tooltip_init_x),i=0;(r=a.values[i])&&r.x-e.tooltip_init_x!=0;i++);e.tooltip_init_x=i}t.tooltip.html(t.getTooltipHTML(t.data.targets.map((function(n){return t.addName(n.values[e.tooltip_init_x])})),t.axis.getXAxisTickFormat(),t.getYFormat(t.hasArcType(null,["radar"])),t.color)),n||t.tooltip.style("top",e.tooltip_init_position.top).style("left",e.tooltip_init_position.left).style("display","block")}t.bindTooltipResizePos()},getTooltipHTML:function(){for(var t,e,n=this,i=n.config,r=arguments.length,a=Array(r),o=0;o<r;o++)a[o]=arguments[o];return vs(i.tooltip_contents)?(t=i.tooltip_contents).call.apply(t,[n].concat(a)):(e=n).getTooltipContent.apply(e,a)},getTooltipContent:function(t,e,n,i){var a=this,o=a.config,s=o.tooltip_format_title||e,c=o.tooltip_format_name||function(t){return t},u=o.tooltip_format_value||(a.isStackNormalized()?function(t,e){return"".concat((100*e).toFixed(2),"%")}:n),l=o.tooltip_order,f=function(t){return a.isBubbleZType(t)?a.getBubbleZData(t.value,"z"):a.getBaseValue(t)},h=a.levelColor?function(t){return a.levelColor(t.value)}:function(t){return i(t)},d=o.tooltip_contents,g=d.template,p=a.mapToTargetIds();if(null===l&&o.data_groups.length){var v=a.orderTargets(a.data.targets).map((function(t){return t.id})).reverse();t.sort((function(t,e){var n=t?t.value:null,i=e?e.value:null;return n>0&&i>0&&(n=t.id?v.indexOf(t.id):null,i=e.id?v.indexOf(e.id):null),n-i}))}else/^(asc|desc)$/.test(l)?t.sort((function(t,e){var n=t?f(t):null,i=e?f(e):null;return"asc"===l?n-i:i-n})):vs(l)&&t.sort(l);var y,x,_,m,b,w=a.getTooltipContentTemplate(g),T=t.length;for(b=0;b<T;b++)if((x=t[b])&&(f(x)||0===f(x))){if(_s(y)){var A=Rs(s?s(x.x):x.x);y=Zs(w[0],{CLASS_TOOLTIP:Eo.tooltip,TITLE:ps(A)?g?A:'<tr><th colspan="2">'.concat(A,"</th></tr>"):""})}if(_=[x.ratio,x.id,x.index,t],m=Rs(u.apply(void 0,[f(x)].concat(Xa(_)))),a.isAreaRangeType(x)){var S=r(["high","low"].map((function(t){return Rs(u.apply(void 0,[a.getAreaRangeData(x,t)].concat(Xa(_))))})),2),k=S[0],M=S[1];m="<b>Mid:</b> ".concat(m," <b>High:</b> ").concat(k," <b>Low:</b> ").concat(M)}if(void 0!==m)if("continue"===function(){if(null===x.name)return"continue";var t=Rs(c.apply(void 0,[x.name].concat(Xa(_)))),e=h(x),n={CLASS_TOOLTIP_NAME:Eo.tooltipName+a.getTargetSelectorSuffix(x.id),COLOR:g||!a.patterns?e:'<svg><rect style="fill:'.concat(e,'" width="10" height="10"></rect></svg>'),NAME:t,VALUE:m};if(g&&Cs(d.text)){var i=p.indexOf(x.id);Object.keys(d.text).forEach((function(t){n[t]=d.text[t][i]}))}y+=Zs(w[1],n)}())continue}return"".concat(y,"</table>")},getTooltipContentTemplate:function(t){return(t||'<table class="{=CLASS_TOOLTIP}"><tbody>\n\t\t\t\t{=TITLE}\n\t\t\t\t{{<tr class="{=CLASS_TOOLTIP_NAME}">\n\t\t\t\t\t<td class="name">'.concat(this.patterns?"{=COLOR}":'<span style="background-color:{=COLOR}"></span>','{=NAME}</td>\n\t\t\t\t\t<td class="value">{=VALUE}</td>\n\t\t\t\t</tr>}}\n\t\t\t</tbody></table>')).replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},tooltipPosition:function(t,e,n,i){var a=this,o=a.config,s=a.hasType("gauge")&&!o.gauge_fullCircle,c=a.getSvgLeft(!0),u=r(Cn(i),2),l=u[0],f=u[1],h=c+a.currentWidth-a.getCurrentPaddingRight(!0),d=a.getCurrentPaddingLeft(!0);if(f+=20,a.hasArcType()){"touch"===a.inputType||a.hasType("radar")||(f+=s?a.height:a.height/2,l+=(a.width-(a.isLegendRight?a.getLegendWidth():0))/2)}else{var g=a.x(t[0].x);o.axis_rotated?(f=g+20,l+=c+100,h-=c):(f-=5,l=c+d+20+(a.zoomScale?l:g))}return l+e+15>h&&(l-=c+e+d),f+n>a.currentHeight&&(f-=s?3*n:n+30),f<0&&(f=0),{top:f,left:l}},showTooltip:function(t,e){var n=this,i=n.config,r=i.tooltip_contents.bindto,a=n.hasArcType(null,["radar"]),o=t.filter((function(t){return t&&ps(n.getBaseValue(t))}));if(0!==o.length&&i.tooltip_show){var s=n.tooltip.datum(),c=s||{},u=c.width,l=void 0===u?0:u,f=c.height,h=void 0===f?0:f,d=JSON.stringify(t);if(!s||s.current!==d){var g=t.concat().sort()[0].index;Os(i.tooltip_onshow,n,n.api,t),n.tooltip.html(n.getTooltipHTML(t,n.axis.getXAxisTickFormat(),n.getYFormat(a),n.color)).style("display",null).style("visibility",null).datum(s={index:g,current:d,width:l=n.tooltip.property("offsetWidth"),height:h=n.tooltip.property("offsetHeight")}),Os(i.tooltip_onshown,n,n.api,t),n._handleLinkedCharts(!0,g)}if(!r){var p=(i.tooltip_position||n.tooltipPosition).call(this,o,l,h,e);["top","left"].forEach((function(t){var e=p[t];n.tooltip.style(t,"".concat(e,"px")),"left"!==t||s.xPosInPercent||(s.xPosInPercent=e/n.currentWidth*100)}))}}},bindTooltipResizePos:function(){var t=this,e=t.resizeFunction,n=t.tooltip;e.add((function(){if("block"===n.style("display")){var e=t.currentWidth,i=n.datum(),r=i.width,a=e/100*i.xPosInPercent,o=e-(a+r);o<0&&(a+=o),n.style("left","".concat(a,"px"))}}))},hideTooltip:function(t){var e=this,n=e.api,i=e.config,r=e.tooltip;if("none"!==r.style("display")&&(!i.tooltip_doNotHide||t)){var a=JSON.parse(this.tooltip.datum().current);Os(i.tooltip_onhide,e,n,a),r.style("display","none").style("visibility","hidden").datum(null),Os(i.tooltip_onhidden,e,n,a)}},_handleLinkedCharts:function(t,e){var n=this;if(n.config.tooltip_linked){var i=n.config.tooltip_linked_name;(n.api.internal.charts||[]).forEach((function(r){if(r!==n.api){var a=r.internal.config,o=a.tooltip_linked,s=a.tooltip_linked_name,c=gs.body.contains(r.element);if(o&&i===s&&c){var u=r.internal.tooltip.data()[0],l=e!==(u&&u.index);try{t&&l?r.tooltip.show({index:e}):!t&&r.tooltip.hide()}catch(t){}}}}))}}}),Xs(nc.prototype,{initLegend:function(){var t=this,e=t.config;t.legendItemTextBox={},t.legendHasRendered=!1,t.legend=t.svg.append("g"),e.legend_show?(t.legend.attr("transform",t.getTranslate("legend")),t.updateLegend()):(t.legend.style("visibility","hidden"),t.hiddenLegendIds=t.mapToIds(t.data.targets))},updateLegend:function(t,e,n){var i=this,r=i.config,a=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};a.withTransition=Ls(a,"withTransition",!0),a.withTransitionForTransform=Ls(a,"withTransitionForTransform",!0),r.legend_contents_bindto&&r.legend_contents_template?i.updateLegendTemplate():i.updateLegendElement(t||i.mapToIds(i.data.targets),a,n),i.legend.selectAll(".".concat(Eo.legendItem)).classed(Eo.legendItemHidden,(function(t){return!i.isTargetToShow(t)})),i.updateScales(!1,!i.zoomScale),i.updateSvgSize(),i.transformAll(a.withTransitionForTransform,n),i.legendHasRendered=!0},updateLegendTemplate:function(){var t=this,e=t.config,n=An(e.legend_contents_bindto),i=e.legend_contents_template;if(!n.empty()){var r=t.mapToIds(t.data.targets),a=[],o="";r.forEach((function(e){var n=vs(i)?i.call(t,e,t.color(e),t.api.data(e)[0].values):Zs(i,{COLOR:t.color(e),TITLE:e});n&&(a.push(e),o+=n)}));var s=n.html(o).selectAll((function(){return this.childNodes})).data(a);t.setLegendItem(s),t.legend=n}},updateSizeForLegend:function(t){var e=this,n=e.config,i=t.width,r=t.height,a={top:e.isLegendTop?e.getCurrentPaddingTop()+n.legend_inset_y+5.5:e.currentHeight-r-e.getCurrentPaddingBottom()-n.legend_inset_y,left:e.isLegendLeft?e.getCurrentPaddingLeft()+n.legend_inset_x+.5:e.currentWidth-i-e.getCurrentPaddingRight()-n.legend_inset_x+.5};e.margin3={top:e.isLegendRight?0:e.isLegendInset?a.top:e.currentHeight-r,right:NaN,bottom:0,left:e.isLegendRight?e.currentWidth-i:e.isLegendInset?a.left:0}},transformLegend:function(t){(t?this.legend.transition():this.legend).attr("transform",this.getTranslate("legend"))},updateLegendStep:function(t){this.legendStep=t},updateLegendItemWidth:function(t){this.legendItemWidth=t},updateLegendItemHeight:function(t){this.legendItemHeight=t},updateLegendItemColor:function(t,e){this.legend.select(".".concat(Eo.legendItem,"-").concat(t," line")).style("stroke",e)},getLegendWidth:function(){var t=this;return t.config.legend_show?t.isLegendRight||t.isLegendInset?t.legendItemWidth*(t.legendStep+1):t.currentWidth:0},getLegendHeight:function(){var t=this;return t.config.legend_show?t.isLegendRight?t.currentHeight:Math.max(20,t.legendItemHeight)*(t.legendStep+1):0},opacityForLegend:function(t){return t.classed(Eo.legendItemHidden)?null:"1"},opacityForUnfocusedLegend:function(t){return t.classed(Eo.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this,i=n.mapToTargetIds(t);n.legend.selectAll(".".concat(Eo.legendItem)).filter((function(t){return i.indexOf(t)>=0})).classed(Eo.legendItemFocused,e).transition().duration(100).style("opacity",(function(){return(e?n.opacityForLegend:n.opacityForUnfocusedLegend).call(n,An(this))}))},revertLegend:function(){var t=this;t.legend.selectAll(".".concat(Eo.legendItem)).classed(Eo.legendItemFocused,!1).transition().duration(100).style("opacity",(function(){return t.opacityForLegend(An(this))}))},showLegend:function(t){var e=this,n=e.config;n.legend_show||(n.legend_show=!0,e.legend.style("visibility","visible"),!e.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("visibility","visible").transition().style("opacity",(function(){return e.opacityForLegend(An(this))}))},hideLegend:function(t){var e=this,n=e.config;n.legend_show&&ks(t)&&(n.legend_show=!1,e.legend.style("visibility","hidden")),e.addHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},clearLegendItemTextBoxCache:function(){this.legendItemTextBox={}},setLegendItem:function(t){var e=this,n=e.config,i="touch"===e.inputType,r=e.hasType("gauge");t.attr("class",(function(t){var n=An(this);return(!n.empty()&&n.attr("class")||"")+e.generateClass(Eo.legendItem,t)})).style("visibility",(function(t){return e.isLegendToShow(t)?"visible":"hidden"})).style("cursor","pointer").on("click",(function(t){Os(n.legend_item_onclick,e,t)||(ln.altKey?(e.api.hide(),e.api.show(t)):(e.api.toggle(t),!i&&e.isTargetToShow(t)?e.api.focus(t):e.api.revert())),i&&e.hideTooltip()})),i||t.on("mouseout",(function(t){Os(n.legend_item_onout,e,t)||(An(this).classed(Eo.legendItemFocused,!1),r&&e.undoMarkOverlapped(e,".".concat(Eo.gaugeValue)),e.api.revert())})).on("mouseover",(function(t){Os(n.legend_item_onover,e,t)||(An(this).classed(Eo.legendItemFocused,!0),r&&e.markOverlapped(t,e,".".concat(Eo.gaugeValue)),!e.transiting&&e.isTargetToShow(t)&&e.api.focus(t))}))},updateLegendElement:function(t,e){var n,i,r,a=this,o=a.config,s=o.legend_item_tile_width+5,c=0,u=0,l=0,f={},h={},d={},g=[0],p={},v=0,y=a.isLegendRight||a.isLegendInset,x=t.filter((function(t){return!ms(o.data_names[t])||null!==o.data_names[t]})),_=e.withTransition,m=function(t,e,n){var i,r=n===x.length-1,_=function(t,e){return a.legendItemTextBox[e]||(a.legendItemTextBox[e]=a.getTextRect(t,Eo.legendItem)),a.legendItemTextBox[e]}(t,e),m=_.width+s+(r&&!y?0:10)+o.legend_padding,b=_.height+4,w=y?b:m,T=y?a.getLegendHeight():a.getLegendWidth(),A=function(t,e){e||(i=(T-l-w)/2)<10&&(i=(T-w)/2,l=0,v++),p[t]=v,g[v]=a.isLegendInset?10:i,f[t]=l,l+=w};if(0===n&&(l=0,v=0,c=0,u=0),o.legend_show&&!a.isLegendToShow(e))return h[e]=0,d[e]=0,p[e]=0,void(f[e]=0);h[e]=m,d[e]=b,(!c||m>=c)&&(c=m),(!u||b>=u)&&(u=b);var S=y?u:c;o.legend_equally?(Object.keys(h).forEach((function(t){return h[t]=c})),Object.keys(d).forEach((function(t){return d[t]=u})),(i=(T-S*x.length)/2)<10?(l=0,v=0,x.forEach((function(t){return A(t)}))):A(e,!0)):A(e)};a.isLegendInset&&(v=o.legend_inset_step?o.legend_inset_step:x.length,a.updateLegendStep(v)),a.isLegendRight?(n=function(t){return c*p[t]},i=function(t){return g[p[t]]+f[t]}):a.isLegendInset?(n=function(t){return c*p[t]+10},i=function(t){return g[p[t]]+f[t]}):(n=function(t){return g[p[t]]+f[t]},i=function(t){return u*p[t]});var b=function(t,e){return n(t,e)+4+o.legend_item_tile_width},w=function(t,e){return n(t,e)},T=function(t,e){return n(t,e)-2},A=function(t,e){return n(t,e)-2+o.legend_item_tile_width},S=function(t,e){return i(t,e)+9},k=function(t,e){return i(t,e)-5},M=function(t,e){return i(t,e)+4},E=a.legend.selectAll(".".concat(Eo.legendItem)).data(x).enter().append("g");a.setLegendItem(E),E.append("text").text((function(t){return ms(o.data_names[t])?o.data_names[t]:t})).each((function(t,e){m(this,t,e)})).style("pointer-events","none").attr("x",y?b:-200).attr("y",y?-200:S),E.append("rect").attr("class",Eo.legendItemEvent).style("fill-opacity","0").attr("x",y?w:-200).attr("y",y?-200:k);var C=a.config.legend_usePoint;if(C){var L=[];E.append((function(t){var e=Ms(o.point_pattern)?o.point_pattern:[o.point_type];-1===L.indexOf(t)&&L.push(t);var n=e[L.indexOf(t)%e.length];return"rectangle"===n&&(n="rect"),gs.createElementNS(de.svg,a.hasValidPointType(n)?n:"use")})).attr("class",Eo.legendItemPoint).style("fill",(function(t){return a.color(t)})).style("pointer-events","none").attr("href",(function(t,e,n){return"use"===n[e].nodeName.toLowerCase()?"#".concat(a.datetimeId,"-point-").concat(t):void 0}))}else E.append("line").attr("class",Eo.legendItemTile).style("stroke",a.color).style("pointer-events","none").attr("x1",y?T:-200).attr("y1",y?-200:M).attr("x2",y?A:-200).attr("y2",y?-200:M).attr("stroke-width",o.legend_item_tile_height);r=a.legend.select(".".concat(Eo.legendBackground," rect")),a.isLegendInset&&c>0&&0===r.size()&&(r=a.legend.insert("g",".".concat(Eo.legendItem)).attr("class",Eo.legendBackground).append("rect"));var O=a.legend.selectAll("text").data(x).text((function(t){return ms(o.data_names[t])?o.data_names[t]:t})).each((function(t,e){m(this,t,e)}));(_?O.transition():O).attr("x",b).attr("y",S);var R=a.legend.selectAll("rect.".concat(Eo.legendItemEvent)).data(x);if((_?R.transition():R).attr("width",(function(t){return h[t]})).attr("height",(function(t){return d[t]})).attr("x",w).attr("y",k),C){var I=a.legend.selectAll(".".concat(Eo.legendItemPoint)).data(x);(_?I.transition():I).each((function(){var t,e,n,i=this.nodeName.toLowerCase(),r=a.config.point_r,o="x",s="y",c=2,u=2.5;if("circle"===i){var l=.2*r;o="cx",s="cy",t=r+l,c=2*r,u=-l}else if("rect"===i){var f=2.5*r;e=f,n=f,u=3}An(this).attr(o,(function(t){return T(t)+c})).attr(s,(function(t){return M(t)-u})).attr("r",t).attr("width",e).attr("height",n)}))}else{var D=a.legend.selectAll("line.".concat(Eo.legendItemTile)).data(x);(_?D.transition():D).style("stroke",a.levelColor?function(t){return a.levelColor(a.cache[t].values[0].value)}:a.color).attr("x1",T).attr("y1",M).attr("x2",A).attr("y2",M)}r&&(_?r.transition():r).attr("height",a.getLegendHeight()-12).attr("width",c*(v+1)+10),a.updateLegendItemWidth(c),a.updateLegendItemHeight(u),a.updateLegendStep(v)}});var $u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"left",e=arguments.length>1?arguments[1]:void 0,n=xs(e);return t.indexOf("center")>-1?n?e/2:"middle":t.indexOf("right")>-1?n?e:"end":n?0:"start"};Xs(nc.prototype,{initTitle:function(){var t=this;if(t.config.title_text){t.title=t.svg.append("g");var e=t.title.append("text").style("text-anchor",$u(t.config.title_position)).attr("class",Eo.title);Is(e,t.config.title_text,[.3,1.5])}},redrawTitle:function(){var t=this;if(t.title){var e=t.yForTitle.call(t);/g/i.test(t.title.node().tagName)?t.title.attr("transform","translate(".concat($u(t.config.title_position,t.currentWidth),", ").concat(e,")")):t.title.attr("x",t.xForTitle.call(t)).attr("y",e)}},xForTitle:function(){var t,e=this,n=e.config,i=n.title_position||"left",r=e.getTextRect(e.title,Eo.title).width;return/(right|center)/.test(i)?(t=e.currentWidth-r,i.indexOf("right")>=0?t=e.currentWidth-r-n.title_padding.right:i.indexOf("center")>=0&&(t=(e.currentWidth-r)/2)):t=n.title_padding.left||0,t},yForTitle:function(){return(this.config.title_padding.top||0)+this.getTextRect(this.title,Eo.title).height},getTitlePadding:function(){return this.yForTitle()+(this.config.title_padding.bottom||0)}}),Xs(nc.prototype,{initClip:function(){var t=this;t.clipId="".concat(t.datetimeId,"-clip"),t.clipIdForXAxis="".concat(t.clipId,"-xaxis"),t.clipIdForYAxis="".concat(t.clipId,"-yaxis"),t.clipIdForGrid="".concat(t.clipId,"-grid"),t.clipPath=t.getClipPath(t.clipId),t.clipPathForXAxis=t.getClipPath(t.clipIdForXAxis),t.clipPathForYAxis=t.getClipPath(t.clipIdForYAxis),t.clipPathForGrid=t.getClipPath(t.clipIdForGrid)},getClipPath:function(t){var e=this.config;if(!e.clipPath&&/-clip$/.test(t)||!e.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!e.axis_y_clipPath&&/-clip-yaxis$/.test(t))return null;var n=!!ds.navigator&&ds.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0;return"url(".concat(n?"":gs.URL.split("#")[0],"#").concat(t,")")},appendClip:function(t,e){return t.append("clipPath").attr("id",e).append("rect")},getAxisClipX:function(t){var e=Math.max(30,this.margin.left);return t?-(1+e):-(e-1)},getAxisClipY:function(t){return t?-20:-this.margin.top},getXAxisClipX:function(){return this.getAxisClipX(!this.config.axis_rotated)},getXAxisClipY:function(){return this.getAxisClipY(!this.config.axis_rotated)},getYAxisClipX:function(){return this.config.axis_y_inner?-1:this.getAxisClipX(this.config.axis_rotated)},getYAxisClipY:function(){return this.getAxisClipY(this.config.axis_rotated)},getAxisClipWidth:function(t){var e=Math.max(30,this.margin.left),n=Math.max(30,this.margin.right);return t?this.width+2+e+n:this.margin.left+20},getAxisClipHeight:function(t){return(t?this.margin.bottom:this.margin.top+this.height)+20},getXAxisClipWidth:function(){return this.getAxisClipWidth(!this.config.axis_rotated)},getXAxisClipHeight:function(){return this.getAxisClipHeight(!this.config.axis_rotated)},getYAxisClipWidth:function(){return this.getAxisClipWidth(this.config.axis_rotated)+(this.config.axis_y_inner?20:0)},getYAxisClipHeight:function(){return this.getAxisClipHeight(this.config.axis_rotated)},updateXAxisTickClip:function(){var t=this,e=t.getHorizontalAxisHeight("x");t.clipIdForXAxisTickTexts="".concat(t.clipId,"-xaxisticktexts"),t.clipPathForXAxisTickTexts=t.getClipPath(t.clipIdForXAxisTickTexts),!t.config.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&e!==t.xAxisHeight&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.xAxisHeight=e},setXAxisTickClipWidth:function(){var t=this,e=t.config,n=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&n){var i=Math.sin(Math.PI/180*Math.abs(n));t.xAxisTickClipPathMaxWidth=(t.getHorizontalAxisHeight("x")-20)/i}else t.xAxisTickClipPathMaxWidth=null},setXAxisTickTextClipPathWidth:function(){this.svg&&this.svg.select("#".concat(this.clipIdForXAxisTickTexts," rect")).attr("width",this.xAxisTickClipPathMaxWidth).attr("height",30)}}),Xs(nc.prototype,{initRegion:function(){this.region=this.main.append("g").attr("clip-path",this.clipPath).attr("class",Eo.regions)},updateRegion:function(t){var e=this,n=e.config;e.region.style("visibility",e.hasArcType()?"hidden":"visible"),e.mainRegion=e.main.select(".".concat(Eo.regions)).selectAll(".".concat(Eo.region)).data(n.regions),e.mainRegion.exit().transition().duration(t).style("opacity","0").remove(),e.mainRegion=e.mainRegion.enter().append("g").merge(e.mainRegion).attr("class",e.classRegion.bind(e)),e.mainRegion.append("rect").style("fill-opacity","0")},redrawRegion:function(t){var e=this,n=e.mainRegion.select("rect");return n=(t?n.transition():n).attr("x",e.regionX.bind(e)).attr("y",e.regionY.bind(e)).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),[(t?n.transition():n).style("fill-opacity",(function(t){return ps(t.opacity)?t.opacity:"0.1"})).on("end",(function(){An(this.parentNode).selectAll("rect:not([x])").remove()}))]},getRegionXY:function(t,e){var n=this,i=n.config.axis_rotated,r="x"===t,a="start",o=0;return"y"===e.axis||"y2"===e.axis?(!r&&(a="end"),(r?i:!i)&&a in e&&(o=(0,n[e.axis])(e[a]))):(r?!i:i)&&a in e&&(o=(n.zoomScale||n.x)(n.isTimeSeries()?n.parseDate(e[a]):e[a])),o},regionX:function(t){return this.getRegionXY("x",t)},regionY:function(t){return this.getRegionXY("y",t)},getRegionSize:function(t,e){var n=this,i=n.config.axis_rotated,r="width"===t,a=n[r?"regionX":"regionY"](e),o="end",s=n[t];return"y"===e.axis||"y2"===e.axis?(!r&&(o="start"),(r?i:!i)&&o in e&&(s=(0,n[e.axis])(e[o]))):(r?!i:i)&&o in e&&(s=(n.zoomScale||n.x)(n.isTimeSeries()?n.parseDate(e[o]):e[o])),s<a?0:s-a},regionWidth:function(t){return this.getRegionSize("width",t)},regionHeight:function(t){return this.getRegionSize("height",t)},isRegionOnX:function(t){return!t.axis||"x"===t.axis}}),Xs(nc.prototype,{drag:function(t){var e=this,n=e.config,i=e.main;if(!e.hasArcType()&&n.data_selection_enabled&&(!n.zoom_enabled||e.zoom.altDomain)&&n.data_selection_multiple){var a=r(e.dragStart,2),o=a[0],s=a[1],c=r(t,2),u=c[0],l=c[1],f=Math.min(o,u),h=Math.max(o,u),d=n.data_selection_grouped?e.margin.top:Math.min(s,l),g=n.data_selection_grouped?e.height:Math.max(s,l);i.select(".".concat(Eo.dragarea)).attr("x",f).attr("y",d).attr("width",h-f).attr("height",g-d),i.selectAll(".".concat(Eo.shapes)).selectAll(".".concat(Eo.shape)).filter((function(t){return n.data_selection_isselectable(t)})).each((function(t,n){var i,r=An(this),a=r.classed(Eo.SELECTED),o=r.classed(Eo.INCLUDED),s=!1;if(r.classed(Eo.circle)){var c=1*r.attr("cx"),u=1*r.attr("cy");i=e.togglePoint,s=f<c&&c<h&&d<u&&u<g}else{if(!r.classed(Eo.bar))return;var l=function(t){var e=t.getBoundingClientRect(),n=e.width,i=e.height,r=Ds(t);return{x:r[0].x,y:Math.min(r[0].y,r[1].y),width:n,height:i}}(this),p=l.x,v=(u=l.y,l.width),y=l.height;i=e.togglePath,s=!(h<p||p+v<f||g<u||u+y<d)}s^o&&(r.classed(Eo.INCLUDED,!o),r.classed(Eo.SELECTED,!a),i.call(e,!a,r,t,n))}))}},dragstart:function(t){var e=this,n=e.config;e.hasArcType()||!n.data_selection_enabled||(e.dragStart=t,e.main.select(".".concat(Eo.chart)).append("rect").attr("class",Eo.dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend:function(){var t=this,e=t.config;t.hasArcType()||!e.data_selection_enabled||(t.main.select(".".concat(Eo.dragarea)).transition().duration(100).style("opacity","0").remove(),t.main.selectAll(".".concat(Eo.shape)).classed(Eo.INCLUDED,!1),t.setDragStatus(!1))},setDragStatus:function(t){this.dragging=t}}),Xs(nc.prototype,{selectPoint:function(t,e,n){var i=this,r=i.config,a=r.axis_rotated,o=(a?i.circleY:i.circleX).bind(i),s=(a?i.circleX:i.circleY).bind(i),c=i.pointSelectR.bind(i);Os(r.data_onselected,i.api,e,t.node()),i.main.select(".".concat(Eo.selectedCircles).concat(i.getTargetSelectorSuffix(e.id))).selectAll(".".concat(Eo.selectedCircle,"-").concat(n)).data([e]).enter().append("circle").attr("class",(function(){return i.generateClass(Eo.selectedCircle,n)})).attr("cx",o).attr("cy",s).attr("stroke",i.color).attr("r",(function(t){return 1.4*i.pointSelectR(t)})).transition().duration(100).attr("r",c)},unselectPoint:function(t,e,n){Os(this.config.data_onunselected,this.api,e,t.node()),this.main.select(".".concat(Eo.selectedCircles).concat(this.getTargetSelectorSuffix(e.id))).selectAll(".".concat(Eo.selectedCircle,"-").concat(n)).transition().duration(100).attr("r",0).remove()},togglePoint:function(t,e,n,i){this["".concat(t?"":"un","selectPoint")](e,n,i)},selectPath:function(t,e){var n=this,i=n.config;Os(i.data_onselected,n,e,t.node()),i.interaction_brighten&&t.transition().duration(100).style("fill",(function(){return Ei(n.color(e)).brighter(.75)}))},unselectPath:function(t,e){var n=this,i=n.config;Os(i.data_onunselected,n,e,t.node()),i.interaction_brighten&&t.transition().duration(100).style("fill",(function(){return n.color(e)}))},togglePath:function(t,e,n,i){this["".concat(t?"":"un","selectPath")](e,n,i)},getToggle:function(t,e){return"path"===t.nodeName?this.togglePath:this.isStepType(e)?function(){}:this.togglePoint},toggleShape:function(t,e,n){var i,r=this,a=r.config,o=An(t),s=o.classed(Eo.SELECTED),c=r.getToggle(t,e).bind(r);if(a.data_selection_enabled&&a.data_selection_isselectable(e)){if(!a.data_selection_multiple){var u=".".concat(Eo.shapes);a.data_selection_grouped&&(u+=r.getTargetSelectorSuffix(e.id)),r.main.selectAll(u).selectAll(".".concat(Eo.shape)).each((function(t,e){var n=An(this);n.classed(Eo.SELECTED)&&(i=n,c(!1,n.classed(Eo.SELECTED,!1),t,e))}))}i&&i.node()===o.node()||(o.classed(Eo.SELECTED,!s),c(!s,o,e,n))}}}),Xs(nc.prototype,{initBrush:function(){var t=this,e=t.config,n=e.axis_rotated;t.brush=fs(n?Jo:Ko);var i,r,a=function(){t.redrawForBrush()};t.brush.on("start",(function(){"touch"===t.inputType&&t.hideTooltip(),a()})).on("brush",a).on("end",(function(){i=t.x.orgDomain()})),t.brush.updateResize=function(){var e=this;r&&clearTimeout(r),r=setTimeout((function(){var n=e.getSelection();i&&ls(n.node())&&e.move(n,i.map(t.subX.orgScale()))}),0)},t.brush.update=function(){return 0===this.extent()()[1].filter((function(t){return isNaN(t)})).length&&t.context&&t.context.select(".".concat(Eo.brush)).call(this),this},t.brush.scale=function(i){var r,a,o=e.subchart_size_height||(r=t.svg.select(".".concat(Eo.brush," .overlay")),a={width:0,height:0},r.size()&&(a.width=+r.attr("width"),a.height=+r.attr("height")),a[n?"width":"height"]),s=t.getExtent();!s&&i.range?s=[[0,0],[i.range()[1],o]]:Es(s)&&(s=s.map((function(t,e){return[t,e>0?o:e]}))),n&&s[1].reverse(),this.extent(s),this.update()},t.brush.getSelection=function(){return t.context?t.context.select(".".concat(Eo.brush)):An([])}},initSubchart:function(){var t=this,e=t.config,n=e.subchart_show?"visible":"hidden",i="".concat(t.clipId,"-subchart"),r=t.getClipPath(i);t.clipIdForSubchart=i,t.appendClip(t.defs,i),t.initBrush(),t.context=t.svg.append("g").attr("transform",t.getTranslate("context"));var a=t.context;a.style("visibility",n),a.append("g").attr("clip-path",r).attr("class",Eo.chart),t.hasType("bar")&&a.select(".".concat(Eo.chart)).append("g").attr("class",Eo.chartBars),a.select(".".concat(Eo.chart)).append("g").attr("class",Eo.chartLines),a.append("g").attr("clip-path",r).attr("class",Eo.brush).call(t.brush),t.axes.subx=a.append("g").attr("class",Eo.axisX).attr("transform",t.getTranslate("subx")).attr("clip-path",e.axis_rotated?"":t.clipPathForXAxis).style("visibility",e.subchart_axis_x_show?n:"hidden")},updateTargetsForSubchart:function(t){var e=this,n=e.context,i=e.config,r=e.classChartBar.bind(e),a=e.classBars.bind(e),o=e.classChartLine.bind(e),s=e.classLines.bind(e),c=e.classAreas.bind(e);if(i.subchart_show){var u=n.select(".".concat(Eo.chartBars)).selectAll(".".concat(Eo.chartBar)).data(t).attr("class",r);u.enter().append("g").style("opacity","0").attr("class",r).merge(u).append("g").attr("class",a);var l=n.select(".".concat(Eo.chartLines)).selectAll(".".concat(Eo.chartLine)).data(t).attr("class",o),f=l.enter().append("g").style("opacity","0").attr("class",o).merge(l);f.append("g").attr("class",s),e.hasType("area")&&f.append("g").attr("class",c),n.selectAll(".".concat(Eo.brush," rect")).attr(i.axis_rotated?"width":"height",i.axis_rotated?e.width2:e.height2)}},updateBarForSubchart:function(t){var e=this;e.contextBar=e.context.selectAll(".".concat(Eo.bars)).selectAll(".".concat(Eo.bar)).data(e.barData.bind(e)),e.contextBar.exit().transition().duration(t).style("opacity","0").remove(),e.contextBar=e.contextBar.enter().append("path").attr("class",e.classBar.bind(e)).style("stroke","none").style("fill",e.color).merge(e.contextBar).style("opacity",e.initialOpacity.bind(e))},redrawBarForSubchart:function(t,e,n){(e?this.contextBar.transition(zs()).duration(n):this.contextBar).attr("d",t).style("opacity","1")},updateLineForSubchart:function(t){var e=this;e.contextLine=e.context.selectAll(".".concat(Eo.lines)).selectAll(".".concat(Eo.line)).data(e.lineData.bind(e)),e.contextLine.exit().transition().duration(t).style("opacity","0").remove(),e.contextLine=e.contextLine.enter().append("path").attr("class",e.classLine.bind(e)).style("stroke",e.color).merge(e.contextLine).style("opacity",e.initialOpacity.bind(e))},redrawLineForSubchart:function(t,e,n){(e?this.contextLine.transition(zs()).duration(n):this.contextLine).attr("d",t).style("opacity","1")},updateAreaForSubchart:function(t){var e=this;e.contextArea=e.context.selectAll(".".concat(Eo.areas)).selectAll(".".concat(Eo.area)).data(e.lineData.bind(e)),e.contextArea.exit().transition().duration(t).style("opacity","0").remove(),e.contextArea=e.contextArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",(function(){return e.orgAreaOpacity=An(this).style("opacity"),"0"})).merge(e.contextArea).style("opacity","0")},redrawAreaForSubchart:function(t,e,n){(e?this.contextArea.transition(zs()).duration(n):this.contextArea).attr("d",t).style("fill",this.color).style("opacity",this.orgAreaOpacity)},redrawSubchart:function(t,e,n){var i=this,r=i.config;i.context.style("visibility",r.subchart_show?"visible":"hidden"),r.subchart_show&&(ln&&"zoom"===ln.type&&i.brush.update(),t&&(!Ns(i)&&i.brush.update(),Object.keys(n.type).forEach((function(t){var r=Bs(t),a=i["generateDraw".concat(r)](n.indices[t],!0);i["update".concat(r,"ForSubchart")](e),i["redraw".concat(r,"ForSubchart")](a,e,e)}))))},redrawForBrush:function(){var t=this;t.redraw({withTransition:!1,withY:t.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t.config.subchart_onbrush.call(t.api,t.x.orgDomain())},transformContext:function(t,e){var n;e&&e.axisSubX?n=e.axisSubX:(n=this.context.select(".".concat(Eo.axisX)),t&&(n=n.transition())),this.context.attr("transform",this.getTranslate("context")),n.attr("transform",this.getTranslate("subx"))},getExtent:function(){var t=this,e=t.config.axis_x_extent;return e&&(vs(e)?e=e(t.getXDomain(t.data.targets),t.subX):t.isTimeSeries()&&e.every(isNaN)&&(e=e.map((function(e){return t.subX(t.parseDate(e))})))),e}});var Zu=function(t){return function(){return t}};function Ku(t,e,n){this.target=t,this.type=e,this.transform=n}function Ju(t,e,n){this.k=t,this.x=e,this.y=n}Ju.prototype={constructor:Ju,scale:function(t){return 1===t?this:new Ju(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Ju(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 Qu=new Ju(1,0,0);function tl(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Qu;return t.__zoom}function el(){ln.stopImmediatePropagation()}tl.prototype=Ju.prototype;var nl=function(){ln.preventDefault(),ln.stopImmediatePropagation()};function il(){return!ln.ctrlKey&&!ln.button}function rl(){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 al(){return this.__zoom||Qu}function ol(){return-ln.deltaY*(1===ln.deltaMode?.05:ln.deltaMode?1:.002)}function sl(){return navigator.maxTouchPoints||"ontouchstart"in this}function cl(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}Xs(nc.prototype,{initZoom:function(){this.zoomScale=null,this.generateZoom(),this.initZoomBehaviour()},bindZoomEvent:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this,n=e.config.zoom_enabled;e.redrawEventRect();var i=e.main.select(".".concat(Eo.eventRects));n&&t?!e.config.subchart_show&&e.bindZoomOnEventRect(i,n.type):!1===t&&(e.api.unzoom(),i.on(".zoom",null).on(".drag",null))},generateZoom:function(){var t=this,e=t.config,n=function(){function t(t){t.property("__zoom",al).on("wheel.zoom",s).on("mousedown.zoom",c).on("dblclick.zoom",u).filter(_).on("touchstart.zoom",l).on("touchmove.zoom",f).on("touchend.zoom touchcancel.zoom",h).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(t,e){return(e=Math.max(m[0],Math.min(m[1],e)))===t.k?t:new Ju(e,t.x,t.y)}function n(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 Ju(t.k,i,r)}function i(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function r(t,e,n){t.on("start.zoom",(function(){a(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){a(this,arguments).end()})).tween("zoom",(function(){var t=this,r=arguments,o=a(t,r),s=v.apply(t,r),c=null==n?i(s):"function"==typeof n?n.apply(t,r):n,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),l=t.__zoom,f="function"==typeof e?e.apply(t,r):e,h=T(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=h(t),n=u/e[2];t=new Ju(n,c[0]-e[0]*n,c[1]-e[1]*n)}o.zoom(null,t)}}))}function a(t,e,n){return!n&&t.__zooming||new o(t,e)}function o(t,e){this.that=t,this.args=e,this.active=0,this.extent=v.apply(t,e),this.taps=0}function s(){function t(){i.wheel=null,i.end()}if(p.apply(this,arguments)){var i=a(this,arguments),r=this.__zoom,o=Math.max(m[0],Math.min(m[1],r.k*Math.pow(2,x.apply(this,arguments)))),s=Cn(this);if(i.wheel)(i.mouse[0][0]!==s[0]||i.mouse[0][1]!==s[1])&&(i.mouse[1]=r.invert(i.mouse[0]=s)),clearTimeout(i.wheel);else{if(r.k===o)return;i.mouse=[s,r.invert(s)],li(this),i.start()}nl(),i.wheel=setTimeout(t,150),i.zoom("mouse",y(n(e(r,o),i.mouse[0],i.mouse[1]),i.extent,b))}}function c(){function t(){if(nl(),!i.moved){var t=ln.clientX-s,e=ln.clientY-c;i.moved=t*t+e*e>S}i.zoom("mouse",y(n(i.that.__zoom,i.mouse[0]=Cn(i.that),i.mouse[1]),i.extent,b))}function e(){r.on("mousemove.zoom mouseup.zoom",null),Ro(ln.view,i.moved),nl(),i.end()}if(!g&&p.apply(this,arguments)){var i=a(this,arguments,!0),r=An(ln.view).on("mousemove.zoom",t,!0).on("mouseup.zoom",e,!0),o=Cn(this),s=ln.clientX,c=ln.clientY;Oo(ln.view),el(),i.mouse=[o,this.__zoom.invert(o)],li(this),i.start()}}function u(){if(p.apply(this,arguments)){var i=this.__zoom,a=Cn(this),o=i.invert(a),s=i.k*(ln.shiftKey?.5:2),c=y(n(e(i,s),a,o),v.apply(this,arguments),b);nl(),w>0?An(this).transition().duration(w).call(r,c,a):An(this).call(t.transform,c)}}function l(){if(p.apply(this,arguments)){var t,e,n,i,r=ln.touches,o=r.length,s=a(this,arguments,ln.changedTouches.length===o);for(el(),e=0;e<o;++e)n=r[e],i=[i=On(this,r,n.identifier),this.__zoom.invert(i),n.identifier],s.touch0?!s.touch1&&s.touch0[2]!==i[2]&&(s.touch1=i,s.taps=0):(s.touch0=i,t=!0,s.taps=1+!!d);d&&(d=clearTimeout(d)),t&&(s.taps<2&&(d=setTimeout((function(){d=null}),500)),li(this),s.start())}}function f(){if(this.__zooming){var t,i,r,o,s=a(this,arguments),c=ln.changedTouches,u=c.length;for(nl(),d&&(d=clearTimeout(d)),s.taps=0,t=0;t<u;++t)i=c[t],r=On(this,c,i.identifier),s.touch0&&s.touch0[2]===i.identifier?s.touch0[0]=r:s.touch1&&s.touch1[2]===i.identifier&&(s.touch1[0]=r);if(i=s.that.__zoom,s.touch1){var l=s.touch0[0],f=s.touch0[1],h=s.touch1[0],g=s.touch1[1],p=(p=h[0]-l[0])*p+(p=h[1]-l[1])*p,v=(v=g[0]-f[0])*v+(v=g[1]-f[1])*v;i=e(i,Math.sqrt(p/v)),r=[(l[0]+h[0])/2,(l[1]+h[1])/2],o=[(f[0]+g[0])/2,(f[1]+g[1])/2]}else{if(!s.touch0)return;r=s.touch0[0],o=s.touch0[1]}s.zoom("touch",y(n(i,r,o),s.extent,b))}}function h(){if(this.__zooming){var t,e,n=a(this,arguments),i=ln.changedTouches,r=i.length;for(el(),g&&clearTimeout(g),g=setTimeout((function(){g=null}),500),t=0;t<r;++t)e=i[t],n.touch0&&n.touch0[2]===e.identifier?delete n.touch0:n.touch1&&n.touch1[2]===e.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),2===n.taps){var o=An(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}var d,g,p=il,v=rl,y=cl,x=ol,_=sl,m=[0,1/0],b=[[-1/0,-1/0],[1/0,1/0]],w=250,T=zr,A=Nn("start","zoom","end"),S=0;return t.transform=function(t,e,n){var i=t.selection?t.selection():t;i.property("__zoom",al),t===i?i.interrupt().each((function(){a(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})):r(t,e,n)},t.scaleBy=function(e,n,i){t.scaleTo(e,(function(){var t=this.__zoom.k,e="function"==typeof n?n.apply(this,arguments):n;return t*e}),i)},t.scaleTo=function(r,a,o){t.transform(r,(function(){var t=v.apply(this,arguments),r=this.__zoom,s=null==o?i(t):"function"==typeof o?o.apply(this,arguments):o,c=r.invert(s),u="function"==typeof a?a.apply(this,arguments):a;return y(n(e(r,u),s,c),t,b)}),o)},t.translateBy=function(e,n,i){t.transform(e,(function(){return y(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof i?i.apply(this,arguments):i),v.apply(this,arguments),b)}))},t.translateTo=function(e,n,r,a){t.transform(e,(function(){var t=v.apply(this,arguments),e=this.__zoom,o=null==a?i(t):"function"==typeof a?a.apply(this,arguments):a;return y(Qu.translate(o[0],o[1]).scale(e.k).translate("function"==typeof n?-n.apply(this,arguments):-n,"function"==typeof r?-r.apply(this,arguments):-r),t,b)}),a)},o.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){vn(new Ku(t,e,this.that.__zoom),A.apply,A,[e,this.that,this.args])}},t.wheelDelta=function(e){return arguments.length?(x="function"==typeof e?e:Zu(+e),t):x},t.filter=function(e){return arguments.length?(p="function"==typeof e?e:Zu(!!e),t):p},t.touchable=function(e){return arguments.length?(_="function"==typeof e?e:Zu(!!e),t):_},t.extent=function(e){return arguments.length?(v="function"==typeof e?e:Zu([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),t):v},t.scaleExtent=function(e){return arguments.length?(m[0]=+e[0],m[1]=+e[1],t):[m[0],m[1]]},t.translateExtent=function(e){return arguments.length?(b[0][0]=+e[0][0],b[1][0]=+e[1][0],b[0][1]=+e[0][1],b[1][1]=+e[1][1],t):[[b[0][0],b[0][1]],[b[1][0],b[1][1]]]},t.constrain=function(e){return arguments.length?(y=e,t):y},t.duration=function(e){return arguments.length?(w=+e,t):w},t.interpolate=function(e){return arguments.length?(T=e,t):T},t.on=function(){var e=A.on.apply(A,arguments);return e===A?t:e},t.clickDistance=function(e){return arguments.length?(S=(e=+e)*e,t):Math.sqrt(S)},t}().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));n.orgScaleExtent=function(){var n=e.zoom_extent||[1,10];return[n[0],Math.max(t.getMaxDataCount()/n[1],n[1])]},n.updateScaleExtent=function(){var e=As(t.x.orgDomain())/As(t.getZoomDomain()),n=this.orgScaleExtent();return this.scaleExtent([n[0]*e,n[1]*e]),this},n.updateTransformScale=function(n){t.orgXScale&&t.orgXScale.range(t.x.range());var i=n[e.axis_rotated?"rescaleY":"rescaleX"](t.orgXScale||t.x),r=t.trimXDomain(i.domain()),a=e.zoom_rescale;i.domain(r,t.orgXDomain),t.zoomScale=t.getCustomizedScale(i),t.xAxis.scale(t.zoomScale),a&&(!t.orgXScale&&(t.orgXScale=t.x.copy()),t.x.domain(r))},t.zoom=n},onZoomStart:function(){var t=ln.sourceEvent;t&&(this.zoom.startEvent=t,Os(this.config.zoom_onzoomstart,this.api,t))},onZoom:function(){var t=this,e=t.config,n=ln,i=n.sourceEvent;if(e.zoom_enabled&&n.sourceEvent&&0!==t.filterTargetsToShow(t.data.targets).length&&(t.zoomScale||!(i.type.indexOf("touch")>-1)||1!==i.touches.length)){var r="mousemove"===i.type,a=i.wheelDelta<0,o=n.transform;!r&&a&&t.x.domain().every((function(e,n){return e!==t.orgXDomain[n]}))&&t.x.domain(t.orgXDomain),t.zoom.updateTransformScale(o),t.isCategorized()&&t.x.orgDomain()[0]===t.orgXDomain[0]&&t.x.domain([t.orgXDomain[0]-1e-10,t.x.orgDomain()[1]]),t.redraw({withTransition:!1,withY:e.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),t.cancelClick=r,Os(e.zoom_onzoom,t.api,t.zoomScale.domain())}},onZoomEnd:function(){var t=this,e=t.zoom.startEvent,n=ln&&ln.sourceEvent;e&&e.type.indexOf("touch")>-1&&(e=e.changedTouches[0],n=n.changedTouches[0]),!e||n&&e.clientX===n.clientX&&e.clientY===n.clientY||(t.redrawEventRect(),t.updateZoom(),Os(t.config.zoom_onzoomend,t.api,t[t.zoomScale?"zoomScale":"subX"].domain()))},getZoomDomain:function(){var t=this.config,e=r(this.orgXDomain,2),n=e[0],i=e[1];return ms(t.zoom_x_min)&&(n=Gs("min",[n,t.zoom_x_min])),ms(t.zoom_x_max)&&(i=Gs("max",[i,t.zoom_x_max])),[n,i]},updateZoom:function(t){var e=this;if(e.zoomScale){var n=e.zoomScale.domain(),i=e.subX.domain(),r=(n[0]<=i[0]||n[0]-.015<=i[0])&&(i[1]<=n[1]||i[1]<=n[1]-.015);(t||r)&&(e.xAxis.scale(e.subX),e.x.domain(e.subX.orgDomain()),e.zoomScale=null)}},bindZoomOnEventRect:function(t,e){var n="drag"===e?this.zoomBehaviour:this.zoom;t.call(n).on("dblclick.zoom",null)},initZoomBehaviour:function(){var t=this,e=t.config.axis_rotated,n=0,i=0,a=null,o={axis:e?"y":"x",attr:e?"height":"width",index:e?1:0};t.zoomBehaviour=Xo().clickDistance(4).on("start",(function(){t.setDragStatus(!0),a||(a=t.main.append("rect").attr("clip-path",t.clipPath).attr("class",Eo.zoomBrush).attr("width",e?t.width:0).attr("height",e?0:t.height)),n=Cn(this)[o.index],i=n,a.attr(o.axis,n).attr(o.attr,0),t.onZoomStart()})).on("drag",(function(){i=Cn(this)[o.index],a.attr(o.axis,Math.min(n,i)).attr(o.attr,Math.abs(i-n))})).on("end",(function(){var e,s=t.zoomScale||t.x;if(t.setDragStatus(!1),a.attr(o.axis,0).attr(o.attr,0),n>i&&(n=(e=[i,n])[0],i=e[1]),n<0&&(i+=Math.abs(n),n=0),n!==i)t.api.zoom([n,i].map((function(t){return s.invert(t)}))),t.onZoomEnd();else if(t.isMultipleX())t.clickHandlerForMultipleXS.bind(this)(t);else{var c=ln.sourceEvent||ln,u=r("clientX"in c?[c.clientX,c.clientY]:[c.x,c.y],2),l=u[0],f=u[1],h=gs.elementFromPoint(l,f);t.clickHandlerForSingleX.bind(h)(An(h).datum(),t)}}))},setZoomResetButton:function(){var t=this,e=t.config,n=e.zoom_resetButton;n&&"drag"===e.zoom_enabled.type&&(t.zoom.resetBtn?t.zoom.resetBtn.style("display",null):t.zoom.resetBtn=t.selectChart.append("div").classed(Eo.button,!0).append("span").on("click",(function(){vs(n.onclick)&&n.onclick(this),t.api.unzoom.call(t)})).classed(Eo.buttonZoomReset,!0).text(n.text||"Reset Zoom"))}});var ul=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Xs(nc.prototype,{getColorFromCss:function(){var t=gs.body,e=t.__colorPattern__;if(!e){var n=gs.createElement("span");n.className=Eo.colorPattern,n.style.display="none",t.appendChild(n);var i=ds.getComputedStyle(n).backgroundImage;n.parentNode.removeChild(n),i.indexOf(";")>-1&&(e=i.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map((function(t){return t.trim().replace(/[\"'\s]/g,"")})).filter(Boolean),t.__colorPattern__=e)}return e},generateColor:function(){var t=this,e=t.config,n=e.data_colors,i=e.data_color,r=[],a=Ms(e.color_pattern)?e.color_pattern:$a(t.getColorFromCss()||ul).range(),o=a;if(vs(e.color_tiles)){var s=e.color_tiles(),c=a.map((function(e,n){var i=e.replace(/[#\(\)\s,]/g,""),r="".concat(t.datetimeId,"-pattern-").concat(i,"-").concat(n);return function(t,e,n){var i=An(t.cloneNode(!0));return i.attr("id",n).insert("rect",":first-child").attr("width",i.attr("width")).attr("height",i.attr("height")).style("fill",e),{id:n,node:i.node()}}(s[n%s.length],e,r)}));a=c.map((function(t){return"url(#".concat(t.id,")")})),t.patterns=c}return function(e){var s,c=e.id||e.data&&e.data.id||e,u=t.isTypeOf(c,["line","spline","step"])||!t.config.data_types[c];return vs(n[c])?s=n[c](e):n[c]?s=n[c]:(r.indexOf(c)<0&&r.push(c),s=u?o[r.indexOf(c)%o.length]:a[r.indexOf(c)%a.length],n[c]=s),vs(i)?i(s,e):s}},generateLevelColor:function(){var t=this.config,e=t.color_pattern,n=t.color_threshold,i="value"===n.unit,r=n.max||100,a=n.values&&n.values.length?n.values:[];return Ms(n)?function(t){for(var n=i?t:100*t/r,o=e[e.length-1],s=0,c=a.length;s<c;s++)if(n<=a[s]){o=e[s];break}return o}:null},setOverColor:function(t,e){var n=this,i=n.config.color_onover,r=t?i:n.color;Cs(r)?r=function(t){var e=t.id;return e in i?i[e]:n.color(e)}:ys(r)&&(r=function(){return i}),Cs(e)?n.main.selectAll(".".concat(Eo.arc).concat(n.getTargetSelectorSuffix(e.id))).style("fill",r(e)):n.main.selectAll(".".concat(Eo.shape,"-").concat(e)).style("fill",r)}});var ll=function(t,e,n){var i=t.config,r="axis_".concat(e,"_tick_format");return(i[r]?i[r]:t.defaultValueFormat)(n)};Xs(nc.prototype,{getYFormat:function(t){var e=this,n=e.yFormat,i=e.y2Format;return t&&!e.hasType("gauge")&&(n=e.defaultArcValueFormat,i=e.defaultArcValueFormat),function(t,r,a){return("y2"===e.axis.getId(a)?i:n).call(e,t,r)}},yFormat:function(t){return ll(this,"y",t)},y2Format:function(t){return ll(this,"y2",t)},defaultValueFormat:function(t){return ps(t)?+t:""},defaultArcValueFormat:function(t,e){return"".concat((100*e).toFixed(1),"%")},dataLabelFormat:function(t){var e=this.config.data_labels,n=function(t){return ps(t)?+t:""},i=n;return vs(e.format)?i=e.format:Ss(e.format)&&(i=e.format[t]?!0===e.format[t]?n:e.format[t]:function(){return""}),i}}),Xs(nc.prototype,{addCache:function(t,e){var n=!!(arguments.length>2&&void 0!==arguments[2])&&arguments[2];this.cache[t]=n?this.cloneTarget(e):e},removeCache:function(t){var e=this;js(t).forEach((function(t){return delete e.cache[t]}))},getCache:function(t){var e=!!(arguments.length>1&&void 0!==arguments[1])&&arguments[1];if(e){for(var n,i=[],r=0;n=t[r];r++)n in this.cache&&i.push(this.cloneTarget(this.cache[n]));return i}return this.cache[t]||null},resetCache:function(t){for(var e in this.cache)(t||/^\$/.test(e))&&(this.cache[e]=null)}}),Xs(nc.prototype,{generateClass:function(t,e){return" ".concat(t," ").concat(t+this.getTargetSelectorSuffix(e))},classText:function(t){return this.generateClass(Eo.text,t.index)},classTexts:function(t){return this.generateClass(Eo.texts,t.id)},classShape:function(t){return this.generateClass(Eo.shape,t.index)},classShapes:function(t){return this.generateClass(Eo.shapes,t.id)},generateExtraLineClass:function(){var t=this.config.line_classes||[],e=[];return function(n){var i=n.id||n.data&&n.data.id||n;return e.indexOf(i)<0&&e.push(i),t[e.indexOf(i)%t.length]}},classLine:function(t){return this.classShape(t)+this.generateClass(Eo.line,t.id)},classLines:function(t){return this.classShapes(t)+this.generateClass(Eo.lines,t.id)},classCircle:function(t){return this.classShape(t)+this.generateClass(Eo.circle,t.index)},classCircles:function(t){return this.classShapes(t)+this.generateClass(Eo.circles,t.id)},classBar:function(t){return this.classShape(t)+this.generateClass(Eo.bar,t.index)},classBars:function(t){return this.classShapes(t)+this.generateClass(Eo.bars,t.id)},classArc:function(t){return this.classShape(t.data)+this.generateClass(Eo.arc,t.data.id)},classArcs:function(t){return this.classShapes(t.data)+this.generateClass(Eo.arcs,t.data.id)},classArea:function(t){return this.classShape(t)+this.generateClass(Eo.area,t.id)},classAreas:function(t){return this.classShapes(t)+this.generateClass(Eo.areas,t.id)},classRegion:function(t,e){return"".concat(this.generateClass(Eo.region,e)," ").concat("class"in t?t.class:"")},classEvent:function(t){return this.generateClass(Eo.eventRect,t.index)},classTarget:function(t){var e=this.config.data_classes[t],n="";return e&&(n=" ".concat(Eo.target,"-").concat(e)),this.generateClass(Eo.target,t)+n},classFocus:function(t){return this.classFocused(t)+this.classDefocused(t)},classFocused:function(t){return" ".concat(this.focusedTargetIds.indexOf(t.id)>=0?Eo.focused:"")},classDefocused:function(t){return" ".concat(this.defocusedTargetIds.indexOf(t.id)>=0?Eo.defocused:"")},classChartText:function(t){return Eo.chartText+this.classTarget(t.id)},classChartLine:function(t){return Eo.chartLine+this.classTarget(t.id)},classChartBar:function(t){return Eo.chartBar+this.classTarget(t.id)},classChartArc:function(t){return Eo.chartArc+this.classTarget(t.data.id)},classChartRadar:function(t){return Eo.chartRadar+this.classTarget(t.id)},getTargetSelectorSuffix:function(t){return t||0===t?"-".concat(t).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},selectorTarget:function(t,e){return"".concat(e||"",".").concat(Eo.target+this.getTargetSelectorSuffix(t))},selectorTargets:function(t,e){var n=this,i=t||[];return i.length?i.map((function(t){return n.selectorTarget(t,e)})):null},selectorLegend:function(t){return".".concat(Eo.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return t&&t.length?t.map((function(t){return e.selectorLegend(t)})):null}}),Xs(ic.prototype,{focus:function(t){var e=this.internal,n=e.mapToTargetIds(t),i=e.svg.selectAll(e.selectorTargets(n.filter(e.isTargetToShow,e)));this.revert(),this.defocus(),i.classed(Eo.focused,!0).classed(Eo.defocused,!1),e.hasArcType()&&(e.expandArc(n),e.hasType("gauge")&&e.markOverlapped(t,e,".".concat(Eo.gaugeValue))),e.toggleFocusLegend(n,!0),e.focusedTargetIds=n,e.defocusedTargetIds=e.defocusedTargetIds.filter((function(t){return n.indexOf(t)<0}))},defocus:function(t){var e=this.internal,n=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(n.filter(e.isTargetToShow,e))).classed(Eo.focused,!1).classed(Eo.defocused,!0),e.hasArcType()&&(e.unexpandArc(n),e.hasType("gauge")&&e.undoMarkOverlapped(e,".".concat(Eo.gaugeValue))),e.toggleFocusLegend(n,!1),e.focusedTargetIds=e.focusedTargetIds.filter((function(t){return n.indexOf(t)<0})),e.defocusedTargetIds=n},revert:function(t){var e=this.internal,n=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(n)).classed(Eo.focused,!1).classed(Eo.defocused,!1),e.hasArcType()&&e.unexpandArc(n),e.config.legend_show&&(e.showLegend(n.filter(e.isLegendToShow.bind(e))),e.legend.selectAll(e.selectorLegends(n)).filter((function(){return An(this).classed(Eo.legendItemFocused)})).classed(Eo.legendItemFocused,!1)),e.focusedTargetIds=[],e.defocusedTargetIds=[]}}),Xs(ic.prototype,{_showHide:function(t,e,n){var i=this.internal,r=i.mapToTargetIds(e);i["".concat(t?"remove":"add","HiddenTargetIds")](r);var a=i.svg.selectAll(i.selectorTargets(r)),o=t?"1":"0";a.transition().style("opacity",o,"important").call(i.endall,(function(){a.style("opacity",null).style("opacity",o)})),n.withLegend&&i["".concat(t?"show":"hide","Legend")](r),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},show:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showHide(!0,t,e)},hide:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showHide(!1,t,e)},toggle:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.internal,r={show:[],hide:[]};i.mapToTargetIds(t).forEach((function(t){return r[i.isTargetToShow(t)?"hide":"show"].push(t)})),r.show.length&&this.show(r.show,n),r.hide.length&&setTimeout((function(){return e.hide(r.hide,n)}),0)}});var fl=function(t){var e,n=this.internal,i=t;if(n.config.zoom_enabled&&i&&function(t,e){var n=r(e,2),i=n[0],a=n[1];return t.every((function(t,e){return 0===e?t>=i:t<=a}))}(i,n.getZoomDomain())){if(n.isTimeSeries()&&(i=i.map((function(t){return n.parseDate(t)}))),n.config.subchart_show){var a=n.zoomScale||n.x;n.brush.getSelection().call(n.brush.move,[a(i[0]),a(i[1])]),e=i}else n.x.domain(i),n.zoomScale=n.x,n.xAxis.scale(n.zoomScale),e=n.zoomScale.orgDomain();n.redraw({withTransition:!0,withY:n.config.zoom_rescale,withDimension:!1}),n.setZoomResetButton(),Os(n.config.zoom_onzoom,n.api,e)}else e=n.zoomScale?n.zoomScale.domain():n.x.orgDomain();return e};function hl(t,e,n){var i=this,r=n||{withTransitionForAxis:!i.hasArcType()};r.withTransitionForTransform=!1,i.transiting=!1,i.setTargetType(t,e),i.updateTargets(i.data.targets),i.updateAndRedraw(r)}Xs(fl,{enable:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"wheel",e=this.internal,n=e.config,i=t;t&&(i=ys(t)&&/^(drag|wheel)$/.test(t)?{type:t}:t),n.zoom_enabled=i,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function(t){var e=this.internal,n=e.config;return(0===t||t)&&(n.zoom_x_max=Gs("max",[e.orgXDomain[1],t])),n.zoom_x_max},min:function(t){var e=this.internal,n=e.config;return(0===t||t)&&(n.zoom_x_min=Gs("min",[e.orgXDomain[0],t])),n.zoom_x_min},range:function(t){var e=this.zoom;if(Cs(t)){var n=t.min,i=t.max;ms(n)&&e.min(n),ms(i)&&e.max(i)}return{min:e.min(),max:e.max()}}}),Xs(ic.prototype,{zoom:fl,unzoom:function(){var t=this.internal,e=t.config;if(t.zoomScale){e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(Qu),t.updateZoom(!0),t.zoom.resetBtn&&t.zoom.resetBtn.style("display","none");var n=t.main.select(".".concat(Eo.eventRects));tl(n.node())!==Qu&&t.zoom.transform(n,Qu),t.redraw({withTransition:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withY:e.zoom_rescale})}}}),Xs(ic.prototype,{load:function(t){var e=this.internal,n=e.config;t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach((function(e){n.data_classes[e]=t.classes[e]})),"categories"in t&&e.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach((function(e){n.data_axes[e]=t.axes[e]})),"colors"in t&&Object.keys(t.colors).forEach((function(e){n.data_colors[e]=t.colors[e]})),"unload"in t&&!1!==t.unload?e.unload(e.mapToTargetIds(!0===t.unload?null:t.unload),(function(){return e.loadFromArgs(t)})):e.loadFromArgs(t)},unload:function(t){var e=this.internal,n=t||{};Es(n)?n={ids:n}:ys(n)&&(n={ids:[n]});var i=e.mapToTargetIds(n.ids);e.unload(i,(function(){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.removeCache(i),n.done&&n.done()}))}}),Xs(ic.prototype,{flow:function(t){var e,n,i,r,a=this.internal,o=0,s=0;if((t.json||t.rows||t.columns)&&(e=a.convertData(t)),e&&a.isTabVisible()){var c=[],u=a.getMaxDataCount(),l=a.convertDataToTargets(e,!0);a.data.targets.forEach((function(t){for(var e=!1,n=0;n<l.length;n++)if(t.id===l[n].id){e=!0,t.values[t.values.length-1]&&(s=t.values[t.values.length-1].index+1),o=l[n].values.length;for(var i=0;i<o;i++)l[n].values[i].index=s+i,a.isTimeSeries()||(l[n].values[i].x=s+i);t.values=t.values.concat(l[n].values),l.splice(n,1);break}e||c.push(t.id)})),a.data.targets.forEach((function(t){for(var e=0;e<c.length;e++)if(t.id===c[e]){s=t.values[t.values.length-1].index+1;for(var n=0;n<o;n++)t.values.push({id:t.id,index:s+n,x:a.isTimeSeries()?a.getOtherTargetX(s+n):s+n,value:null})}})),a.data.targets.length&&l.forEach((function(t){for(var e=[],n=a.data.targets[0].values[0].index;n<s;n++)e.push({id:t.id,index:n,x:a.isTimeSeries()?a.getOtherTargetX(n):n,value:null});t.values.forEach((function(t){t.index+=s,a.isTimeSeries()||(t.x+=s)})),t.values=e.concat(t.values)})),a.data.targets=a.data.targets.concat(l);var f=a.data.targets[0],h=f.values[0];ms(t.to)?(o=0,r=a.isTimeSeries()?a.parseDate(t.to):t.to,f.values.forEach((function(t){t.x<r&&o++}))):ms(t.length)&&(o=t.length),u?1===u&&a.isTimeSeries()&&(i=(f.values[f.values.length-1].x-h.x)/2,n=[new Date(+h.x-i),new Date(+h.x+i)]):(i=a.isTimeSeries()?f.values.length>1?f.values[f.values.length-1].x-h.x:h.x-a.getXDomain(a.data.targets)[0]:1,n=[h.x-i,h.x]),n&&a.updateXDomain(null,!0,!0,!1,n),a.updateTargets(a.data.targets),a.redraw({flow:{index:h.index,length:o,duration:ps(t.duration)?t.duration:a.config.transition_duration,done:t.done,orgDataCount:u},withLegend:!0,withTransition:u>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}}),Xs(nc.prototype,{generateFlow:function(t){var e=this,n=e.config;return function(){var i,r,a=t.targets,o=t.flow,s=t.shape.type,c=s.bar,u=s.line,l=s.area,f=t.shape.pos,h=f.cx,d=f.cy,g=f.xForText,p=f.yForText,v=t.xv,y=t.duration,x=o.index,_=o.length,m=e.getValueOnIndex(e.data.targets[0].values,x),b=e.getValueOnIndex(e.data.targets[0].values,x+_),w=e.x.domain(),T=o.duration||y,A=o.done||function(){},S=e.generateWait(),k=e.xgrid||Ln([]),M=e.xgridLines||Ln([]),E=e.mainRegion||Ln([]),C=e.mainText||Ln([]),L=e.mainBar||Ln([]),O=e.mainLine||Ln([]),R=e.mainArea||Ln([]),I=e.mainCircle||Ln([]);e.flowing=!0,e.data.targets.forEach((function(t){t.values.splice(0,_)}));var D=e.updateXDomain(a,!0,!0);e.updateXGrid&&e.updateXGrid(!0),o.orgDataCount?i=1===o.orgDataCount||(m&&m.x)===(b&&b.x)||e.isTimeSeries()?e.x(w[0])-e.x(D[0]):e.x(m.x)-e.x(b.x):1===e.data.targets[0].values.length?e.isTimeSeries()?(m=e.getValueOnIndex(e.data.targets[0].values,0),b=e.getValueOnIndex(e.data.targets[0].values,e.data.targets[0].values.length-1),i=e.x(m.x)-e.x(b.x)):i=As(D)/2:i=e.x(w[0])-e.x(D[0]),r=As(w)/As(D);var P="translate(".concat(i,",0) scale(").concat(r,",1)");e.hideGridFocus();var F=pa().ease(xa).duration(T);S.add([e.axes.x.transition(F).call((function(t){return e.xAxis.setTransition(F).create(t)})),L.transition(F).attr("transform",P),O.transition(F).attr("transform",P),R.transition(F).attr("transform",P),I.transition(F).attr("transform",P),C.transition(F).attr("transform",P),E.filter(e.isRegionOnX).transition(F).attr("transform",P),k.transition(F).attr("transform",P),M.transition(F).attr("transform",P)]),F.call(S,(function(){var t=n.axis_rotated;if(_){for(var i={shapes:[],texts:[],eventRects:[]},r=0;r<_;r++)i.shapes.push(".".concat(Eo.shape,"-").concat(r)),i.texts.push(".".concat(Eo.text,"-").concat(r)),i.eventRects.push(".".concat(Eo.eventRect,"-").concat(r));["shapes","texts","eventRects"].forEach((function(t){e.svg.selectAll(".".concat(Eo[t])).selectAll(i[t]).remove()})),e.svg.select(".".concat(Eo.xgrid)).remove()}if(k.size()&&k.attr("transform",null).attr(e.xgridAttr),M.attr("transform",null),M.select("line").attr("x1",t?0:v).attr("x2",t?e.width:v),M.select("text").attr("x",t?e.width:0).attr("y",v),L.attr("transform",null).attr("d",c),O.attr("transform",null).attr("d",u),R.attr("transform",null).attr("d",l),I.attr("transform",null),e.isCirclePoint())I.attr("cx",h).attr("cy",d);else{I.attr("x",(function(t){return h(t)-n.point_r})).attr("y",(function(t){return d(t)-n.point_r})).attr("cx",h).attr("cy",d)}C.attr("transform",null).attr("x",g).attr("y",p).style("fill-opacity",e.opacityForText.bind(e)),E.attr("transform",null),E.select("rect").filter(e.isRegionOnX).attr("x",e.regionX.bind(e)).attr("width",e.regionWidth.bind(e)),n.interaction_enabled&&e.redrawEventRect(),A(),e.flowing=!1}))}}}),Xs(ic.prototype,{selected:function(t){var e=this.internal,n=[];return e.main.selectAll(".".concat(Eo.shapes+e.getTargetSelectorSuffix(t))).selectAll(".".concat(Eo.shape)).filter((function(){return An(this).classed(Eo.SELECTED)})).each((function(t){return n.push(t)})),n},select:function(t,e,n){var i=this.internal,r=i.config;r.data_selection_enabled&&i.main.selectAll(".".concat(Eo.shapes)).selectAll(".".concat(Eo.shape)).each((function(a,o){var s=An(this),c=a.data?a.data.id:a.id,u=i.getToggle(this,a).bind(i),l=r.data_selection_grouped||!t||t.indexOf(c)>=0,f=!e||e.indexOf(o)>=0,h=s.classed(Eo.SELECTED);s.classed(Eo.line)||s.classed(Eo.area)||(l&&f?r.data_selection_isselectable(a)&&!h&&u(!0,s.classed(Eo.SELECTED,!0),a,o):ms(n)&&n&&h&&u(!1,s.classed(Eo.SELECTED,!1),a,o))}))},unselect:function(t,e){var n=this.internal,i=n.config;i.data_selection_enabled&&n.main.selectAll(".".concat(Eo.shapes)).selectAll(".".concat(Eo.shape)).each((function(r,a){var o=An(this),s=r.data?r.data.id:r.id,c=n.getToggle(this,r).bind(n),u=i.data_selection_grouped||!t||t.indexOf(s)>=0,l=!e||e.indexOf(a)>=0,f=o.classed(Eo.SELECTED);o.classed(Eo.line)||o.classed(Eo.area)||u&&l&&i.data_selection_isselectable(r)&&f&&c(!1,o.classed(Eo.SELECTED,!1),r,a)}))}}),Xs(ic.prototype,{transform:function(t,e){var n=this.internal,i=["pie","donut"].indexOf(t)>=0?{withTransform:!0}:null;hl.bind(n)(e,t,i)}}),Xs(ic.prototype,{groups:function(t){var e=this.internal,n=e.config;return _s(t)||(n.data_groups=t,e.redraw()),n.data_groups}});var dl=function(t){var e=this.internal,n=e.config;return t?(n.grid_x_lines=t,e.redrawWithoutRescale(),n.grid_x_lines):n.grid_x_lines};Xs(dl,{add:function(t){return this.xgrids(this.internal.config.grid_x_lines.concat(t||[]))},remove:function(t){this.internal.removeGridLines(t,!0)}});var gl=function(t){var e=this.internal,n=e.config;return t?(n.grid_y_lines=t,e.redrawWithoutRescale(),n.grid_y_lines):n.grid_y_lines};Xs(gl,{add:function(t){return this.ygrids(this.internal.config.grid_y_lines.concat(t||[]))},remove:function(t){this.internal.removeGridLines(t,!1)}}),Xs(ic.prototype,{xgrids:dl,ygrids:gl});var pl=function(t){var e=this.internal,n=e.config;return t?(n.regions=t,e.redrawWithoutRescale(),t):n.regions};Xs(pl,{add:function(t){var e=this.internal,n=e.config;return t?(n.regions=n.regions.concat(t),e.redrawWithoutRescale(),n.regions):n.regions},remove:function(t){var e=this.internal,n=e.config,i=t||{},r=Ls(i,"duration",n.transition_duration),a=Ls(i,"classes",[Eo.region]),o=e.main.select(".".concat(Eo.regions)).selectAll(a.map((function(t){return".".concat(t)})));return(r?o.transition().duration(r):o).style("opacity","0").remove(),o=n.regions,Object.keys(i).length?(o=o.filter((function(t){var e=!1;return!t.class||(t.class.split(" ").forEach((function(t){a.indexOf(t)>=0&&(e=!0)})),!e)})),n.regions=o):n.regions=[],o}}),Xs(ic.prototype,{regions:pl});var vl=function(t){var e=this.internal.data.targets;if(!_s(t)){var n=Es(t)?t:[t];return e.filter((function(t){return n.some((function(e){return e===t.id}))}))}return e};Xs(vl,{shown:function(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=null;if(t){var i=this.data(t);i&&Es(i)&&(n=[],i.forEach((function(t){var i=t.values.map((function(t){return t.value}));e?n=n.concat(i):n.push(i)})))}return n},names:function(t){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",t)},colors:function(t){return this.internal.updateDataAttributes("colors",t)},axes:function(t){return this.internal.updateDataAttributes("axes",t)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}}),Xs(ic.prototype,{data:vl}),Xs(ic.prototype,{category:function(t,e){var n=this.internal,i=n.config;return arguments.length>1&&(i.axis_x_categories[t]=e,n.redraw()),i.axis_x_categories[t]},categories:function(t){var e=this.internal,n=e.config;return arguments.length?(n.axis_x_categories=t,e.redraw(),n.axis_x_categories):n.axis_x_categories}}),Xs(ic.prototype,{color:function(t){return this.internal.color(t)}}),Xs(ic.prototype,{x:function(t){var e=this.internal,n=e.isCustomX()&&e.isCategorized();return Es(t)&&(n?e.api.categories(t):(e.updateTargetX(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),n?e.api.categories():e.data.xs},xs:function(t){var e=this.internal;return Cs(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}});var yl=function(t,e,n){var i=t.config,r="axis_x_".concat(e),a="axis_y_".concat(e),o="axis_y2_".concat(e);ms(n)&&(Ss(n)?(ps(n.x)&&(i[r]=n.x),ps(n.y)&&(i[a]=n.y),ps(n.y2)&&(i[o]=n.y2)):(i[a]=n,i[o]=n),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))},xl=function(t,e){var n=t.config;return{x:n["axis_x_".concat(e)],y:n["axis_y_".concat(e)],y2:n["axis_y2_".concat(e)]}},_l=Xs((function(){}),{labels:function(t){var e=this.internal;arguments.length&&(Object.keys(t).forEach((function(n){e.axis.setLabelText(n,t[n])})),e.axis.updateLabels())},min:function(t){var e=this.internal;return arguments.length?yl(e,"min",t):xl(e,"min")},max:function(t){var e=this.internal;return arguments.length?yl(e,"max",t):xl(e,"max")},range:function(t){var e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};ms(t.max)&&e.max(t.max),ms(t.min)&&e.min(t.min)}});Xs(ic.prototype,{axis:_l});var ml=Xs((function(){}),{show:function(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}});Xs(ic.prototype,{legend:ml}),Xs(ic.prototype,{resize:function(t){var e=this.internal,n=e.config;e.rendered&&(n.size_width=t?t.width:null,n.size_height=t?t.height:null,this.flush(!1,!0),e.resizeFunction())},flush:function(t,e){var n=this.internal;n.rendered?(e?n.brush&&n.brush.updateResize():n.axis&&n.axis.setOrient(),n.zoomScale=null,t?n.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):n.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})):n.initToRender(!0)},destroy:function(){var t=this,e=this.internal;return Ms(e)&&(e.callPluginHook("$willDestroy"),e.charts.splice(e.charts.indexOf(this),1),e.svg.select("*").interrupt(),e.generateResize.timeout&&ds.clearTimeout(e.generateResize.timeout),ds.removeEventListener("resize",e.resizeFunction),e.selectChart.classed("bb",!1).html(""),Object.keys(this).forEach((function(n){"internal"===n&&Object.keys(e).forEach((function(t){e[t]=null})),t[n]=null,delete t[n]}))),null},config:function(t,e,n){var i,r=this.internal,a=t&&t.replace(/\./g,"_");return a in r.config&&(ms(e)?(r.config[a]=e,i=e,n&&this.flush()):i=r.config[a]),i}});var bl=Xs((function(){}),{show:function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this.internal;if(n.mouse&&(e=n.mouse),n.data){var r=i.getYScale(n.data.id)(n.data.value);i.isMultipleX()?e=[i.x(n.data.x),r]:(!i.config.tooltip_grouped&&(e=[0,r]),t=ps(n.data.index)?n.data.index:i.getIndexByX(n.data.x))}else ms(n.x)?t=i.getIndexByX(n.x):ms(n.index)&&(t=n.index);("mouse"===i.inputType?["mouseover","mousemove"]:["touchstart"]).forEach((function(n){i.dispatchEvent(n,t,e)}))},hide:function(){var t=this.internal;"touch"===t.inputType&&t.callOverOutForTouch(),t.hideTooltip(!0),t.hideGridFocus(),t.unexpandCircles(),t.unexpandBars()}});Xs(ic.prototype,{tooltip:bl});var wl=function(t,e){var n,i,r=new XMLSerializer,a=t.cloneNode(!0),o=(n=js(gs.styleSheets),i=[],n.forEach((function(t){try{t.cssRules&&t.cssRules.length&&(i=i.concat(js(t.cssRules)))}catch(e){console.error("Error while reading rules from ".concat(t.href,": ").concat(e.toString()))}})),i).filter((function(t){return t.cssText})).map((function(t){return t.cssText}));a.setAttribute("xmlns",de.xhtml);var s=r.serializeToString(a),c=gs.createElement("style");c.appendChild(gs.createTextNode(o.join("\n")));var u=r.serializeToString(c),l='<svg xmlns="'.concat(de.svg,'" width="').concat(e.width,'" height="').concat(e.height,'">\n\t\t\t<foreignObject width="100%" height="100%">\n\t\t\t\t').concat(u,"\n\t\t\t\t").concat(s.replace(/(url\()[^#]+/g,"$1"),"\n\t\t\t</foreignObject></svg>").replace("/\n/g","%0A");return"data:image/svg+xml;base64,".concat(btoa(encodeURIComponent(l).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode("0x".concat(e))}))))};Xs(ic.prototype,{export:function(t,e){var n=this.internal,i={width:n.currentWidth,height:n.currentHeight},r=wl(this.element,i);if(vs(e)){var a=new Image;a.crosssOrigin="Anonymous",a.onload=function(){var n=gs.createElement("canvas"),r=n.getContext("2d");n.width=i.width,n.height=i.height,r.drawImage(a,0,0),e(n.toDataURL(t))},a.src=r}return r}});var Tl={},Al={version:"1.12.1",generate:function(t){var e=Hs({},Tl,t),n=new ic(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults:function(t){return Cs(t)&&(Tl=t),Tl},instance:[],plugin:{},chart:{fn:ic.prototype,internal:{fn:nc.prototype,axis:{fn:ec.prototype}}}};e.default=Al}])}));
\No newline at end of file