@nebula.js/sn-bar-chart 1.12.7 → 1.12.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-specifications/plugins.json +1 -1
- package/api-specifications/properties.json +1 -1
- package/core/esm/index.js +968 -3
- package/core/package.json +1 -0
- package/dist/sn-bar-chart.js +971 -6
- package/package.json +7 -3
- package/sn-bar-chart-ext/dist/sn-bar-chart.js +983 -0
- package/sn-bar-chart-ext/sn-bar-chart.js +1 -0
- package/sn-bar-chart-ext/sn-bar-chart.qext +9 -0
|
@@ -0,0 +1,983 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @nebula.js/sn-bar-chart v1.12.11
|
|
3
|
+
* Copyright (c) 2021 QlikTech International AB
|
|
4
|
+
* Released under the MIT license.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["sn-bar-chart"]=t(e.stardust)}(this,(function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,u,"next",e)}function u(e){i(a,r,o,s,u,"throw",e)}s(void 0)}))}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?m(e):t}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},k=/([astvzqmhlc])([^astvzqmhlc]*)/gi,S=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;var C=function(e){var t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(k,(function(e,n,r){var i=n.toLowerCase(),o=function(e){var t=e.match(S);return t?t.map(Number):[]}(r),a=n;if("m"===i&&o.length>2&&(t.push([a].concat(o.splice(0,2))),i="l",a="m"===a?"l":"L"),o.length<M[i])return"";for(t.push([a].concat(o.splice(0,M[i])));o.length>=M[i]&&o.length&&M[i];)t.push([a].concat(o.splice(0,M[i])));return""})),t};function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){var n=e.x*Math.cos(t)-e.y*Math.sin(t),r=e.y*Math.cos(t)+e.x*Math.sin(t);e.x=n,e.y=r}function O(e,t){e.x*=t,e.y*=t}var N=function(e){if(void 0!==e&&e.CanvasRenderingContext2D&&(!e.Path2D||!function(e){var t=e.document.createElement("canvas").getContext("2d"),n=new e.Path2D("M0 0 L1 1");return t.strokeStyle="red",t.lineWidth=1,t.stroke(n),255===t.getImageData(0,0,1,1).data[0]}(e))){var t=function(){function e(t){var n;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.segments=[],t&&t instanceof e)?(n=this.segments).push.apply(n,E(t.segments)):t&&(this.segments=C(t))}var t,n,r;return t=e,(n=[{key:"addPath",value:function(t){var n;t&&t instanceof e&&(n=this.segments).push.apply(n,E(t.segments))}},{key:"moveTo",value:function(e,t){this.segments.push(["M",e,t])}},{key:"lineTo",value:function(e,t){this.segments.push(["L",e,t])}},{key:"arc",value:function(e,t,n,r,i,o){this.segments.push(["AC",e,t,n,r,i,!!o])}},{key:"arcTo",value:function(e,t,n,r,i){this.segments.push(["AT",e,t,n,r,i])}},{key:"ellipse",value:function(e,t,n,r,i,o,a,s){this.segments.push(["E",e,t,n,r,i,o,a,!!s])}},{key:"closePath",value:function(){this.segments.push(["Z"])}},{key:"bezierCurveTo",value:function(e,t,n,r,i,o){this.segments.push(["C",e,t,n,r,i,o])}},{key:"quadraticCurveTo",value:function(e,t,n,r){this.segments.push(["Q",e,t,n,r])}},{key:"rect",value:function(e,t,n,r){this.segments.push(["R",e,t,n,r])}}])&&q(t.prototype,n),r&&q(t,r),e}(),n=e.CanvasRenderingContext2D.prototype.fill,r=e.CanvasRenderingContext2D.prototype.stroke;e.CanvasRenderingContext2D.prototype.fill=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i="nonzero";if(0===t.length||1===t.length&&"string"==typeof t[0])n.apply(this,t);else{2===arguments.length&&(i=t[1]);var a=t[0];o(this,a.segments),n.call(this,i)}},e.CanvasRenderingContext2D.prototype.stroke=function(e){e?(o(this,e.segments),r.call(this)):r.call(this)};var i=e.CanvasRenderingContext2D.prototype.isPointInPath;e.CanvasRenderingContext2D.prototype.isPointInPath=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if("Path2D"===t[0].constructor.name){var r=t[1],a=t[2],s=t[3]||"nonzero",u=t[0];return o(this,u.segments),i.apply(this,[r,a,s])}return i.apply(this,t)},e.Path2D=t}function o(e,t){var n,r,i,o,a,s,u,l,c,f,d,h,p,m,v,g,y,b,x,w,M,k,S,C,q,E,T,N,_,A={x:0,y:0},I={x:0,y:0};e.beginPath();for(var P=0;P<t.length;++P){var L=t[P];switch("S"!==(w=L[0])&&"s"!==w&&"C"!==w&&"c"!==w&&(k=null,S=null),"T"!==w&&"t"!==w&&"Q"!==w&&"q"!==w&&(C=null,q=null),w){case"m":case"M":"m"===w?(d+=L[1],p+=L[2]):(d=L[1],p=L[2]),"M"!==w&&A||(A={x:d,y:p}),e.moveTo(d,p);break;case"l":d+=L[1],p+=L[2],e.lineTo(d,p);break;case"L":d=L[1],p=L[2],e.lineTo(d,p);break;case"H":d=L[1],e.lineTo(d,p);break;case"h":d+=L[1],e.lineTo(d,p);break;case"V":p=L[1],e.lineTo(d,p);break;case"v":p+=L[1],e.lineTo(d,p);break;case"a":case"A":"a"===w?(d+=L[6],p+=L[7]):(d=L[6],p=L[7]),g=L[1],y=L[2],u=L[3]*Math.PI/180,i=!!L[4],o=!!L[5],a={x:d,y:p},D(s={x:(I.x-a.x)/2,y:(I.y-a.y)/2},-u),(l=s.x*s.x/(g*g)+s.y*s.y/(y*y))>1&&(g*=l=Math.sqrt(l),y*=l),c=g*g*y*y,f=g*g*s.y*s.y+y*y*s.x*s.x,O(M={x:g*s.y/y,y:-y*s.x/g},o!==i?Math.sqrt((c-f)/f)||0:-Math.sqrt((c-f)/f)||0),r=Math.atan2((s.y-M.y)/y,(s.x-M.x)/g),n=Math.atan2(-(s.y+M.y)/y,-(s.x+M.x)/g),D(M,u),T=M,N=(a.x+I.x)/2,_=(a.y+I.y)/2,T.x+=N,T.y+=_,e.save(),e.translate(M.x,M.y),e.rotate(u),e.scale(g,y),e.arc(0,0,1,r,n,!o),e.restore();break;case"C":k=L[3],S=L[4],d=L[5],p=L[6],e.bezierCurveTo(L[1],L[2],k,S,d,p);break;case"c":e.bezierCurveTo(L[1]+d,L[2]+p,L[3]+d,L[4]+p,L[5]+d,L[6]+p),k=L[3]+d,S=L[4]+p,d+=L[5],p+=L[6];break;case"S":null!==k&&null!==k||(k=d,S=p),e.bezierCurveTo(2*d-k,2*p-S,L[1],L[2],L[3],L[4]),k=L[1],S=L[2],d=L[3],p=L[4];break;case"s":null!==k&&null!==k||(k=d,S=p),e.bezierCurveTo(2*d-k,2*p-S,L[1]+d,L[2]+p,L[3]+d,L[4]+p),k=L[1]+d,S=L[2]+p,d+=L[3],p+=L[4];break;case"Q":C=L[1],q=L[2],d=L[3],p=L[4],e.quadraticCurveTo(C,q,d,p);break;case"q":C=L[1]+d,q=L[2]+p,d+=L[3],p+=L[4],e.quadraticCurveTo(C,q,d,p);break;case"T":null!==C&&null!==C||(C=d,q=p),C=2*d-C,q=2*p-q,d=L[1],p=L[2],e.quadraticCurveTo(C,q,d,p);break;case"t":null!==C&&null!==C||(C=d,q=p),C=2*d-C,q=2*p-q,d+=L[1],p+=L[2],e.quadraticCurveTo(C,q,d,p);break;case"z":case"Z":d=A.x,p=A.y,A=void 0,e.closePath();break;case"AC":d=L[1],p=L[2],v=L[3],r=L[4],n=L[5],E=L[6],e.arc(d,p,v,r,n,E);break;case"AT":h=L[1],m=L[2],d=L[3],p=L[4],v=L[5],e.arcTo(h,m,d,p,v);break;case"E":d=L[1],p=L[2],g=L[3],y=L[4],u=L[5],r=L[6],n=L[7],E=L[8],e.save(),e.translate(d,p),e.rotate(u),e.scale(g,y),e.arc(0,0,1,r,n,E),e.restore();break;case"R":d=L[1],p=L[2],b=L[3],x=L[4],A={x:d,y:p},e.rect(d,p,b,x)}I.x=d,I.y=p}}};"undefined"!=typeof window&&N(window);var _={path2dPolyfill:N,parsePath:C},A=Object.prototype.hasOwnProperty,I=Object.prototype.toString,P=Object.defineProperty,L=Object.getOwnPropertyDescriptor,R=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===I.call(e)},j=function(e){if(!e||"[object Object]"!==I.call(e))return!1;var t,n=A.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&A.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||A.call(e,t)},z=function(e,t){P&&"__proto__"===t.name?P(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},F=function(e,t){if("__proto__"===t){if(!A.call(e,t))return;if(L)return L(e,t).value}return e[t]},B=function e(){var t,n,i,o,a,s,u=arguments[0],l=1,c=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},l=2),(null==u||"object"!==r(u)&&"function"!=typeof u)&&(u={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=F(u,n),u!==(o=F(t,n))&&(f&&o&&(j(o)||(a=R(o)))?(a?(a=!1,s=i&&R(i)?i:[]):s=i&&j(i)?i:{},z(u,{name:n,newValue:e(f,s,o)})):void 0!==o&&z(u,{name:n,newValue:o}));return u},V="1.3.0";function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Y(e,t,n){return t&&W(e.prototype,t),n&&W(e,n),e}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}function J(e){return(J=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ee(e,t,n){return(ee=Z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Q(i,n.prototype),i}).apply(null,arguments)}function te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ne(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?te(e):t}function re(e){var t=Z();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ne(this,n)}}function ie(e,t,n){return(ie="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=J(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||se(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ae(e){return function(e){if(Array.isArray(e))return ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||se(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function se(e,t){if(e){if("string"==typeof e)return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ue(e,t):void 0}}function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function le(e){return!!e.changedTouches}function ce(e){return"number"==typeof e&&!isNaN(e)}function fe(e){return"number"!=typeof e||isNaN(e)}function de(e){for(var t=e.length,n=NaN,r=NaN,i=NaN,o=NaN,a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),i=isNaN(i)?e[a].y:Math.min(i,e[a].y),o=isNaN(o)?e[a].y:Math.max(o,e[a].y);return[n,i,r,o]}function he(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function pe(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function me(e){var t=oe(de(e),4),n=t[0],r=t[1];return{x:n,y:r,width:t[2]-n,height:t[3]-r}}function ve(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function ge(e){var t=e||{},n=t.x,r=t.y,i=t.width,o=t.height,a=t.x1,s=t.x2,u=t.y1,l=t.y2,c=t.cx,f=t.cy,d=t.r,h=t.vertices;return ce(c)&&ce(f)&&ce(d)?"circle":ce(a)&&ce(s)&&ce(u)&&ce(l)?"line":ce(n)&&ce(r)&&ce(i)&&ce(o)?"rect":ce(n)&&ce(r)?"point":Array.isArray(h)?h.every((function(e){return Array.isArray(e)}))?"geopolygon":"polygon":null}function ye(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}function be(e,t){var n=t.types,r=t.logger,i={},o=[];Array.isArray(e)?o.push.apply(o,ae(e)):(r.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach((function(e,t){var o=n(e.type);if(o){var a=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),a=t);var s=o({key:a,data:e.data,config:e.config});i[a]=s}}));return function(e){return e?i[e]:i[Object.keys(i)[0]]}}var xe=Math.PI,we=2*xe,Me=1e-6,ke=we-Me;function Se(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ce(){return new Se}function qe(e){return function(){return e}}Se.prototype=Ce.prototype={constructor:Se,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,u=r-t,l=o-e,c=a-t,f=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>Me)if(Math.abs(c*s-u*l)>Me&&i){var d=n-o,h=r-a,p=s*s+u*u,m=d*d+h*h,v=Math.sqrt(p),g=Math.sqrt(f),y=i*Math.tan((xe-Math.acos((p+f-m)/(2*v*g)))/2),b=y/g,x=y/v;Math.abs(b-1)>Me&&(this._+="L"+(e+b*l)+","+(t+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>l*h)+","+(this._x1=e+x*s)+","+(this._y1=t+x*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=e+a,l=t+s,c=1^o,f=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>Me||Math.abs(this._y1-l)>Me)&&(this._+="L"+u+","+l),n&&(f<0&&(f=f%we+we),f>ke?this._+="A"+n+","+n+",0,1,"+c+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):f>Me&&(this._+="A"+n+","+n+",0,"+ +(f>=xe)+","+c+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Ee=Math.abs,Te=Math.atan2,De=Math.cos,Oe=Math.max,Ne=Math.min,_e=Math.sin,Ae=Math.sqrt,Ie=1e-12,Pe=Math.PI,Le=Pe/2,Re=2*Pe;function je(e){return e>1?0:e<-1?Pe:Math.acos(e)}function ze(e){return e>=1?Le:e<=-1?-Le:Math.asin(e)}function Fe(e){return e.innerRadius}function Be(e){return e.outerRadius}function Ve(e){return e.startAngle}function He(e){return e.endAngle}function Ue(e){return e&&e.padAngle}function We(e,t,n,r,i,o,a,s){var u=n-e,l=r-t,c=a-i,f=s-o,d=f*u-c*l;if(!(d*d<Ie))return[e+(d=(c*(t-o)-f*(e-i))/d)*u,t+d*l]}function Ye(e,t,n,r,i,o,a){var s=e-n,u=t-r,l=(a?o:-o)/Ae(s*s+u*u),c=l*u,f=-l*s,d=e+c,h=t+f,p=n+c,m=r+f,v=(d+p)/2,g=(h+m)/2,y=p-d,b=m-h,x=y*y+b*b,w=i-o,M=d*m-p*h,k=(b<0?-1:1)*Ae(Oe(0,w*w*x-M*M)),S=(M*b-y*k)/x,C=(-M*y-b*k)/x,q=(M*b+y*k)/x,E=(-M*y+b*k)/x,T=S-v,D=C-g,O=q-v,N=E-g;return T*T+D*D>O*O+N*N&&(S=q,C=E),{cx:S,cy:C,x01:-c,y01:-f,x11:S*(i/w-1),y11:C*(i/w-1)}}function Ke(e){this._context=e}function $e(e){return new Ke(e)}function Ge(e){return e[0]}function Xe(e){return e[1]}function Je(){var e=Ge,t=null,n=qe(0),r=Xe,i=qe(!0),o=null,a=$e,s=null;function u(u){var l,c,f,d,h,p=u.length,m=!1,v=new Array(p),g=new Array(p);for(null==o&&(s=a(h=Ce())),l=0;l<=p;++l){if(!(l<p&&i(d=u[l],l,u))===m)if(m=!m)c=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=l-1;f>=c;--f)s.point(v[f],g[f]);s.lineEnd(),s.areaEnd()}m&&(v[l]=+e(d,l,u),g[l]=+n(d,l,u),s.point(t?+t(d,l,u):v[l],r?+r(d,l,u):g[l]))}if(h)return s=null,h+""||null}function l(){return function(){var e=Ge,t=Xe,n=qe(!0),r=null,i=$e,o=null;function a(a){var s,u,l,c=a.length,f=!1;for(null==r&&(o=i(l=Ce())),s=0;s<=c;++s)!(s<c&&n(u=a[s],s,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(u,s,a),+t(u,s,a));if(l)return o=null,l+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:qe(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:qe(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:qe(!!e),a):n},a.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),a):i},a.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),a):r},a}().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(e="function"==typeof n?n:qe(+n),t=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:qe(+t),u):e},u.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:qe(+e),u):t},u.y=function(e){return arguments.length?(n="function"==typeof e?e:qe(+e),r=null,u):n},u.y0=function(e){return arguments.length?(n="function"==typeof e?e:qe(+e),u):n},u.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:qe(+e),u):r},u.lineX0=u.lineY0=function(){return l().x(e).y(n)},u.lineY1=function(){return l().x(e).y(r)},u.lineX1=function(){return l().x(t).y(n)},u.defined=function(e){return arguments.length?(i="function"==typeof e?e:qe(!!e),u):i},u.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),u):a},u.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),u):o},u}function Qe(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Ze(e){return e}Ke.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var et=Array.prototype.slice;function tt(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function nt(e){this._context=e}function rt(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function it(e,t){this._context=e,this._k=(1-t)/6}nt.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:tt(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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:tt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},it.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:rt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:rt(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ot=function e(t){function n(e){return new it(e,t)}return n.tension=function(t){return e(+t)},n}(0);function at(e,t){this._context=e,this._alpha=t}at.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Ie){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>Ie){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*l+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*l+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var st=function e(t){function n(e){return t?new at(e,t):new it(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function ut(e){return e<0?-1:1}function lt(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(ut(o)+ut(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function ct(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ft(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function dt(e){this._context=e}function ht(e){this._context=new pt(e)}function pt(e){this._context=e}function mt(e){this._context=e}function vt(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function gt(e,t){this._context=e,this._t=t}function yt(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function bt(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function xt(e,t){return e[t]}function wt(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function Mt(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function kt(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0,i={},o=e||{get:function(){},has:function(){return!1},default:function(){}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in i)&&(i[e]=t,!0)}function s(e){return i[e]||o.get(e)}function u(e){return!!i[e]||o.has(e)}function l(e){var t=i[e];return delete i[e],t}function c(){return Object.keys(i)}function f(){return Object.keys(i).map((function(e){return i[e]}))}function d(e){return void 0!==e&&(t=e),t}function h(e,i){if(void 0!==i)return a(e,i);var o=s(e);return r&&void 0===o&&r.warn("".concat(e," does not exist in ").concat(n," registry")),o||s(t)}return t=o.default(),h.add=a,h.get=s,h.has=u,h.remove=l,h.getKeys=c,h.getValues=f,h.default=d,h.register=a,h}function St(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ct(e){return(e=St(Math.abs(e)))?e[1]:NaN}dt.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:ft(this,this._t0,ct(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ft(this,ct(this,n=lt(this,e,t)),n);break;default:ft(this,this._t0,n=lt(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(ht.prototype=Object.create(dt.prototype)).point=function(e,t){dt.prototype.point.call(this,t,e)},pt.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=vt(e),i=vt(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},gt.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var qt,Et=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Tt(e){if(!(t=Et.exec(e)))throw new Error("invalid format: "+e);var t;return new Dt({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Dt(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Ot(e,t){var n=St(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Tt.prototype=Dt.prototype,Dt.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 Nt={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Ot(100*e,t)},r:Ot,s:function(e,t){var n=St(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(qt=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+St(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function _t(e){return e}var At,It,Pt,Lt=Array.prototype.map,Rt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function jt(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?_t:(t=Lt.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(e.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?_t:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Lt.call(e.numerals,String)),u=void 0===e.percent?"%":e.percent+"",l=void 0===e.minus?"-":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=Tt(e)).fill,n=e.align,f=e.sign,d=e.symbol,h=e.zero,p=e.width,m=e.comma,v=e.precision,g=e.trim,y=e.type;"n"===y?(m=!0,y="g"):Nt[y]||(void 0===v&&(v=12),g=!0,y="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",x="$"===d?o:/[%p]/.test(y)?u:"",w=Nt[y],M=/[defgprs%]/.test(y);function k(e){var i,o,u,d=b,k=x;if("c"===y)k=w(e)+k,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:w(Math.abs(e),v),g&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==f&&(S=!1),d=(S?"("===f?f:l:"-"===f||"("===f?"":f)+d,k=("s"===y?Rt[8+qt/3]:"")+k+(S&&"("===f?")":""),M)for(i=-1,o=e.length;++i<o;)if(48>(u=e.charCodeAt(i))||u>57){k=(46===u?a+e.slice(i+1):e.slice(i))+k,e=e.slice(0,i);break}}m&&!h&&(e=r(e,1/0));var C=d.length+e.length+k.length,q=C<p?new Array(p-C+1).join(t):"";switch(m&&h&&(e=r(q+e,q.length?p-k.length:1/0),q=""),n){case"<":e=d+e+k+q;break;case"=":e=d+q+e+k;break;case"^":e=q.slice(0,C=q.length>>1)+d+e+k+q.slice(C);break;default:e=q+d+e+k}return s(e)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),k.toString=function(){return e+""},k}return{format:f,formatPrefix:function(e,t){var n=f(((e=Tt(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Ct(t)/3))),i=Math.pow(10,-r),o=Rt[8+r/3];return function(e){return n(i*e)+o}}}}!function(e){At=jt(e),It=At.format,Pt=At.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var zt=new Date,Ft=new Date;function Bt(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return Bt((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return zt.setTime(+t),Ft.setTime(+r),e(zt),e(Ft),Math.floor(n(zt,Ft))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var Vt=864e5,Ht=6048e5,Ut=Bt((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/Vt}),(function(e){return e.getDate()-1}));function Wt(e){return Bt((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/Ht}))}var Yt=Wt(0),Kt=Wt(1);Wt(2),Wt(3);var $t=Wt(4);Wt(5),Wt(6);var Gt=Bt((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Gt.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Bt((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var Xt=Bt((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Vt}),(function(e){return e.getUTCDate()-1}));function Jt(e){return Bt((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Ht}))}var Qt=Jt(0),Zt=Jt(1);Jt(2),Jt(3);var en=Jt(4);Jt(5),Jt(6);var tn=Bt((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function nn(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function rn(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function on(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function an(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,u=e.shortMonths,l=hn(i),c=pn(i),f=hn(o),d=pn(o),h=hn(a),p=pn(a),m=hn(s),v=pn(s),g=hn(u),y=pn(u),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return u[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Pn,e:Pn,f:Fn,g:Jn,G:Zn,H:Ln,I:Rn,j:jn,L:zn,m:Bn,M:Vn,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Mr,s:kr,S:Hn,u:Un,U:Wn,V:Kn,w:$n,W:Gn,x:null,X:null,y:Xn,Y:Qn,Z:er,"%":wr},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return u[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:tr,e:tr,f:ar,g:gr,G:br,H:nr,I:rr,j:ir,L:or,m:sr,M:ur,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Mr,s:kr,S:lr,u:cr,U:fr,V:hr,w:pr,W:mr,x:null,X:null,y:vr,Y:yr,Z:xr,"%":wr},w={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:Cn,e:Cn,f:Nn,g:wn,G:xn,H:En,I:En,j:qn,L:On,m:Sn,M:Tn,p:function(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:kn,Q:An,s:In,S:Dn,u:vn,U:gn,V:yn,w:mn,W:bn,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:wn,Y:xn,Z:Mn,"%":_n};function M(e,t){return function(n){var r,i,o,a=[],s=-1,u=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===e.charCodeAt(s)&&(a.push(e.slice(u,s)),null!=(i=sn[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(e.slice(u,s)),a.join("")}}function k(e,t){return function(n){var r,i,o=on(1900,void 0,1);if(S(o,e,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(t&&!("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?(i=(r=rn(on(o.y,0,1))).getUTCDay(),r=i>4||0===i?Zt.ceil(r):Zt(r),r=Xt.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=nn(on(o.y,0,1))).getDay(),r=i>4||0===i?Kt.ceil(r):Kt(r),r=Ut.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),i="Z"in o?rn(on(o.y,0,1)).getUTCDay():nn(on(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,rn(o)):nn(o)}}function S(e,t,n,r){for(var i,o,a=0,s=t.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in sn?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=M(n,b),b.X=M(r,b),b.c=M(t,b),x.x=M(n,x),x.X=M(r,x),x.c=M(t,x),{format:function(e){var t=M(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=M(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}tn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Bt((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var sn={"-":"",_:" ",0:"0"},un=/^\s*\d+/,ln=/^%/,cn=/[\\^$*+?|[\]().{}]/g;function fn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function dn(e){return e.replace(cn,"\\$&")}function hn(e){return new RegExp("^(?:"+e.map(dn).join("|")+")","i")}function pn(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function mn(e,t,n){var r=un.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function vn(e,t,n){var r=un.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function gn(e,t,n){var r=un.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function yn(e,t,n){var r=un.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function bn(e,t,n){var r=un.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function xn(e,t,n){var r=un.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function wn(e,t,n){var r=un.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Mn(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function kn(e,t,n){var r=un.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Sn(e,t,n){var r=un.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Cn(e,t,n){var r=un.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function qn(e,t,n){var r=un.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function En(e,t,n){var r=un.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Tn(e,t,n){var r=un.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Dn(e,t,n){var r=un.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function On(e,t,n){var r=un.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Nn(e,t,n){var r=un.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function _n(e,t,n){var r=ln.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function An(e,t,n){var r=un.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function In(e,t,n){var r=un.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Pn(e,t){return fn(e.getDate(),t,2)}function Ln(e,t){return fn(e.getHours(),t,2)}function Rn(e,t){return fn(e.getHours()%12||12,t,2)}function jn(e,t){return fn(1+Ut.count(Gt(e),e),t,3)}function zn(e,t){return fn(e.getMilliseconds(),t,3)}function Fn(e,t){return zn(e,t)+"000"}function Bn(e,t){return fn(e.getMonth()+1,t,2)}function Vn(e,t){return fn(e.getMinutes(),t,2)}function Hn(e,t){return fn(e.getSeconds(),t,2)}function Un(e){var t=e.getDay();return 0===t?7:t}function Wn(e,t){return fn(Yt.count(Gt(e)-1,e),t,2)}function Yn(e){var t=e.getDay();return t>=4||0===t?$t(e):$t.ceil(e)}function Kn(e,t){return e=Yn(e),fn($t.count(Gt(e),e)+(4===Gt(e).getDay()),t,2)}function $n(e){return e.getDay()}function Gn(e,t){return fn(Kt.count(Gt(e)-1,e),t,2)}function Xn(e,t){return fn(e.getFullYear()%100,t,2)}function Jn(e,t){return fn((e=Yn(e)).getFullYear()%100,t,2)}function Qn(e,t){return fn(e.getFullYear()%1e4,t,4)}function Zn(e,t){var n=e.getDay();return fn((e=n>=4||0===n?$t(e):$t.ceil(e)).getFullYear()%1e4,t,4)}function er(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+fn(t/60|0,"0",2)+fn(t%60,"0",2)}function tr(e,t){return fn(e.getUTCDate(),t,2)}function nr(e,t){return fn(e.getUTCHours(),t,2)}function rr(e,t){return fn(e.getUTCHours()%12||12,t,2)}function ir(e,t){return fn(1+Xt.count(tn(e),e),t,3)}function or(e,t){return fn(e.getUTCMilliseconds(),t,3)}function ar(e,t){return or(e,t)+"000"}function sr(e,t){return fn(e.getUTCMonth()+1,t,2)}function ur(e,t){return fn(e.getUTCMinutes(),t,2)}function lr(e,t){return fn(e.getUTCSeconds(),t,2)}function cr(e){var t=e.getUTCDay();return 0===t?7:t}function fr(e,t){return fn(Qt.count(tn(e)-1,e),t,2)}function dr(e){var t=e.getUTCDay();return t>=4||0===t?en(e):en.ceil(e)}function hr(e,t){return e=dr(e),fn(en.count(tn(e),e)+(4===tn(e).getUTCDay()),t,2)}function pr(e){return e.getUTCDay()}function mr(e,t){return fn(Zt.count(tn(e)-1,e),t,2)}function vr(e,t){return fn(e.getUTCFullYear()%100,t,2)}function gr(e,t){return fn((e=dr(e)).getUTCFullYear()%100,t,2)}function yr(e,t){return fn(e.getUTCFullYear()%1e4,t,4)}function br(e,t){var n=e.getUTCDay();return fn((e=n>=4||0===n?en(e):en.ceil(e)).getUTCFullYear()%1e4,t,4)}function xr(){return"+0000"}function wr(){return"%"}function Mr(e){return+e}function kr(e){return Math.floor(+e/1e3)}var Sr=kt();Sr("d3-number",(function(e,t,n){var r,i;function o(e){return i(e)}function a(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return r=jt(t),i=r.format(e),this},a(),o.format=function(e,i,o,s){return(o||s)&&(t=o,n=s,a()),r.format(e)(i)},o.pattern=function(t){return t&&(e=t,i=r.format(t)),e},o})),Sr("d3-time",(function(e){var t=an({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"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=an.apply(void 0,arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r}));var Cr={id:function(e){return"".concat(e.source,"/").concat(e.key||e.title)},key:function(e){return String(e.key||e.title)},tags:function(e){return e.tags},min:function(e){return e.min},max:function(e){return e.max},type:function(e){return e.type},title:function(e){return String(e.title)},values:function(e){return e.values},value:function(e){return e},label:function(e){return e},formatter:function(e){return function(e){if("function"==typeof e.formatter)return e.formatter();var t=e.formatter||{};return Sr(t.type||"d3-number")(t.format||"")}(e)}};function qr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.id,r=void 0===n?Cr.id:n,i=t.key,o=void 0===i?Cr.key:i,a=t.min,s=void 0===a?Cr.min:a,u=t.max,l=void 0===u?Cr.max:u,c=t.type,f=void 0===c?Cr.type:c,d=t.tags,h=void 0===d?Cr.tags:d,p=t.title,m=void 0===p?Cr.title:p,v=t.values,g=void 0===v?Cr.values:v,y=t.value,b=void 0===y?Cr.value:y,x=t.label,w=void 0===x?Cr.label:x,M=t.formatter,k=void 0===M?Cr.formatter:M,S={id:function(){return r(e)},key:function(){return o(e)},raw:function(){return e},tags:function(){return h(e)},type:function(){return f(e)},min:function(){return s(e)},max:function(){return l(e)},title:function(){return m(e)},items:function(){return g(e)},formatter:function(){return k(e)},value:b,label:w};return S}var Er={diverging:function(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,u=0,l=e[t[0]].length;u<l;++u)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][u])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},none:yt,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}yt(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}yt(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,u=0,l=0;s<i;++s){for(var c=e[t[s]],f=c[a][1]||0,d=(f-(c[a-1][1]||0))/2,h=0;h<s;++h){var p=e[t[h]];d+=(p[a][1]||0)-(p[a-1][1]||0)}u+=f,l+=d*f}n[a-1][1]+=n[a-1][0]=o,u&&(o-=l/u)}n[a-1][1]+=n[a-1][0]=o,yt(e,t)}}},Tr={ascending:function(e){var t=e.map(Mt);return bt(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,i=e.map(Mt),o=function(e){var t=e.map(wt);return bt(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,u=[],l=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],u.push(n)):(s+=i[n],l.push(n));return l.reverse().concat(u)},none:bt,reverse:function(e){return bt(e).reverse()}};function Dr(e,t,n){for(var r={},i=t.stackKey,o=t.value,a=t.startProp||"start",s=t.endProp||"end",u=t.offset||"none",l=t.order||"none",c=t.valueRef||"",f=0,d={},h=0;h<e.items.length;h++){var p=e.items[h],m=c?p[c]:null;if(m&&m.source){var v="".concat(m.source.key||"","/").concat(m.source.field);d[v]||(d[v]=m.source)}var g=i(p);r[g]=r[g]||{items:[]},r[g].items.push(p),f=Math.max(f,r[g].items.length)}for(var y=Array.apply(null,{length:f}).map(Number.call,Number),b=Object.keys(r).map((function(e){return r[e].items})),x=function(){var e=qe([]),t=bt,n=yt,r=xt;function i(i){var o,a,s=e.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(o=0;o<l;++o){for(var f,d=s[o],h=c[o]=new Array(u),p=0;p<u;++p)h[p]=f=[0,+r(i[p],d,p,i)],f.data=i[p];h.key=d}for(o=0,a=t(c);o<l;++o)c[a[o]].index=o;return n(c,a),c}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:qe(et.call(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:qe(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?bt:"function"==typeof e?e:qe(et.call(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?yt:e,i):n},i}().keys(y).value((function(e,t){return e[t]?o(e[t]):0})).order(Tr[l]).offset(Er[u])(b),w=[],M=0;M<x.length;M++)for(var k=x[M],S=0;S<k.length;S++){var C=k[S],q=k[S].data[k.key];q&&(q[a]={value:C[0]},q[s]={value:C[1]},w.push(C[0],C[1]))}var E=Object.keys(d).map((function(e){var t=n(d[e].key);return t?t.field(d[e].field):null})).filter((function(e){return!!e})),T=qr({title:E.map((function(e){return e.title()})).join(", "),min:Math.min.apply(Math,w),max:Math.max.apply(Math,w),type:"measure",formatter:E[0]?E[0].formatter:void 0});e.fields.push(T)}function Or(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i=n.logger;if(Array.isArray(e))r.items=e.map((function(e){return{value:e,label:String(e)}}));else if(e){if("collection"in e)r=G({},t.collection(e.collection));else{var o=t.dataset?t.dataset(e.source):null,a=e.value||function(e){return e},s=e.label||function(e){return e};if(e.groupBy||e.mapTo)i.warn('Deprecated "data" configuration',e),r.items=[];else if(e.hierarchy)r.root=o.hierarchy?o.hierarchy(e.hierarchy):null,r.fields=o.fields();else if(e.items)r.items=e.items.map((function(e){return{value:a(e),label:String(s(e))}}));else if(e.extract){var u=Array.isArray(e.extract)?e.extract:[e.extract];r.items=[];var l,c=[];if(u.forEach((function(e){var n,i=e.source?t.dataset(e.source):o;i&&((n=r.items).push.apply(n,ae(i.extract(e))),void 0!==e.field&&c.push(i.field(e.field)))})),c.length&&(r.fields=c),e.amend&&Array.isArray(e.amend))(l=r.items).push.apply(l,ae(e.amend))}else if(void 0!==e.field&&o){var f=o.field(e.field);f&&(r.fields||(r.fields=[]),r.fields.push(f),"value"in e||(a=f.value||function(e){return e},s=f.label||function(e){return e},r.value=a),r.items=f.items().map((function(t){return{value:a(t),label:String(s(t)),source:{field:e.field}}})))}else e.fields&&e.fields.forEach((function(e){var n,i="object"===H(e)&&e.source?t.dataset(e.source):o;i&&((n="object"===H(e)&&void 0!==e.field?i.field(e.field):i.field(e))&&(r.fields||(r.fields=[]),r.fields.push(n)))}));r.items&&e.map&&(r.items=r.items.map(e.map))}e&&e.stack&&Dr(r,e.stack,t.dataset)}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&r.items&&(r.items=r.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&r.items&&(r.items=r.items.sort(e.sort)),r}function Nr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Or,i={};(e||[]).forEach((function(e){if(!e.key)throw new Error('Data collection is missing "key" property');if("object"===H(e.data)&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");i[e.key]=function(){return r(e.data,t,n)}}));var o=function(e){var t,n;if("string"==typeof e?t=e:"object"===H(e)&&(t=e.key,n=e),!(t in i))throw new Error("Unknown data collection: ".concat(t));"function"==typeof i[t]&&(i[t]=i[t]());var r=i[t];if(n&&n.fields&&n.fields.filter){var o=r.fields.filter(n.fields.filter);r.fields.length!==o.length&&(r=B(r,{fields:o}))}return r};return o}function _r(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Or;if(e.data){var o=i(e.data,t,n);if(o&&o.fields&&o.fields[0])return o.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){var a=n.formatter.get(r)(e.format||"");return a}throw new Error("Formatter of type '".concat(r,"' was not found"))}function Ar(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_r,i={};return{get:function(o){var a;return"string"==typeof o&&e[o]?a=o:"object"===H(o)&&"formatter"in o&&e[o.formatter]?a=o.formatter:"object"===H(o)&&"type"in o&&e[o.type]&&(a=o.type),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o||{},t,n)},all:function(){return Object.keys(e).forEach(this.get),i}}}function Ir(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Pr=function(e){return 1===e.length&&(e=function(e){return function(t,n){return Ir(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}(Ir).right;function Lr(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}var Rr=Math.sqrt(50),jr=Math.sqrt(10),zr=Math.sqrt(2);function Fr(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Rr?10:o>=jr?5:o>=zr?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Rr?10:o>=jr?5:o>=zr?2:1)}function Br(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Vr="$";function Hr(){}function Ur(e,t){var n=new Hr;if(e instanceof Hr)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Wr(){}Hr.prototype=Ur.prototype={constructor:Hr,has:function(e){return Vr+e in this},get:function(e){return this[Vr+e]},set:function(e,t){return this[Vr+e]=t,this},remove:function(e){var t=Vr+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Vr&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Vr&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Vr&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Vr&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Vr&&++e;return e},empty:function(){for(var e in this)if(e[0]===Vr)return!1;return!0},each:function(e){for(var t in this)t[0]===Vr&&e(this[t],t.slice(1),this)}};var Yr=Ur.prototype;Wr.prototype={constructor:Wr,has:Yr.has,add:function(e){return this[Vr+(e+="")]=e,this},remove:Yr.remove,clear:Yr.clear,values:Yr.keys,size:Yr.size,empty:Yr.empty,each:Yr.each};var Kr=Array.prototype,$r=Kr.map,Gr=Kr.slice,Xr={name:"implicit"};function Jr(){var e=Ur(),t=[],n=[],r=Xr;function i(i){var o=i+"",a=e.get(o);if(!a){if(r!==Xr)return r;e.set(o,a=t.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=Ur();for(var r,o,a=-1,s=n.length;++a<s;)e.has(o=(r=n[a])+"")||e.set(o,t.push(r));return i},i.range=function(e){return arguments.length?(n=Gr.call(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Jr(t,n).unknown(r)},Br.apply(i,arguments),i}function Qr(){var e,t,n=Jr().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=o[1]<o[0],f=o[c-0],d=o[1-c];e=(d-f)/Math.max(1,n-s+2*u),a&&(e=Math.floor(e)),f+=(d-f-e*(n-s))*l,t=e*(1-s),a&&(f=Math.round(f),t=Math.round(t));var h=Lr(n).map((function(t){return f+e*t}));return i(c?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),c()):r()},n.range=function(e){return arguments.length?(o=[+e[0],+e[1]],c()):o.slice()},n.rangeRound=function(e){return o=[+e[0],+e[1]],a=!0,c()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(a=!!e,c()):a},n.padding=function(e){return arguments.length?(s=Math.min(1,u=+e),c()):s},n.paddingInner=function(e){return arguments.length?(s=Math.min(1,e),c()):s},n.paddingOuter=function(e){return arguments.length?(u=+e,c()):u},n.align=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),c()):l},n.copy=function(){return Qr(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},Br.apply(c(),arguments)}function Zr(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ei(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ti(){}var ni=.7,ri=1/ni,ii="\\s*([+-]?\\d+)\\s*",oi="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ai="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",si=/^#([0-9a-f]{3,8})$/,ui=new RegExp("^rgb\\("+[ii,ii,ii]+"\\)$"),li=new RegExp("^rgb\\("+[ai,ai,ai]+"\\)$"),ci=new RegExp("^rgba\\("+[ii,ii,ii,oi]+"\\)$"),fi=new RegExp("^rgba\\("+[ai,ai,ai,oi]+"\\)$"),di=new RegExp("^hsl\\("+[oi,ai,ai]+"\\)$"),hi=new RegExp("^hsla\\("+[oi,ai,ai,oi]+"\\)$"),pi={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 mi(){return this.rgb().formatHex()}function vi(){return this.rgb().formatRgb()}function gi(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=si.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?yi(t):3===n?new Mi(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?bi(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?bi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=ui.exec(e))?new Mi(t[1],t[2],t[3],1):(t=li.exec(e))?new Mi(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ci.exec(e))?bi(t[1],t[2],t[3],t[4]):(t=fi.exec(e))?bi(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=di.exec(e))?qi(t[1],t[2]/100,t[3]/100,1):(t=hi.exec(e))?qi(t[1],t[2]/100,t[3]/100,t[4]):pi.hasOwnProperty(e)?yi(pi[e]):"transparent"===e?new Mi(NaN,NaN,NaN,0):null}function yi(e){return new Mi(e>>16&255,e>>8&255,255&e,1)}function bi(e,t,n,r){return r<=0&&(e=t=n=NaN),new Mi(e,t,n,r)}function xi(e){return e instanceof ti||(e=gi(e)),e?new Mi((e=e.rgb()).r,e.g,e.b,e.opacity):new Mi}function wi(e,t,n,r){return 1===arguments.length?xi(e):new Mi(e,t,n,null==r?1:r)}function Mi(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ki(){return"#"+Ci(this.r)+Ci(this.g)+Ci(this.b)}function Si(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"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===e?")":", "+e+")")}function Ci(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function qi(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ti(e,t,n,r)}function Ei(e){if(e instanceof Ti)return new Ti(e.h,e.s,e.l,e.opacity);if(e instanceof ti||(e=gi(e)),!e)return new Ti;if(e instanceof Ti)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Ti(a,s,u,e.opacity)}function Ti(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Di(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Oi(e){return function(){return e}}function Ni(e){return 1==(e=+e)?_i:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Oi(isNaN(t)?n:t)}}function _i(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Oi(isNaN(e)?t:e)}Zr(ti,gi,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:mi,formatHex:mi,formatHsl:function(){return Ei(this).formatHsl()},formatRgb:vi,toString:vi}),Zr(Mi,wi,ei(ti,{brighter:function(e){return e=null==e?ri:Math.pow(ri,e),new Mi(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?ni:Math.pow(ni,e),new Mi(this.r*e,this.g*e,this.b*e,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:ki,formatHex:ki,formatRgb:Si,toString:Si})),Zr(Ti,(function(e,t,n,r){return 1===arguments.length?Ei(e):new Ti(e,t,n,null==r?1:r)}),ei(ti,{brighter:function(e){return e=null==e?ri:Math.pow(ri,e),new Ti(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?ni:Math.pow(ni,e),new Ti(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Mi(Di(e>=240?e-240:e+120,i,r),Di(e,i,r),Di(e<120?e+240:e-120,i,r),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 e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Ai=function e(t){var n=Ni(t);function r(e,t){var r=n((e=wi(e)).r,(t=wi(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=_i(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Ii(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function Pi(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Vi(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Li(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ri(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function ji(e,t){var n,i={},o={};for(n in null!==e&&"object"===r(e)||(e={}),null!==t&&"object"===r(t)||(t={}),t)n in e?i[n]=Vi(e[n],t[n]):o[n]=t[n];return function(e){for(n in i)o[n]=i[n](e);return o}}var zi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fi=new RegExp(zi.source,"g");function Bi(e,t){var n,r,i,o=zi.lastIndex=Fi.lastIndex=0,a=-1,s=[],u=[];for(e+="",t+="";(n=zi.exec(e))&&(r=Fi.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Ri(n,r)})),o=Fi.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(e){return function(t){return e(t)+""}}(u[0].x):function(e){return function(){return e}}(t):(t=u.length,function(e){for(var n,r=0;r<t;++r)s[(n=u[r]).i]=n.x(e);return s.join("")})}function Vi(e,t){var n,i=r(t);return null==t||"boolean"===i?Oi(t):("number"===i?Ri:"string"===i?(n=gi(t))?(t=n,Ai):Bi:t instanceof gi?Ai:t instanceof Date?Li:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?Ii:Array.isArray(t)?Pi:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?ji:Ri)(e,t)}function Hi(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Ui(e){return+e}var Wi=[0,1];function Yi(e){return e}function Ki(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function $i(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Gi(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Ki(i,r),o=n(a,o)):(r=Ki(r,i),o=n(o,a)),function(e){return o(r(e))}}function Xi(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Ki(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Pr(e,t,1,r)-1;return o[n](i[n](t))}}function Ji(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Qi(e,t){return function(){var e,t,n,r,i,o,a=Wi,s=Wi,u=Vi,l=Yi;function c(){return r=Math.min(a.length,s.length)>2?Xi:Gi,i=o=null,f}function f(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,u)))(e(l(t)))}return f.invert=function(n){return l(t((o||(o=r(s,a.map(e),Ri)))(n)))},f.domain=function(e){return arguments.length?(a=$r.call(e,Ui),l===Yi||(l=$i(a)),c()):a.slice()},f.range=function(e){return arguments.length?(s=Gr.call(e),c()):s.slice()},f.rangeRound=function(e){return s=Gr.call(e),u=Hi,c()},f.clamp=function(e){return arguments.length?(l=e?$i(a):Yi,f):l!==Yi},f.interpolate=function(e){return arguments.length?(u=e,c()):u},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,c()}}()(e,t)}function Zi(e,t,n,r){var i,o=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Rr?i*=10:o>=jr?i*=5:o>=zr&&(i*=2),t<e?-i:i}(e,t,n);switch((r=Tt(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ct(t)/3)))-Ct(Math.abs(e)))}(o,a))||(r.precision=i),Pt(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ct(t)-Ct(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-Ct(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return It(r)}function eo(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=Fr(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Zi(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=Fr(s,u,n))>0?r=Fr(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Fr(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,t(i)),e},e}function to(){var e=Qi(Yi,Yi);return e.copy=function(){return Ji(e,to())},Br.apply(e,arguments),eo(e)}function no(){var e,t=[.5],n=[0,1],r=1;function i(i){return i<=i?n[Pr(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Gr.call(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Gr.call(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return no().domain(t).range(n).unknown(e)},Br.apply(i,arguments)}function ro(e){return void 0===e?function(e){return e}:function(t){return e(t)}}function io(e){return Math.max(0,Math.min(1,e))}function oo(e){return"object"===H(e)}function ao(e,t,n){for(var r=Math.abs(t-n)/(e+1),i=[],o=1;o<=e;o++){var a=o*r;i.push(t<n?t+a:t-a)}return i}function so(e,t,n){if(1===e.length)return e;for(var r=e.concat([]),i=0;i<e.length;i++){var o=e[i],a=e[i+1];0===i&&o!==n.start()?(r.push.apply(r,ae(ao(t,o,a))),o-=a-o,a=e[i],r.push.apply(r,ae(ao(t,o,a)))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push.apply(r,ae(ao(t,o,a)))):r.push.apply(r,ae(ao(t,o,a)))}return r.filter((function(e){return e>=n.min()&&e<=n.max()}))}function uo(e){var t=e.distance,n=e.scale,r=e.minorCount,i=void 0===r?0:r,o=e.unitDivider,a=void 0===o?100:o,s=e.formatter,u=void 0===s?void 0:s,l=fe(a)||fe(t)?2:Math.max(t/a,2),c=Math.min(1e3,Math.round(l)),f=n.ticks(c);f.length<=1&&(f=n.ticks(c+1));var d=i>0?so(f,i,n):f;d.sort((function(e,t){return e-t}));var h=d.map(ro(u));return d.map((function(e,t){var r=n(e);return{position:r,start:r,end:r,label:h[t],value:e,isMinor:-1===f.indexOf(e)}}))}function lo(e){var t=e.distance,n=e.scale,r=e.minorCount,i=void 0===r?0:r,o=e.unitDivider,a=void 0===o?100:o,s=e.formatter,u=void 0===s?void 0:s,l=fe(a)||fe(t)?2:Math.max(t/a,2),c=Math.min(1e3,Math.round(l)),f=c>10?10:c;n.nice(f);var d=n.ticks(c),h=i>0?so(d,i,n):d;h.sort((function(e,t){return e-t}));var p=h.map(ro(u));return h.map((function(e,t){var r=n(e);return{position:r,start:r,end:r,label:p[t],value:e,isMinor:-1===d.indexOf(e)}}))}function co(e){var t,n=e.settings,r=e.scale,i=e.distance,o=e.formatter,a=void 0===o?function(e){return e}:o,s=n.minorTicks&&!fe(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values))t=function(e){var t=e.values,n=e.scale,r=e.formatter,i=void 0===r?function(e){return e}:r;return t.sort((function(e,t){return(oo(e)?e.value:e)-(oo(t)?t.value:t)})).filter((function(e,t,r){var i=oo(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t})).map((function(e){var t=oo(e),r=t?e.value:e,o=n(r);return{position:o,value:r,label:t&&void 0!==e.label?e.label:i(r),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?io(n(e.start)):o,end:t&&!isNaN(e.end)?io(n(e.end)):o}}))}({values:n.ticks.values.filter((function(e){return"object"===H(e)?!fe(e.value):!fe(e)})),scale:r.copy(),formatter:a});else if(fe(n.ticks.count)){t=(n.ticks.tight?lo:uo)({distance:i,minorCount:s,unitDivider:n.ticks.distance,scale:r,formatter:a}),n.ticks.forceBounds&&function(e,t,n){var r=e.map((function(e){return e.position})),i=t.range();-1===r.indexOf(i[0])?e.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);var o=e[e.length-1];-1===r.indexOf(i[1])?e.push({position:i[1],start:i[1],end:i[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,r,a)}else{t=function(e){var t=e.count,n=e.minorCount,r=e.scale,i=e.formatter;return r.ticks((t-1)*n+t).map((function(e,t){var o=r(e);return{position:o,start:o,end:o,label:i(e),isMinor:t%(n+1)!=0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:s,scale:r.copy(),formatter:a})}return t}function fo(e){var t=e.scale,n=t.domain(),r=t.data().items,i=t.labels?t.labels():n,o=t.bandwidth();return n.map((function(e,n){var a=t(e);return{position:a+o/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:a,end:a+o}}))}function ho(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return Object.keys(t).forEach((function(i){var o=H(e[i]);r[i]="function"===o?e[i](n):"undefined"===o?t[i]:e[i]})),r}var po={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},mo={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},vo={count:NaN};function go(e,t){var n=+e.min,r=+e.max,i=0,o=1;if(t&&t[0]){var a=t.map((function(e){return e.min()})).filter((function(e){return!isNaN(e)})),s=t.map((function(e){return e.max()})).filter((function(e){return!isNaN(e)}));if(i=a.length?Math.min.apply(Math,ae(a)):Number.NaN,o=s.length?Math.max.apply(Math,ae(s)):Number.NaN,isNaN(i)||isNaN(o))i=-1,o=1;else if(i===o&&0===i)i=-1,o=1;else if(i===o&&i)i-=Math.abs(.1*i),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){var u=o-i;i-=u*e.expand,o+=u*e.expand}if(Array.isArray(e.include)){var l=e.include.filter((function(e){return!isNaN(e)}));i=Math.min.apply(Math,ae(l).concat([i])),o=Math.max.apply(Math,ae(l).concat([o]))}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?o:r}}function yo(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function bo(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=to(),o={instance:null,invert:!1},a={data:n,resources:r},s=ho(t,po,a);function u(e){return fe(e)?NaN:i(e)}s.ticks=ho(t.ticks,mo,a),s.minorTicks=ho(t.minorTicks,vo,a),u.data=function(){return n},u.invert=function(e){return i.invert(e)},u.rangeRound=function(e){return i.rangeRound(e),u},u.clamp=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return i.clamp(e),u},u.cachedTicks=function(){return e},u.clearTicksCache=function(){return e=void 0,this},u.ticks=function(t){return null!==t&&"object"===H(t)?(t.settings=t.settings||{},t.settings=B(!0,{},s,t.settings),t.scale=u,e=co(t)):e=i.ticks(t)},u.nice=function(e){return i.nice(e),u},u.tickFormat=function(e,t){return i.tickFormat(e,t)},u.interpolate=function(e){return i.interpolate(e),u},u.domain=function(e){return arguments.length?(i.domain(e),o.instance&&o.instance.domain([u.start(),u.end()]),u):i.domain()},u.range=function(e){return arguments.length?(i.range(e),u):i.range()},u.start=function(){return u.domain()[0]},u.end=function(){return u.domain()[this.domain().length-1]},u.min=function(){return Math.min(this.start(),this.end())},u.max=function(){return Math.max(this.start(),this.end())},u.classify=function(e){for(var t=(u.start()-u.end())/e,n=[u.end()],r=[],i=t/2,o=0;o<e;o++){var a=n[n.length-1]||0,s=a+t,l=u(a+i);n.push.apply(n,[s,s]),r.push.apply(r,[l,l])}return n.pop(),u.domain(n),u.range(r),u},u.copy=function(){var e=bo(t,n,r);return e.domain(u.domain()),e.range(u.range()),e.clamp(i.clamp()),e},u.norm=function(e){return yo(o,u),o.instance(e)},u.normInvert=function(e){return yo(o,u),o.instance.invert(e)};var l=go(s,n?n.fields:[]),c=l.mini,f=l.maxi;return u.domain([c,f]),u.range(s.invert?[1,0]:[0,1]),o.invert=s.invert,u}var xo={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function wo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={data:t,resources:n},i=ho(e,xo,r),o=t.items||[],a={},s=[],u=[];function l(e,n){e.data=function(){return t},e.datum=function(e){return o[a[e]]},e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=function(){return u},e.ticks=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,fo(t,n.trackBy)}}var c=Qr();l(c,e),c.pxScale=function(t){var n=i.maxPxStep;if(isNaN(n))return c;var r=c.domain().length,o=Math.max(1,r-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;var a=c.copy();a.type=c.type,l(a,e);var s=o*n/t,u=(1-s)*c.align();return a.range(i.invert?[s+u,u]:[u,s+u]),a};for(var f="function"==typeof e.value?e.value:function(e){return e.datum.value},d="function"==typeof e.label?e.label:function(e){return e.datum.label},h=0;h<o.length;h++){var p=B({datum:o[h]},r),m=f(p,h);-1===s.indexOf(m)&&(s.push(m),u.push(d(p,h)),a[m]=h)}return c.domain(s),c.range(i.invert?i.range.slice().reverse():i.range),c.padding(isNaN(i.padding)?0:i.padding),isNaN(i.paddingInner)||c.paddingInner(i.paddingInner),isNaN(i.paddingOuter)||c.paddingOuter(i.paddingOuter),c.align(isNaN(i.align)?.5:i.align),c}var Mo={depth:0};function ko(e,t,n){return e.ancestors().map((function(e){return t(B({datum:e.data},n))})).reverse().slice(1).toString()}function So(e,t,n){var r=t.ticks.depth,i=t.value,o=t.label,a=[],s=[],u={},l=[],c=0;if(!e)return{values:a,labels:s,items:u,ticks:l};e.eachAfter((function(e){if(e.depth>0){var t=ko(e,i,n),f=e.leaves()||[e],d=i(B({datum:e.data},n)),h=o(B({datum:e.data},n)),p=Array.isArray(e.children),m={key:t,count:f.length,value:d,label:h,leftEdge:ko(f[0],i,n),rightEdge:ko(f[Math.max(f.length-1,0)],i,n),node:e};p?(a.push("SPACER_".concat(c,"_SPACER")),c++):(a.push(t),s.push(h)),(r<=0&&!p||e.depth===r)&&l.push(m),u[t]=m}}));var f=e.height-1;return f>0&&a.splice(-f),{values:a,labels:s,items:u,ticks:l}}var Co=function(e){return e.min()},qo=function(e){return e.max()};function Eo(e,t){var n=e&&!isNaN(e.min),r=e&&!isNaN(e.max),i=n?+e.min:0,o=r?+e.max:1;if(t&&t.length){if(!n){var a=t.map(Co).filter(ce);i=a.length?Math.min.apply(Math,ae(a)):i}if(!r){var s=t.map(qo).filter(ce);o=s.length?Math.max.apply(Math,ae(s)):o}}return[i,o]}var To={domain:[],range:[],invert:!1,min:NaN,max:NaN};function Do(e,t,n){var r=e.length;if(2===r)return[t,n];var i=[],o=(n-t)/(r-1);i.push(t);for(var a=1;a<r-1;a++)i.push(t+o*a);return i.push(n),i}function Oo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=bo(e,t,n).clamp(!0).interpolate(Ai),i=ho(e,To,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;B(!0,s,r);var u=Eo(i,t?t.fields:[]),l=oe(u,2),c=l[0],f=l[1],d=o?i.domain.length:-1,h=n.theme?n.theme.palette("sequential",d>0?d:2):[],p=a?i.range:h;return s.range(i.invert?p.slice().reverse():p.slice()),s.domain(o?i.domain:Do(s.range(),c,f)),s}var No={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function _o(e,t,n){var r=e.length;if(2===r)return[t+(n-t)/2];for(var i=[],o=(n-t)/r,a=1;a<r;a++)i.push(t+o*a);return i}function Ao(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;var i=Oo().domain([n,r]).range(t);return[n].concat(ae(function(e){for(var t=[],n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}(e)),[r]).map((function(e){return i(e)}))}function Io(e,t,n){var r=2===e.length?10:Math.max(1,e.length),i=to().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return i;for(var o=Math.max(0,e.length-1);i.length>o;)i[0]-t<=n-i[i.length-1]?i.shift():i.pop();return i}var Po={domain:[],range:[]};function Lo(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Jr(),i={data:t,resources:n},o=ho(e,Po,i),a="function"==typeof e.value?e.value:function(e){return e.datum.value},s="function"==typeof e.label?e.label:function(e){return e.datum.label},u=t.items||[],l={},c=[],f=[],d=0;d<u.length;d++){var h=B({datum:u[d]},i),p=a(h,d);-1===c.indexOf(p)&&(c.push(p),f.push(s(h,d)),l[p]=d)}return r.data=function(){return t},r.labels=function(){return f},r.label=function(e){return f[c.indexOf(e)]},r.datum=function(e){return u[l[e]]},r.range(o.range),Array.isArray(o.domain)&&o.domain.length?r.domain(o.domain):r.domain(c),r}var Ro={domain:[],range:[],unknown:void 0},jo={domain:[],range:[],override:!1};var zo=kt();function Fo(e,t,n){var r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((function(e){r.extract.push({field:e})})));var i,o=Or(r,t,n),a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?-1!==e.fields.map((function(e){return"dimension"===e.type()?"band":"linear"})).indexOf("linear")?"linear":"band":"linear"}(o);return"color"===a&&(a=o.fields&&o.fields[0]&&"dimension"===o.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&((i=(i=n.scale.get(a))(e,o,{theme:n.theme,logger:n.logger})).type=a),i}function Bo(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Fo,i={};return{get:function(o){var a;return"string"==typeof o&&e[o]?a=o:"object"===H(o)&&"scale"in o&&e[o.scale]&&(a=o.scale),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o,t,n)},all:function(){return Object.keys(e).forEach(this.get),i}}}zo("linear",bo),zo("band",wo),zo("h-band",(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={data:n,resources:r},o=ho(t,xo,i);o.ticks=ho(t.ticks,Mo,i),o.value="function"==typeof t.value?t.value:function(e){return e.datum.value},o.label="function"==typeof t.label?t.label:function(e){return e.datum.value};var a=wo(o),s=So(n.root,o,i),u=s.values,l=s.labels,c=s.items,f=s.ticks,d=function(e){var t=String(e),n=c[t];return a(n?o.invert?n.rightEdge:n.leftEdge:t)};B(!0,d,a),d.bandwidth=function(e){var t=c[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){var r=d(t.leftEdge),i=d(t.rightEdge);return Math.abs(r-i)+n}return n},d.step=function(e){var t=c[String(e)],n=t?t.count:1,r=a.step();return r*=n},d.data=function(){return n},d.datum=function(e){var t=c[String(e)];return t?t.node.data:null},d.copy=function(){return e(t,n,r)},d.labels=function(){return l},d.ticks=function(){return f.map((function(e){var t=d(e.key),n=d.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}}))};var h=a.pxScale;return d.pxScale=function(e){return a=h(e),d},d.domain(u),d})),zo("sequential-color",Oo),zo("threshold-color",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=no(),i=ho(e,No,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return fe(e)?NaN:r(e)}Object.keys(r).forEach((function(e){return s[e]=r[e]}));var u=t.fields,l=Eo(i,u),c=oe(l,2),f=c[0],d=c[1],h=o?i.domain.length:-1,p=n.theme?n.theme.palette("sequential",h>0?h:2):[],m=a?i.range:p,v=[];return v=o?i.domain:i.nice?Io(m,f,d):[f+(d-f)/2],m.length>v.length+1?v=_o(m,f,d):m.length<v.length+1&&(m=Ao(v,m,f,d)),s.data=function(){return t},s.range(i.invert?m.slice().reverse():m),s.domain(v),s})),zo("categorical-color",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Lo(t,n,r),o=r.theme,a=ho(t,Ro,{data:n,resources:r});if(a.explicit=ho(t.explicit,jo,{data:n,resources:r}),e=Array.isArray(a.range)&&0!==a.range.length?a.range.slice():o?o.palette("categorical",i.domain().length).slice():[],a.unknown)i.unknown(a.unknown);else if(o&&o.palette("unknown")){var s=o.palette("unknown");i.unknown(s[0])}if(Array.isArray(a.explicit.domain)&&a.explicit.domain.length){for(var u=i.domain().slice(),l=a.explicit.domain,c=Array.isArray(a.explicit.range)?a.explicit.range:[],f=Math.floor(u.length/e.length),d=1;d<f+1;d*=2)e=e.concat(e);if(a.explicit.override)for(var h=0;h<l.length;h++){var p=u.indexOf(l[h]);p>-1&&(e[p]=c[h])}else{var m=l.map((function(e,t){return[u.indexOf(e),e,c[t]]})).sort((function(e,t){return e[0]-t[0]}));m.forEach((function(t){var n=u.indexOf(t[1]);-1!==n&&e.splice(n,0,t[2])}))}e.length=u.length}return i.range(e),i}));var Vo={};function Ho(){Ho.init.call(this)}Vo.isObject=function(e){return"object"===r(e)&&null!==e},Vo.isNumber=function(e){return"number"==typeof e},Vo.isUndefined=function(e){return void 0===e},Vo.isFunction=function(e){return"function"==typeof e};var Uo=Ho;Ho.EventEmitter=Ho,Ho.prototype._events=void 0,Ho.prototype._maxListeners=void 0,Ho.defaultMaxListeners=10,Ho.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},Ho.prototype.setMaxListeners=function(e){if(!Vo.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},Ho.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],Vo.isUndefined(n))return!1;if(Vo.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(Vo.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},Ho.prototype.addListener=function(e,t){var n;if(!Vo.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,Vo.isFunction(t.listener)?t.listener:t),this._events[e]?Vo.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Vo.isObject(this._events[e])&&!this._events[e].warned)&&((n=Vo.isUndefined(this._maxListeners)?Ho.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,Vo.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),Vo.isFunction(console.trace)&&console.trace()));return this},Ho.prototype.on=Ho.prototype.addListener,Ho.prototype.once=function(e,t){if(!Vo.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},Ho.prototype.removeListener=function(e,t){var n,r,i,o;if(!Vo.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||Vo.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Vo.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},Ho.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],Vo.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},Ho.prototype.listeners=function(e){return this._events&&this._events[e]?Vo.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},Ho.listenerCount=function(e,t){return e._events&&e._events[t]?Vo.isFunction(e._events[t])?1:e._events[t].length:0};var Wo=function(e){return Object.keys(Uo.prototype).forEach((function(t){e[t]=Uo.prototype[t]})),Uo.init(e),e};function Yo(){var e=0,t=0,n=0,r=0;n=n||e;var i={move:function(e){this.moveTo(n+e)},moveTo:function(o){var a=Math.max(e,Math.min(t-r,o));n!==a&&(n=a,i.emit("update"))},update:function(o){var a=!1,s=o.min;e=void 0===s?e:s;var u=o.max;t=void 0===u?t:u,void 0!==o.viewSize&&o.viewSize!==r&&(r=o.viewSize,a=!0);var l=Math.max(e,Math.min(t-r,n));n!==l&&(n=l,a=!0),a&&i.emit("update")},getState:function(){return{min:e,max:t,start:n,viewSize:r}}};return Wo(i),i}function Ko(e,t){var n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||Yo();return o.update({min:n,max:r,viewSize:i}),o}function $o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Ko(e[r],t?t[r]:null));return n}function Go(e,t){return t[e]||(t[e]=Yo()),t[e]}function Xo(e,t){return e<=t}function Jo(e,t){return e<t}function Qo(e,t,n){for(var r=0;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function Zo(e,t,n,r){for(var i=e.length,o=1;o<i;o+=2)if(n(e[o-1],t)&&r(t,e[o]))return!0;return!1}function ea(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.includeMax,i=void 0===r||r,o=n.includeMin,a=void 0===o||o;e=i?Xo:Jo,t=a?Xo:Jo},i.add=function(e){var t,n=e.min,i=e.max,o=Qo(r,n),a=Qo(r,i,!0),s=[o,a-o];o%2==0&&s.push(n),a%2==0&&s.push(i);var u=r.join(",");return(t=r).splice.apply(t,s),u!==r.join(",")},i.remove=function(e){var t,n=e.min,i=e.max,o=Qo(r,n),a=Qo(r,i,!0),s=[o,a-o];o%2==1&&s.push(n),a%2==1&&s.push(i);var u=r.join(",");return(t=r).splice.apply(t,s),u!==r.join(",")},i.set=function(e){var t=r.join(",");return r=[],Array.isArray(e)?e.forEach(i.add):i.add(e),t!==r.join(",")},i.clear=function(){var e=r.length>0;return r=[],e},i.containsValue=function(n){return Zo(r,n,t,e)},i.containsRange=function(e){var t=e.min,n=e.max,i=Qo(r,t,!0),o=Qo(r,n);return i===o&&o%2==1},i.toggle=function(e){return i.containsRange(e)?i.remove(e):i.add(e)},i.ranges=function(){for(var e=[],t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},i.configure(n),i}function ta(){var e=[];function t(){}return t.add=function(t){return-1===e.indexOf(t)&&(e.push(t),!0)},t.remove=function(t){var n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=function(t){return-1!==e.indexOf(t)},t.values=function(){return e.slice()},t.clear=function(){return e=[]},t.toString=function(){return e.join(";")},t}var na={key:void 0,includeMin:!0,includeMax:!0};function ra(e){for(var t,n,r=e.items,i=e.collection,o=e.vc,a={},s=[],u=0,l=r.length;u<l;u++){i[t=r[u].key]||(i[t]=o()),n=r[u].values||[r[u].value];for(var c=0;c<n.length;c++)i[t].add(n[c])&&(a[t]=a[t]||[],a[t].push(n[c]))}for(var f=Object.keys(a),d=0,h=f.length;d<h;d++)t=f[d],s.push({id:t,values:a[t]});return s}function ia(e){for(var t,n,r=e.items,i=e.collection,o={},a=[],s=0,u=r.length;s<u;s++)if(i[t=r[s].key]){n=r[s].values||[r[s].value];for(var l=0;l<n.length;l++)i[t].remove(n[l])&&(o[t]=o[t]||[],o[t].push(n[l]))}for(var c=Object.keys(o),f=0,d=c.length;f<d;f++)t=c[f],a.push({id:t,values:o[t]});return a}function oa(e){for(var t,n,r={},i=0,o=e.length;i<o;i++){t=e[i].key,n=e[i].values||[e[i].value],r[t]||(r[t]=[]);for(var a=0;a<n.length;a++){-1===r[t].indexOf(n[a])&&r[t].push(n[a])}}return r}function aa(e){var t=e.key,n=e.collection,r=e.obj,i=e.fn,o=e.value;n[t]||(n[t]=i()),r[t]=r[t]||[],r[t].push(o),n[t].add(o)}function sa(e){for(var t,n,r,i=e.items,o=e.values,a=e.vc,s={},u={},l=[],c=[],f=oa(i),d=Object.keys(f),h=0,p=d.length;h<p;h++)for(var m=0,v=(r=f[t=d[h]]).length;m<v;m++)n=r[m],o[t]&&o[t].contains(n)?o[t]&&o[t].contains(n)&&(u[t]=u[t]||[],u[t].push(n),o[t].remove(n)):aa({key:t,value:n,collection:o,obj:s,fn:a});for(var g=Object.keys(s),y=0,b=g.length;y<b;y++)t=g[y],l.push({id:t,values:s[t]});for(var x=Object.keys(u),w=0,M=x.length;w<M;w++)t=x[w],c.push({id:t,values:u[t]});return[l,c]}function ua(e,t){for(var n,r,i=[],o=Object.keys(e),a=function(e){return-1===t[n].indexOf(e)},s=0,u=o.length;s<u;s++)n=o[s],t[n]?(r=e[n].filter(a)).length&&i.push({id:n,values:r}):i.push({id:n,values:e[n]});return i}function la(e){for(var t,n,r=e.items,i=e.vCollection,o=e.vc,a={},s=oa(r),u={},l=Object.keys(i),c=0,f=l.length;c<f;c++)u[n=l[c]]=i[n].values().slice(),delete i[n];for(var d=function(e){i[n]&&i[n].contains(e)||aa({key:n,value:e,collection:i,obj:a,fn:o})},h=Object.keys(s),p=0,m=h.length;p<m;p++)s[n=h[p]].forEach(d);return t=ua(u,a),[ua(a,u),t]}function ca(e,t,n){var r=function(e,t){if(!Object.keys(t).length)return e;for(var n=e.length,r=Array(n),i=0;i<n;i++)r[i]=e[i].key in t?B({},e[i],{key:t[e[i].key]}):e[i];return r}(t,n);return e&&e.length?e.reduce((function(e,t){return t(e)}),r):r}function fa(e){return e.replace(/(-[a-z])/g,(function(e){return e.toUpperCase().replace("-","")}))}function da(e){return e.replace(/([A-Z])/g,(function(e){return"-".concat(e.toLowerCase())}))}function ha(e,t,n){var r=n.ranges,i=n.interceptors,o=n.rc,a=n.aliases,s=n.rangeConfig,u=ca(i["".concat(t,"Ranges")],e,a),l=!1;return u.forEach((function(e){var n=e.key;if(r[n]||(r[n]=o(s.sources[n]||s.default)),"set"===t)l=r[n][t](e.ranges||e.range)||l;else for(var i=e.ranges||[e.range],a=0;a<i.length;a++)l=r[n][t](i[a])||l})),l}function pa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.vc,n=void 0===t?ta:t,r=e.rc,i=void 0===r?ea:r,o=!1,a={},s={},u={},l={sources:{},default:B({},na)},c={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},f=function(){var e={values:{},ranges:{}};return Object.keys(s).forEach((function(t){e.values[t]=s[t].values()})),Object.keys(a).forEach((function(t){e.ranges[t]=a[t].ranges()})),e},d={ls:[],clear:function(){this.ls.forEach((function(e){return e.clear()}))},start:function(){this.ls.forEach((function(e){return e.start()}))},end:function(){this.ls.forEach((function(e){return e.end()}))},update:function(){var e=f();this.ls.forEach((function(t){return t._state(e)}))},updateValues:function(){var e=f();this.ls.forEach((function(t){return t._state({values:e.values})}))},updateRanges:function(){var e=f();this.ls.forEach((function(t){return t._state({ranges:e.ranges})}))}},h={configure:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(l={sources:{},default:B({},na)},e.ranges.forEach((function(e){var t={};Object.keys(na).filter((function(e){return"key"!==e})).forEach((function(n){t[n]=void 0!==e[n]?e[n]:na[n]})),void 0!==e.key?l.sources[e.key]=t:l.default=t})),Object.keys(a).forEach((function(e){return a[e].configure(l.sources[e]||l.default)})),h.emit("update",[],[]))},link:function(e){if(h===e)throw new Error("Can't link to self");d.ls.push(e),e._state(f())},_state:function(e){if(!e)return f();if(e.values){var t=[];Object.keys(e.values).forEach((function(n){s[n]&&e.values[n].join(";")===s[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(s).forEach((function(n){e.values[n]||t.push({key:n,values:[]})})),t.length&&h.setValues(t)}if(e.ranges){var n=[];Object.keys(e.ranges).forEach((function(t){a[t]&&e.ranges[t].join(";")===a[t].toString()||n.push({key:t,ranges:e.ranges[t]})})),Object.keys(a).forEach((function(t){e.ranges[t]||n.push({key:t,ranges:[]})})),n.length&&h.setRanges(n)}},start:function(){if(!o){o=!0;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];h.emit.apply(h,["start"].concat(t)),d.start()}},end:function(){if(o){o=!1,a={},s={};for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];h.emit.apply(h,["end"].concat(t)),d.end()}},isActive:function(){return o},clear:function(){var e=h.brushes().filter((function(e){return"value"===e.type&&e.brush.values().length})).map((function(e){return{id:e.id,values:e.brush.values()}})),t=Object.keys(a).length>0||e.length;a={},s={},t&&(h.emit("update",[],e),d.clear())},brushes:function(){var e=[];return e=(e=e.concat(Object.keys(a).map((function(e){return{type:"range",id:e,brush:a[e]}})))).concat(Object.keys(s).map((function(e){return{type:"value",id:e,brush:s[e]}})))},addValue:function(e,t){h.addValues([{key:e,value:t}])},addValues:function(e){var t=ca(c.addValues,e,u),r=ra({vc:n,collection:s,items:t});h.emit("add-values",t),r.length&&(o||(o=!0,h.emit("start")),h.emit("update",r,[]),d.updateValues())},setValues:function(e){var t=ca(c.setValues,e,u),r=la({items:t,vCollection:s,vc:n});h.emit("set-values",t),(r[0].length>0||r[1].length>0)&&(o||(o=!0,h.emit("start")),h.emit("update",r[0],r[1]),d.updateValues())},removeValue:function(e,t){h.removeValues([{key:e,value:t}])},removeValues:function(e){var t=ca(c.removeValues,e,u),n=ia({collection:s,items:t});h.emit("remove-values",t),n.length&&(h.emit("update",[],n),d.updateValues())},addAndRemoveValues:function(e,t){var r=ca(c.addValues,e,u),i=ca(c.removeValues,t,u),a=ra({vc:n,collection:s,items:r}),l=ia({collection:s,items:i});h.emit("add-values",r),h.emit("remove-values",i),(a.length||l.length)&&(o||(o=!0,h.emit("start")),h.emit("update",a,l),d.updateValues())},toggleValue:function(e,t){h.toggleValues([{key:e,value:t}])},toggleValues:function(e){var t=ca(c.toggleValues,e,u),r=sa({items:t,values:s,vc:n});h.emit("toggle-values",t),(r[0].length>0||r[1].length>0)&&(o||(o=!0,h.emit("start")),h.emit("update",r[0],r[1]),d.updateValues())},containsValue:function(e,t){var n=u[e]||e;return!!s[n]&&s[n].contains(t)},addRange:function(e,t){h.addRanges([{key:e,range:t}])},addRanges:function(e){ha(e,"add",{ranges:a,rc:i,interceptors:c,aliases:u,rangeConfig:l})&&(o||(o=!0,h.emit("start")),h.emit("update",[],[]),d.updateRanges())},removeRange:function(e,t){h.removeRanges([{key:e,range:t}])},removeRanges:function(e){ha(e,"remove",{ranges:a,rc:i,interceptors:c,aliases:u,rangeConfig:l})&&(o||(o=!0,h.emit("start")),h.emit("update",[],[]),d.updateRanges())},setRange:function(e,t){h.setRanges([{key:e,range:t}])},setRanges:function(e){ha(e,"set",{ranges:a,rc:i,interceptors:c,aliases:u,rangeConfig:l})&&(o||(o=!0,h.emit("start")),h.emit("update",[],[]),d.updateRanges())},toggleRange:function(e,t){h.toggleRanges([{key:e,range:t}])},toggleRanges:function(e){ha(e,"toggle",{ranges:a,rc:i,interceptors:c,aliases:u,rangeConfig:l})&&(o||(o=!0,h.emit("start")),h.emit("update",[],[]),d.updateRanges())},containsRangeValue:function(e,t){var n=u[e]||e;return!!a[n]&&a[n].containsValue(t)},containsRange:function(e,t){var n=u[e]||e;return!!a[n]&&a[n].containsRange(t)},containsMappedData:function(e,t,n){for(var r,i,o,l,c=[],f=Object.keys(e),d=0,h=f.length;d<h;d++){if("value"===(r=f[d]))i=e,c[d]={key:"",i:d,bool:!1};else{if("source"===r)continue;i=e[r],c[d]={key:r,i:d,bool:!1}}void 0!==(o=i.source&&i.source.field)&&(void 0!==i.source.key&&(o="".concat(i.source.key,"/").concat(o)),o in u&&(o=u[o]),l=i.value,a[o]?c[d].bool=Array.isArray(l)?a[o].containsRange({min:l[0],max:l[1]}):a[o].containsValue(l):s[o]&&s[o].contains(l)&&(c[d].bool=!0))}return t?(c=c.filter((function(e){return-1!==t.indexOf(e.key)})),"and"===n?!!c.length&&!c.some((function(e){return!1===e.bool})):"xor"===n?!!c.length&&c.some((function(e){return e.bool}))&&c.some((function(e){return!1===e.bool})):c.some((function(e){return e.bool}))):c.some((function(e){return e.bool}))},intercept:function(e,t){var n=fa(e);c[n]&&c[n].push(t)},removeInterceptor:function(e,t){var n=fa(e);if(c[n]){var r=c[n].indexOf(t);-1!==r&&c[n].splice(r,1)}},removeAllInterceptors:function(e){var t=[];if(e){var n=fa(e);c[n]&&c[n].length&&t.push({name:e,handlers:c[n]})}else Object.keys(c).forEach((function(e){c[e].length&&t.push({name:da(e),handlers:c[e]})}));t.forEach((function(e){e.handlers.slice().forEach((function(t){return h.removeInterceptor(e.name,t)}))}))},addKeyAlias:function(e,t){u[e]=t},removeKeyAlias:function(e){delete u[e]}};return Wo(h),h}function ma(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}kt();var va=2*Math.PI,ga=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=va);function i(e){return 1-t*function(e){return 1.0009775171065494*(Math.pow(2,-10*e)-.0009765625)}(e=+e)*Math.sin((e+r)/n)}return i.amplitude=function(t){return e(t,n*va)},i.period=function(n){return e(t,n)},i}(1,.3);function ya(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}function ba(e,t,n){var r,i=e.old,o=e.current,a=t.renderer,s=[],u={nodes:[],ips:[]},l={nodes:[],ips:[]},c={nodes:[],ips:[]},f=[],d=n.trackBy||ya,h={start:function(){var e={};i.forEach((function(t,n){var r=d(t,n);e[r]=t})),o.forEach((function(t,n){var r=d(t,n);e[r]?(c.ips.push(ji(e[r],t)),c.nodes.push(t),s.push(e[r]),e[r]=!1):(u.nodes.push(t),u.ips.push(ji({r:.001,opacity:0},t)))})),Object.keys(e).forEach((function(t){e[t]&&(l.nodes.push(e[t]),l.ips.push(ji(e[t],B({},e[t],{r:1e-4,opacity:0}))))})),l.ips.length&&f.push({easing:ma,duration:200,tweens:l.ips,nodes:[].concat(s)}),c.ips.length&&f.push({easing:ma,duration:400,tweens:c.ips,nodes:[]}),u.ips.length&&f.push({easing:ga,duration:1200,tweens:u.ips,nodes:ae(c.nodes)}),f.length&&(f[0].started=Date.now(),"undefined"!=typeof window&&(r=window.requestAnimationFrame(h.tick)))},tick:function(){var e=f[0];e||h.stop(),e.started||(e.started=Date.now());var t=(Date.now()-e.started)/e.duration,n=[],i=e.tweens.map((function(n){return n(e.easing(Math.min(1,t)))}));n.push.apply(n,ae(i)),n.push.apply(n,ae(e.nodes)),a.render(n),t>=1&&(f.shift(),f.length||h.stop()),r&&(r=window.requestAnimationFrame(h.tick))},stop:function(){r&&(window.cancelAnimationFrame(r),r=!1)}};return h}var xa={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},wa=/^\$/;function Ma(e){var t=H(e);return"object"!==t&&"function"!==t&&"undefined"!==t}function ka(e,t,n){var r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function Sa(e,t){return e.pxScale?e.pxScale(t):e}var Ca={normalizeSettings:function(e,t,n){var r=B({},e),i=B({},t);return Object.keys(r).forEach((function(e){i[e]={};var o=r[e],a=H(o);if("function"==typeof o)i[e].fn=o;else if(Ma(o)){var s=t[e];"string"==typeof s&&wa.test(s)&&(s=xa[s]);var u=H(s);i[e]="undefined"===u||u===a?o:s}else o&&"object"===H(o)&&("function"==typeof o.fn&&(i[e].fn=o.fn),void 0!==o.scale&&(i[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(i[e].ref=o.ref))})),Object.keys(t).forEach((function(e){if(!(e in r)){var n=t[e];"string"===H(n)&&wa.test(n)?i[e]=xa[n]:i[e]=n}})),i},resolveForItem:function(e,t,n){for(var r={},i=Object.keys(t),o=i.length,a=e.datum,s=e.datum,u=0;u<o;u++){var l=i[u],c=t[l],f="object"===H(s)&&void 0!==c,d=f&&"string"==typeof c.ref,h=f&&l in s,p=d?s[c.ref]:h?s[l]:a;Ma(c)?r[l]=c:f&&c.fn?(c.scale&&(e.scale=c.scale),r[l]=c.fn.call(null,e,n)):f&&c.scale&&p?(r[l]=c.scale(p.value),c.scale.bandwidth&&(r[l]+=c.scale.bandwidth()/2)):d&&p?r[l]=p.value:c.fn?r[l]=c.fn.call(null,e,n):r[l]=c}return r},updateScaleSize:ka};function qa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ca,n={};function r(r){var i=r.data,o=r.settings,a=r.defaults,s=void 0===a?{}:a,u=r.scaled,l=n.norm=t.normalizeSettings(o,s,e.chart),c={scale:e.chart.scale,formatter:e.chart.formatter};u&&Object.keys(u).forEach((function(e){l[e]&&t.updateScaleSize(l,e,u[e])}));var f=[];if(!i||!Array.isArray(i.items)){var d={data:i,resources:c},h=t.resolveForItem(d,n.norm,-1);return{settings:n.norm,item:h}}for(var p,m=0,v=i.items.length;m<v;m++){p={datum:i.items[m],data:i,resources:c};var g=t.resolveForItem(p,n.norm,m);g.data=i.items[m],f.push(g)}return{settings:n.norm,items:f}}return{resolve:r}}function Ea(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((function(e,t){return Array.isArray(t.children)?(e.push.apply(e,ae(Ea(t.children))),e):(e.push(t),e)}),[])}function Ta(e,t){var n=t.context,r=t.data,i=t.style,o=t.filter,a=t.mode,s=e.chart.brush(n),u=r,l=i.active||{},c=i.inactive||{},f=[];Object.keys(l).forEach((function(e){f.push(e)})),Object.keys(c).forEach((function(e){-1===f.indexOf(e)&&f.push(e)}));var d=[],h=!1,p=function(){var t=Ea(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},m=function(){for(var e,t=p(),n=t.length,r=!1,i="function"==typeof u?u({brush:s}):u,o=function(n){if(!(e=t[n].data))return"continue";t[n].__style||(t[n].__style={},f.forEach((function(e){t[n].__style[e]=t[n][e]})));var o=s.containsMappedData(e,i,a),u=d.indexOf(t[n]),p=!1;if(o&&-1===u?(d.push(t[n]),p=!0):o||-1===u||(d.splice(u,1),p=!0),p||h){var m=B({},t[n],t[n].__style);f.forEach((function(e){t[n][e]=o&&e in l?"function"==typeof l[e]?l[e].call(null,m):l[e]:!o&&e in c?"function"==typeof c[e]?c[e].call(null,m):c[e]:t[n].__style[e]})),r=!0}},m=0;m<n;m++)o(m);return h=!1,r},v=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1},n=t.suppressRender,r=p(),i=r.length,o=function(e){if(!r[e].data)return"continue";r[e].__style=r[e].__style||{},f.forEach((function(t){r[e].__style[t]=r[e][t],t in c&&(r[e][t]="function"==typeof c[t]?c[t].call(null,r[e]):c[t])}))},a=0;a<i;a++)o(a);h=!0,d.length=0,n||e.renderer.render(e.nodes)},g=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1},n=t.suppressRender,r=p(),i=r.length,o=function(e){r[e].__style&&(Object.keys(r[e].__style).forEach((function(t){r[e][t]=r[e].__style[t]})),r[e].__style=void 0)},a=0;a<i;a++)o(a);d.length=0,n||e.renderer.render(e.nodes)},y=function(){m()&&e.renderer.render(e.nodes)};return s.on("start",v),s.on("end",g),s.on("update",y),{isActive:function(){return s.isActive()},update:function(){d.length=0,h=!0,m()},cleanUp:function(){s.removeListener("start",v),s.removeListener("end",g),s.removeListener("update",y)}}}function Da(e){for(var t=e.nodes,n=e.action,r=e.chart,i=e.trigger,o=[],a=0;a<t.length;a++){var s=t[a].data;null!==s&&o.push(s)}!function(e){var t=e.dataPoints,n=e.action,r=e.chart,i=e.trigger;if(i){var o=i.data||[""],a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(var u=function(e){var n=t[e];if(!n)return"continue";o.forEach((function(e){var t=n&&!e?n:n[e];if(t){var r={key:t.source.field};void 0!==t.source.key&&(r.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(r.range={min:t.value[0],max:t.value[1]},a.items.push(r)):(r.value=t.value,s.items.push(r))}}))},l=0;l<t.length;l++)u(l);i.contexts.forEach((function(e){a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)}))}}({dataPoints:o,action:n,chart:r,trigger:i})}function Oa(e){var t=e.collisions,n=e.t,r=e.config,i=e.action,o=[],a=!1;return t.length>0&&(o=t,a=!0,"stop"===n.propagation&&(o=[t[t.length-1]])),Da({nodes:o.map((function(e){return e.node})),action:i,chart:r.chart,data:r.data,trigger:n}),a}function Na(e,t,n){var r=n.element().getBoundingClientRect(),i=le(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(t.touchRadius>0&&le(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!le(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function _a(e,t,n){return e?"function"==typeof e?e(t):e:n}function Aa(e){var t=e.e,n=e.t,r=e.config;return Oa({collisions:Na(t,n,r.renderer),t:n,config:r,action:_a(n.action,t,"toggle")})}function Ia(e){var t=e.e,n=e.t,r=e.config;return Oa({collisions:Na(t,n,r.renderer),t:n,config:r,action:_a(n.action,t,"set")})}var Pa={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function La(e,t){Object.keys(Pa).forEach((function(n){var r=t[n];void 0!==r&&(e[Pa[n]]=r)}))}function Ra(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",r=0;r<e.length;r++){var i=e[r];n+=0===r?"M".concat(i.x," ").concat(i.y):"L".concat(i.x," ").concat(i.y),n+=" "}return t&&(n+="Z"),n}function ja(e,t,n,r){var i=n/2,o=e-r/2,a=t-r/2,s=e-i,u=t-i;return[{x:o,y:a},{x:o,y:u},{x:o+r,y:u},{x:o+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:o+r,y:a+r},{x:o+r,y:u+n},{x:o,y:u+n},{x:o,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function za(e){return-e/180*Math.PI}function Fa(e){return function(e){var t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),i=n*Math.sin(e);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(za(e))}function Ba(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Va(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ha(e,t){return{x:e.x*t,y:e.y*t}}function Ua(e,t){return e.x-t.x}function Wa(e,t){return e.y-t.y}function Ya(e,t){return Math.pow(Ua(e,t),2)+Math.pow(Wa(e,t),2)}function Ka(e,t){return Math.sqrt(Ya(e,t))}function $a(e,t){return e.x*t.x+e.y*t.y}function Ga(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},r=Math.cos(t),i=Math.sin(t),o=Va(e,n),a={x:r*o.x-i*o.y,y:i*o.x+r*o.y};return Ba(a,n)}var Xa={up:0,down:180,left:90,right:-90};function Ja(e){var t=e.x,n=e.y,r=e.size,i=r/2;return{type:"rect",x:t-i,y:n-i,width:r,height:r}}var Qa=kt();function Za(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((function(n){void 0!==Pa[n]&&"transform"!==n&&(e[n]=t[n])}))}Qa.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),Qa.add("diamond",(function(e){var t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:Ra([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}})),Qa.add("saltire",(function(e){var t=za(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,i=Math.min(r,n),o=e.size,a=Math.sin(Math.asin(-t))*(i/2);o+=2*(n/Math.sin(-t)-n),o-=2*a;var s={x:e.x,y:e.y};return{type:"path",fill:"black",d:Ra(ja(e.x,e.y,o,i).map((function(e){return Ga(e,t,s)})))}})),Qa.add("square",(function(e){var t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),Qa.add("triangle",(function(e){var t=e.size,n={x:e.x,y:e.y},r=Xa[e.direction]||0,i=t/2,o=e.x-i,a=e.y-i,s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}],u=za(r);return{type:"path",fill:"black",d:Ra(s=s.map((function(e){return Ga(e,u,n)})))}})),Qa.add("line",(function(e){var t="vertical"===e.direction,n=e.size/2,r=e.x,i=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:i-(t?n:0),x2:r+(t?0:n),y2:i+(t?n:0),collider:Ja(e)}})),Qa.add("star",(function(e){for(var t=e.size,n=[],r=t/2,i=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/i,u=1;u<=i;u++){var l=s*u+a,c=za(l),f=za(l+s/2),d=Math.sin(c),h=Math.cos(c),p=Math.sin(f),m=Math.cos(f);n.push({x:e.x+h*r,y:e.y+d*r}),n.push({x:e.x+m*o,y:e.y+p*o})}return{type:"path",fill:"black",d:Ra(n)}})),Qa.add("n-polygon",(function(e){for(var t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),i=360/r,o=isNaN(e.startAngle)?0:e.startAngle,a=1;a<=r;a++){var s=za(i*a+o),u=Math.sin(s),l=Math.cos(s);t.push({x:e.x+l*n,y:e.y+u*n})}return{type:"path",fill:"black",d:Ra(t)}})),Qa.add("cross",(function(e){var t=e.x,n=e.y,r=e.size/2,i=isNaN(e.width)?r/2:e.width,o=Math.min(i,r);return{type:"path",fill:"black",d:Ra(ja(t,n,e.size,o))}})),Qa.add("bar",(function(e){var t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,i=r/2/2,o=[{x:t.x-r,y:t.y+i},{x:t.x-r,y:t.y-i},{x:t.x+r,y:t.y-i},{x:t.x+r,y:t.y+i}];if(n){var a=za(90);o=o.map((function(e){return Ga(e,a,t)}))}var s=me(o);return s.type="rect",s.fill="black",s}));var es=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qa;return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.get(t.type);if(n){var r=n(t);return Za(r,t),void 0!==t.data&&(r.data=t.data),r}return n}};function ts(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.dock,r=void 0===n?"center":n,i=e.displayOrder,o=void 0===i?0:i,a=e.prioOrder,s=void 0===a?0:a,u=e.preferredSize,l=void 0===u?0:u,c=e.minimumLayoutMode,f=e.show,d=void 0===f||f;r=r||"center";var h={computePreferredSize:function(e){var n=e.inner,r=e.outer,i=e.children;return"function"==typeof l?l({inner:n,outer:r,children:i,dock:this.dock()},t):l},dock:function(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},displayOrder:function(e){return void 0!==e?(o=e,this):"function"==typeof o?o(t):o},prioOrder:function(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s},minimumLayoutMode:function(e){return void 0!==e?(c=e,this):"function"==typeof c?c(t):c},show:function(e){return void 0!==e?(d=e,this):"function"==typeof d?d(t):d}};return h}function ns(e,t,n){var r=t.require,i=void 0===r?[]:r,o=t.mediator||{},a=n.settings,s=n.formatter,u=n.scale,l=n.data,c=n.renderer,f=n.chart,d=n.dockConfig,h=n.mediator,p=n.instance,m=n.rect,v=n.style,g=n.registries,y=n.resolver,b=n.update,x=n._DO_NOT_USE_getInfo,w=n.symbol,M=n.isVisible;e.emit=function(){},M&&(e.isVisible=M),Object.defineProperty(e,"settings",{get:a}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:s}),Object.defineProperty(e,"scale",{get:u}),Object.defineProperty(e,"mediator",{get:h}),Object.defineProperty(e,"style",{get:v}),Object.defineProperty(e,"registries",{get:g}),m&&Object.defineProperty(e,"rect",{get:m}),x&&(e._DO_NOT_USE_getInfo=x),Object.keys(t).forEach((function(n){var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((function(e){return e===r}))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),i.forEach((function(t){"renderer"===t?Object.defineProperty(e,"renderer",{get:c}):"chart"===t?Object.defineProperty(e,"chart",{get:f}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:d}):"instance"===t?Object.defineProperty(e,"instance",{get:p}):"update"===t&&b?Object.defineProperty(e,"update",{get:b}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:w})})),Object.keys(o).forEach((function(t){e.mediator.on(t,o[t].bind(e))}))}function rs(e,t,n){var r=function(t){return e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0},i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:e.layout.prioOrder,e.layout.dock=i.dock||e.layout.dock,e.layout.minimumLayoutMode=i.minimumLayoutMode||e.layout.minimumLayoutMode,i.show=e.show,i.preferredSize=t,i}function is(e,t,n){Object.keys(n.on||{}).forEach((function(r){e.eventListeners=e.eventListeners||[];var i=n.on[r].bind(e);e.eventListeners.push({event:r,listener:i}),t.on(r,i)})),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.emit.apply(t,[e].concat(r))}}function os(e,t){e.eventListeners&&(e.eventListeners.forEach((function(e){var n=e.event,r=e.listener;t.removeListener(n,r)})),e.eventListeners.length=0),e.emit=function(){}}function as(e,t,n){return Ba(function(e,t){var n=$a(e,t)/$a(t,t)||1;return{x:t.x*n,y:t.y*n}}(Va(n,e),Va(t,e)),e)}function ss(e,t,n){return Ka(e,n)+Ka(t,n)-Ka(e,t)<1e-12}function us(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function ls(e){return e.x1===e.x2&&e.y1===e.y2}function cs(e){return e.width<=0||e.height<=0}function fs(e){return e.r<=0}function ds(e){return e.edges.length<=2}function hs(e,t){for(var n=0,r=t.edges.length;n<r;n++)if(!0===xs(e,ve(t.edges[n])))return!0;return!1}function ps(e,t){for(var n=t.numPolygons,r=t.polygons,i=0;i<n;i++){if(!0===Ds(e,r[i]))return!0}return!1}function ms(e,t){return!fs(e)&&Ya({x:e.cx,y:e.cy},t)<=Math.pow(e.r,2)}function vs(e,t){if(cs(t)||fs(e))return!1;var n=t.width/2,r=t.height/2,i=t.x+n,o=t.y+r,a=e.r,s=e.cx,u=e.cy,l=Math.abs(s-i),c=Math.abs(u-o);return!(l>n+a||c>r+a)&&(l<=n||c<=r||Math.pow(l-n,2)+Math.pow(c-r,2)<=Math.pow(a,2))}function gs(e,t){if(fs(e)||ls(t))return!1;var n=oe(he(t),2),r=n[0],i=n[1];if(ms(e,r)||ms(e,i))return!0;var o={x:e.cx,y:e.cy},a=as(r,i,o);return Ya(a,o)<=Math.pow(e.r,2)&&ss(r,i,a)}function ys(e,t){if(ds(t)||fs(e))return!1;if(bs(t,{x:e.cx,y:e.cy}))return!0;for(var n=t.edges.length,r=0;r<n;r++){if(gs(e,ve(t.edges[r])))return!0}return!1}function bs(e,t){if(ds(e)||!Ss(e.boundingRect(),t))return!1;var n,r,i,o,a,s=t.x,u=t.y,l=e.vertices;for(n=!1,o=-1,i=(r=l.length)-1;++o<r;i=o){if(l[o].x===s&&l[o].y===u)return!0;if(l[o].y===l[i].y&&l[o].y===u&&(s-l[o].x)*(s-l[i].x)<=0)return!0;if(l[o].y<u&&u<=l[i].y||l[i].y<u&&u<=l[o].y){if(s===(a=(l[i].x-l[o].x)*(u-l[o].y)/(l[i].y-l[o].y)+l[o].x))return!0;s<a&&(n=!n)}}return n}function xs(e,t){if(ds(e))return!1;for(var n=0,r=e.edges.length;n<r;n++){if(qs(t,ve(e.edges[n])))return!0}var i=oe(he(t),2),o=i[0],a=i[1];return bs(e,o)||bs(e,a)}function ws(e,t){if(ds(e))return!1;for(var n=0,r=e.edges.length;n<r;n++){if(Cs(t,ve(e.edges[n])))return!0}var i=oe(pe(t),4),o=i[0],a=i[1],s=i[2],u=i[3];return bs(e,o)||bs(e,a)||bs(e,s)||bs(e,u)}function Ms(e,t){return!cs(e)&&!cs(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function ks(e,t){return!cs(e)&&!cs(t)&&[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every((function(t){return Ss(e,t)}))}function Ss(e,t){return!cs(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function Cs(e,t){if(ls(t)||cs(e))return!1;var n=oe(he(t),2),r=n[0],i=n[1];if(Ss(e,r)||Ss(e,i))return!0;for(var o=pe(e),a=o.length,s=0;s<a;s++){if(qs(ve([o[s],o[3!==s?s+1:0]]),t))return!0}return!1}function qs(e,t){var n,r,i=oe(he(e),2),o=i[0],a=i[1],s=oe(he(t),2),u=s[0],l=s[1],c=Ua(a,o),f=Wa(a,o),d=Ua(l,u),h=Wa(l,u),p=Ua(o,u),m=Wa(o,u),v=h*c-d*f,g=d*m-h*p,y=c*m-f*p;if(0===c&&0===f)return!1;if(0===d&&0===h)return!1;if(0===v){if(0===g&&0===y){if(0===c){if(0===f)return o.x===a.x&&o.y===a.y;n=Wa(u,o)/f,r=Wa(l,o)/f}else n=(u.x-o.x)/c,r=(l.x-o.x)/c;return!(n<0&&r<0||n>1&&r>1)}return!1}var b=g/v;return v=y/v,b>=0&&b<=1&&v>=0&&v<=1}function Es(e,t){if(ls(e))return!1;var n=oe(he(e),2);return ss(n[0],n[1],t)}function Ts(e,t){var n=e.boundingRect(),r=t.boundingRect();return!!Ms(n,r)&&(ks(n,r)?hs(e,t):hs(t,e))}function Ds(e,t){var n=e.boundingRect(),r=t.boundingRect();return!!Ms(n,r)&&(ks(r,n)?function(e,t){for(var n=e.numPolygons,r=e.polygons,i=0;i<n;i++)if(!0===Ts(t,r[i]))return!0;return!1}(e,t):function(e,t){for(var n=0,r=t.edges.length;n<r;n++)if(!0===_s(e,ve(t.edges[n])))return!0;return!1}(e,t))}function Os(e,t){if(fs(e))return!1;if(Ns(t,{x:e.cx,y:e.cy}))return!0;for(var n=t.numPolygons,r=t.polygons,i=0;i<n;i++)for(var o=r[i],a=o.edges.length,s=0;s<a;s++){if(gs(e,ve(o.edges[s])))return!0}return!1}function Ns(e,t){if(!Ss(e.boundingRect(),t))return!1;var n,r,i,o,a,s,u=t.x,l=t.y,c=e.numPolygons,f=!1;for(r=0;r<c;r++)for(a=-1,o=(i=(n=e.vertices[r]).length)-1;++a<i;o=a){if(n[a].x===u&&n[a].y===l)return!0;if(n[a].y===n[o].y&&n[a].y===l&&(u-n[a].x)*(u-n[o].x)<=0)return!0;if(n[a].y<l&&l<=n[o].y||n[o].y<l&&l<=n[a].y){if(u===(s=(n[o].x-n[a].x)*(l-n[a].y)/(n[o].y-n[a].y)+n[a].x))return!0;u<s&&(f=!f)}}return f}function _s(e,t){var n=oe(he(t),2),r=n[0],i=n[1];if(Ns(e,r)||Ns(e,i))return!0;for(var o=e.numPolygons,a=e.polygons,s=0;s<o;s++)for(var u=a[s],l=0,c=u.edges.length;l<c;l++){if(qs(t,ve(u.edges[l])))return!0}return!1}function As(e,t){var n=oe(pe(t),4),r=n[0],i=n[1],o=n[2],a=n[3];if(Ns(e,r)||Ns(e,i)||Ns(e,o)||Ns(e,a))return!0;for(var s=e.numPolygons,u=e.polygons,l=0;l<s;l++)for(var c=u[l],f=0,d=c.edges.length;f<d;f++){if(Cs(t,ve(c.edges[f])))return!0}return!1}var Is=/^\$/,Ps="@extend";function Ls(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function Rs(e,t,n){if("string"==typeof e){var r=t[e];return-1!==n.indexOf(e)&&Ls(e),Is.test(r)?(n.push(e),Rs(r,t,n)):r}var i=e,o=B(!0,{},t,e),a={};if(e[Ps]){var s=e[Ps];-1!==n.indexOf(s)&&Ls(s);var u=n.slice();u.push(s),i=B(!0,{},Rs(o[s],t,u),e)}return Object.keys(i).forEach((function(e){var t=n.slice();if(e!==Ps&&!Is.test(e)){a[e]=i[e];var r=a[e];Is.test(r)&&r in o?(-1!==n.indexOf(r)&&Ls(r),t.push(r),"object"===H(r=o[r])||Is.test(r)&&r in o?a[e]=Rs(r,o,t):a[e]=r):"object"===H(r)&&(a[e]=Rs(r,o,t))}})),a}function js(e,t){return Rs(e,t,[])}function zs(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function Fs(e,t){var n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),zs(r),zs(n),{logicalContainerRect:r,containerRect:n}}function Bs(e){var t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return B(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function Vs(e,t,n,r,i){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(i)?0:i}}function Hs(e,t,n){if(void 0===e.cachedSize){var r,i=e.config.dock(),o=e.comp.preferredSize({inner:t,outer:n,dock:i});isNaN(o)?o&&!isNaN(o.size)&&(o.width=o.size,o.height=o.size):o={width:o,height:o},r="top"===i||"bottom"===i?o.height:"right"===i||"left"===i?o.width:Math.max(o.width,o.height),e.cachedSize=Math.ceil(r),e.edgeBleed=o.edgeBleed||0}return e.cachedSize}function Us(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function Ws(e,t){var n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function Ys(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);var r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);var i=e.height-(t.y+t.height);i<n.bottom&&(t.height-=n.bottom-i)}function Ks(e,t,n,r,i){var o=B({},t),a=B({},n);return Us(o,r),Ws(a,r),Ys(e,o,a),!!function(e,t,n){var r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=i}(e,o,i)&&(Us(t,r),Ws(n,r),!0)}function $s(e){var t=e.layoutRect,n=e.visible,r=e.hidden,i=e.settings,o=Vs(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort((function(e,t){return e.config.prioOrder()-t.config.prioOrder()}));for(var u=0;u<s.length;++u){var l=s[u];Hs(l,o,t),Ks(t,o,a,l,i)||(r.push(s.splice(u,1)[0]),--u)}!function(e,t){if(0!==t.length)for(var n=0;n<e.length;++n){var r=e[n];r.referencedDocks.length&&r.referencedDocks.every((function(e){return t.some((function(t){return t.key===e}))}))&&t.push(e.splice(n,1)[0])}}(n,r);var c=n.filter((function(e){return-1!==s.indexOf(e)}));return n.length=0,n.push.apply(n,ae(c)),Ys(t,o,a),o}function Gs(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function Xs(e){var t;return me((t=[]).concat.apply(t,ae(e.map(pe))))}function Js(e){var t=e.visible,n=e.layoutRect,r=e.reducedRect,i=e.containerRect,o=e.translation,a=Vs(r.x,r.y,r.width,r.height),s=Vs(r.x,r.y,r.width,r.height),u={},l=t.slice(),c=l.slice().sort((function(e,t){return e.config.displayOrder()-t.config.displayOrder()}));return t.sort((function(e,t){if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;var n=e.config.displayOrder()-t.config.displayOrder();return 0===n?l.indexOf(e)-l.indexOf(t):n})).forEach((function(e){var t={},l={};switch(e.config.dock()){case"top":t.height=l.height=e.cachedSize,t.width=n.width,l.width=a.width,t.x=n.x,l.x=a.x,t.y=l.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,l.x=a.x,t.y=l.y=a.y+a.height,t.width=n.width,l.width=a.width,t.height=l.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=l.x=s.x-e.cachedSize,t.y=n.y,l.y=s.y,t.width=l.width=e.cachedSize,t.height=n.height,l.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=l.x=s.x+s.width,t.y=n.y,l.y=s.y,t.width=l.width=e.cachedSize,t.height=n.height,l.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=l.x=r.x,t.y=l.y=r.y,t.width=l.width=r.width,t.height=l.height=r.height;break;default:if(e.referencedDocks.length>0){var c=e.referencedDocks.map((function(e){return u[e]})).filter((function(e){return!!e}));c.length>0&&(t=Xs(c.map((function(e){return e.outerRect}))),l=Xs(c.map((function(e){return e.r}))))}}e.key&&(u[e.key]={r:l,outerRect:t}),function(e,t,n,r){var i={x:r.width/n.width,y:r.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){var a=i.x<i.y,s=Math.min(i.x,i.y);i.x=s,i.y=s;var u=a?"height":"width",l=(r[u]-n[u]*i.x)*n.align;o.left=a?0:l,o.top=a?l:0}e.scaleRatio=i,e.margin=o,t.scaleRatio=i,t.margin=o,n.scaleRatio=i,n.margin=o}(l,t,n,i),l.edgeBleed=e.edgeBleed,l.computed=Gs(l),t.edgeBleed=e.edgeBleed,t.computed=Gs(t),l.x+=o.x,l.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(l,t),e.cachedSize=void 0,e.edgeBleed=void 0})),c}function Qs(e,t,n){var r=e.layoutModes||{},i=t.minimumLayoutMode(),o=t.show();return o&&"object"===H(i)?o=r[i.width]&&r[i.height]&&n.width>=r[i.width].width&&n.height>=r[i.height].height:o&&void 0!==i&&(o=r[i]&&n.width>=r[i].width&&n.height>=r[i].height),o}function Zs(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function eu(e,t,n){for(var r=[],i=[],o=0;o<e.length;++o){var a=e[o];Zs(a);var s=a.dockConfig,u=a.key,l=s.dock(),c=/@/.test(l)?l.split(",").map((function(e){return e.replace(/^\s*@/,"")})):[];Qs(t,s,n)?r.push({comp:a,key:u,config:s,referencedDocks:c}):i.push({comp:a,key:u,config:s,referencedDocks:c})}return[r,i]}var tu=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},nu=function e(t){return null==t?void 0:t.map((function(t){var n=t.instance.dockConfig();return{preferredSize:function(r){return n.computePreferredSize(G(G({},r),{},{children:e(t.children)}))}}}))},ru=function(e,t){return{visible:[],hidden:t,ordered:[]}},iu=function(e){return function(t,n){var r,i=n.map((function(e,t){var n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:function(t){return n.computePreferredSize(G(G({},t),{},{children:nu(e.children)}))}}})),o=function(e){return n[e.index]},a=null!==(r=e(t,i))&&void 0!==r?r:{},s=a.visible,u=void 0===s?i:s,l=a.hidden,c=void 0===l?[]:l,f=a.ordered,d=void 0===f?u:f;return{visible:u.map(o),hidden:c.map(o),ordered:d.map(o)}}},ou=function(e){var t,n=(t=Bs(e),{layout:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};var r=Fs(e,t),i=r.logicalContainerRect,o=r.containerRect,a=oe(eu(n,t,i),2),s=a[0],u=a[1],l=Js({visible:s,layoutRect:i,reducedRect:$s({layoutRect:i,visible:s,hidden:u,settings:t}),containerRect:o,translation:{x:e.x,y:e.y}});return u.forEach((function(e){e.comp.visible=!1;var t=Vs();e.comp.resize(t,t)})),{visible:s.map((function(e){return e.comp})),hidden:u.map((function(e){return e.comp})),ordered:l.map((function(e){return e.comp}))}},settings:function(e){t=Bs(e)}});return iu((function(e,t){return n.layout(e,t)}))},au=function(e){return"function"==typeof e?iu(e):ou(e)};function su(e){var t=e.createComponent,n={},r=[],i=[],o=function e(n){var i=t(n);return i&&(r.push(i),n.components&&(i.children=n.components.map((function(t){return e(t)})).filter((function(e){return!!e})))),i},a=function e(t,n){for(var i=function(i){var o=t[i],a=n.find((function(e){return o.hasKey&&o.key===e.key}));a?o.children&&a.components&&e(o.children,a.components):(t.splice(i,1),function(e){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}(o),o.children&&e(o.children,[]),o.instance.destroy())},o=t.length-1;o>=0;o--)i(o)},s=function e(t){var n=t.compList,r=t.data,i=t.excludeFromUpdate,a=t.formatters,s=t.scales;return t.settingsList.map((function(t){var u=tu(n,t.key);return i.indexOf(t.key)>-1?u:u?t.rendererSettings&&"function"==typeof t.rendererSettings.transform&&t.rendererSettings.transform()?(u.applyTransform=!0,u):(u.updateWith={formatters:a,scales:s,data:r,settings:t},t.components&&(u.children=e({compList:u.children||[],data:r,excludeFromUpdate:i,formatters:a,scales:s,settingsList:t.components})),u):o(t)})).filter((function(e){return!!e}))},u=function e(t){var n=t.components,r=t.hidden,i=t.layoutFn,o=t.ordered,a=t.rect,s=t.visible,u=i(a,n),l=u.visible,c=u.hidden,f=u.ordered;s.push.apply(s,ae(l)),r.push.apply(r,ae(c)),o.push.apply(o,ae(f)),l.forEach((function(t){if(t.children){var n,i,a=au(null!==(n=null===(i=t.settings)||void 0===i?void 0:i.strategy)&&void 0!==n?n:{});e({components:t.children,hidden:r,layoutFn:a,ordered:o,rect:t.instance.getRect(),visible:s})}})),c.forEach((function(t){t.children&&e({components:t.children,hidden:r,layoutFn:ru,ordered:o,rect:null,visible:s})}))};return n.destroy=function(){r.forEach((function(e){return e.instance.destroy()})),r=[],i=[]},n.findComponentByKey=function(e){return tu(r,e)},n.forEach=function(e){r.forEach(e)},n.layout=function(e){var t=e.layoutSettings,n=e.rect,r=[],o=[],a=[],s=au(t);return u({components:i,hidden:o,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:o,ordered:a}},n.set=function(e){var t=e.components;i=t.map((function(e){return o(e)})).filter((function(e){return!!e}))},n.update=function(e){var t=e.components,n=e.data,r=e.excludeFromUpdate,o=e.formatters,u=e.scales;a(i,t),i=s({compList:i,data:n,excludeFromUpdate:r,formatters:o,scales:u,settingsList:t})},n}function uu(e,t,n){var r=t.left-n.left,i=t.top-n.top,o=ge(e),a=B(!0,{},e);switch(o){case"circle":a.cx+=r,a.cy+=i;break;case"polygon":for(var s=0,u=a.vertices.length;s<u;s++){var l=a.vertices[s];l.x+=r,l.y+=i}break;case"geopolygon":for(var c=0;c<a.vertices.length;c++)for(var f=a.vertices[c],d=0,h=f.length;d<h;d++){var p=f[d];p.x+=r,p.y+=i}break;case"line":a.x1+=r,a.y1+=i,a.x2+=r,a.y2+=i;break;case"point":case"rect":a.x+=r,a.y+=i}return a}function lu(e,t){var n=[],r=0;t.forEach((function(e){n.push(r),r++;var t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)})),t.forEach((function(t,r){return function(e,t,n){var r=t.instance.renderer().element();if(!isNaN(n)&&r&&e&&e.children){var i=e.children[Math.max(0,n)];if(r!==i){var o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==i?(e.insertBefore(r,i),o&&o.forEach((function(t){e.insertBefore(t,r)}))):(o&&o.forEach((function(t){e.appendChild(t,r)})),e.appendChild(r))}}}(e,t,n[r])}))}function cu(e,t){var n=e.element,r=e.data,i=void 0===r?[]:r,o=e.settings,a=void 0===o?{}:o,s=e.on,u=void 0===s?{}:s,l=t.registries,c=t.logger,f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e,r=function(e){e.forEach((function(e){var n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((function(e){return e?e.length:0}))}}))},i=function(e,n){var r=t[e];if(!r)return[];for(var i=r.sizes,o=0;o<i.length;o++)if(n<=i[o])return r.colors[o];return r.colors[i.length-1]},o={palette:function(e,t){return i(e,t)},setPalettes:r,style:function(e){return js(e,n)},setStyle:function(t){n=B({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),o}(t.style,t.palettes),d=[],h=B({},e),p=function(){var e={};return Wo(e),e}(),m=[],v=null,g=null,y=null,b=[],x=function(){},w=function(){},M={},k=!1,S=su({createComponent:function(e){return l.component.has(e.type)?{instance:function(e){var t,n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=e.defaultSettings,u=void 0===s?{}:s,l=e._DO_NOT_USE_getInfo,c=void 0===l?function(){return{}}:l,f=a.chart,d=a.container,h=a.mediator,p=a.registries,m=a.theme,v=a.renderer,g=Wo({}),y=a.settings||{},b=B(!0,{},u,y),x=[],w=qa({chart:f}),M=!1,k={nodes:[],chart:f,config:b.brush||{},renderer:null},S={tap:[],over:[]},C=[],q={},E=B({},y);function T(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var i,o,a,s=void 0!==e[t],u=void 0!==y[t],l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];return s&&("function"==typeof e[t]?i=(o=e[t]).call.apply(o,[q].concat(c)):r&&(i=e[t])),u&&("function"==typeof y[t]?i=(a=y[t]).call.apply(a,[E].concat(c)):r&&(i=y[t])),s||u||(i=n.call.apply(n,[q].concat(c))),i}}var D=T("preferredSize",(function(){return 0}),!0),O=T("resize",(function(e){return e.inner})),N=T("created"),_=T("beforeMount"),A=T("mounted"),I=T("beforeUnmount"),P=T("beforeUpdate"),L=T("updated"),R=T("beforeRender"),j=T("beforeDestroy"),z=T("destroyed"),F=e.render,V=function(){b.brush&&(b.brush.consume||[]).forEach((function(e){e.context&&e.style&&C.push(Ta(k,e))}))},U=function(){b.brush&&(b.brush.trigger||[]).forEach((function(e){"over"===e.on?S.over.push(e):S.tap.push(e)}))};Object.defineProperty(k,"data",{get:function(){return x}});var W=b.renderer||e.renderer,Y=W?v||p.renderer(W)():v||p.renderer()();"function"==typeof Y.settings&&Y.settings(b.rendererSettings),k.renderer=Y;var K={resources:f.logger?{logger:f.logger()}:{}},$=ts(rs(b,D,f.logger()),K),G=function(e){e.key=b.key,e.element=Y.element()},X=function(){};X.dockConfig=function(){return $},X.set=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.settings&&(y=e.settings,b=B(!0,{},u,e.settings),$=ts(rs(b,D,f.logger()),K)),b.scale&&(t=f.scale(b.scale)),x=b.data?Or(b.data,{dataset:f.dataset,collection:f.dataCollection},{logger:f.logger()},f.dataCollection):t?t.data():[],"string"==typeof b.formatter||"object"===H(b.formatter)?n=f.formatter(b.formatter):t&&t.data().fields&&(n=t.data().fields[0].formatter()),o=m.style(b.style||{})},X.resize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=O({inner:e,outer:t});i=n?Y.size(n):Y.size(e),E.rect=B(!0,{computedPhysical:i.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),i=B(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},i)},X.getRect=function(){return E.rect};var J,Q,Z=function(){var e=Y.renderArgs?Y.renderArgs.slice(0):[];return e.push({data:x}),e};X.beforeMount=_,X.beforeRender=function(){R({size:i})},X.render=function(){var e=k.nodes=F.call.apply(F,[q].concat(ae(Z())));Y.render(e),J=e},X.hide=function(){X.unmount(),Y.size({x:0,y:0,width:0,height:0}),Y.clear()},X.beforeUpdate=function(){P({settings:b,data:x})},X.update=function(){if(Q&&Q.stop(),b.rendererSettings&&"function"==typeof b.rendererSettings.transform&&b.rendererSettings.transform())Y.render();else{var e=k.nodes=F.call.apply(F,[q].concat(ae(Z())));C.forEach((function(e){return e.cleanUp()})),C.length=0,S.tap=[],S.over=[],b.brush&&(V(),U()),C.forEach((function(e){e.isActive()&&e.update()})),J&&b.animations&&b.animations.enabled?(Q=ba({old:J,current:e},{renderer:Y},b.animations)).start():Y.render(e),J=e,Y.setKey&&"string"==typeof y.key&&Y.setKey(y.key)}},X.updated=L,X.destroy=function(){X.unmount(),j(r),Y.destroy(),z(),r=null};var ee=function(e){k.nodes=e,C.forEach((function(e){e.isActive()&&e.update()})),Y.render(e)};return ns(q,e,{settings:function(){return b},data:function(){return x},scale:function(){return t},formatter:function(){return n},renderer:function(){return Y},chart:function(){return f},dockConfig:function(){return $},mediator:function(){return h},instance:function(){return E},rect:function(){return E.rect},style:function(){return o},update:function(){return ee},registries:function(){return p},resolver:function(){return w},symbol:function(){return es(p.symbol)}}),ns(E,y,{settings:function(){return b},data:function(){return x},scale:function(){return t},formatter:function(){return n},renderer:function(){return Y},chart:function(){return f},dockConfig:function(){return $},mediator:function(){return h},style:function(){return o},_DO_NOT_USE_getInfo:c.bind(q),isVisible:function(){return M}}),X.getBrushedShapes=function(e,t,n){var r=[];if(b.brush&&b.brush.consume){var i=f.brush(e),o=Y.findShapes("*");b.brush.consume.filter((function(t){return t.context===e})).forEach((function(e){for(var a=0;a<o.length;a++){var s=o[a];s.data&&i.containsMappedData(s.data,n||e.data,t)&&(G(s),r.push(s),o.splice(a,1),a--)}}))}return r},X.findShapes=function(e){for(var t=Y.findShapes(e),n=0,r=t.length;n<r;n++)G(t[n]);return t},X.shapesAt=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Y.itemsAt(e);t=n&&"stop"===n.propagation&&r.length>0?[r.pop().node]:r.map((function(e){return e.node}));for(var i=0,o=t.length;i<o;i++)G(t[i]);return t},X.brushFromShapes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[],Da({nodes:e,action:t.action||"toggle",trigger:t,chart:f,data:k.data})},X.mount=function(){r=Y.element&&Y.element()?r:Y.appendTo(d),Y.setKey&&"string"==typeof y.key&&Y.setKey(y.key),b.brush&&(V(),U()),is(E,g,y),is(q,g,e),M=!0},X.mounted=function(){return A(r)},X.unmount=function(){[E,q].forEach((function(e){os(e,g)})),S.tap=[],S.over=[],C.forEach((function(e){e.cleanUp()})),C.length=0,I(),M=!1},X.onBrushTap=function(e){S.tap.forEach((function(t){Aa({e:e,t:t,config:k})&&"stop"===t.globalPropagation&&f.toggleBrushing(!0)}))},X.onBrushOver=function(e){S.over.forEach((function(t){Ia({e:e,t:t,config:k})&&"stop"===t.globalPropagation&&f.toggleBrushing(!0)}))},X.def=q,X.ctx=E,X.renderer=function(){return Y},X.set({settings:y}),N(),X}(l.component(e.type),{settings:e,chart:h,mediator:p,registries:l,theme:f,container:n}),settings:B(!0,{},e),key:e.key,hasKey:void 0!==e.key}:(c.warn("Unknown component: ".concat(e.type)),!1)}});function C(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return function(){for(var r,i,o="function"==typeof e[t],a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];o?r=(i=e[t]).call.apply(i,[h].concat(s)):r=n.call.apply(n,[h].concat(s));return r}}var q=function(){var e;a.dockLayout?(c.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=a.dockLayout):e=a.strategy;var t=function(e){if("function"==typeof e.getBoundingClientRect){var t=e.getBoundingClientRect();return{x:0,y:0,width:t.width,height:t.height}}return{x:0,y:0,width:0,height:0}}(n);return S.layout({layoutSettings:e,rect:t})},E=C("created"),T=C("beforeMount"),D=C("mounted"),O=C("beforeUpdate"),N=C("updated"),_=C("beforeRender"),A=C("beforeDestroy"),I=C("destroyed"),P=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.partialData,i=t.formatters,o=void 0===i?{}:i,a=t.scales,s=void 0===a?{}:a,u=t.scroll,d=void 0===u?{}:u;x=be(e,{logger:c,types:l.data}),r||Object.keys(M).forEach((function(e){return M[e].clear()})),t.palettes&&f.setPalettes(t.palettes),t.style&&f.setStyle(t.style),w=Nr(t.collections,{dataset:x},{logger:c});var h={theme:f,logger:c};v=Bo(s,{dataset:x,collection:w},G(G({},h),{},{scale:l.scale})),g=Ar(o,{dataset:x,collection:w},G(G({},h),{},{formatter:l.formatter})),y=$o(d,y)};function L(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={},r=e.filter((function(e){return!!e.key})).map((function(e){return e.key}));b.forEach((function(e){e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()})),b=e.map((function(e){var r=e.key&&t[e.key]?t[e.key]:l.interaction(e.type)(h,p,n);return r.set(e),r}))}var R=function(e){var t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,i="clientY"in e?e.clientY:e.y,o={x:r-t.left,y:i-t.top},a=[];return m.forEach((function(e){var t=e.instance.getRect();Ss(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},o)&&a.push(e)})),a},j=function(){if(!d.length&&n){Object.keys(u).forEach((function(e){var t=u[e].bind(h);n.addEventListener(e,t),d.push({key:e,listener:t})}));var e={},t=function(t){t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=R(e)},r=function(t){var n=e.comps||R(t);if(!n.every((function(e){return e.instance.def.disableTriggers}))&&("touchend"===t.type&&t.preventDefault(),function(e,t){var n=le(e),r=n?e.changedTouches[0]:e,i=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&a<=12&&i<=300}(t,e)))for(var r=n.length-1;r>=0;r--){if(n[r].instance.onBrushTap(t),k){k=!1;break}}},i=[];i.push({key:"mousedown",listener:t}),i.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(i.push({key:"touchstart",listener:t}),i.push({key:"touchend",listener:r})),i.push({key:"mousemove",listener:function(e){for(var t=R(e),n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),k){k=!1;break}}}}),i.forEach((function(e){n.addEventListener(e.key,e.listener),d.push(e)}))}},z=function(){d.forEach((function(e){var t=e.key,r=e.listener;return n.removeEventListener(t,r)})),d.length=0};return h.layoutComponents=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.excludeFromUpdate,n=void 0===t?[]:t;e.data&&(i=e.data),e.settings&&(a=e.settings,L(e.settings.interactions)),O(),P(i,a);var r=a,o=r.formatters,s=r.scales,u=r.components,l=void 0===u?[]:u;S.update({components:l,data:i,excludeFromUpdate:n,formatters:o,scales:s}),S.forEach((function(e){e.updateWith&&e.instance.set(e.updateWith)})),S.forEach((function(e){e.updateWith&&e.instance.beforeUpdate()})),q()},h.update=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.partialData,o=t.excludeFromUpdate,s=void 0===o?[]:o;t.data&&(i=t.data),t.settings&&(a=t.settings,L(t.settings.interactions)),O(),P(i,a,{partialData:r});var u=a,l=u.formatters,c=u.scales,f=u.components,d=void 0===f?[]:f;S.update({components:d,data:i,excludeFromUpdate:s,formatters:l,scales:c}),S.forEach((function(e){e.updateWith&&e.instance.set(e.updateWith)})),S.forEach((function(e){e.updateWith&&e.instance.beforeUpdate()}));var h,p=[],v=[];if(r)S.forEach((function(e){(e.updateWith||e.applyTransform)&&e.visible&&p.push(e)})),h=p;else{var g=q(),y=g.visible,b=g.hidden,x=g.ordered;m=y,h=y,e=x,y.forEach((function(e){e.updateWith&&e.visible?p.push(e):v.push(e)})),b.forEach((function(e){e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}v.forEach((function(e){return e.instance.beforeMount()})),v.forEach((function(e){return e.instance.mount()})),h.forEach((function(e){return e.instance.beforeRender()})),h.forEach((function(e){(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),r||lu(n,e),v.forEach((function(e){return e.instance.mounted()})),p.forEach((function(e){return e.instance.updated()})),m.forEach((function(e){delete e.updateWith,e.visible=!0,e.applyTransform=!1})),N()},h.destroy=function(){A(),S.destroy(),z(),L(),delete h.update,delete h.destroy,I()},h.getAffectedShapes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return m.filter((function(e){return null==r||e.key===r})).forEach((function(r){i.push.apply(i,ae(r.instance.getBrushedShapes(e,t,n)))})),i},h.findShapes=function(e){var t=[];return m.forEach((function(n){t.push.apply(t,ae(n.instance.findShapes(e)))})),t},h.componentsFromPoint=function(e){return R(e).map((function(e){return e.instance.ctx}))},h.shapesAt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],i=n.getBoundingClientRect(),o=m;if(Array.isArray(t.components)&&t.components.length>0){var a=t.components.map((function(e){return e.key}));o=m.filter((function(e){return-1!==a.indexOf(e.key)})).map((function(e){return{instance:e.instance,opts:t.components[a.indexOf(e.key)]}}))}for(var s=o.length-1;s>=0;s--){var u=o[s],l=u.instance.renderer().element().getBoundingClientRect(),c=uu(e,i,l),f=u.instance.shapesAt(c,u.opts),d=f.length>0&&"stop"===t.propagation;if(r.push.apply(r,ae(f)),r.length>0&&d)return r}return r},h.brushFromShapes=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]},n=function(n){var r=t.components[n].key;m.filter((function(e){return r===e.key})).forEach((function(r){var i=e.filter((function(e){return e.key===r.key}));r.instance.brushFromShapes(i,t.components[n])}))},r=0;r<t.components.length;r++)n(r)},h.scroll=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return Go(e,y)},h.dataset=function(e){return x(e)},h.dataCollection=function(e){return w(e)},h.scales=function(){return v.all()},h.formatters=function(){return g.all()},h.brush=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return M[e]||(M[e]=pa()),M[e]},h.scale=function(e){return v.get(e)},h.formatter=function(e){return g.get(e)},h.toggleBrushing=function(e){k=void 0!==e?e:!k},h.component=function(e){var t=S.findComponentByKey(e);return null==t?void 0:t.instance.ctx},h.logger=function(){return c},h.theme=function(){return f},Object.defineProperty(h,"interactions",{get:function(){return{instances:b,on:function(){j(),b.forEach((function(e){return e.on()}))},off:function(){z(),b.forEach((function(e){return e.off()}))}}}}),E(),n&&(T(),n.innerHTML="",function(){var e=a.components,t=void 0===e?[]:e;_(),P(i,a),S.set({components:t});var r=q(),o=r.visible,s=r.hidden,u=r.ordered;m=o,s.forEach((function(e){e.instance.hide(),e.visible=!1})),o.forEach((function(e){return e.instance.beforeMount()})),o.forEach((function(e){return e.instance.mount()})),o.forEach((function(e){return e.instance.beforeRender()})),o.forEach((function(e){return e.instance.render()})),o.forEach((function(e){return e.instance.mounted()})),o.forEach((function(e){e.visible=!0})),lu(n,u)}(),j(),L(a.interactions),D(n),h.element=n),h}var fu=function(e){var t=kt(e);return t.prio=function(e){return e?t.default(e[0]):[t.default()]},t.types=function(){return t.getKeys()},t},du=kt();function hu(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];for(var r=0;r<n.fields.length;r++)if(n.fields[r].key()===e)return n.fields[r];for(var i=0;i<n.fields.length;i++)if(n.fields[i].title()===e)return n.fields[i];return null}var pu=function(e){return e.filter((function(e){return"number"==typeof e&&!isNaN(e)}))},mu=function(e){return e.reduce((function(e,t){return e+t}),0)},vu={first:function(e){return e[0]},last:function(e){return e[e.length-1]},min:function(e){var t=pu(e);return t.length?Math.min.apply(null,t):NaN},max:function(e){var t=pu(e);return t.length?Math.max.apply(null,t):NaN},sum:function(e){var t=pu(e);return t.length?t.reduce((function(e,t){return e+t}),0):NaN},avg:function(e){var t=pu(e),n=t.length;return n?mu(t)/n:NaN}};function gu(e,t,n,r){var i={},o=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((function(a){var s=n[a],u=i[a]={};-1!==["number","string","boolean"].indexOf(H(s))?(u.type="primitive",u.value=s):"function"==typeof s?(u.type="function",u.value=s,u.label=s,u.field=o):"object"===H(s)&&(s.fields?u.fields=s.fields.map((function(n){return gu(e,t,{main:n},r).main})):void 0!==s.field?(u.type="field",u.field=t.field(s.field),u.value=u.field.value,u.label=u.field.label):o&&(u.value=o.value,u.label=o.label,u.field=o),"function"==typeof s.filter&&(u.filter=s.filter),void 0!==s.value&&(u.value=s.value),void 0!==s.label&&(u.label=s.label),"function"==typeof s.reduce?u.reduce=s.reduce:s.reduce?u.reduce=vu[s.reduce]:u.field&&u.field.reduce&&(u.reduce="string"==typeof u.field.reduce?vu[u.field.reduce]:u.field.reduce),"function"==typeof s.reduceLabel?u.reduceLabel=s.reduceLabel:s.reduceLabel?u.reduceLabel=vu[s.reduceLabel]:u.field&&u.field.reduceLabel&&(u.reduceLabel="string"==typeof u.field.reduceLabel?vu[u.field.reduceLabel]:u.field.reduceLabel))})),i}function yu(e,t){var n=gu(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{}).main;return{props:gu(e,t,e.props||{},n),main:n}}function bu(e,t,n,r){for(var i,o=Array(e.length),a=Array(e.length),s=0;s<e.length;s++)i=r?e[s][r]:e[s],o[s]=i.value,a[s]=i.label;var u=t.reduce,l=t.reduceLabel,c=u?u(o):o,f={value:c,label:l?l(a,c):n?n(c):String(c)};return r&&e[0][r].source?(f.source=e[0][r].source,f):!r&&e[0].source?(f.source=e[0].source,f):f}function xu(e,t){var n=t.main,r=t.propsArr,i=t.props,o=[],a=n.field.formatter(),s={};return r.forEach((function(e){s[e]=i[e].field?i[e].field.formatter():function(e){return e}})),o.push.apply(o,ae(e.map((function(e){var t=bu(e.items,n,a);return r.forEach((function(n){t[n]=bu(e.items,i[n],s[n],n)})),t})))),o}function wu(e){var t=e.cfg,n=e.itemData,r=e.obj,i=e.target,o=e.tracker,a="function"===e.trackType?t.trackBy(n):n[t.trackBy],s=o[a];s||(s=o[a]={items:[],id:a},i.push(s)),s.items.push(r)}function Mu(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function ku(e,t){var n=Array.isArray(e)?e:[e],r=[];return n.forEach((function(e){void 0!==e.field&&function(){var n=t.field(e.field),i=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));for(var o=yu(e,t),a=o.props,s=o.main,u=Object.keys(a),l=!!e.trackBy,c=H(e.trackBy),f={},d=[],h=n.items(),p=[],m=function(t){var n=h[t];if(s.filter&&!s.filter(n))return"continue";var r=Mu(s,n,{key:i});u.forEach((function(e){var o=a[e],s=o.field?o.field.items()[t]:n;r[e]=Mu(o,s,{key:i})})),l&&wu({cfg:e,itemData:n,obj:r,target:d,tracker:f,trackType:c}),p.push(r)},v=0;v<h.length;v++)m(v);l?r.push.apply(r,ae(xu(d,{main:s,propsArr:u,props:a}))):r.push.apply(r,p)}()})),r}var Su=function(e){return e.filter((function(e){return"number"==typeof e&&!isNaN(e)}))};var Cu=function(e){var t=e.key,n=e.data,r=e.cache,i=e.config;if(n){var o=n;"string"==typeof o&&(o=function(e){var t=e.data,n=e.config,r=t.split("\n"),i=r[0],o=r[1],a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(i)for(var s=[/,/,/\t/,/;/],u=0;u<s.length;u++){var l=s[u];if(i&&o){if(l.test(i)&&l.test(o)&&i.split(l).length===o.split(l).length){a=l;break}}else l.test(i)&&(a=l)}return r.map((function(e){return e.split(a)}))}({data:n,config:i})),Array.isArray(o)&&function(e){var t,n=e.source,r=e.data,i=e.cache,o=e.config,a=r,s=o&&o.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map((function(e,t){return t})):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);var u,l=!!s&&"function"==typeof s.row&&s.row,c=t;c=s&&"function"==typeof s.fields?s.fields(c.slice()):t.map((function(e){return{key:e,title:e}})),Array.isArray(r[0])?u=c.map((function(){return[]})):(u={},c.forEach((function(e){u[e.key]=[]})));for(var f=0;f<a.length;f++){var d=l?l(a[f],f,c):a[f];if(d)if(Array.isArray(d))for(var h=0;h<c.length;h++)u[h].push(d[h]);else for(var p=0;p<c.length;p++)u[c[p].key].push(d[c[p].key])}for(var m=Array.isArray(u)?function(e){return u[e]}:function(e){return u[c[e].key]},v=0;v<c.length;v++){var g=m(v),y=Su(g),b=y.length>0,x=b?"measure":"dimension",w=b?Math.min.apply(Math,ae(y)):NaN,M=b?Math.max.apply(Math,ae(y)):NaN;i.fields.push(qr(B({source:n,key:v,title:c[v].title,values:g,min:w,max:M,type:x},c[v]),{value:c[v].value,label:c[v].label}))}}({data:o,cache:r,source:t,config:i})}};function qu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.data,r=e.config,i={fields:[]},o={key:function(){return t},raw:function(){return n},field:function(e){return hu(e,{cache:i,matrix:n})},fields:function(){return i.fields.slice()},extract:function(e){return ku(e,o)},hierarchy:function(){return null}};return Cu({key:t,data:n,config:r,cache:i}),o}qu.util={normalizeConfig:yu,collect:xu,track:wu};var Eu=kt();Eu.default("matrix"),Eu("matrix",qu),Eu("default",qu);var Tu=kt();function Du(e,t,n){return Math.max(e,Math.min(t,n))}function Ou(e){var t,n=e.item,r=e.value,i=e.boxCenter,o=e.rendWidth,a=e.rendHeight,s="x",u="y",l=o,c=a,f=r<.5?90:-90;return e.flipXY&&(s="y",u="x",l=a,c=o,f=r<.5?180:0),(0,e.symbol)(B({},n.oob,(K(t={},s,i*l),K(t,u,Math.max(n.oob.size/2,Math.min(r*c,c-n.oob.size/2))),K(t,"startAngle",f),t)))}function Nu(e){var t,n=e.item,r=e.boxWidth,i=e.boxPadding,o=e.rendWidth,a=e.rendHeight,s="x",u="y",l="width",c="height",f=o,d=a;e.flipXY&&(s="y",u="x",l="height",c="width",f=a,d=o);var h=function(e){var t=e.start,n=e.end,r=e.minPx,i=void 0===r?.1:r,o=e.maxPx,a=void 0===o?1:o,s=Math.max(t,n),u=Math.min(t,n),l=Du(-.1,1.2,s),c=Du(-.1,1.2,u),f=l*a-c*a,d=Math.max(i,f),h=(d-f)/2;return{actualDiff:d,startModifier:h,actualLow:c*a-h}}({start:n.start,end:n.end,minPx:n.box.minHeightPx,maxPx:d}),p=h.actualDiff,m=h.actualLow;return B({},n.box,(K(t={type:"rect"},s,(i+n.major)*f),K(t,u,m),K(t,c,p),K(t,l,r*f),K(t,"data",n.data||{}),K(t,"collider",{type:null}),t))}function _u(e){var t,n=e.item,r=e.from,i=e.to,o=e.boxCenter,a=e.rendWidth,s=e.rendHeight,u="x1",l="y1",c="x2",f="y2",d=a,h=s;return e.flipXY&&(u="y1",l="x1",c="y2",f="x2",d=s,h=a),B({},n.line,(K(t={type:"line"},f,Math.floor(r*h)),K(t,u,o*d),K(t,l,Math.floor(i*h)),K(t,c,o*d),K(t,"data",n.data||{}),K(t,"collider",{type:null}),t))}function Au(e){var t,n=e.item,r=e.key,i=e.position,o=e.width,a=e.boxCenter,s=e.rendWidth,u=e.rendHeight,l="x1",c="y1",f="x2",d="y2",h=s,p=u;e.flipXY&&(l="y1",c="x1",f="y2",d="x2",h=u,p=s);var m=o/2;return B({type:"line"},n[r],(K(t={},c,Math.floor(i*p)),K(t,l,(a-m)*h),K(t,d,Math.floor(i*p)),K(t,f,(a+m)*h),K(t,"r",m*h),K(t,"cx",a*h),K(t,"cy",i*p),K(t,"width",o*h),K(t,"data",n.data||{}),K(t,"collider",{type:null}),t))}function Iu(e,t,n){var r=t.box,i=r.width,o=r.maxWidthPx,a=r.minWidthPx,s=e>=0?1:-1,u=Math.min(s*e*i,isNaN(o)?n:o/n);return(u=isNaN(a)?u:Math.max(a/n,u))*s}Tu("native",(function(e,t,n){var r,i,o={chart:e,mediator:t,element:n},a=[],s=!0;function u(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&Object.keys(r.events).forEach((function(e){var t=r.events[e].bind(o);n.addEventListener(e,t),a.push({key:e,listener:t})}))}function l(){a.forEach((function(e){var t=e.key,r=e.listener;n.removeEventListener(t,r)})),a=[]}return{get key(){return i},set:function(e){!function(e){i=e.key,(r=e).events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),l(),s&&u()},off:function(){s=!1,l()},on:function(){s=!0,0===a.length&&u()},destroy:function(){l(),o=null,r=null}}}));var Pu={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},Lu=Object.keys(Pu),Ru={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created:function(){this.state={}},render:function(e){var t=this,n=e.data,r=this.rect,i=r.width,o=r.height,a="horizontal"===this.settings.settings.orientation,s=this.style,u=this.resolver,l=this.symbol,c=Lu.filter((function(e){return!t.settings.settings[e]||!1!==t.settings.settings[e].show})),f={};c.forEach((function(e){return f[e]=Pu[e]}));var d=function(e){var t,n=e.keys,r=e.data,i=e.defaultSettings,o=e.style,a=e.settings,s=e.width,u=e.height,l=e.resolver,c=B(!0,{},i||{},o||{}),f={major:"horizontal"===a.orientation?u:s,minor:"horizontal"===a.orientation?s:u},d=a.major;t="object"===H(d)&&"object"===H(d.ref)&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:B(!0,{},{binStart:{scale:a.major.scale,ref:a.major.ref.start},binEnd:{scale:a.major.scale,ref:a.major.ref.end}})}):"object"===H(d)&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:B(!0,{},{binStart:{scale:a.major.scale,ref:"binStart"},binEnd:{scale:a.major.scale,ref:"binEnd"}},a.major)}):l.resolve({data:r,scaled:f,defaults:{major:.5},settings:{major:a.major}});var h=a.minor||{},p={};["start","end","min","max","med"].forEach((function(e){(h[e]||r.items&&r.items.length&&r.items[0][e])&&(p[e]={scale:h.scale,ref:e})}));for(var m,v={major:t,minor:l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:B(!0,{},p,h)})},g=0,y=n.length;g<y;g++)a[m]&&!1===a[m].show||(v[m=n[g]]=l.resolve({data:r,defaults:c[m],settings:a[m],scaled:f}));return v}({keys:c,data:n,defaultSettings:f,style:s,settings:this.settings.settings,width:i,height:o,resolver:u}),h=d.settings;return function(e){var t=e.width,n=e.height,r=e.flipXY,i=e.resolved,o=e.keys,a=e.symbol,s=[],u=i.major.items;if(!u.length)return s;var l,c,f,d,h,p,m,v,g,y=t,b=n,x=r?n:t,w=i.major.settings,M=["start","end","min","max","med"].filter((function(e){return void 0!==i.minor.settings[e]})),k=M.length,S=o.filter((function(e){return"oob"!==e})),C=o?o.length:0,q=S?S.length:0,E={box:function(){f.box&&ce(f.start)&&ce(f.end)&&l.push(Nu({item:f,boxWidth:d,boxPadding:h,rendWidth:y,rendHeight:b,flipXY:r}))},line:function(){ce(f.min)&&ce(f.start)&&l.push(_u({item:f,from:f.min,to:f.start,boxCenter:p,rendWidth:y,rendHeight:b,flipXY:r})),ce(f.max)&&ce(f.end)&&l.push(_u({item:f,from:f.max,to:f.end,boxCenter:p,rendWidth:y,rendHeight:b,flipXY:r}))},median:function(){f.median&&ce(f.med)&&l.push(Au({item:f,key:"median",position:f.med,width:d,boxCenter:p,rendWidth:y,rendHeight:b,flipXY:r}))},whisker:function(){if(f.whisker){var e=d*f.whisker.width;ce(f.min)&&l.push(Au({item:f,key:"whisker",position:f.min,width:e,boxCenter:p,rendWidth:y,rendHeight:b,flipXY:r})),ce(f.max)&&l.push(Au({item:f,key:"whisker",position:f.max,width:e,boxCenter:p,rendWidth:y,rendHeight:b,flipXY:r}))}}};function T(){for(var e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE,r=0;r<k;r++)ce(e=f[M[r]])&&(t<e&&(t=e),n>e&&(n=e));m=t<0&&t!==-Number.MAX_VALUE,v=n>1&&n!==Number.MAX_VALUE,g=m||v}for(var D=0,O=u.length;D<O;D++){l=[],c=null;var N=u[D],_=N.data,A=null,I=null;void 0!==w.binStart?(A=N.binStart,I=N.binEnd,c=w.binStart.scale):A=(c=w.major.scale)?N.major:0;var P=0;c?c.bandwidth?A-=(P=c.bandwidth())/2:P=I-A:P=1,f=B({},{major:A,majorEnd:I},i.minor.items[D]);for(var L=0;L<C;L++)f[o[L]]=i[o[L]].items[D];if(d=Iu(P,f,x),p=(h=(P-d)/2)+f.major+d/2,T(),g)f.oob&&(m?l.push(Ou({item:f,value:0,boxCenter:p,rendWidth:y,rendHeight:b,flipXY:r,symbol:a})):v&&l.push(Ou({item:f,value:1,boxCenter:p,rendWidth:y,rendHeight:b,flipXY:r,symbol:a})));else for(var R=0;R<q;R++)f[S[R]]&&!1===f[S[R]].show||E[S[R]]();var j={type:"container",data:_,collider:{type:"bounds"},children:l};s.push(j)}return s}({items:d.items,settings:h,width:i,height:o,flipXY:a,resolved:d,keys:c,symbol:l})}};var ju={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},zu=/px$/,Fu={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},Bu={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function Vu(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function Hu(e,t,n,r){var i=t.width,o=t.height;return e.filter((function(e){return!1!==e.show&&!isNaN(e.x+e.y)})).map((function(e){var t=e,a=zu.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);fe(a)&&(t=ju,a=n.min+t.size*(n.max-n.min));var s=oe(function(e){var t=Fu.shape,n={};return"object"===H(e.shape)&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t="rect"===t?"square":t,n]}(t),2),u=s[0],l=G(G({},s[1]),{},{type:u,label:e.label,x:e.x*i,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity});t===e.errorShape&&(l.width=t.width);var c=r(l);return c.data=e.data,c}))}var Uu={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:function(e){return e.data.value}},style:{item:"$shape"}},render:function(e){var t=e.data,n=this.resolver.resolve({data:t,defaults:B({},Fu,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),r=this.rect,i=r.width,o=r.height,a=B({},Bu,this.settings.settings.sizeLimits),s=n.items,u=function(e,t,n,r,i){var o=Vu(e?e.scale:void 0,n),a=Vu(t?t.scale:void 0,r),s=Math.min(o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*i[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),u=Math.min(o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*i[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(u)),max:Math.max(1,Math.floor(s)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(n.settings.x,n.settings.y,i,o,a);return Hu(s,this.rect,u,this.settings.shapeFn||this.symbol)}};Math.PI;var Wu={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function Yu(e,t,n,r){var i=t.x,o=t.y,a=t.width,s=t.height,u=function(){var e=Fe,t=Be,n=qe(0),r=null,i=Ve,o=He,a=Ue,s=null;function u(){var u,l,c=+e.apply(this,arguments),f=+t.apply(this,arguments),d=i.apply(this,arguments)-Le,h=o.apply(this,arguments)-Le,p=Ee(h-d),m=h>d;if(s||(s=u=Ce()),f<c&&(l=f,f=c,c=l),f>Ie)if(p>Re-Ie)s.moveTo(f*De(d),f*_e(d)),s.arc(0,0,f,d,h,!m),c>Ie&&(s.moveTo(c*De(h),c*_e(h)),s.arc(0,0,c,h,d,m));else{var v,g,y=d,b=h,x=d,w=h,M=p,k=p,S=a.apply(this,arguments)/2,C=S>Ie&&(r?+r.apply(this,arguments):Ae(c*c+f*f)),q=Ne(Ee(f-c)/2,+n.apply(this,arguments)),E=q,T=q;if(C>Ie){var D=ze(C/c*_e(S)),O=ze(C/f*_e(S));(M-=2*D)>Ie?(x+=D*=m?1:-1,w-=D):(M=0,x=w=(d+h)/2),(k-=2*O)>Ie?(y+=O*=m?1:-1,b-=O):(k=0,y=b=(d+h)/2)}var N=f*De(y),_=f*_e(y),A=c*De(w),I=c*_e(w);if(q>Ie){var P,L=f*De(b),R=f*_e(b),j=c*De(x),z=c*_e(x);if(p<Pe&&(P=We(N,_,j,z,L,R,A,I))){var F=N-P[0],B=_-P[1],V=L-P[0],H=R-P[1],U=1/_e(je((F*V+B*H)/(Ae(F*F+B*B)*Ae(V*V+H*H)))/2),W=Ae(P[0]*P[0]+P[1]*P[1]);E=Ne(q,(c-W)/(U-1)),T=Ne(q,(f-W)/(U+1))}}k>Ie?T>Ie?(v=Ye(j,z,N,_,f,T,m),g=Ye(L,R,A,I,f,T,m),s.moveTo(v.cx+v.x01,v.cy+v.y01),T<q?s.arc(v.cx,v.cy,T,Te(v.y01,v.x01),Te(g.y01,g.x01),!m):(s.arc(v.cx,v.cy,T,Te(v.y01,v.x01),Te(v.y11,v.x11),!m),s.arc(0,0,f,Te(v.cy+v.y11,v.cx+v.x11),Te(g.cy+g.y11,g.cx+g.x11),!m),s.arc(g.cx,g.cy,T,Te(g.y11,g.x11),Te(g.y01,g.x01),!m))):(s.moveTo(N,_),s.arc(0,0,f,y,b,!m)):s.moveTo(N,_),c>Ie&&M>Ie?E>Ie?(v=Ye(A,I,L,R,c,-E,m),g=Ye(N,_,j,z,c,-E,m),s.lineTo(v.cx+v.x01,v.cy+v.y01),E<q?s.arc(v.cx,v.cy,E,Te(v.y01,v.x01),Te(g.y01,g.x01),!m):(s.arc(v.cx,v.cy,E,Te(v.y01,v.x01),Te(v.y11,v.x11),!m),s.arc(0,0,c,Te(v.cy+v.y11,v.cx+v.x11),Te(g.cy+g.y11,g.cx+g.x11),m),s.arc(g.cx,g.cy,E,Te(g.y11,g.x11),Te(g.y01,g.x01),!m))):s.arc(0,0,c,w,x,m):s.lineTo(A,I)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Pe/2;return[De(r)*n,_e(r)*n]},u.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:qe(+t),u):e},u.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:qe(+e),u):t},u.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:qe(+e),u):n},u.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:qe(+e),u):r},u.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:qe(+e),u):i},u.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:qe(+e),u):o},u.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:qe(+e),u):a},u.context=function(e){return arguments.length?(s=null==e?null:e,u):s},u}(),l={x:i+a/2,y:o+s/2},c=Math.min(a,s)/2,f=Math.min(a,s)/2,d=f/100;return e.map((function(e,t){var i=n[t];i.type="path";var o=f*i.outerRadius,a=c*i.innerRadius;u.innerRadius(a),u.outerRadius(o),u.cornerRadius(d*i.cornerRadius),i.d=u(e);var s=u.centroid(e),h=i.offset?function(e,t,n,r){var i=oe(e,2),o=i[0],a=i[1],s=Math.sqrt(o*o+a*a),u=n-r;return{x:(o/=s)*t*u,y:(a/=s)*t*u}}(s,i.offset,o,a):{x:0,y:0};return i.transform="translate(".concat(h.x,", ").concat(h.y,") translate(").concat(l.x,", ").concat(l.y,")"),i.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:o,offset:{x:l.x+h.x,y:l.y+h.y}}},i}))}function Ku(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}var $u={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render:function(e){for(var t=e.data,n=[],r=[],i=this.settings.settings,o=this.resolver.resolve({data:t,defaults:B({},Wu,this.style.slice),settings:i.slice}).items,a=0,s=0,u=o.length;s<u;s++){var l=Ku(i,o[s]);l>0&&o[s].outerRadius>=o[s].innerRadius&&(n.push(l),r.push(o[s]),a+=l)}var c=function(){var e=Ze,t=Qe,n=null,r=qe(0),i=qe(Re),o=qe(0);function a(a){var s,u,l,c,f,d=a.length,h=0,p=new Array(d),m=new Array(d),v=+r.apply(this,arguments),g=Math.min(Re,Math.max(-Re,i.apply(this,arguments)-v)),y=Math.min(Math.abs(g)/d,o.apply(this,arguments)),b=y*(g<0?-1:1);for(s=0;s<d;++s)(f=m[p[s]=s]=+e(a[s],s,a))>0&&(h+=f);for(null!=t?p.sort((function(e,n){return t(m[e],m[n])})):null!=n&&p.sort((function(e,t){return n(a[e],a[t])})),s=0,l=h?(g-d*b)/h:0;s<d;++s,v=c)u=p[s],c=v+((f=m[u])>0?f*l:0)+b,m[u]={data:a[u],index:s,value:f,startAngle:v,endAngle:c,padAngle:y};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:qe(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:qe(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:qe(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:qe(+e),a):o},a}().sortValues(null);return c.startAngle(i.startAngle),c.endAngle(i.endAngle),c.padAngle(i.padAngle),Yu(c(n),B({},this.rect,{x:0,y:0}),r,a)}};var Gu=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){var n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((function(e){var n=Math.round(t[e.key]),i=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(i>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:function(e){return e.x1===e.x2||e.y1===e.y2},conditionAppend:function(e){return e.strokeWidth%2!=0}},e.rect={append:["x","y"],round:["width","height"],condition:function(){return!0},conditionAppend:function(e){return e.strokeWidth%2!=0}}),Object.keys(e).forEach((function(t){var n=e[t];n.items=[],n.append.forEach((function(e){n.items.push({key:e,type:"append"})})),n.round.forEach((function(e){n.items.push({key:e,type:"round"})}))})),t.multiple=function(e){return e.forEach((function(e){return t(e)}))},t}(),Xu=function(){function e(){U(this,e),this.reset(),this.push.apply(this,arguments)}return Y(e,[{key:"transposeCoordinate",value:function(e,t,n){if("number"==typeof t&&isFinite(t)){var r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}},{key:"push",value:function(){var e;return(e=this.storage).push.apply(e,arguments),this}},{key:"processItem",value:function(t){var n={},r=void 0!==t.flipXY?t.flipXY:this.flipXY,i=void 0!==t.crisp?t.crisp:this.crisp;if(t.fn&&"function"==typeof t.fn){var o=r?this.height:this.width,a=r?this.width:this.height;t=t.fn({width:o,height:a,flipXY:r});for(var s=Object.keys(t),u=0,l=s.length;u<l;u++){var c=s[u];n[e.evaluateKey(c,r)]=t[c]}}else for(var f=Object.keys(t),d=0,h=f.length;d<h;d++){var p=f[d],m=e.evaluateKey(p,r),v=this.transposeCoordinate(m,t[p],r);n[m]=v}return i&&Gu(n),n}},{key:"output",value:function(){for(var e=[],t=0,n=this.storage.length;t<n;t++){var r=this.processItem(this.storage[t]);e.push(r)}return e}},{key:"reset",value:function(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}],[{key:"evaluateKey",value:function(e,t){if(t){var n=e.substring(0,1),r=e.substring(1);if("x"===n)return"y".concat(r);if("y"===n)return"x".concat(r);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}}]),e}();function Ju(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Xu,t)}function Qu(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}var Zu={created:function(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender:function(){this.blueprint=Ju(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render:function(){var e=this;if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,ka(this,"x",this.rect.width),ka(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=B({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=B({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=Qu(this.x,this.rect.width),this.lines.y=Qu(this.y,this.rect.height),this.lines.y=this.lines.y.map((function(e){return B(e,{flipXY:!0})}));var t=function(t){var n=t.dir,r=t.isMinor,i=e.lines[n].filter((function(e){return!!e.isMinor===r})),o=r?e.settings.minorTicks:e.settings.ticks;e.resolver.resolve({settings:o,data:{items:i,dir:n}}).items.forEach((function(t){var n=t.data;t.show&&e.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:t.stroke||"black",strokeWidth:void 0!==t.strokeWidth?t.strokeWidth:1,strokeDasharray:void 0!==t.strokeDasharray?t.strokeDasharray:void 0,flipXY:n.flipXY||!1})}))};return t({dir:"x",isMinor:!1}),t({dir:"x",isMinor:!0}),t({dir:"y",isMinor:!1}),t({dir:"y",isMinor:!0}),this.blueprint.output()}};function el(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){var i="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}var o="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(o?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function tl(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){var i="right"===r;return"\n M ".concat(e+=i?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}var o="bottom"===r;return t+=o?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function nl(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;case"top":case"left":default:return 0}return 0}function rl(e){var t={value:e.value};return e.label&&(t.label=e.label.text),t}function il(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function ol(e,t){var n=e.min();if(n===e.max()){var r=function(e){var t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}var al={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:function(){return 30},beforeRender:function(){this.blueprint=Ju(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render:function(){var e=this,t=this.settings;if(this.lines={x:[],y:[]},this.lines.x=t.lines&&t.lines.x||[],this.lines.y=t.lines&&t.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];var n={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(il).map((function(t){if("function"==typeof t.value&&(t.value=t.value()),t.scale){var n=e.chart.scale(t.scale),r=ol(n,t.value);return B(t,{scale:n,position:r})}return B(t,{position:t.value})})),this.lines.y=this.lines.y.filter(il).map((function(t){if("function"==typeof t.value&&(t.value=t.value()),t.scale){var n=e.chart.scale(t.scale),r=ol(n,t.value);return B(t,{scale:n,position:r,flipXY:!0})}return B(t,{position:t.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((function(e){return!(e.position<0||e.position>1)||(n["x".concat(e.position>1?1:0)].push(rl(e)),!1)})),this.lines.y=this.lines.y.filter((function(e){return!(e.position<0||e.position>1)||(n["y".concat(e.position>1?1:0)].push(rl(e)),!1)}));var r=[];return[].concat(ae(this.lines.x),ae(this.lines.y)).forEach((function(n){(!0===n.show||void 0===n.show)&&function(e){var t,n=e.chart,r=e.blueprint,i=e.renderer,o=e.p,a=e.settings,s=e.items,u=!0,l=!1,c=!1,f=!1,d=B(!0,{},a.style.line,o.line||{});if(t=r.processItem({type:"line",x1:o.position,y1:0,x2:o.position,y2:1,stroke:d.stroke||"black",strokeWidth:d.strokeWidth||1,strokeDasharray:d.strokeDasharray,flipXY:o.flipXY||!1}),o.label){var h,p=B(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},a.style.label||{},{fill:d.stroke},o.label),m={width:0,height:0},v="";if("string"==typeof o.formatter)h=n.formatter(o.formatter);else if("object"===H(o.formatter))h=n.formatter(o.formatter);else if(void 0!==o.scale&&o.scale.data){var g=o.scale.data()&&o.scale.data().fields;h=g&&g[0]?g[0].formatter():null}!1!==o.label.showValue&&(h?v=" (".concat(h(o.value),")"):o.scale&&(v=" (".concat(o.value,")"))),v&&(m=i.measureText({text:v,fontFamily:p.fontFamily,fontSize:p.fontSize}));var y=i.measureText({text:p.text||"",fontFamily:p.fontFamily,fontSize:p.fontSize}),b={width:y.width+m.width,height:Math.max(y.height,m.height)},x=p.padding,w=nl(o.flipXY?p.vAlign:p.align),M=nl(o.flipXY?p.align:p.vAlign),k=Math.min(1+b.width+2*x,p.maxWidth*r.width,p.maxWidthPx),S=b.height+2*x,C=o.flipXY?S:k,q=o.flipXY?k:S;if((l=r.processItem({fn:function(e){var t=e.width,n=e.height,i=o.position*t-(o.flipXY?S:k)*(1-w);return{type:"rect",x:i=o.flipXY?i:Math.max(i,0),y:Math.max(Math.abs(M*n-q*M),0),width:o.flipXY?C:Math.min(C,r.width-i),height:q,stroke:p.background.stroke,strokeWidth:p.background.strokeWidth,fill:p.background.fill,opacity:p.background.opacity}},flipXY:o.flipXY||!1})).x<-1||l.x+l.width>r.width+1||l.y<-1||l.y+l.height>r.height+1)l=void 0;else{c={type:"text",text:p.text||"",fill:p.fill,opacity:p.opacity,fontFamily:p.fontFamily,fontSize:p.fontSize,x:l.x+x,y:l.y+l.height/2+b.height/3,maxWidth:l.width-2*x-m.width,anchor:"start"},v&&(f={type:"text",text:v||"",fill:p.fill,opacity:p.opacity,fontFamily:p.fontFamily,fontSize:p.fontSize,x:c.x+3+(l.width-(m.width+2*x)),y:c.y});for(var E=0,T=s.length;E<T;E++){var D=s[E];"rect"===D.type?Ms(l,D)&&(u=!1):"line"===D.type&&o.flipXY===D.flipXY&&Cs(l,D)&&(u=!1)}}}s.push(t),u&&l&&c&&(s.push(l,c),f&&s.push(f))}({chart:e.chart,blueprint:e.blueprint,renderer:e.renderer,p:n,settings:t,items:r})})),t.style.oob.show&&function(e){for(var t=e.blueprint,n=e.oob,r=e.settings,i=e.items,o=Object.keys(n),a=r.style.oob||{},s=function(e,r){var s=o[e],u=n[s];if(u.length>0){var l=s.charAt(1),c="y"===s.charAt(0),f=a.padding.x+a.width,d=a.padding.y+a.width,h="bottom";h=c?"1"===l?"bottom":"top":"1"===l?"right":"left";var p=t.processItem({fn:function(e){var t=e.width,n=e.height,r=l*t+("1"===l?-f:f),i=c?d:n-d;return"arc"===a.type?{type:"path",d:el(c?i:r,c?r:i,a.width,h),x:r,y:i,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:r,cy:i,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:u}},flipXY:c}),m=p.cx||p.x,v=p.cy||p.y,g={type:"text",text:u.length||"",x:m-.4*a.width,y:v+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},y={type:"path",d:tl(m,v,a.width,h),x:m,y:v,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};i.push(p,g,y)}},u=0,l=o.length;u<l;u++)s(u)}({blueprint:this.blueprint,oob:n,settings:t,items:r}),r}};function sl(e){var t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=e.innerRect.width+e.innerRect.x,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=e.innerRect.height+e.innerRect.y),function(e,t){B(e,t.style)}(t,e),t}function ul(e){return"string"==typeof e||"number"==typeof e?e:"-"}function ll(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){var r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,u=t.boundingRect.y+(s||a?t.boundingRect.height:0),l=[{x:t.x-i,y:u},{x:t.x+i,y:u}].map((function(e){return Ga(e,r,{x:t.x,y:t.y})})),c={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},f={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},d=r>=0?[c,f]:[f,c];l.push.apply(l,d),t.collider={type:"polygon",vertices:l}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){var r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{var i=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:i,width:n.innerRect.width,height:i<0?n.stepSize+i:n.stepSize}}var o=t.collider;o.x=Math.max(o.x,0),o.y=Math.max(o.y,0);var a=o.x+o.width-(n.outerRect.x+n.outerRect.width);o.width=a>0?o.width-a:o.width;var s=o.y+o.height-(n.outerRect.y+n.outerRect.height);o.height=s>0?o.height-s:o.height}(e,t,n)}function cl(e,t){var n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1),r=0;if(e.tilted)r=e.stepSize*n;else{var i=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-i)*n}return r}function fl(e,t){var n={type:"text",text:ul(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight};return"top"===t.align||"bottom"===t.align?(n.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+cl(t,!1),n.y="top"===t.align?t.innerRect.height:0,n.anchor=t.stepSize?"start":"middle",n.x+=isNaN(t.style.offset)?0:+t.style.offset):(n.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+cl(t,!0),n.x="left"===t.align?t.innerRect.width:0,n.anchor="left"===t.align?"end":"start",n.baseline=t.stepSize?"text-before-edge":"central",n.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((function(n){e[n]=t.style[n]}))}(n,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){var n=t.outerRect.width,r=Math.min(t.maxWidth/2,t.textRect.width/2),i=e.x-r,o=e.x+r;i<0?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):o>n&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{var a=t.outerRect.height,s=t.maxHeight/2,u=e.y-s,l=e.y+s;u<0?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):l>a&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(n,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(n,t),function(e,t){if(t.tilted){var n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";var i=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){var o=t.outerRect.width-t.paddingEnd;e.x+i>o&&(e.maxWidth=(o-e.x-10)/Math.cos(r))}else{var a=t.paddingEnd;e.x-i<a&&(e.maxWidth=(e.x-a-10)/Math.cos(r))}}}(n,t),function(e,t){e.boundingRect=t.textBounds(e)}(n,t),ll(e,n,t),n}function dl(e,t){var n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){B(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){var n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function hl(e){return!e.isMinor&&e.position>=0&&e.position<=1}function pl(e){var t=e.rect,n=e.state,r=e.majorTicks,i=e.measure;return e.horizontal?function(e){for(var t=e.majorTicks,n=e.measureText,r=e.rect,i="layered"===e.state.labels.activeMode?2:1,o=r.width,a=t.map((function(e){return e.label})).map((function(e){return"".concat(e.slice(0,1)).concat(e.length>1?"…":"")})).map(n).map((function(e){return e.width})),s=0;s<t.length;++s){var u=t[s];if(i*o*Math.abs(u.start-u.end)<a[s])return!0}return!1}({majorTicks:r,measureText:i,rect:t,state:n}):function(e){var t=e.majorTicks,n=e.measureText,r=e.rect.height,i=n("M").height;return!(t.length<2)&&r*Math.abs(t[0].position-t[1].position)<i}({majorTicks:r,measureText:i,rect:t,state:n})}function ml(e){var t=e.value,n=e.maxValue,r=e.minValue,i=e.range,o=e.modifier;return isNaN(i)||isNaN(o)||(t=i*o),t>n&&(t=n),t<r&&(t=r),t}function vl(e){var t=e.isDiscrete,n=e.rect,r=e.formatter,i=e.measureText,o=e.scale,a=e.settings,s=e.state,u=0,l={left:0,top:0,right:0,bottom:0},c=a.labels,f=c.maxLengthPx,d=c.minLengthPx;if(a.labels.show){var h,p,m=a.align,v="top"===m||"bottom"===m,g=v?n.inner.width:n.inner.height,y=o.ticks({settings:a,distance:g,formatter:r}).filter(hl),b=function(e){var t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=ml({value:t.width,maxValue:f,minValue:d}),t};if(t&&v&&"auto"===a.labels.mode&&(!function(e){var t=e.majorTicks,n=e.measure,r=e.rect,i=e.state,o=e.settings,a=o.labels.maxGlyphCount,s="layered"===i.labels.activeMode?2:1,u=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,l=n("…").width,c=r.width,f=0;if(isNaN(a))for(var d=0;d<t.length;d++){var h=t[d],p=h.label;if(n(p).width*(p.length>1?u:1)+l>(f=s*c*Math.abs(h.start-h.end)))return!0}else if(f=s*c*t.reduce((function(e,t){return Math.min(Math.abs(t.start-t.end),e)}),1/0),n("M").width*u*a+l>f)return!0;return!1}({majorTicks:y,measure:b,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&pl({rect:n.inner,state:s,majorTicks:y,measure:b,horizontal:v}))return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0};if("tilted"===s.labels.activeMode){var x=Math.abs(a.labels.tiltAngle)*(Math.PI/180);h=function(e){return ml({value:e.width,maxValue:f,minValue:d})*Math.sin(x)+e.height*Math.cos(x)}}else h=v?function(e){return e.height}:function(e){return ml({value:e.width,maxValue:f,minValue:d})};if(v&&"tilted"!==s.labels.activeMode)p=["M"];else if(isNaN(a.labels.maxGlyphCount))p=y.map((function(e){return e.label}));else{for(var w="",M=0;M<a.labels.maxGlyphCount;M++)w+="M";p=[w]}var k=p.map(b),S=k.map(h),C=Math.max.apply(Math,ae(S).concat([0]));if(u+=C,u+=a.labels.margin,"layered"===s.labels.activeMode&&(u*=2),"tilted"===s.labels.activeMode){var q="bottom"===a.align==a.labels.tiltAngle>=0,E=Math.abs(a.labels.tiltAngle)*(Math.PI/180),T=(C-i("M").height*Math.cos(E))/Math.sin(E),D=Math.min(a.labels.maxEdgeBleed,Math.max.apply(Math,ae(k.map((function(e){return Math.min(T,e.width)*Math.cos(E)+e.height})).map((function(e,t){var r=y[t]?y[t].position:0;return q?e-r*n.inner.width:e-(1-r)*n.inner.width}))).concat([0])))+a.paddingEnd;if(l[q?"left":"right"]=D,!a.labels.filterOverlapping&&function(e){var t=e.majorTicks,n=e.measureText,r=e.rect,i=e.bleedSize,o=e.angle;if(t.length<2)return!1;if(0===o)return!0;var a=Math.abs(o),s=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:y,measureText:i,rect:n,bleedSize:D,angle:a.labels.tiltAngle}))return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}return{size:u,edgeBleed:l}}var gl=function(e,t,n){return e.width*Math.abs(t.position-n.position)};function yl(e){var t=e.layered,n=e.major,r=e.innerRect,i=e.outerRect,o=e.tick,a=e.index,s=t?2:1,u=n[a-s],l=n[a+s],c=u?gl(r,o,u)/2-2:1/0,f=l?gl(r,o,l)/2-2:1/0;return n.length<2?r.width:u?l?2*Math.min(c,f):function(e){var t=e.innerRect,n=e.outerRect,r=e.tick,i=e.prevWidth,o=t.x-n.x,a=n.width-t.width-o,s=t.width-t.width*r.position+a,u=2*Math.min(i,s),l=1===r.position?t.width/2-2:0;return Math.max(i,u,l)}({innerRect:r,outerRect:i,tick:o,prevWidth:c}):function(e){var t=e.innerRect,n=e.outerRect,r=e.tick,i=e.nextWidth,o=t.x-n.x,a=t.width*r.position+o,s=2*Math.min(i,a),u=0===r.position?t.width/2-2:0;return Math.max(i,s,u)}({innerRect:r,outerRect:i,tick:o,nextWidth:f})}function bl(e){var t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0}function xl(e){var t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=bl(e)+e.labels.margin}function wl(e,t){return e.map((function(e){return dl(e,t)}))}function Ml(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function kl(e){var t=e.textMetrics,n=e.settings,r=e.innerRect,i=e.scale,o=e.tilted,a=e.layered,s=e.tick,u=t.height,l=Ml(i,s),c={width:0,height:u};if("left"===n.align||"right"===n.align)c.width=r.width-xl(n)-n.paddingEnd;else if(a)c.width=l*r.width*2;else if(o){var f=Math.abs(n.labels.tiltAngle)*(Math.PI/180);c.width=(r.height-xl(n)-n.paddingEnd-u*Math.cos(f))/Math.sin(f)}else c.width=l*r.width;return c.width=ml({value:c.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),c}function Sl(e){var t=e.textMetrics,n=e.settings,r=e.innerRect,i=e.outerRect,o=e.tilted,a=e.layered,s=e.tick,u=e.index,l=e.major,c=t.height,f={width:0,height:c};if("left"===n.align||"right"===n.align)f.width=r.width-xl(n)-n.paddingEnd;else if(o){var d=Math.abs(n.labels.tiltAngle)*(Math.PI/180);f.width=(r.height-xl(n)-n.paddingEnd-c*Math.cos(d))/Math.sin(d)}else f.width=yl({layered:a,major:l,innerRect:r,outerRect:i,tick:s,index:u});return f.width=ml({value:f.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),f}function Cl(e){var t;function n(){return t=Sl,n}function r(){return t=kl,r}function i(e){var n,r=e.settings,i=e.scale,o=e.innerRect,a=e.outerRect,s=e.measureText,u=e.ticks,l=e.state,c=e.textBounds,f=[],d=function(e){return e.filter((function(e){return!e.isMinor}))}(u),h=function(e){return e.filter((function(e){return e.isMinor}))}(u),p={innerRect:o,align:r.align,outerRect:a},m="tilted"===l.labels.activeMode,v="layered"===l.labels.activeMode;if(r.line.show&&(p.style=r.line,p.padding=r.paddingStart,f.push(sl(p))),r.ticks.show&&(p.style=r.ticks,p.tickSize=r.ticks.tickSize,p.padding=bl(r),n=wl(d,p)),r.labels.show){var g=xl(r);p.style=r.labels,p.padding=g,p.tilted=m,p.layered=v,p.angle=r.labels.tiltAngle,p.paddingEnd=r.paddingEnd,p.textBounds=c;var y=function(e,n){p.textRect=function(e){var t=e.style;return(0,e.measureText)({text:e.tick.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:s,style:p.style});var l=t({textMetrics:p.textRect,settings:r,innerRect:o,outerRect:a,scale:i,tilted:m,layered:v,tick:e,major:d,index:n});p.maxWidth=l.width,p.maxHeight=l.height,p.stepSize=function(e){var t=e.innerRect,n=e.scale,r=e.settings,i=e.tick;return("top"===r.align||"bottom"===r.align?t.width:t.height)*Ml(n,i)}({innerRect:o,scale:i,ticks:u,settings:r,tick:e})},b=[];b=!v||"top"!==r.align&&"bottom"!==r.align?function(e,t,n){return e.map((function(e,r){n(e,r);var i=fl(e,t);return i.data=e.data,i}))}(d,p,y):function(e,t,n,r){var i=t.padding,o=xl(n);return e.map((function(e,a){r(e,a);var s=o+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?i:s;var u=fl(e,t);return u.data=e.data,u}))}(d,p,r,y),r.labels.filterOverlapping&&function(e,t,n){var r=function(t,n){return Ms(ye(1,e[t].boundingRect),ye(1,e[n].boundingRect))};if(n&&n.tilted){var i=Math.abs(n.angle);r=function(t,n){var r=1/Math.abs(e[t].x-e[n].x),o=Math.sin(i*(Math.PI/180))/r;return e[t].boundingRect.height>o}}for(var o=0;o<=e.length-1;o++)for(var a=o+1;a<=Math.min(o+5,o+(e.length-1));a++)e[o]&&e[a]&&r(o,a)&&(a===e.length-1?(e.splice(o,1),t&&t.splice(o,1)):(e.splice(a,1),t&&t.splice(a,1)),a--,o--)}(b,n,p),f.push.apply(f,ae(b))}return r.minorTicks&&r.minorTicks.show&&h.length>0&&(p.style=r.minorTicks,p.tickSize=r.minorTicks.tickSize,p.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(r),f.push.apply(f,ae(wl(h,p)))),n&&f.push.apply(f,ae(n)),f}return n.build=i,r.build=i,e?r():n()}var ql={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},El={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};var Tl={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created:function(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState:function(){var e,t,n,r;this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){var t=e.state,n=e.style,r=e.settings,i=B(!0,{},t.isDiscrete?ql:El,n),o=B(!0,{},i,r.settings),a=r.layout.dock||t.defaultDock;o.dock=a,o.align=function(e,t){var n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));var s=o.paddingStart,u=o.paddingEnd;return o.paddingStart="function"==typeof s?s.call(null):s,o.paddingEnd="function"==typeof u?u.call(null):u,o}(this),this.state.concreteNodeBuilder=Cl(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=(e=this.state,t=this.state.settings,n=this.state.isDiscrete,r=t.labels.mode,n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal")},preferredSize:function(e){var t=this.formatter,n=this.state,r=this.scale,i=this.state.isHorizontal?e.inner.width:e.inner.height;return this.state.pxScale=Sa(r,i),function(e){var t=e.isDiscrete,n=e.rect,r=e.formatter,i=e.measureText,o=e.scale,a=e.settings,s=0,u=vl({isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:e.state}),l=u.size,c=u.edgeBleed;if(s+=l,u.isToLarge)return{size:s};if(a.ticks.show&&(s+=a.ticks.margin,s+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){var f=a.minorTicks.margin+a.minorTicks.tickSize;f>s&&(s=f)}if(a.line.show){var d=a.line.strokeWidth/2;s+=d,c[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(d)}return s+=a.paddingStart,{size:s+=a.paddingEnd,edgeBleed:c}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n})},beforeUpdate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.settings;this.setState(t)},resize:function(e){var t=e.inner,n=e.outer,r=B({},t,function(e){var t=e.align,n=e.inner;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),i=n||r;return B(this.state.innerRect,r),B(this.state.outerRect,i),n},beforeRender:function(){var e=this.scale,t=this.formatter,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=Sa(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((function(e){return e.position>=0&&e.position<=1}))},render:function(){var e=this.state,t=[];return t.push.apply(t,ae(this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e}))),Gu.multiple(t),t}};var Dl={render:function(){return[]}};function Ol(e,t,n){var r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){r=(n.data().fields||[]).map((function(e){return e.title()})).join(t)}return r}function Nl(e,t){var n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}var _l={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created:function(){this.definitionSettings=this.settings.settings;var e=this.settings.text,t=this.definitionSettings.join;this.title=Ol(e,t,this.scale)},preferredSize:function(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render:function(){var e=this.title,t=this.definitionSettings,n=this.rect,r=[];return r.push(function(e){var t=e.title,n=e.definitionSettings,r=e.dock,i=e.rect,o=e.measureText,a=e.style,s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:Nl(r,n.anchor),baseline:"alphabetical"};B(s,a.text);var u=o(s);if("top"===r||"bottom"===r){var l=i.width/2;"left"===n.anchor?l=n.paddingLeft||0:"right"===n.anchor&&(l=i.width-(n.paddingRight||0)),s.x=l,s.y="top"===r?i.height-n.paddingStart:n.paddingStart+u.height,s.dy="top"===r?-u.height/6:-u.height/3,s.maxWidth=.8*i.width}else{var c=i.height/2;"top"===n.anchor?c=n.paddingStart:"bottom"===n.anchor&&(c=i.height-n.paddingStart),s.y=c,s.x="left"===r?i.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-u.height/3:u.height/3;var f="left"===r?270:90;s.transform="rotate(".concat(f,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*i.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate:function(e){e.settings&&(B(this.settings,e.settings),this.definitionSettings=e.settings.settings);var t=this.settings.text,n=this.definitionSettings.join;this.title=Ol(t,n,this.scale)}};function Al(e,t){var n,r=e.settings.layout.dock,i=e.settings.settings.invert,o="top"===r||"bottom"===r,a=o?"width":"height",s=e.rect[a],u=e.chart.scroll(e.settings.scroll),l=t[o?"x":"y"];i&&(l=s-l);var c=u.getState();n={startOffset:l,startScroll:c.start,swipe:!1};var f=l/s*(c.max-c.min)+c.min;f<c.start?n.startScroll=f:f>c.start+c.viewSize&&(n.startScroll=f-c.viewSize);return{update:function(e){var t=e[o?"x":"y"];if(i&&(t=s-t),!n.swipe){if(Math.abs(n.startOffset-t)<=1)return;n.swipe=!0}var r=u.getState(),a=(t-n.startOffset)/s*(r.max-r.min),l=n.startScroll+a;u.moveTo(l)},end:function(e){var t=e[o?"x":"y"];i&&(t=s-t);var r=u.getState();if(n.swipe){var a=(t-n.startOffset)/s*(r.max-r.min),l=n.startScroll+a;u.moveTo(l)}else{var c=t/s*(r.max-r.min)+r.min-r.viewSize/2;u.moveTo(c)}}}}function Il(e,t){var n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}var Pl={require:["chart","renderer"],on:{panStart:function(e){var t=Il(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=Al(this,n),this.currentMove.update(t)},panMove:function(e){if(this.currentMove){var t=Il(e,this.renderer);this.currentMove.update(t)}},panEnd:function(e){if(this.currentMove){var t=Il(e,this.renderer);this.currentMove.end(t),this.currentMove=null}},panCancel:function(){this.currentMove=null},tap:function(e){var t=Il(e,this.renderer);Al(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){var t=this.chart.scroll(this.settings.scroll).getState();return t.viewSize>=t.max-t.min?Math.max(e.width,e.height):this.settings.settings.width},render:function(e){var t,n=this.settings.layout.dock,r=this.settings.settings.invert,i="top"===n||"bottom"===n,o=i?"width":"height",a=this.rect[o],s=this.chart.scroll(this.settings.scroll).getState(),u=a*(s.start-s.min)/(s.max-s.min),l=a*s.viewSize/(s.max-s.min);return r&&(u=a-u-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:(t={position:"absolute"},K(t,i?"left":"top","".concat(u,"px")),K(t,i?"top":"left","25%"),K(t,i?"height":"width","50%"),K(t,o,"".concat(Math.max(1,l),"px")),K(t,"background",this.settings.settings.thumbColor),t)})))},renderer:"dom"};function Ll(e){var t=e.h,n=e.isVertical,r=e.value,i=e.pos,o=e.align,a=e.borderHit,s=e.state,u=e.idx,l="end"!==o,c=l?{left:"0",top:"0"}:{right:"0",bottom:"0"},f=0,d="100%",h="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(d="".concat(s.targetRect.x+s.targetRect.width,"px"),h="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(f=n?s.targetRect.x:s.targetRect.y,d="".concat(s.rect.width-f,"px"),h="".concat(s.rect.height-f,"px")),l||(i-=a),t("div",{onmouseover:function(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout:function(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",u].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?f:i,"px"),top:"".concat(n?i:f,"px"),height:n?"".concat(a,"px"):h,width:n?d:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:B({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},c)})])}function Rl(e){var t,n,r=e.h,i=e.isVertical,o=e.label,a=e.otherValue,s=e.rangeIdx,u=e.idx,l=e.pos,c=e.align,f=e.state,d=e.value,h="end"!==c,p="outside"===f.settings.bubbles.placement,m="none";i?(n=h?"left":"right",p&&(m=h?"translate(-100%, 0px)":"translate(100%, 0px)")):(n=h?"top":"bottom",p&&(m=h?"translate(0px, -100%)":"translate(0px, 100%)"));var v=f.edit&&f.edit.rangeIdx===s&&f.edit.bubbleIdx===u,g={position:"relative",borderRadius:"".concat(f.style.bubble.borderRadius,"px"),border:"".concat(f.style.bubble.strokeWidth,"px solid ").concat(f.style.bubble.stroke),backgroundColor:f.style.bubble.fill,color:f.style.bubble.color,fontFamily:f.style.bubble.fontFamily,fontSize:f.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:i?"translate(0,-50%)":"translate(-50%,0)",cursor:i?"ns-resize":"ew-resize"},y=f.style.bubble.stroke,b=v?r("input",{type:"text",value:d,style:G(G({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup:function(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();var t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(f.style.bubble.strokeWidth,"px solid ").concat(y)):f.onEditConfirmed(s,t,a)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),f.onEditCanceled())}}):r("div",{"data-key":[f.key,"bubble",s].join("-"),"data-other-value":a,"data-idx":s,"data-bidx":u,style:g},[o]);return r("div",{style:(t={position:"absolute"},K(t,n,"0"),K(t,i?"top":"left","".concat(l,"px")),K(t,"transform",m),t)},[b])}function jl(e){var t=e.h,n=e.isVertical,r=e.top,i=e.height,o=e.color,a=e.on,s=e.opacity;return t("div",B({style:{backgroundColor:o,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(i,"px"):"100%",width:n?"100%":"".concat(i,"px"),pointerEvents:"auto"}},a),[])}function zl(e){var t=e.borderHit,n=e.els,r=e.isVertical,i=e.state,o=e.vStart,a=e.vEnd,s=e.idx,u=0;i.targetRect&&(u=r?i.targetRect.y:i.targetRect.x);var l=!!i.scale,c=l?i.scale.norm(o)*i.size:o,f=l?i.scale.norm(a)*i.size:a,d=Math.abs(c-f),h=Math.min(c,f)+u,p=h+d;if(i.targetRect){var m=i.targetFillRect||i.targetRect,v=r?m.height:m.width,g=l?i.scale.norm(o)*v:o,y=l?i.scale.norm(a)*v:a,b=Math.abs(g-y),x=Math.min(g,y),w={h:i.h,isVertical:r,top:x,height:b,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(w.on={onmouseover:function(e){e.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout:function(e){e.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(m.x,"px"),top:"".concat(m.y,"px"),height:"".concat(m.height,"px"),width:"".concat(m.width,"px")}},[jl(w)]))}var M=c<f?o:a,k=c<f?a:o,S=oe(l?i.scale.domain():[Math.min(o,a),Math.max(o,a)],2),C=S[0],q=S[1],E=M+1e-5>=C&&M-1e-5<=q,T=k-1e-5<=q&&k+1e-5>=C;E&&n.push(Ll({h:i.h,isVertical:r,borderHit:t,value:M,pos:h,align:"start",state:i,idx:s})),T&&n.push(Ll({h:i.h,isVertical:r,borderHit:t,value:k,pos:p,align:"end",state:i,idx:s}));var D=i.settings.bubbles;if(D&&D.show){var O={fontSize:D.fontSize,fontFamily:D.fontFamily,color:D.fill},N=[o,a];E&&n.push(Rl({h:i.h,isVertical:r,align:D.align,style:O,rangeIdx:s,idx:0,otherValue:k,value:M,label:"".concat(i.format(M,N)),pos:h,state:i})),T&&n.push(Rl({h:i.h,isVertical:r,align:D.align,style:O,rangeIdx:s,idx:1,otherValue:M,value:k,label:"".concat(i.format(k,N)),pos:p,state:i}))}}function Fl(e){var t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start,r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t)}function Bl(e){var t=[],n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach((function(r,i){e.active&&i===e.active.idx||zl({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})})),e.active){var r=e.start,i=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),i=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),i=Math.max(e.start,e.current);else{var o=Fl(e);r=e.active.start+o,i=e.active.end+o}zl({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function Vl(e){return{min:e.scale.min(),max:e.scale.max()}}function Hl(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function Ul(e,t,n){var r,i,o=e.ranges,a=-1;for(r=0;r<o.length;r++){if(o[r].min<=t&&t<=o[r].max){a=r,n.min=r?o[r-1].max:n.min,n.max=r+1<o.length?o[r+1].min:n.max;break}if(t<o[r].min){n.max=o[r].min,n.min=r?o[r-1].max:n.min;break}}-1===a&&o.length&&r>=o.length&&(n.min=o[o.length-1].max),-1!==a&&(i={idx:a,start:o[a].min,end:o[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=i}function Wl(e){e.renderer.render(Bl(e))}function Yl(e,t){if(!t||!t.isActive())return[];var n=e.scale.data(),r=(n&&n.fields||[]).map((function(e){return e.id()})),i=t.brushes().filter((function(e){return"range"===e.type&&-1!==r.indexOf(e.id)}))[0];return i?i.brush.ranges():[]}function Kl(e,t){for(var n,r=1/0,i=t.domain(),o=t.bandwidth()/2,a=0;a<i.length;++a){var s=Math.abs(e-o-t(i[a]));s<r&&(r=s,n=i[a])}return n}function $l(e,t){return Math.min.apply(Math,ae(e))<=Math.max.apply(Math,ae(t))&&Math.max.apply(Math,ae(e))>=Math.min.apply(Math,ae(t))}function Gl(e){return me(e.reduce((function(e,t){return e.push.apply(e,ae(pe(t.bounds))),e}),[]))}var Xl={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart:function(e){this.start(e)},rangeMove:function(e){this.move(e)},rangeEnd:function(e){this.end(e)},rangeClear:function(e){this.clear(e)},bubbleStart:function(e){this.bubbleStart(e)}},created:function(){this.state={key:this.settings.key||"brush-range"}},beforeRender:function(e){this.state.rect=e.size.computedInner},renderRanges:function(){this.state.started||(this.state.ranges=Yl(this.state,this.state.brushInstance),this.state.active=null,Wl(this.state))},render:function(e){var t=this,n=this.settings.settings;this.state.direction="vertical"===n.direction?0:1;var r=this.renderer.element().getBoundingClientRect(),i=this.state.rect[0===this.state.direction?"height":"width"],o=Sa(this.chart.scale(n.scale),i),a=function(e){var t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((function(t){return e.chart.component(t)})).filter((function(e){return!!e&&!!e.rect})),i=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(i.length>0){var a=Gl(i);if(t.size=a[0===e.state.direction?"height":"width"],t.scale=Sa(e.chart.scale(n.scale),t.size),t.targetRect=a,o.length>0){var s=Gl(o);t.targetFillRect=s}}else if(r&&r.length>0){var u=r.slice(1).reduce((function(e,t){return{x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)}}),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:u.x0-e.state.rect.x,y:u.y0-e.state.rect.y,width:u.x1-u.x0,height:u.y1-u.y0}}return t}(this);if(o=a.scale?a.scale:o,this.state.targetRect=a.targetRect,this.state.targetFillRect=a.targetFillRect,this.state.size=null===a.size?i:a.size,this.state.settings=n,this.state.style=this.style,this.state.offset=r,this.state.brush="object"===H(n.brush)?n.brush.context:n.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!n.multiple,this.state.h=e,this.state.onEditConfirmed=function(e,n,r){t.state.edit=null,function(e,t,n,r){var i=e.ranges.map((function(e){return{min:e.min,max:e.max}})),o=e.scale.min(),a=e.scale.max();i[t]={min:Math.max(o,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=G({},i[t]);var s=e.scale.data();s&&s.fields&&s.fields.forEach((function(t){e.fauxBrushInstance||e.brushInstance.setRange(t.id(),i)}))}(t.state,e,n,r),t.emit("bubbleEnd"),Wl(t.state)},this.state.onEditCanceled=function(){t.state.edit=null,Wl(t.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof n.bubbles.label&&function(e,r){return n.bubbles.label.call(void 0,{datum:e,data:r,scale:o,resources:{scale:t.chart.scale,formatter:t.chart.formatter}})},{}.hasOwnProperty.call(o,"norm")){this.state.editable=!0,this.state.observeBrush="object"===H(n.brush)&&n.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=o;var s=this.state.scale.data();!this.state.format&&s&&s.fields&&s.fields[0]&&(this.state.format=s.fields[0].formatter())}else this.state.editable=!1,this.state.scale=bo(),this.state.scale.data=o.data,this.state.format||(this.state.format=function(e,t){return $l(o.range(),t)?function(e,t){var n=t.ticks(),r=t.domain().indexOf(Kl(e,t));return-1!==r?n[r].label:"-"}(e,o):"-"}),this.state.fauxBrushInstance=pa(),this.state.findValues=function(e){return function(e,t){var n=t.domain(),r=t.range(),i=[];return e.forEach((function(e){if($l(r,[e.min,e.max])){var o=n.indexOf(Kl(e.min,t)),a=n.indexOf(Kl(e.max,t));i.push.apply(i,n.slice(Math.min(o,a),Math.max(o,a)+1))}})),i}(e,o)};return this.state.ranges=Yl(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[Bl(this.state)]:[]},mounted:function(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy:function(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start:function(e){!function(e){var t=e.state,n=e.e,r=e.renderer,i=e.ranges,o=e.targetSize;if(!t.started){t.edit=null;var a=n.center.x-n.deltaX,s=n.center.y-n.deltaY,u=document.elementFromPoint(a,s);r.element().contains(u)||(u=null);var l={started:!0};t.offset=B({},r.element().getBoundingClientRect());var c=a-t.offset.left,f=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=i(t,t.fauxBrushInstance||t.brushInstance);var d=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];l.current=t.scale.normInvert(h/t.size),l.start=t.scale.normInvert(d/t.size);var p,m,v=t.ranges,g=Vl(t),y=-1;if(u&&u.hasAttribute("data-idx"))y=parseInt(u.getAttribute("data-idx"),10),g.min=y>0?v[y-1].max:g.min,g.max=y+1<v.length?v[y+1].min:g.max;else{for(p=0;p<v.length;p++){if(v[p].min<=l.start&&l.start<=v[p].max){y=p,g.min=p?v[p-1].max:g.min,g.max=p+1<v.length?v[p+1].min:g.max;break}if(l.start<v[p].min){g.max=v[p].min,g.min=p?v[p-1].max:g.min;break}}-1===y&&v.length&&p>=v.length&&(g.min=v[v.length-1].max)}if(-1!==y||t.multi||(l.ranges=[],g.min=t.scale.min(),g.max=t.scale.max()),-1!==y)if(m={idx:y,start:v[y].min,end:v[y].max,limitLow:g.min,limitHigh:g.max,mode:"move"},u&&u.hasAttribute("data-other-value"))l.start=parseFloat(u.getAttribute("data-other-value")),m.mode="modify";else{var b=t.scale.norm(m.start)*t.size,x=t.scale.norm(m.end)*t.size;Math.abs(d-b)<=o?(l.start=m.end,m.mode="modify"):Math.abs(d-x)<=o&&(l.start=m.start,m.mode="modify")}else m={idx:-1,start:l.start,end:l.current,limitLow:g.min,limitHigh:g.max,mode:"current"};l.active=m,"modify"!==m.mode&&t.targetRect&&!Ss(t.targetRect,{x:c,y:f})||Object.keys(l).forEach((function(e){return t[e]=l[e]}))}}({e:e,state:this.state,renderer:this.renderer,ranges:Yl,targetSize:5})},end:function(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);var n=Vl(e);Ul(e,e.current,n)}(this.state,Yl),Wl(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move:function(e){this.state.started&&(!function(e,t){var n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){var t=e.ranges.map((function(e){return{min:e.min,max:e.max}}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{var n=Fl(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});var r=e.scale.data();r&&r.fields&&r.fields.forEach((function(n){if(e.fauxBrushInstance){var r=Yl(e,e.fauxBrushInstance),i=e.findValues(r),o=e.findValues(t),a=o.filter((function(e){return-1===i.indexOf(e)})),s=i.filter((function(e){return-1===o.indexOf(e)})),u=a.map((function(e){return{key:n.id(),value:e}})),l=s.map((function(e){return{key:n.id(),value:e}}));e.brushInstance.addAndRemoveValues(u,l),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),Wl(this.state))},clear:function(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart:function(e){if(this.state.editable){var t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(!isNaN(r.rangeIdx)&&JSON.stringify(r)!==JSON.stringify(this.state.edit)){this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();var i=n.parentNode;Wl(this.state);var o=i.querySelector("input");o.focus(),o.select()}}}};function Jl(e){e.renderer.render(Bl(e))}function Ql(e){return e.rc.ranges()}var Zl={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart:function(e){this.start(e)},areaMove:function(e){this.move(e)},areaEnd:function(e){this.end(e)},areaClear:function(e){this.clear(e)}},created:function(){this.state={key:this.settings.key||"brush-area-dir"}},render:function(e){var t=this;this.state.rect=this.rect;var n=this.settings.settings,r="vertical"===n.direction?0:1,i=this.state.rect[0===r?"height":"width"],o=this.renderer.element().getBoundingClientRect(),a=(n.target?n.target.components||[n.target.component]:[]).map((function(e){return t.chart.component(e)})).filter((function(e){return!!e&&!!e.rect})),s=a[0]?a.slice(1).reduce((function(e,t){return{x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)}}),{x0:a[0].rect.x,y0:a[0].rect.y,x1:a[0].rect.x+a[0].rect.width,y1:a[0].rect.y+a[0].rect.height}):null;return this.state.targetRect=s?{x:s.x0-this.rect.x,y:s.y0-this.rect.y,width:s.x1-s.x0,height:s.y1-s.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=r,this.state.settings=n,this.state.offset=o,this.state.rc=ea(),this.state.renderer=this.renderer,this.state.multi=!!n.multiple,this.state.h=e,this.state.size=i,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){var r=Math.min.apply(Math,ae(n)),i=Math.max.apply(Math,ae(n)),o={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?i-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:i-r},a=e.chart.shapesAt(o,e.settings.brush);if(0===a.length)return"-";var s=a.reduce((function(n,i){var o=n.bounds,a=i.bounds;return t===r?o[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:i:o[e.cssCoord.coord]+o[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:i})),u=e.settings.brush.components.reduce((function(e,t){return e.key===s.key?e:t}));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(u.data)&&u.data.length?s.data[u.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start:function(e){!function(e){var t=e.state,n=e.e,r=e.renderer,i=e.ranges,o=e.targetSize;if(!t.started){var a=n.center.x-n.deltaX,s=n.center.y-n.deltaY,u=document.elementFromPoint(a,s);r.element().contains(u)||(u=null);var l={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=i(t);var c=a-t.offset.left,f=s-t.offset.top,d=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset],p=h,m=d;l.start=d,l.current=h;var v,g,y=t.ranges,b=Hl(t),x=-1;if(u&&u.hasAttribute("data-idx"))x=parseInt(u.getAttribute("data-idx"),10),b.min=x>0?y[x-1].max:b.min,b.max=x+1<y.length?y[x+1].min:b.max;else{for(v=0;v<y.length;v++){if(y[v].min<=m&&m<=y[v].max){x=v,b.min=v?y[v-1].max:b.min,b.max=v+1<y.length?y[v+1].min:b.max;break}if(m<y[v].min){b.max=y[v].min,b.min=v?y[v-1].max:b.min;break}}-1===x&&y.length&&v>=y.length&&(b.min=y[y.length-1].max)}if(-1!==x||t.multi||(l.ranges=[],b.min=0,b.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(g={idx:x,start:y[x].min,end:y[x].max,limitLow:b.min,limitHigh:b.max,mode:"move"},u&&u.hasAttribute("data-other-value"))l.start=parseFloat(u.getAttribute("data-other-value")),g.mode="modify";else{var w=g.start,M=g.end;Math.abs(d-w)<=o?(l.start=g.end,g.mode="modify"):Math.abs(d-M)<=o&&(l.start=g.start,g.mode="modify")}else g={idx:-1,start:m,end:p,limitLow:b.min,limitHigh:b.max,mode:"current"};l.active=g,"modify"!==g.mode&&t.targetRect&&!Ss(t.targetRect,{x:c,y:f})||Object.keys(l).forEach((function(e){return t[e]=l[e]}))}}({e:e,state:this.state,renderer:this.renderer,ranges:Ql,targetSize:5})},end:function(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);var n=Hl(e);Ul(e,e.current,n)}(this.state,Ql),Jl(this.state))},move:function(e){this.state.started&&(!function(e,t){var n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){var t=e.ranges.map((function(e){return{min:e.min,max:e.max}}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{var n=Fl(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);var r=[];t.forEach((function(t){r.push.apply(r,ae(function(e,t){var n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}(e,t)))})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,r)}(this.state),Jl(this.state))},clear:function(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function ec(e){var t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){var t=e.brush;if(!t||!t.isActive())return[];var n=e.scale.data(),r=(n&&n.fields||[]).map((function(e){return e.id()})),i=t.brushes().filter((function(e){return"range"===e.type&&-1!==r.indexOf(e.id)}))[0];return i?i.brush.ranges():[]}(e).map((function(i){var o=e.scale(i.min)*n,a=e.scale(i.max)*n,s=Math.min(o,a),u=Math.abs(o-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:u,y:t?s:0,height:t?u:r}}))}function tc(e,t,n,r){function i(){!function(e){e.renderer.render(ec(e))}(e)}function o(){!function(e){e.renderer.render(ec(e))}(e)}function a(){!function(e){e.renderer.render(ec(e))}(e)}e.brush=t,t&&(t.on("start",i),t.on("update",o),t.on("end",a),e.start=i,e.update=o,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function nc(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}var rc={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:function(){return 50},created:function(){this.state={}},render:function(){var e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=Sa(this.chart.scale(e.scale),r);return nc(this.state),tc(this.state,t,i,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,ec(this.state)},beforeDestroy:function(){nc(this.state)}};function ic(e,t){var n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function oc(e,t,n){return Ya(e,t.points[0])<Math.pow(n.settings.snapIndicator.threshold,2)}function ac(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function sc(e){var t=e.state,n=e.start,r=void 0===n?null:n,i=e.end,o=void 0===i?null:i;null!==r&&(t.snapIndicator.x1=r.x,t.snapIndicator.y1=r.y),null!==o&&(t.snapIndicator.x2=o.x,t.snapIndicator.y2=o.y)}function uc(e,t){e.snapIndicator.visible=t}var lc={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart:function(e){this.start(e)},lassoEnd:function(e){this.end(e)},lassoMove:function(e){this.move(e)},lassoCancel:function(){this.cancel()}},created:function(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start:function(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){var n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=this.settings.settings.brush.components.map((function(e){return{key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"}}));var n=ic(this.state.rendererBounds,e);ac(this.state,n),sc({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move:function(e){if(this.state.active){var t=ic(this.state.rendererBounds,e);oc(t,this.state,this.settings)?uc(this.state,!0):uc(this.state,!1),ac(this.state,t),sc({state:this.state,end:t}),function(e,t){var n=[e.startPoint,e.path,e.snapIndicator].filter((function(e){return e.visible}));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){var n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;var i=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart)}},end:function(e){this.state.active&&(uc(this.state,!1),oc(ic(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){var n=e.componentDelta.x,r=e.componentDelta.y,i=e.points.map((function(e){return{x:e.x+n,y:e.y+r}})),o=t.shapesAt({vertices:i},{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},cancel:function(){this.state.active&&(!function(e,t){e.brushConfig.forEach((function(e){e.contexts.forEach((function(e){t.brush(e).end()}))}))}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render:function(){}};function cc(e,t,n,r,i){for(var o,a=0,s=t.length-1;a<s;){var u=Math.floor((a+s)/2);(o=i(t[u]))[n]+o[r]<e[n]?a=u+1:s=u}return a}function fc(e){var t=e.orientation,n=e.targetNodes,r=e.labels,i=e.container,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cc,a=[],s="v"===t?"x":"y",u="v"===t?"width":"height",l=function(e){return e.textBounds},c=function(e){return e.node.localBounds};return function(e,t){var f=r[t],d=f.textBounds,h=f.node;if(d[s]<i[s]||d[s]+d[u]>i[s]+i[u])return!1;for(var p=o(d,a,s,u,l);p<a.length;p++)if(Ms(d,a[p].textBounds))return!1;for(var m=o(d,n,s,u,c),v=d[s]+d[u],g=m;g<n.length;g++){var y=n[g].node;if(v<y.localBounds[s])break;if(Ms(d,y.localBounds)&&h!==y)return!1}return a.push(r[t]),!0}}function dc(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function hc(e){var t=H(e);return("string"===t||"number"===t)&&""!==e}function pc(e){return G({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds)}function mc(e,t,n){return n?e.width>=t.height:e.width>=t.width}function vc(e,t,n){return n?e.height>=t.width:e.height>=t.height}function gc(e,t,n,r,i){var o,a;return"v"===e?(o=r||i||mc(t,n,!0),a=vc(t,n,!r)):(o=mc(t,n),a=i||vc(t,n,!1)),o&&a}function yc(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function bc(e,t,n){var r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(e,t,n){return mc(e,t,n.rotate)&&vc(e,t,n.rotate)}(e,i,n))return!1;var o=.5*i.height;return n.rotate?(r.x=yc(e.x,e.width,i.height,n.align)+o,r.y=yc(e.y,e.height,i.width,n.justify),r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=yc(e.x,e.width,i.width,n.align),r.y=yc(e.y,e.height,i.height,n.justify)+o),r}function xc(e){var t=e.bar,n=e.view,r=e.direction,i=e.position,o=e.padding,a=void 0===o?4:o,s={};if(B(s,t),i&&"inside"!==i)if("up"===r||"down"===r){var u=Math.max(0,Math.min(t.y,n.height)),l=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(s.y=0,s.height=u):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(s.y=l,s.height=n.height-l)}else{var c=Math.max(0,Math.min(t.x,n.width)),f=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(s.x=0,s.width=c):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(s.x=f,s.width=n.width-f)}else;return function(e,t){var n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),i=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=i,e.width=o-i,e.y=n,e.height=r-n}(s,n),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.top,r=void 0===n?4:n,i=t.bottom,o=void 0===i?4:i,a=t.left,s=void 0===a?4:a,u=t.right,l=void 0===u?4:u;e.x+=s,e.width-=s+l,e.y+=r,e.height-=r+o}(s,a),s}function wc(e){var t,n,r,i,o,a=e.direction,s=e.fitsHorizontally,u=e.measured,l=e.node,c=e.orientation,f=e.placementSettings,d=e.rect,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xc,p=[],m="h"===c?"width":"height";for(o=0;o<f.length;o++)if(r=f[o],i=h({bar:l.localBounds,view:d,direction:a,position:r.position,padding:r.padding}),p.push(i),t=!o||i[m]>t[m]?i:t,gc(c,i,u,s,r.overflow)){n=i;break}return n||(n=t,o=p.indexOf(n)),{bounds:n,placement:r=f[o]}}function Mc(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=i.top,a=void 0===o?4:o,s=i.bottom,u=void 0===s?4:s,l=i.left,c=void 0===l?4:l,f=i.right,d=void 0===f?4:f,h=e.x+e.dx,p=e.y+e.dy,m=n?Math.min(t.width,r.height):Math.min(t.height,r.width),v=n?Math.min(t.height,r.height):Math.min(t.width,r.width),g=.5*t.height,y=1e-9,b=n?h-g:h,x=n?p:p-g,w={x:b-c-y,y:x-a-y,width:v+(c+d)-y,height:m+(a+u)-y};return w}function kc(e){for(var t,n,r,i,o,a,s,u,l,c,f,d,h,p=e.chart,m=e.targetNodes,v=e.rect,g=e.fitsHorizontally,y=e.collectiveOrientation,b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wc,x=arguments.length>2&&void 0!==arguments[2]?arguments[2]:bc,w=arguments.length>3&&void 0!==arguments[3]?arguments[3]:fc,M=[],k={container:v,targetNodes:m,labels:[],orientation:y},S=0,C=m.length;S<C;S++){a=null,d=dc(r=(n=m[S]).node,p),h="left"===(l=n.direction)||"right"===l?"h":"v";for(var q=0;q<n.texts.length;q++)if(hc(i=n.texts[q])){var E=b({direction:l,fitsHorizontally:g,lblStngs:c=n.labelSettings[q],measured:u=n.measurements[q],node:r,orientation:h,placements:c.placements,placementSettings:n.placementSettings[q],rect:v});if(a=E.bounds,f=E.placement,a&&f){o=f.justify;var T="function"==typeof c.linkData?c.linkData(d,S):void 0,D="function"==typeof f.overflow?f.overflow(d,S):f.overflow;"up"===l&&(o=1-o),"opposite"===f.position&&(o=1-o),"left"===l&&(o=1-o);var O=!("h"===y||g);if(t=x(a,i,{justify:"h"===h?f.align:o,align:"h"===h?o:f.align,fontSize:c.fontSize,fontFamily:c.fontFamily,textMetrics:u,rotate:O,overflow:!!D})){var N=Mc(t,u,O,a,f.padding);s="function"==typeof f.fill?f.fill(G(G({},d),{},{textBounds:N}),S):f.fill,t.fill=s,void 0!==T&&(t.data=T),"object"===H(f.background)&&(t.backgroundColor="function"==typeof f.background.fill?f.background.fill(G(G({},d),{},{textBounds:N}),S):f.background.fill,void 0!==t.backgroundColor&&(t.backgroundBounds=Mc(t,u,O,a,f.background.padding))),M.push(t),k.labels.push({node:r,textBounds:N})}}}}var _=M.filter(w(k)),A=_.filter((function(e){return void 0!==e.backgroundBounds})).map(pc);return[].concat(ae(A),ae(_))}function Sc(e){for(var t,n,r,i,o,a,s,u=e.nodes,l=e.rect,c=e.chart,f=e.labelSettings,d=e.placementSettings,h=e.settings,p=e.renderer,m={},v=[],g=!0,y=!1,b=0;b<u.length;b++)if(Ms(i=(n=u[b]).localBounds,l)){var x=dc(n,c);t={node:n,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(var w=0;w<f.length;w++)hc(r="function"==typeof(a=f[w]).label?a.label(x,b):void 0)&&(s="function"==typeof h.direction?h.direction(x,b):h.direction||"up",y=y||"left"===s||"right"===s,m.fontFamily=a.fontFamily,m.fontSize="".concat(a.fontSize,"px"),m.text=r,o=p.measureText(m),t.measurements.push(o),t.texts.push(r),t.labelSettings.push(a),t.placementSettings.push(d[w]),t.direction=s,g=g&&o.width<=i.width-8);v.push(t)}return{targetNodes:v,fitsHorizontally:g,hasHorizontalDirection:y}}function Cc(e){var t=e.orientation,n=void 0===t?"auto":t,r=e.defaultOrientation,i=void 0===r?"h":r;switch(n.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return i}}function qc(e){var t=2*Math.PI;return(e%t+t)%t}function Ec(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function Tc(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function Dc(e,t,n){var r=t.x,i=t.y;if(r*r+i*i>e*e)return null;var o=Math.sin(n),a=Math.cos(n),s=r*a-i*o,u=e*e-s*s;if(u<0)return null;var l=Math.sqrt(u);return{x:s*a+o*l,y:-s*o+a*l}}function Oc(e){var t,n,r=e.radius,i=e.size,o=e.angle,a=i.width,s=i.height,u={x:a/2,y:s/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(!(t=Dc(r,u,o)))return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(!(t=Dc(r,u,Math.PI-o)))return null;n={x:-a,y:-s};break;case 2:if(!(t=Dc(r,u,o-Math.PI)))return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(!(t=Dc(r,u,2*Math.PI-o)))return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function Nc(e){var t=e.slice,n=e.measured,r=e.padding,i=t.start,o=t.end,a=t.innerRadius,s=t.outerRadius,u=s-a-2*r,l=o-i;if(l<Math.PI){var c=(n.height/2+r)/Math.tan(l/2);c>a&&(u=s-c-2*r)}if(u<0||u<n.minReqWidth)return null;var f=qc((i+o)/2),d=s-r,h={x:Math.sin(f)*d,y:-Math.cos(f)*d,width:u,height:n.height};return f<Math.PI?(h.angle=f-Math.PI/2,h.anchor="end"):(h.angle=f+Math.PI/2,h.anchor="start"),h}function _c(e){var t=e.context,n=e.node,r=e.bounds,i=n.desc.slice,o=qc((i.start+i.end)/2);switch(Math.floor(o/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function Ac(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Ic(e,t,n){var r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){var i=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(i,", ").concat(r.x,", ").concat(r.y,")")}return r}function Pc(e){var t,n,r=e.slice,i=e.direction,o=e.position,a=e.padding,s=e.measured,u=e.view,l=e.context,c=e.store,f=r.start,d=r.end,h=r.innerRadius,p=r.offset;switch(o){case"into":t="rotate"===i?Nc({slice:r,measured:s,padding:a}):function(e){var t=e.slice,n=e.padding,r=e.measured,i=t.start,o=t.end,a=t.innerRadius,s=t.outerRadius,u=qc((i+o)/2),l=Oc({radius:s,size:{width:r.width+2*n,height:r.height+2*n},angle:u});return l?(l.baseline="top",Cs(l,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||Cs(l,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||vs({cx:0,cy:0,r:a},l)?null:(Ec(l,n),l)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:f,end:d,innerRadius:0,outerRadius:h},t="rotate"===i?Nc({slice:n,measured:s,padding:a}):function(e){var t=e.slice,n=e.padding,r=e.measured,i=e.store,o=t.start,a=t.end,s=t.outerRadius,u=qc((o+a)/2),l=Oc({radius:s,size:{width:r.width+2*n,height:r.height+2*n},angle:u});return l?(l.baseline="top",Ec(l,n),i.insideLabelBounds.some((function(e){return Ms(e,l)}))?null:(i.insideLabelBounds.push({x:l.x-4,y:l.y,width:l.width+8,height:l.height}),l)):null}({slice:n,measured:s,padding:a,store:c});break;case"outside":t="rotate"===i?function(e){var t=e.slice,n=e.measured,r=e.padding,i=e.view,o=t.start,a=t.end,s=t.outerRadius,u=t.offset,l=s+r,c=a-o;if(c<Math.PI&&(n.height/2+r)/Math.tan(c/2)>l)return null;var f=qc((o+a)/2),d=Math.sin(f)*l,h=-Math.cos(f)*l,p=n.width,m=f%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){var v=h<0?i.y:i.y+i.height,g=Math.abs(v-u.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;g<p&&(p=g)}if(Math.sin(m)>.001){var y=d<0?i.x:i.x+i.width,b=Math.abs(y-u.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;b<p&&(p=b)}if(p<=0||p<n.minReqWidth)return null;var x={x:d,y:h,width:p,height:n.height};return f<Math.PI?(x.angle=f-Math.PI/2,x.anchor="start"):(x.angle=f+Math.PI/2,x.anchor="end"),x}({slice:r,measured:s,padding:a,view:u}):function(e){var t=e.slice,n=e.measured,r=e.padding,i=e.view,o=e.context,a=t.start,s=t.end,u=t.outerRadius,l=t.offset,c=qc((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(o,Math.floor(c/(Math.PI/2)),i))return null;var f=u+r+n.height/2,d=Math.sin(c)*f,h=-Math.cos(c)*f,p=n.width;if(c<Math.PI){var m=Math.abs(i.x+i.width-(d+l.x));m<p&&(p=m)}else{var v=Math.abs(i.x-(d+l.x));v<p&&(p=v)}if(p<n.minReqWidth)return null;var g={x:d,y:h,width:p,height:n.height};return c<Math.PI?g.anchor="start":g.anchor="end",g}({slice:r,measured:s,padding:a,view:u,context:l});break;default:throw new Error("not implemented")}return t&&(t.x+=p.x,t.y+=p.y,"outside"===o&&"rotate"!==i&&function(e,t,n){var r=n.start,i=n.end,o=n.offset,a=n.outerRadius,s=qc((r+i)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){var u=Math.min(e.y,t.q1maxY-e.height),l=e.y-u;if(e.y=u,l>1){var c=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(s)*c,y2:o.y-Math.cos(s)*c,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){var f=Math.max(e.y,t.q2minY),d=f-e.y;if(e.y=f,d>1){var h=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(s)*h,y2:o.y-Math.cos(s)*h,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){var p=Math.max(e.y,t.q3minY),m=p-e.y;if(e.y=p,m>1){var v=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(s)*v,y2:o.y-Math.cos(s)*v,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){var g=Math.min(e.y,t.q4maxY-e.height),y=e.y-g;if(e.y=g,y>1){var b=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(s)*b,y2:o.y-Math.cos(s)*b,strokeWidth:1}}}}}(t,l,r)),t}function Lc(e){for(var t=e.context,n=e.direction,r=e.measured,i=e.node,o=e.placementSettings,a=e.rect,s=e.store,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pc,l=0;l<o.length;l++){var c=o[l],f=u({context:t,slice:i.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(f)return{bounds:f,placement:c}}return{bounds:null,placement:null}}function Rc(e){for(var t=[],n=[],r=[],i=[],o=0;o<e.length;++o){var a=e[o].desc.slice,s=qc((a.start+a.end)/2);switch(Math.floor(s/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:r.push(e[o]);break;case 3:i.push(e[o])}}var u=function(e,t){return qc((e.desc.slice.start+e.desc.slice.end)/2)-qc((t.desc.slice.start+t.desc.slice.end)/2)},l=function(e,t){return u(t,e)};return t.sort(l),n.sort(u),r.sort(l),i.sort(u),t.concat(n,i,r)}function jc(e,t,n){var r=t.fontFamily,i="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:r,fontSize:i});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:i}).width),o}var zc=/\n+|\r+|\r\n/,Fc=/\s/,Bc=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function Vc(e){return"string"==typeof e?-1!==e.search(zc):-1!==String(e).search(zc)}function Hc(e){return-1!==e.search(Fc)}function Uc(e){return-1!==e.search(Bc)}function Wc(e,t,n,r,i){return r.some((function(r){return r(e,t,n)}))?1:i.some((function(r){return r(e,t,n)}))?0:2}function Yc(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}function Kc(e,t,n){return Math.max(t,Math.min(n,e))}function $c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.string,n=e.separator,r=void 0===n?"":n,i=e.reverse,o=void 0!==i&&i,a=e.measureText,s=void 0===a?function(e){return{width:e.length,height:1}}:a,u=e.mandatoryBreakIdentifiers,l=void 0===u?[Vc]:u,c=e.noBreakAllowedIdentifiers,f=void 0===c?[]:c,d=e.suppressIdentifier,h=void 0===d?[Hc,Vc,function(e){return""===e}]:d,p=e.hyphenationIdentifiers,m=void 0===p?[Uc]:p,v=String(t).split(r);Yc(v);var g=v.length,y=o?function(e){return e>=0}:function(e){return e<g},b=o?g:-1;function x(e){var t=Kc(e,0,g-1),n=v[t],r=s(n),i=Wc(n,t,v,l,f);return{index:t,value:n,breakOpportunity:i,suppress:h.some((function(e){return e(n,t,v)})),hyphenation:m.some((function(e){return e(n,t,v)})),width:r.width,height:r.height,done:!1}}function w(e){return isNaN(e)?o?b--:b++:b=Kc(e,0,g-1),y(b)?x(b):{done:!0}}return{next:w,peek:x,length:g}}var Gc="…",Xc=/^\s*\d+(\.\d+)?px\s*$/i;function Jc(e){return"string"===H(e)&&Xc.test(e)}function Qc(e){var t=e["font-size"]||e.fontSize;return Jc(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function Zc(e){var t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;var r=Qc(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function ef(e,t){return{lines:[],line:"",width:0,maxLines:Zc(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function tf(e){e.lines.push(e.line),e.line="",e.width=0}function nf(e,t){e.line+=t.value,e.width+=t.width}function rf(e,t,n){if(t.width>e.maxWidth)return t;for(var r=t.index,i=1;i<5;i++){var o=n.peek(t.index-1);if(!t.hyphenation||!o.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-i),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function of(e,t,n){for(var r=$c({string:t.value,measureText:n});e.lines.length<e.maxLines;){var i=r.next();if(i.done)break;e.width+i.width>e.maxWidth&&2===i.breakOpportunity&&e.line.length>0?(i=e.hyphens.enabled?rf(e,i,r):i,tf(e),nf(e,i)):nf(e,i)}}function af(e,t){for(var n=$c({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[function(e,t){return 0===t}]}),r=ef(e,t),i=!0;r.lines.length<r.maxLines;){var o=n.next();if(o.done){tf(r),i=!1;break}1===o.breakOpportunity?tf(r):r.width+o.width>r.maxWidth&&2===o.breakOpportunity?o.suppress?r.width+=o.width:(o=r.hyphens.enabled?rf(r,o,n):o,tf(r),nf(r,o)):nf(r,o)}return{lines:r.lines,reduced:i}}function sf(e,t){for(var n=$c({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=ef(e,t),i=!0;r.lines.length<r.maxLines;){var o=n.next();if(o.done){tf(r),i=!1;break}1===o.breakOpportunity?tf(r):r.width+o.width>r.maxWidth&&2===o.breakOpportunity?o.suppress?tf(r):o.width>r.maxWidth?of(r,o,t):(tf(r),nf(r,o)):nf(r,o)}return{lines:r.lines,reduced:i}}function uf(e){return{"break-all":af,"break-word":sf}[e.wordBreak]}function lf(e){return function(t){var n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){var r=uf(n);if(!r)return;var i=e(n);if(i.width>n.maxWidth||Vc(n.text)){var o=(Qc(n)-i.height)/2,a=r(n,function(e,t){return function(n){return t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}}(n,e));t.node=function(e,t,n,r){var i={type:"container",children:[]};void 0!==t.id&&(i.id=t.id);var o=0;return e.lines.forEach((function(a,s){var u=B({},t);u.text=a,u._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?u.text+=Gc:delete u.maxWidth,u.dy=isNaN(u.dy)?o:u.dy+o,o+=r,o+=n,i.children.push(u)})),i}(a,n,o,i.height)}}}}function cf(e,t){var n=e.text,r=e["font-size"],i=e["font-family"],o=e.maxWidth;if(n="string"==typeof n?n:"".concat(n),void 0===o)return n;var a=t({text:n,fontSize:r,fontFamily:i}).width;if(a<=o)return n;for(var s=0,u=n.length-1;s<=u;){var l=Math.floor((s+u)/2);(a=t({text:n.substr(0,l)+Gc,fontSize:r,fontFamily:i}).width)<=o?s=l+1:u=l-1}return n.substr(0,u)+Gc}function ff(e){var t=e.baseline||e["dominant-baseline"],n=0,r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}var df,hf={},pf={},mf={fontSize:void 0,fontFamily:void 0};function vf(e,t,n){var r=e+t+n;return"number"!=typeof pf[r]&&(df=df||document.createElement("canvas").getContext("2d"),function(e,t){mf.fontSize===e&&mf.fontFamily===t||(df.font=e+" "+t,mf.fontSize=e,mf.fontFamily=t)}(t,n),pf[r]=df.measureText(e).width),pf[r]}function gf(e){return"number"!=typeof hf[e]&&(hf[e]=function(e){if(Jc(e)){var t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),hf[e]}function yf(e){var t=e.text,n=e.fontSize;return{width:vf(t,n,e.fontFamily),height:gf(n)}}function bf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yf,n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:r,fontSize:n}),o=Math.min(e.maxWidth||i.width,i.width),a=e.x||0,s=e.y||0,u=e.dx||0,l=(e.dy||0)+ff(e),c={x:0,y:s+l-.75*i.height,width:o,height:i.height},f=e["text-anchor"]||e.anchor;return c.x="middle"===f?a+u-o/2:"end"===f?a+u-o:a+u,c}function xf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yf,n=uf(e),r=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:i,fontSize:r});if(n&&(o.width>e.maxWidth||Vc(e.text))){for(var a=n(e,(function(e){return t({text:e,fontFamily:i,fontSize:r})})),s=B({},e),u=0,l="",c=0,f=a.lines.length;c<f;c++){var d=a.lines[c];d+=c===f-1&&a.reduced?Gc:"";var h=t({text:d,fontSize:r,fontFamily:i}).width;h>=u&&(u=h,l=d)}s.text=l;var p=bf(s,t);return p.height=Qc(e)*a.lines.length,p}return bf(e,t)}var wf=.9;function Mf(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function kf(e,t,n){var r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(e.width<n.fontSize)return!1;var o=Math.max(0,e.width-i.width);return r.x=e.x+n.align*o,r.y=e.y+i.height/1.2,r}function Sf(e){return{type:"circle",bounds:{cx:e.cx,cy:e.cy,r:e.r}}}function Cf(e){return e.desc&&e.desc.slice?function(e){var t=e.start,n=e.end,r=e.innerRadius,i=e.outerRadius,o=e.offset;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};var a=0!==r?r:i;return Sf({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?Sf(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var qf={bar:function(e){var t=e.settings,n=e.chart,r=e.nodes,i=e.rect,o=e.renderer,a=e.style,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kc,u=B({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);u.fontSize=parseInt(u.fontSize,10);var l=t.labels.map((function(e){return B({},u,t,e)})),c=t.labels.map((function(e){return e.placements.map((function(n){return B({},u,t,e,n)}))})),f=Sc({nodes:r,chart:n,renderer:o,settings:t,rect:i,labelSettings:l,placementSettings:c}),d=f.fitsHorizontally,h=f.hasHorizontalDirection,p=f.targetNodes,m=Cc({orientation:t.orientation,defaultOrientation:h?"h":"v"}),v="h"===m?"y":"x",g="h"===m?"height":"width";return p.sort((function(e,t){return e.node.localBounds[v]+e.node.localBounds[g]-(t.node.localBounds[v]+t.node.localBounds[g])})),s({chart:n,targetNodes:p,stngs:t,rect:i,fitsHorizontally:d,collectiveOrientation:m})},slice:function(e){var t=e.settings,n=e.chart,r=e.nodes,i=e.rect,o=e.renderer,a=e.style,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lc,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ic,l=B({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);l.fontSize=parseInt(l.fontSize,10);for(var c=t.labels.map((function(e){return B({},l,t,e)})),f=t.labels.map((function(e){return e.placements.map((function(n){return B({},l,t,e,n)}))})),d=[],h={insideLabelBounds:[]},p={},m=0,v=(r=Rc(r)).length;m<v;m++)for(var g=r[m],y=Ac(g,n),b=0;b<c.length;b++){var x=c[b],w="function"==typeof x.label?x.label(y,m):"";if(w){var M="function"==typeof x.direction?x.direction(y,m):x.direction||"horizontal",k="function"==typeof x.linkData?x.linkData(y,m):void 0,S=jc(w,x,o),C=s({context:p,direction:M,lblStngs:x,measured:S,node:g,placementSettings:f[b],rect:i,store:h}),q=C.bounds,E=C.placement;if(q&&E){if("outside"===E.position&&"rotate"!==M){_c({context:p,node:g,bounds:q});var T=Tc(q);if(!us(T,i))continue}var D="function"==typeof E.fill?E.fill(y,m):E.fill,O=u(q,w,{fill:D,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:S});O&&(void 0!==k&&(O.data=k),d.push(O),q.line&&(q.line.stroke=D,d.push(q.line)))}}}return d},rows:function(e){var t=e.settings,n=e.chart,r=e.nodes,i=e.renderer,o=e.style,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kf,s=B({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);for(var u=B({},s,t),l=t.labels.map((function(e){return B({},u,e)})),c={},f=[],d=0,h=r.length;d<h;d++){var p=r[d],m=Mf(p,n),v=Cf(p),g=v.type,y=v.bounds;if(y){var b=0,x=[],w=[],M="circle"===g?2*y.r*wf:y.height;b+=u.padding;var k=void 0;for(k=0;k<l.length;k++){var S=l[k],C="function"==typeof S.label?S.label(m,d):"";c.fontFamily=S.fontFamily,c.fontSize="".concat(S.fontSize,"px"),c.text=C;var q=i.measureText(c);if((b+=q.height+S.padding)>M)break;w.push(C),x.push(q)}var E=k,T=Math.max(0,M-b),D=void 0;for(D="circle"===g?y.cy-y.r*wf:y.y,D+=u.justify*T+u.padding,k=0;k<E;k++){var O=l[k],N=void 0;if("circle"===g){var _=Math.max(Math.abs(D-y.cy),Math.abs(D+x[k].height-y.cy)),A=Math.sqrt(y.r*y.r-_*_);N={x:y.cx-A+u.padding,y:D,width:2*A-2*u.padding,height:x[k].height}}else N={x:y.x+u.padding,y:D,width:y.width-2*u.padding,height:x[k].height};D+=x[k].height+u.padding;var I="function"==typeof O.fill?O.fill(m,d):O.fill,P="function"==typeof O.linkData?O.linkData(m,d):void 0,L=a(N,w[k],{fill:I,align:O.align,fontSize:O.fontSize,fontFamily:O.fontFamily,textMetrics:x[k]});if(L){if(L.text&&L.text!==Gc){var R=cf(L,i.measureText);if(Gc===R)continue;L.ellipsed=R}void 0!==P&&(L.data=P),f.push(L)}}}}return f}};var Ef={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render:function(){var e=this,t=this.settings.settings,n=[];return(t.sources||[]).forEach((function(t){t.strategy&&qf[t.strategy.type]&&t.component&&n.push.apply(n,ae(function(e,t){var n=e.chart,r=e.source,i=e.rect,o=e.renderer,a=e.style;if(!n.component(r.component))return[];var s=n.findShapes(r.selector).filter((function(e){return e.key===r.component}));return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:i.width,height:i.height},renderer:o,style:a})}({chart:e.chart,rect:e.rect,renderer:e.renderer,source:t,style:e.style},qf[t.strategy.type])))})),n}};var Tf={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,justify:.5,align:.5,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25},navigation:{button:{class:void 0,content:void 0,tabIndex:void 0},disabled:!1}};function Df(e){var t=e.x,n=void 0===t?0:t,r=e.y,i=e.item,o=e.globalMetrics,a=e.createSymbol,s=e.direction,u=void 0===s?"ltr":s,l=i.label.displayObject,c=i.label.bounds,f=i.symbol.meta,d="rtl"===u,h={x:d?n+o.maxLabelBounds.width:n+o.maxSymbolSize+o.spacing,y:r,width:o.maxLabelBounds.width,height:Math.max(o.maxSymbolSize,o.maxLabelBounds.height)},p=function(e,t,n){var r=Math.max(0,e.width-t),i=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*i}}({x:d?n+o.maxLabelBounds.width+o.spacing:n,y:r,width:o.maxSymbolSize,height:h.height},f.size,{align:void 0===f.align?.5:f.align,justify:void 0===f.justify?.5:f.justify}),m=a(B({},f,p));return delete m.collider,l.anchor=d?"end":"start",function(e,t,n){var r=n.textMetrics;if(e.height<r.height)return!1;var i=Math.max(0,e.width-r.width);t.baseline="text-before-edge";var o=Math.max(0,e.height-r.height);t.x=e.x+n.align*i,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(h,l,{textMetrics:c,fontSize:parseInt(l.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:i.label.displayObject.data,children:[m,l],collider:{type:"rect",x:n,y:r,width:o.maxItemBounds.width,height:o.maxItemBounds.height}},metrics:h}}function Of(e,t){var n=e.items.length,r=Math.ceil(n/t),i="horizontal"===e.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*r+(r-1)*e.layout.margin[o]}function Nf(e,t){var n,r,i,o,a=t.onScroll,s=void 0===a?function(){}:a,u=null,l=0,c={itemize:function(t){n=function(e,t){for(var n,r,i=e.resolved,o=e.dock,a=[],s=i.items.items,u=i.symbols.items,l=i.labels.items,c=0,f=0,d=0,h=0;h<s.length;h++)if(!1!==s[h].show){var p=void 0!==l[h].text?l[h].text:l[h].data.label||"";n=B({},l[h],{type:"text",fontSize:"".concat(parseInt(l[h].fontSize,10),"px"),text:p,title:p}),r={symbol:{meta:u[h]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),c=Math.max(u[h].size,c),f=Math.max(r.label.bounds.width,f),d=Math.max(r.label.bounds.height,d)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:c,maxItemBounds:{height:Math.max(c,d),width:c+8+f},maxLabelBounds:{width:f,height:d}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(t,e.renderer),u=isNaN(n.layout.scrollOffset)?u:n.layout.scrollOffset},getItemsToRender:function(t){i=t.viewRect,l=c.getContentOverflow(i);var a=c.extent();u=Math.max(0,Math.min(u,l)),o=B({},i);var s="horizontal"===c.orientation()?"x":"y";return o[s]-=u,o["x"===s?"width":"height"]=a,function(e,t,n){for(var r=e.viewRect,i=n.itemized,o=n.create,a=void 0===o?Df:o,s=n.parallels,u=n.createSymbol,l=i.layout.direction,c=i.globalMetrics,f=i.items,d="horizontal"===i.layout.orientation,h=0,p=[],m=c.maxItemBounds.height,v=c.maxItemBounds.width,g=i.layout.margin.vertical+m,y=i.layout.margin.horizontal+v,b=t.x,x=t.y,w=r.x-t.x,M=0;M<f.length;M++){var k=a({y:x,x:"rtl"===l?r.x+w+r.width-v-(b-t.x):b,item:f[M],globalMetrics:c,direction:l,createSymbol:u});if((d&&b>=r.x-v||!d&&x>=r.y-m)&&p.push(k.item),++h>=s?(h=0,d?(b+=y,x=t.y):(x+=g,b=t.x)):d?x+=g:b+=y,!d&&x>r.y+r.height)break;if(d&&b>r.x+r.width)break}return p}(t,o,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:function(e,t){return r=function(e,t,n){var r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin[o],s=Math.ceil(a/e);if(null!=t){var u="horizontal"===n.layout.orientation?"height":"width",l="width"===u?"horizontal":"vertical",c=n.layout.margin[l]||4,f=Math.floor((t+c)/(c+n.globalMetrics.maxItemBounds[u]));s=Math.min(s,f)}var d=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,d))}(e,t,n)},hasContentOverflow:function(){var e="horizontal"===n.layout.orientation?"width":"height";return Of(n,r)>i[e]},getContentOverflow:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,Of(n,r)-e[t])},getNextSize:function(){var e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:function(){var e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:function(){return"horizontal"===c.orientation()?i.x+i.width<o.x+o.width:i.y+i.height<o.y+o.height},hasPrev:function(){return"horizontal"===c.orientation()?o.x<i.x:o.y<i.y},next:function(){c.scroll(-c.getNextSize())},prev:function(){c.scroll(c.getPrevSize())},scroll:function(e){var t=Math.max(0,Math.min(l,u-e));t!==u&&(u=t,s())},offset:function(){return u},orientation:function(){return n.layout.orientation},direction:function(){return n.layout.direction},extent:function(){return Of(n,r)},spread:function(){return function(e,t){var n=t,r="horizontal"===e.layout.orientation?"height":"width",i="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[i]}(n,r)}};return c}function _f(e){return Object.keys(e).filter((function(t){return e[t]})).join(" ")}var Af={up:"▲",right:"▶",down:"▼",left:"◀"};function If(e,t){var n=t.size,r=t.isActive,i=t.direction,o=t.nav,a={},s="",u=t.attrs;o&&o.button&&("function"==typeof o.button.class?a=o.button.class({direction:i}):o.button.class&&(a=o.button.class),"function"==typeof o.button.content&&(s=o.button.content(e,{direction:i})),void 0!==o.button.tabIndex&&(u.tabindex=o.button.tabIndex));var l={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(a).length||(l.border="0",l.background="none"),(!r||o&&o.disabled)&&(u.disabled="disabled"),e("button",B({class:_f(a),style:l},u),[s||e("span",{style:{pointerEvents:"none"}},[Af[i]])])}function Pf(e){var t,n={itemize:function(e){var n,r;r=(n=e).dock,t={layout:{orientation:"top"===r||"bottom"===r?"vertical":"horizontal"},navigation:n.navigation}},render:function(r){return function(e,t,n,r){var i=t.rect,o=t.itemRenderer;if(e&&e.renderArgs){e.size(i);var a=e.renderArgs[0],s="vertical"===n.layout.orientation,u="rtl"===o.direction(),l=o.hasNext(),c=o.hasPrev();if(c||l){var f=s?["right","left"]:["down","up"];u&&s&&f.reverse();var d=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:u&&!s?"rtl":"ltr"},[If(a,{size:32,isActive:l,direction:f[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),If(a,{size:32,isActive:c,direction:f[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(d)}else e.render([])}}(n.renderer,r,t,e)},extent:function(){return 32},spread:function(){return 64}};return n}function Lf(e){var t,n={itemize:function(n){t=function(e,t){var n=e.resolved;if(!1===n.title.item.show)return null;var r=B({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){var i=t.scale.data().fields;r.text=i&&i[0]?i[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:function(e){!function(e,t,n){var r=e.rect;if(t){var i=[];if(t.size(r),n){var o={start:0,end:r.width,middle:r.width/2};i.push(B({},n.displayObject,{x:o[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(i)}}(e,n.renderer,t)},spread:function(){return t?t.bounds.height:0},extent:function(){return t?t.bounds.width:0}};return n}function Rf(e,t,n,r){var i,o,a,s=r.itemRenderer,u=r.navigationRenderer,l=r.titleRenderer,c=r.isPreliminary,f=void 0!==c&&c,d=0,h={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:h.x,y:h.y,width:h.width,height:l.spread()},"horizontal"===n){i={x:h.x,y:h.y,width:l.extent(),height:l.spread()};var p=h.width-i.width-(i.width?t.spacing:0),m=h.height;s.parallelize(p,f?void 0:m);var v=s.extent()>p?u.extent():0,g=s.spread(),y=v?u.spread():0;a={x:(o={x:i.x+i.width+(i.width?t.spacing:0),y:h.y+Math.max(0,(y-g)/2),width:h.width-v-i.width-(v?t.spacing:0)-(i.width?t.spacing:0),height:m}).x+o.width+(v?t.spacing:0),y:h.y,width:v,height:h.height},i.y=o.y,"rtl"===s.direction()&&(a.x=h.x,o.x=a.x+a.width+(a.width?t.spacing:0),i.x=o.x+o.width+(i.width?t.spacing:0)),d=Math.max(i.height,y,s.spread())}else{var b=h.height-i.height-(i.height?t.spacing:0),x=h.width;s.parallelize(b,f?void 0:x);var w=s.extent()>b?u.extent():0;a={x:h.x,y:h.y+h.height-w,width:h.width,height:w},o={x:h.x,y:i.y+i.height+(i.height?t.spacing:0),width:h.width,height:h.height-i.height-(i.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},d=Math.max(l.extent(),w?u.spread():0,s.spread())}return o=B({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),a.x+=e.x,a.y+=e.y,i.x+=e.x,i.y+=e.y,{title:B({},e,i),content:B({},e,o),navigation:B({},e,a),orientation:n,preferredSize:d}}function jf(e){e.state.resolved=function(e){var t=e.scale.domain(),n={items:[]},r=e.settings.layout.dock;if("threshold-color"===e.scale.type){var i=e.scale.data().fields[0],o=function(e){return String(e)};e.settings.formatter?o=e.chart.formatter(e.settings.formatter):i&&(o=i.formatter());for(var a=0;a<t.length-1;a++){var s={value:t[a],label:"".concat(o(t[a])," - < ").concat(o(t[a+1]))};i&&(s.source={field:i.id()}),n.items.push(s)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{var u=e.scale.labels?e.scale.labels():null;n.items=t.map((function(t,n){var r=e.scale.datum?B({},e.scale.datum(t)):{value:t};return r.value=t,e.scale.label?r.label=e.scale.label(t):u&&(r.label=u[n]),r}))}var l=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:B(!0,{},Tf.title,e.style.title),settings:e.settings.settings.title}),c=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:Tf.layout,settings:e.settings.settings.layout}),f=e.resolver.resolve({data:n,defaults:B(!0,{},Tf.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),d=B(!0,{},(e.settings.settings.item||{}).shape);void 0===d.fill&&e.settings.scale&&(d.fill={scale:e.settings.scale});var h=e.resolver.resolve({data:n,defaults:B(!0,{},Tf.item.shape,e.style.item.shape),settings:d}),p=e.resolver.resolve({data:n,defaults:B(!0,{},{show:Tf.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function m(e,n){var r=e.data.value,i=t[n+1];e.data.value=[r,i]}return"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(p.items.reverse().forEach(m),p.items.reverse()):p.items.forEach(m)),{title:l,labels:f,symbols:h,items:p,layout:c}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function zf(e){var t=e.rect,n=e.settings,r=e.state,i=e.itemRenderer,o=e.navigationRenderer,a=e.titleRenderer,s=n.layout.dock,u="top"===s||"bottom"===s?"horizontal":"vertical",l=Rf(t,r.display,u,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(l.content);var c=i.getItemsToRender({viewRect:B({},l.content,{x:0,y:0})});return o.render({rect:l.navigation,itemRenderer:i}),a.render({rect:l.title}),e.state.views={layout:l},c}var Ff={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted:function(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount:function(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart:function(){this.state.interaction.started||this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove:function(e){if(this.state.interaction.started){var t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t}},panend:function(){this.state.interaction.started=!1},scroll:function(e){this.itemRenderer.scroll(-e)},next:function(){this.itemRenderer.next()},prev:function(){this.itemRenderer.prev()}},created:function(){var e=this;this.state={interaction:{}},this.onScroll=function(){var t=zf(e);e.update(t)},this.itemRenderer=Nf(this,{onScroll:this.onScroll}),this.navigationRenderer=Pf(this),this.titleRenderer=Lf(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),jf(this)},preferredSize:function(e){return function(e,t){var n=0,r=e.settings.layout.dock||"center",i="top"===r||"bottom"===r?"horizontal":"vertical",o=e.state.display,a=Rf(t.inner,o,i,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=a.preferredSize,n+o.spacing}(this,e)},beforeUpdate:function(){jf(this)},render:function(){return zf(this)},beforeDestroy:function(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements:function(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo:function(){return{offset:this.itemRenderer.offset()}}};function Bf(e,t){var n=0,r=e.state.isVertical?"justify":"align",i=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[i]+=n}function Vf(e,t,n){var r=n[e];return"object"===H(r)?-1!==r.valid.indexOf(t)?t:r.default:n.default}function Hf(e){return Vf(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function Uf(e,t){var n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function Wf(e){var t,n="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,r=e.stgns.title,i=e.chart.scale(e.stgns.fill),o=e.chart.scale(e.stgns.major),a=function(e,t){var n=t.domain(),r=n,i=e.stgns.tick.label;return!i&&e.formatter?i=e.formatter:!i&&t.data().fields&&(i=t.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String)),n.map((function(n,i){var o=r[i];return{value:n,label:o,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:o,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}}))}(e,o),s=Vf((t=e.settings).layout.dock,t.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});if(void 0===r.text){var u=o.data().fields;r.text=u&&u[0]?u[0].title():""}var l=e.renderer.measureText({text:r.text,fontSize:r.fontSize,fontFamily:r.fontFamily}),c=e.renderer.textBounds({text:r.text,fontSize:r.fontSize,fontFamily:r.fontFamily,maxLines:r.maxLines,maxWidth:r.maxLengthPx,wordBreak:r.wordBreak,hyphens:r.hyphens,lineHeight:r.lineHeight}),f={isVertical:n,nodes:[],title:{anchor:Hf(e.settings),textMetrics:l,textBounds:c,requiredWidth:function(){if(!r.show)return 0;var e=c.width,t=r.maxLengthPx;return n||(e+=r.padding,t+=r.padding),Math.min(e,t,f.rect.width)},requiredHeight:function(){if(!r.show)return 0;var e=c.height;return n&&(e+=r.padding),Math.min(e,f.rect.height)}},ticks:{values:a,anchor:s,length:Math.min(Math.max.apply(Math,ae(a.map((function(e){return e.textMetrics.width})))),e.stgns.tick.maxLengthPx),requiredHeight:function(){return"top"===s?Math.max.apply(Math,ae(f.ticks.values.map((function(e){return e.textMetrics.height}))))+e.stgns.tick.padding:0},height:Math.max.apply(Math,ae(a.map((function(e){return e.textMetrics.height}))))},legend:{fillScale:i,majorScale:o,length:function(){var t=n?"height":"width",r=n?"requiredHeight":"requiredWidth",i=Math.min(f.rect[t],f.rect[t]*e.stgns.length)-f.title[r]();return Math.max(0,Math.min(i,e.stgns.maxLengthPx))}}};return f}var Yf={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize:function(e){var t=this.state;t.rect=Uf(this,e.inner);var n=this.stgns.size,r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;var i=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){if(t.ticks.values.reduce((function(e,t){return e+t.textMetrics.height}),0)>this.state.legend.length())return i;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return i;n+=Math.max.apply(Math,ae(t.ticks.values.map((function(e){return e.textMetrics.height}))))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created:function(){this.stgns=this.settings.settings,this.state=Wf(this)},beforeUpdate:function(e){this.stgns=e.settings.settings,this.state=Wf(this)},beforeRender:function(e){if(this.state.nodes=[],this.state.rect=Uf(this,e.size),this.stgns.title.show){var t=function(e){var t=e.state,n=e.stgns,r="left"===t.ticks.anchor,i="top"===t.ticks.anchor,o=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");var u={tag:"legend-title",type:"text",x:o,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return Bf(e,u),u}(this);this.state.nodes.push(t)}var n,r,i,o=function(e,t){var n=e.state,r=e.stgns,i=n.rect,o=i.x,a=i.y,s=n.isVertical?r.size:n.legend.length(),u=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?o+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());var l={type:"rect",x:o,y:a,width:s,height:u,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return Bf(e,l),l}(this,(r=(n=this).state.legend.fillScale,i=n.state.legend.majorScale,r.domain().map((function(e){return{type:"stop",color:r(e),offset:Math.min(1,Math.max(0,i.norm(e)))}})).sort((function(e,t){return e.offset-t.offset})))),a={id:"legend-seq-target",type:"container",children:[o,function(e,t){var n=e.state,r=e.stgns,i="start",o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map((function(a){var s=0,u=0,l=0,c="alphabetical";return n.isVertical?(u=t.y+t.height*a.pos,c=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,i="end"):"top"===n.ticks.anchor?(u=t.y-r.tick.padding,l-=.25*a.textMetrics.height,i=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(u=t.y+t.height+r.tick.padding,l=.8*a.textMetrics.height,i=0===a.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:s,y:u,dx:0,dy:l,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:i,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:c}}));return{type:"container",id:"legend-seq-ticks",children:[].concat(ae(a),[o])}}(this,o)]};this.state.nodes.push(a)},render:function(){return this.state.nodes}};var Kf={step:function(e){return new gt(e,.5)},stepAfter:function(e){return new gt(e,1)},stepBefore:function(e){return new gt(e,0)},linear:$e,basis:function(e){return new nt(e)},cardinal:ot.tension(0),catmullRom:st,monotonex:function(e){return new dt(e)},monotoney:function(e){return new ht(e)},natural:function(e){return new mt(e)}},$f={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},connect:!1,orientation:"horizontal",layers:{curve:"linear",show:!0,sort:void 0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function Gf(e,t){var n=t.generator,r=t.item,i=t.data,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=n(e),s={type:"path",d:a,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:o||r.fill,data:i};return r.strokeDasharray&&(s.strokeDasharray=r.strokeDasharray),s}function Xf(e){var t=function(e){for(var t=e.data,n=e.stngs,r=e.rect,i=e.resolver,o=e.style,a=e.domain,s=r.width,u=r.height,l=i.resolve({data:t,defaults:$f.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?u:s,minor:"vertical"===n.orientation?s:u}}),c=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"===H(n.coordinates.layerId)),f={},d=0,h=0;h<l.items.length;h++){var p=l.items[h],m=p.layerId;if(c){var v=f[m]?f[m].items[f[m].items.length-1]:null,g=v?a.indexOf(v.data.major?v.data.major.value:v.data.value):null;v&&a.indexOf(p.data.major?p.data.major.value:p.data.value)-1!==g&&f[m].items.push({dummy:!0})}f[m]=f[m]||{order:d++,id:m,items:[],dataItems:[],consumableData:{}},f[m].dataItems.push(p.data),f[m].items.push(p)}var y=Object.keys(f).map((function(e){return f[e].consumableData=G({points:f[e].dataItems},f[e].dataItems[0]),f[e]})),b={items:y.map((function(e){return e.consumableData}))},x=n.layers||{};return{coordinates:l,metaLayers:y,layers:i.resolve({data:b,defaults:{curve:$f.layers.curve,show:$f.layers.show},settings:{curve:x.curve,show:x.show}}),lines:i.resolve({data:b,defaults:B({},$f.layers.line,o.line),settings:x.line}),areas:i.resolve({data:b,defaults:B({},$f.layers.area,o.area),settings:x.area})}}(e),n=t.metaLayers,r=t.coordinates,i=t.layers,o=t.lines,a=t.areas,s=[];return n.forEach((function(t,n){var u=i.items[n];if(!1!==u.show){u.datum=u.data,u.data=[],u.id=t.id;for(var l,c,f=[],d=[],h=0;h<t.items.length;h++){if(c=(l=t.items[h]).data,!l.dummy){if(isNaN(l.major))continue;e.missingMinor0&&(l.minor0=r.settings.minor.scale?r.settings.minor.scale(c.minor0?c.minor0.value:0):0),isNaN(l.minor)||f.push(l.minor),u.data.push(l.data)}d.push(l)}var p=f.sort((function(e,t){return e-t}))[Math.floor((f.length-1)/2)];s.push({layerObj:u,lineObj:o.items[n],areaObj:a.items[n],median:p,points:d,consumableData:t.consumableData})}})),s}var Jf={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created:function(){},render:function(e){var t=e.data,n=this.rect,r=n.width,i=n.height;this.stngs=this.settings.settings||{};var o=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,a=Xf({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:o,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){var s=a.map((function(e){return{id:e.layerObj.id,data:e.layerObj.data}})).sort(this.stngs.layers.sort).map((function(e){return e.id}));a.sort((function(e,t){return s.indexOf(e.layerObj.id)-s.indexOf(t.layerObj.id)}))}else a.sort((function(e,t){return e.median-t.median}));return function(e,t){var n=t.width,r=t.height,i=t.missingMinor0,o=t.stngs,a=[],s=o.layers||{};return e.forEach((function(e){var t,u,l=e.lineObj,c=e.layerObj,f=e.areaObj,d=e.points,h=Je(),p=o.coordinates?o.coordinates.defined:null,m={size:r,p:"y"},v={size:n,p:"x"};if("vertical"===o.orientation){var g=B(!0,{},v);v=B(!0,{},m),m=B(!0,{},g)}h[v.p]((function(e){return e.major*v.size}))["".concat(m.p,"1")]((function(e){return e.minor*m.size}))["".concat(m.p,"0")]((function(e){return e.minor0*m.size})).curve(Kf["monotone"===c.curve?"monotone".concat(v.p):c.curve]),p?h.defined((function(e){return!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined})):h.defined((function(e){return!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)}));var y=o.connect?d.filter(h.defined()):d;t=h["line".concat(m.p.toUpperCase(),"1")](),u=h["line".concat(m.p.toUpperCase(),"0")](),s.area&&!1!==f.show&&a.push(Gf(y,{data:e.consumableData,item:f,generator:h})),l&&!1!==l.show&&(a.push(Gf(y,{data:e.consumableData,item:l,generator:t},"none")),!i&&s.area&&!1!==f.show&&!1!==l.showMinor0&&a.push(Gf(y,{data:e.consumableData,item:l,generator:u},"none")))})),a}(a,{width:r,height:i,missingMinor0:o,stngs:this.stngs})}};function Qf(e,t){var n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"===H(t.center)?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);var o=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:i?Math.max(0,Math.min(o,e.rect.width)):o,y:i?Math.max(0,Math.min(a,e.rect.height)):a}}function Zf(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function ed(e,t){var n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}var td={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart:function(e){this.start(e)},areaMove:function(e){this.move(e)},areaEnd:function(e){this.end(e)},areaCancel:function(){this.cancel()}},created:function(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:function(){return 0},render:function(){},start:function(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();var t=Qf(this,e,!1);Ss({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map((function(e){return{key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"}})),this.state.start=Qf(this,e),this.state.active=!0)},move:function(e){var t;this.state.active&&(this.state.end=Qf(this,e),function(e){if(e.state.active){var t=Zf(e,e.state.start),n=Zf(e,e.state.end),r=e.chart.shapesAt(ed(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([B({type:"rect"},ed(t.state.start,t.state.end),t.style.area)]))},end:function(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel:function(){this.state.active&&(!function(e,t){e.brushConfig.forEach((function(e){Array.isArray(e.contexts)&&e.contexts.forEach((function(e){t.brush(e).end()}))}))}(this.state,this.chart),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function nd(e,t,n){var r=n.renderer,i=n.style,o=n.props,a=n.h,s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(o,t),u=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,i,o),l=a("div",{dir:o.direction,class:_f(B({"pic-tooltip":!0},s.tooltip)),style:B({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:_f(B({"pic-tooltip-content":!0},s.content))},u),a("div",{class:_f(B({"pic-tooltip-arrow":!0},s.arrow)),style:B({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(l),r.element().children[0]}function rd(e){var t=e.defaultDuration,n=e.defaultDelay,r=null,i=null,o=!1,a=function(){var e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};return e.set=function(e){t[e].forEach((function(t){return t(e)}))},e.on=function(e,n){Array.isArray(e)?e.forEach((function(e){return t[e].push(n)})):t[e].push(n)},e.destroy=function(){Object.keys(t).forEach((function(e){t[e].length=0}))},e}(),s=function(){},u=function(){r=null,i=null,o=!1,a.set("fulfilled")};return s.invoke=function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((function(){e(),o=!0,r=null,a.set("active")}),l),s>0&&(i&&clearTimeout(i),i=setTimeout(u,s+Math.max(l,0)))},s.clear=function(){o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),i&&clearTimeout(i),r=null,i=null,o=!1},s.on=function(e,t){a.on(e,t)},s.destroy=function(){s.clear(),a.destroy()},s}function id(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)")}}function od(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n}}}function ad(e){return{left:{left:"100%",top:"calc(50% - ".concat(e,"px)"),borderWidth:"".concat(e,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% - ".concat(e,"px)"),borderWidth:"".concat(e,"px")},top:{left:"calc(50% - ".concat(e,"px)"),top:"100%",borderWidth:"".concat(e,"px")},bottom:{left:"calc(50% - ".concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(e,"px")}}}function sd(e,t,n,r,i,o){var a=t+o.x,s=n+o.y,u=i;return!(a<0||s<0)&&!(a+r>e.width||s+u>e.height)}function ud(e){var t=e.area,n=e.vx,r=e.vy,i=e.width,o=e.height,a=e.offset,s=n+a.x,u=r+a.y,l=i,c=o,f=s<0?-s:0,d=u<0?-u:0;return{x:f+=s+l>t.width?-(s+l-t.width):0,y:d+=u+c>t.height?-(u+c-t.height):0}}function ld(e){var t=e.options,n=e.pointer,r=e.width,i=e.height,o=e.dockOrder,a=e.x,s=e.y,u=n.targetBounds,l=id(t.offset),c=l[t.dock];if(c)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c},computedArrowStyle:ad(t.offset)[t.dock],dock:t.dock};for(var f={width:"target"===t.area?u.width:window.innerWidth,height:"target"===t.area?u.height:window.innerHeight},d=od(r,i,t.offset),h=[],p="target"===t.area?a:u.left+a,m="target"===t.area?s:u.top+s,v=0;v<o.length;v+=1){var g=o[v],y=ud({area:f,vx:p,vy:m,width:r,height:i,offset:d[g]}),b={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:l[g]},x=ad(t.offset)[g];0!==y.x&&(b.width="".concat(r-20-Math.abs(y.x),"px"),"top"!==g&&"bottom"!==g||(b.left="".concat(a+y.x,"px"),x.left="calc(50% ".concat(y.x>0?"-":"+"," ").concat(Math.abs(y.x),"px)")));var w={computedTooltipStyle:b,computedArrowStyle:x,dock:g,rect:{width:r,height:i}};if(0===y.x&&0===y.y)return w;w.offset=y,h.push(w)}return h.sort((function(e,t){return Math.abs(e.offset.x)-Math.abs(t.offset.x)})),h[0]}function cd(e,t,n){var r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};var i=r.rect;return B({scaleRatio:i.scaleRatio},i.computedInner)}var fd,dd={bounds:function(e){var t=e.resources,n=e.nodes,r=e.pointer,i=e.width,o=e.height,a=e.options,s=r.targetBounds,u=t.getNodeBoundsRelativeToTarget(n[0]),l=u.x,c=u.y,f=u.width,d=u.height,h={left:{x:l,y:c+d/2},right:{x:l+f,y:c+d/2},top:{x:l+f/2,y:c},bottom:{x:l+f/2,y:c+d}},p=id(a.offset),m=p[a.dock];if(m)return{computedTooltipStyle:{left:"".concat(h[a.dock].x,"px"),top:"".concat(h[a.dock].y,"px"),transform:m},computedArrowStyle:ad(a.offset)[a.dock],dock:a.dock};for(var v={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},g=od(i,o,a.offset),y=["top","left","right","bottom"],b=0;b<y.length;b+=1){var x=y[b];if(sd(v,"target"===a.area?h[x].x:s.left+h[x].x,"target"===a.area?h[x].y:s.top+h[x].y,i,o,g[x]))return{computedTooltipStyle:{left:"".concat(h[x].x,"px"),top:"".concat(h[x].y,"px"),transform:p[x]},computedArrowStyle:ad(a.offset)[x],dock:x}}return{computedTooltipStyle:{left:"".concat(h.top.x,"px"),top:"".concat(h.top.y,"px"),transform:p.top},computedArrowStyle:ad(a.offset).top,dock:"top"}},pointer:function(e){var t=e.options,n=e.pointer,r=e.width,i=e.height;return ld({x:n.x,y:n.y,pointer:n,width:r,height:i,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){var t=e.options,n=e.pointer,r=e.width,i=e.height,o=e.nodes,a=e.resources,s=o[0],u=n.dx,l=n.dy,c=a.getComponentBoundsFromNode(s),f=u+c.x+c.width/2,d=l+c.y+c.height/2,h=s.desc.slice,p=h.start,m=h.end,v=h.outerRadius,g=(p+m)/2-Math.PI/2,y=2*Math.PI,b=(g%y+y)%y,x=["top","left","right","bottom"];return"auto"===t.dock&&(x=b<=Math.PI/4||b>=7*Math.PI/4?["right","top","bottom","left"]:b<=3*Math.PI/4?["bottom","left","right","top"]:b<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),ld({x:f+v*c.scaleRatio.x*Math.cos(b),y:d+v*c.scaleRatio.y*Math.sin(b),pointer:n,width:r,height:i,options:t,dockOrder:x})}};function hd(e,t){var n=e.width,r=e.height,i=t.chart,o=t.state,a=t.props,s={resources:{formatter:i.formatter,scale:i.scale,component:i.component,getComponentBoundsFromNode:function(e){return cd(e,o.pointer,i)},getNodeBoundsRelativeToTarget:function(e){return function(e,t,n){var r=cd(e,t,n),i=e.bounds;return{x:r.x+t.dx+i.x,y:r.y+t.dy+i.y,width:i.width,height:i.height}}(e,o.pointer,i)}},nodes:o.activeNodes,pointer:o.pointer,width:n,height:r},u=H(a.placement);if("object"===u&&"function"==typeof a.placement.fn)return a.placement.fn(s);var l={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===u&&(l=B(l,a.placement(s))),"object"===u&&dd[a.placement.type]?l=B(l,a.placement):"string"===u&&dd[a.placement]&&(l=B(l,{type:a.placement})),s.options=l;var c=dd[l.type](s),f=s.resources.getComponentBoundsFromNode(s.nodes[0]),d=f.x,h=f.y,p=f.width,m=f.height;return p+=d+=s.pointer.dx,m+=h+=s.pointer.dy,c.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(c.computedTooltipStyle.left)),p),"px"),c.computedTooltipStyle.top="".concat(Math.min(Math.max(0,h,parseFloat(c.computedTooltipStyle.top)),m),"px"),c}function pd(){fd=null}function md(e,t){var n=t.chart,r=t.state,i=0,o=0;e.center?(i+=e.center.x,o+=e.center.y):(i+=e.clientX,o+=e.clientY);var a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),u=i,l=o,c=a.left-s.left,f=a.top-s.top,d=i-a.left,h=o-a.top;return{x:i-=s.left,y:o-=s.top,dx:c,dy:f,cx:d,cy:h,clientX:u,clientY:l,targetBounds:s,chartBounds:a}}var vd={require:["chart","renderer"],defaultSettings:{settings:{duration:8e3,delay:500,filter:function(e){return e.filter((function(e){return e.data&&void 0!==e.data.value}))},extract:function(e){return e.node.data.value},content:function(e){var t=e.h;return e.data.map((function(e){return t("div",{},e)}))},isEqual:function(e,t){return e.length&&e.length===t.length&&e.every((function(e,n){return t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data)}))},placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0},style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide:function(){this.hide()},show:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent:function(e){this.prevent(e)}},hide:function(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show:function(e){var t,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.nodes,o=r.duration,a=r.delay;!this.state.prevent&&this.state.targetElement&&(this.state.pointer=md(e,this),t=Array.isArray(i)?this.props.filter(i):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke((function(){return n.invokeRenderer(n.state.activeNodes)}),o,a)))},prevent:function(e){this.state.prevent=!!e},init:function(e){var t=this;this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=rd({defaultDuration:this.props.duration,defaultDelay:this.props.delay});var n=this.dispatcher.clear;this.dispatcher.on("pending",(function(){!function(e){fd&&fd!==e&&fd()}(n),fd=n,"function"==typeof t.props.beforeShow&&t.props.beforeShow.call(void 0,{resources:{formatter:t.chart.formatter,scale:t.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(function(){var e={resources:{formatter:t.chart.formatter,scale:t.chart.scale}};"function"==typeof t.props.beforeHide&&t.props.beforeHide.call(void 0,B({element:t.state.tooltipElm},e)),"function"==typeof t.props.onHide?t.props.onHide.call(void 0,B({element:t.state.tooltipElm},e)):t.renderer.clear([]),"function"==typeof t.props.afterHide&&t.props.afterHide.call(void 0,e),fd===n&&(fd=null),t.state.tooltipElm=void 0})),this.dispatcher.on("active",(function(){"function"==typeof t.props.afterShow&&t.props.afterShow.call(void 0,{element:t.state.tooltipElm,resources:{formatter:t.chart.formatter,scale:t.chart.scale}})}))},created:function(){this.init(this.settings)},beforeUpdate:function(e){var t=e.settings;this.dispatcher&&(this.dispatcher.destroy(),pd()),this.init(t)},render:function(e){return this.h=e,[]},beforeDestroy:function(){this.dispatcher.destroy(),pd()},appendTo:function(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;var e=this.state.targetElement.getBoundingClientRect(),t=e.width,n=e.height;this.renderer.destroy(),this.renderer.size({width:t,height:n}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted:function(){this.appendTo()},updated:function(){this.appendTo()},invokeRenderer:function(e){var t=function(e,t){var n=t.chart,r=t.scale,i=t.props,o=t.h,a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:o},s=[];return e.forEach((function(e){if("function"==typeof i.extract){var t=B({node:e},a);s.push(i.extract(t))}})),s}(e,this),n=hd(nd(t,{style:{left:"0px",top:"0px",visibility:"hidden"}},this).getBoundingClientRect(),this);this.state.tooltipElm=nd(t,n,this)}};var gd={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update:function(){this.draw()}},draw:function(){var e=this,t=this.chart.findShapes(this.props.selector).filter((function(t){return t.key===e.props.target})).filter((function(e){return e.collider})).map((function(e){return e.collider}));t.forEach((function(t){t.fill=e.props.fill,t.stroke=e.props.stroke,t.opacity=e.props.opacity,t.collider={type:null}})),this.renderer.render(t)},created:function(){this.props=this.settings.settings},resize:function(e){var t=e.outer,n=e.inner;return this.props.useOuterRect?t:n},render:function(){},mounted:function(){this.draw()},updated:function(){this.props=this.settings.settings,this.draw()}},yd=2*Math.PI;function bd(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}function xd(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function wd(e,t,n,r,i){var o=1-e;return Math.pow(o,3)*t+3*Math.pow(o,2)*e*n+3*o*Math.pow(e,2)*r+Math.pow(e,3)*i}function Md(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||bd(e,t,n,r)<=10)return i[i.length-1]!==e&&i.push(e),i.push(r),i;var a=.5,s=xd(e,t),u=xd(t,n),l=xd(n,r),c={x:wd(a,e.x,t.x,n.x,r.x),y:wd(a,e.y,t.y,n.y,r.y)},f=xd(s,u),d=xd(u,l);return Md(e,s,f,c,i,o-1),Md(c,d,l,r,i,o-1),i}function kd(e,t,n){var r=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return Md(e,r.cp1,r.cp2,n)}function Sd(e,t,n){var r,i,o,a,s=[],u=!!e[4],l=!!e[5],c=e[3],f=e[6],d=e[7],h=e[1],p=e[2];if("a"===e[0]&&(f+=t,d+=n),t===d&&n===d)return s;if(!h||!p)return s.push({x:f,y:d}),s;var m=function(e,t,n,r,i,o,a,s,u){var l,c,f,d,h,p,m=za(n%360),v=Math.cos(m),g=Math.sin(m),y=(s-o)/2,b=(u-a)/2,x=v*y+g*b,w=v*b-g*y;e=Math.abs(e),t=Math.abs(t),(p=Math.pow(x,2)/Math.pow(e,2)+Math.pow(w,2)/Math.pow(t,2))>1&&(e*=p=Math.sqrt(p),t*=p);var M=e*t,k=e*w,S=t*x,C=Math.pow(k,2)+Math.pow(S,2),q=Math.pow(M,2)-C,E=Math.sqrt(Math.max(q/C,0));r===i&&(E=-E);var T=E*(k/t),D=E*(-S/e);d=v*T-g*D+(s+o)/2,h=g*T+v*D+(u+a)/2;var O=(x-T)/e,N=(w-D)/t,_=(-x-T)/e,A=(-w-D)/t;return l=Math.atan2(N,O),l+=l<0?yd:0,c=Math.atan2(A,_),f=(c+=c<0?yd:0)-l,!i&&l<c?f-=yd:i&&c<l&&(f+=yd),{startAngle:l,sweepAngle:f%=yd,cx:d,cy:h,rx:e,ry:t}}(h,p,c,u,l,f,d,t,n);r=m.cx,i=m.cy,h=m.rx,p=m.ry,o=m.sweepAngle,a=m.startAngle;for(var v=Math.abs(o*Math.sqrt((Math.pow(h,2)+Math.pow(p,2))/2)),g=Math.ceil(v/10),y=o/g,b=1;b<=g;b++){var x=(a+y*b)%yd,w=Math.cos(x),M=Math.sin(x);s.push({x:r+w*h+-M*w,y:i+M*p+w*M})}return s}function Cd(e){for(var t=_.parsePath(e),n=[],r=[],i=0,o=0,a=null,s=null,u=null,l=null,c=0;c<t.length;++c){var f=t[c],d=f[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(u=null,l=null),d){case"m":r.length&&n.push(r.splice(0));case"l":i+=f[1],o+=f[2],r.push({x:i,y:o});break;case"M":r.length&&n.push(r.splice(0));case"L":i=f[1],o=f[2],r.push({x:i,y:o});break;case"H":i=f[1],r.push({x:i,y:o});break;case"h":i+=f[1],r.push({x:i,y:o});break;case"V":o=f[1],r.push({x:i,y:o});break;case"v":o+=f[1],r.push({x:i,y:o});break;case"a":r.push.apply(r,ae(Sd(f,i,o))),i+=f[6],o+=f[7];break;case"A":r.push.apply(r,ae(Sd(f,i,o))),i=f[6],o=f[7];break;case"c":r.push.apply(r,ae(Md({x:i,y:o},{x:f[1]+i,y:f[2]+o},{x:f[3]+i,y:f[4]+o},{x:f[5]+i,y:f[6]+o}))),a=f[3]+i,s=f[4]+o,i+=f[5],o+=f[6];break;case"C":r.push.apply(r,ae(Md({x:i,y:o},{x:f[1],y:f[2]},{x:f[3],y:f[4]},{x:f[5],y:f[6]}))),a=f[3],s=f[4],i=f[5],o=f[6];break;case"s":null!==a&&null!==a||(a=i,s=o),r.push.apply(r,ae(Md({x:i,y:o},{x:2*i-a,y:2*o-s},{x:f[1]+i,y:f[2]+o},{x:f[3]+i,y:f[4]+o}))),a=f[1]+i,s=f[2]+o,i+=f[3],o+=f[4];break;case"S":null!==a&&null!==a||(a=i,s=o),r.push.apply(r,ae(Md({x:i,y:o},{x:2*i-a,y:2*o-s},{x:f[1],y:f[2]},{x:f[3],y:f[4]}))),a=f[1],s=f[2],i=f[3],o=f[4];break;case"Q":r.push.apply(r,ae(kd({x:i,y:o},{x:f[1],y:f[2]},{x:f[3],y:f[4]}))),u=f[1],l=f[2],i=f[3],o=f[4];break;case"q":r.push.apply(r,ae(kd({x:i,y:o},{x:f[1]+i,y:f[2]+o},{x:f[3]+i,y:f[4]+o}))),u=f[1]+i,l=f[2]+o,i+=f[3],o+=f[4];break;case"T":null!==u&&null!==u||(u=i,l=o),u=2*i-u,l=2*o-l,r.push.apply(r,ae(kd({x:i,y:o},{x:u,y:l},{x:f[1],y:f[2]}))),i=f[1],o=f[2];break;case"t":null!==u&&null!==u||(u=i,l=o),u=2*i-u,l=2*o-l,r.push.apply(r,ae(kd({x:i,y:o},{x:u,y:l},{x:f[1]+i,y:f[2]+o}))),i+=f[1],o+=f[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}var qd={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update:function(){this.draw()}},draw:function(){var e=this,t=this.chart.findShapes("path").filter((function(t){return t.key===e.props.target})),n=[];t.forEach((function(t){Cd(t.attrs.d).forEach((function(t){t.forEach((function(t){n.push({type:"circle",cx:t.x,cy:t.y,r:e.props.radius,fill:e.props.fill,stroke:e.props.stroke,opacity:e.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(n)},created:function(){this.props=this.settings.settings},resize:function(e){var t=e.outer,n=e.inner;return this.props.useOuterRect?t:n},render:function(){},mounted:function(){this.draw()},updated:function(){this.props=this.settings.settings,this.draw()}};var Ed=[function(e){e.component("box",Ru),e.component("box-marker",Ru)},function(e){e.component("point",Uu),e.component("point-marker",Uu)},function(e){e.component("pie",$u)},function(e){e.component("grid-line",Zu)},function(e){e.component("ref-line",al)},function(e){e.component("axis",Tl)},function(e){e.component("container",Dl)},function(e){e.component("text",_l)},function(e){e.component("scrollbar",Pl)},function(e){e.component("brush-range",Xl),e.component("brush-area-dir",Zl)},function(e){e.component("range",rc)},function(e){e.component("brush-lasso",lc)},function(e){e.component("labels",Ef)},function(e){e.component("legend-cat",Ff)},function(e){e.component("legend-seq",Yf)},function(e){e.component("line",Jf)},function(e){e.component("brush-area",td)},function(e){e.component("tooltip",vd)},function(e){e.component("debug-collider",gd)},function(e){e.component("debug-path-to-points",qd)}],Td=function(){function e(t){U(this,e),this._parent=null,this._children=[],this._ancestors=null,this.type=t,this.data=null}return Y(e,[{key:"detach",value:function(){return this._parent&&this._parent.removeChild(this),this}},{key:"parent",get:function(){return this._parent}},{key:"isBranch",get:function(){return this._children&&this._children.length}},{key:"children",get:function(){return this._children}},{key:"ancestors",get:function(){var e;this._ancestors||(this._ancestors=[],this.parent&&(e=this._ancestors).push.apply(e,[this.parent].concat(ae(this.parent.ancestors))));return this._ancestors}},{key:"descendants",get:function(){var e,t,n=[],r=this.children.length;for(e=0;e<r;e++)t=this.children[e],n.push(t),t.children.length&&n.push.apply(n,ae(t.descendants));return n}},{key:"equals",value:function(e){var t=this.children,n=e.children;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(!t[r].equals(n[r]))return!1;return!0}},{key:"toJSON",value:function(){return{type:this.type,children:this.children.map((function(e){return e.toJSON()}))}}}]),e}(),Dd=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.x,r=void 0===n?0:n,i=t.y,o=void 0===i?0:i,a=t.width,s=void 0===a?0:a,u=t.height,l=void 0===u?0:u,c=t.minWidth,f=void 0===c?0:c,d=t.minHeight,h=void 0===d?0:d;U(this,e),this.set({x:r,y:o,width:s,height:l,minWidth:f,minHeight:h})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,u=void 0===s?0:s,l=e.minWidth,c=void 0===l?0:l,f=e.minHeight,d=void 0===f?0:f;this.type="rect",a>=0?(this.x=n,this.width=Math.max(a,c)):(this.x=n+Math.min(a,-c),this.width=-Math.min(a,-c)),u>=0?(this.y=i,this.height=Math.max(u,d)):(this.y=i+Math.min(u,-d),this.height=-Math.min(u,-d))}},{key:"containsPoint",value:function(e){return Ss(this,e)}},{key:"intersectsLine",value:function(e){return Cs(this,ve(e))}},{key:"intersectsRect",value:function(e){return Ms(this,me(e))}},{key:"intersectsCircle",value:function(e){return vs(e,this)}},{key:"intersectsPolygon",value:function(e){return ws(e,this)}},{key:"intersectsGeoPolygon",value:function(e){return As(e,this)}},{key:"points",value:function(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}]),e}();var Od=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.cx,r=void 0===n?0:n,i=t.cy,o=void 0===i?0:i,a=t.r,s=void 0===a?0:a,u=t.minRadius,l=void 0===u?0:u;U(this,e),this.set({cx:r,cy:o,r:s,minRadius:l})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,n=void 0===t?0:t,r=e.cy,i=void 0===r?0:r,o=e.r,a=void 0===o?0:o,s=e.minRadius,u=void 0===s?0:s;this.type="circle",this.cx=n,this.cy=i,this.r=Math.max(a,u),this.vector={x:this.cx,y:this.cy}}},{key:"containsPoint",value:function(e){return ms(this,e)}},{key:"intersectsLine",value:function(e){return gs(this,ve(e))}},{key:"intersectsRect",value:function(e){return vs(this,me(e))}},{key:"intersectsCircle",value:function(e){return function(e,t){if(fs(e)||fs(t))return!1;var n=e.cx-t.cx,r=e.cy-t.cy;return Math.pow(n,2)+Math.pow(r,2)<=Math.pow(e.r+t.r,2)}(this,e)}},{key:"intersectsPolygon",value:function(e){return ys(this,e)}},{key:"intersectsGeoPolygon",value:function(e){return Os(this,e)}},{key:"points",value:function(){return[{x:this.cx,y:this.cy}]}}]),e}();var Nd=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.x1,r=void 0===n?0:n,i=t.y1,o=void 0===i?0:i,a=t.x2,s=void 0===a?0:a,u=t.y2,l=void 0===u?0:u,c=t.tolerance,f=void 0===c?0:c;U(this,e),this.set({x1:r,y1:o,x2:s,y2:l,tolerance:f})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x1,n=void 0===t?0:t,r=e.y1,i=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,s=e.y2,u=void 0===s?0:s,l=e.tolerance,c=void 0===l?0:l;this.type="line",this.x1=n,this.y1=i,this.x2=a,this.y2=u,this.tolerance=Math.max(0,Math.round(c)),this.vectors=this.points(),this.zeroSize=n===a&&i===u}},{key:"containsPoint",value:function(e){return this.tolerance>0?gs({cx:e.x,cy:e.y,r:this.tolerance},this):Es(this,e)}},{key:"intersectsLine",value:function(e){return qs(this,ve(e))}},{key:"intersectsRect",value:function(e){return Cs(me(e),this)}},{key:"intersectsCircle",value:function(e){return gs(e,this)}},{key:"intersectsPolygon",value:function(e){return xs(e,this)}},{key:"intersectsGeoPolygon",value:function(e){return _s(e,this)}},{key:"points",value:function(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}]),e}();function _d(e){var t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function Ad(e){for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}var Id=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.vertices,r=void 0===n?[]:n;U(this,e),this.set({vertices:r})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.vertices,n=void 0===t?[]:t;if(this.type="polygon",this.vertices=n.slice(),this.edges=[],Ad(this.vertices),!(this.vertices.length<=2)){_d(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(var r=0;r<this.vertices.length;r++)r<this.vertices.length-1&&this.edges.push([this.vertices[r],this.vertices[r+1]]),this.xMin=isNaN(this.xMin)?this.vertices[r].x:Math.min(this.xMin,this.vertices[r].x),this.xMax=isNaN(this.xMax)?this.vertices[r].x:Math.max(this.xMax,this.vertices[r].x),this.yMin=isNaN(this.yMin)?this.vertices[r].y:Math.min(this.yMin,this.vertices[r].y),this.yMax=isNaN(this.yMax)?this.vertices[r].y:Math.max(this.yMax,this.vertices[r].y);this._bounds=null,this._boundingRect=null}}},{key:"containsPoint",value:function(e){return bs(this,e)}},{key:"intersectsCircle",value:function(e){return ys(e,this)}},{key:"intersectsLine",value:function(e){return xs(this,ve(e))}},{key:"intersectsRect",value:function(e){return ws(this,me(e))}},{key:"intersectsPolygon",value:function(e){return Ts(this,e)}},{key:"intersectsGeoPolygon",value:function(e){return Ds(e,this)}},{key:"points",value:function(){return this.vertices}},{key:"bounds",value:function(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}},{key:"boundingRect",value:function(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}]),e}();function Pd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Id,t)}function Ld(e){var t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function Rd(e){for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}var jd=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.vertices,r=void 0===n?[[]]:n;U(this,e),this.set({vertices:r})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.vertices,n=void 0===t?[]:t;this.type="geopolygon",this.vertices=n.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(var r=0;r<this.numPolygons;r++)Rd(this.vertices[r]),this.vertices[r].length>2&&Ld(this.vertices[r]),this.polygons[r]=Pd({vertices:this.vertices[r]}),this.xMin=isNaN(this.xMin)?this.polygons[r].xMin:Math.min(this.xMin,this.polygons[r].xMin),this.xMax=isNaN(this.xMax)?this.polygons[r].xMax:Math.max(this.xMax,this.polygons[r].xMax),this.yMin=isNaN(this.yMin)?this.polygons[r].yMin:Math.min(this.yMin,this.polygons[r].yMin),this.yMax=isNaN(this.yMax)?this.polygons[r].yMax:Math.max(this.yMax,this.polygons[r].yMax);this._bounds=null,this._boundingRect=null}},{key:"containsPoint",value:function(e){return Ns(this,e)}},{key:"intersectsCircle",value:function(e){return Os(e,this)}},{key:"intersectsLine",value:function(e){return _s(this,ve(e))}},{key:"intersectsRect",value:function(e){return As(this,me(e))}},{key:"intersectsPolygon",value:function(e){return Ds(this,e)}},{key:"intersectsGeoPolygon",value:function(e){return n=e,r=(t=this).boundingRect(),i=n.boundingRect(),!!Ms(r,i)&&(ks(i,r)?ps(n,t):ps(t,n));var t,n,r,i}},{key:"points",value:function(){return this.vertices}},{key:"bounds",value:function(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}},{key:"boundingRect",value:function(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}]),e}();function zd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(jd,t)}function Fd(e,t){return e.x!==t.x||e.y!==t.y}var Bd=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.points,r=void 0===n?[]:n;U(this,e),this.set({points:r})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.points,n=void 0===t?[]:t;if(this.type="polyline",this.segments=[],this._points=n.slice(),this._points.length>1)for(var r=0,i=this._points.length-1;r<i;r++)Fd(this._points[r],this._points[r+1])&&this.segments.push({x1:this._points[r].x,y1:this._points[r].y,x2:this._points[r+1].x,y2:this._points[r+1].y})}},{key:"containsPoint",value:function(e){return this.segments.some((function(t){return Es(t,e)}))}},{key:"intersectsCircle",value:function(e){return this.segments.some((function(t){return gs(e,t)}))}},{key:"intersectsLine",value:function(e){var t=ve(e);return this.segments.some((function(e){return qs(e,t)}))}},{key:"intersectsRect",value:function(e){var t=me(e);return this.segments.some((function(e){return Cs(t,e)}))}},{key:"intersectsPolygon",value:function(e){return this.segments.some((function(t){return xs(e,t)}))}},{key:"intersectsGeoPolygon",value:function(e){return this.segments.some((function(t){return _s(e,t)}))}},{key:"points",value:function(){return this._points}}]),e}();var Vd=kt();function Hd(e,t){return Vd.get(e)(t)}Vd.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Dd,t)})),Vd.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Od,t)})),Vd.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Nd,t)})),Vd.add("polygon",Pd),Vd.add("geopolygon",zd),Vd.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Bd,t)}));var Ud=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];U(this,e),this.set(t)}return Y(e,[{key:"set",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],t.forEach((function(t){var n=Hd(t.type,t);n&&e.geometries.push(n)}))}},{key:"containsPoint",value:function(e){return this.geometries.some((function(t){return t.containsPoint(e)}))}},{key:"intersectsLine",value:function(e){return this.geometries.some((function(t){return t.intersectsLine(e)}))}},{key:"intersectsRect",value:function(e){return this.geometries.some((function(t){return t.intersectsRect(e)}))}},{key:"intersectsCircle",value:function(e){return this.geometries.some((function(t){return t.intersectsCircle(e)}))}},{key:"intersectsPolygon",value:function(e){return this.geometries.some((function(t){return t.intersectsPolygon(e)}))}},{key:"intersectsGeoPolygon",value:function(e){return this.geometries.some((function(t){return t.intersectsGeoPolygon(e)}))}}]),e}();var Wd=function(){function e(){U(this,e),this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}return Y(e,[{key:"clone",value:function(){return(new e).multiply(this)}},{key:"set",value:function(e){return this._elements=e,this}},{key:"save",value:function(){return this._stack.push(this.elements),this}},{key:"restore",value:function(){return this._stack.length&&(this._elements=this._stack.pop()),this}},{key:"add",value:function(e){var t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}},{key:"translate",value:function(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}},{key:"rotate",value:function(e){var t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}},{key:"multiply",value:function(t){var n,r,i,o;if(t instanceof e&&(t=t._elements),Array.isArray(t)){for(i=[[0,0,0],[0,0,0],[0,0,0]],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)for(o=0;o<3;o++)i[n][r]+=this._elements[n][o]*t[o][r];this._elements=i}else for(n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)this._elements[n][r]*=t;return this}},{key:"scale",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}},{key:"transform",value:function(e,t,n,r,i,o){return this.multiply([[e,n,i],[t,r,o],[0,0,1]]),this}},{key:"determinant",value:function(){var e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],u=this._elements[2][2];return e*i*u+t*o*a+n*r*s-n*i*a-t*r*u-e*o*s}},{key:"invert",value:function(){var e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],o=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],u=this._elements[2][1],l=this._elements[2][2];return this._elements=[[o*l-a*u,r*u-n*l,n*a-r*o],[a*s-i*l,t*l-r*s,r*i-t*a],[i*u-o*s,s*n-t*u,t*o-n*i]],this.multiply(1/e),this}},{key:"transpose",value:function(){var e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}},{key:"identity",value:function(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}},{key:"toString",value:function(){return"".concat(this._elements.map((function(e){return e.join("\t")})).join("\n"))}},{key:"isIdentity",value:function(){var e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}},{key:"transformPoint",value:function(e){var t,n,r=[e.x,e.y,1],i=this._elements,o=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)o[t]+=r[n]*i[t][n];return{x:o[0],y:o[1]}}},{key:"transformPoints",value:function(e){var t,n,r,i,o,a=this._elements,s=[];for(i=0;i<e.length;i++){for(t=[e[i].x,e[i].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)o[n]+=t[r]*a[n][r];s.push({x:o[0],y:o[1]})}return s}},{key:"elements",get:function(){var e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}]),e}(),Yd=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function Kd(e,t){var n=t.args[0]*(Math.PI/180);if(t.args.length>2){var r=t.args[1],i=t.args[2];e.translate(r,i),e.rotate(n),e.translate(-r,-i)}else 1===t.args.length&&e.rotate(n)}function $d(e,t){var n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function Gd(e,t){var n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function Xd(e,t){t.args.length>=6&&e.transform.apply(e,ae(t.args))}function Jd(e,t){for(var n,r=function(e){for(var t,n=[];null!==(t=Yd.exec(e));){var r=t[2].trim(),i=-1===r.indexOf(",")?r.split(" "):r.split(",");n.push({cmd:t[1],args:i.filter((function(e){return e.trim().length>0})).map((function(e){return Number(e)}))})}return n}(e),i=0,o=r.length;i<o;i++)"rotate"===(n=r[i]).cmd?Kd(t,n):"scale"===n.cmd?$d(t,n):"matrix"===n.cmd?Xd(t,n):"translate"===n.cmd&&Gd(t,n)}var Qd={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},Zd={type:function(e,t){return t.filter((function(t){var n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()}))},attr:function(e,t,n,r){return r.filter((function(r){var i=r.attrs[e];if(!t)return void 0!==i;if(void 0===i)return!1;switch(t){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}}))},universal:function(e){return e},tag:function(e,t){return t.filter((function(t){var n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))}};var eh={find:function(e,t){var n,r,i=[],o=[];if(t.isBranch){var a;n=function(e){var t,n,r,i,o=[];return e.split(/\s*,\s*/).forEach((function(e){e=e.trim(),t=[];for(var a=function(o){(r=e.match(Qd[o]))&&(i=!0,e=e.slice(r[0].length),n={type:o,value:r[0]},"attr"===o&&(r=r[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),n.attribute=r[1],n.operator=r[2],n.attributeValue=r[3]),t.push(n))};e&&(i=!1,(r=e.match(/^\s*([>+~]|\s)\s*/))&&(i=!0,t.push({type:" ",value:r[0]}),e=e.slice(r[0].length)),Object.keys(Qd).forEach(a),t&&t.length&&o.indexOf(t)<0&&o.push(t),i););})),o}(e),r=t.descendants;for(var s=function(e,t){a=n[e];var i=[],s=r.slice(),u=!1;a.reverse().forEach((function(e){if(" "===e.type)return i.push(s),s=r.slice(),void(u=!1);s=function(e,t){if(!t||!t.length||!e||"function"!=typeof Zd[e.type])return[];switch(e.type){case"type":return Zd[e.type](e.value,t);case"attr":return Zd[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return Zd[e.type](t);case"tag":return Zd[e.type](e.value,t);default:return[]}}(e,s),u=!0})),u&&i.push(s);var l=i[0].filter((function(e){for(var t,n=e.parent,r=1;r<i.length;r++){for(t=i[r].indexOf(n);n&&t<0;)n=n.parent,t=i[r].indexOf(n);if(t<0)return!1}return!0}));o.push(l)},u=0,l=n.length;u<l;u++)s(u);for(var c=0,f=o.length;c<f;c++)for(var d=0,h=o[c].length;d<h;d++)i.indexOf(o[c][d])<0&&i.push(o[c][d])}return i||[]}};function th(e,t,n){var r=e.type,i=e.points();n&&(i=i.every((function(e){return Array.isArray(e)}))?i.map((function(e){return n.transformPoints(e)})):n.transformPoints(i)),function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(i,t);var o=null;if("rect"===r||"bounds"===r)(o=me(i)).type=r;else if("circle"===r)(o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(i,e.r)).type=r;else if("line"===r)(o=ve(i)).type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:Ra(i,"polygon"===r)}}else if("geopolygon"===r){for(var a="",s=0;s<i.length;s++)a+=Ra(i[s],!0);o={type:"path",d:a}}return o}var nh=function(){function e(t){var n=this;U(this,e),this._bounds=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=t.boundingRect?t.boundingRect(e):{x:0,y:0,width:0,height:0},r=n.x,i=n.y,o=n.width,a=n.height;return{x:r,y:i,width:o,height:a}},this._attrs=t.attrs,this._type=t.type,this._data=t.data,this._dpi=t.stage?t.stage.dpi:1,this._collider=function(){return function(e,t){if(e.collider){var n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((function(e){return th(e,t,n)}))}:th(e.collider,t,n)}return null}(t,n._dpi)},this._desc=t.desc,this._tag=t.tag,this._children=function(){return t.children.map((function(t){return new e(t)}))},this._parent=function(){return t.parent?new e(t.parent):null},this._cache={elementBoundingRect:null},this._getElementBoundingRect=function(){return!n._cache.elementBoundingRect&&n.element&&(n._cache.elementBoundingRect=n.element.getBoundingClientRect()),n._cache.elementBoundingRect||{left:0,top:0}}}return Y(e,[{key:"children",get:function(){return this._children()}},{key:"parent",get:function(){return this._parent()}},{key:"type",get:function(){return this._type}},{key:"data",get:function(){return this._data}},{key:"attrs",get:function(){return this._attrs}},{key:"element",get:function(){return this._element},set:function(e){this._cache.elementBoundingRect=null,this._element=e}},{key:"key",get:function(){return this._key},set:function(e){this._key=e}},{key:"bounds",get:function(){var e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}},{key:"localBounds",get:function(){return this._bounds(!1)}},{key:"boundsRelativeTo",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=H(e),r=t?this.bounds:this.localBounds,i=this._getElementBoundingRect(),o=i.left,a=i.top;if("object"===n&&null!==e&&"function"==typeof e.getBoundingClientRect){var s=e.getBoundingClientRect(),u=s.left,l=void 0===u?0:u,c=s.top,f=void 0===c?0:c;o-=l,a-=f}return r.x+=o,r.y+=a,r}},{key:"collider",get:function(){return this._collider()}},{key:"desc",get:function(){return this._desc}},{key:"tag",get:function(){return this._tag}}]),e}();function rh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(nh,t)}var ih=function(){function e(t){U(this,e),this._node=rh(t),this._parent=null,this._input=null}return Y(e,[{key:"node",get:function(){return this._node}},{key:"parent",get:function(){return this._parent},set:function(e){this._parent=e}},{key:"input",get:function(){return this._input},set:function(e){this._input=e}}]),e}();function oh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(ih,t)}function ah(e,t){var n=e.parent;if(n&&"stage"!==n.type){t.parent=oh(n);var r=n.parent;r&&"stage"!==r.type&&ah(r,t.parent)}}function sh(e,t,n){if(null===e.colliderType)return null;var r=function(e,t){var n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{var r={x:t.cx,y:t.cy},i=e.inverseModelViewMatrix.transformPoint(r);n.cx=i.x,n.cy=i.y,n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((function(e){return Array.isArray(e)}))?zd(n):Pd(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(var r=e.descendants.length-1;r>=0;r--){var i=e.descendants[r];if(null!==i.collider&&i.collider[t](n)){var o=oh(i);return ah(i,o),o}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){var r=oh(e);return ah(e,r),r}return null}(e,t,r)}function uh(e,t,n,r){for(var i=e.length,o=0;o<i;o++){var a=e[o],s=sh(a,t,r);s&&n.push(s),!a.children||s||a.collider||uh(a.children,t,n,r)}}function lh(e,t,n){for(var r=e.length,i=0;i<r;i++){var o=e[i];if(null!==sh(o,t,n))return!0;if(o.children&&!o.collider)return lh(o.children,t,n)}return!1}function ch(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=ge(e),r={};switch(n){case"circle":return r.cx=e.cx*t,r.cy=e.cy*t,r.r=e.r,["intersectsCircle",r];case"rect":return["intersectsRect",r=pe(e).map((function(e){return Ha(e,t)}))];case"line":return["intersectsLine",r=he(e).map((function(e){return Ha(e,t)}))];case"point":return["containsPoint",r=Ha(e,t)];case"polygon":return r.vertices=e.vertices.map((function(e){return Ha(e,t)})),["intersectsPolygon",r];case"geopolygon":return r.vertices=e.vertices.map((function(e){return e.map((function(e){return Ha(e,t)}))})),["intersectsGeoPolygon",r];default:return[]}}function fh(e,t){var n=oe(ch(t,e.dpi),2),r=n[0],i=n[1],o=[];return r&&(uh([e],r,o,i),function(e,t){for(var n=0,r=t.length;n<r;n++)t[n].input=e}(t,o)),o}function dh(e,t){var n=oe(ch(t,e.dpi),2);return lh([e],n[0],n[1])}var hh=function(e){X(n,e);var t=re(n);function n(e){var r;return U(this,n),(r=t.call(this,e))._stage=null,r._collider={type:null,definition:null,fn:null},r._attrs={},r._node=null,r}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;var t=e.data,n=e.desc,r=e.tag,i=e.strokeReference,o=e.fillReference;La(this.attrs,e),void 0!==t&&(this.data=t),"object"===H(n)&&(this.desc=B(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}},{key:"findShapes",value:function(e){return eh.find(e,this).map((function(e){return rh(e)}))}},{key:"getItemsFrom",value:function(e){return fh(this,e)}},{key:"containsPoint",value:function(e){return dh(this,e)}},{key:"intersectsLine",value:function(e){return dh(this,e)}},{key:"intersectsRect",value:function(e){return dh(this,e)}},{key:"intersectsCircle",value:function(e){return dh(this,e)}},{key:"intersectsPolygon",value:function(e){return dh(this,e)}},{key:"intersectsGeoPolygon",value:function(e){return dh(this,e)}},{key:"resolveLocalTransform",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Wd;void 0!==this.attrs.transform&&Jd(this.attrs.transform,e),this.modelViewMatrix=e.clone()}},{key:"resolveGlobalTransform",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Wd,t=this.ancestors;if(t.length>0)for(var n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}},{key:"attr",value:function(e){return this.attrs[e]}},{key:"equals",value:function(e){var t=this.attrs,r=Object.keys(t),i=e.attrs,o=Object.keys(i);if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++){var s=r[a];if(!Object.hasOwnProperty.call(i,s))return!1;if(t[s]!==i[s])return!1}return ie(J(n.prototype),"equals",this).call(this,e)}},{key:"toJSON",value:function(){var e=ie(J(n.prototype),"toJSON",this).call(this);return e.attrs=this.attrs,e}},{key:"attrs",get:function(){return this._attrs}},{key:"stage",get:function(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}},{key:"modelViewMatrix",get:function(){return this._mvm},set:function(e){this._mvm=e,this._imvm=null}},{key:"inverseModelViewMatrix",get:function(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}},{key:"node",get:function(){return this._node},set:function(e){this._node=e}},{key:"collider",get:function(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Ud,t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=Hd("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=Hd(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn},set:function(e){var t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}},{key:"colliderType",get:function(){return this._collider.type}}]),n}(Td),ph=function(e){X(n,e);var t=re(n);function n(){return U(this,n),t.apply(this,arguments)}return Y(n,[{key:"addChild",value:function(e){if(!(e&&e instanceof Td))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}},{key:"addChildren",value:function(e){var t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}},{key:"removeChild",value:function(e){var t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}},{key:"removeChildren",value:function(e){var t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}]),n}(Td),mh=ph.prototype,vh=function(e){X(n,e);var t=re(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};U(this,n);var i=r.type,o=void 0===i?"container":i;return(e=t.call(this,o)).set(r),e}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ie(J(n.prototype),"set",this).call(this,e);var t=e.collider,r=B({type:null},t);this.collider=r,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"appendChildRect",value:function(e,t){if(void 0!==e.bounds){var n=this.__boundingRect[t]||{},r=oe(e.bounds(t),3),i=r[0],o=r[2],a=i.x,s=i.y,u=o.x,l=o.y,c=isNaN(n.width)?u:Math.max(u,n.width+n.x),f=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?a:Math.min(a,n.x),n.y=isNaN(n.y)?s:Math.min(s,n.y),n.width=c-n.x,n.height=f-n.y,this.__boundingRect[t]=n}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];for(var t=this.children.length,n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=B({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}},{key:"addChild",value:function(e){var t=mh.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);var n=B({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=n}return t}},{key:"addChildren",value:function(e){var t=mh.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(var r=0;r<n;r++)this.appendChildRect(e[r],!0);var i=B({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=i}return t}},{key:"removeChild",value:function(e){e._stage=null;var t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(mh.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};var i=B(this.boundingRect(!0),{type:"bounds"});this.collider=i}return this}},{key:"removeChildren",value:function(e){if(mh.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};var t=B(this.boundingRect(!0),{type:"bounds"});this.collider=t}return this}}]),n}(hh);function gh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(vh,t)}var yh=function(e){X(n,e);var t=re(n);function n(e){var r;return U(this,n),(r=t.call(this,"stage"))._stage=te(r),r._dpiRatio=e||1,r}return Y(n,[{key:"dpi",get:function(){return this._dpiRatio}}]),n}(vh);var bh=ph.prototype,xh=["x1","x2","y1","y2","id","offset","style"],wh=function(e){X(n,e);var t=re(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};U(this,n);var i=r.type,o=void 0===i?"container":i;return(e=t.call(this,o)).set(r),e._boundingRect={},e}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ie(J(n.prototype),"set",this).call(this,e);for(var t=this.attrs,r="",i=0,o=xh.length;i!==o;i++)void 0!==e[r=xh[i]]&&(t[r]=e[r])}},{key:"addChild",value:function(e){return bh.addChild.call(this,e)}},{key:"addChildren",value:function(e){return bh.addChildren.call(this,e)}},{key:"removeChild",value:function(e){e._stage=null;var t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return bh.removeChild.call(this,e),this}},{key:"removeChildren",value:function(e){return bh.removeChildren.call(this,e),this}}]),n}(hh);function Mh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(wh,t)}var kh=ph.prototype,Sh=["patternUnits","x","y","width","height","id"],Ch=function(e){X(n,e);var t=re(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};U(this,n);var i=r.type,o=void 0===i?"container":i;return(e=t.call(this,o)).set(r),e._boundingRect={},e}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ie(J(n.prototype),"set",this).call(this,e);for(var t=this.attrs,r="",i=0,o=Sh.length;i!==o;i++)void 0!==e[r=Sh[i]]&&(t[r]=e[r])}},{key:"addChild",value:function(e){return kh.addChild.call(this,e)}},{key:"addChildren",value:function(e){return kh.addChildren.call(this,e)}},{key:"removeChild",value:function(e){e._stage=null;var t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return kh.removeChild.call(this,e),this}},{key:"removeChildren",value:function(e){return kh.removeChildren.call(this,e),this}}]),n}(hh);var qh=function(e){X(n,e);var t=re(n);function n(){var e,r;return U(this,n),(e=r=t.call(this,"rect")).set.apply(e,arguments),r}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,r=void 0===t?0:t,i=e.y,o=void 0===i?0:i,a=e.width,s=void 0===a?0:a,u=e.height,l=void 0===u?0:u,c=e.rx,f=void 0===c?0:c,d=e.ry,h=void 0===d?0:d,p=e.collider,m=B({type:"rect",x:r,y:o,width:s,height:l},p);ie(J(n.prototype),"set",this).call(this,e),s>=0?(this.attrs.x=r,this.attrs.width=s):(this.attrs.x=r+s,this.attrs.width=-s),l>=0?(this.attrs.y=o,this.attrs.height=l):(this.attrs.y=o+l,this.attrs.height=-l),f>0&&(this.attrs.rx=f),h>0&&(this.attrs.ry=h),this.collider=m,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];var t=pe(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,r=de(n),i=oe(r,4),o=i[0],a=i[1],s=i[2],u=i[3];return this.__boundingRect[e]={x:o,y:a,width:s-o,height:u-a},this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}]),n}(hh);var Eh=function(e){X(n,e);var t=re(n);function n(){var e,r;return U(this,n),(e=r=t.call(this,"circle")).set.apply(e,arguments),r}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,r=void 0===t?0:t,i=e.cy,o=void 0===i?0:i,a=e.r,s=void 0===a?0:a,u=e.collider,l=B({type:"circle",cx:r,cy:o,r:s},u);ie(J(n.prototype),"set",this).call(this,e),this.attrs.cx=r,this.attrs.cy=o,this.attrs.r=s,this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];var t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.attrs,n=t.cx,r=t.cy,i=t.r,o=t.r,a=n-i,s=r-o,u=2*i,l=2*o,c=[{x:a,y:s},{x:a+u,y:s},{x:a+u,y:s+l},{x:a,y:s+l}];if(e&&this.modelViewMatrix){var f=de(c=this.modelViewMatrix.transformPoints(c)),d=oe(f,4),h=d[0],p=d[1],m=d[2],v=d[3];u=m-h,l=v-p,this.__bounds[e]=[{x:h,y:p},{x:h+u,y:p},{x:h+u,y:p+l},{x:h,y:p+l}]}else this.__bounds[e]=c;return this.__bounds[e]}}]),n}(hh);var Th=function(e){X(n,e);var t=re(n);function n(){var e,r;return U(this,n),(e=r=t.call(this,"line")).set.apply(e,arguments),r}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x1,r=void 0===t?0:t,i=e.y1,o=void 0===i?0:i,a=e.x2,s=void 0===a?0:a,u=e.y2,l=void 0===u?0:u,c=e.collider;ie(J(n.prototype),"set",this).call(this,e),this.attrs.x1=r,this.attrs.y1=o,this.attrs.x2=s,this.attrs.y2=l;var f={type:"line",x1:r,y1:o,x2:s,y2:l};this.collider=B(f,c),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];var t=he(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));var n=de(t),r=oe(n,4),i=r[0],o=r[1],a=r[2],s=r[3],u=i!==a||o!==s;return this.__boundingRect[e]={x:i,y:o,width:u?Math.max(1,a-i):0,height:u?Math.max(1,s-o):0},this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}]),n}(hh);var Dh=Math.PI/2;function Oh(e,t){var n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function Nh(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}function _h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=[],i=[];if("h"===n.forceOrientation){var o=e[0].x<e[1].x?-1:1,a=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+o,y:e[0].y}),e.push({x:e[e.length-1].x+a,y:e[e.length-1].y})}else if("v"===n.forceOrientation){var s=e[0].y<e[1].y?-1:1,u=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+s}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+u})}for(var l=e.length-1,c=1;c<l;c++){var f=e[c-1],d=e[c],h=e[c+1],p=Oh(d,f),m=Oh(d,h),v=(p+m)/2,g=v+Math.PI,y=Math.max(v,g),b=Math.min(v,g),x=p>m;if(1===c){var w=Oh(f,d);r.push(Nh(f,w-Dh,t)),i.unshift(Nh(f,w+Dh,t))}var M=x?y:b,k=x?b:y;if(r.push(Nh(d,M,t)),i.unshift(Nh(d,k,t)),c===l-1){var S=Oh(h,d);r.push(Nh(h,S+Dh,t)),i.unshift(Nh(h,S-Dh,t))}}return{type:"polygon",vertices:[].concat(r,i)}}function Ah(e){for(var t,n=[],r=e.length,i=0;i<r;i++){t=e[i];for(var o=0;o<t.length;o++)n.push(t[o])}return n}function Ih(e){if(e.length<2)return!1;var t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}var Ph=function(e){X(n,e);var t=re(n);function n(){var e,r;return U(this,n),(e=r=t.call(this,"path")).set.apply(e,arguments),r}return Y(n,[{key:"set",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ie(J(n.prototype),"set",this).call(this,t),this.segments=[],this.points=[],this.attrs.d=t.d,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(t.collider)||"object"===H(t.collider)&&void 0!==t.collider.type)this.collider=t.collider;else if(t.d){if(this.segments=Cd(t.d),this.segments.length>1&&this.segments.every((function(e){return Ih(e)})))return void(this.collider=B({type:"geopolygon",vertices:this.segments},t.collider));this.segments.forEach((function(n){if(n.length<=1);else if(Ih(n))e.collider=B({type:"polygon",vertices:n},t.collider);else if("object"===H(t.collider)&&t.collider.visual){var r=e.attrs["stroke-width"]/2;e.collider=_h(n,r,t.collider)}else e.collider=B({type:"polyline",points:n},t.collider)}))}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:Cd(this.attrs.d),this.points=Ah(this.segments));var t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,n=de(t),r=oe(n,4),i=r[0],o=r[1],a=r[2],s=r[3];return this.__boundingRect[e]={x:i||0,y:o||0,width:a-i||0,height:s-o||0},this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}]),n}(hh);function Lh(e){var t=e.data,n=e._boundingRect,r=e._textBoundsFn;return null!=t&&(n||r)}var Rh=function(e){X(n,e);var t=re(n);function n(){var e,r;return U(this,n),(e=r=t.call(this,"text")).set.apply(e,arguments),r}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,r=void 0===t?0:t,i=e.y,o=void 0===i?0:i,a=e.dx,s=void 0===a?0:a,u=e.dy,l=void 0===u?0:u,c=e.textBoundsFn,f=e.text,d=e.title,h=e.collider,p=e.boundingRect,m=e.ellipsed;ie(J(n.prototype),"set",this).call(this,e),this.attrs.x=r,this.attrs.y=o,this.attrs.dx=s,this.attrs.dy=l,this.attrs.text=f,void 0!==d&&(this.attrs.title=String(d)),"object"===H(p)?this._textBoundsFn=function(){return p}:"function"==typeof c&&(this._textBoundsFn=c),"string"==typeof m&&(this.ellipsed=m),this.collider=B({type:Lh(this)?"bounds":null},h),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};var t=pe(this._textBoundsFn(this.attrs)),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,r=de(n),i=oe(r,4),o=i[0],a=i[1],s=i[2],u=i[3];return this.__boundingRect[e]={x:o,y:a,width:s-o,height:u-a},this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}]),n}(hh);var jh=kt();function zh(e,t){return jh.get(e)(t)}jh.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(qh,t)})),jh.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Eh,t)})),jh.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Rh,t)})),jh.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Th,t)})),jh.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Ph,t)})),jh.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(yh,t)})),jh.add("container",gh),jh.add("defs",gh),jh.add("linearGradient",Mh),jh.add("radialGradient",Mh),jh.add("stop",Mh),jh.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ee(Ch,t)}));var Fh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[{}];function n(){return t[t.length-1]}return n.save=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n(),o={},a="",s=0;s<e.length;s++)void 0!==i[a=e[s]]&&(o[a]=i[a]);return B(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function Bh(e,t){if(Array.isArray(t))for(var n=0,r=t.length;n<r;n++)t[n](e)}function Vh(e,t,n){e.node=n[t],e.index=t}function Hh(e,t,n,r){for(var i={siblings:e,node:null,index:0},o=0,a=e.length;o<a;o++)if(Vh(i,o,e),Bh(i,r.create),!("function"==typeof i.node.disabled?i.node.disabled():i.node.disabled)){i.node=Fh.save(i.node);var s=zh(i.node.type,i.node);s&&(i.node.transform&&(n.save(),Jd(i.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),i.node.children&&Hh(i.node.children,s,n,r),i.node.transform&&n.restore()),Fh.restore()}}function Uh(e){var t=e.items,n=e.stage,r=e.dpi,i=e.on,o=void 0===i?{}:i;return n||(n=zh("stage",r)),Hh(t,n,new Wd,o),n}function Wh(e,t,n){var r=n.orientation,i=n.degree,o=n.stops,a=void 0===o?[]:o,s=null;if("radial"===r){var u=t.boundingRect();s=e.createRadialGradient(u.x+u.width/2,u.y+u.height/2,1e-5,u.x+u.width/2,u.y+u.height/2,Math.max(u.width,u.height)/2)}else{var l=Fa(i);["x1","x2","y1","y2"].forEach((function(e){e in n&&(l[e]=n[e])}));var c=t.boundingRect();s=e.createLinearGradient(c.x+l.x1*c.width,c.y+l.y1*c.height,c.x+l.x2*c.width,c.y+l.y2*c.height)}for(var f=0,d=a.length;f<d;f++){var h=a[f];s.addColorStop(h.offset,h.color)}return s}function Yh(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((function(e){switch(e.type){case"rect":n.rect(e.x,e.y,e.width,e.height)}})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function Kh(e){var t=e.createElement("canvas"),n=t.getContext("2d"),r={};return{create:function(e){var i=e.key;return i?(r[i]=r[i]||Yh(e,t,n),r[i]):Yh(e,t,n)},clear:function(){r={}}}}function $h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=e.y,r=e.width,i=e.height,o=e.scaleRatio,a=e.margin,s=e.edgeBleed,u={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return u.x=isNaN(t)?u.x:t,u.y=isNaN(n)?u.y:n,u.width=isNaN(r)?u.width:r,u.height=isNaN(i)?u.height:i,void 0!==o&&(u.scaleRatio.x=isNaN(o.x)?u.scaleRatio.x:o.x,u.scaleRatio.y=isNaN(o.y)?u.scaleRatio.y:o.y),void 0!==a&&(u.margin.left=isNaN(a.left)?0:a.left,u.margin.top=isNaN(a.top)?0:a.top),"object"===H(s)&&["left","right","top","bottom"].forEach((function(e){!isNaN(s[e])&&s[e]>0&&(u.edgeBleed[e]=s[e],u.edgeBleed.bool=!0)})),u.computedPhysical={x:Math.round(u.margin.left+(u.x-u.edgeBleed.left)*u.scaleRatio.x),y:Math.round(u.margin.top+(u.y-u.edgeBleed.top)*u.scaleRatio.y),width:Math.round((u.width+u.edgeBleed.left+u.edgeBleed.right)*u.scaleRatio.x),height:Math.round((u.height+u.edgeBleed.top+u.edgeBleed.bottom)*u.scaleRatio.y)},u}function Gh(){var e={element:function(){},root:function(){},settings:function(){},appendTo:function(){},render:function(){return!1},itemsAt:function(){return[]},findShapes:function(){return[]},clear:function(){},destory:function(){},size:function(){},measureText:yf,textBounds:xf,setKey:function(t){e.element().setAttribute("data-key",t)}};return e}function Xh(e){return function(t){var n=t.node;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}var Jh=200,Qh=200,Zh=function(){function e(t){U(this,e),this.targetCanvas=t,this.bufferCanvas=t.cloneNode()}return Y(e,[{key:"updateSize",value:function(e){var t,n=e.rect,r=e.dpiRatio,i=e.canvasBufferSize;t=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+2*Jh,height:n.computedPhysical.height+2*Qh},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}},{key:"apply",value:function(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}},{key:"clear",value:function(){this.bufferCanvas.width=this.bufferCanvas.width}},{key:"getContext",value:function(){return this.bufferCanvas.getContext("2d")}}]),e}(),ep=kt();function tp(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function np(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function rp(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function ip(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=Object.keys(r),o=0,a=n.length;o<a;o++){var s=n[o],u=s[0],l=s[1],c=s[2];if(u in t.attrs&&!(l in r)&&e[l]!==t.attrs[u]){var f=c?c(t.attrs[u]):t.attrs[u];"function"==typeof e[l]?e[l](f):e[l]=f}}for(var d=0,h=i.length;d<h;d++){var p=i[d];e[p]=r[p]}}function op(e,t,n,r){for(var i=0,o=e.length;i<o;i++){var a=e[i],s={};t.save(),a.attrs&&(a.attrs.fill||a.attrs.stroke)&&(a.attrs.fill&&"object"===H(a.attrs.fill)&&"gradient"===a.attrs.fill.type?s.fillStyle=Wh(t,a,a.attrs.fill):a.attrs.fill&&"object"===H(a.attrs.fill)&&"pattern"===a.attrs.fill.type&&(s.fillStyle=r.patterns.create(a.attrs.fill)),a.attrs.stroke&&"object"===H(a.attrs.stroke)&&"gradient"===a.attrs.stroke.type?s.strokeStyle=Wh(t,a,a.attrs.stroke):a.attrs.stroke&&"object"===H(a.attrs.stroke)&&"pattern"===a.attrs.stroke.type&&(s.strokeStyle=r.patterns.create(a.attrs.stroke))),ip(t,a,n,s),a.modelViewMatrix&&rp(a.modelViewMatrix.elements,t),ep.has(a.type)&&ep.get(a.type)(a.attrs,{g:t,doFill:"fill"in a.attrs&&"none"!==a.attrs.fill,doStroke:"stroke"in a.attrs&&0!==a.attrs["stroke-width"],ellipsed:a.ellipsed}),a.children&&op(a.children,t,n,r),t.restore()}}function ap(e){var t=e.el,n=e.dpiRatio,r=e.transform;if("object"===H(r)){var i=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n],o=t.getContext("2d");o.setTransform.apply(o,i)}}function sp(){var e,t,n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Uh,o={transform:void 0,canvasBufferSize:void 0},a=!1,s=$h(),u=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",tp]],l=Gh();return l.element=function(){return e},l.root=function(){return e},l.settings=function(e){return e&&Object.keys(o).forEach((function(t){void 0!==e[t]&&(o[t]=e[t])})),o},l.appendTo=function(n){return e||((e=n.ownerDocument.createElement("canvas")).style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof o.transform||t||(t=new Zh(e)),n.appendChild(e),e},l.render=function(c){if(!e)return!1;r||(r=Kh(e.ownerDocument));var f=t&&t.getContext()||e.getContext("2d"),d=np(f),h=t&&o.transform();if(h)return e.width=e.width,ap({el:e,dpiRatio:d,transform:h}),t.apply(),!0;var p=s.scaleRatio.x,m=s.scaleRatio.y;a&&(e.style.left="".concat(s.computedPhysical.x,"px"),e.style.top="".concat(s.computedPhysical.y,"px"),e.style.width="".concat(s.computedPhysical.width,"px"),e.style.height="".concat(s.computedPhysical.height,"px"),e.width=Math.round(s.computedPhysical.width*d),e.height=Math.round(s.computedPhysical.height*d),t&&t.updateSize({rect:s,dpiRatio:d,canvasBufferSize:o.canvasBufferSize}));var v={type:"container",children:c,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*d*p,", ").concat(s.edgeBleed.top*d*m,")"):""};1===d&&1===p&&1===m||(v.transform+="scale(".concat(d*p,", ").concat(d*m,")"));var g=i({items:[v],dpi:d,on:{create:[lf(l.measureText),Xh(l)]}}),y=!n||!g.equals(n);r.clear();var b=a||y;return b&&(l.clear(),op(g.children,f,u,{patterns:r})),t&&(e.width=e.width,t.apply()),a=!1,n=g,b},l.itemsAt=function(e){return n?n.getItemsFrom(e):[]},l.findShapes=function(e){return n?n.findShapes(e):[]},l.clear=function(){return e&&(e.width=e.width),t&&t.clear(),n=null,l},l.size=function(e){if(e){var t=$h(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},l.destroy=function(){e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),n=null},l}function up(e,t){ep.add(e,t)}function lp(e,t){return Math.max(0,Math.min(e,t))}var cp=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),fp=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),dp=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function hp(e){return cp.test(e)}function pp(e){return fp.test(e)||dp.test(e)}function mp(e){var t,n,r=e?e.length:0;for(t=0;t<r;t++){if(hp(n=e[t]))return"ltr";if(pp(n))return"rtl"}return"ltr"}var vp={start:"end",end:"start",center:"center",middle:"middle"};function gp(e,t){return"rtl"===t?vp[e]:e}function yp(e,t){var n,r,i,o=[],a=[],s=[],u=[],l=function(e){return e.id},c=function(e,t){var n;return n="object"===H(e)?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(c)),t=t.map(c),r=e.map(l),i=t.map(l);for(var f=0,d=t.length;f<d;f++){-1===r.indexOf(t[f].id)?o.push(t[f]):s.push(t[f])}for(var h=0,p=e.length;h<p;h++){-1===i.indexOf(e[h].id)?a.push(e[h]):u.push(e[h])}for(var m=0,v=o.length;m<v;m++)o[m].content.children&&(o[m].diff=yp([],o[m].content.children),o[m].children=o[m].diff.updatedNew.concat(o[m].diff.added),o[m].children.isTree=!0);for(var g=0,y=s.length;g<y;g++)s[g].diff=yp(u[g].children||[],s[g].content.children||[]),s[g].object=u[g].object,s[g].children=s[g].diff.items;return n=s.concat(o),o.isTree=!0,a.isTree=!0,s.isTree=!0,u.isTree=!0,n.isTree=!0,{added:o,updatedNew:s,updatedOld:u,removed:a,items:n}}function bp(e,t,n){for(var r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function xp(e,t){for(var n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function wp(e,t,n,r){for(var i,o=0,a=e.length;o<a;o++)null!==(i=e[o]).object&&void 0!==i.object&&(n(i.object,i.content),i.diff&&(bp(i.diff.added,i.object,t),xp(i.diff.removed,r),wp(i.diff.items,t,n,r)))}function Mp(e,t,n,r,i,o){var a=yp(e,t);return bp(a.added,n,r),xp(a.removed,o),wp(a.items,r,i,o),a.items}up("rect",(function(e,t){var n=t.g,r=t.doFill,i=t.doStroke;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,i,o,a){o=lp(r/2,o>0?o:a),a=lp(i/2,a>0?a:o),e.moveTo(t,n+a),e.lineTo(t,n+i-a),e.quadraticCurveTo(t,n+i,t+o,n+i),e.lineTo(t+r-o,n+i),e.quadraticCurveTo(t+r,n+i,t+r,n+i-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),i&&n.stroke()})),up("circle",(function(e,t){var n=t.g,r=t.doFill,i=t.doStroke;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()})),up("line",(function(e,t){var n=t.g,r=t.doStroke;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()})),up("path",(function(e,t){var n=t.g,r=t.doStroke,i=t.doFill,o=new Path2D(e.d);i&&n.fill(o),r&&n.stroke(o)})),up("text",(function(e,t){var n=t.g,r=t.ellipsed||cf(e,yf);n.font="".concat(e["font-size"]," ").concat(e["font-family"]);var i=mp(e.text);n.canvas.dir!==i&&(n.canvas.dir=i);var o=gp("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);o&&n.textAlign!==o&&(n.textAlign=o);var a=ff(e);n.fillText(r,e.x+e.dx,e.y+e.dy+a)}));var kp="http://www.w3.org/2000/svg",Sp=function(e,t){if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));var n=t.ownerDocument.createElementNS(kp,"container"===e?"g":e);return t.appendChild(n),n},Cp=function(e){e.parentNode&&e.parentNode.removeChild(e)},qp=function(e,t){if(function(e){switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}}(t)){for(var n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||cf(t.attrs,yf);var r=mp(t.attrs.text);"rtl"===r&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",gp(e.getAttribute("text-anchor"),r)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){var i=e.ownerDocument.createElementNS(kp,"title");i.textContent=t.attrs.title,e.appendChild(i)}else e.setAttribute(n,t.attrs[n]);else{var o=+e.getAttribute(n)||0,a=0;a="dominant-baseline"===n?ff(t.attrs):t.attrs[n],e.setAttribute("dy",a+o)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"===H(t.data)&&null!==t.data)for(var s in t.data)"string"!=typeof t.data[s]&&"number"!=typeof t.data[s]&&"boolean"!=typeof t.data[s]||e.setAttribute("data-".concat(s),t.data[s])}},Ep=function(){function e(t,n,r,i){U(this,e),this.create=t,this.nodeCreator=n,this.nodeMaintainer=r,this.nodeDestroyer=i}return Y(e,[{key:"render",value:function(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}]),e}();function Tp(){return new Ep(Mp,Sp,qp,Cp)}function Dp(e){var t,n,r=0;if(0===(e=JSON.stringify(e)).length)return r;for(t=0,n=e.length;t<n;t++)r=(r<<5)-r+e.charCodeAt(t),r&=r;return r}function Op(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Dp,n={},r=Date.now(),i={getOrCreateGradient:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(i[o]),u="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){var l=i[o],c=l.orientation,f=l.degree,d=l.stops,h=void 0===d?[]:d,p={};void 0===f&&(f=90),"radial"===c?p.type="radialGradient":(p=Fa(f),["x1","x2","y1","y2"].forEach((function(e){e in i[o]&&(p[e]=i[o][e])})),p.type="linearGradient"),p.id=u,p.children=h.map((function(e){var t=e.offset,n=e.color,r=e.opacity;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}})),e.push(p),n[s]=u}return"url('".concat(a,"#").concat(u,"')")},onCreate:function(e){var t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);var n=e.node;n.fill&&"object"===H(n.fill)&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"===H(n.stroke)&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",t))},clear:function(){n={}}};return i}function Np(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Dp,n={},r=Date.now(),i={onCreate:function(i){var o={};i.node&&"object"===H(i.node.fill)&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(o.fill=i.node.fill),i.node&&"object"===H(i.node.stroke)&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(o.stroke=i.node.stroke),Object.keys(o).forEach((function(a){var s="",u=o[a],l=t(u),c="picasso-pattern-".concat(r,"-").concat(l);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[l]){var f={patternUnits:"userSpaceOnUse",x:0,y:0,width:u.width,height:u.height,type:"pattern",id:c,children:[],fill:u.fill};u.shapes.forEach((function(e){f.children.push(e)})),e.push(f),n[l]=!0}i.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(c,"')")}))},clear:function(){n={}}};return i}function _p(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tp,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kp,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Uh,a=r(),s=!1,u=$h(),l={transform:void 0},c=Gh(),f={type:"defs",children:[]},d=Np(f.children),h=Op(f.children);return c.element=function(){return e},c.root=function(){return t},c.settings=function(e){return e&&Object.keys(l).forEach((function(t){void 0!==e[t]&&(l[t]=e[t])})),l},c.appendTo=function(n){return e||((e=n.ownerDocument.createElementNS(i,"svg")).style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none",e.setAttribute("xmlns",i),(t=n.ownerDocument.createElementNS(i,"g")).style.pointerEvents="auto",e.appendChild(t)),n.appendChild(e),e},c.render=function(r){if(!e)return!1;var i="function"==typeof l.transform&&l.transform();if(i){var p=i.a,m=i.b,v=i.c,g=i.d,y=i.e,b=i.f;return t.style.transform="matrix(".concat(p,", ").concat(m,", ").concat(v,", ").concat(g,", ").concat(y,", ").concat(b,")"),!0}t.style.transform="";var x=u.scaleRatio.x,w=u.scaleRatio.y;s&&(e.style.left="".concat(u.computedPhysical.x,"px"),e.style.top="".concat(u.computedPhysical.y,"px"),e.setAttribute("width",u.computedPhysical.width),e.setAttribute("height",u.computedPhysical.height)),h.clear(),d.clear(),f.children.length=0;var M={type:"container",children:Array.isArray(r)?[].concat(ae(r),[f]):r,transform:u.edgeBleed.bool?"translate(".concat(u.edgeBleed.left*x,", ").concat(u.edgeBleed.top*w,")"):""};1===x&&1===w||(M.transform+="scale(".concat(x,", ").concat(w,")"));var k=o({items:[M],on:{create:[function(e){e.node.fillReference=void 0,e.node.strokeReference=void 0},h.onCreate,d.onCreate,lf(c.measureText),Xh(c)]}}),S=!n||!k.equals(n),C=s||S;return C&&(c.clear(),a.render(k.children,t)),s=!1,n=k,C},c.itemsAt=function(e){return n?n.getItemsFrom(e):[]},c.findShapes=function(e){return n?n.findShapes(e):[]},c.clear=function(){if(!t)return c;n=null;var r=t.cloneNode(!1);return e.replaceChild(r,t),t=r,c},c.destroy=function(){e&&e.parentNode&&e.parentNode.removeChild(e),e=null,t=null},c.size=function(e){if(e){var t=$h(e);JSON.stringify(u)!==JSON.stringify(t)&&(s=!0,u=t)}return u},c}var Ap,Ip,Pp,Lp,Rp={},jp=[],zp=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Fp(e,t){for(var n in t)e[n]=t[n];return e}function Bp(e){var t=e.parentNode;t&&t.removeChild(e)}function Vp(e,t,n){var r,i,o,a=arguments,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(a[o]);if(null!=n&&(s.children=n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return Hp(e,s,r,i,null)}function Hp(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++Ap.__v:i};return null!=Ap.vnode&&Ap.vnode(o),o}function Up(e){return e.children}function Wp(e,t){this.props=e,this.context=t}function Yp(e,t){if(null==t)return e.__?Yp(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Yp(e):null}function Kp(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Kp(e)}}function $p(e){(!e.__d&&(e.__d=!0)&&Ip.push(e)&&!Gp.__r++||Lp!==Ap.debounceRendering)&&((Lp=Ap.debounceRendering)||Pp)(Gp)}function Gp(){for(var e;Gp.__r=Ip.length;)e=Ip.sort((function(e,t){return e.__v.__b-t.__v.__b})),Ip=[],e.some((function(e){var t,n,r,i,o,a;e.__d&&(o=(i=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=Fp({},i)).__v=i.__v+1,rm(a,i,r,t.__n,void 0!==a.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?Yp(i):o,i.__h),im(n,i),i.__e!=o&&Kp(i)))}))}function Xp(e,t,n,r,i,o,a,s,u,l){var c,f,d,h,p,m,v,g=r&&r.__k||jp,y=g.length;for(n.__k=[],c=0;c<t.length;c++)if(null!=(h=n.__k[c]=null==(h=t[c])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?Hp(null,h,null,null,h):Array.isArray(h)?Hp(Up,{children:h},null,null,null):h.__b>0?Hp(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(d=g[c])||d&&h.key==d.key&&h.type===d.type)g[c]=void 0;else for(f=0;f<y;f++){if((d=g[f])&&h.key==d.key&&h.type===d.type){g[f]=void 0;break}d=null}rm(e,h,d=d||Rp,i,o,a,s,u,l),p=h.__e,(f=h.ref)&&d.ref!=f&&(v||(v=[]),d.ref&&v.push(d.ref,null,h),v.push(f,h.__c||p,h)),null!=p?(null==m&&(m=p),"function"==typeof h.type&&null!=h.__k&&h.__k===d.__k?h.__d=u=Jp(h,u,e):u=Qp(e,h,d,g,p,u),l||"option"!==n.type?"function"==typeof n.type&&(n.__d=u):e.value=""):u&&d.__e==u&&u.parentNode!=e&&(u=Yp(d))}for(n.__e=m,c=y;c--;)null!=g[c]&&("function"==typeof n.type&&null!=g[c].__e&&g[c].__e==n.__d&&(n.__d=Yp(r,c+1)),am(g[c],g[c]));if(v)for(c=0;c<v.length;c++)om(v[c],v[++c],v[++c])}function Jp(e,t,n){var r,i;for(r=0;r<e.__k.length;r++)(i=e.__k[r])&&(i.__=e,t="function"==typeof i.type?Jp(i,t,n):Qp(n,i,i,e.__k,i.__e,t));return t}function Qp(e,t,n,r,i,o){var a,s,u;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,u=0;(s=s.nextSibling)&&u<r.length;u+=2)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function Zp(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||zp.test(t)?n:n+"px"}function em(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Zp(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Zp(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?nm:tm,o):e.removeEventListener(t,o?nm:tm,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function tm(e){this.l[e.type+!1](Ap.event?Ap.event(e):e)}function nm(e){this.l[e.type+!0](Ap.event?Ap.event(e):e)}function rm(e,t,n,r,i,o,a,s,u){var l,c,f,d,h,p,m,v,g,y,b,x=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(l=Ap.__b)&&l(t);try{e:if("function"==typeof x){if(v=t.props,g=(l=x.contextType)&&r[l.__c],y=l?g?g.props.value:l.__:r,n.__c?m=(c=t.__c=n.__c).__=c.__E:("prototype"in x&&x.prototype.render?t.__c=c=new x(v,y):(t.__c=c=new Wp(v,y),c.constructor=x,c.render=sm),g&&g.sub(c),c.props=v,c.state||(c.state={}),c.context=y,c.__n=r,f=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=x.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=Fp({},c.__s)),Fp(c.__s,x.getDerivedStateFromProps(v,c.__s))),d=c.props,h=c.state,f)null==x.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==x.getDerivedStateFromProps&&v!==d&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(v,y),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(v,c.__s,y)||t.__v===n.__v){c.props=v,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),c.__h.length&&a.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(v,c.__s,y),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(d,h,p)}))}c.context=y,c.props=v,c.state=c.__s,(l=Ap.__r)&&l(t),c.__d=!1,c.__v=t,c.__P=e,l=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=Fp(Fp({},r),c.getChildContext())),f||null==c.getSnapshotBeforeUpdate||(p=c.getSnapshotBeforeUpdate(d,h)),b=null!=l&&l.type===Up&&null==l.key?l.props.children:l,Xp(e,Array.isArray(b)?b:[b],t,n,r,i,o,a,s,u),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),m&&(c.__E=c.__=null),c.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,a,s){var u,l,c,f,d=n.props,h=t.props,p=t.type,m=0;if("svg"===p&&(i=!0),null!=o)for(;m<o.length;m++)if((u=o[m])&&(u===e||(p?u.localName==p:3==u.nodeType))){e=u,o[m]=null;break}if(null==e){if(null===p)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,h.is&&h),o=null,s=!1}if(null===p)d===h||s&&e.data===h||(e.data=h);else{if(o=o&&jp.slice.call(e.childNodes),l=(d=n.props||Rp).dangerouslySetInnerHTML,c=h.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(c||l)&&(c&&(l&&c.__html==l.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||em(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||em(e,o,t[o],n[o],r)}(e,h,d,i,s),c)t.__k=[];else if(m=t.props.children,Xp(e,Array.isArray(m)?m:[m],t,n,r,i&&"foreignObject"!==p,o,a,e.firstChild,s),null!=o)for(m=o.length;m--;)null!=o[m]&&Bp(o[m]);s||("value"in h&&void 0!==(m=h.value)&&(m!==e.value||"progress"===p&&!m)&&em(e,"value",m,d.value,!1),"checked"in h&&void 0!==(m=h.checked)&&m!==e.checked&&em(e,"checked",m,d.checked,!1))}return e}(n.__e,t,n,r,i,o,a,u);(l=Ap.diffed)&&l(t)}catch(e){t.__v=null,(u||null!=o)&&(t.__e=s,t.__h=!!u,o[o.indexOf(s)]=null),Ap.__e(e,t,n)}}function im(e,t){Ap.__c&&Ap.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Ap.__e(e,t.__v)}}))}function om(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Ap.__e(e,n)}}function am(e,t,n){var r,i,o;if(Ap.unmount&&Ap.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||om(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Ap.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&am(r[o],t,n);null!=i&&Bp(i)}function sm(e,t,n){return this.constructor(e,n)}function um(e,t,n){var r,i,o;Ap.__&&Ap.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],rm(t,e=(!r&&n||t).__k=Vp(Up,null,[e]),i||Rp,Rp,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?jp.slice.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),im(o,e)}function lm(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.createElement,i=void 0===r?document.createElement.bind(document):r,o=$h(),a={transform:void 0},s=Gh();return s.element=function(){return e},s.root=function(){return e},s.settings=function(e){return e&&Object.keys(a).forEach((function(t){void 0!==e[t]&&(a[t]=e[t])})),a},s.appendTo=function(t){return e||((e=i("div")).style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),t.appendChild(e),e},s.render=function(n){if(!e)return!1;var r,i="function"==typeof a.transform&&a.transform();if(i){var s=i.a,u=i.b,l=i.c,c=i.d,f=i.e,d=i.f;return e.style.transform="matrix(".concat(s,", ").concat(u,", ").concat(l,", ").concat(c,", ").concat(f,", ").concat(d,")"),!0}return e.style.transform="",e.style.left="".concat(o.computedPhysical.x,"px"),e.style.top="".concat(o.computedPhysical.y,"px"),e.style.width="".concat(o.computedPhysical.width,"px"),e.style.height="".concat(o.computedPhysical.height,"px"),r=Array.isArray(n)?Vp("div",null,n):n,t=um(r,e,t),!0},s.renderArgs=[Vp],s.clear=function(){if(e){for(var n=e.firstChild;n;)e.removeChild(n),n=e.firstChild;t=null}return s},s.destroy=function(){e&&e.parentElement&&e.parentElement.removeChild(e),e=null,t=null},s.size=function(e){return e&&(o=$h(e)),o},s}Ap={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(t){e=t}throw e},__v:0},Wp.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Fp({},this.state),"function"==typeof e&&(e=e(Fp({},n),this.props)),e&&Fp(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),$p(this))},Wp.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),$p(this))},Wp.prototype.render=Up,Ip=[],Pp="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gp.__r=0;var cm=[function(e){e.renderer("svg",_p)},function(e){e.renderer("canvas",sp)},function(e){e.renderer("dom",lm)}],fm={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},dm=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.level,r=void 0===n?fm.OFF:n,i=t.pipe,o=void 0===i?console:i,a=r,s=(K(e={},fm.OFF,(function(){})),K(e,fm.ERROR,(function(){return o.error.apply(o,arguments)})),K(e,fm.WARN,(function(){return o.warn.apply(o,arguments)})),K(e,fm.INFO,(function(){return o.info.apply(o,arguments)})),K(e,fm.DEBUG,(function(){return o.log.apply(o,arguments)})),e),u=function(e){if(e&&!(a<e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(s[e]||s[fm.DEBUG]).apply(void 0,n)}};return{log:u,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.apply(void 0,[fm.ERROR].concat(t))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.apply(void 0,[fm.WARN].concat(t))},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.apply(void 0,[fm.INFO].concat(t))},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.apply(void 0,[fm.DEBUG].concat(t))},level:function(e){return"number"==typeof e&&(a=e),a},LOG_LEVEL:fm}};function hm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;e(n,t)}var pm=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=dm(t.logger),i={component:kt(n.component,"component",r),data:kt(n.data,"data",r),formatter:kt(n.formatter,"formatter",r),interaction:kt(n.interaction,"interaction",r),renderer:fu(n.renderer),scale:kt(n.scale,"scale",r),symbol:kt(n.symbol,"symbol",r),logger:r};function o(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={palettes:t.palettes.concat(n.palettes||[]),style:B({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer};return e(r,i)}return t.renderer&&t.renderer.prio&&i.renderer.default(t.renderer.prio[0]),o.use=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return hm(e,t,i)},o.chart=function(e){return cu(e,{registries:i,logger:r,style:t.style,palettes:t.palettes})},o.config=function(){return t},Object.keys(i).forEach((function(e){o[e]=i[e]})),o.version=V,o}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l"},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:du,data:Eu,formatter:Sr,interaction:Tu,renderer:fu(),scale:zo,symbol:Qa});function mm(e){return(mm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ym(e,t,n){return t&&gm(e.prototype,t),n&&gm(e,n),e}function bm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xm(Object(n),!0).forEach((function(t){bm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mm(e,t){return(Mm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function km(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Sm(e,t,n){return(Sm=km()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Mm(i,n.prototype),i}).apply(null,arguments)}function Cm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||Em(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qm(e){return function(e){if(Array.isArray(e))return Tm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Em(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Em(e,t){if(e){if("string"==typeof e)return Tm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tm(e,t):void 0}}function Tm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Ed.forEach(pm.use),cm.forEach(pm.use),[].forEach(pm.use);var Dm=Object.prototype.hasOwnProperty,Om=Object.prototype.toString,Nm=Object.defineProperty,_m=Object.getOwnPropertyDescriptor,Am=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Om.call(e)},Im=function(e){if(!e||"[object Object]"!==Om.call(e))return!1;var t,n=Dm.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Dm.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Dm.call(e,t)},Pm=function(e,t){Nm&&"__proto__"===t.name?Nm(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Lm=function(e,t){if("__proto__"===t){if(!Dm.call(e,t))return;if(_m)return _m(e,t).value}return e[t]},Rm=function e(){var t,n,i,o,a,s,u=arguments[0],l=1,c=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},l=2),(null==u||"object"!==r(u)&&"function"!=typeof u)&&(u={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=Lm(u,n),u!==(o=Lm(t,n))&&(f&&o&&(Im(o)||(a=Am(o)))?(a?(a=!1,s=i&&Am(i)?i:[]):s=i&&Im(i)?i:{},Pm(u,{name:n,newValue:e(f,s,o)})):void 0!==o&&Pm(u,{name:n,newValue:o}));return u};function jm(e,t,n){if(!e)return-1;var r=n.cache,i=e.origin?e.origin():null;i&&(e=i);var o=r.fields.indexOf(e),a=-1,s=-1;if(-1===o)for(var u=0;u<r.wrappedFields.length;u++)if(s=r.wrappedFields[u].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[u].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){o=u;break}return(o-=t.qArea.qLeft)<0||o>=t.qArea.qWidth?-1:s>=0?function(e){return e[o].qAttrDims.qValues[s]}:a>=0?function(e){return e[o].qAttrExps.qValues[a]}:function(e){return e[o]}}function zm(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Fm(e){var t=e.cache,n=e.f,r=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,s=e.row,u=e.sourceKey,l=e.target,c=e.targetProp,f=r;if(i.field&&i.field!==n){var d=jm(i.field,o,{cache:t});if(-1===d)return;f=Rm({qRow:a},d(s))}l[c]=zm(i,f,{key:u})}function Bm(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){for(var s=t.raw(),u=t.key(),l="object"===mm(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),f=c.props,d=c.main,h=Object.keys(f),p=!!i[a].trackBy,m=mm(i[a].trackBy),v={},g=[],y=[],b=0;b<s.qDataPages.length;b++){var x=jm(l,s.qDataPages[b],{cache:n});if(-1!==x)for(var w=0;w<s.qDataPages[b].qMatrix.length;w++){var M=s.qDataPages[b].qArea.qTop+w,k=Rm({qRow:M},x(s.qDataPages[b].qMatrix[w])),S=zm(d,k,{key:u});if(!(d.filter&&!d.filter(k))){for(var C=0;C<h.length;C++){var q=f[h[C]],E=q.fields||[q];q.fields&&(S[h[C]]=[]);for(var T=0;T<E.length;T++)Fm({cache:n,f:l,mainCell:k,p:E[T],prop:h[C],props:f,page:s.qDataPages[b],rowIdx:M,row:s.qDataPages[b].qMatrix[w],sourceKey:u,target:q.fields?S[h[C]]:S,targetProp:q.fields?T:h[C]});if(q.fields){var D=S[h[C]].map((function(e){return e.value})),O=S[h[C]].map((function(e){return e.label}));S[h[C]]={value:"function"==typeof q.value?q.value(D):void 0!==q.value?q.value:D,label:"function"==typeof q.label?q.label(O):void 0!==q.label?String(q.label):String(S[h[C]].value)}}}p&&r.track({cfg:i[a],itemData:k,obj:S,target:g,tracker:v,trackType:m}),y.push(S)}}}p?o.push.apply(o,qm(r.collect(g,{main:d,propsArr:h,props:f}))):o.push.apply(o,y)}return o}function Vm(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Hm(e,t){var n,r,i,o,a,s=new Km(e),u=+e.value&&(s.value=e.value),l=[s];for(null==t&&(t=Um);n=l.pop();)if(u&&(n.value=+n.data.value),(i=t(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Km(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Ym)}function Um(e){return e.children}function Wm(e){e.data=e.data.data}function Ym(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Km(e){this.data=e,this.depth=this.height=0,this.parent=null}function $m(e){if("function"!=typeof e)throw new Error;return e}Km.prototype=Hm.prototype={constructor:Km,count:function(){return this.eachAfter(Vm)},each:function(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Hm(this).eachBefore(Wm)}};var Gm={depth:-1},Xm={};function Jm(e){return e.id}function Qm(e){return e.parentId}function Zm(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),i=t,o=0;o<r.length;o++){if("*"===r[o]&&Array.isArray(i)){var a=[];n=r.slice(o+1).join("/");for(var s=0;s<i.length;s++){var u=Zm(n,i[s]);Array.isArray(u)?a.push.apply(a,qm(u)):a.push(u)}return a}if(!r[o]&&Array.isArray(i)){var l=new Array(i.length);n=r.slice(o+1).join("/");for(var c=0;c<i.length;c++)l[c]=Zm(n,i[c]);return l}r[o]in i&&(i=i[r[o]])}return i}function ev(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var i=n>=0?[e[n]]:e;r.push.apply(r,qm(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&r.push.apply(r,qm(ev(e[o].children,t-1,n)));return r}function tv(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t));return function(e){for(var t=e,n=0;n<r;++n)t=t.parent;return t}}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return ev(e.children,i-1,n)}}return!1}function nv(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var i=0;i<r.length;i++)if(e(r[i]))return r[i];return!1}if("string"==typeof e){for(var o=0;o<r.length;o++)if(r[o].key()===e||r[o].title()===e)return r[o]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var rv=/^qDimensionInfo(?:\/(\d+))?/,iv=/^\/?qMeasureInfo\/(\d+)/,ov=/\/qAttrExprInfo\/(\d+)/,av=/\/qAttrDimInfo\/(\d+)/;function sv(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function uv(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,u=-1,l=-1,c=r,f=n.qEffectiveInterColumnSortOrder,d=sv(n);return rv.test(c)&&(i=!0,o=+rv.exec(c)[1],c=r.replace(rv,"")),iv.test(c)&&("K"===n.qMode?u=+iv.exec(c)[1]:f&&-1!==f.indexOf(-1)?(u=+iv.exec(c)[1],l=0):l=+iv.exec(c)[1],c=c.replace(iv,"")),c&&(av.exec(c)?s=+av.exec(c)[1]:ov.exec(c)&&(a=+ov.exec(c)[1])),{fieldDepth:(i?"S"===n.qMode?d[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:u,measureIdx:l,attrDimIdx:s,attrIdx:a}}function lv(e,t){var n,r,i=tv(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function cv(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function fv(e){for(var t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var u=n[t[s]],l=u.fields||[u],c=void 0,f=void 0;u.fields&&(c=[],f=[]);for(var d=function(e){var n=l[e],d=void 0,h=void 0,p=void 0,m=void 0,v=void 0,g=void 0;if("primitive"===n.type?(p=n.value,g=String(n.value)):("function"==typeof n.value&&(d=function(e){return n.value(e,r)}),"function"==typeof n.label&&(h=function(e){return n.label(e,r)}),n.accessor?(m=n.accessor(r),Array.isArray(m)?(v=m.map(n.valueAccessor),n.attrAccessor&&(v=v.map(n.attrAccessor)),d&&(p=v.map(d),d=null),h&&(g=v.map(h),h=null),p=n.reduce?n.reduce(p):p,g=n.reduceLabel?n.reduceLabel(g,p):String(p)):g=p=n.attrAccessor?n.attrAccessor(n.valueAccessor(m)):n.valueAccessor(m)):(p=i,g=i)),u.fields){var y=d?d(p):p;c.push(y),f.push(h&&null!=g?h(g):null!=g?g:String(y))}else{var b=d?d(p):p;o[t[s]]={value:b,label:h?h(g):null!=g?g:String(b)},n.field&&(o[t[s]].source={field:n.field.key(),key:a})}},h=0;h<l.length;h++)d(h);c&&(o[t[s]]={value:"function"==typeof u.value?u.value(c,r):c,label:"function"==typeof u.label?u.label(f,r):f})}}var dv=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=Zm(r,e);return o&&o[0]?(t.tree=Hm(o[0],n.children||function(e){return e[i]}),t.tree):null};function hv(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),i=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),o=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var u=t[s],l="__root",c=!1,f=0;f<i.length;f++){var d=u[i[f]],h="".concat(l,"__").concat(d.qText);a[h]||(a[h]=wm({__id:h,__parent:l,qValues:[]},d),c=!0),l=h}if(c)for(var p=0;p<o.length;p++){var m=u[o[p]];a[l].qValues.push(m)}}var v=Object.keys(a).map((function(e){return a[e]}));return function(){var e=Jm,t=Qm;function n(n){var r,i,o,a,s,u,l,c=n.length,f=new Array(c),d={};for(i=0;i<c;++i)r=n[i],s=f[i]=new Km(r),null!=(u=e(r,i,n))&&(u+="")&&(d[l="$"+(s.id=u)]=l in d?Xm:s);for(i=0;i<c;++i)if(s=f[i],null!=(u=t(n[i],i,n))&&(u+="")){if(!(a=d["$"+u]))throw new Error("missing: "+u);if(a===Xm)throw new Error("ambiguous: "+u);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=Gm,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Ym),o.parent=null,c>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=$m(t),n):e},n.parentId=function(e){return arguments.length?(t=$m(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(v)}var pv=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var u=n[t[s]],l=u.fields?u.fields:[u],c=0;c<l.length;c++){var f=l[c];if(f.field!==a){var d=lv(o,uv(f.field,{cube:r,cache:i}));f.accessor=d.nodeFn,f.valueAccessor=d.valueFn,f.attrAccessor=d.attrFn}}};function mv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=t.raw(),o=t.key(),a="S"===i.qMode?hv(t):dv(i,n,e);if(!a)return null;for(var s=a.height,u=[],l=0;l<=s;l++){var c=null;if(l>0)if("S"===i.qMode){var f=sv(i),d=f[l-1];c=n.fields[d]}else{var h=i.qEffectiveInterColumnSortOrder[l-1];l>i.qEffectiveInterColumnSortOrder.length&&(h=i.qDimensionInfo.length),c=n.fields[h]}var p=r.normalizeConfig(wm(wm({},e),{},{field:c?c.key():void 0}),t),m=p.props,v=p.main,g=Object.keys(m);u[l]={propsArr:g,props:m,main:v};var y=c?uv(c,{cube:i,cache:n}):{fieldDepth:0};pv({propsArr:g,props:m,cube:i,cache:n,itemDepthObject:y,f:c})}for(var b=a.copy(),x=b.descendants(),w=a.descendants(),M=0;M<w.length;M++){var k=u[w[M].depth].propsArr,S=u[w[M].depth].props,C=u[w[M].depth].main,q=x[M],E=q.data,T=cv(C,E,{key:o});fv({propsArr:k,props:S,item:q,itemData:E,ret:T,sourceKey:o,isTree:!0}),w[M].data=T}return a}function vv(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){var s=t.raw(),u=t.key();if(!dv(s,n,e))continue;var l="object"===mm(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),f=c.props,d=c.main,h=Object.keys(f),p=uv(l,{cube:s,cache:n}),m=lv({fieldDepth:0},p),v=m.nodeFn,g=m.attrFn,y=m.valueFn;pv({propsArr:h,props:f,cube:s,cache:n,itemDepthObject:p,f:l});for(var b=!!i[a].trackBy,x=mm(i[a].trackBy),w={},M=[],k=v(n.tree),S=[],C=0;C<k.length;C++){var q=k[C],E=g?g(y(q)):y(q);if(!(d.filter&&!d.filter(E))){var T=cv(d,E,{key:u});fv({propsArr:h,props:f,item:q,itemData:E,ret:T,sourceKey:u}),b&&r.track({cfg:i[a],itemData:E,obj:T,target:M,tracker:w,trackType:x}),S.push(T)}}b?o.push.apply(o,qm(r.collect(M,{main:d,propsArr:h,props:f}))):o.push.apply(o,S)}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var gv=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
|
|
8
|
+
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
9
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,u,l,c,f,d=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),v=m.search(/[0-9\-\+#]/),g=d-v,y=e.substring(g,g+1),b=g+("."===y||","===y?1:0),x=v>0?e.substring(b,d):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;l[0].length<e[0].length-a;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],u=c[1]&&c[c.length-1].length){for(m="",g=(f=t[0]).length%u,d=f.length,b=0;b<d;b++)m+=f.charAt(b),!((b-g+1)%u)&&b<d-u&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}}));function yv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var bv={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},xv=/%$/,wv=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Mv=/^\(oct\)/i,kv=/^\(dec\)/i,Sv=/^\(hex\)/i,Cv=/^\(bin\)/i,qv=/^\(rom\)/i,Ev=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Tv=/#|0/g;function Dv(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Ov(e,t,n){var r;return wv.test(t)?e=Dv(e,Number(/\d{2}/.exec(t)[0]),t,n):Mv.test(t)?e=Dv(e,8,t,n):kv.test(t)?e=Dv(e,10,t,n):Sv.test(t)?e=Dv(e,16,t,n):Cv.test(t)?e=Dv(e,2,t,n):qv.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}function Nv(e,t,n){var r=yv(e);return n?r:new RegExp(r||"",t)}function _v(e,t,n){var r,i,o,a,s,u,l,c,f,d,h,p=e.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),e.abbreviate=!0),d=t,(h=n)&&(h=yv(h)),d&&(d=yv(d)),f=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(h,"[#0]+)?")),a=(o=(o=p.match(f))?o[0]:"")?p.substr(0,p.indexOf(o)):p,s=o?p.substring(p.indexOf(o)+o.length):"",o||(o=p?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(o=o.replace(Nv(u,"g"),t)),l=n,n=".",l&&(o=o.replace(Nv(l,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var m,v=p.split(l);v[1]&&(m=v[1].match(Tv)),e.prefix=a||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=m?m.length:2,e.percentage=xv.test(p),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Nv(t,null,!0),"|").concat(Nv(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=n,e.temp=c}var Av=function(){function e(t,n,r,i,o){vm(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return bv;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return ym(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Ev.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Ev.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Ev.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||_v(r.positive,t,n),r.negative&&!r.negative.isFunctional&&_v(r.negative,t,n),r.zero&&!r.zero.isFunctional&&_v(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,s,u,l,c=this._prepared,f="",d="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=Ov(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var p,m,v=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),g=v[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);g<=n&&s<v.length;)g=v[++s];s>0&&(p=v[s-1]),p&&n>0&&p>0?m=p:(n<0&&p<0||!p)&&(g<0&&g-n<=c.maxPrecision?m=g:p<=n&&!(g>0&&-n<=c.maxPrecision)&&(m=p)),m&&(f=this.abbreviations[m],e/=Math.pow(10,m))}if(r=Math.abs(e),t=c.temp,l=(u=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==u.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var y=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=u.split(o)[0];if(e=gv(b+=o,y)||"0",l){var x=Math.max(0,Math.min(14,l.length)),w=l.replace(/#+$/,"").length,M=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=M.length;s<w;s++)M+="0";M&&(e+=o+M)}else 0===y&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),d=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(u+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)u+="#";e=gv(u,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+d+f+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Iv(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,u=r.toKey,l=void 0===u?function(e){return e}:u,c=Object.create(null),f=Object.create(null),d=0,h=0;return(t=s?function(){return n=l.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=l(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return d>=o&&(delete c[f[h]],delete f[h],d--,h++),c[e]=t,f[d]=e,d++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),f=Object.create(null),d=0,h=0},t.size=function(){return d},t}function Pv(e,t,n,r,i){var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Sm(Av,t)}(i,e,t,n,r),a=Iv(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var Lv="D",Rv="T",jv="TS",zv="IV",Fv=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Bv=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Vv=["January","February","March","April","May","June","July","August","September","October","November","December"],Hv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Uv(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Wv(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}function Yv(e,t){var n,r=function(e){var t=e,n=24*Wv(t),r=60*Wv(n),i=60*Wv(r),o=1e3*Wv(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,u=r.f,l=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(l=n?n.getDay()-1:0)<0&&(l=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:s,f:u,t:c}}var Kv=function(){function e(t,n,r){vm(this,e);var i,o=t||{};(o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Fv,qDayNames:Bv,qLongMonthNames:Vv,qMonthNames:Hv}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n)||(n=(bm(i={},Rv,o.qTimeFmt||"hh:mm:ss"),bm(i,Lv,o.qDateFmt||"YYYY-MM-DD"),bm(i,jv,o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]);this.pattern=n}return ym(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r=/t+/gi.test(t);e instanceof Date?n=function(e,t){var n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&((n%=12)||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,r):(e<0&&(e=-e,t="-".concat(t)),n=Yv(e,t));var i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Uv("".concat(t.year).slice(-2),2),YYY:Uv("".concat(t.year).slice(-3),3),def:function(e){return Uv("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Uv("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Uv("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return Uv("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Uv("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Uv("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Uv("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),o=[];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);var s=new RegExp(o.join("|"),"g");return t.replace(s,(function(e){var t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var o in i[n])if(o===e||o.toLowerCase()===e){void 0===(r=i[n][o])&&(r=i[n][o.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function $v(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Sm(Kv,t)}function Gv(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Xv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=$v(n,e,t),i=Iv(r.format.bind(r),{toKey:function(e){return"object"===mm(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return t!==zv?Gv(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=$v(n,e,t),i=Iv(r.format.bind(r),{toKey:function(e){return"object"===mm(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function Jv(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Xv(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##A"),o="U"),Pv(n,r,i,o,t)}function Qv(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,u=t.type,l=t.sourceField,c=s||("dimension"===u?function(e){return e.qElemNo}:function(e){return e.qValue}),f=function(e){return e.qText||""},d="dimension"===u?"first":"avg",h=Jv(n,o),p="dimension"===u?"first":function(e,t){return h(t)},m={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return u},origin:function(){return l},items:function(){return e||(e=a(m)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:f,reduce:d,reduceLabel:p,formatter:function(){return h},tags:function(){return n.qTags}};return m}function Zv(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:Qv(Rm({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=Zv("qAttrDimInfo",t,n,a,Rm({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=Zv("qAttrExprInfo",t,n,a,Rm({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=Zv("qMeasureInfo",t,n,a,Rm({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function eg(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,o=r.data,a=r.config,s=void 0===a?{}:a,u={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},l=o;if(!l)throw new Error('Missing "data" input');if(!l.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=eg.util,f={cache:u,cube:l,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},d={key:function(){return i},raw:function(){return l},field:function(e){return nv(e,f)},fields:function(){return u.fields.slice()},extract:function(e){return f.extractor(e,d,u,c)},hierarchy:function(e){return f.hierarchy(e,d,u,c)},_cache:function(){return u}};"K"===l.qMode||"T"===l.qMode||!l.qMode&&l.qNodesOnDim?(f.extractor=vv,f.hierarchy=mv,f.pages="K"===l.qMode?l.qStackedDataPages:l.qTreeDataPages):"S"===l.qMode?(f.extractor=Bm,f.pages=l.qDataPages,f.hierarchy=mv):f.extractor=function(){return[]},f.fieldExtractor=function(e){return f.extractor({field:e},d,u,c)};var h="S"===l.qMode?function(e){return e.qElemNumber}:void 0,p="S"===l.qMode?function(e){return e.qNum}:void 0;(e=u.wrappedFields).push.apply(e,qm(Zv("qDimensionInfo",l,i,"",Rm({},f,{value:h,type:"dimension"})))),(t=u.wrappedFields).push.apply(t,qm(Zv("qMeasureInfo",l,i,"",Rm({},f,{value:p,type:"measure"})))),u.fields=u.wrappedFields.map((function(e){return e.instance}));var m=function e(t){t.forEach((function(t){u.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return m(u.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=d.field(e.from),n=Qv(wm({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return f.extractor({field:e},d,u,c)},key:e.key,type:t.type(),localeInfo:f.localeInfo,value:t.value},e.override||{}));u.virtualFields.push(n)})),(n=u.allFields).push.apply(n,qm(u.virtualFields)),d}var tg=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],ng=/\/qDimensionInfo(?:\/(\d+))?/,rg=/\/qMeasureInfo\/(\d+)/,ig=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,og=/\/qAttrExprInfo\/(\d+)/,ag=/\/?qHyperCube/,sg=/\/?qTreeData/,ug=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},lg=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function cg(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};ag.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=ug):sg.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=lg);var s=!0;if(ng.test(e)&&(r=+ng.exec(e)[1]),rg.test(e)&&(i=+rg.exec(e)[1]),ig.test(e)){i=-1,r=0;var u=+ig.exec(n)[2];isNaN(u)||(r=u,n=n.replace(/\/\d+$/,"")),s=!1}if(og.test(e)){var l=i;if(t){i=0;var c=Zm(o,t);i+=(c.qMeasureInfo||[]).length,r>-1?(i=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,l).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+og.exec(n)[1]}else r>-1?(r=-1,i=+og.exec(n)[1]):i+=+og.exec(n)[1]+1}return tg.forEach((function(e){var t=Cm(e,2),r=t[0],i=t[1];n=n.replace(r,i)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function fg(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},u=e.isActive(),l=!1;if(e.brushes().forEach((function(e){var t=cg(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(l=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var u=e.brush.ranges();u.length&&(l=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),u.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(l=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var f=r.qHyperCube,d=f.qNoOfLeftDims,h=f.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var p=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===d||h>=d)&&d>-1?p.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:h-d})})):p.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),l=!!s.selectHyperCubeCells.values.length);else{var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));l=!!m.length,a.push({params:[t.path,t.dimensionIdx,m,!1],method:"selectHyperCubeValues"})}}})),!l&&u)return[{method:"resetMadeSelections",params:[]}];s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]});return s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a}function dg(e){eg.util=e.data("matrix").util,e.data("q",eg),e.formatter("q-number",Pv),e.formatter("q-time",Xv)}dg.qBrushHelper=fg,dg.selections=fg;var hg={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function pg(e){return hg[e]||e}function mg(e){return function(t,n,r){var i,o,a,s,u=[],l=!0;function c(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((function(t){t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));var n=pg(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),(a=a||new e.Manager(r)).add(new e[n](t.options)),Object.keys(t.events).forEach((function(e){t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),u.push(t))})),i.gestures.forEach((function(t){var n=pg(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((function(e){return""!==e}))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((function(e){return""!==e}))))})))}function f(){u.forEach((function(e){Object.keys(e.events).forEach((function(t){a.off(t,e.events[t])})),a.remove(e.options.event)})),u=[]}return{get key(){return s},set:function(e){!function(e){s=e.key,o={chart:t,mediator:n,settings:i=e},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),f(),l&&c()},off:function(){l=!1,f()},on:function(){l=!0,0===u.length&&c()},destroy:function(){f(),a&&a.destroy(),a=null,o=null,i=null}}}}var vg="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function gg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yg={exports:{}};!function(e){!function(t,n,i,o){var a,s=["","webkit","Moz","MS","ms","o"],u=n.createElement("div"),l=Math.round,c=Math.abs,f=Date.now;function d(e,t,n){return setTimeout(b(e,n),t)}function h(e,t,n){return!!Array.isArray(e)&&(p(e,n[t],n),!0)}function p(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==o)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function m(e,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,i,r),e.apply(this,arguments)}}a="function"!=typeof Object.assign?function(e){if(e===o||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==o&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}:Object.assign;var v=m((function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===o)&&(e[r[i]]=t[r[i]]),i++;return e}),"extend","Use `assign`."),g=m((function(e,t){return v(e,t,!0)}),"merge","Use `assign`.");function y(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&a(r,n)}function b(e,t){return function(){return e.apply(t,arguments)}}function x(e,t){return"function"==r(e)?e.apply(t&&t[0]||o,t):e}function w(e,t){return e===o?t:e}function M(e,t,n){p(q(t),(function(t){e.addEventListener(t,n,!1)}))}function k(e,t,n){p(q(t),(function(t){e.removeEventListener(t,n,!1)}))}function S(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function C(e,t){return e.indexOf(t)>-1}function q(e){return e.trim().split(/\s+/g)}function E(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function T(e){return Array.prototype.slice.call(e,0)}function D(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];E(i,a)<0&&r.push(e[o]),i[o]=a,o++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}function O(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<s.length;){if((r=(n=s[a])?n+i:t)in e)return r;a++}return o}var N=1;function _(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var A="ontouchstart"in t,I=O(t,"PointerEvent")!==o,P=A&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),L="touch",R="mouse",j=24,z=["x","y"],F=["clientX","clientY"];function B(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){x(e.options.enable,[e])&&n.handler(t)},this.init()}function V(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=1&t&&r-i==0,s=12&t&&r-i==0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||(n.firstInput=H(t));i>1&&!n.firstMultiple?n.firstMultiple=H(t):1===i&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,u=s?s.center:a.center,l=t.center=U(r);t.timeStamp=f(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=$(u,l),t.distance=K(u,l),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y});t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=Y(t.deltaX,t.deltaY);var d=W(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=c(d.x)>c(d.y)?d.x:d.y,t.scale=s?function(e,t){return K(t[0],t[1],F)/K(e[0],e[1],F)}(s.pointers,r):1,t.rotation=s?function(e,t){return $(t[1],t[0],F)+$(e[1],e[0],F)}(s.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,a,s=e.lastInterval||t,u=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(u>25||s.velocity===o)){var l=t.deltaX-s.deltaX,f=t.deltaY-s.deltaY,d=W(u,l,f);r=d.x,i=d.y,n=c(d.x)>c(d.y)?d.x:d.y,a=Y(l,f),e.lastInterval=t}else n=s.velocity,r=s.velocityX,i=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=a}(n,t);var h=e.element;S(t.srcEvent.target,h)&&(h=t.srcEvent.target);t.target=h}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function H(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:l(e.pointers[n].clientX),clientY:l(e.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:t,center:U(t),deltaX:e.deltaX,deltaY:e.deltaY}}function U(e){var t=e.length;if(1===t)return{x:l(e[0].clientX),y:l(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:l(n/t),y:l(r/t)}}function W(e,t,n){return{x:t/e||0,y:n/e||0}}function Y(e,t){return e===t?1:c(e)>=c(t)?e<0?2:4:t<0?8:16}function K(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function $(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}B.prototype={handler:function(){},init:function(){this.evEl&&M(this.element,this.evEl,this.domHandler),this.evTarget&&M(this.target,this.evTarget,this.domHandler),this.evWin&&M(_(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(_(this.element),this.evWin,this.domHandler)}};var G={mousedown:1,mousemove:2,mouseup:4},X="mousedown",J="mousemove mouseup";function Q(){this.evEl=X,this.evWin=J,this.pressed=!1,B.apply(this,arguments)}y(Q,B,{handler:function(e){var t=G[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:R,srcEvent:e}))}});var Z={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},ee={2:L,3:"pen",4:R,5:"kinect"},te="pointerdown",ne="pointermove pointerup pointercancel";function re(){this.evEl=te,this.evWin=ne,B.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(te="MSPointerDown",ne="MSPointerMove MSPointerUp MSPointerCancel"),y(re,B,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Z[r],o=ee[e.pointerType]||e.pointerType,a=o==L,s=E(t,e.pointerId,"pointerId");1&i&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&i&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var ie={touchstart:1,touchmove:2,touchend:4,touchcancel:8},oe="touchstart",ae="touchstart touchmove touchend touchcancel";function se(){this.evTarget=oe,this.evWin=ae,this.started=!1,B.apply(this,arguments)}function ue(e,t){var n=T(e.touches),r=T(e.changedTouches);return 12&t&&(n=D(n.concat(r),"identifier",!0)),[n,r]}y(se,B,{handler:function(e){var t=ie[e.type];if(1===t&&(this.started=!0),this.started){var n=ue.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:L,srcEvent:e})}}});var le={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ce="touchstart touchmove touchend touchcancel";function fe(){this.evTarget=ce,this.targetIds={},B.apply(this,arguments)}function de(e,t){var n=T(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=T(e.changedTouches),s=[],u=this.target;if(o=n.filter((function(e){return S(e.target,u)})),1===t)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&t&&delete r[a[i].identifier],i++;return s.length?[D(o.concat(s),"identifier",!0),s]:void 0}y(fe,B,{handler:function(e){var t=le[e.type],n=de.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:L,srcEvent:e})}});function he(){B.apply(this,arguments);var e=b(this.handler,this);this.touch=new fe(this.manager,e),this.mouse=new Q(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function pe(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,me.call(this,t)):12&e&&me.call(this,t)}function me(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),2500)}}function ve(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}y(he,B,{handler:function(e,t,n){var r=n.pointerType==L,i=n.pointerType==R;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)pe.call(this,t,n);else if(i&&ve.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ge=O(u.style,"touchAction"),ye=ge!==o,be="compute",xe="auto",we="manipulation",Me="none",ke="pan-x",Se="pan-y",Ce=function(){if(!ye)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(r){e[r]=!n||t.CSS.supports("touch-action",r)})),e}();function qe(e,t){this.manager=e,this.set(t)}qe.prototype={set:function(e){e==be&&(e=this.compute()),ye&&this.manager.element.style&&Ce[e]&&(this.manager.element.style[ge]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return p(this.manager.recognizers,(function(t){x(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(C(e,Me))return Me;var t=C(e,ke),n=C(e,Se);if(t&&n)return Me;if(t||n)return t?ke:Se;if(C(e,we))return we;return xe}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=C(r,Me)&&!Ce.none,o=C(r,Se)&&!Ce["pan-y"],a=C(r,ke)&&!Ce["pan-x"];if(i){var s=1===e.pointers.length,u=e.distance<2,l=e.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return i||o&&6&n||a&&n&j?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Ee=32;function Te(e){this.options=a({},this.defaults,e||{}),this.id=N++,this.manager=null,this.options.enable=w(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function De(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Oe(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function Ne(e,t){var n=t.manager;return n?n.get(e):e}function _e(){Te.apply(this,arguments)}function Ae(){_e.apply(this,arguments),this.pX=null,this.pY=null}function Ie(){_e.apply(this,arguments)}function Pe(){Te.apply(this,arguments),this._timer=null,this._input=null}function Le(){_e.apply(this,arguments)}function Re(){_e.apply(this,arguments)}function je(){Te.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ze(e,t){return(t=t||{}).recognizers=w(t.recognizers,ze.defaults.preset),new Fe(e,t)}Te.prototype={defaults:{},set:function(e){return a(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(h(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Ne(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return h(e,"dropRecognizeWith",this)||(e=Ne(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(h(e,"requireFailure",this))return this;var t=this.requireFail;return-1===E(t,e=Ne(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(h(e,"dropRequireFailure",this))return this;e=Ne(e,this);var t=E(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+De(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+De(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Ee},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=a({},e);if(!x(this.options.enable,[this,t]))return this.reset(),void(this.state=Ee);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},y(_e,Te,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(8&n||!i)?16|t:r||i?4&n?8|t:2&t?4|t:2:Ee}}),y(Ae,_e,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(Se),e&j&&t.push(ke),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;return i&t.direction||(6&t.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return _e.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Oe(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),y(Ie,_e,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Me]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),y(Pe,Te,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[xe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime>t.time;if(this._input=e,!r||!n||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=d((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return Ee},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),y(Le,_e,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Me]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),y(Re,_e,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Ae.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:n&j&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&c(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Oe(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),y(je,Te,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[we]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||K(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=d((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return Ee},failTimeout:function(){return this._timer=d((function(){this.state=Ee}),this.options.interval,this),Ee},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ze.VERSION="2.0.7",ze.defaults={domEvents:!1,touchAction:be,enable:!0,inputTarget:null,inputClass:null,preset:[[Le,{enable:!1}],[Ie,{enable:!1},["rotate"]],[Re,{direction:6}],[Ae,{direction:6},["swipe"]],[je],[je,{event:"doubletap",taps:2},["tap"]],[Pe]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Fe(e,t){var n;this.options=a({},ze.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(I?re:P?fe:A?he:Q))(n,V),this.touchAction=new qe(this,this.options.touchAction),Be(this,!0),p(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function Be(e,t){var n,r=e.element;r.style&&(p(e.options.cssProps,(function(i,o){n=O(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Fe.prototype={set:function(e){return a(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(i=t.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(i=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Te)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(h(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(h(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=E(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==o&&t!==o){var n=this.handlers;return p(q(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==o){var n=this.handlers;return p(q(e),(function(e){t?n[e]&&n[e].splice(E(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var r=n.createEvent("Event");r.initEvent(e,!0,!0),r.gesture=t,t.target.dispatchEvent(r)}(e,t);var r=this.handlers[e]&&this.handlers[e].slice();if(r&&r.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](t),i++}},destroy:function(){this.element&&Be(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},a(ze,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Ee,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:j,DIRECTION_ALL:30,Manager:Fe,Input:B,TouchAction:qe,TouchInput:fe,MouseInput:Q,PointerEventInput:re,TouchMouseInput:he,SingleTouchInput:se,Recognizer:Te,AttrRecognizer:_e,Tap:je,Pan:Ae,Swipe:Re,Pinch:Ie,Rotate:Le,Press:Pe,on:M,off:k,each:p,merge:g,extend:v,assign:a,inherit:y,bindFn:b,prefixed:O}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=ze,e.exports?e.exports=ze:t.Hammer=ze}(window,document)}(yg);var bg=yg.exports,xg=Object.prototype.hasOwnProperty,wg=Object.prototype.toString,Mg=Object.defineProperty,kg=Object.getOwnPropertyDescriptor,Sg=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===wg.call(e)},Cg=function(e){if(!e||"[object Object]"!==wg.call(e))return!1;var t,n=xg.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&xg.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||xg.call(e,t)},qg=function(e,t){Mg&&"__proto__"===t.name?Mg(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Eg=function(e,t){if("__proto__"===t){if(!xg.call(e,t))return;if(kg)return kg(e,t).value}return e[t]},Tg=function e(){var t,n,i,o,a,s,u=arguments[0],l=1,c=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},l=2),(null==u||"object"!==r(u)&&"function"!=typeof u)&&(u={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=Eg(u,n),u!==(o=Eg(t,n))&&(f&&o&&(Cg(o)||(a=Sg(o)))?(a?(a=!1,s=i&&Sg(i)?i:[]):s=i&&Cg(i)?i:{},qg(u,{name:n,newValue:e(f,s,o)})):void 0!==o&&qg(u,{name:n,newValue:o}));return u},Dg="center",Og="bottom",Ng={NoDataExist:{label:"NoDataExist",alignment:Dg,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:Dg,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:Dg,default:!1},LimitedData:{label:"LimitedData",alignment:Og,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:Og,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:Og,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:Og,default:!1}};var _g=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],Ag={};_g.forEach((function(e){var t=y(e,2),n=t[0],r=t[1],i=r.width,o=r.height;Ag[n]={width:i,height:o}}));var Ig=function(){return Ag},Pg=function(e,t){var n;for(n=0;n<_g.length;++n)if(e>=_g[n][1].width&&t>=_g[n][1].height)return _g[n][0];return"SPARK"};function Lg(e,t){return{layoutModes:Ig(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?n({align:.5,preserveAspectRatio:!0},t.logicalSize):void 0}}var Rg=["$date","$timestamp","$time"],jg=["D","TS","T"],zg={hasTimeTag:function(e){return!!(e&&e.qTags&&e.qTags.some((function(e){return Rg.some((function(t){return t===e}))})))},hasUnknownFormat:function(e){return!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType)},hasTimeFormat:function(e){return!!(e&&e.qNumFormat&&jg.some((function(t){return t===e.qNumFormat.qType})))},isTimeDimension:function(e,t){return!!(e&&t&&(zg.hasTimeTag(t)&&zg.hasUnknownFormat(t)||zg.hasTimeFormat(t)))},isTime:function(e,t){return!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&zg.isTimeDimension(e,t.qHyperCube.qDimensionInfo[0]))},canBeContinuousDimension:function(e){if(!e)return!1;var t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((function(e){return"$numeric"===e})))},canBeContinuous:function(e){return!(!(e&&e.qHyperCube&&e.qHyperCube.qDimensionInfo)||e.qHyperCube.qDimensionInfo.length<1)&&zg.canBeContinuousDimension(e.qHyperCube.qDimensionInfo[0])},maxNumberOfLines:12},Fg=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},Bg=function(e,t,n){if(n>=e.length)for(var r=n-e.length;1+r--;)e.push(void 0);e.splice(n,0,e.splice(t,1)[0])},Vg=function(e){Object.keys(e).forEach((function(t){void 0===e[t]&&delete e[t]}))},Hg=function(e){return Fg(e,"qHyperCube.qDimensionInfo",[])},Ug=function(e){return Fg(e,"qHyperCube.qMeasureInfo",[])},Wg=function(e){return Fg(e,"barGrouping.grouping")},Yg={continuous:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!!zg.canBeContinuous(e)&&(Fg(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis)},dimensionless:function(e){return!Hg(e).length},grouped:function(e){return!this.dimensionless(e)&&"grouped"===Wg(e)&&(Hg(e).length>1||Ug(e).length>1)&&!this.continuous(e)},groupedByDimension:function(e){return this.grouped(e)&&Hg(e).length>1&&1===Ug(e).length},groupedByMeasure:function(e){return this.grouped(e)&&1===Hg(e).length&&Ug(e).length>1},stacked:function(e){return(!this.dimensionless(e)&&"grouped"!==Wg(e)||this.continuous(e))&&(Hg(e).length>1||Ug(e).length>1)},stackedByDimension:function(e){return this.stacked(e)&&Hg(e).length>1&&1===Ug(e).length},stackedByMeasure:function(e){return this.stacked(e)&&1===Hg(e).length&&Ug(e).length>1},simple:function(e){return 0===Hg(e).length||1===Hg(e).length&&1===Ug(e).length},snapshot:function(e){return!!Fg(e,"snapshotData")}};function Kg(e,t){var n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}var $g=function(e){throw e.isHandled=!0,e};function Gg(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch($g).then((function(e){var n,r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo");return{reducedCube:{qDataPages:a,qDimensionInfo:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize")}}}))}var Xg={getDockValue:function(e){return"near"===e||"left"===e||"top"===e?0:1},getOppositeDock:function(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":return"far";case"far":return"near";default:return"far"}},getHorizontalDock:function(e){return"near"===e||"left"===e?"left":"right"},getVerticalDock:function(e){return"near"===e||"bottom"===e?"bottom":"top"},getDock:function(e,t,n){return"vertical"===e||"y"===e?Xg.getVerticalDock(t):n?Xg.getOppositeDock(Xg.getHorizontalDock(t)):Xg.getHorizontalDock(t)},getInvertedOrientation:function(e){return"vertical"===e?"horizontal":"vertical"},getMinorScaleAxis:function(e){return"vertical"===e?"y":"x"},getMajorScaleAxis:function(e){return"vertical"===e?"x":"y"},getAlignment:function(e,t){switch(e){case"vertical":return"near"===t||"bottom"===t?1:0;default:return"near"===t||"left"===t?0:1}},getMeasureScaleInvert:function(e,t){return"vertical"===e||t},getDimensionScaleInvert:function(e,t){return"horizontal"===e&&t},getSize:function(e,t){var n=t.width,r=t.height;return"vertical"===e?n:r}},Jg=function(e,t){if("function"==typeof t.defaultValue)return t.defaultValue();if(void 0!==t.defaultValue)return t.defaultValue;if(Array.isArray(t.options))return t.options[0].value;switch(e){case"array":return[];case"string":return"";case"integer":case"number":return 0;case"boolean":return!1;default:return null}};var Qg=12/11,Zg={stringWidthOverMWidth:function(e){return(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11},getCharacterRatios:function(e){if(!e)return{latin:0,cjk:0};var t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g),i=(t=t?t.length:0)+(n=n?n.length:0)+(r=r?r.length:0);return{latin:e.length-i,cjk:i}},getTotalCharacterRatios:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"qText";if(!e)return{latinRatio:1,cjkRatio:0};var r,i={latin:0,cjk:0};void 0===t?e.forEach((function(e){r=Zg.getCharacterRatios(e[n]),i.latin+=r.latin,i.cjk+=r.cjk})):e.forEach((function(e){r=Zg.getCharacterRatios(e[t][n]),i.latin+=r.latin,i.cjk+=r.cjk}));var o=Math.max(1,i.latin+i.cjk);return i.latinRatio=i.latin/o,i.cjkRatio=i.cjk/o,i},getAdjustedMaxGlyphCount:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"qText",i=Zg.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e,s=Math.ceil(Zg.stringWidthOverMWidth(o)+a*Qg);return s}},ey="#la-vie-tooltip";function ty(){if(!document.querySelector(ey)){var e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function ny(e){var t=e.key;return{show:!0,key:void 0===t?"tooltip":t,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){ty()},beforeUpdate:function(){ty()},destroyed:function(){var e;(e=document.querySelector(ey))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(ey)},content:function(e){var t=e.h,r=e.data,i=e.style;return r[0].map((function(e){return t("tr",{},function(e,t){var r=t.h,i=t.style;return e.map((function(e){var t={style:n(n({},i.cell||{}),e.style||{}),class:e.class};return e.colspan&&(t.colspan=e.colspan),r("td",t,e.content)}))}(e,{h:t,style:i}))}))},direction:e.rtl?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var ry=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),iy=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),oy=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),ay={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:function(e){return ry.test(e)},isRtlChar:function(e){return iy.test(e)||oy.test(e)},detectTextDirection:function(e){var t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],ay.isLtrChar(n))return"ltr";if(ay.isRtlChar(n))return"rtl"}return"ltr"}},sy={getColorSymbol:function(e,t){return e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}})},getNodeFillColor:function(e){return e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0},getColor:function(e,t,n){var r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label="".concat(n.coloring.label)),"color"!==n.coloring.type&&r.fillTooltip){var s=i("fill"),u="measure"===n.coloring.fieldType;if(a.value=u&&s?s(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){var l=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label="".concat(l)}}return a.fill=void 0===r._fillColor?sy.getNodeFillColor(t):r._fillColor,a},getMeasure:function(e,t){var n=e(t.source.key).field(t.source.field).title();return{label:"".concat(n),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}},hideColorRow:function(e,t){return void 0===e.color.value||e.measures.some((function(e){return e.field===t.coloring.field}))},getTitleRow:function(e,t){var n=ay.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow:function(e,t){var n=ay.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getFooterRow:function(e,t){return[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:ay.detectTextDirection(e)},colspan:2},{}]},getImageRow:function(e,t){var n=ay.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));var o=e.imageError?"".concat(e.src,"?").concat(Math.random()):e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:o,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]="url('".concat(e.src,"')");return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]},getNMoreRow:function(e,t,n){var r=t?t.get("Object.ChartTooltip.NMore",e):"+".concat(e," more");return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:ay.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:function(){return[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}]},getColorRow:function(e,t,n){var r=ay.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=ay.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,sy.getColorSymbol(e,t)]:[sy.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=ay.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=ay.detectTextDirection(e.value);return[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:i?r?[e.value,sy.getColorSymbol(t,n)]:[sy.getColorSymbol(t,n),e.value]:[e.value],style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function uy(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ly(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function cy(){}var fy=.7,dy=1/fy,hy="\\s*([+-]?\\d+)\\s*",py="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",my="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vy=/^#([0-9a-f]{3,8})$/,gy=new RegExp("^rgb\\("+[hy,hy,hy]+"\\)$"),yy=new RegExp("^rgb\\("+[my,my,my]+"\\)$"),by=new RegExp("^rgba\\("+[hy,hy,hy,py]+"\\)$"),xy=new RegExp("^rgba\\("+[my,my,my,py]+"\\)$"),wy=new RegExp("^hsl\\("+[py,my,my]+"\\)$"),My=new RegExp("^hsla\\("+[py,my,my,py]+"\\)$"),ky={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 Sy(){return this.rgb().formatHex()}function Cy(){return this.rgb().formatRgb()}function qy(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=vy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ey(t):3===n?new Oy(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ty(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ty(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=gy.exec(e))?new Oy(t[1],t[2],t[3],1):(t=yy.exec(e))?new Oy(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=by.exec(e))?Ty(t[1],t[2],t[3],t[4]):(t=xy.exec(e))?Ty(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=wy.exec(e))?Iy(t[1],t[2]/100,t[3]/100,1):(t=My.exec(e))?Iy(t[1],t[2]/100,t[3]/100,t[4]):ky.hasOwnProperty(e)?Ey(ky[e]):"transparent"===e?new Oy(NaN,NaN,NaN,0):null}function Ey(e){return new Oy(e>>16&255,e>>8&255,255&e,1)}function Ty(e,t,n,r){return r<=0&&(e=t=n=NaN),new Oy(e,t,n,r)}function Dy(e){return e instanceof cy||(e=qy(e)),e?new Oy((e=e.rgb()).r,e.g,e.b,e.opacity):new Oy}function Oy(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ny(){return"#"+Ay(this.r)+Ay(this.g)+Ay(this.b)}function _y(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"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===e?")":", "+e+")")}function Ay(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Iy(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ly(e,t,n,r)}function Py(e){if(e instanceof Ly)return new Ly(e.h,e.s,e.l,e.opacity);if(e instanceof cy||(e=qy(e)),!e)return new Ly;if(e instanceof Ly)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Ly(a,s,u,e.opacity)}function Ly(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ry(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}uy(cy,qy,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Sy,formatHex:Sy,formatHsl:function(){return Py(this).formatHsl()},formatRgb:Cy,toString:Cy}),uy(Oy,(function(e,t,n,r){return 1===arguments.length?Dy(e):new Oy(e,t,n,null==r?1:r)}),ly(cy,{brighter:function(e){return e=null==e?dy:Math.pow(dy,e),new Oy(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?fy:Math.pow(fy,e),new Oy(this.r*e,this.g*e,this.b*e,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:Ny,formatHex:Ny,formatRgb:_y,toString:_y})),uy(Ly,(function(e,t,n,r){return 1===arguments.length?Py(e):new Ly(e,t,n,null==r?1:r)}),ly(cy,{brighter:function(e){return e=null==e?dy:Math.pow(dy,e),new Ly(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?fy:Math.pow(fy,e),new Ly(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Oy(Ry(e>=240?e-240:e+120,i,r),Ry(e,i,r),Ry(e<120?e+240:e-120,i,r),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 e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var jy=Math.PI/180,zy=180/Math.PI,Fy=.96422,By=.82521,Vy=4/29,Hy=6/29,Uy=3*Hy*Hy;function Wy(e){if(e instanceof Yy)return new Yy(e.l,e.a,e.b,e.opacity);if(e instanceof Zy)return eb(e);e instanceof Oy||(e=Dy(e));var t,n,r=Xy(e.r),i=Xy(e.g),o=Xy(e.b),a=Ky((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Ky((.4360747*r+.3850649*i+.1430804*o)/Fy),n=Ky((.0139322*r+.0971045*i+.7141733*o)/By)),new Yy(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Yy(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ky(e){return e>.008856451679035631?Math.pow(e,1/3):e/Uy+Vy}function $y(e){return e>Hy?e*e*e:Uy*(e-Vy)}function Gy(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Xy(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Jy(e){if(e instanceof Zy)return new Zy(e.h,e.c,e.l,e.opacity);if(e instanceof Yy||(e=Wy(e)),0===e.a&&0===e.b)return new Zy(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*zy;return new Zy(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Qy(e,t,n,r){return 1===arguments.length?Jy(e):new Zy(e,t,n,null==r?1:r)}function Zy(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function eb(e){if(isNaN(e.h))return new Yy(e.l,0,0,e.opacity);var t=e.h*jy;return new Yy(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}uy(Yy,(function(e,t,n,r){return 1===arguments.length?Wy(e):new Yy(e,t,n,null==r?1:r)}),ly(cy,{brighter:function(e){return new Yy(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Yy(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Oy(Gy(3.1338561*(t=Fy*$y(t))-1.6168667*(e=1*$y(e))-.4906146*(n=By*$y(n))),Gy(-.9787684*t+1.9161415*e+.033454*n),Gy(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),uy(Zy,Qy,ly(cy,{brighter:function(e){return new Zy(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Zy(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return eb(this).rgb()}}));var tb={isDark:function(e){return Qy(e).l<70}};function nb(e){var t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach((function(e){e.qSortByNumeric=1,e.qSortByAscii=1}))}function rb(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ib(e){return 1===e.length&&(e=function(e){return function(t,n){return rb(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var ob=ib(rb).right,ab=Math.sqrt(50),sb=Math.sqrt(10),ub=Math.sqrt(2);function lb(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=ab?10:o>=sb?5:o>=ub?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=ab?10:o>=sb?5:o>=ub?2:1)}function cb(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=ab?i*=10:o>=sb?i*=5:o>=ub&&(i*=2),t<e?-i:i}function fb(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var db="$";function hb(){}function pb(e,t){var n=new hb;if(e instanceof hb)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function mb(){}hb.prototype=pb.prototype={constructor:hb,has:function(e){return db+e in this},get:function(e){return this[db+e]},set:function(e,t){return this[db+e]=t,this},remove:function(e){var t=db+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===db&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===db&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===db&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===db&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===db&&++e;return e},empty:function(){for(var e in this)if(e[0]===db)return!1;return!0},each:function(e){for(var t in this)t[0]===db&&e(this[t],t.slice(1),this)}};var vb=pb.prototype;mb.prototype={constructor:mb,has:vb.has,add:function(e){return this[db+(e+="")]=e,this},remove:vb.remove,clear:vb.clear,values:vb.keys,size:vb.size,empty:vb.empty,each:vb.each};var gb=Array.prototype,yb=gb.map,bb=gb.slice;function xb(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function wb(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Mb(){}var kb=.7,Sb=1/kb,Cb="\\s*([+-]?\\d+)\\s*",qb="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Eb="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Tb=/^#([0-9a-f]{3})$/,Db=/^#([0-9a-f]{6})$/,Ob=new RegExp("^rgb\\("+[Cb,Cb,Cb]+"\\)$"),Nb=new RegExp("^rgb\\("+[Eb,Eb,Eb]+"\\)$"),_b=new RegExp("^rgba\\("+[Cb,Cb,Cb,qb]+"\\)$"),Ab=new RegExp("^rgba\\("+[Eb,Eb,Eb,qb]+"\\)$"),Ib=new RegExp("^hsl\\("+[qb,Eb,Eb]+"\\)$"),Pb=new RegExp("^hsla\\("+[qb,Eb,Eb,qb]+"\\)$"),Lb={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 Rb(e){var t;return e=(e+"").trim().toLowerCase(),(t=Tb.exec(e))?new Vb((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=Db.exec(e))?jb(parseInt(t[1],16)):(t=Ob.exec(e))?new Vb(t[1],t[2],t[3],1):(t=Nb.exec(e))?new Vb(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=_b.exec(e))?zb(t[1],t[2],t[3],t[4]):(t=Ab.exec(e))?zb(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ib.exec(e))?Ub(t[1],t[2]/100,t[3]/100,1):(t=Pb.exec(e))?Ub(t[1],t[2]/100,t[3]/100,t[4]):Lb.hasOwnProperty(e)?jb(Lb[e]):"transparent"===e?new Vb(NaN,NaN,NaN,0):null}function jb(e){return new Vb(e>>16&255,e>>8&255,255&e,1)}function zb(e,t,n,r){return r<=0&&(e=t=n=NaN),new Vb(e,t,n,r)}function Fb(e){return e instanceof Mb||(e=Rb(e)),e?new Vb((e=e.rgb()).r,e.g,e.b,e.opacity):new Vb}function Bb(e,t,n,r){return 1===arguments.length?Fb(e):new Vb(e,t,n,null==r?1:r)}function Vb(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Hb(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ub(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Yb(e,t,n,r)}function Wb(e){if(e instanceof Yb)return new Yb(e.h,e.s,e.l,e.opacity);if(e instanceof Mb||(e=Rb(e)),!e)return new Yb;if(e instanceof Yb)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Yb(a,s,u,e.opacity)}function Yb(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Kb(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}xb(Mb,Rb,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),xb(Vb,Bb,wb(Mb,{brighter:function(e){return e=null==e?Sb:Math.pow(Sb,e),new Vb(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?kb:Math.pow(kb,e),new Vb(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+Hb(this.r)+Hb(this.g)+Hb(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"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===e?")":", "+e+")")}})),xb(Yb,(function(e,t,n,r){return 1===arguments.length?Wb(e):new Yb(e,t,n,null==r?1:r)}),wb(Mb,{brighter:function(e){return e=null==e?Sb:Math.pow(Sb,e),new Yb(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?kb:Math.pow(kb,e),new Yb(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Vb(Kb(e>=240?e-240:e+120,i,r),Kb(e,i,r),Kb(e<120?e+240:e-120,i,r),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}}));var $b=Math.PI/180,Gb=180/Math.PI,Xb=.96422,Jb=.82521,Qb=4/29,Zb=6/29,ex=3*Zb*Zb;function tx(e){if(e instanceof nx)return new nx(e.l,e.a,e.b,e.opacity);if(e instanceof ux){if(isNaN(e.h))return new nx(e.l,0,0,e.opacity);var t=e.h*$b;return new nx(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Vb||(e=Fb(e));var n,r,i=ax(e.r),o=ax(e.g),a=ax(e.b),s=rx((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?n=r=s:(n=rx((.4360747*i+.3850649*o+.1430804*a)/Xb),r=rx((.0139322*i+.0971045*o+.7141733*a)/Jb)),new nx(116*s-16,500*(n-s),200*(s-r),e.opacity)}function nx(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function rx(e){return e>.008856451679035631?Math.pow(e,1/3):e/ex+Qb}function ix(e){return e>Zb?e*e*e:ex*(e-Qb)}function ox(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ax(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function sx(e){if(e instanceof ux)return new ux(e.h,e.c,e.l,e.opacity);if(e instanceof nx||(e=tx(e)),0===e.a&&0===e.b)return new ux(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Gb;return new ux(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ux(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}xb(nx,(function(e,t,n,r){return 1===arguments.length?tx(e):new nx(e,t,n,null==r?1:r)}),wb(Mb,{brighter:function(e){return new nx(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new nx(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Vb(ox(3.1338561*(t=Xb*ix(t))-1.6168667*(e=1*ix(e))-.4906146*(n=Jb*ix(n))),ox(-.9787684*t+1.9161415*e+.033454*n),ox(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),xb(ux,(function(e,t,n,r){return 1===arguments.length?sx(e):new ux(e,t,n,null==r?1:r)}),wb(Mb,{brighter:function(e){return new ux(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new ux(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return tx(this).rgb()}}));var lx=-.14861,cx=1.78277,fx=-.29227,dx=-.90649,hx=1.97294,px=hx*dx,mx=hx*cx,vx=cx*fx-dx*lx;function gx(e){if(e instanceof yx)return new yx(e.h,e.s,e.l,e.opacity);e instanceof Vb||(e=Fb(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(vx*r+px*t-mx*n)/(vx+px-mx),o=r-i,a=(hx*(n-i)-fx*o)/dx,s=Math.sqrt(a*a+o*o)/(hx*i*(1-i)),u=s?Math.atan2(a,o)*Gb-120:NaN;return new yx(u<0?u+360:u,s,i,e.opacity)}function yx(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function bx(e){return function(){return e}}function xx(e){return 1==(e=+e)?wx:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):bx(isNaN(t)?n:t)}}function wx(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):bx(isNaN(e)?t:e)}xb(yx,(function(e,t,n,r){return 1===arguments.length?gx(e):new yx(e,t,n,null==r?1:r)}),wb(Mb,{brighter:function(e){return e=null==e?Sb:Math.pow(Sb,e),new yx(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?kb:Math.pow(kb,e),new yx(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*$b,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Vb(255*(t+n*(lx*r+cx*i)),255*(t+n*(fx*r+dx*i)),255*(t+n*(hx*r)),this.opacity)}}));var Mx=function e(t){var n=xx(t);function r(e,t){var r=n((e=Bb(e)).r,(t=Bb(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=wx(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function kx(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Ox(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Sx(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function Cx(e,t){return t-=e=+e,function(n){return e+t*n}}function qx(e,t){var n,i={},o={};for(n in null!==e&&"object"===r(e)||(e={}),null!==t&&"object"===r(t)||(t={}),t)n in e?i[n]=Ox(e[n],t[n]):o[n]=t[n];return function(e){for(n in i)o[n]=i[n](e);return o}}var Ex=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Tx=new RegExp(Ex.source,"g");function Dx(e,t){var n,r,i,o=Ex.lastIndex=Tx.lastIndex=0,a=-1,s=[],u=[];for(e+="",t+="";(n=Ex.exec(e))&&(r=Tx.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Cx(n,r)})),o=Tx.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(e){return function(t){return e(t)+""}}(u[0].x):function(e){return function(){return e}}(t):(t=u.length,function(e){for(var n,r=0;r<t;++r)s[(n=u[r]).i]=n.x(e);return s.join("")})}function Ox(e,t){var n,i=r(t);return null==t||"boolean"===i?bx(t):("number"===i?Cx:"string"===i?(n=Rb(t))?(t=n,Mx):Dx:t instanceof Rb?Mx:t instanceof Date?Sx:Array.isArray(t)?kx:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?qx:Cx)(e,t)}function Nx(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function _x(e){return+e}var Ax=[0,1];function Ix(e){return e}function Px(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Lx(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Rx(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Px(i,r),o=n(a,o)):(r=Px(r,i),o=n(o,a)),function(e){return o(r(e))}}function jx(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Px(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=ob(e,t,1,r)-1;return o[n](i[n](t))}}function zx(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Fx(e,t){return function(){var e,t,n,r,i,o,a=Ax,s=Ax,u=Ox,l=Ix;function c(){return r=Math.min(a.length,s.length)>2?jx:Rx,i=o=null,f}function f(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,u)))(e(l(t)))}return f.invert=function(n){return l(t((o||(o=r(s,a.map(e),Cx)))(n)))},f.domain=function(e){return arguments.length?(a=yb.call(e,_x),l===Ix||(l=Lx(a)),c()):a.slice()},f.range=function(e){return arguments.length?(s=bb.call(e),c()):s.slice()},f.rangeRound=function(e){return s=bb.call(e),u=Nx,c()},f.clamp=function(e){return arguments.length?(l=e?Lx(a):Ix,f):l!==Ix},f.interpolate=function(e){return arguments.length?(u=e,c()):u},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,c()}}()(e,t)}function Bx(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Vx(e){return(e=Bx(Math.abs(e)))?e[1]:NaN}var Hx,Ux=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wx(e){return new Yx(e)}function Yx(e){if(!(t=Ux.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function Kx(e,t){var n=Bx(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Wx.prototype=Yx.prototype,Yx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var $x={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Kx(100*e,t)},r:Kx,s:function(e,t){var n=Bx(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Hx=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Bx(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Gx(e){return e}var Xx,Jx,Qx,Zx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ew(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var i=e.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(e.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}):Gx,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Gx,s=e.percent||"%";function u(e){var t=(e=Wx(e)).fill,n=e.align,u=e.sign,l=e.symbol,c=e.zero,f=e.width,d=e.comma,h=e.precision,p=e.trim,m=e.type;"n"===m?(d=!0,m="g"):$x[m]||(null==h&&(h=12),p=!0,m="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var v="$"===l?i[0]:"#"===l&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",g="$"===l?i[1]:/[%p]/.test(m)?s:"",y=$x[m],b=/[defgprs%]/.test(m);function x(e){var i,s,l,x=v,w=g;if("c"===m)w=y(e)+w,e="";else{var M=(e=+e)<0;if(e=y(Math.abs(e),h),p&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(i>0){if(!+e[r])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),M&&0==+e&&(M=!1),x=(M?"("===u?u:"-":"-"===u||"("===u?"":u)+x,w=("s"===m?Zx[8+Hx/3]:"")+w+(M&&"("===u?")":""),b)for(i=-1,s=e.length;++i<s;)if(48>(l=e.charCodeAt(i))||l>57){w=(46===l?o+e.slice(i+1):e.slice(i))+w,e=e.slice(0,i);break}}d&&!c&&(e=r(e,1/0));var k=x.length+e.length+w.length,S=k<f?new Array(f-k+1).join(t):"";switch(d&&c&&(e=r(S+e,S.length?f-w.length:1/0),S=""),n){case"<":e=x+e+w+S;break;case"=":e=x+S+e+w;break;case"^":e=S.slice(0,k=S.length>>1)+x+e+w+S.slice(k);break;default:e=S+x+e+w}return a(e)}return h=null==h?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),x.toString=function(){return e+""},x}return{format:u,formatPrefix:function(e,t){var n=u(((e=Wx(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Vx(t)/3))),i=Math.pow(10,-r),o=Zx[8+r/3];return function(e){return n(i*e)+o}}}}function tw(e,t,n,r){var i,o=cb(e,t,n);switch((r=Wx(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Vx(t)/3)))-Vx(Math.abs(e)))}(o,a))||(r.precision=i),Qx(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Vx(t)-Vx(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-Vx(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return Jx(r)}function nw(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=lb(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return tw(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=lb(s,u,n))>0?r=lb(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=lb(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,t(i)),e},e}function rw(){var e=Fx(Ix,Ix);return e.copy=function(){return zx(e,rw())},fb.apply(e,arguments),nw(e)}!function(e){Xx=ew(e),Jx=Xx.format,Qx=Xx.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var iw=new Date,ow=new Date;function aw(e,t,n,r){function i(t){return e(t=new Date(+t)),t}return i.floor=i,i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return aw((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return iw.setTime(+t),ow.setTime(+r),e(iw),e(ow),Math.floor(n(iw,ow))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var sw=aw((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));sw.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?aw((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):sw:null};var uw=1e3,lw=6e4,cw=36e5,fw=864e5,dw=6048e5,hw=aw((function(e){e.setTime(Math.floor(e/uw)*uw)}),(function(e,t){e.setTime(+e+t*uw)}),(function(e,t){return(t-e)/uw}),(function(e){return e.getUTCSeconds()}));aw((function(e){e.setTime(Math.floor(e/lw)*lw)}),(function(e,t){e.setTime(+e+t*lw)}),(function(e,t){return(t-e)/lw}),(function(e){return e.getMinutes()})),aw((function(e){var t=e.getTimezoneOffset()*lw%cw;t<0&&(t+=cw),e.setTime(Math.floor((+e-t)/cw)*cw+t)}),(function(e,t){e.setTime(+e+t*cw)}),(function(e,t){return(t-e)/cw}),(function(e){return e.getHours()}));var pw=aw((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*lw)/fw}),(function(e){return e.getDate()-1}));function mw(e){return aw((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*lw)/dw}))}var vw=mw(0),gw=mw(1);mw(2),mw(3);var yw=mw(4);mw(5),mw(6),aw((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));var bw=aw((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));bw.every=function(e){return isFinite(e=Math.floor(e))&&e>0?aw((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var xw=aw((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*lw)}),(function(e,t){return(t-e)/lw}),(function(e){return e.getUTCMinutes()})),ww=aw((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*cw)}),(function(e,t){return(t-e)/cw}),(function(e){return e.getUTCHours()})),Mw=aw((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/fw}),(function(e){return e.getUTCDate()-1}));function kw(e){return aw((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/dw}))}var Sw=kw(0),Cw=kw(1);kw(2),kw(3);var qw=kw(4);kw(5),kw(6);var Ew=aw((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),Tw=aw((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function Dw(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ow(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Nw(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Tw.every=function(e){return isFinite(e=Math.floor(e))&&e>0?aw((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var _w,Aw,Iw,Pw={"-":"",_:" ",0:"0"},Lw=/^\s*\d+/,Rw=/^%/,jw=/[\\^$*+?|[\]().{}]/g;function zw(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Fw(e){return e.replace(jw,"\\$&")}function Bw(e){return new RegExp("^(?:"+e.map(Fw).join("|")+")","i")}function Vw(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Hw(e,t,n){var r=Lw.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Uw(e,t,n){var r=Lw.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ww(e,t,n){var r=Lw.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Yw(e,t,n){var r=Lw.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Kw(e,t,n){var r=Lw.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function $w(e,t,n){var r=Lw.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Gw(e,t,n){var r=Lw.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xw(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Jw(e,t,n){var r=Lw.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Qw(e,t,n){var r=Lw.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zw(e,t,n){var r=Lw.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function eM(e,t,n){var r=Lw.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function tM(e,t,n){var r=Lw.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function nM(e,t,n){var r=Lw.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function rM(e,t,n){var r=Lw.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function iM(e,t,n){var r=Lw.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function oM(e,t,n){var r=Rw.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function aM(e,t,n){var r=Lw.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function sM(e,t,n){var r=Lw.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function uM(e,t){return zw(e.getDate(),t,2)}function lM(e,t){return zw(e.getHours(),t,2)}function cM(e,t){return zw(e.getHours()%12||12,t,2)}function fM(e,t){return zw(1+pw.count(bw(e),e),t,3)}function dM(e,t){return zw(e.getMilliseconds(),t,3)}function hM(e,t){return dM(e,t)+"000"}function pM(e,t){return zw(e.getMonth()+1,t,2)}function mM(e,t){return zw(e.getMinutes(),t,2)}function vM(e,t){return zw(e.getSeconds(),t,2)}function gM(e){var t=e.getDay();return 0===t?7:t}function yM(e,t){return zw(vw.count(bw(e),e),t,2)}function bM(e,t){var n=e.getDay();return e=n>=4||0===n?yw(e):yw.ceil(e),zw(yw.count(bw(e),e)+(4===bw(e).getDay()),t,2)}function xM(e){return e.getDay()}function wM(e,t){return zw(gw.count(bw(e),e),t,2)}function MM(e,t){return zw(e.getFullYear()%100,t,2)}function kM(e,t){return zw(e.getFullYear()%1e4,t,4)}function SM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+zw(t/60|0,"0",2)+zw(t%60,"0",2)}function CM(e,t){return zw(e.getUTCDate(),t,2)}function qM(e,t){return zw(e.getUTCHours(),t,2)}function EM(e,t){return zw(e.getUTCHours()%12||12,t,2)}function TM(e,t){return zw(1+Mw.count(Tw(e),e),t,3)}function DM(e,t){return zw(e.getUTCMilliseconds(),t,3)}function OM(e,t){return DM(e,t)+"000"}function NM(e,t){return zw(e.getUTCMonth()+1,t,2)}function _M(e,t){return zw(e.getUTCMinutes(),t,2)}function AM(e,t){return zw(e.getUTCSeconds(),t,2)}function IM(e){var t=e.getUTCDay();return 0===t?7:t}function PM(e,t){return zw(Sw.count(Tw(e),e),t,2)}function LM(e,t){var n=e.getUTCDay();return e=n>=4||0===n?qw(e):qw.ceil(e),zw(qw.count(Tw(e),e)+(4===Tw(e).getUTCDay()),t,2)}function RM(e){return e.getUTCDay()}function jM(e,t){return zw(Cw.count(Tw(e),e),t,2)}function zM(e,t){return zw(e.getUTCFullYear()%100,t,2)}function FM(e,t){return zw(e.getUTCFullYear()%1e4,t,4)}function BM(){return"+0000"}function VM(){return"%"}function HM(e){return+e}function UM(e){return Math.floor(+e/1e3)}!function(e){_w=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,u=e.shortMonths,l=Bw(i),c=Vw(i),f=Bw(o),d=Vw(o),h=Bw(a),p=Vw(a),m=Bw(s),v=Vw(s),g=Bw(u),y=Vw(u),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return u[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:uM,e:uM,f:hM,H:lM,I:cM,j:fM,L:dM,m:pM,M:mM,p:function(e){return i[+(e.getHours()>=12)]},Q:HM,s:UM,S:vM,u:gM,U:yM,V:bM,w:xM,W:wM,x:null,X:null,y:MM,Y:kM,Z:SM,"%":VM},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return u[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:CM,e:CM,f:OM,H:qM,I:EM,j:TM,L:DM,m:NM,M:_M,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:HM,s:UM,S:AM,u:IM,U:PM,V:LM,w:RM,W:jM,x:null,X:null,y:zM,Y:FM,Z:BM,"%":VM},w={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:Qw,e:Qw,f:iM,H:eM,I:eM,j:Zw,L:rM,m:Jw,M:tM,p:function(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:aM,s:sM,S:nM,u:Uw,U:Ww,V:Yw,w:Hw,W:Kw,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:Gw,Y:$w,Z:Xw,"%":oM};function M(e,t){return function(n){var r,i,o,a=[],s=-1,u=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===e.charCodeAt(s)&&(a.push(e.slice(u,s)),null!=(i=Pw[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(e.slice(u,s)),a.join("")}}function k(e,t){return function(n){var r,i,o=Nw(1900);if(S(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Ow(Nw(o.y))).getUTCDay(),r=i>4||0===i?Cw.ceil(r):Cw(r),r=Mw.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=t(Nw(o.y))).getDay(),r=i>4||0===i?gw.ceil(r):gw(r),r=pw.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),i="Z"in o?Ow(Nw(o.y)).getUTCDay():t(Nw(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ow(o)):t(o)}}function S(e,t,n,r){for(var i,o,a=0,s=t.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in Pw?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=M(n,b),b.X=M(r,b),b.c=M(t,b),x.x=M(n,x),x.X=M(r,x),x.c=M(t,x),{format:function(e){var t=M(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",Dw);return t.toString=function(){return e},t},utcFormat:function(e){var t=M(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e,Ow);return t.toString=function(){return e},t}}}(e),Aw=_w.utcFormat,Iw=_w.utcParse}({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"]});var WM="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||Aw(WM),+new Date("2000-01-01T00:00:00.000Z")||Iw(WM);var YM=1e3,KM=6e4,$M=36e5,GM=864e5,XM=2592e6,JM=31536e6;function QM(e){return new Date(e)}function ZM(e){return e instanceof Date?+e:+new Date(+e)}function ek(e,t,n,r,i,o,a,s,u){var l=Fx(Ix,Ix),c=l.invert,f=l.domain,d=u(".%L"),h=u(":%S"),p=u("%I:%M"),m=u("%I %p"),v=u("%a %d"),g=u("%b %d"),y=u("%B"),b=u("%Y"),x=[[a,1,YM],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,KM],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,$M],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,GM],[r,2,1728e5],[n,1,6048e5],[t,1,XM],[t,3,7776e6],[e,1,JM]];function w(s){return(a(s)<s?d:o(s)<s?h:i(s)<s?p:r(s)<s?m:t(s)<s?n(s)<s?v:g:e(s)<s?y:b)(s)}function M(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=ib((function(e){return e[2]})).right(x,o);a===x.length?(i=cb(n/JM,r/JM,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(cb(n,r,t),1),t=s)}return null==i?t:t.every(i)}return l.invert=function(e){return new Date(c(e))},l.domain=function(e){return arguments.length?f(yb.call(e,ZM)):f().map(QM)},l.ticks=function(e,t){var n,r=f(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=M(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(e,t){return null==t?w:u(t)},l.nice=function(e,t){var n=f();return(e=M(e,n[0],n[n.length-1],t))?f(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):l},l.copy=function(){return zx(l,ek(e,t,n,r,i,o,a,s,u))},l}var tk,nk={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},rk=function(e){return"".concat(e," 12px -12px inset rgba(0, 0, 0, ").concat(.0625,")")},ik={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:function(){return[0,1]}}},renderer:"dom",render:function(e){var t=this.settings.settings,r=t.range,i=t.orientation,o=t.rtl,a=y(r(),2),s=a[0],u=a[1],c=Math.abs(s)<1e-15,f=Math.abs(u-1)<1e-15,d=function(e){var t,n,r,i=nk[e];return{base:(t={position:"absolute"},l(t,i.major,12),l(t,i.minor,"100%"),t),towardsStart:(n={},l(n,i.start,0),l(n,i.end,"auto"),l(n,"boxShadow",rk(i.shadow.startOffset)),n),towardsEnd:(r={},l(r,i.start,"auto"),l(r,i.end,0),l(r,"boxShadow",rk(i.shadow.endOffset)),r)}}(i),h="horizontal"===i&&o,p=[];return c||p.push(e("div",{style:n(n({},d.base),h?d.towardsEnd:d.towardsStart),class:"scroll-hint--towards-start"})),f||p.push(e("div",{style:n(n({},d.base),h?d.towardsStart:d.towardsEnd),class:"scroll-hint--towards-end"})),p}};function ok(e){var t=e.viewState,n=e.viewCache,r=e.layoutService,i=e.dockService,o=e.rtl;return!r.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:i.meta.major.orientation,rtl:o,range:function(){return function(e){var t=e.layoutService,n=e.viewState,r=e.viewCache;return t.meta.isContinuous?function(e,t){var n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(n,r):function(e){return e.get("viewRange")}(n)}({layoutService:r,viewState:t,viewCache:n})}}}}function ak(){tk=tk||document.createElement("canvas").getContext("2d")}var sk="…",uk={measureTextWidth:function(e){return ak(),tk.measureText(e).width},lineWrap:function(e,t,n,r){var i,o;ak();var a,s,u=e?e.split(/\n+|\r+|\r\n/):[],l=[],c=e?e.split(/\s+/):[],f=u[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&u.length>=r)return u.slice(0,r);for(n&&(tk.font=n),o=0;o<u.length;o++){for(f=y(c=(u[o]||"").split(/\s+/),1)[0],s="",i=1;i<c.length;i++)if(a="".concat(f," ").concat(c[i]),uk.measureTextWidth(a)>t&&("number"!=typeof r||r>l.length)?(l.push(f),f=c[i]):f=a,"number"==typeof r&&l.length>=r){s=c.slice(i+1).join(" ");break}"number"!=typeof r||l.length<r?l.push(f):l[Math.max(0,l.length-1)]="".concat(l[Math.max(0,l.length-1)]||""," ").concat(f," ").concat(s)}return l},wordWrap:function(e,t,n,r,i){if(ak(),!e||!e.length)return[];n&&(tk.font=n);var o,a,s,u,l=[],c=e.slice();if(c.filter((function(e){return!!e})),"number"!=typeof t||t<0)return e.slice();for(u=0;u<c.length;u++)a=null,(s=c[u])&&(s.length<=1||uk.measureTextWidth(s)<=t?l.push(s):(o=uk.splitWord(s,t,void 0,r-l.length)).length<=1?l.push(o[0]):(a=o.pop(),l=l.concat(o),c[u+1]?uk.measureTextWidth("".concat(a," ").concat(c[u+1]))>t&&l.length+c.length-u<=r?c.splice(u+1,0,a):c[u+1]="".concat(a," ").concat(c[u+1]):c.push(a)));return l.forEach((function(e,t,n){n[t]=e?e.trim():e})),l.length>r?(l=l.splice(0,r))[l.length-1]=uk.truncate(l[l.length-1],t,n,i).text:(s=l[l.length-1])&&s.length>1&&uk.measureTextWidth(s)>t&&(l[l.length-1]=uk.truncate(s,t,n,i).text),l},truncate:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:sk;ak();var i,o,a,s=e,u=uk.measureTextWidth("i"),l=Math.ceil(t/u);if(n&&(tk.font=n),e&&t){if(uk.measureTextWidth(s)>t){for(i=Math.min(l,s.length);i>0;i--)if(o=s.substring(0,i-1).trim()+r,uk.measureTextWidth(o)<=t){a=s.substring(i-1),s=o;break}i||(a=s,s=sk)}}else a=void 0;return{text:s,rest:a}},isNumber:function(e){return"number"==typeof e&&Number.isFinite(e)},explodeWord:function(e,t,n,r){var i;ak();var o=e,a="",s=[];if(uk.isNumber(n)&&n<=1)return[e];var u=Math.ceil(t/r);for(i=Math.min(e.length,u);i>0&&(o=e.substring(0,i)," "===e.substring(i-1,i)?o=e.substring(0,i-1):o+="-",a=e.substring(i),!(uk.measureTextWidth(o)<=t));i--);return(!i&&!o||uk.measureTextWidth(o)>t)&&(o=e.substring(0,1),a=e.substring(1)),s.push(o),a?(uk.measureTextWidth(a)>t?(a=uk.explodeWord(a,t,n-1,r),s=s.concat(a)):s.push(a),s.filter((function(e){return""!==e.trim()}))):s},splitWord:function(e,t,n,r){return ak(),e&&t?(n&&(tk.font=n),uk.explodeWord(e,t,r,Math.max(1,uk.measureTextWidth("i")))):[]},wrapText:function(e,t,n,r,i){var o;return Number.isNaN(t)?[e]:(o=r>1?uk.lineWrap(e,t,n,r):[e],o=uk.wordWrap(o,t,n,r,i))},getFontHeight:function(e){return ak(),e&&(tk.font=e),1.5*uk.measureTextWidth("m")},tokenize:function(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1;ak(),t&&(tk.font=t);var s=uk.getFontHeight(),u=a*s,l=[],c=0,f=[];if(o<s)return[];var d=o?Math.max(1,Math.floor(o/u)):r||1;return Array.isArray(r)?(r.forEach((function(e){c+=Number.isNaN(e)||e<=0?0:e})),r.forEach((function(e){l.push(Number.isNaN(e)||e<=0?d-c:e)}))):l=[Number.isNaN(r)||r<=0?d:Math.min(d,r)],Array.isArray(e)?e.forEach((function(e,n){f.length<d&&(f=f.concat(uk.wrapText(e,i,t,l[n])))})):f=uk.wrapText(e,i,t,l[0],n),f}},lk=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size,n=void 0===t?10:t,r=e.fill,i=void 0===r?"#999":r,o=e.alignment;return{show:!0,type:"n-polygon",fill:i,stroke:"#000",strokeWidth:0,size:n,sides:3,startAngle:-90,alignment:o}},ck=function(e){var t,n=e.oob,r=e.dockValue,i=e.boxCenter,o=e.rendWidth,a=e.rendHeight,s="x",u="y",c=o,f=a,d=r<.5?90:-90;return e.flipXY&&(s="y",u="x",c=a,f=o,d=r<.5?180:0),(0,e.symbol)(Tg({},n,(l(t={},s,i*c),l(t,u,Math.max(n.size/2,Math.min(r*f,f-n.size/2))),l(t,"startAngle",d),t)))},fk=Tg.bind(null,!0),dk={},hk=Array.isArray;function pk(e){return null!=e&&!Array.isArray(e)&&"object"===r(e)}function mk(e){return void 0===e}function vk(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function gk(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){if(i!==r.length){n=+t;var o=isNaN(n)?{}:[];e[n||t]=mk(e[n||t])?o:e[t],e=e[n||t]}})),e}function yk(e,t){var n=!0;if(pk(e)&&pk(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){yk(e[r],t[r])||(n=!1)})),n);if(hk(e)&&hk(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!yk(e[r],t[r]))return!1;return!0}return e===t}dk.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?fk({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);yk(o,a)||vk(t,i)||(mk(a)?r.push({op:"add",path:s,value:o}):pk(o)&&pk(a)?r=r.concat(dk.generate(a,o,s)):hk(o)&&hk(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&mk(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(yk(t,i))return r;if(!mk(t[0])&&mk(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(dk.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var u=0,l=t.length;u<l;u+=1)-1===(o=a(i,t[u].qInfo&&t[u].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(u),value:t[u]}),i.splice(u,0,t[u])):o!==u&&(r.push({op:"move",path:"".concat(n,"/").concat(u),from:"".concat(n,"/").concat(o)}),i.splice(u,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){mk(t[i])&&!vk(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},dk.apply=function(e,t){t.forEach((function(t){var n,r=gk(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(hk(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(hk(o)&&hk(t.value)){var s,u=t.value.slice();o.length=0,(s=o).push.apply(s,b(u))}else if(pk(o)&&pk(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!vk(n,e)&&delete n[e]})),fk(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[i]=t.value}else if("move"===t.op){var l=gk(e,t.from);hk(r)?r.splice(+i,0,l.splice(+a,1)[0]):(r[i]=l[a],delete l[a])}else"remove"===t.op&&(hk(r)?r.splice(+i,1):delete r[i])}))},dk.clone=function(e){return fk({},e)},dk.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},dk.updateObject=function(e,t){Object.keys(e).length?dk.apply(e,dk.generate(e,t)):fk(e,t)};Math.log(10);var bk=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e+Math.abs(e)*t},xk=function(e){return"number"==typeof e&&!Number.isNaN(e)},wk=[[2,4,6],[2,4],[3]],Mk=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function kk(e,t,n){var r,i=e?e.length:0,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(r=1;r<i;r++)o=Math.min(o,e[r]/e[r-1]);void 0!==n&&(o=Math.min(o,n/e[i-1])),e.splice(0,0,o)}function Sk(e,t,n){var r,i=e?e.length:0;for(r=0;r<i;r++)kk(e[r],t,n)}!function(){var e,t;for(Sk(wk,1,10),e=0;e<Mk.length;e++)if(Mk[e])for(t=0;t<Mk[e].length;t++)Array.isArray(Mk[e][t])&&Sk(Mk[e][t])}();var Ck={isInside:function(e,t,n,r){if(!r)return!0;var i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:function(e,t){return Math.abs(e.center-t.center)},getGap:function(e,t){var n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax:function(e,t){var n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin:function(e,t){var n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax:function(e,t,n){var r=Ck.findSegmentPositionMeetMin(e,t);return Ck.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin:function(e,t,n){var r=Ck.findSegmentPositionMeetMax(e,n);return Ck.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin:function(e,t,n){for(var r,i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=e.length-1,s=t,u=0;u<a;u++)r=e[u],i=e[u+1],r.position=Ck.findSegmentPositionMeetMaxThenMin(r,s,(r.center+i.center-o)/2),s=r.position+r.radius+o/2;i.position=Ck.findSegmentPositionMeetMaxThenMin(i,s,n)},adjustPositionFromMax:function(e,t,n){var r,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=e.length-1,u=Math.max(0,e[s].position+e[s].radius-n);if(0!==u){var l,c=0;for(r=s;r>0&&(i=e[r],o=e[r-1],l=Math.max(0,Ck.getGap(o,i)-a),c+=l-=Math.max(0,c+l-u),i.move=l,!(c>=u));r--);for(c<u&&(l=Math.max(0,o.position-o.radius-t),c+=l-=Math.max(0,c+l-u),o.move=l),c=0,r=0;r<=s;r++)c+=(i=e[r]).move||0,i.move=c,i.position-=c}},layout:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=e.length-1;if(!(i<0))if(0!==i)Ck.layoutPositionFromMin(e,t,n,r),Ck.adjustPositionFromMax(e,t,n,r);else{var o=e[0];o.position=Ck.findSegmentPositionMeetMaxThenMin(o,t,n)}}},qk=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},Ek=function(e){return!1!==e.show&&0!==e.show&&"0"!==e.show},Tk=function(e){return e.filter(Ek)},Dk=function(e,t){return Tk(Fg(e,t,[]))},Ok=function(e){return Ek(e)&&(!1!==e.showValue||!1!==e.showLabel)},Nk=function(e){return e.filter(Ok)},_k=function(e,t){return Nk(Fg(e,t,[]))},Ak=function(e){var t=e.refLineLayout;return e.layoutService.meta.canBeContinuous?t.refLineExpr.value:t.refLineExpr.stringValue},Ik=function(e,t,n){var r=t.dimensionRefLineInfo;if(r[e])return r[e][n]},Pk=function(e){var t=e.label,n=(e.dataPages||{}).qArea,r=void 0===n?{}:n,i=r.qTop,o=r.qHeight;return void 0!==i&&void 0!==o&&void 0!==t.valueInfo&&t.valueInfo.maxOrder<i},Lk=function(e){var t=e.label,n=(e.dataPages||{}).qArea,r=void 0===n?{}:n,i=r.qTop,o=r.qHeight;return void 0!==i&&void 0!==o&&void 0!==t.valueInfo&&t.valueInfo.minOrder>=i+o},Rk=function(e){var t=e.value,n=e.qMin;return"NaN"!==n&&t<n},jk=function(e){var t=e.value,n=e.qMax;return"NaN"!==n&&t>n},zk=Dk,Fk=function(e){return Dk(e,"refLine.refLines")},Bk=function(e,t){return t?[]:Dk(e,"refLine.dimRefLines")},Vk=_k,Hk=function(e){return _k(e,"refLine.refLines")},Uk=function(e,t){return t?[]:_k(e,"refLine.dimRefLines")},Wk=function(e){var t=e.scale,n=e.size,r=e.value,i=e.valueInfo,o=e.align,a=e.invert,s=void 0!==a&&a,u=e.layoutService;if(!e.isContinuous){var l,c=t.pxScale(n);if(u.meta.isGroupedByMeasure)return l=qk(c,o,s,u.meta.measureCount),c([r,0])+l;if(u.meta.isGroupedByDimension){if(!i)return NaN;var f,d=i.innerValues,h=i.numInnerValues,p=i.minOrder;return l=qk(c,o,s,h),d&&d.length&&(f=function(e){for(var t=e.pxScale,n=e.value,r=e.innerValues,i=e.invert,o=e.minOrder,a=function(e){var t=e.pxScale,n=e.invert;return t.bandwidth()*(n?-1:1)}({pxScale:t,invert:i}),s=0;s<r.length;s++){var u=r[s],l=u.id,c=u.order,f=t([n,l]);if(void 0!==f)return f-a*(c-o)}}({pxScale:c,value:r,innerValues:d,invert:s,minOrder:p})),(void 0===f?c(r):f)+l}return l=qk(c,o,s),c(r)+l}return t(r)},Yk=function(e){var t=e.layout,n=e.canBeContinuous,r=e.discreteModel,i=e.layoutService.meta.isGroupedByDimension,o={},a=Fg(t,"qHyperCube"),s="K"===a.qMode,u=r?r.query.getCurrentDataPage():Fg(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]),l=Fg(u,s?"qData.0.qSubNodes":"qMatrix",[]),c=function(e,t){return e?t?"qValue":"qNum":"qText"}(n,s),f=function(e){return e.qArea.qTop}(u);return s?function(){for(var e=0;e<l.length;e++){var t=l[e],n=e+f,r=t[c];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}}():i?function(){for(var e,t=0;t<l.length;t++){var n=l[t][0],r=l[t][1],i=t+f,a=n[c];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}}():function(){for(var e=0;e<l.length;e++){var t=l[e][0],n=e+f,r=t[c];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}}(),o},Kk=Ak,$k=Pk,Gk=Lk,Xk=Rk,Jk=jk,Qk=function(e){var t=e.value,n=e.qMin,r=e.qMax;return Rk({value:t,qMin:n})||jk({value:t,qMax:r})},Zk=function(e){var t=e.label,n=e.dataPages;return t.valueInfo.isMinOrderOk&&Lk({label:t,dataPages:n})||t.valueInfo.isMaxOrderOk&&Pk({label:t,dataPages:n})},eS=function(e){var t=e.orientation,n=e.rtl,r=e.isContinuous;return"horizontal"===t?n:r},tS="…";function nS(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:70,r=0;r<e.length;r++){var i=e[r];i.lines=uk.tokenize(i.title,t,"".concat(tS," ").concat(i.valueString),3,n),i.maxNumLines=i.lines.length}}function rS(e){var t=e.title,n=e.font,r=e.ellipsis,i=e.maxNumLines,o=void 0===i?5:i,a=e.maxWidth,s=void 0===a?200:a,u=uk.tokenize(t,n,r,o,s),l=u.length,c="";if(l){c=y(u,1)[0];for(var f=1;f<l;f++)c="".concat(c,"\n").concat(u[f])}return c}function iS(e){var t=e.oobs,n=e.font,r=e.ellipsis,i=e.maxNumLines,o=void 0===i?5:i,a=e.maxWidth,s=void 0===a?200:a,u=t.map((function(e){return rS({title:e.title,font:n,ellipsis:"".concat(r," ").concat(e.valueString),maxNumLines:o,maxWidth:s})})),l=u.length,c="";if(l){c=y(u,1)[0];for(var f=1;f<l;f++)c="".concat(c,"\n\n").concat(u[f])}return c}function oS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value";e.sort((function(e,n){return e[t]-n[t]}))}function aS(e){var t=e.inputValue,n=e.inputValueLabel,r=e.localeInfo;if(void 0===t||void 0===n||t.toString()===n)return!1;if(!r)return!0;var i="+-".concat(r.qDecimalSep||"").concat(r.qThousandSep||"").replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return n.replace(new RegExp("[0-9e".concat(i,"]"),"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;var t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(n)}var sS=function(e){var t=e.label,n=e.dataPages,r=e.qMin,i=e.qMax;if(void 0!==r&&void 0!==i){var o=t.inputValue;if(Jk({value:o,qMax:i}))return 1;if(Xk({value:o,qMin:r}))return-1}return Gk({label:t,dataPages:n})?1:$k({label:t,dataPages:n})?-1:0},uS={hasEngineFormat:aS,calculateLabelPositions:function(e){var t,n,r=e.labels,i=e.scale,o=e.size,a=e.layoutService,s=e.orientation,u=e.rtl,l=e.isContinuous,c=e.isDimension,f=eS({orientation:s,rtl:u,isContinuous:l}),d="S"===a.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",h=a.getHyperCubeValue(d),p=a.meta.canBeContinuous;if(c&&p){var m=a.getLayoutValue("qHyperCube.qDimensionInfo.0");t=m.qMin,n=m.qMax}for(var v=0;v<r.length;v++){var g=r[v],y=g.value,b=g.align,x=g.valueInfo,w=sS({label:g,dataPages:h,qMin:t,qMax:n});g.scaledValue=1===w?f?-.1:1.1:-1===w?f?1.1:-.1:Wk({scale:i,size:o,value:y,valueInfo:x,align:b,invert:f,layoutService:a,isContinuous:l}),g.center=g.scaledValue*o}},getTitle:function(e){return!1!==e.showValue?!1!==e.showLabel?"".concat(e.text," ").concat(e.valueString):e.valueString:!1!==e.showLabel?e.text:""},addLabelTitles:function(e){var t,n=e.labels,r=e.formatter,i=e.isContinuous,o=e.canBeContinuous,a=e.localeInfo;if(i)for(var s=0;s<n.length;s++){var u=n[s],l=u.value,c=u.inputValue,f=u.inputValueLabel;t=aS({inputValue:c,inputValueLabel:f,localeInfo:a})?f:r?r(l):l,u.valueString="".concat(ay.lrm,"(").concat(t,")").concat(ay.lrm),u.title=uS.getTitle(u)}else if(o)for(var d=0;d<n.length;d++){var h=n[d],p=h.valueText,m=h.inputValue,v=h.inputValueLabel;t=aS({inputValue:m,inputValueLabel:v,localeInfo:a})?v:p,h.valueString="".concat(ay.lrm,"(").concat(t,")").concat(ay.lrm),h.title=uS.getTitle(h)}else for(var g=0;g<n.length;g++){var y=n[g];t=y.valueText,y.valueString="".concat(ay.lrm,"(").concat(t,")").concat(ay.lrm),y.title=uS.getTitle(y)}},measureLabelsWidth:function(e,t){for(var n=0;n<e.length;n++){var r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth:function(e,t){return Math.max.apply(Math,b(e.lines.map((function(e){return t(e).width}))))},getMaxTextWidth:function(e){var t=e.map((function(e){return e.totalWidth}));return Math.max.apply(Math,b(t))},addLabelsNeighborInfo:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=e.length-1;if(!(i<0)){var o,a,s=y(e,1);if((o=s[0]).cMin=t,0!==i){for(var u=0;u<i;u++)o=e[u],a=e[u+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n}},getTotalNumLines:function(e){var t=0;return e.forEach((function(e){t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines:function(e,t,n){for(var r=t-1,i=e.filter((function(e){return e.maxNumLines===t})),o=Math.min(n,i.length),a=i.length-1;a>=i.length-o;a--)i[a].maxNumLines=r},reduceTotalMaxNumLines:function(e,t,n){var r=Math.floor(n/t),i=3;do{var o=uS.getTotalNumLines(e)-r;if(o<=0)return;uS.reduceLabelsHavingMaxNumLines(e,i,o),i--}while(i>1)},reduceMaxNumLines:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;r<e.length;r++){var i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,r=arguments.length>3?arguments[3]:void 0,i=0;i<e.length;i++){var o=e[i];o.width=Math.min(t,uS.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments:function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=r.center,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo:function(e){var t=e.labels,n=e.scale,r=e.majorSize,i=e.lowerLimit,o=e.upperLimit,a=e.gap,s=e.font,u=e.maxLabelWidth,l=e.lineHeight,c=e.majorDimension,f=e.orientation,d=e.measureText,h=e.rtl,p=e.layoutService,m=e.isContinuous,v=e.isDimension,g=t.map((function(e){return e})),y=r;uS.calculateLabelPositions({labels:t,scale:n,size:y,layoutService:p,orientation:f,rtl:h,isContinuous:m,isDimension:v}),oS(t,"center"),uS.addLabelsNeighborInfo(t,i,o,a),nS(t,s,u),uS.reduceTotalMaxNumLines(g,l,o-(g.length-1)*a),"vertical"===f&&(uS.reduceMaxNumLines(t,l,.05*a),function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:70,r=0;r<e.length;r++){var i=e[r];i.lines.length>i.maxNumLines&&(i.lines=uk.tokenize(i.title,t,"".concat(tS," ").concat(i.valueString),i.maxNumLines,n))}}(t,s,u)),uS.addLabelsSize(t,u,l,d),uS.addLabelSegments(t,c)},createLabels:function(e){var t=e.labels,n=e.style,r=e.maxLabelWidth,i=e.areaProps,o=e.area,a=e.lineHeight,s=void 0===a?15:a,u=e.font,l=i.majorAxis,c=i.minorAxis,f=o.minorCenter,d=n.fontSize,h=n.fontFamily,p=n.background,m=[];return t.forEach((function(e){var t=e.lines,n=t.length,i=t.map((function(t,i){var o={type:"text",text:t,title:rS({title:e.title,font:u,ellipsis:"".concat("…"," ").concat(e.valueString)}),dx:0,dy:0,maxWidth:r,width:r,fontSize:d,fontFamily:h,fill:e.fill,baseline:"central",anchor:"middle"};return o[c]=f,o[l]=e.segment.position,o.y+=(i-(n-1)/2)*s,o}));e.background&&m.push(function(e){var t=e.minorCenter,n=e.majorAxis,r=e.minorAxis,i=e.label,o=e.lineHeight,a=e.background,s=i.lines,u=a.borderRadius,l=void 0===u?3:u,c=a.padding,f=void 0===c?{}:c,d=f.top,h=void 0===d?2:d,p=f.bottom,m=void 0===p?2:p,v=f.left,g=void 0===v?2:v,y=f.right,b=void 0===y?2:y,x=s.length,w={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(g+b),height:i.height+(h+m)};return w[r]=t,w[n]=i.segment.position,w.x-=i.width/2+g,w.y-=x*o/2+h,w}({minorCenter:f,majorAxis:l,minorAxis:c,label:e,lineHeight:s,background:p})),m=m.concat(i)})),m}};function lS(e,t,n){var i,o=r(t);if("string"===o||"object"===o)i=e.formatter(t);else if(void 0!==n&&n.data){var a=n.data()&&n.data().fields;i=a&&a[0]?a[0].formatter():null}return i}function cS(e,t,n){return"top"===e||"bottom"===e?function(e,t){var n=t.font,r=t.lineHeight,i=t.top,o=t.bottom,a=t.maxLabelWidth,s=1;return uS.getMaxTextWidth(e)>a&&(nS(e,n,a),s=Math.max.apply(Math,b(e.map((function(e){return e.lines.length}))))),s*r+i+o}(t,n):function(e,t){var n=t.left,r=t.right,i=t.maxLabelWidth;return Math.min(i,uS.getMaxTextWidth(e))+n+r}(t,n)}function fS(e,t){return t?e.domain():[0,1]}function dS(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"value",i=e.filter((function(e){return e[r]>=t}));i=i.filter((function(e){return e[r]<=n}));var o=e.filter((function(e){return e[r]<t})),a=e.filter((function(e){return e[r]>n})),s=o.length,u=a.length;return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:s,numMaxOobs:u}}function hS(e){for(var t,n=0,r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function pS(e,t){return e>9?t[1]:t[0]}function mS(e){var t=e.alignment,n=e.dockValue,r=e.oobs,i=e.style,o=e.rect,a=e.symbol,s=e.position,u=e.areaProps,l=e.radius,c=e.font,f=r?r.length:0;if(f<1)return[];var d=u.flipXY,h=u.majorAxis,p=u.minorAxis,m=o[u.minorDimension],v=ck({oob:lk({size:i.size,fill:i.fill,alignment:t}),dockValue:n,boxCenter:.5,rendWidth:o.width,rendHeight:o.height,flipXY:d,symbol:a}),g="c".concat(h),y="c".concat(p),b={type:"circle",r:l,stroke:"transparent",fill:i.text.background.fill,strokeWidth:0};b[y]=m/2,b[g]=s;var x={type:"text",text:f>9?"9+":f,title:iS({oobs:r,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:m,width:m,fontSize:i.text.fontSize,fontFamily:i.text.fontFamily,fill:i.text.fill,baseline:"central",anchor:"middle"};return x[p]=m/2,x[h]=s,[v,b,x]}function vS(e){var t="normal ".concat(e.fontSize," '").concat(e.fontFamily,"'");return{font:t,lineHeight:uk.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}var gS=function(e){return e.map((function(e){return n(n({},e),{},{value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})}))},yS={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize:function(){var e=this,t=this.scale,n=this.settings,r=n.style,i=n.layoutService,o=n.isContinuous,a=n.localeInfo,s=!!o||i.meta.canBeContinuous,u=gS(this.settings.labels),l=lS(this.chart,this.settings.formatter,t);uS.addLabelTitles({labels:u,formatter:l,isContinuous:o,canBeContinuous:s,localeInfo:a});var c,f=function(e){var t=e.labels,n=e.scale,r=e.isContinuous,i=e.canBeContinuous,o=e.layoutService;if(r){var a=y(fS(n,r),2);return dS(t,a[0],a[1])}if(i){var s=o.getLayoutValue("qHyperCube.qDimensionInfo.0"),u=s.qMin,l=s.qMax;if("NaN"!==u&&"NaN"!==l)return dS(t,u,l,"inputValue")}return{filteredLabels:t}}({labels:u,scale:t,isContinuous:o,canBeContinuous:s,layoutService:i}),d=f.numMaxOobs,h=f.numMinOobs,p=f.filteredLabels;if(this.measureText=function(t){return e.renderer.measureText({text:t,fontSize:r.label.fontSize,fontFamily:r.label.fontFamily})},p&&p.length){var m=vS(r.label),v=this.settings.layout.dock;return uS.measureLabelsWidth(p,this.measureText),c=cS(v,p,m),c}var g=hS(this.measureText),b=d?pS(d,g):0,x=h?pS(h,g):0;return c=Math.max(b,x),c},render:function(){var e=this.scale;if(e.domain().length){var t=this.symbol,n=this.settings,r=n.style,i=n.layoutService,o=n.theme,a=n.isContinuous,s=n.isDimension,u=n.localeInfo,l=!!a||i.meta.canBeContinuous,c=gS(this.settings.labels),f=this.settings.layout,d=f.dock,h=f.rtl,p=r.label.padding,m=function(e){return"left"===e||"right"===e?function(e){return{dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}}(e):function(e){return{dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}}(e)}(d),v=function(e,t,n){var r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,m,p),g=m.orientation,x=m.majorDimension,w=v.majorSize,M=vS(r.label),k=M.font,S=M.lineHeight,C=M.gap,q=M.maxLabelWidth,E=lS(this.chart,this.settings.formatter,e),T=w;uS.addLabelTitles({labels:c,formatter:E,isContinuous:a,canBeContinuous:l,localeInfo:u}),uS.calculateLabelPositions({labels:c,scale:e,size:T,layoutService:i,orientation:g,rtl:h,isContinuous:a,isDimension:s});var D=y(fS(e,a),2),O=function(e){var t=e.labels,n=e.minValue,r=e.maxValue,i=e.orientation,o=e.rtl,a=e.isContinuous,s=e.style,u=e.padding,l=e.measureText,c=e.prop,f=void 0===c?"value":c,d=dS(t,n,r,f),h=d.maxOobs,p=d.minOobs,m=d.filteredLabels,v="scaledValue"!==f&&eS({orientation:i,rtl:o,isContinuous:a}),g=function(e,t,n){return n?t:e}(p,h,v),y=function(e,t,n){return n?e:t}(p,h,v),b=g.length,x=y.length,w=hS(l),M=pS(b,w),k=pS(x,w);return{filteredLabels:m,lowerOobs:g,upperOobs:y,lowerCircleSize:M,upperCircleSize:k,lowerOobSpace:function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(b,s.oob.size,M,i,u),upperOobSpace:function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(x,s.oob.size,k,i,u)}}({labels:c,minValue:D[0],maxValue:D[1],orientation:g,rtl:h,isContinuous:a,style:r,padding:p,measureText:this.measureText,prop:a?"value":"scaledValue"}),N=O.filteredLabels,_=O.lowerOobs,A=O.upperOobs,I=O.lowerCircleSize,P=O.upperCircleSize,L=O.lowerOobSpace,R=O.upperOobSpace,j=L,z=w-R;oS(_),oS(A);var F=mS({alignment:0,dockValue:0,oobs:_,style:r.oob,rect:this.rect,symbol:t,position:r.oob.size+I/2,areaProps:m,radius:I/2,font:k}),B=mS({alignment:1,dockValue:1,oobs:A,style:r.oob,rect:this.rect,symbol:t,position:w-(r.oob.size+P/2),areaProps:m,radius:P/2,font:k});uS.addLabelsInfo({labels:N,scale:e,majorSize:w,lowerLimit:j,upperLimit:z,font:k,lineHeight:S,gap:C,maxLabelWidth:q,majorDimension:x,orientation:g,measureText:this.measureText,rtl:h,layoutService:i,isContinuous:a,isDimension:s}),Ck.layout(N.map((function(e){return e.segment})),j,z,r.label.gap);var V=N.filter((function(e){return Ck.isInside(e.segment,j,z,a)}));return uS.createLabels({labels:V,style:r.label,maxLabelWidth:q,areaProps:m,area:v,lineHeight:S,font:k,theme:o}).concat([].concat(b(F),b(B)))}}},bS=Kk,xS=Ik,wS={resolveValue:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=Ak({refLineLayout:t,layoutService:r});return Ik(i,n,"id")},resolveInnerValues:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService;if(r.meta.isGroupedByDimension){var i=bS({refLineLayout:t,layoutService:r});return xS(i,n,"innerValues")}},resolveNumInnerValues:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService;if(r.meta.mode.K)return 0;var i=bS({refLineLayout:t,layoutService:r});return xS(i,n,"numInnerValues")||0},resolveValueText:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=n.dimensionValuesInfo,o=r.meta.canBeContinuous,a=bS({refLineLayout:t,layoutService:r});return i[a]&&o?i[a].qText:a},resolveValueInfo:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=bS({refLineLayout:t,layoutService:r});return n.dimensionRefLineInfo[i]}};function MS(e){var t=e.isDimension,n=e.refLineModel,r=void 0===n?{}:n,i=e.layoutService,o=e.colorModel,a=e.dockService,s=e.chart,u=e.scale,l=e.axis,c=e.rtl,f=e.key,d=e.mainComponentKey,h=e.path,p=e.minimumLayoutMode,m=t?r.dimensionRefLines:h?r.query.getRefLines(h):r.measureRefLines;if(!m.length)return!1;var v={key:f,type:"ref-line",layout:{minimumLayoutMode:p},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:function(){return{size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}}},g=!(!t||"horizontal"!==a.meta.major.orientation||!c),y=!t||i.meta.isContinuous;return m.forEach((function(e){v.lines[l].push(function(e){var t,n,r=e.isDimension,i=e.refLineLayout,o=e.refLineModel,a=e.layoutService,s=e.colorModel,u=e.dockService,l=e.chart,c=e.scale,f=e.axis,d=e.invert,h=e.component,p=e.isContinuous,m={dir:f,line:{strokeWidth:(null==i||null===(t=i.style)||void 0===t?void 0:t.lineThickness)||2,strokeDasharray:null==i||null===(n=i.style)||void 0===n?void 0:n.lineType,stroke:s.resolveUIColor(i.paletteColor||{index:i.color})}};return!r||a.meta.isContinuous?(m.scale=c,m.value=i.refLineExpr.value):m.value=function(){var e,t=Wk({scale:l.scale(c),value:wS.resolveValue({refLineLayout:i,refLineModel:o,layoutService:a}),valueInfo:wS.resolveValueInfo({refLineLayout:i,refLineModel:o,layoutService:a}),size:null===(e=l.component(h))||void 0===e?void 0:e.rect["horizontal"===u.meta.major.orientation?"width":"height"],align:i.align,invert:d,layoutService:a,isContinuous:p});return Number.isNaN(t)?void 0:t},m}({isDimension:t,refLineLayout:e,refLineModel:r,layoutService:i,colorModel:o,dockService:a,chart:s,scale:u,axis:l,invert:g,component:d,isContinuous:y}))})),v}var kS={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}};function SS(e){var t=e.isDimension,n=e.refLineModel,r=void 0===n?{}:n,i=e.layoutService,o=e.colorModel,a=e.dock,s=e.scale,u=e.style,l=e.formatter,c=e.theme,f=e.localeInfo,d=e.rtl,h=e.key,p=e.path,m=t?r.dimensionRefLineLabels:p?r.query.getRefLineLabels(p):r.measureRefLineLabels;if(!m.length)return[];var v=[],g=!t||i.meta.isContinuous,y=m.map((function(e){return function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=e.colorModel,o=e.scale,a=e.theme,s=e.isContinuous,u=i.resolveUIColor(t.paletteColor||{index:t.color}),l={align:t.align,text:t.label,fill:t.coloredBackground?a.getContrastingColorTo(u):u,showValue:!1!==t.showValue,showLabel:!1!==t.showLabel,inputValue:t.refLineExpr.value,inputValueLabel:t.refLineExpr.label};return t.coloredBackground&&(l.background={fill:u}),s?(l.scale=o,l.value=t.refLineExpr.value):(l.value=function(){return wS.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r})},l.valueText=function(){return wS.resolveValueText({refLineLayout:t,refLineModel:n,layoutService:r})},l.valueInfo=function(){return wS.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r})}),l}({refLineLayout:e,refLineModel:r,layoutService:i,colorModel:o,scale:s,theme:c,isContinuous:g})}));return v.push(function(e){var t=e.isDimension,n=e.layoutService,r=e.style,i=e.labels,o=e.scale,a=e.formatter,s=e.dock,u=e.key,l=e.rtl;return{key:u,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:n,layout:{dock:s,rtl:l},theme:e.theme,isContinuous:e.isContinuous,isDimension:t,localeInfo:e.localeInfo,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:l?2:4,right:l?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}}}}({isDimension:t,rtl:d,style:Tg(!0,kS,u),dock:a,key:h,labels:y,scale:s,formatter:l,layoutService:i,theme:c,isContinuous:g,localeInfo:f})),v}function CS(e){var t=e.layoutService,n=e.discreteModel,r=t.meta,i=r.isContinuous,o=r.canBeContinuous,a=r.isGroupedByDimension,s=t.getLayout(),u="K"===s.qHyperCube.qMode,l=Yg.dimensionless(s),c=Fk(s),f=Bk(s,l),d=Hk(s),h=Uk(s,l),p={},m={},v=function(){return!(!f||!f.length)&&!f.every((function(e){var n=Kk({refLineLayout:e,layoutService:t});return function(e){if(o){var n=t.getLayoutValue("qHyperCube.qDimensionInfo.0"),r=n.qMin,i=n.qMax;return Qk({value:e,qMin:r,qMax:i})}return!1}(n)||function(e){if(!m[e])return!1;if(!i&&a){var n={valueInfo:m[e]},r="S"===t.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",o=t.getHyperCubeValue(r);return Zk({label:n,dataPages:o})}return!0}(n)}))},g={isKMode:u,canBeContinuous:o,measureRefLines:c,dimensionRefLines:f,measureRefLineLabels:d,dimensionRefLineLabels:h,dimensionRefLineInfo:m,dimensionValuesInfo:p,query:{getRefLines:function(e){return zk(s,e)},getRefLineLabels:function(e){return Vk(s,e)}},update:function(){m=g.dimensionRefLineInfo,v()&&(p=Yk({layout:s,canBeContinuous:o,discreteModel:n,layoutService:t}),g.dimensionValuesInfo=p,f.forEach((function(e){var n=Kk({refLineLayout:e,layoutService:t});p[n]&&(m[n]?(m[n].innerValues=p[n].innerValues,m[n].minOrder=Math.min(m[n].minOrder,p[n].minOrder),m[n].maxOrder=Math.max(m[n].maxOrder,p[n].maxOrder),m[n].isMinOrderOk=m[n].isMinOrderOk||p[n].isMinOrderOk,m[n].isMaxOrderOk=m[n].isMaxOrderOk||p[n].isMaxOrderOk):m[n]={id:p[n].id,qText:p[n].qText,innerValues:p[n].innerValues,minOrder:p[n].minOrder,maxOrder:p[n].maxOrder,isMinOrderOk:p[n].isMinOrderOk,isMaxOrderOk:p[n].isMaxOrderOk},m[n].numInnerValues=(m[n].maxOrder||0)-(m[n].minOrder||0)+1)})))}};return g.update(),g}var qS=function(e){var t=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,i=-Number.MAX_VALUE;return e.forEach((function(e){e&&(t=Math.min(t,e.x,e.x+e.width),n=Math.max(n,e.x,e.x+e.width),r=Math.min(r,e.y,e.y+e.height),i=Math.max(i,e.y,e.y+e.height))})),{x:t,y:r,width:n-t,height:i-r}},ES={exports:{}},TS=Object.getOwnPropertySymbols,DS=Object.prototype.hasOwnProperty,OS=Object.prototype.propertyIsEnumerable;function NS(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var _S=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=NS(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))DS.call(n,a)&&(i[a]=n[a]);if(TS){r=TS(n);for(var s=0;s<r.length;s++)OS.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},AS=_S,IS="function"==typeof Symbol&&Symbol.for,PS=IS?Symbol.for("react.element"):60103,LS=IS?Symbol.for("react.portal"):60106,RS=IS?Symbol.for("react.fragment"):60107,jS=IS?Symbol.for("react.strict_mode"):60108,zS=IS?Symbol.for("react.profiler"):60114,FS=IS?Symbol.for("react.provider"):60109,BS=IS?Symbol.for("react.context"):60110,VS=IS?Symbol.for("react.concurrent_mode"):60111,HS=IS?Symbol.for("react.forward_ref"):60112,US=IS?Symbol.for("react.suspense"):60113,WS=IS?Symbol.for("react.memo"):60115,YS=IS?Symbol.for("react.lazy"):60116,KS="function"==typeof Symbol&&Symbol.iterator;function $S(e,t,n,r,i,o,a,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],l=0;(e=Error(t.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw e.framesToPop=1,e}}function GS(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);$S(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var XS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},JS={};function QS(e,t,n){this.props=e,this.context=t,this.refs=JS,this.updater=n||XS}function ZS(){}function eC(e,t,n){this.props=e,this.context=t,this.refs=JS,this.updater=n||XS}QS.prototype.isReactComponent={},QS.prototype.setState=function(e,t){"object"!==r(e)&&"function"!=typeof e&&null!=e&&GS("85"),this.updater.enqueueSetState(this,e,t,"setState")},QS.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},ZS.prototype=QS.prototype;var tC=eC.prototype=new ZS;tC.constructor=eC,AS(tC,QS.prototype),tC.isPureReactComponent=!0;var nC={current:null},rC={current:null},iC=Object.prototype.hasOwnProperty,oC={key:!0,ref:!0,__self:!0,__source:!0};function aC(e,t,n){var r=void 0,i={},o=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)iC.call(t,r)&&!oC.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var u=Array(s),l=0;l<s;l++)u[l]=arguments[l+2];i.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:PS,type:e,key:o,ref:a,props:i,_owner:rC.current}}function sC(e){return"object"===r(e)&&null!==e&&e.$$typeof===PS}var uC=/\/+/g,lC=[];function cC(e,t,n,r){if(lC.length){var i=lC.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function fC(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>lC.length&&lC.push(e)}function dC(e,t,n,i){var o=r(e);"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case PS:case LS:a=!0}}if(a)return n(i,e,""===t?"."+pC(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;s<e.length;s++){var u=t+pC(o=e[s],s);a+=dC(o,u,n,i)}else if(null===e||"object"!==r(e)?u=null:u="function"==typeof(u=KS&&e[KS]||e["@@iterator"])?u:null,"function"==typeof u)for(e=u.call(e),s=0;!(o=e.next()).done;)a+=dC(o=o.value,u=t+pC(o,s++),n,i);else"object"===o&&GS("31","[object Object]"===(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return a}function hC(e,t,n){return null==e?0:dC(e,"",t,n)}function pC(e,t){return"object"===r(e)&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function mC(e,t){e.func.call(e.context,t,e.count++)}function vC(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?gC(e,r,n,(function(e){return e})):null!=e&&(sC(e)&&(e=function(e,t){return{$$typeof:PS,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(uC,"$&/")+"/")+n)),r.push(e))}function gC(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(uC,"$&/")+"/"),hC(e,vC,t=cC(t,o,r,i)),fC(t)}function yC(){var e=nC.current;return null===e&&GS("307"),e}var bC={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return gC(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;hC(e,mC,t=cC(null,null,t,n)),fC(t)},count:function(e){return hC(e,(function(){return null}),null)},toArray:function(e){var t=[];return gC(e,t,null,(function(e){return e})),t},only:function(e){return sC(e)||GS("143"),e}},createRef:function(){return{current:null}},Component:QS,PureComponent:eC,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:BS,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:FS,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:HS,render:e}},lazy:function(e){return{$$typeof:YS,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:WS,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return yC().useCallback(e,t)},useContext:function(e,t){return yC().useContext(e,t)},useEffect:function(e,t){return yC().useEffect(e,t)},useImperativeHandle:function(e,t,n){return yC().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return yC().useLayoutEffect(e,t)},useMemo:function(e,t){return yC().useMemo(e,t)},useReducer:function(e,t,n){return yC().useReducer(e,t,n)},useRef:function(e){return yC().useRef(e)},useState:function(e){return yC().useState(e)},Fragment:RS,StrictMode:jS,Suspense:US,createElement:aC,cloneElement:function(e,t,n){null==e&&GS("267",e);var r=void 0,i=AS({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){void 0!==t.ref&&(a=t.ref,s=rC.current),void 0!==t.key&&(o=""+t.key);var u=void 0;for(r in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)iC.call(t,r)&&!oC.hasOwnProperty(r)&&(i[r]=void 0===t[r]&&void 0!==u?u[r]:t[r])}if(1===(r=arguments.length-2))i.children=n;else if(1<r){u=Array(r);for(var l=0;l<r;l++)u[l]=arguments[l+2];i.children=u}return{$$typeof:PS,type:e.type,key:o,ref:a,props:i,_owner:s}},createFactory:function(e){var t=aC.bind(null,e);return t.type=e,t},isValidElement:sC,version:"16.8.4",unstable_ConcurrentMode:VS,unstable_Profiler:zS,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:nC,ReactCurrentOwner:rC,assign:AS}},xC={default:bC},wC=xC&&bC||xC,MC=wC.default||wC;ES.exports=MC;var kC=ES.exports,SC={exports:{}};function CC(){}function qC(){}qC.resetWarningCache=CC;SC.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:qC,resetWarningCache:CC};return n.PropTypes=n,n}();var EC=SC.exports,TC={black:"#000",white:"#fff"},DC="#e57373",OC="#f44336",NC="#d32f2f",_C="#ff4081",AC="#f50057",IC="#c51162",PC="#7986cb",LC="#3f51b5",RC="#303f9f",jC={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};function zC(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function FC(e){if(e.type)return e;if("#"===e.charAt(0))return FC(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function BC(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function VC(e){var t="hsl"===(e=FC(e)).type?FC(function(e){var t=(e=FC(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),BC({type:s,values:u})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function HC(e,t){return e=FC(e),t=zC(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,BC(e)}function UC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WC(){return(WC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function YC(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function KC(){return(KC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function $C(e){return($C="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}function GC(e){return(GC="function"==typeof Symbol&&"symbol"===$C(Symbol.iterator)?function(e){return $C(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":$C(e)})(e)}function XC(e){return e&&"object"===GC(e)&&!Array.isArray(e)}function JC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?KC({},e):e;return XC(e)&&XC(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(XC(t[i])&&i in e?r[i]=JC(e[i],t[i],n):r[i]=t[i])})),r}var QC={exports:{}},ZC={};Object.defineProperty(ZC,"__esModule",{value:!0});var eq="function"==typeof Symbol&&Symbol.for,tq=eq?Symbol.for("react.element"):60103,nq=eq?Symbol.for("react.portal"):60106,rq=eq?Symbol.for("react.fragment"):60107,iq=eq?Symbol.for("react.strict_mode"):60108,oq=eq?Symbol.for("react.profiler"):60114,aq=eq?Symbol.for("react.provider"):60109,sq=eq?Symbol.for("react.context"):60110,uq=eq?Symbol.for("react.async_mode"):60111,lq=eq?Symbol.for("react.concurrent_mode"):60111,cq=eq?Symbol.for("react.forward_ref"):60112,fq=eq?Symbol.for("react.suspense"):60113,dq=eq?Symbol.for("react.suspense_list"):60120,hq=eq?Symbol.for("react.memo"):60115,pq=eq?Symbol.for("react.lazy"):60116,mq=eq?Symbol.for("react.fundamental"):60117,vq=eq?Symbol.for("react.responder"):60118,gq=eq?Symbol.for("react.scope"):60119;function yq(e){if("object"===r(e)&&null!==e){var t=e.$$typeof;switch(t){case tq:switch(e=e.type){case uq:case lq:case rq:case oq:case iq:case fq:return e;default:switch(e=e&&e.$$typeof){case sq:case cq:case aq:return e;default:return t}}case pq:case hq:case nq:return t}}}function bq(e){return yq(e)===lq}ZC.typeOf=yq,ZC.AsyncMode=uq,ZC.ConcurrentMode=lq,ZC.ContextConsumer=sq,ZC.ContextProvider=aq,ZC.Element=tq,ZC.ForwardRef=cq,ZC.Fragment=rq,ZC.Lazy=pq,ZC.Memo=hq,ZC.Portal=nq,ZC.Profiler=oq,ZC.StrictMode=iq,ZC.Suspense=fq,ZC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===rq||e===lq||e===oq||e===iq||e===fq||e===dq||"object"===r(e)&&null!==e&&(e.$$typeof===pq||e.$$typeof===hq||e.$$typeof===aq||e.$$typeof===sq||e.$$typeof===cq||e.$$typeof===mq||e.$$typeof===vq||e.$$typeof===gq)},ZC.isAsyncMode=function(e){return bq(e)||yq(e)===uq},ZC.isConcurrentMode=bq,ZC.isContextConsumer=function(e){return yq(e)===sq},ZC.isContextProvider=function(e){return yq(e)===aq},ZC.isElement=function(e){return"object"===r(e)&&null!==e&&e.$$typeof===tq},ZC.isForwardRef=function(e){return yq(e)===cq},ZC.isFragment=function(e){return yq(e)===rq},ZC.isLazy=function(e){return yq(e)===pq},ZC.isMemo=function(e){return yq(e)===hq},ZC.isPortal=function(e){return yq(e)===nq},ZC.isProfiler=function(e){return yq(e)===oq},ZC.isStrictMode=function(e){return yq(e)===iq},ZC.isSuspense=function(e){return yq(e)===fq},QC.exports=ZC;var xq=["xs","sm","md","lg","xl"];function wq(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,o=e.step,a=void 0===o?5:o,s=YC(e,["values","unit","step"]);function u(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function l(e,t){var r=xq.indexOf(t)+1;return r===xq.length?u(e):"@media (min-width:".concat(n[e]).concat(i,") and ")+"(max-width:".concat(n[xq[r]]-a/100).concat(i,")")}return WC({keys:xq,values:n,up:u,down:function(e){var t=xq.indexOf(e)+1,r=n[xq[t]];return t===xq.length?u("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(i,")")},between:l,only:function(e){return l(e,e)},width:function(e){return n[e]}},s)}function Mq(e,t,n){var r;return WC({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return WC({paddingLeft:t(2),paddingRight:t(2)},n,UC({},e.up("sm"),WC({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},UC(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),UC(r,e.up("sm"),{minHeight:64}),r)},n)}var kq={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:TC.white,default:jC[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},Sq={text:{primary:TC.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:jC[800],default:"#303030"},action:{active:TC.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function Cq(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=FC(e),t=zC(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return BC(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=FC(e),t=zC(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return BC(e)}(e.main,1.5*r)))}function qq(e){var t=e.primary,n=void 0===t?{light:PC,main:LC,dark:RC}:t,r=e.secondary,i=void 0===r?{light:_C,main:AC,dark:IC}:r,o=e.error,a=void 0===o?{light:DC,main:OC,dark:NC}:o,s=e.type,u=void 0===s?"light":s,l=e.contrastThreshold,c=void 0===l?3:l,f=e.tonalOffset,d=void 0===f?.2:f,h=YC(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function p(e){return function(e,t){var n=VC(e),r=VC(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Sq.text.primary)>=c?Sq.text.primary:kq.text.primary}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=WC({},e)).main&&e[t]&&(e.main=e[t]),Cq(e,"light",n,d),Cq(e,"dark",r,d),e.contrastText||(e.contrastText=p(e.main)),e}var v={dark:Sq,light:kq};return JC(WC({common:TC,type:u,primary:m(n),secondary:m(i,"A400","A200","A700"),error:m(a),grey:jC,contrastThreshold:c,getContrastText:p,augmentColor:m,tonalOffset:d},v[u]),h,{clone:!1})}function Eq(e){return Math.round(1e5*e)/1e5}var Tq={textTransform:"uppercase"},Dq='"Roboto", "Helvetica", "Arial", sans-serif';function Oq(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,i=void 0===r?Dq:r,o=n.fontSize,a=void 0===o?14:o,s=n.fontWeightLight,u=void 0===s?300:s,l=n.fontWeightRegular,c=void 0===l?400:l,f=n.fontWeightMedium,d=void 0===f?500:f,h=n.fontWeightBold,p=void 0===h?700:h,m=n.htmlFontSize,v=void 0===m?16:m,g=n.allVariants,y=n.pxToRem,b=YC(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,w=y||function(e){return"".concat(e/v*x,"rem")},M=function(e,t,n,r,o){return WC({fontFamily:i,fontWeight:e,fontSize:w(t),lineHeight:n},i===Dq?{letterSpacing:"".concat(Eq(r/t),"em")}:{},{},o,{},g)},k={h1:M(u,96,1,-1.5),h2:M(u,60,1,-.5),h3:M(c,48,1.04,0),h4:M(c,34,1.17,.25),h5:M(c,24,1.33,0),h6:M(d,20,1.6,.15),subtitle1:M(c,16,1.75,.15),subtitle2:M(d,14,1.57,.1),body1:M(c,16,1.5,.15),body2:M(c,14,1.43,.15),button:M(d,14,1.75,.4,Tq),caption:M(c,12,1.66,.4),overline:M(c,12,2.66,1,Tq)};return JC(WC({htmlFontSize:v,pxToRem:w,round:Eq,fontFamily:i,fontSize:a,fontWeightLight:u,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:p},k),b,{clone:!1})}function Nq(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var _q=["none",Nq(0,2,1,-1,0,1,1,0,0,1,3,0),Nq(0,3,1,-2,0,2,2,0,0,1,5,0),Nq(0,3,3,-2,0,3,4,0,0,1,8,0),Nq(0,2,4,-1,0,4,5,0,0,1,10,0),Nq(0,3,5,-1,0,5,8,0,0,1,14,0),Nq(0,3,5,-1,0,6,10,0,0,1,18,0),Nq(0,4,5,-2,0,7,10,1,0,2,16,1),Nq(0,5,5,-3,0,8,10,1,0,3,14,2),Nq(0,5,6,-3,0,9,12,1,0,3,16,2),Nq(0,6,6,-3,0,10,14,1,0,4,18,3),Nq(0,6,7,-4,0,11,15,1,0,4,20,3),Nq(0,7,8,-4,0,12,17,2,0,5,22,4),Nq(0,7,8,-4,0,13,19,2,0,5,24,4),Nq(0,7,9,-4,0,14,21,2,0,5,26,4),Nq(0,8,9,-5,0,15,22,2,0,6,28,5),Nq(0,8,10,-5,0,16,24,2,0,6,30,5),Nq(0,8,11,-5,0,17,26,2,0,6,32,5),Nq(0,9,11,-5,0,18,28,2,0,7,34,6),Nq(0,9,12,-6,0,19,29,2,0,7,36,6),Nq(0,10,13,-6,0,20,31,3,0,8,38,7),Nq(0,10,13,-6,0,21,33,3,0,8,40,7),Nq(0,10,14,-6,0,22,35,3,0,8,42,7),Nq(0,11,14,-7,0,23,36,3,0,9,44,8),Nq(0,11,15,-7,0,24,38,3,0,9,46,8)],Aq={borderRadius:4};function Iq(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var Pq={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Lq={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},Rq=function(e){return"".concat(Math.round(e),"ms")},jq={easing:Pq,duration:Lq,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?Lq.standard:n,i=t.easing,o=void 0===i?Pq.easeInOut:i,a=t.delay,s=void 0===a?0:a;return YC(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:Rq(r)," ").concat(o," ").concat("string"==typeof s?s:Rq(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},zq={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Fq(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,o=e.palette,a=void 0===o?{}:o,s=e.shadows,u=e.spacing,l=e.typography,c=void 0===l?{}:l,f=YC(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),d=qq(a),h=wq(n),p=Iq(u),m=WC({breakpoints:h,direction:"ltr",mixins:Mq(h,p,i),overrides:{},palette:d,props:{},shadows:s||_q,typography:Oq(d,c),spacing:p},JC({shape:Aq,transitions:jq,zIndex:zq},f));return m}var Bq="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Vq=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Hq(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),u=0;return function(e,t){u+=1;var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Vq.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Bq]&&""===a?"".concat(o,"-").concat(u):o}return"".concat(s).concat(i).concat(u)}}function Uq(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}function Wq(){return(Wq=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Yq="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},Kq="object"===("undefined"==typeof window?"undefined":Yq(window))&&"object"===("undefined"==typeof document?"undefined":Yq(document))&&9===document.nodeType;function $q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gq(e,t,n){return t&&$q(e.prototype,t),n&&$q(e,n),e}function Xq(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Jq(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Qq={}.constructor;function Zq(e){if(null==e||"object"!==r(e))return e;if(Array.isArray(e))return e.map(Zq);if(e.constructor!==Qq)return e;var t={};for(var n in e)t[n]=Zq(e[n]);return t}function eE(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=Zq(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var tE=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function nE(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=tE(e[r]," ");else n=tE(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function rE(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function iE(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;if(e&&o++,a)if(Array.isArray(a))for(var s=0;s<a.length;s++){var u=a[s];for(var l in u){var c=u[l];null!=c&&(r&&(r+="\n"),r+=""+rE(l+": "+nE(c)+";",o))}}else for(var f in a){var d=a[f];null!=d&&(r&&(r+="\n"),r+=""+rE(f+": "+nE(d)+";",o))}for(var h in t){var p=t[h];null!=p&&"fallbacks"!==h&&(r&&(r+="\n"),r+=""+rE(h+": "+nE(p)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),rE(e+" {"+r,--o)+rE("}",o)):r}var oE=/([[\].#*$><+~=|^:(),"'`\s])/g,aE="undefined"!=typeof CSS&&CSS.escape,sE=function(e){return aE?aE(e):e.replace(oE,"\\$1")},uE=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var u=this.options.sheet;return u&&u.attached,this},e}(),lE=function(e){function t(t,n,r){var i;(i=e.call(this,t,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var o=r.selector,a=r.scoped,s=r.sheet,u=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=u(Jq(Jq(i)),s),i.selectorText="."+sE(i.id)),i}Xq(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==r(n)?e[t]=n:Array.isArray(n)&&(e[t]=nE(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Wq({},e,{allowEmpty:!0}):e;return iE(this.selectorText,this.style,n)},Gq(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(uE),cE={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new lE(e,t,n)}},fE={indent:1,children:!0},dE=/@([\w-]+)/,hE=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e;var r=e.match(dE);for(var i in this.at=r?r[1]:"unknown",this.options=n,this.rules=new PE(Wq({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=fE),null==e.indent&&(e.indent=fE.indent),null==e.children&&(e.children=fE.children),!1===e.children)return this.key+" {}";var t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""},e}(),pE=/@media|@supports\s+/,mE={onCreateRule:function(e,t,n){return pE.test(e)?new hE(e,t,n):null}},vE={indent:1,children:!0},gE=/@keyframes\s+([\w-]+)/,yE=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=e.match(gE);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,a=n.generateId;for(var s in this.id=!1===i?this.name:sE(a(this,o)),this.rules=new PE(Wq({},n,{parent:this})),t)this.rules.add(s,t[s],Wq({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=vE),null==e.indent&&(e.indent=vE.indent),null==e.children&&(e.children=vE.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),bE=/@keyframes\s+/,xE=/\$([\w-]+)/g,wE=function(e,t){return"string"==typeof e?e.replace(xE,(function(e,n){return n in t?t[n]:e})):e},ME=function(e,t,n){var r=e[t],i=wE(r,n);i!==r&&(e[t]=i)},kE={onCreateRule:function(e,t,n){return"string"==typeof e&&bE.test(e)?new yE(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&ME(e,"animation-name",n.keyframes),"animation"in e&&ME(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return wE(e,r.keyframes);default:return e}}},SE=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).renderable=void 0,t}return Xq(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Wq({},e,{allowEmpty:!0}):e;return iE(this.key,this.style,n)},t}(uE),CE={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new SE(e,t,n):null}},qE=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=iE(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return iE(this.key,this.style,e)},e}(),EE={onCreateRule:function(e,t,n){return"@font-face"===e?new qE(e,t,n):null}},TE=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return iE(this.key,this.style,e)},e}(),DE={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new TE(e,t,n):null}},OE=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),NE={"@charset":!0,"@import":!0,"@namespace":!0},_E=[cE,mE,kE,CE,EE,DE,{onCreateRule:function(e,t,n){return e in NE?new OE(e,t,n):null}}],AE={process:!0},IE={force:!0,process:!0},PE=function(){function e(e){this.map={},this.raw={},this.index=[],this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,a=r.jss,s=r.Renderer,u=r.generateId,l=r.scoped,c=Wq({classes:this.classes,parent:i,sheet:o,jss:a,Renderer:s,generateId:u,scoped:l},n);this.raw[e]=t,e in this.classes&&(c.selector="."+sE(this.classes[e]));var f=eE(e,t,c);if(!f)return null;this.register(f);var d=void 0===c.index?this.index.length:c.index;return this.index.splice(d,0,f),f},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof lE?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof yE&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof lE?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof yE&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.onUpdate(t,this.get(e),n);else for(var r=0;r<this.index.length;r++)this.onUpdate(t,this.index[r],n)},t.onUpdate=function(t,n,r){void 0===r&&(r=AE);var i=this.options,o=i.jss.plugins,a=i.sheet;if(n.rules instanceof e)n.rules.update(t,r);else{var s=n,u=s.style;if(o.onUpdate(t,n,a,r),r.process&&u&&u!==s.style){for(var l in o.onProcessStyle(s.style,s,a),s.style){var c=s.style[l];c!==u[l]&&s.prop(l,c,IE)}for(var f in u){var d=s.style[f],h=u[f];null==d&&d!==h&&s.prop(f,null,IE)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var o=this.index[i].toString(e);(o||r)&&(t&&(t+="\n"),t+=o)}return t},e}(),LE=function(){function e(e,t){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Wq({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new PE(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.toString=function(e){return this.rules.toString(e)},e}(),RE=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),jE=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["attached"]),i="",o=0;o<this.registry.length;o++){var a=this.registry[o];null!=n&&a.attached!==n||(i&&(i+="\n"),i+=a.toString(r))}return i},Gq(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),zE="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),FE="2f1acc6c3a606b082e5eef5e54414ffb";null==zE[FE]&&(zE[FE]=0);var BE=zE[FE]++,VE=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+BE+i+t:o+n.key+"-"+BE+(i?"-"+i:"")+"-"+t}},HE=function(e){var t;return function(){return t||(t=e()),t}};function UE(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}}function WE(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=nE(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(e){return!1}return!0}function YE(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}}function KE(e,t){return e.selectorText=t,e.selectorText===t}var $E=HE((function(){return document.querySelector("head")}));function GE(e){var t=jE.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=$E(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var XE=HE((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),JE=function(e,t,n){var r=e.cssRules.length;(void 0===n||n>r)&&(n=r);try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(e){return!1}return e.cssRules[n]},QE=function(){function e(e){this.getPropertyValue=UE,this.setProperty=WE,this.removeProperty=YE,this.setSelector=KE,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&jE.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=XE();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=GE(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else $E().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;return("conditional"!==e.type&&"keyframes"!==e.type||!1!==(i=JE(n,r.toString({children:!1}),t)))&&(this.insertRules(r.rules,i),i)}if(e.renderable&&e.renderable.parentStyleSheet===this.element.sheet)return e.renderable;var o=e.toString();if(!o)return!1;var a=JE(n,o,t);return!1!==a&&(this.hasInsertedRules=!0,e.renderable=a,a)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)},t.indexOf=function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),ZE=0,eT=function(){function e(e){this.id=ZE++,this.version="10.0.0",this.plugins=new RE,this.options={id:{minify:!1},createGenerateId:VE,Renderer:Kq?QE:null,plugins:[]},this.generateId=VE({minify:!1});for(var t=0;t<_E.length;t++)this.plugins.use(_E[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Wq({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===jE.index?0:jE.index+1);var r=new LE(e,Wq({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),jE.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"===r(e))return this.createRule(void 0,e,t);var i=Wq({},n,{jss:this,Renderer:this.options.Renderer});i.generateId||(i.generateId=this.generateId),i.classes||(i.classes={}),i.keyframes||(i.keyframes={});var o=eE(e,t,i);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}();function tT(e){var t=null;for(var n in e){var i=e[n],o=r(i);if("function"===o)t||(t={}),t[n]=i;else if("object"===o&&null!==i&&!Array.isArray(i)){var a=tT(i);a&&(t||(t={}),t[n]=a)}}return t}
|
|
10
|
+
/**
|
|
11
|
+
* A better abstraction over CSS.
|
|
12
|
+
*
|
|
13
|
+
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
|
|
14
|
+
* @website https://github.com/cssinjs/jss
|
|
15
|
+
* @license MIT
|
|
16
|
+
*/var nT="undefined"!=typeof CSS&&CSS&&"number"in CSS,rT=function(e){return new eT(e)};rT();var iT=Date.now(),oT="fnValues"+iT,aT="fnStyle"+ ++iT;function sT(){return(sT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var uT="@global",lT="@global ",cT=function(){function e(e,t,n){for(var r in this.type="global",this.at=uT,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new PE(sT({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),fT=function(){function e(e,t,n){this.type="global",this.at=uT,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr(lT.length);this.rule=n.jss.createRule(r,t,sT({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),dT=/\s*,\s*/g;function hT(e,t){for(var n=e.split(dT),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}function pT(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===uT)return new cT(e,t,n);if("@"===e[0]&&e.substr(0,lT.length)===lT)return new fT(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),!1===n.scoped&&(n.selector=e),null},onProcessRule:function(e){"style"===e.type&&(function(e){var t=e.options,n=e.style,r=n?n[uT]:null;if(r){for(var i in r)t.sheet.addRule(i,r[i],sT({},t,{selector:hT(i,e.selector)}));delete n[uT]}}(e),function(e){var t=e.options,n=e.style;for(var r in n)if("@"===r[0]&&r.substr(0,uT.length)===uT){var i=hT(r.substr(uT.length),e.selector);t.sheet.addRule(i,n[r],sT({},t,{selector:i})),delete n[r]}}(e))}}}function mT(){return(mT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vT=/\s*,\s*/g,gT=/&/g,yT=/\$([\w-]+)/g;function bT(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?(i=i).selector:r}}function t(e,t){for(var n=t.split(vT),r=e.split(vT),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var u=r[s];i&&(i+=", "),i+=-1!==u.indexOf("&")?u.replace(gT,a):a+" "+u}return i}function n(e,t,n){if(n)return mT({},n,{index:n.index+1});var r=e.options.nestingLevel;return r=void 0===r?1:r+1,mT({},e.options,{nestingLevel:r,index:t.indexOf(e)+1})}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,u=i,l=u.options.parent;for(var c in r){var f=-1!==c.indexOf("&"),d="@"===c[0];if(f||d){if(a=n(u,l,a),f){var h=t(c,u.selector);s||(s=e(l,o)),h=h.replace(yT,s),l.addRule(h,r[c],mT({},a,{selector:h}))}else d&&l.addRule(c,{},a).addRule(u.key,r[c],{selector:u.selector});delete r[c]}}return r}}}var xT=/[A-Z]/g,wT=/^ms-/,MT={};function kT(e){return"-"+e.toLowerCase()}function ST(e){if(MT.hasOwnProperty(e))return MT[e];var t=e.replace(xT,kT);return MT[e]=wT.test(t)?"-"+t:t}function CT(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:ST(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(CT):t.fallbacks=CT(e.fallbacks)),t}var qT=nT&&CSS?CSS.px:"px",ET=nT&&CSS?CSS.ms:"ms",TT=nT&&CSS?CSS.percent:"%";function DT(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var OT=DT({"animation-delay":ET,"animation-duration":ET,"background-position":qT,"background-position-x":qT,"background-position-y":qT,"background-size":qT,border:qT,"border-bottom":qT,"border-bottom-left-radius":qT,"border-bottom-right-radius":qT,"border-bottom-width":qT,"border-left":qT,"border-left-width":qT,"border-radius":qT,"border-right":qT,"border-right-width":qT,"border-top":qT,"border-top-left-radius":qT,"border-top-right-radius":qT,"border-top-width":qT,"border-width":qT,margin:qT,"margin-bottom":qT,"margin-left":qT,"margin-right":qT,"margin-top":qT,padding:qT,"padding-bottom":qT,"padding-left":qT,"padding-right":qT,"padding-top":qT,"mask-position-x":qT,"mask-position-y":qT,"mask-size":qT,height:qT,width:qT,"min-height":qT,"max-height":qT,"min-width":qT,"max-width":qT,bottom:qT,left:qT,top:qT,right:qT,"box-shadow":qT,"text-shadow":qT,"column-gap":qT,"column-rule":qT,"column-rule-width":qT,"column-width":qT,"font-size":qT,"font-size-delta":qT,"letter-spacing":qT,"text-indent":qT,"text-stroke":qT,"text-stroke-width":qT,"word-spacing":qT,motion:qT,"motion-offset":qT,outline:qT,"outline-offset":qT,"outline-width":qT,perspective:qT,"perspective-origin-x":TT,"perspective-origin-y":TT,"transform-origin":TT,"transform-origin-x":TT,"transform-origin-y":TT,"transform-origin-z":TT,"transition-delay":ET,"transition-duration":ET,"vertical-align":qT,"flex-basis":qT,"shape-margin":qT,size:qT,grid:qT,"grid-gap":qT,"grid-row-gap":qT,"grid-column-gap":qT,"grid-template-rows":qT,"grid-template-columns":qT,"grid-auto-rows":qT,"grid-auto-columns":qT,"box-shadow-x":qT,"box-shadow-y":qT,"box-shadow-blur":qT,"box-shadow-spread":qT,"font-line-height":qT,"text-shadow-x":qT,"text-shadow-y":qT,"text-shadow-blur":qT});function NT(e,t,n){if(!t)return t;if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]=NT(e,t[i],n);else if("object"===r(t))if("fallbacks"===e)for(var o in t)t[o]=NT(o,t[o],n);else for(var a in t)t[a]=NT(e+"-"+a,t[a],n);else if("number"==typeof t)return n[e]?""+t+n[e]:OT[e]?"function"==typeof OT[e]?OT[e](t).toString():""+t+OT[e]:t.toString();return t}function _T(e){void 0===e&&(e={});var t=DT(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=NT(r,e[r],t);return e},onChangeValue:function(e,n){return NT(n,e,t)}}}function AT(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var IT="",PT="",LT="",RT=Kq&&"ontouchstart"in document.documentElement;if(Kq){var jT={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},zT=document.createElement("p").style;for(var FT in jT)if(FT+"Transform"in zT){IT=FT,PT=jT[FT];break}"Webkit"===IT&&"msHyphens"in zT&&(IT="ms",PT=jT.ms,"edge"),"Webkit"===IT&&"-apple-trailing-word"in zT&&(LT="apple")}var BT=IT,VT=PT,HT=LT,UT=RT;var WT={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===BT?"-webkit-"+e:VT+e)}},YT={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===BT?VT+"print-"+e:e)}},KT=/[-\s]+(.)?/g;function $T(e,t){return t?t.toUpperCase():""}function GT(e){return e.replace(KT,$T)}function XT(e){return GT("-"+e)}var JT,QT={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===BT){var n="mask-image";if(GT(n)in t)return e;if(BT+XT(n)in t)return VT+e}return e}},ZT={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==HT||UT?e:VT+e)}},eD={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:VT+e)}},tD={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:VT+e)}},nD={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===BT||"ms"===BT?VT+e:e)}},rD={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===BT||"ms"===BT||"apple"===HT?VT+e:e)}},iD={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===BT?"WebkitColumn"+XT(e)in t&&VT+"column-"+e:"Moz"===BT&&("page"+XT(e)in t&&"page-"+e))}},oD={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===BT)return e;var n=e.replace("-inline","");return BT+XT(n)in t&&VT+n}},aD={supportedProperty:function(e,t){return GT(e)in t&&e}},sD={supportedProperty:function(e,t){var n=XT(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:BT+n in t?VT+e:"Webkit"!==BT&&"Webkit"+n in t&&"-webkit-"+e}},uD={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===BT?""+VT+e:e)}},lD={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===BT?VT+"scroll-chaining":e)}},cD={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},fD={supportedProperty:function(e,t){var n=cD[e];return!!n&&(BT+XT(n)in t&&VT+n)}},dD={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},hD=Object.keys(dD),pD=function(e){return VT+e},mD=[WT,YT,QT,ZT,eD,tD,nD,rD,iD,oD,aD,sD,uD,lD,fD,{supportedProperty:function(e,t,n){var r=n.multiple;if(hD.indexOf(e)>-1){var i=dD[e];if(!Array.isArray(i))return BT+XT(i)in t&&VT+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(BT+XT(i[0])in t))return!1;return i.map(pD)}return!1}}],vD=mD.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),gD=mD.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,AT(t.noPrefill)),e}),[]),yD={};if(Kq){JT=document.createElement("p");var bD=window.getComputedStyle(document.documentElement,"");for(var xD in bD)isNaN(xD)||(yD[bD[xD]]=bD[xD]);gD.forEach((function(e){return delete yD[e]}))}function wD(e,t){if(void 0===t&&(t={}),!JT)return e;if(null!=yD[e])return yD[e];"transition"!==e&&"transform"!==e||(t[e]=e in JT.style);for(var n=0;n<vD.length&&(yD[e]=vD[n](e,JT.style,t),!yD[e]);n++);try{JT.style[e]=""}catch(e){return!1}return yD[e]}var MD,kD={},SD={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},CD=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function qD(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?wD(t):", "+wD(n);return r||(t||n)}function ED(e,t){var n=t;if(!MD||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=kD[r])return kD[r];try{MD.style[e]=n}catch(e){return kD[r]=!1,!1}if(SD[e])n=n.replace(CD,qD);else if(""===MD.style[e]&&("-ms-flex"===(n=VT+n)&&(MD.style[e]="-ms-flexbox"),MD.style[e]=n,""===MD.style[e]))return kD[r]=!1,!1;return MD.style[e]="",kD[r]=n,kD[r]}function TD(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=wD(n);o&&o!==n&&(i=!0);var a=!1,s=ED(o,nE(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===BT?e:"@"+VT+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return ED(t,nE(e))||e}}}function DD(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}}function OD(){return{plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=eE(e,{},n);return r[aT]=t,r},onProcessStyle:function(e,t){if(oT in t||aT in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[oT]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[aT];o&&(i.style=o(e)||{});var a=i[oT];if(a)for(var s in a)i.prop(s,a[s](e),r)}},pT(),bT(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=CT(e[t]);return e}return CT(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=ST(t);return t===r?e:(n.prop(r,e),null)}},_T(),"undefined"==typeof window?null:TD(),DD()]}}function ND(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _D(){return(_D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function AD(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=_D({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}Kq&&(MD=document.createElement("p"));var ID=function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},PD=function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},LD=function(e,t,n){e.get(t).delete(n)},RD=kC.createContext(null);function jD(){return kC.useContext(RD)}var zD,FD=rT(OD()),BD={disableGeneration:!1,generateClassName:Hq(),jss:FD,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},VD=kC.createContext(BD);function HD(e){var t=e.children,n=e.injectFirst,r=void 0!==n&&n,i=e.disableGeneration,o=void 0!==i&&i,a=ND(e,["children","injectFirst","disableGeneration"]),s=_D({},kC.useContext(VD),{disableGeneration:o},a);if(!s.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!zD){var u=document.head;zD=document.createComment("mui-inject-first"),u.insertBefore(zD,u.firstChild)}s.jss=rT({plugins:OD().plugins,insertionPoint:zD})}return kC.createElement(VD.Provider,{value:s},t)}var UD=-1e9;function WD(){return UD+=1}var YD={};function KD(e){var t="function"==typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return i;var o=n.overrides[r],a=_D({},i);return Object.keys(o).forEach((function(e){a[e]=JC(a[e],o[e])})),a},options:{}}}function $D(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=AD({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function GD(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var s=PD(i.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},ID(i.sheetsManager,o,r,s));var u=_D({},o.options,{},i,{theme:r,flip:"boolean"==typeof i.flip?i.flip:"rtl"===r.direction});u.generateId=u.serverGenerateClassName||u.generateClassName;var l=i.sheetsRegistry;if(0===s.refs){var c;i.sheetsCache&&(c=PD(i.sheetsCache,o,r));var f=o.create(r,a);c||((c=i.jss.createStyleSheet(f,_D({link:!1},u))).attach(),i.sheetsCache&&ID(i.sheetsCache,o,r,c)),l&&l.add(c),s.staticSheet=c,s.dynamicStyles=tT(f)}if(s.dynamicStyles){var d=i.jss.createStyleSheet(s.dynamicStyles,_D({link:!0},u));d.update(t).attach(),n.dynamicSheet=d,n.classes=AD({baseClasses:s.staticSheet.classes,newClasses:d.classes}),l&&l.add(d)}else n.classes=s.staticSheet.classes;s.refs+=1}}function XD(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function JD(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=PD(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(LD(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function QD(e,t){var n,r=kC.useRef([]),i=kC.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),kC.useEffect((function(){return function(){n&&n()}}),[i])}function ZD(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,i=t.Component,o=t.defaultTheme,a=void 0===o?YD:o,s=ND(t,["name","classNamePrefix","Component","defaultTheme"]),u=KD(e),l=n||r||"makeStyles";return u.options={index:WD(),name:n,meta:l,classNamePrefix:l},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=jD()||a,r=_D({},kC.useContext(VD),{},s),o=kC.useRef(),l=kC.useRef();return QD((function(){var i={name:n,state:{},stylesCreator:u,stylesOptions:r,theme:t};return GD(i,e),l.current=!1,o.current=i,function(){JD(i)}}),[t,u]),kC.useEffect((function(){l.current&&XD(o.current,e),l.current=!0})),$D(o.current,e.classes,i)}}function eO(e){var t,n,i="";if(e)if("object"===r(e))if(e.push)for(t=0;t<e.length;t++)e[t]&&(n=eO(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(n=eO(t))&&(i&&(i+=" "),i+=n);else"boolean"==typeof e||e.call||(i&&(i+=" "),i+=e);return i}function tO(){for(var e,t=0,n="";t<arguments.length;)(e=eO(arguments[t++]))&&(n&&(n+=" "),n+=e);return n}var nO=QC.exports,rO={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},iO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},oO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},aO={};function sO(e){return nO.isMemo(e)?oO:aO[e.$$typeof]||rO}aO[nO.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var uO=Object.defineProperty,lO=Object.getOwnPropertyNames,cO=Object.getOwnPropertySymbols,fO=Object.getOwnPropertyDescriptor,dO=Object.getPrototypeOf,hO=Object.prototype;var pO=function e(t,n,r){if("string"!=typeof n){if(hO){var i=dO(n);i&&i!==hO&&e(t,i,r)}var o=lO(n);cO&&(o=o.concat(cO(n)));for(var a=sO(t),s=sO(n),u=0;u<o.length;++u){var l=o[u];if(!(iO[l]||r&&r[l]||s&&s[l]||a&&a[l])){var c=fO(n,l);try{uO(t,l,c)}catch(e){}}}return t}return t};function mO(e){var t=e.children,n=e.theme,r=jD(),i=kC.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):_D({},e,{},t)}(r,n);return null!=e&&(e[Bq]=null!==r),e}),[n,r]);return kC.createElement(RD.Provider,{value:i},t)}var vO=Fq();function gO(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,i=t.withTheme,o=void 0!==i&&i,a=t.name,s=ND(t,["defaultTheme","withTheme","name"]),u=a,l=ZD(e,_D({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:u},s)),c=kC.forwardRef((function(e,t){e.classes;var i,s=e.innerRef,u=ND(e,["classes","innerRef"]),c=l(e),f=u;return("string"==typeof a||o)&&(i=jD()||r,a&&(f=Uq({theme:i,name:a,props:u})),o&&!f.theme&&(f.theme=i)),kC.createElement(n,_D({ref:s||t,classes:c},f))}));return c.defaultProps=n.defaultProps,pO(c,n),c}}(e,WC({defaultTheme:vO},t))}function yO(e){return e.charAt(0).toUpperCase()+e.slice(1)}var bO=kC.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.square,s=void 0!==a&&a,u=e.elevation,l=void 0===u?1:u,c=YC(e,["classes","className","component","square","elevation"]);return kC.createElement(o,WC({className:tO(n.root,n["elevation".concat(l)],r,!s&&n.rounded),ref:t},c))})),xO=gO((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),WC({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius}},t)}),{name:"MuiPaper"})(bO);function wO(){return(wO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function MO(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function kO(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var SO={exports:{}},CO={exports:{}},qO={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=null,n=!1,i=3,o=-1,a=-1,s=!1,u=!1;function l(){if(!s){var e=t.expirationTime;u?k():u=!0,M(d,e)}}function c(){var e=t,n=t.next;if(t===n)t=null;else{var r=t.previous;t=r.next=n,n.previous=r}e.next=e.previous=null,r=e.callback,n=e.expirationTime,e=e.priorityLevel;var o=i,s=a;i=e,a=n;try{var u=r()}finally{i=o,a=s}if("function"==typeof u)if(u={callback:u,priorityLevel:e,expirationTime:n,next:null,previous:null},null===t)t=u.next=u.previous=u;else{r=null,e=t;do{if(e.expirationTime>=n){r=e;break}e=e.next}while(e!==t);null===r?r=t:r===t&&(t=u,l()),(n=r.previous).next=r.previous=u,u.next=r,u.previous=n}}function f(){if(-1===o&&null!==t&&1===t.priorityLevel){s=!0;try{do{c()}while(null!==t&&1===t.priorityLevel)}finally{s=!1,null!==t?l():u=!1}}}function d(r){s=!0;var i=n;n=r;try{if(r)for(;null!==t;){var o=e.unstable_now();if(!(t.expirationTime<=o))break;do{c()}while(null!==t&&t.expirationTime<=o)}else if(null!==t)do{c()}while(null!==t&&!S())}finally{s=!1,n=i,null!==t?l():u=!1,f()}}var h,p,m=Date,v="function"==typeof setTimeout?setTimeout:void 0,g="function"==typeof clearTimeout?clearTimeout:void 0,y="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,b="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function x(t){h=y((function(e){g(p),t(e)})),p=v((function(){b(h),t(e.unstable_now())}),100)}if("object"===("undefined"==typeof performance?"undefined":r(performance))&&"function"==typeof performance.now){var w=performance;e.unstable_now=function(){return w.now()}}else e.unstable_now=function(){return m.now()};var M,k,S,C=null;if("undefined"!=typeof window?C=window:void 0!==vg&&(C=vg),C&&C._schedMock){var q=C._schedMock;M=q[0],k=q[1],S=q[2],e.unstable_now=q[3]}else if("undefined"==typeof window||"function"!=typeof MessageChannel){var E=null,T=function(e){if(null!==E)try{E(e)}finally{E=null}};M=function(e){null!==E?setTimeout(M,0,e):(E=e,setTimeout(T,0,!1))},k=function(){E=null},S=function(){return!1}}else{"undefined"!=typeof console&&("function"!=typeof y&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var D=null,O=!1,N=-1,_=!1,A=!1,I=0,P=33,L=33;S=function(){return I<=e.unstable_now()};var R=new MessageChannel,j=R.port2;R.port1.onmessage=function(){O=!1;var t=D,n=N;D=null,N=-1;var r=e.unstable_now(),i=!1;if(0>=I-r){if(!(-1!==n&&n<=r))return _||(_=!0,x(z)),D=t,void(N=n);i=!0}if(null!==t){A=!0;try{t(i)}finally{A=!1}}};var z=function e(t){if(null!==D){x(e);var n=t-I+L;n<L&&P<L?(8>n&&(n=8),L=n<P?P:n):P=n,I=t+L,O||(O=!0,j.postMessage(void 0))}else _=!1};M=function(e,t){D=e,N=t,A||0>t?j.postMessage(void 0):_||(_=!0,x(z))},k=function(){D=null,O=!1,N=-1}}e.unstable_ImmediatePriority=1,e.unstable_UserBlockingPriority=2,e.unstable_NormalPriority=3,e.unstable_IdlePriority=5,e.unstable_LowPriority=4,e.unstable_runWithPriority=function(t,n){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=i,a=o;i=t,o=e.unstable_now();try{return n()}finally{i=r,o=a,f()}},e.unstable_next=function(t){switch(i){case 1:case 2:case 3:var n=3;break;default:n=i}var r=i,a=o;i=n,o=e.unstable_now();try{return t()}finally{i=r,o=a,f()}},e.unstable_scheduleCallback=function(n,a){var s=-1!==o?o:e.unstable_now();if("object"===r(a)&&null!==a&&"number"==typeof a.timeout)a=s+a.timeout;else switch(i){case 1:a=s+-1;break;case 2:a=s+250;break;case 5:a=s+1073741823;break;case 4:a=s+1e4;break;default:a=s+5e3}if(n={callback:n,priorityLevel:i,expirationTime:a,next:null,previous:null},null===t)t=n.next=n.previous=n,l();else{s=null;var u=t;do{if(u.expirationTime>a){s=u;break}u=u.next}while(u!==t);null===s?s=t:s===t&&(t=n,l()),(a=s.previous).next=s.previous=n,n.next=s,n.previous=a}return n},e.unstable_cancelCallback=function(e){var n=e.next;if(null!==n){if(n===e)t=null;else{e===t&&(t=n);var r=e.previous;r.next=n,n.previous=r}e.next=e.previous=null}},e.unstable_wrapCallback=function(t){var n=i;return function(){var r=i,a=o;i=n,o=e.unstable_now();try{return t.apply(this,arguments)}finally{i=r,o=a,f()}}},e.unstable_getCurrentPriorityLevel=function(){return i},e.unstable_shouldYield=function(){return!n&&(null!==t&&t.expirationTime<a||S())},e.unstable_continueExecution=function(){null!==t&&l()},e.unstable_pauseExecution=function(){},e.unstable_getFirstCallbackNode=function(){return t}}(qO),CO.exports=qO;var EO=ES.exports,TO=_S,DO=CO.exports;function OO(e,t,n,r,i,o,a,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],l=0;(e=Error(t.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw e.framesToPop=1,e}}function NO(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);OO(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function _O(e,t,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}EO||NO("227");var AO=!1,IO=null,PO=!1,LO=null,RO={onError:function(e){AO=!0,IO=e}};function jO(e,t,n,r,i,o,a,s,u){AO=!1,IO=null,_O.apply(RO,arguments)}var zO=null,FO={};function BO(){if(zO)for(var e in FO){var t=FO[e],n=zO.indexOf(e);if(-1<n||NO("96",e),!HO[n])for(var r in t.extractEvents||NO("97",e),HO[n]=t,n=t.eventTypes){var i=void 0,o=n[r],a=t,s=r;UO.hasOwnProperty(s)&&NO("99",s),UO[s]=o;var u=o.phasedRegistrationNames;if(u){for(i in u)u.hasOwnProperty(i)&&VO(u[i],a,s);i=!0}else o.registrationName?(VO(o.registrationName,a,s),i=!0):i=!1;i||NO("98",r,e)}}}function VO(e,t,n){WO[e]&&NO("100",e),WO[e]=t,YO[e]=t.eventTypes[n].dependencies}var HO=[],UO={},WO={},YO={},KO=null,$O=null,GO=null;function XO(e,t,n){var r=e.type||"unknown-event";e.currentTarget=GO(n),function(e,t,n,r,i,o,a,s,u){if(jO.apply(this,arguments),AO){if(AO){var l=IO;AO=!1,IO=null}else NO("198"),l=void 0;PO||(PO=!0,LO=l)}}(r,t,void 0,e),e.currentTarget=null}function JO(e,t){return null==t&&NO("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function QO(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var ZO=null;function eN(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)XO(e,t[r],n[r]);else t&&XO(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}var tN={injectEventPluginOrder:function(e){zO&&NO("101"),zO=Array.prototype.slice.call(e),BO()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];FO.hasOwnProperty(t)&&FO[t]===r||(FO[t]&&NO("102",t),FO[t]=r,n=!0)}n&&BO()}};function nN(e,t){var n=e.stateNode;if(!n)return null;var i=KO(n);if(!i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&NO("231",t,r(n)),n)}function rN(e){if(null!==e&&(ZO=JO(ZO,e)),e=ZO,ZO=null,e&&(QO(e,eN),ZO&&NO("95"),PO))throw e=LO,PO=!1,LO=null,e}var iN=Math.random().toString(36).slice(2),oN="__reactInternalInstance$"+iN,aN="__reactEventHandlers$"+iN;function sN(e){if(e[oN])return e[oN];for(;!e[oN];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[oN]).tag||6===e.tag?e:null}function uN(e){return!(e=e[oN])||5!==e.tag&&6!==e.tag?null:e}function lN(e){if(5===e.tag||6===e.tag)return e.stateNode;NO("33")}function cN(e){return e[aN]||null}function fN(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function dN(e,t,n){(t=nN(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=JO(n._dispatchListeners,t),n._dispatchInstances=JO(n._dispatchInstances,e))}function hN(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=fN(t);for(t=n.length;0<t--;)dN(n[t],"captured",e);for(t=0;t<n.length;t++)dN(n[t],"bubbled",e)}}function pN(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=nN(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=JO(n._dispatchListeners,t),n._dispatchInstances=JO(n._dispatchInstances,e))}function mN(e){e&&e.dispatchConfig.registrationName&&pN(e._targetInst,null,e)}function vN(e){QO(e,hN)}var gN=!("undefined"==typeof window||!window.document||!window.document.createElement);function yN(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bN={animationend:yN("Animation","AnimationEnd"),animationiteration:yN("Animation","AnimationIteration"),animationstart:yN("Animation","AnimationStart"),transitionend:yN("Transition","TransitionEnd")},xN={},wN={};function MN(e){if(xN[e])return xN[e];if(!bN[e])return e;var t,n=bN[e];for(t in n)if(n.hasOwnProperty(t)&&t in wN)return xN[e]=n[t];return e}gN&&(wN=document.createElement("div").style,"AnimationEvent"in window||(delete bN.animationend.animation,delete bN.animationiteration.animation,delete bN.animationstart.animation),"TransitionEvent"in window||delete bN.transitionend.transition);var kN=MN("animationend"),SN=MN("animationiteration"),CN=MN("animationstart"),qN=MN("transitionend"),EN="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),TN=null,DN=null,ON=null;function NN(){if(ON)return ON;var e,t,n=DN,r=n.length,i="value"in TN?TN.value:TN.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return ON=i.slice(e,1<t?1-t:void 0)}function _N(){return!0}function AN(){return!1}function IN(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?_N:AN,this.isPropagationStopped=AN,this}function PN(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function LN(e){e instanceof this||NO("279"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function RN(e){e.eventPool=[],e.getPooled=PN,e.release=LN}TO(IN.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=_N)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=_N)},persist:function(){this.isPersistent=_N},isPersistent:AN,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=AN,this._dispatchInstances=this._dispatchListeners=null}}),IN.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},IN.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return TO(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=TO({},r.Interface,e),n.extend=r.extend,RN(n),n},RN(IN);var jN=IN.extend({data:null}),zN=IN.extend({data:null}),FN=[9,13,27,32],BN=gN&&"CompositionEvent"in window,VN=null;gN&&"documentMode"in document&&(VN=document.documentMode);var HN=gN&&"TextEvent"in window&&!VN,UN=gN&&(!BN||VN&&8<VN&&11>=VN),WN=String.fromCharCode(32),YN={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},KN=!1;function $N(e,t){switch(e){case"keyup":return-1!==FN.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function GN(e){return"object"===r(e=e.detail)&&"data"in e?e.data:null}var XN=!1;var JN={eventTypes:YN,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(BN)e:{switch(e){case"compositionstart":i=YN.compositionStart;break e;case"compositionend":i=YN.compositionEnd;break e;case"compositionupdate":i=YN.compositionUpdate;break e}i=void 0}else XN?$N(e,n)&&(i=YN.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=YN.compositionStart);return i?(UN&&"ko"!==n.locale&&(XN||i!==YN.compositionStart?i===YN.compositionEnd&&XN&&(o=NN()):(DN="value"in(TN=r)?TN.value:TN.textContent,XN=!0)),i=jN.getPooled(i,t,n,r),o?i.data=o:null!==(o=GN(n))&&(i.data=o),vN(i),o=i):o=null,(e=HN?function(e,t){switch(e){case"compositionend":return GN(t);case"keypress":return 32!==t.which?null:(KN=!0,WN);case"textInput":return(e=t.data)===WN&&KN?null:e;default:return null}}(e,n):function(e,t){if(XN)return"compositionend"===e||!BN&&$N(e,t)?(e=NN(),ON=DN=TN=null,XN=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return UN&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=zN.getPooled(YN.beforeInput,t,n,r)).data=e,vN(t)):t=null,null===o?t:null===t?o:[o,t]}},QN=null,ZN=null,e_=null;function t_(e){if(e=$O(e)){"function"!=typeof QN&&NO("280");var t=KO(e.stateNode);QN(e.stateNode,e.type,t)}}function n_(e){ZN?e_?e_.push(e):e_=[e]:ZN=e}function r_(){if(ZN){var e=ZN,t=e_;if(e_=ZN=null,t_(e),t)for(e=0;e<t.length;e++)t_(t[e])}}function i_(e,t){return e(t)}function o_(e,t,n){return e(t,n)}function a_(){}var s_=!1;function u_(e,t){if(s_)return e(t);s_=!0;try{return i_(e,t)}finally{s_=!1,(null!==ZN||null!==e_)&&(a_(),r_())}}var l_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function c_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!l_[e.type]:"textarea"===t}function f_(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function d_(e){if(!gN)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}function h_(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function p_(e){e._valueTracker||(e._valueTracker=function(e){var t=h_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function m_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=h_(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}var v_=EO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;v_.hasOwnProperty("ReactCurrentDispatcher")||(v_.ReactCurrentDispatcher={current:null});var g_=/^(.*)[\\\/]/,y_="function"==typeof Symbol&&Symbol.for,b_=y_?Symbol.for("react.element"):60103,x_=y_?Symbol.for("react.portal"):60106,w_=y_?Symbol.for("react.fragment"):60107,M_=y_?Symbol.for("react.strict_mode"):60108,k_=y_?Symbol.for("react.profiler"):60114,S_=y_?Symbol.for("react.provider"):60109,C_=y_?Symbol.for("react.context"):60110,q_=y_?Symbol.for("react.concurrent_mode"):60111,E_=y_?Symbol.for("react.forward_ref"):60112,T_=y_?Symbol.for("react.suspense"):60113,D_=y_?Symbol.for("react.memo"):60115,O_=y_?Symbol.for("react.lazy"):60116,N_="function"==typeof Symbol&&Symbol.iterator;function __(e){return null===e||"object"!==r(e)?null:"function"==typeof(e=N_&&e[N_]||e["@@iterator"])?e:null}function A_(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case q_:return"ConcurrentMode";case w_:return"Fragment";case x_:return"Portal";case k_:return"Profiler";case M_:return"StrictMode";case T_:return"Suspense"}if("object"===r(e))switch(e.$$typeof){case C_:return"Context.Consumer";case S_:return"Context.Provider";case E_:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case D_:return A_(e.type);case O_:if(e=1===e._status?e._result:null)return A_(e)}return null}function I_(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=A_(e.type);n=null,r&&(n=A_(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(g_,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}var P_=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,L_=Object.prototype.hasOwnProperty,R_={},j_={};function z_(e,t,n,i){if(null==t||function(e,t,n,i){if(null!==n&&0===n.type)return!1;switch(r(t)){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function F_(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}var B_={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){B_[e]=new F_(e,0,!1,e,null)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];B_[t]=new F_(t,1,!1,e[1],null)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){B_[e]=new F_(e,2,!1,e.toLowerCase(),null)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){B_[e]=new F_(e,2,!1,e,null)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){B_[e]=new F_(e,3,!1,e.toLowerCase(),null)})),["checked","multiple","muted","selected"].forEach((function(e){B_[e]=new F_(e,3,!0,e,null)})),["capture","download"].forEach((function(e){B_[e]=new F_(e,4,!1,e,null)})),["cols","rows","size","span"].forEach((function(e){B_[e]=new F_(e,6,!1,e,null)})),["rowSpan","start"].forEach((function(e){B_[e]=new F_(e,5,!1,e.toLowerCase(),null)}));var V_=/[\-:]([a-z])/g;function H_(e){return e[1].toUpperCase()}function U_(e,t,n,r){var i=B_.hasOwnProperty(t)?B_[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(z_(t,n,i,r)&&(n=null),r||null===i?function(e){return!!L_.call(j_,e)||!L_.call(R_,e)&&(P_.test(e)?j_[e]=!0:(R_[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function W_(e){switch(r(e)){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y_(e,t){var n=t.checked;return TO({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K_(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W_(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function $_(e,t){null!=(t=t.checked)&&U_(e,"checked",t,!1)}function G_(e,t){$_(e,t);var n=W_(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?J_(e,t.type,n):t.hasOwnProperty("defaultValue")&&J_(e,t.type,W_(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X_(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function J_(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(V_,H_);B_[t]=new F_(t,1,!1,e,null)})),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(V_,H_);B_[t]=new F_(t,1,!1,e,"http://www.w3.org/1999/xlink")})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(V_,H_);B_[t]=new F_(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")})),["tabIndex","crossOrigin"].forEach((function(e){B_[e]=new F_(e,1,!1,e.toLowerCase(),null)}));var Q_={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Z_(e,t,n){return(e=IN.getPooled(Q_.change,e,t,n)).type="change",n_(n),vN(e),e}var eA=null,tA=null;function nA(e){rN(e)}function rA(e){if(m_(lN(e)))return e}function iA(e,t){if("change"===e)return t}var oA=!1;function aA(){eA&&(eA.detachEvent("onpropertychange",sA),tA=eA=null)}function sA(e){"value"===e.propertyName&&rA(tA)&&u_(nA,e=Z_(tA,e,f_(e)))}function uA(e,t,n){"focus"===e?(aA(),tA=n,(eA=t).attachEvent("onpropertychange",sA)):"blur"===e&&aA()}function lA(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return rA(tA)}function cA(e,t){if("click"===e)return rA(t)}function fA(e,t){if("input"===e||"change"===e)return rA(t)}gN&&(oA=d_("input")&&(!document.documentMode||9<document.documentMode));var dA={eventTypes:Q_,_isInputEventSupported:oA,extractEvents:function(e,t,n,r){var i=t?lN(t):window,o=void 0,a=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?o=iA:c_(i)?oA?o=fA:(o=lA,a=uA):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(o=cA),o&&(o=o(e,t)))return Z_(o,n,r);a&&a(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&J_(i,"number",i.value)}},hA=IN.extend({view:null,detail:null}),pA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mA(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=pA[e])&&!!t[e]}function vA(){return mA}var gA=0,yA=0,bA=!1,xA=!1,wA=hA.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:vA,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=gA;return gA=e.screenX,bA?"mousemove"===e.type?e.screenX-t:0:(bA=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=yA;return yA=e.screenY,xA?"mousemove"===e.type?e.screenY-t:0:(xA=!0,0)}}),MA=wA.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),kA={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},SA={eventTypes:kA,extractEvents:function(e,t,n,r){var i="mouseover"===e||"pointerover"===e,o="mouseout"===e||"pointerout"===e;if(i&&(n.relatedTarget||n.fromElement)||!o&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,o?(o=t,t=(t=n.relatedTarget||n.toElement)?sN(t):null):o=null,o===t)return null;var a=void 0,s=void 0,u=void 0,l=void 0;"mouseout"===e||"mouseover"===e?(a=wA,s=kA.mouseLeave,u=kA.mouseEnter,l="mouse"):"pointerout"!==e&&"pointerover"!==e||(a=MA,s=kA.pointerLeave,u=kA.pointerEnter,l="pointer");var c=null==o?i:lN(o);if(i=null==t?i:lN(t),(e=a.getPooled(s,o,n,r)).type=l+"leave",e.target=c,e.relatedTarget=i,(n=a.getPooled(u,t,n,r)).type=l+"enter",n.target=i,n.relatedTarget=c,r=t,o&&r)e:{for(i=r,l=0,a=t=o;a;a=fN(a))l++;for(a=0,u=i;u;u=fN(u))a++;for(;0<l-a;)t=fN(t),l--;for(;0<a-l;)i=fN(i),a--;for(;l--;){if(t===i||t===i.alternate)break e;t=fN(t),i=fN(i)}t=null}else t=null;for(i=t,t=[];o&&o!==i&&(null===(l=o.alternate)||l!==i);)t.push(o),o=fN(o);for(o=[];r&&r!==i&&(null===(l=r.alternate)||l!==i);)o.push(r),r=fN(r);for(r=0;r<t.length;r++)pN(t[r],"bubbled",e);for(r=o.length;0<r--;)pN(o[r],"captured",n);return[e,n]}};function CA(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var qA=Object.prototype.hasOwnProperty;function EA(e,t){if(CA(e,t))return!0;if("object"!==r(e)||null===e||"object"!==r(t)||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++)if(!qA.call(t,n[i])||!CA(e[n[i]],t[n[i]]))return!1;return!0}function TA(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(0!=(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function DA(e){2!==TA(e)&&NO("188")}function OA(e){if(!(e=function(e){var t=e.alternate;if(!t)return 3===(t=TA(e))&&NO("188"),1===t?null:e;for(var n=e,r=t;;){var i=n.return,o=i?i.alternate:null;if(!i||!o)break;if(i.child===o.child){for(var a=i.child;a;){if(a===n)return DA(i),e;if(a===r)return DA(i),t;a=a.sibling}NO("188")}if(n.return!==r.return)n=i,r=o;else{a=!1;for(var s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}a||NO("189")}}n.alternate!==r&&NO("190")}return 3!==n.tag&&NO("188"),n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var NA=IN.extend({animationName:null,elapsedTime:null,pseudoElement:null}),_A=IN.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),AA=hA.extend({relatedTarget:null});function IA(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var PA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},LA={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},RA=hA.extend({key:function(e){if(e.key){var t=PA[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=IA(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?LA[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:vA,charCode:function(e){return"keypress"===e.type?IA(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?IA(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),jA=wA.extend({dataTransfer:null}),zA=hA.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:vA}),FA=IN.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),BA=wA.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),VA=[["abort","abort"],[kN,"animationEnd"],[SN,"animationIteration"],[CN,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[qN,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],HA={},UA={};function WA(e,t){var n=e[0],r="on"+((e=e[1])[0].toUpperCase()+e.slice(1));t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},HA[e]=t,UA[n]=t}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["auxclick","auxClick"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach((function(e){WA(e,!0)})),VA.forEach((function(e){WA(e,!1)}));var YA={eventTypes:HA,isInteractiveTopLevelEventType:function(e){return void 0!==(e=UA[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var i=UA[e];if(!i)return null;switch(e){case"keypress":if(0===IA(n))return null;case"keydown":case"keyup":e=RA;break;case"blur":case"focus":e=AA;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=wA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=jA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=zA;break;case kN:case SN:case CN:e=NA;break;case qN:e=FA;break;case"scroll":e=hA;break;case"wheel":e=BA;break;case"copy":case"cut":case"paste":e=_A;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=MA;break;default:e=IN}return vN(t=e.getPooled(i,t,n,r)),t}},KA=YA.isInteractiveTopLevelEventType,$A=[];function GA(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r;for(r=n;r.return;)r=r.return;if(!(r=3!==r.tag?null:r.stateNode.containerInfo))break;e.ancestors.push(n),n=sN(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=f_(e.nativeEvent);r=e.topLevelType;for(var o=e.nativeEvent,a=null,s=0;s<HO.length;s++){var u=HO[s];u&&(u=u.extractEvents(r,t,o,i))&&(a=JO(a,u))}rN(a)}}var XA=!0;function JA(e,t){if(!t)return null;var n=(KA(e)?ZA:eI).bind(null,e);t.addEventListener(e,n,!1)}function QA(e,t){if(!t)return null;var n=(KA(e)?ZA:eI).bind(null,e);t.addEventListener(e,n,!0)}function ZA(e,t){o_(eI,e,t)}function eI(e,t){if(XA){var n=f_(t);if(null===(n=sN(n))||"number"!=typeof n.tag||2===TA(n)||(n=null),$A.length){var r=$A.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{u_(GA,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>$A.length&&$A.push(e)}}}var tI={},nI=0,rI="_reactListenersID"+(""+Math.random()).slice(2);function iI(e){return Object.prototype.hasOwnProperty.call(e,rI)||(e[rI]=nI++,tI[e[rI]]={}),tI[e[rI]]}function oI(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function aI(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sI(e,t){var n,r=aI(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=aI(r)}}function uI(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?uI(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function lI(){for(var e=window,t=oI();t instanceof e.HTMLIFrameElement;){try{e=t.contentDocument.defaultView}catch(e){break}t=oI(e.document)}return t}function cI(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fI(e){var t=lI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&uI(n.ownerDocument.documentElement,n)){if(null!==r&&cI(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=sI(n,o);var a=sI(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var dI=gN&&"documentMode"in document&&11>=document.documentMode,hI={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},pI=null,mI=null,vI=null,gI=!1;function yI(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return gI||null==pI||pI!==oI(n)?null:("selectionStart"in(n=pI)&&cI(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},vI&&EA(vI,n)?null:(vI=n,(e=IN.getPooled(hI.select,mI,e,t)).type="select",e.target=pI,vN(e),e))}var bI={eventTypes:hI,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=iI(o),i=YO.onSelect;for(var a=0;a<i.length;a++){var s=i[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break e}}o=!0}i=!o}if(i)return null;switch(o=t?lN(t):window,e){case"focus":(c_(o)||"true"===o.contentEditable)&&(pI=o,mI=t,vI=null);break;case"blur":vI=mI=pI=null;break;case"mousedown":gI=!0;break;case"contextmenu":case"mouseup":case"dragend":return gI=!1,yI(n,r);case"selectionchange":if(dI)break;case"keydown":case"keyup":return yI(n,r)}return null}};function xI(e,t){return e=TO({children:void 0},t),(t=function(e){var t="";return EO.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function wI(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W_(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function MI(e,t){return null!=t.dangerouslySetInnerHTML&&NO("91"),TO({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function kI(e,t){var n=t.value;null==n&&(n=t.defaultValue,null!=(t=t.children)&&(null!=n&&NO("92"),Array.isArray(t)&&(1>=t.length||NO("93"),t=t[0]),n=t),null==n&&(n="")),e._wrapperState={initialValue:W_(n)}}function SI(e,t){var n=W_(t.value),r=W_(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function CI(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}tN.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),KO=cN,$O=uN,GO=lN,tN.injectEventPluginsByName({SimpleEventPlugin:YA,EnterLeaveEventPlugin:SA,ChangeEventPlugin:dA,SelectEventPlugin:bI,BeforeInputEventPlugin:JN});var qI="http://www.w3.org/1999/xhtml",EI="http://www.w3.org/2000/svg";function TI(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function DI(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?TI(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var OI=void 0,NI=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==EI||"innerHTML"in e)e.innerHTML=t;else{for((OI=OI||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=OI.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function _I(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var AI={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},II=["Webkit","ms","Moz","O"];function PI(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||AI.hasOwnProperty(e)&&AI[e]?(""+t).trim():t+"px"}function LI(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=PI(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(AI).forEach((function(e){II.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),AI[t]=AI[e]}))}));var RI=TO({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function jI(e,t){t&&(RI[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&NO("137",e,""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&NO("60"),"object"===r(t.dangerouslySetInnerHTML)&&"__html"in t.dangerouslySetInnerHTML||NO("61")),null!=t.style&&"object"!==r(t.style)&&NO("62",""))}function zI(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function FI(e,t){var n=iI(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=YO[t];for(var r=0;r<t.length;r++){var i=t[r];if(!n.hasOwnProperty(i)||!n[i]){switch(i){case"scroll":QA("scroll",e);break;case"focus":case"blur":QA("focus",e),QA("blur",e),n.blur=!0,n.focus=!0;break;case"cancel":case"close":d_(i)&&QA(i,e);break;case"invalid":case"submit":case"reset":break;default:-1===EN.indexOf(i)&&JA(i,e)}n[i]=!0}}}function BI(){}var VI=null,HI=null;function UI(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function WI(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"===r(t.dangerouslySetInnerHTML)&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var YI="function"==typeof setTimeout?setTimeout:void 0,KI="function"==typeof clearTimeout?clearTimeout:void 0,$I=DO.unstable_scheduleCallback,GI=DO.unstable_cancelCallback;function XI(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function JI(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}var QI=[],ZI=-1;function eP(e){0>ZI||(e.current=QI[ZI],QI[ZI]=null,ZI--)}function tP(e,t){ZI++,QI[ZI]=e.current,e.current=t}var nP={},rP={current:nP},iP={current:!1},oP=nP;function aP(e,t){var n=e.type.contextTypes;if(!n)return nP;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function sP(e){return null!=(e=e.childContextTypes)}function uP(e){eP(iP),eP(rP)}function lP(e){eP(iP),eP(rP)}function cP(e,t,n){rP.current!==nP&&NO("168"),tP(rP,t),tP(iP,n)}function fP(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())i in e||NO("108",A_(t)||"Unknown",i);return TO({},n,r)}function dP(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||nP,oP=rP.current,tP(rP,t),tP(iP,iP.current),!0}function hP(e,t,n){var r=e.stateNode;r||NO("169"),n?(t=fP(e,t,oP),r.__reactInternalMemoizedMergedChildContext=t,eP(iP),eP(rP),tP(rP,t)):eP(iP),tP(iP,n)}var pP=null,mP=null;function vP(e){return function(t){try{return e(t)}catch(e){}}}function gP(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function yP(e,t,n,r){return new gP(e,t,n,r)}function bP(e){return!(!(e=e.prototype)||!e.isReactComponent)}function xP(e,t){var n=e.alternate;return null===n?((n=yP(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,n.contextDependencies=e.contextDependencies,n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function wP(e,t,n,i,o,a){var s=2;if(i=e,"function"==typeof e)bP(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case w_:return MP(n.children,o,a,t);case q_:return kP(n,3|o,a,t);case M_:return kP(n,2|o,a,t);case k_:return(e=yP(12,n,t,4|o)).elementType=k_,e.type=k_,e.expirationTime=a,e;case T_:return(e=yP(13,n,t,o)).elementType=T_,e.type=T_,e.expirationTime=a,e;default:if("object"===r(e)&&null!==e)switch(e.$$typeof){case S_:s=10;break e;case C_:s=9;break e;case E_:s=11;break e;case D_:s=14;break e;case O_:s=16,i=null;break e}NO("130",null==e?e:r(e),"")}return(t=yP(s,n,t,o)).elementType=e,t.type=i,t.expirationTime=a,t}function MP(e,t,n,r){return(e=yP(7,e,r,t)).expirationTime=n,e}function kP(e,t,n,r){return e=yP(8,e,r,t),t=0==(1&t)?M_:q_,e.elementType=t,e.type=t,e.expirationTime=n,e}function SP(e,t,n){return(e=yP(6,e,null,t)).expirationTime=n,e}function CP(e,t,n){return(t=yP(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qP(e,t){e.didError=!1;var n=e.earliestPendingTime;0===n?e.earliestPendingTime=e.latestPendingTime=t:n<t?e.earliestPendingTime=t:e.latestPendingTime>t&&(e.latestPendingTime=t),DP(t,e)}function EP(e,t){e.didError=!1,e.latestPingedTime>=t&&(e.latestPingedTime=0);var n=e.earliestPendingTime,r=e.latestPendingTime;n===t?e.earliestPendingTime=r===t?e.latestPendingTime=0:r:r===t&&(e.latestPendingTime=n),n=e.earliestSuspendedTime,r=e.latestSuspendedTime,0===n?e.earliestSuspendedTime=e.latestSuspendedTime=t:n<t?e.earliestSuspendedTime=t:r>t&&(e.latestSuspendedTime=t),DP(t,e)}function TP(e,t){var n=e.earliestPendingTime;return n>t&&(t=n),(e=e.earliestSuspendedTime)>t&&(t=e),t}function DP(e,t){var n=t.earliestSuspendedTime,r=t.latestSuspendedTime,i=t.earliestPendingTime,o=t.latestPingedTime;0===(i=0!==i?i:o)&&(0===e||r<e)&&(i=r),0!==(e=i)&&n>e&&(e=n),t.nextExpirationTimeToWorkOn=i,t.expirationTime=e}function OP(e,t){if(e&&e.defaultProps)for(var n in t=TO({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var NP=(new EO.Component).refs;function _P(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:TO({},t,n),e.memoizedState=n,null!==(r=e.updateQueue)&&0===e.expirationTime&&(r.baseState=n)}var AP={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===TA(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Fj(),i=dR(r=fj(r,e));i.payload=t,null!=n&&(i.callback=n),oj(),pR(e,i),mj(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Fj(),i=dR(r=fj(r,e));i.tag=sR,i.payload=t,null!=n&&(i.callback=n),oj(),pR(e,i),mj(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Fj(),r=dR(n=fj(n,e));r.tag=uR,null!=t&&(r.callback=t),oj(),pR(e,r),mj(e,n)}};function IP(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!EA(n,r)||!EA(i,o))}function PP(e,t,n){var i=!1,o=nP,a=t.contextType;return"object"===r(a)&&null!==a?a=aR(a):(o=sP(t)?oP:rP.current,a=(i=null!=(i=t.contextTypes))?aP(e,o):nP),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=AP,e.stateNode=t,t._reactInternalFiber=e,i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function LP(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&AP.enqueueReplaceState(t,t.state,null)}function RP(e,t,n,i){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=NP;var a=t.contextType;"object"===r(a)&&null!==a?o.context=aR(a):(a=sP(t)?oP:rP.current,o.context=aP(e,a)),null!==(a=e.updateQueue)&&(yR(e,a,n,o,i),o.state=e.memoizedState),"function"==typeof(a=t.getDerivedStateFromProps)&&(_P(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&AP.enqueueReplaceState(o,o.state,null),null!==(a=e.updateQueue)&&(yR(e,a,n,o,i),o.state=e.memoizedState)),"function"==typeof o.componentDidMount&&(e.effectTag|=4)}var jP=Array.isArray;function zP(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!==r(e)){if(n._owner){n=n._owner;var i=void 0;n&&(1!==n.tag&&NO("309"),i=n.stateNode),i||NO("147",e);var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=i.refs;t===NP&&(t=i.refs={}),null===e?delete t[o]:t[o]=e})._stringRef=o,t)}"string"!=typeof e&&NO("284"),n._owner||NO("290",e)}return e}function FP(e,t){"textarea"!==e.type&&NO("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function BP(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return(e=xP(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=SP(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=zP(e,t,n),r.return=e,r):((r=wP(n.type,n.key,n.props,null,e.mode,r)).ref=zP(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=CP(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=MP(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=SP(""+t,e.mode,n)).return=e,t;if("object"===r(t)&&null!==t){switch(t.$$typeof){case b_:return(n=wP(t.type,t.key,t.props,null,e.mode,n)).ref=zP(e,null,t),n.return=e,n;case x_:return(t=CP(t,e.mode,n)).return=e,t}if(jP(t)||__(t))return(t=MP(t,e.mode,n,null)).return=e,t;FP(e,t)}return null}function h(e,t,n,i){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:u(e,t,""+n,i);if("object"===r(n)&&null!==n){switch(n.$$typeof){case b_:return n.key===o?n.type===w_?f(e,t,n.props.children,i,o):l(e,t,n,i):null;case x_:return n.key===o?c(e,t,n,i):null}if(jP(n)||__(n))return null!==o?null:f(e,t,n,i,null);FP(e,n)}return null}function p(e,t,n,i,o){if("string"==typeof i||"number"==typeof i)return u(t,e=e.get(n)||null,""+i,o);if("object"===r(i)&&null!==i){switch(i.$$typeof){case b_:return e=e.get(null===i.key?n:i.key)||null,i.type===w_?f(t,e,i.props.children,o,i.key):l(t,e,i,o);case x_:return c(t,e=e.get(null===i.key?n:i.key)||null,i,o)}if(jP(i)||__(i))return f(t,e=e.get(n)||null,i,o,null);FP(t,i)}return null}function m(r,o,s,u){for(var l=null,c=null,f=o,m=o=0,v=null;null!==f&&m<s.length;m++){f.index>m?(v=f,f=null):v=f.sibling;var g=h(r,f,s[m],u);if(null===g){null===f&&(f=v);break}e&&f&&null===g.alternate&&t(r,f),o=a(g,o,m),null===c?l=g:c.sibling=g,c=g,f=v}if(m===s.length)return n(r,f),l;if(null===f){for(;m<s.length;m++)(f=d(r,s[m],u))&&(o=a(f,o,m),null===c?l=f:c.sibling=f,c=f);return l}for(f=i(r,f);m<s.length;m++)(v=p(f,r,m,s[m],u))&&(e&&null!==v.alternate&&f.delete(null===v.key?m:v.key),o=a(v,o,m),null===c?l=v:c.sibling=v,c=v);return e&&f.forEach((function(e){return t(r,e)})),l}function v(r,o,s,u){var l=__(s);"function"!=typeof l&&NO("150"),null==(s=l.call(s))&&NO("151");for(var c=l=null,f=o,m=o=0,v=null,g=s.next();null!==f&&!g.done;m++,g=s.next()){f.index>m?(v=f,f=null):v=f.sibling;var y=h(r,f,g.value,u);if(null===y){f||(f=v);break}e&&f&&null===y.alternate&&t(r,f),o=a(y,o,m),null===c?l=y:c.sibling=y,c=y,f=v}if(g.done)return n(r,f),l;if(null===f){for(;!g.done;m++,g=s.next())null!==(g=d(r,g.value,u))&&(o=a(g,o,m),null===c?l=g:c.sibling=g,c=g);return l}for(f=i(r,f);!g.done;m++,g=s.next())null!==(g=p(f,r,m,g.value,u))&&(e&&null!==g.alternate&&f.delete(null===g.key?m:g.key),o=a(g,o,m),null===c?l=g:c.sibling=g,c=g);return e&&f.forEach((function(e){return t(r,e)})),l}return function(e,i,a,u){var l="object"===r(a)&&null!==a&&a.type===w_&&null===a.key;l&&(a=a.props.children);var c="object"===r(a)&&null!==a;if(c)switch(a.$$typeof){case b_:e:{for(c=a.key,l=i;null!==l;){if(l.key===c){if(7===l.tag?a.type===w_:l.elementType===a.type){n(e,l.sibling),(i=o(l,a.type===w_?a.props.children:a.props)).ref=zP(e,l,a),i.return=e,e=i;break e}n(e,l);break}t(e,l),l=l.sibling}a.type===w_?((i=MP(a.props.children,e.mode,u,a.key)).return=e,e=i):((u=wP(a.type,a.key,a.props,null,e.mode,u)).ref=zP(e,i,a),u.return=e,e=u)}return s(e);case x_:e:{for(l=a.key;null!==i;){if(i.key===l){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(e,i.sibling),(i=o(i,a.children||[])).return=e,e=i;break e}n(e,i);break}t(e,i),i=i.sibling}(i=CP(a,e.mode,u)).return=e,e=i}return s(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==i&&6===i.tag?(n(e,i.sibling),(i=o(i,a)).return=e,e=i):(n(e,i),(i=SP(a,e.mode,u)).return=e,e=i),s(e);if(jP(a))return m(e,i,a,u);if(__(a))return v(e,i,a,u);if(c&&FP(e,a),void 0===a&&!l)switch(e.tag){case 1:case 0:NO("152",(u=e.type).displayName||u.name||"Component")}return n(e,i)}}var VP=BP(!0),HP=BP(!1),UP={},WP={current:UP},YP={current:UP},KP={current:UP};function $P(e){return e===UP&&NO("174"),e}function GP(e,t){tP(KP,t),tP(YP,e),tP(WP,UP);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:DI(null,"");break;default:t=DI(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}eP(WP),tP(WP,t)}function XP(e){eP(WP),eP(YP),eP(KP)}function JP(e){$P(KP.current);var t=$P(WP.current),n=DI(t,e.type);t!==n&&(tP(YP,e),tP(WP,n))}function QP(e){YP.current===e&&(eP(WP),eP(YP))}var ZP=v_.ReactCurrentDispatcher,eL=0,tL=null,nL=null,rL=null,iL=null,oL=null,aL=null,sL=0,uL=null,lL=0,cL=!1,fL=null,dL=0;function hL(){NO("307")}function pL(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!CA(e[n],t[n]))return!1;return!0}function mL(e,t,n,r,i,o){if(eL=o,tL=t,rL=null!==e?e.memoizedState:null,ZP.current=null===rL?TL:DL,t=n(r,i),cL){do{cL=!1,dL+=1,rL=null!==e?e.memoizedState:null,aL=iL,uL=oL=nL=null,ZP.current=DL,t=n(r,i)}while(cL);fL=null,dL=0}return ZP.current=EL,(e=tL).memoizedState=iL,e.expirationTime=sL,e.updateQueue=uL,e.effectTag|=lL,e=null!==nL&&null!==nL.next,eL=0,aL=oL=iL=rL=nL=tL=null,sL=0,uL=null,lL=0,e&&NO("300"),t}function vL(){ZP.current=EL,eL=0,aL=oL=iL=rL=nL=tL=null,sL=0,uL=null,lL=0,cL=!1,fL=null,dL=0}function gL(){var e={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===oL?iL=oL=e:oL=oL.next=e,oL}function yL(){if(null!==aL)aL=(oL=aL).next,rL=null!==(nL=rL)?nL.next:null;else{null===rL&&NO("310");var e={memoizedState:(nL=rL).memoizedState,baseState:nL.baseState,queue:nL.queue,baseUpdate:nL.baseUpdate,next:null};oL=null===oL?iL=e:oL.next=e,rL=nL.next}return oL}function bL(e,t){return"function"==typeof t?t(e):t}function xL(e){var t=yL(),n=t.queue;if(null===n&&NO("311"),0<dL){var r=n.dispatch;if(null!==fL){var i=fL.get(n);if(void 0!==i){fL.delete(n);var o=t.memoizedState;do{o=e(o,i.action),i=i.next}while(null!==i);return CA(o,t.memoizedState)||(FL=!0),t.memoizedState=o,t.baseUpdate===n.last&&(t.baseState=o),n.eagerReducer=e,n.eagerState=o,[o,r]}}return[t.memoizedState,r]}r=n.last;var a=t.baseUpdate;if(o=t.baseState,null!==a?(null!==r&&(r.next=null),r=a.next):r=null!==r?r.next:null,null!==r){var s=i=null,u=r,l=!1;do{var c=u.expirationTime;c<eL?(l||(l=!0,s=a,i=o),c>sL&&(sL=c)):o=u.eagerReducer===e?u.eagerState:e(o,u.action),a=u,u=u.next}while(null!==u&&u!==r);l||(s=a,i=o),CA(o,t.memoizedState)||(FL=!0),t.memoizedState=o,t.baseUpdate=s,t.baseState=i,n.eagerReducer=e,n.eagerState=o}return[t.memoizedState,n.dispatch]}function wL(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===uL?(uL={lastEffect:null}).lastEffect=e.next=e:null===(t=uL.lastEffect)?uL.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,uL.lastEffect=e),e}function ML(e,t,n,r){var i=gL();lL|=e,i.memoizedState=wL(t,n,void 0,void 0===r?null:r)}function kL(e,t,n,r){var i=yL();r=void 0===r?null:r;var o=void 0;if(null!==nL){var a=nL.memoizedState;if(o=a.destroy,null!==r&&pL(r,a.deps))return void wL(0,n,o,r)}lL|=e,i.memoizedState=wL(t,n,o,r)}function SL(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function CL(){}function qL(e,t,n){25>dL||NO("301");var r=e.alternate;if(e===tL||null!==r&&r===tL)if(cL=!0,e={expirationTime:eL,action:n,eagerReducer:null,eagerState:null,next:null},null===fL&&(fL=new Map),void 0===(n=fL.get(t)))fL.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{oj();var i=Fj(),o={expirationTime:i=fj(i,e),action:n,eagerReducer:null,eagerState:null,next:null},a=t.last;if(null===a)o.next=o;else{var s=a.next;null!==s&&(o.next=s),a.next=o}if(t.last=o,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.eagerReducer))try{var u=t.eagerState,l=r(u,n);if(o.eagerReducer=r,o.eagerState=l,CA(l,u))return}catch(e){}mj(e,i)}}var EL={readContext:aR,useCallback:hL,useContext:hL,useEffect:hL,useImperativeHandle:hL,useLayoutEffect:hL,useMemo:hL,useReducer:hL,useRef:hL,useState:hL,useDebugValue:hL},TL={readContext:aR,useCallback:function(e,t){return gL().memoizedState=[e,void 0===t?null:t],e},useContext:aR,useEffect:function(e,t){return ML(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ML(4,36,SL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ML(4,36,e,t)},useMemo:function(e,t){var n=gL();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gL();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,eagerReducer:e,eagerState:t}).dispatch=qL.bind(null,tL,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},gL().memoizedState=e},useState:function(e){var t=gL();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,eagerReducer:bL,eagerState:e}).dispatch=qL.bind(null,tL,e),[t.memoizedState,e]},useDebugValue:CL},DL={readContext:aR,useCallback:function(e,t){var n=yL();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&pL(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:aR,useEffect:function(e,t){return kL(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,kL(4,36,SL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return kL(4,36,e,t)},useMemo:function(e,t){var n=yL();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&pL(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:xL,useRef:function(){return yL().memoizedState},useState:function(e){return xL(bL)},useDebugValue:CL},OL=null,NL=null,_L=!1;function AL(e,t){var n=yP(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function IL(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function PL(e){if(_L){var t=NL;if(t){var n=t;if(!IL(e,t)){if(!(t=XI(n))||!IL(e,t))return e.effectTag|=2,_L=!1,void(OL=e);AL(OL,n)}OL=e,NL=JI(t)}else e.effectTag|=2,_L=!1,OL=e}}function LL(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&18!==e.tag;)e=e.return;OL=e}function RL(e){if(e!==OL)return!1;if(!_L)return LL(e),_L=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!WI(t,e.memoizedProps))for(t=NL;t;)AL(e,t),t=XI(t);return LL(e),NL=OL?XI(e.stateNode):null,!0}function jL(){NL=OL=null,_L=!1}var zL=v_.ReactCurrentOwner,FL=!1;function BL(e,t,n,r){t.child=null===e?HP(t,null,n,r):VP(t,e.child,n,r)}function VL(e,t,n,r,i){n=n.render;var o=t.ref;return oR(t,i),r=mL(e,t,n,r,o,i),null===e||FL?(t.effectTag|=1,BL(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),JL(e,t,i))}function HL(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||bP(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=wP(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,UL(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:EA)(i,r)&&e.ref===t.ref)?JL(e,t,o):(t.effectTag|=1,(e=xP(a,r)).ref=t.ref,e.return=t,t.child=e)}function UL(e,t,n,r,i,o){return null!==e&&EA(e.memoizedProps,r)&&e.ref===t.ref&&(FL=!1,i<o)?JL(e,t,o):YL(e,t,n,r,o)}function WL(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function YL(e,t,n,r,i){var o=sP(n)?oP:rP.current;return o=aP(t,o),oR(t,i),n=mL(e,t,n,r,o,i),null===e||FL?(t.effectTag|=1,BL(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),JL(e,t,i))}function KL(e,t,n,i,o){if(sP(n)){var a=!0;dP(t)}else a=!1;if(oR(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),PP(t,n,i),RP(t,n,i,o),i=!0;else if(null===e){var s=t.stateNode,u=t.memoizedProps;s.props=u;var l=s.context,c=n.contextType;"object"===r(c)&&null!==c?c=aR(c):c=aP(t,c=sP(n)?oP:rP.current);var f=n.getDerivedStateFromProps,d="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(u!==i||l!==c)&&LP(t,s,i,c),lR=!1;var h=t.memoizedState;l=s.state=h;var p=t.updateQueue;null!==p&&(yR(t,p,i,s,o),l=t.memoizedState),u!==i||h!==l||iP.current||lR?("function"==typeof f&&(_P(t,n,f,i),l=t.memoizedState),(u=lR||IP(t,n,u,i,h,l,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.effectTag|=4)):("function"==typeof s.componentDidMount&&(t.effectTag|=4),t.memoizedProps=i,t.memoizedState=l),s.props=i,s.state=l,s.context=c,i=u):("function"==typeof s.componentDidMount&&(t.effectTag|=4),i=!1)}else s=t.stateNode,u=t.memoizedProps,s.props=t.type===t.elementType?u:OP(t.type,u),l=s.context,"object"===r(c=n.contextType)&&null!==c?c=aR(c):c=aP(t,c=sP(n)?oP:rP.current),(d="function"==typeof(f=n.getDerivedStateFromProps)||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(u!==i||l!==c)&&LP(t,s,i,c),lR=!1,l=t.memoizedState,h=s.state=l,null!==(p=t.updateQueue)&&(yR(t,p,i,s,o),h=t.memoizedState),u!==i||l!==h||iP.current||lR?("function"==typeof f&&(_P(t,n,f,i),h=t.memoizedState),(f=lR||IP(t,n,u,i,l,h,c))?(d||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(i,h,c),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(i,h,c)),"function"==typeof s.componentDidUpdate&&(t.effectTag|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof s.componentDidUpdate||u===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof s.getSnapshotBeforeUpdate||u===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=i,t.memoizedState=h),s.props=i,s.state=h,s.context=c,i=f):("function"!=typeof s.componentDidUpdate||u===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof s.getSnapshotBeforeUpdate||u===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),i=!1);return $L(e,t,n,i,a,o)}function $L(e,t,n,r,i,o){WL(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return i&&hP(t,n,!1),JL(e,t,o);r=t.stateNode,zL.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=VP(t,e.child,null,o),t.child=VP(t,null,s,o)):BL(e,t,s,o),t.memoizedState=r.state,i&&hP(t,n,!0),t.child}function GL(e){var t=e.stateNode;t.pendingContext?cP(0,t.pendingContext,t.pendingContext!==t.context):t.context&&cP(0,t.context,!1),GP(e,t.containerInfo)}function XL(e,t,n){var r=t.mode,i=t.pendingProps,o=t.memoizedState;if(0==(64&t.effectTag)){o=null;var a=!1}else o={timedOutAt:null!==o?o.timedOutAt:0},a=!0,t.effectTag&=-65;if(null===e)if(a){var s=i.fallback;e=MP(null,r,0,null),0==(1&t.mode)&&(e.child=null!==t.memoizedState?t.child.child:t.child),r=MP(s,r,n,null),e.sibling=r,(n=e).return=r.return=t}else n=r=HP(t,null,i.children,n);else null!==e.memoizedState?(s=(r=e.child).sibling,a?(n=i.fallback,i=xP(r,r.pendingProps),0==(1&t.mode)&&((a=null!==t.memoizedState?t.child.child:t.child)!==r.child&&(i.child=a)),r=i.sibling=xP(s,n,s.expirationTime),n=i,i.childExpirationTime=0,n.return=r.return=t):n=r=VP(t,r.child,i.children,n)):(s=e.child,a?(a=i.fallback,(i=MP(null,r,0,null)).child=s,0==(1&t.mode)&&(i.child=null!==t.memoizedState?t.child.child:t.child),(r=i.sibling=MP(a,r,n,null)).effectTag|=2,n=i,i.childExpirationTime=0,n.return=r.return=t):r=n=VP(t,s,i.children,n)),t.stateNode=e.stateNode;return t.memoizedState=o,t.child=n,r}function JL(e,t,n){if(null!==e&&(t.contextDependencies=e.contextDependencies),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child&&NO("153"),null!==t.child){for(n=xP(e=t.child,e.pendingProps,e.expirationTime),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=xP(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function QL(e,t,n){var i=t.expirationTime;if(null!==e){if(e.memoizedProps!==t.pendingProps||iP.current)FL=!0;else if(i<n){switch(FL=!1,t.tag){case 3:GL(t),jL();break;case 5:JP(t);break;case 1:sP(t.type)&&dP(t);break;case 4:GP(t,t.stateNode.containerInfo);break;case 10:rR(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!==(i=t.child.childExpirationTime)&&i>=n?XL(e,t,n):null!==(t=JL(e,t,n))?t.sibling:null}return JL(e,t,n)}}else FL=!1;switch(t.expirationTime=0,t.tag){case 2:i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps;var o=aP(t,rP.current);if(oR(t,n),o=mL(null,t,i,e,o,n),t.effectTag|=1,"object"===r(o)&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,vL(),sP(i)){var a=!0;dP(t)}else a=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null;var s=i.getDerivedStateFromProps;"function"==typeof s&&_P(t,i,s,e),o.updater=AP,t.stateNode=o,o._reactInternalFiber=t,RP(t,i,e,n),t=$L(null,t,i,!0,a,n)}else t.tag=0,BL(null,t,o,n),t=t.child;return t;case 16:switch(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),a=t.pendingProps,e=function(e){var t=e._result;switch(e._status){case 1:return t;case 2:case 0:throw t;default:switch(e._status=0,(t=(t=e._ctor)()).then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)})),e._status){case 1:return e._result;case 2:throw e._result}throw e._result=t,t}}(o),t.type=e,o=t.tag=function(e){if("function"==typeof e)return bP(e)?1:0;if(null!=e){if((e=e.$$typeof)===E_)return 11;if(e===D_)return 14}return 2}(e),a=OP(e,a),s=void 0,o){case 0:s=YL(null,t,e,a,n);break;case 1:s=KL(null,t,e,a,n);break;case 11:s=VL(null,t,e,a,n);break;case 14:s=HL(null,t,e,OP(e.type,a),i,n);break;default:NO("306",e,"")}return s;case 0:return i=t.type,o=t.pendingProps,YL(e,t,i,o=t.elementType===i?o:OP(i,o),n);case 1:return i=t.type,o=t.pendingProps,KL(e,t,i,o=t.elementType===i?o:OP(i,o),n);case 3:return GL(t),null===(i=t.updateQueue)&&NO("282"),o=null!==(o=t.memoizedState)?o.element:null,yR(t,i,t.pendingProps,null,n),(i=t.memoizedState.element)===o?(jL(),t=JL(e,t,n)):(o=t.stateNode,(o=(null===e||null===e.child)&&o.hydrate)&&(NL=JI(t.stateNode.containerInfo),OL=t,o=_L=!0),o?(t.effectTag|=2,t.child=HP(t,null,i,n)):(BL(e,t,i,n),jL()),t=t.child),t;case 5:return JP(t),null===e&&PL(t),i=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,WI(i,o)?s=null:null!==a&&WI(i,a)&&(t.effectTag|=16),WL(e,t),1!==n&&1&t.mode&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(BL(e,t,s,n),t=t.child),t;case 6:return null===e&&PL(t),null;case 13:return XL(e,t,n);case 4:return GP(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=VP(t,null,i,n):BL(e,t,i,n),t.child;case 11:return i=t.type,o=t.pendingProps,VL(e,t,i,o=t.elementType===i?o:OP(i,o),n);case 7:return BL(e,t,t.pendingProps,n),t.child;case 8:case 12:return BL(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,o=t.pendingProps,s=t.memoizedProps,rR(t,a=o.value),null!==s){var u=s.value;if(0===(a=CA(u,a)?0:0|("function"==typeof i._calculateChangedBits?i._calculateChangedBits(u,a):1073741823))){if(s.children===o.children&&!iP.current){t=JL(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var l=u.contextDependencies;if(null!==l){s=u.child;for(var c=l.first;null!==c;){if(c.context===i&&0!=(c.observedBits&a)){1===u.tag&&((c=dR(n)).tag=uR,pR(u,c)),u.expirationTime<n&&(u.expirationTime=n),null!==(c=u.alternate)&&c.expirationTime<n&&(c.expirationTime=n),c=n;for(var f=u.return;null!==f;){var d=f.alternate;if(f.childExpirationTime<c)f.childExpirationTime=c,null!==d&&d.childExpirationTime<c&&(d.childExpirationTime=c);else{if(!(null!==d&&d.childExpirationTime<c))break;d.childExpirationTime=c}f=f.return}l.expirationTime<n&&(l.expirationTime=n);break}c=c.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}}BL(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=(a=t.pendingProps).children,oR(t,n),i=i(o=aR(o,a.unstable_observedBits)),t.effectTag|=1,BL(e,t,i,n),t.child;case 14:return a=OP(o=t.type,t.pendingProps),HL(e,t,o,a=OP(o.type,a),i,n);case 15:return UL(e,t,t.type,t.pendingProps,i,n);case 17:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:OP(i,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,sP(i)?(e=!0,dP(t)):e=!1,oR(t,n),PP(t,i,o),RP(t,i,o,n),$L(null,t,i,!0,e,n)}NO("156")}var ZL={current:null},eR=null,tR=null,nR=null;function rR(e,t){var n=e.type._context;tP(ZL,n._currentValue),n._currentValue=t}function iR(e){var t=ZL.current;eP(ZL),e.type._context._currentValue=t}function oR(e,t){eR=e,nR=tR=null;var n=e.contextDependencies;null!==n&&n.expirationTime>=t&&(FL=!0),e.contextDependencies=null}function aR(e,t){return nR!==e&&!1!==t&&0!==t&&("number"==typeof t&&1073741823!==t||(nR=e,t=1073741823),t={context:e,observedBits:t,next:null},null===tR?(null===eR&&NO("308"),tR=t,eR.contextDependencies={first:t,expirationTime:0}):tR=tR.next=t),e._currentValue}var sR=1,uR=2,lR=!1;function cR(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function fR(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function dR(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function hR(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function pR(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,i=null;null===r&&(r=e.updateQueue=cR(e.memoizedState))}else r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=cR(e.memoizedState),i=n.updateQueue=cR(n.memoizedState)):r=e.updateQueue=fR(i):null===i&&(i=n.updateQueue=fR(r));null===i||r===i?hR(r,t):null===r.lastUpdate||null===i.lastUpdate?(hR(r,t),hR(i,t)):(hR(r,t),i.lastUpdate=t)}function mR(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=cR(e.memoizedState):vR(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function vR(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=fR(t)),t}function gR(e,t,n,r,i,o){switch(n.tag){case sR:return"function"==typeof(e=n.payload)?e.call(o,r,i):e;case 3:e.effectTag=-2049&e.effectTag|64;case 0:if(null==(i="function"==typeof(e=n.payload)?e.call(o,r,i):e))break;return TO({},r,i);case uR:lR=!0}return r}function yR(e,t,n,r,i){lR=!1;for(var o=(t=vR(e,t)).baseState,a=null,s=0,u=t.firstUpdate,l=o;null!==u;){var c=u.expirationTime;c<i?(null===a&&(a=u,o=l),s<c&&(s=c)):(l=gR(e,0,u,l,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(c=null,u=t.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f<i?(null===c&&(c=u,null===a&&(o=l)),s<f&&(s=f)):(l=gR(e,0,u,l,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(o=l),t.baseState=o,t.firstUpdate=a,t.firstCapturedUpdate=c,e.expirationTime=s,e.memoizedState=l}function bR(e,t,n){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),xR(t.firstEffect,n),t.firstEffect=t.lastEffect=null,xR(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function xR(e,t){for(;null!==e;){var n=e.callback;if(null!==n){e.callback=null;var r=t;"function"!=typeof n&&NO("191",n),n.call(r)}e=e.nextEffect}}function wR(e,t){return{value:e,source:t,stack:I_(t)}}function MR(e){e.effectTag|=4}var kR,SR,CR;kR=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},SR=function(e,t,n,r,i){var o=e.memoizedProps;if(o!==r){var a=t.stateNode;switch($P(WP.current),e=null,n){case"input":o=Y_(a,o),r=Y_(a,r),e=[];break;case"option":o=xI(a,o),r=xI(a,r),e=[];break;case"select":o=TO({},o,{value:void 0}),r=TO({},r,{value:void 0}),e=[];break;case"textarea":o=MI(a,o),r=MI(a,r),e=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(a.onclick=BI)}jI(n,r),a=n=void 0;var s=null;for(n in o)if(!r.hasOwnProperty(n)&&o.hasOwnProperty(n)&&null!=o[n])if("style"===n){var u=o[n];for(a in u)u.hasOwnProperty(a)&&(s||(s={}),s[a]="")}else"dangerouslySetInnerHTML"!==n&&"children"!==n&&"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(WO.hasOwnProperty(n)?e||(e=[]):(e=e||[]).push(n,null));for(n in r){var l=r[n];if(u=null!=o?o[n]:void 0,r.hasOwnProperty(n)&&l!==u&&(null!=l||null!=u))if("style"===n)if(u){for(a in u)!u.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(s||(s={}),s[a]="");for(a in l)l.hasOwnProperty(a)&&u[a]!==l[a]&&(s||(s={}),s[a]=l[a])}else s||(e||(e=[]),e.push(n,s)),s=l;else"dangerouslySetInnerHTML"===n?(l=l?l.__html:void 0,u=u?u.__html:void 0,null!=l&&u!==l&&(e=e||[]).push(n,""+l)):"children"===n?u===l||"string"!=typeof l&&"number"!=typeof l||(e=e||[]).push(n,""+l):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&(WO.hasOwnProperty(n)?(null!=l&&FI(i,n),e||u===l||(e=[])):(e=e||[]).push(n,l))}s&&(e=e||[]).push("style",s),i=e,(t.updateQueue=i)&&MR(t)}},CR=function(e,t,n,r){n!==r&&MR(t)};var qR="function"==typeof WeakSet?WeakSet:Set;function ER(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=I_(n)),null!==n&&A_(n.type),t=t.value,null!==e&&1===e.tag&&A_(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function TR(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){cj(e,t)}else t.current=null}function DR(e,t,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var r=n=n.next;do{if(0!=(r.tag&e)){var i=r.destroy;r.destroy=void 0,void 0!==i&&i()}0!=(r.tag&t)&&(i=r.create,r.destroy=i()),r=r.next}while(r!==n)}}function OR(e){switch("function"==typeof mP&&mP(e),e.tag){case 0:case 11:case 14:case 15:var t=e.updateQueue;if(null!==t&&null!==(t=t.lastEffect)){var n=t=t.next;do{var r=n.destroy;if(void 0!==r){var i=e;try{r()}catch(e){cj(i,e)}}n=n.next}while(n!==t)}break;case 1:if(TR(e),"function"==typeof(t=e.stateNode).componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){cj(e,t)}break;case 5:TR(e);break;case 4:AR(e)}}function NR(e){return 5===e.tag||3===e.tag||4===e.tag}function _R(e){e:{for(var t=e.return;null!==t;){if(NR(t)){var n=t;break e}t=t.return}NO("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:NO("161")}16&n.effectTag&&(_I(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||NR(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)if(n)if(r){var o=t,a=i.stateNode,s=n;8===o.nodeType?o.parentNode.insertBefore(a,s):o.insertBefore(a,s)}else t.insertBefore(i.stateNode,n);else r?(a=t,s=i.stateNode,8===a.nodeType?(o=a.parentNode).insertBefore(s,a):(o=a).appendChild(s),null!=(a=a._reactRootContainer)||null!==o.onclick||(o.onclick=BI)):t.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function AR(e){for(var t=e,n=!1,r=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&NO("160"),n.tag){case 5:r=n.stateNode,i=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var o=t,a=o;;)if(OR(a),null!==a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===o)break;for(;null===a.sibling;){if(null===a.return||a.return===o)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}i?(o=r,a=t.stateNode,8===o.nodeType?o.parentNode.removeChild(a):o.removeChild(a)):r.removeChild(t.stateNode)}else if(4===t.tag){if(null!==t.child){r=t.stateNode.containerInfo,i=!0,t.child.return=t,t=t.child;continue}}else if(OR(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function IR(e,t){switch(t.tag){case 0:case 11:case 14:case 15:DR(4,8,t);break;case 1:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&function(e,t,n,r,i){e[aN]=i,"input"===n&&"radio"===i.type&&null!=i.name&&$_(e,i),zI(n,r),r=zI(n,i);for(var o=0;o<t.length;o+=2){var a=t[o],s=t[o+1];"style"===a?LI(e,s):"dangerouslySetInnerHTML"===a?NI(e,s):"children"===a?_I(e,s):U_(e,a,s,r)}switch(n){case"input":G_(e,i);break;case"textarea":SI(e,i);break;case"select":t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!i.multiple,null!=(n=i.value)?wI(e,!!i.multiple,n,!1):t!==!!i.multiple&&(null!=i.defaultValue?wI(e,!!i.multiple,i.defaultValue,!0):wI(e,!!i.multiple,i.multiple?[]:"",!1))}}(n,o,i,e,r)}break;case 6:null===t.stateNode&&NO("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 12:break;case 13:if(n=t.memoizedState,r=void 0,e=t,null===n?r=!1:(r=!0,e=t.child,0===n.timedOutAt&&(n.timedOutAt=Fj())),null!==e&&function(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)r.style.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=null!=i&&i.hasOwnProperty("display")?i.display:null,r.style.display=PI("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else{if(13===n.tag&&null!==n.memoizedState){(r=n.child.sibling).return=n,n=r;continue}if(null!==n.child){n.child.return=n,n=n.child;continue}}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}(e,r),null!==(n=t.updateQueue)){t.updateQueue=null;var a=t.stateNode;null===a&&(a=t.stateNode=new qR),n.forEach((function(e){var n=hj.bind(null,t,e);a.has(e)||(a.add(e),e.then(n,n))}))}break;case 17:break;default:NO("163")}}var PR="function"==typeof WeakMap?WeakMap:Map;function LR(e,t,n){(n=dR(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xj(r),ER(e,t)},n}function RR(e,t,n){(n=dR(n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===ZR?ZR=new Set([this]):ZR.add(this));var n=t.value,i=t.stack;ER(e,t),this.componentDidCatch(n,{componentStack:null!==i?i:""})}),n}function jR(e){switch(e.tag){case 1:sP(e.type)&&uP();var t=e.effectTag;return 2048&t?(e.effectTag=-2049&t|64,e):null;case 3:return XP(),lP(),0!=(64&(t=e.effectTag))&&NO("285"),e.effectTag=-2049&t|64,e;case 5:return QP(e),null;case 13:return 2048&(t=e.effectTag)?(e.effectTag=-2049&t|64,e):null;case 18:return null;case 4:return XP(),null;case 10:return iR(e),null;default:return null}}var zR=v_.ReactCurrentDispatcher,FR=v_.ReactCurrentOwner,BR=1073741822,VR=!1,HR=null,UR=null,WR=0,YR=-1,KR=!1,$R=null,GR=!1,XR=null,JR=null,QR=null,ZR=null;function ej(){if(null!==HR)for(var e=HR.return;null!==e;){var t=e;switch(t.tag){case 1:var n=t.type.childContextTypes;null!=n&&uP();break;case 3:XP(),lP();break;case 5:QP(t);break;case 4:XP();break;case 10:iR(t)}e=e.return}UR=null,WR=0,YR=-1,KR=!1,HR=null}function tj(){for(;null!==$R;){var e=$R.effectTag;if(16&e&&_I($R.stateNode,""),128&e){var t=$R.alternate;null!==t&&(null!==(t=t.ref)&&("function"==typeof t?t(null):t.current=null))}switch(14&e){case 2:_R($R),$R.effectTag&=-3;break;case 6:_R($R),$R.effectTag&=-3,IR($R.alternate,$R);break;case 4:IR($R.alternate,$R);break;case 8:AR(e=$R),e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,null!==(e=e.alternate)&&(e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null)}$R=$R.nextEffect}}function nj(){for(;null!==$R;){if(256&$R.effectTag)e:{var e=$R.alternate,t=$R;switch(t.tag){case 0:case 11:case 15:DR(2,0,t);break e;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:OP(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}break e;case 3:case 5:case 6:case 4:case 17:break e;default:NO("163")}}$R=$R.nextEffect}}function rj(e,t){for(;null!==$R;){var n=$R.effectTag;if(36&n){var r=$R.alternate,i=$R,o=t;switch(i.tag){case 0:case 11:case 15:DR(16,32,i);break;case 1:var a=i.stateNode;if(4&i.effectTag)if(null===r)a.componentDidMount();else{var s=i.elementType===i.type?r.memoizedProps:OP(i.type,r.memoizedProps);a.componentDidUpdate(s,r.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}null!==(r=i.updateQueue)&&bR(0,r,a);break;case 3:if(null!==(r=i.updateQueue)){if(a=null,null!==i.child)switch(i.child.tag){case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}bR(0,r,a)}break;case 5:o=i.stateNode,null===r&&4&i.effectTag&&UI(i.type,i.memoizedProps)&&o.focus();break;case 6:case 4:case 12:case 13:case 17:break;default:NO("163")}}128&n&&(null!==(i=$R.ref)&&(o=$R.stateNode,"function"==typeof i?i(o):i.current=o)),512&n&&(XR=e),$R=$R.nextEffect}}function ij(e,t){QR=JR=XR=null;var n=wj;wj=!0;do{if(512&t.effectTag){var r=!1,i=void 0;try{var o=t;DR(128,0,o),DR(0,64,o)}catch(e){r=!0,i=e}r&&cj(t,i)}t=t.nextEffect}while(null!==t);wj=n,0!==(n=e.expirationTime)&&Bj(e,n),Ej||wj||Yj(1073741823,!1)}function oj(){null!==JR&&GI(JR),null!==QR&&QR()}function aj(e,t){GR=VR=!0,e.current===t&&NO("177");var n=e.pendingCommitExpirationTime;0===n&&NO("261"),e.pendingCommitExpirationTime=0;var r=t.expirationTime,i=t.childExpirationTime;for(function(e,t){if(e.didError=!1,0===t)e.earliestPendingTime=0,e.latestPendingTime=0,e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0;else{t<e.latestPingedTime&&(e.latestPingedTime=0);var n=e.latestPendingTime;0!==n&&(n>t?e.earliestPendingTime=e.latestPendingTime=0:e.earliestPendingTime>t&&(e.earliestPendingTime=e.latestPendingTime)),0===(n=e.earliestSuspendedTime)?qP(e,t):t<e.latestSuspendedTime?(e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0,qP(e,t)):t>n&&qP(e,t)}DP(0,e)}(e,i>r?i:r),FR.current=null,r=void 0,1<t.effectTag?null!==t.lastEffect?(t.lastEffect.nextEffect=t,r=t.firstEffect):r=t:r=t.firstEffect,VI=XA,HI=function(){var e=lI();if(cI(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var n=(t=(t=e.ownerDocument)&&t.defaultView||window).getSelection&&t.getSelection();if(n&&0!==n.rangeCount){t=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{t.nodeType,i.nodeType}catch(e){t=null;break e}var o=0,a=-1,s=-1,u=0,l=0,c=e,f=null;t:for(;;){for(var d;c!==t||0!==r&&3!==c.nodeType||(a=o+r),c!==i||0!==n&&3!==c.nodeType||(s=o+n),3===c.nodeType&&(o+=c.nodeValue.length),null!==(d=c.firstChild);)f=c,c=d;for(;;){if(c===e)break t;if(f===t&&++u===r&&(a=o),f===i&&++l===n&&(s=o),null!==(d=c.nextSibling))break;f=(c=f).parentNode}c=d}t=-1===a||-1===s?null:{start:a,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;return{focusedElem:e,selectionRange:t}}(),XA=!1,$R=r;null!==$R;){i=!1;var o=void 0;try{nj()}catch(e){i=!0,o=e}i&&(null===$R&&NO("178"),cj($R,o),null!==$R&&($R=$R.nextEffect))}for($R=r;null!==$R;){i=!1,o=void 0;try{tj()}catch(e){i=!0,o=e}i&&(null===$R&&NO("178"),cj($R,o),null!==$R&&($R=$R.nextEffect))}for(fI(HI),HI=null,XA=!!VI,VI=null,e.current=t,$R=r;null!==$R;){i=!1,o=void 0;try{rj(e,n)}catch(e){i=!0,o=e}i&&(null===$R&&NO("178"),cj($R,o),null!==$R&&($R=$R.nextEffect))}if(null!==r&&null!==XR){var a=ij.bind(null,e,r);JR=DO.unstable_runWithPriority(DO.unstable_NormalPriority,(function(){return $I(a)})),QR=a}VR=GR=!1,"function"==typeof pP&&pP(t.stateNode),n=t.expirationTime,0===(t=(t=t.childExpirationTime)>n?t:n)&&(ZR=null),function(e,t){e.expirationTime=t,e.finishedWork=null}(e,t)}function sj(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(1024&e.effectTag)){HR=e;e:{var i=t,o=WR,a=(t=e).pendingProps;switch(t.tag){case 2:case 16:break;case 15:case 0:break;case 1:sP(t.type)&&uP();break;case 3:XP(),lP(),(a=t.stateNode).pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),null!==i&&null!==i.child||(RL(t),t.effectTag&=-3);break;case 5:QP(t);var s=$P(KP.current);if(o=t.type,null!==i&&null!=t.stateNode)SR(i,t,o,a,s),i.ref!==t.ref&&(t.effectTag|=128);else if(a){var u=$P(WP.current);if(RL(t)){i=(a=t).stateNode;var l=a.type,c=a.memoizedProps,f=s;switch(i[oN]=a,i[aN]=c,o=void 0,s=l){case"iframe":case"object":JA("load",i);break;case"video":case"audio":for(l=0;l<EN.length;l++)JA(EN[l],i);break;case"source":JA("error",i);break;case"img":case"image":case"link":JA("error",i),JA("load",i);break;case"form":JA("reset",i),JA("submit",i);break;case"details":JA("toggle",i);break;case"input":K_(i,c),JA("invalid",i),FI(f,"onChange");break;case"select":i._wrapperState={wasMultiple:!!c.multiple},JA("invalid",i),FI(f,"onChange");break;case"textarea":kI(i,c),JA("invalid",i),FI(f,"onChange")}for(o in jI(s,c),l=null,c)c.hasOwnProperty(o)&&(u=c[o],"children"===o?"string"==typeof u?i.textContent!==u&&(l=["children",u]):"number"==typeof u&&i.textContent!==""+u&&(l=["children",""+u]):WO.hasOwnProperty(o)&&null!=u&&FI(f,o));switch(s){case"input":p_(i),X_(i,c,!0);break;case"textarea":p_(i),CI(i);break;case"select":case"option":break;default:"function"==typeof c.onClick&&(i.onclick=BI)}o=l,a.updateQueue=o,(a=null!==o)&&MR(t)}else{c=t,i=o,f=a,l=9===s.nodeType?s:s.ownerDocument,u===qI&&(u=TI(i)),u===qI?"script"===i?((i=l.createElement("div")).innerHTML="<script><\/script>",l=i.removeChild(i.firstChild)):"string"==typeof f.is?l=l.createElement(i,{is:f.is}):(l=l.createElement(i),"select"===i&&f.multiple&&(l.multiple=!0)):l=l.createElementNS(u,i),(i=l)[oN]=c,i[aN]=a,kR(i,t),f=i;var d=s,h=zI(l=o,c=a);switch(l){case"iframe":case"object":JA("load",f),s=c;break;case"video":case"audio":for(s=0;s<EN.length;s++)JA(EN[s],f);s=c;break;case"source":JA("error",f),s=c;break;case"img":case"image":case"link":JA("error",f),JA("load",f),s=c;break;case"form":JA("reset",f),JA("submit",f),s=c;break;case"details":JA("toggle",f),s=c;break;case"input":K_(f,c),s=Y_(f,c),JA("invalid",f),FI(d,"onChange");break;case"option":s=xI(f,c);break;case"select":f._wrapperState={wasMultiple:!!c.multiple},s=TO({},c,{value:void 0}),JA("invalid",f),FI(d,"onChange");break;case"textarea":kI(f,c),s=MI(f,c),JA("invalid",f),FI(d,"onChange");break;default:s=c}jI(l,s),u=void 0;var p=l,m=f,v=s;for(u in v)if(v.hasOwnProperty(u)){var g=v[u];"style"===u?LI(m,g):"dangerouslySetInnerHTML"===u?null!=(g=g?g.__html:void 0)&&NI(m,g):"children"===u?"string"==typeof g?("textarea"!==p||""!==g)&&_I(m,g):"number"==typeof g&&_I(m,""+g):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(WO.hasOwnProperty(u)?null!=g&&FI(d,u):null!=g&&U_(m,u,g,h))}switch(l){case"input":p_(f),X_(f,c,!1);break;case"textarea":p_(f),CI(f);break;case"option":null!=c.value&&f.setAttribute("value",""+W_(c.value));break;case"select":(s=f).multiple=!!c.multiple,null!=(f=c.value)?wI(s,!!c.multiple,f,!1):null!=c.defaultValue&&wI(s,!!c.multiple,c.defaultValue,!0);break;default:"function"==typeof s.onClick&&(f.onclick=BI)}(a=UI(o,a))&&MR(t),t.stateNode=i}null!==t.ref&&(t.effectTag|=128)}else null===t.stateNode&&NO("166");break;case 6:i&&null!=t.stateNode?CR(0,t,i.memoizedProps,a):("string"!=typeof a&&(null===t.stateNode&&NO("166")),i=$P(KP.current),$P(WP.current),RL(t)?(o=(a=t).stateNode,i=a.memoizedProps,o[oN]=a,(a=o.nodeValue!==i)&&MR(t)):(o=t,(a=(9===i.nodeType?i:i.ownerDocument).createTextNode(a))[oN]=t,o.stateNode=a));break;case 11:break;case 13:if(a=t.memoizedState,0!=(64&t.effectTag)){t.expirationTime=o,HR=t;break e}a=null!==a,o=null!==i&&null!==i.memoizedState,null!==i&&!a&&o&&(null!==(i=i.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=i,i.nextEffect=s):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),(a||o)&&(t.effectTag|=4);break;case 7:case 8:case 12:break;case 4:XP();break;case 10:iR(t);break;case 9:case 14:break;case 17:sP(t.type)&&uP();break;case 18:break;default:NO("156")}HR=null}if(t=e,1===WR||1!==t.childExpirationTime){for(a=0,o=t.child;null!==o;)(i=o.expirationTime)>a&&(a=i),(s=o.childExpirationTime)>a&&(a=s),o=o.sibling;t.childExpirationTime=a}if(null!==HR)return HR;null!==n&&0==(1024&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e))}else{if(null!==(e=jR(e)))return e.effectTag&=1023,e;null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=1024)}if(null!==r)return r;if(null===n)break;e=n}return null}function uj(e){var t=QL(e.alternate,e,WR);return e.memoizedProps=e.pendingProps,null===t&&(t=sj(e)),FR.current=null,t}function lj(e,t){VR&&NO("243"),oj(),VR=!0;var n=zR.current;zR.current=EL;var i=e.nextExpirationTimeToWorkOn;i===WR&&e===UR&&null!==HR||(ej(),WR=i,HR=xP((UR=e).current,null),e.pendingCommitExpirationTime=0);for(var o=!1;;){try{if(t)for(;null!==HR&&!Uj();)HR=uj(HR);else for(;null!==HR;)HR=uj(HR)}catch(t){if(nR=tR=eR=null,vL(),null===HR)o=!0,Xj(t);else{null===HR&&NO("271");var a=HR,s=a.return;if(null!==s){e:{var u=e,l=s,c=a,f=t;if(s=WR,c.effectTag|=1024,c.firstEffect=c.lastEffect=null,null!==f&&"object"===r(f)&&"function"==typeof f.then){var d=f;f=l;var h=-1,p=-1;do{if(13===f.tag){var m=f.alternate;if(null!==m&&null!==(m=m.memoizedState)){p=10*(1073741822-m.timedOutAt);break}"number"==typeof(m=f.pendingProps.maxDuration)&&(0>=m?h=0:(-1===h||m<h)&&(h=m))}f=f.return}while(null!==f);f=l;do{if((m=13===f.tag)&&(m=void 0!==f.memoizedProps.fallback&&null===f.memoizedState),m){if(null===(l=f.updateQueue)?((l=new Set).add(d),f.updateQueue=l):l.add(d),0==(1&f.mode)){f.effectTag|=64,c.effectTag&=-1957,1===c.tag&&(null===c.alternate?c.tag=17:((s=dR(1073741823)).tag=uR,pR(c,s))),c.expirationTime=1073741823;break e}l=s;var v=(c=u).pingCache;null===v?(v=c.pingCache=new PR,m=new Set,v.set(d,m)):void 0===(m=v.get(d))&&(m=new Set,v.set(d,m)),m.has(l)||(m.add(l),c=dj.bind(null,c,d,l),d.then(c,c)),-1===h?u=1073741823:(-1===p&&(p=10*(1073741822-TP(u,s))-5e3),u=p+h),0<=u&&YR<u&&(YR=u),f.effectTag|=2048,f.expirationTime=s;break e}f=f.return}while(null!==f);f=Error((A_(c.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+I_(c))}KR=!0,f=wR(f,c),u=l;do{switch(u.tag){case 3:u.effectTag|=2048,u.expirationTime=s,mR(u,s=LR(u,f,s));break e;case 1:if(h=f,p=u.type,c=u.stateNode,0==(64&u.effectTag)&&("function"==typeof p.getDerivedStateFromError||null!==c&&"function"==typeof c.componentDidCatch&&(null===ZR||!ZR.has(c)))){u.effectTag|=2048,u.expirationTime=s,mR(u,s=RR(u,h,s));break e}}u=u.return}while(null!==u)}HR=sj(a);continue}o=!0,Xj(t)}}break}if(VR=!1,zR.current=n,nR=tR=eR=null,vL(),o)UR=null,e.finishedWork=null;else if(null!==HR)e.finishedWork=null;else{if(null===(n=e.current.alternate)&&NO("281"),UR=null,KR){if(o=e.latestPendingTime,a=e.latestSuspendedTime,s=e.latestPingedTime,0!==o&&o<i||0!==a&&a<i||0!==s&&s<i)return EP(e,i),void jj(e,n,i,e.expirationTime,-1);if(!e.didError&&t)return e.didError=!0,i=e.nextExpirationTimeToWorkOn=i,t=e.expirationTime=1073741823,void jj(e,n,i,t,-1)}t&&-1!==YR?(EP(e,i),(t=10*(1073741822-TP(e,i)))<YR&&(YR=t),t=10*(1073741822-Fj()),t=YR-t,jj(e,n,i,e.expirationTime,0>t?0:t)):(e.pendingCommitExpirationTime=i,e.finishedWork=n)}}function cj(e,t){for(var n=e.return;null!==n;){switch(n.tag){case 1:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ZR||!ZR.has(r)))return pR(n,e=RR(n,e=wR(t,e),1073741823)),void mj(n,1073741823);break;case 3:return pR(n,e=LR(n,e=wR(t,e),1073741823)),void mj(n,1073741823)}n=n.return}3===e.tag&&(pR(e,n=LR(e,n=wR(t,e),1073741823)),mj(e,1073741823))}function fj(e,t){var n=DO.unstable_getCurrentPriorityLevel(),r=void 0;if(0==(1&t.mode))r=1073741823;else if(VR&&!GR)r=WR;else{switch(n){case DO.unstable_ImmediatePriority:r=1073741823;break;case DO.unstable_UserBlockingPriority:r=1073741822-10*(1+((1073741822-e+15)/10|0));break;case DO.unstable_NormalPriority:r=1073741822-25*(1+((1073741822-e+500)/25|0));break;case DO.unstable_LowPriority:case DO.unstable_IdlePriority:r=1;break;default:NO("313")}null!==UR&&r===WR&&--r}return n===DO.unstable_UserBlockingPriority&&(0===Sj||r<Sj)&&(Sj=r),r}function dj(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),null!==UR&&WR===n?UR=null:(t=e.earliestSuspendedTime,r=e.latestSuspendedTime,0!==t&&n<=t&&n>=r&&(e.didError=!1,(0===(t=e.latestPingedTime)||t>n)&&(e.latestPingedTime=n),DP(n,e),0!==(n=e.expirationTime)&&Bj(e,n)))}function hj(e,t){var n=e.stateNode;null!==n&&n.delete(t),null!==(e=pj(e,t=fj(t=Fj(),e)))&&(qP(e,t),0!==(t=e.expirationTime)&&Bj(e,t))}function pj(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return i}function mj(e,t){null!==(e=pj(e,t))&&(!VR&&0!==WR&&t>WR&&ej(),qP(e,t),VR&&!GR&&UR===e||Bj(e,e.expirationTime),Ij>Aj&&(Ij=0,NO("185")))}function vj(e,t,n,r,i){return DO.unstable_runWithPriority(DO.unstable_ImmediatePriority,(function(){return e(t,n,r,i)}))}var gj=null,yj=null,bj=0,xj=void 0,wj=!1,Mj=null,kj=0,Sj=0,Cj=!1,qj=null,Ej=!1,Tj=!1,Dj=null,Oj=DO.unstable_now(),Nj=1073741822-(Oj/10|0),_j=Nj,Aj=50,Ij=0,Pj=null;function Lj(){Nj=1073741822-((DO.unstable_now()-Oj)/10|0)}function Rj(e,t){if(0!==bj){if(t<bj)return;null!==xj&&DO.unstable_cancelCallback(xj)}bj=t,e=DO.unstable_now()-Oj,xj=DO.unstable_scheduleCallback(Wj,{timeout:10*(1073741822-t)-e})}function jj(e,t,n,r,i){e.expirationTime=r,0!==i||Uj()?0<i&&(e.timeoutHandle=YI(zj.bind(null,e,t,n),i)):(e.pendingCommitExpirationTime=n,e.finishedWork=t)}function zj(e,t,n){e.pendingCommitExpirationTime=n,e.finishedWork=t,Lj(),_j=Nj,Kj(e,n)}function Fj(){return wj||(Vj(),0!==kj&&1!==kj||(Lj(),_j=Nj)),_j}function Bj(e,t){null===e.nextScheduledRoot?(e.expirationTime=t,null===yj?(gj=yj=e,e.nextScheduledRoot=e):(yj=yj.nextScheduledRoot=e).nextScheduledRoot=gj):t>e.expirationTime&&(e.expirationTime=t),wj||(Ej?Tj&&(Mj=e,kj=1073741823,$j(e,1073741823,!1)):1073741823===t?Yj(1073741823,!1):Rj(e,t))}function Vj(){var e=0,t=null;if(null!==yj)for(var n=yj,r=gj;null!==r;){var i=r.expirationTime;if(0===i){if((null===n||null===yj)&&NO("244"),r===r.nextScheduledRoot){gj=yj=r.nextScheduledRoot=null;break}if(r===gj)gj=i=r.nextScheduledRoot,yj.nextScheduledRoot=i,r.nextScheduledRoot=null;else{if(r===yj){(yj=n).nextScheduledRoot=gj,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if(i>e&&(e=i,t=r),r===yj)break;if(1073741823===e)break;n=r,r=r.nextScheduledRoot}}Mj=t,kj=e}var Hj=!1;function Uj(){return!!Hj||!!DO.unstable_shouldYield()&&(Hj=!0)}function Wj(){try{if(!Uj()&&null!==gj){Lj();var e=gj;do{var t=e.expirationTime;0!==t&&Nj<=t&&(e.nextExpirationTimeToWorkOn=Nj),e=e.nextScheduledRoot}while(e!==gj)}Yj(0,!0)}finally{Hj=!1}}function Yj(e,t){if(Vj(),t)for(Lj(),_j=Nj;null!==Mj&&0!==kj&&e<=kj&&!(Hj&&Nj>kj);)$j(Mj,kj,Nj>kj),Vj(),Lj(),_j=Nj;else for(;null!==Mj&&0!==kj&&e<=kj;)$j(Mj,kj,!1),Vj();if(t&&(bj=0,xj=null),0!==kj&&Rj(Mj,kj),Ij=0,Pj=null,null!==Dj)for(e=Dj,Dj=null,t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){Cj||(Cj=!0,qj=e)}}if(Cj)throw e=qj,qj=null,Cj=!1,e}function Kj(e,t){wj&&NO("253"),Mj=e,kj=t,$j(e,t,!1),Yj(1073741823,!1)}function $j(e,t,n){if(wj&&NO("245"),wj=!0,n){var r=e.finishedWork;null!==r?Gj(e,r,t):(e.finishedWork=null,-1!==(r=e.timeoutHandle)&&(e.timeoutHandle=-1,KI(r)),lj(e,n),null!==(r=e.finishedWork)&&(Uj()?e.finishedWork=r:Gj(e,r,t)))}else null!==(r=e.finishedWork)?Gj(e,r,t):(e.finishedWork=null,-1!==(r=e.timeoutHandle)&&(e.timeoutHandle=-1,KI(r)),lj(e,n),null!==(r=e.finishedWork)&&Gj(e,r,t));wj=!1}function Gj(e,t,n){var r=e.firstBatch;if(null!==r&&r._expirationTime>=n&&(null===Dj?Dj=[r]:Dj.push(r),r._defer))return e.finishedWork=t,void(e.expirationTime=0);e.finishedWork=null,e===Pj?Ij++:(Pj=e,Ij=0),DO.unstable_runWithPriority(DO.unstable_ImmediatePriority,(function(){aj(e,t)}))}function Xj(e){null===Mj&&NO("246"),Mj.expirationTime=0,Cj||(Cj=!0,qj=e)}function Jj(e,t){var n=Ej;Ej=!0;try{return e(t)}finally{(Ej=n)||wj||Yj(1073741823,!1)}}function Qj(e,t){if(Ej&&!Tj){Tj=!0;try{return e(t)}finally{Tj=!1}}return e(t)}function Zj(e,t,n){Ej||wj||0===Sj||(Yj(Sj,!1),Sj=0);var r=Ej;Ej=!0;try{return DO.unstable_runWithPriority(DO.unstable_UserBlockingPriority,(function(){return e(t,n)}))}finally{(Ej=r)||wj||Yj(1073741823,!1)}}function ez(e,t,n,r,i){var o=t.current;e:if(n){t:{2===TA(n=n._reactInternalFiber)&&1===n.tag||NO("170");var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(sP(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(null!==a);NO("171"),a=void 0}if(1===n.tag){var s=n.type;if(sP(s)){n=fP(n,s,a);break e}}n=a}else n=nP;return null===t.context?t.context=n:t.pendingContext=n,t=i,(i=dR(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(i.callback=t),oj(),pR(o,i),mj(o,r),r}function tz(e,t,n,r){var i=t.current;return ez(e,t,n,i=fj(Fj(),i),r)}function nz(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function rz(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x_,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function iz(e){var t=1073741822-25*(1+((1073741822-Fj()+500)/25|0));t>=BR&&(t=BR-1),this._expirationTime=BR=t,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function oz(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function az(e,t,n){e={current:t=yP(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,pingCache:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=t.stateNode=e}function sz(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function uz(e,t,n,r,i){var o=n._reactRootContainer;if(o){if("function"==typeof i){var a=i;i=function(){var e=nz(o._internalRoot);a.call(e)}}null!=e?o.legacy_renderSubtreeIntoContainer(e,t,i):o.render(t,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new az(e,!1,t)}(n,r),"function"==typeof i){var s=i;i=function(){var e=nz(o._internalRoot);s.call(e)}}Qj((function(){null!=e?o.legacy_renderSubtreeIntoContainer(e,t,i):o.render(t,i)}))}return nz(o._internalRoot)}function lz(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return sz(t)||NO("200"),rz(e,t,null,n)}QN=function(e,t,n){switch(t){case"input":if(G_(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=cN(r);i||NO("90"),m_(r),G_(r,i)}}}break;case"textarea":SI(e,n);break;case"select":null!=(t=n.value)&&wI(e,!!n.multiple,t,!1)}},iz.prototype.render=function(e){this._defer||NO("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,r=new oz;return ez(e,t,null,n,r._onCommit),r},iz.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},iz.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||NO("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var r=null,i=t;i!==this;)r=i,i=i._next;null===r&&NO("251"),r._next=i._next,this._next=t,e.firstBatch=this}this._defer=!1,Kj(e,n),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},iz.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},oz.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},oz.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!=typeof n&&NO("191",n),n()}}},az.prototype.render=function(e,t){var n=this._internalRoot,r=new oz;return null!==(t=void 0===t?null:t)&&r.then(t),tz(e,n,null,r._onCommit),r},az.prototype.unmount=function(e){var t=this._internalRoot,n=new oz;return null!==(e=void 0===e?null:e)&&n.then(e),tz(null,t,null,n._onCommit),n},az.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new oz;return null!==(n=void 0===n?null:n)&&i.then(n),tz(t,r,e,i._onCommit),i},az.prototype.createBatch=function(){var e=new iz(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime>=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},i_=Jj,o_=Zj,a_=function(){wj||0===Sj||(Yj(Sj,!1),Sj=0)};var cz={createPortal:lz,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?NO("188"):NO("268",Object.keys(e))),e=null===(e=OA(t))?null:e.stateNode},hydrate:function(e,t,n){return sz(t)||NO("200"),uz(null,e,t,!0,n)},render:function(e,t,n){return sz(t)||NO("200"),uz(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return sz(n)||NO("200"),(null==e||void 0===e._reactInternalFiber)&&NO("38"),uz(e,t,n,!1,r)},unmountComponentAtNode:function(e){return sz(e)||NO("40"),!!e._reactRootContainer&&(Qj((function(){uz(null,null,e,!1,(function(){e._reactRootContainer=null}))})),!0)},unstable_createPortal:function(){return lz.apply(void 0,arguments)},unstable_batchedUpdates:Jj,unstable_interactiveUpdates:Zj,flushSync:function(e,t){wj&&NO("187");var n=Ej;Ej=!0;try{return vj(e,t)}finally{Ej=n,Yj(1073741823,!1)}},unstable_createRoot:function(e,t){return sz(e)||NO("299","unstable_createRoot"),new az(e,!0,null!=t&&!0===t.hydrate)},unstable_flushControlled:function(e){var t=Ej;Ej=!0;try{vj(e)}finally{(Ej=t)||wj||Yj(1073741823,!1)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[uN,lN,cN,tN.injectEventPluginsByName,UO,vN,function(e){QO(e,mN)},n_,r_,eI,rN]}};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);pP=vP((function(e){return t.onCommitFiberRoot(n,e)})),mP=vP((function(e){return t.onCommitFiberUnmount(n,e)}))}catch(e){}})(TO({},e,{overrideProps:null,currentDispatcherRef:v_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=OA(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}({findFiberByHostInstance:sN,bundleType:0,version:"16.8.4",rendererPackageName:"react-dom"});var fz={default:cz},dz=fz&&cz||fz,hz=dz.default||dz;!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),SO.exports=hz;var pz=SO.exports,mz=!1,vz=kC.createContext(null),gz="unmounted",yz="exited",bz="entering",xz="entered",wz="exiting",Mz=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=yz,r.appearStatus=bz):i=xz:i=t.unmountOnExit||t.mountOnEnter?gz:yz,r.state={status:i},r.nextCallback=null,r}kO(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===gz?{status:yz}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==bz&&n!==xz&&(t=bz):n!==bz&&n!==xz||(t=wz)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=pz.findDOMNode(this);t===bz?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===yz&&this.setState({status:gz})},n.performEnter=function(e,t){var n=this,r=this.props.enter,i=this.context?this.context.isMounting:t,o=this.getTimeouts(),a=i?o.appear:o.enter;!t&&!r||mz?this.safeSetState({status:xz},(function(){n.props.onEntered(e)})):(this.props.onEnter(e,i),this.safeSetState({status:bz},(function(){n.props.onEntering(e,i),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:xz},(function(){n.props.onEntered(e,i)}))}))})))},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n&&!mz?(this.props.onExit(e),this.safeSetState({status:wz},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:yz},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:yz},(function(){t.props.onExited(e)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===gz)return null;var t=this.props,n=t.children,r=MO(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return kC.createElement(vz.Provider,{value:null},n(e,r));var i=kC.Children.only(n);return kC.createElement(vz.Provider,{value:null},kC.cloneElement(i,r))},t}(kC.Component);function kz(){}function Sz(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cz(e,t){var n=Object.create(null);return e&&ES.exports.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&ES.exports.isValidElement(e)?t(e):e}(e)})),n}function qz(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Ez(e,t,n){var r=Cz(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var u in t){if(i[u])for(r=0;r<i[u].length;r++){var l=i[u][r];s[i[u][r]]=n(l)}s[u]=n(u)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if(ES.exports.isValidElement(a)){var s=o in t,u=o in r,l=t[o],c=ES.exports.isValidElement(l)&&!l.props.in;!u||s&&!c?u||!s||c?u&&s&&ES.exports.isValidElement(l)&&(i[o]=ES.exports.cloneElement(a,{onExited:n.bind(null,a),in:l.props.in,exit:qz(a,"exit",e),enter:qz(a,"enter",e)})):i[o]=ES.exports.cloneElement(a,{in:!1}):i[o]=ES.exports.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:qz(a,"exit",e),enter:qz(a,"enter",e)})}})),i}Mz.contextType=vz,Mz.propTypes={},Mz.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kz,onEntering:kz,onEntered:kz,onExit:kz,onExiting:kz,onExited:kz},Mz.UNMOUNTED=0,Mz.EXITED=1,Mz.ENTERING=2,Mz.ENTERED=3,Mz.EXITING=4;var Tz=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Dz=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Sz(Sz(r)));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}kO(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,Cz(n.children,(function(e){return ES.exports.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:qz(e,"appear",n),enter:qz(e,"enter",n),exit:qz(e,"exit",n)})}))):Ez(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Cz(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=wO({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=MO(e,["component","childFactory"]),i=this.state.contextValue,o=Tz(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?kC.createElement(vz.Provider,{value:i},o):kC.createElement(vz.Provider,{value:i},kC.createElement(t,r,o))},t}(kC.Component);Dz.propTypes={},Dz.defaultProps={component:"div",childFactory:function(e){return e}};function Oz(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}function Nz(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function _z(e,t){return kC.useMemo((function(){return null==e&&null==t?null:function(n){Nz(e,n),Nz(t,n)}}),[e,t])}var Az="undefined"!=typeof window?kC.useLayoutEffect:kC.useEffect;function Iz(e){var t=kC.useRef(e);return Az((function(){t.current=e})),kC.useCallback((function(e){return(0,t.current)(e)}),[])}var Pz="undefined"!=typeof window?kC.useLayoutEffect:kC.useEffect;function Lz(e){var t=e.children,n=e.defer,r=void 0!==n&&n,i=e.fallback,o=void 0===i?null:i,a=kC.useState(!1),s=a[0],u=a[1];return Pz((function(){r||u(!0)}),[r]),kC.useEffect((function(){r&&u(!0)}),[r]),kC.createElement(kC.Fragment,null,s?t:o)}var Rz=!0,jz=!1,zz=null,Fz={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Bz(e){e.metaKey||e.altKey||e.ctrlKey||(Rz=!0)}function Vz(){Rz=!1}function Hz(){"hidden"===this.visibilityState&&jz&&(Rz=!0)}function Uz(e){var t=e.target;try{return t.matches(":focus-visible")}catch(e){}return Rz||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!Fz[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function Wz(){jz=!0,window.clearTimeout(zz),zz=window.setTimeout((function(){jz=!1}),100)}function Yz(){return{isFocusVisible:Uz,onBlurVisible:Wz,ref:kC.useCallback((function(e){var t=pz.findDOMNode(e);null!=t&&function(e){e.addEventListener("keydown",Bz,!0),e.addEventListener("mousedown",Vz,!0),e.addEventListener("pointerdown",Vz,!0),e.addEventListener("touchstart",Vz,!0),e.addEventListener("visibilitychange",Hz,!0)}(t.ownerDocument)}),[])}}function Kz(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var $z="undefined"==typeof window?kC.useEffect:kC.useLayoutEffect;function Gz(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,a=e.rippleSize,s=e.in,u=e.onExited,l=void 0===u?function(){}:u,c=e.timeout,f=kC.useState(!1),d=f[0],h=f[1],p=tO(t.ripple,t.rippleVisible,r&&t.ripplePulsate),m={width:a,height:a,top:-a/2+o,left:-a/2+i},v=tO(t.child,d&&t.childLeaving,r&&t.childPulsate),g=Iz(l);return $z((function(){if(!s){h(!0);var e=setTimeout(g,c);return function(){clearTimeout(e)}}}),[g,s,c]),kC.createElement("span",{className:p,style:m},kC.createElement("span",{className:v}))}var Xz=kC.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=YC(e,["center","classes","className"]),s=kC.useState([]),u=s[0],l=s[1],c=kC.useRef(0),f=kC.useRef(null);kC.useEffect((function(){f.current&&(f.current(),f.current=null)}),[u]);var d=kC.useRef(!1),h=kC.useRef(null),p=kC.useRef(null),m=kC.useRef(null);kC.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var v=kC.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;l((function(e){return[].concat(Kz(e),[kC.createElement(Gz,{key:c.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),c.current+=1,f.current=a}),[i]),g=kC.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,u=t.fakeElement,l=void 0!==u&&u;if("mousedown"===e.type&&d.current)d.current=!1;else{"touchstart"===e.type&&(d.current=!0);var c,f,g,y=l?null:m.current,b=y?y.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(b.width/2),f=Math.round(b.height/2);else{var x=e.clientX?e.clientX:e.touches[0].clientX,w=e.clientY?e.clientY:e.touches[0].clientY;c=Math.round(x-b.left),f=Math.round(w-b.top)}if(s)(g=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(g+=1);else{var M=2*Math.max(Math.abs((y?y.clientWidth:0)-c),c)+2,k=2*Math.max(Math.abs((y?y.clientHeight:0)-f),f)+2;g=Math.sqrt(Math.pow(M,2)+Math.pow(k,2))}e.touches?(p.current=function(){v({pulsate:o,rippleX:c,rippleY:f,rippleSize:g,cb:n})},h.current=setTimeout((function(){p.current&&(p.current(),p.current=null)}),80)):v({pulsate:o,rippleX:c,rippleY:f,rippleSize:g,cb:n})}}),[r,v]),y=kC.useCallback((function(){g({},{pulsate:!0})}),[g]),b=kC.useCallback((function(e,t){if(clearTimeout(h.current),"touchend"===e.type&&p.current)return e.persist(),p.current(),p.current=null,void(h.current=setTimeout((function(){b(e,t)})));p.current=null,l((function(e){return e.length>0?e.slice(1):e})),f.current=t}),[]);return kC.useImperativeHandle(t,(function(){return{pulsate:y,start:g,stop:b}}),[y,g,b]),kC.createElement("span",WC({className:tO(i.root,o),ref:m},a),kC.createElement(Dz,{component:null,exit:!0},u))}));var Jz,Qz=gO((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(((Jz=kC.memo(Xz)).muiName="MuiTouchRipple",Jz)),Zz=kC.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,a=e.children,s=e.classes,u=e.className,l=e.component,c=void 0===l?"button":l,f=e.disabled,d=void 0!==f&&f,h=e.disableRipple,p=void 0!==h&&h,m=e.disableTouchRipple,v=void 0!==m&&m,g=e.focusRipple,y=void 0!==g&&g,b=e.focusVisibleClassName,x=e.onBlur,w=e.onClick,M=e.onFocus,k=e.onFocusVisible,S=e.onKeyDown,C=e.onKeyUp,q=e.onMouseDown,E=e.onMouseLeave,T=e.onMouseUp,D=e.onTouchEnd,O=e.onTouchMove,N=e.onTouchStart,_=e.onDragLeave,A=e.tabIndex,I=void 0===A?0:A,P=e.TouchRippleProps,L=e.type,R=void 0===L?"button":L,j=YC(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),z=kC.useRef(null);var F=kC.useRef(null),B=kC.useState(!1),V=B[0],H=B[1];d&&V&&H(!1);var U=Yz(),W=U.isFocusVisible,Y=U.onBlurVisible,K=U.ref;function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;return Iz((function(r){return t&&t(r),!n&&F.current&&F.current[e](r),!0}))}kC.useImperativeHandle(n,(function(){return{focusVisible:function(){H(!0),z.current.focus()}}}),[]),kC.useEffect((function(){V&&y&&!p&&F.current.pulsate()}),[p,y,V]);var G=$("start",q),X=$("stop",_),J=$("stop",T),Q=$("stop",(function(e){V&&e.preventDefault(),E&&E(e)})),Z=$("start",N),ee=$("stop",D),te=$("stop",O),ne=$("stop",(function(e){V&&(Y(e),H(!1)),x&&x(e)}),!1),re=Iz((function(e){d||(z.current||(z.current=e.currentTarget),W(e)&&(H(!0),k&&k(e)),M&&M(e))})),ie=kC.useRef(!1),oe=Iz((function(e){y&&!ie.current&&V&&F.current&&" "===e.key&&(ie.current=!0,e.persist(),F.current.stop(e,(function(){F.current.start(e)}))),S&&S(e);var t=pz.findDOMNode(z.current);e.target!==e.currentTarget||!c||"button"===c||" "!==e.key&&"Enter"!==e.key||"A"===t.tagName&&t.href||(e.preventDefault(),w&&w(e))})),ae=Iz((function(e){y&&" "===e.key&&F.current&&V&&(ie.current=!1,e.persist(),F.current.stop(e,(function(){F.current.pulsate(e)}))),C&&C(e)})),se=c;"button"===se&&j.href&&(se="a");var ue={};"button"===se?(ue.type=R,ue.disabled=d):("a"===se&&j.href||(ue.role="button"),ue["aria-disabled"]=d);var le=_z(r,t),ce=_z(K,z),fe=_z(le,ce);return kC.createElement(se,WC({className:tO(s.root,u,V&&[s.focusVisible,b],d&&s.disabled),onBlur:ne,onClick:w,onFocus:re,onKeyDown:oe,onKeyUp:ae,onMouseDown:G,onMouseLeave:Q,onMouseUp:J,onDragLeave:X,onTouchEnd:ee,onTouchMove:te,onTouchStart:Z,ref:fe,tabIndex:d?-1:I},ue,j),a,p||d?null:kC.createElement(Lz,null,kC.createElement(Qz,WC({ref:F,center:o},P))))})),eF=gO({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(Zz),tF={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},nF=kC.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,i=e.classes,o=e.className,a=e.color,s=void 0===a?"initial":a,u=e.component,l=e.display,c=void 0===l?"initial":l,f=e.gutterBottom,d=void 0!==f&&f,h=e.noWrap,p=void 0!==h&&h,m=e.paragraph,v=void 0!==m&&m,g=e.variant,y=void 0===g?"body1":g,b=e.variantMapping,x=void 0===b?tF:b,w=YC(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),M=u||(v?"p":x[y]||tF[y])||"span";return kC.createElement(M,WC({className:tO(i.root,o,"inherit"!==y&&i[y],"initial"!==s&&i["color".concat(yO(s))],p&&i.noWrap,d&&i.gutterBottom,v&&i.paragraph,"inherit"!==r&&i["align".concat(yO(r))],"initial"!==c&&i["display".concat(yO(c))]),ref:t},w))})),rF=gO((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(nF),iF=kC.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,u=void 0===s?"button":s,l=e.disabled,c=void 0!==l&&l,f=e.disableFocusRipple,d=void 0!==f&&f,h=e.endIcon,p=e.focusVisibleClassName,m=e.fullWidth,v=void 0!==m&&m,g=e.size,y=void 0===g?"medium":g,b=e.startIcon,x=e.type,w=void 0===x?"button":x,M=e.variant,k=void 0===M?"text":M,S=YC(e,["children","classes","className","color","component","disabled","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),C=b&&kC.createElement("span",{className:tO(r.startIcon,r["iconSize".concat(yO(y))])},b),q=h&&kC.createElement("span",{className:tO(r.endIcon,r["iconSize".concat(yO(y))])},h);return kC.createElement(eF,WC({className:tO(r.root,r[k],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(k).concat(yO(a))],"medium"!==y&&[r["".concat(k,"Size").concat(yO(y))],r["size".concat(yO(y))]],c&&r.disabled,v&&r.fullWidth),component:u,disabled:c,focusRipple:!d,focusVisibleClassName:tO(r.focusVisible,p),ref:t,type:w},S),kC.createElement("span",{className:r.label},C,n,q))})),oF=gO((function(e){return{root:WC({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:HC(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:HC(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:HC(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(HC(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:HC(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(HC(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:HC(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(iF);function aF(e){return e&&e.ownerDocument||document}var sF="undefined"!=typeof window?kC.useLayoutEffect:kC.useEffect,uF=kC.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=kC.useState(null),u=s[0],l=s[1],c=_z(n.ref,t);return sF((function(){o||l(function(e){return e="function"==typeof e?e():e,pz.findDOMNode(e)}(r)||document.body)}),[r,o]),sF((function(){if(u&&!o)return Nz(t,u),function(){Nz(t,null)}}),[t,u,o]),sF((function(){a&&(u||o)&&a()}),[a,u,o]),o?(kC.Children.only(n),kC.cloneElement(n,{ref:c})):u?pz.createPortal(n,u):u}));function lF(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function cF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fF(e){return aF(e).defaultView||window}function dF(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function hF(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function pF(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=[t,n].concat(Kz(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===o.indexOf(e)&&-1===a.indexOf(e.tagName)&&dF(e,i)}))}function mF(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function vF(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){var a=function(e){var t=aF(e);return t.body===e?fF(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o),s=o.parentElement,u="HTML"===s.nodeName?s:o;if(r.push({value:u.style.overflow,key:"overflow",el:u}),u.style.overflow="hidden",a){var l=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(hF(o)+l,"px"),n=aF(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(hF(e)+l,"px")}))}}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var gF=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}var t,n,r;return t=e,(n=[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&dF(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);pF(t,e.mountNode,e.modalRef,r,!0);var i=mF(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=mF(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=vF(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=mF(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&dF(e.modalRef,!0),pF(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&dF(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}])&&cF(t.prototype,n),r&&cF(t,r),e}();function yF(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,u=e.getDoc,l=e.isEnabled,c=e.open,f=kC.useRef(),d=kC.useRef(null),h=kC.useRef(null),p=kC.useRef(),m=kC.useRef(null),v=kC.useCallback((function(e){m.current=pz.findDOMNode(e)}),[]),g=_z(t.ref,v);return kC.useMemo((function(){c&&"undefined"!=typeof window&&(p.current=u().activeElement)}),[c]),kC.useEffect((function(){if(c){var e=aF(m.current);r||!m.current||m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex",-1),m.current.focus());var t=function(){o||!l()||f.current?f.current=!1:m.current&&!m.current.contains(e.activeElement)&&m.current.focus()},n=function(t){!o&&l()&&9===t.keyCode&&e.activeElement===m.current&&(f.current=!0,t.shiftKey?h.current.focus():d.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(p.current&&p.current.focus&&p.current.focus(),p.current=null)}}}),[r,o,s,l,c]),kC.createElement(kC.Fragment,null,kC.createElement("div",{tabIndex:0,ref:d,"data-test":"sentinelStart"}),kC.cloneElement(t,{ref:g}),kC.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var bF={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",touchAction:"none"},invisible:{backgroundColor:"transparent"}},xF=kC.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=YC(e,["invisible","open"]);return i?kC.createElement("div",WC({"aria-hidden":!0,ref:t},o,{style:WC({},bF.root,{},r?bF.invisible:{},{},o.style)})):null}));var wF=new gF,MF=kC.forwardRef((function(e,t){var n=jD(),r=Uq({name:"MuiModal",props:WC({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?xF:i,a=r.BackdropProps,s=r.children,u=r.closeAfterTransition,l=void 0!==u&&u,c=r.container,f=r.disableAutoFocus,d=void 0!==f&&f,h=r.disableBackdropClick,p=void 0!==h&&h,m=r.disableEnforceFocus,v=void 0!==m&&m,g=r.disableEscapeKeyDown,y=void 0!==g&&g,b=r.disablePortal,x=void 0!==b&&b,w=r.disableRestoreFocus,M=void 0!==w&&w,k=r.disableScrollLock,S=void 0!==k&&k,C=r.hideBackdrop,q=void 0!==C&&C,E=r.keepMounted,T=void 0!==E&&E,D=r.manager,O=void 0===D?wF:D,N=r.onBackdropClick,_=r.onClose,A=r.onEscapeKeyDown,I=r.onRendered,P=r.open,L=YC(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),R=kC.useState(!0),j=R[0],z=R[1],F=kC.useRef({}),B=kC.useRef(null),V=kC.useRef(null),H=_z(V,t),U=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),W=function(){return aF(B.current)},Y=function(){return F.current.modalRef=V.current,F.current.mountNode=B.current,F.current},K=function(){O.mount(Y(),{disableScrollLock:S}),V.current.scrollTop=0},$=Iz((function(){var e=function(e){return e="function"==typeof e?e():e,pz.findDOMNode(e)}(c)||W().body;O.add(Y(),e),V.current&&K()})),G=kC.useCallback((function(){return O.isTopModal(Y())}),[O]),X=Iz((function(e){B.current=e,e&&(I&&I(),P&&G()?K():dF(V.current,!0))})),J=kC.useCallback((function(){O.remove(Y())}),[O]);if(kC.useEffect((function(){return function(){J()}}),[J]),kC.useEffect((function(){P?$():U&&l||J()}),[P,J,U,l,$]),!T&&!P&&(!U||j))return null;var Q=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:zq}),Z={};return void 0===s.props.tabIndex&&(Z.tabIndex=s.props.tabIndex||"-1"),U&&(Z.onEnter=lF((function(){z(!1)}),s.props.onEnter),Z.onExited=lF((function(){z(!0),l&&J()}),s.props.onExited)),kC.createElement(uF,{ref:X,container:c,disablePortal:x},kC.createElement("div",WC({ref:H,onKeyDown:function(e){"Escape"===e.key&&G()&&(e.stopPropagation(),A&&A(e),!y&&_&&_(e,"escapeKeyDown"))},role:"presentation"},L,{style:WC({},Q.root,{},!P&&j?Q.hidden:{},{},L.style)}),q?null:kC.createElement(o,WC({open:P,onClick:function(e){e.target===e.currentTarget&&(N&&N(e),!p&&_&&_(e,"backdropClick"))}},a)),kC.createElement(yF,{disableEnforceFocus:v,disableAutoFocus:d,disableRestoreFocus:M,getDoc:W,isEnabled:G,open:P},kC.cloneElement(s,Z))))}));function kF(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var SF={entering:{opacity:1,transform:kF(1)},entered:{opacity:1,transform:"none"}},CF=kC.forwardRef((function(e,t){var n=e.children,r=e.in,i=e.onEnter,o=e.onExit,a=e.style,s=e.timeout,u=void 0===s?"auto":s,l=YC(e,["children","in","onEnter","onExit","style","timeout"]),c=kC.useRef(),f=kC.useRef(),d=_z(n.ref,t),h=jD()||vO;return kC.useEffect((function(){return function(){clearTimeout(c.current)}}),[]),kC.createElement(Mz,WC({appear:!0,in:r,onEnter:function(e,t){!function(e){e.scrollTop}(e);var n,r=Oz({style:a,timeout:u},{mode:"enter"}),o=r.duration,s=r.delay;"auto"===u?(n=h.transitions.getAutoHeightDuration(e.clientHeight),f.current=n):n=o,e.style.transition=[h.transitions.create("opacity",{duration:n,delay:s}),h.transitions.create("transform",{duration:.666*n,delay:s})].join(","),i&&i(e,t)},onExit:function(e){var t,n=Oz({style:a,timeout:u},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===u?(t=h.transitions.getAutoHeightDuration(e.clientHeight),f.current=t):t=r,e.style.transition=[h.transitions.create("opacity",{duration:t,delay:i}),h.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=kF(.75),o&&o(e)},addEndListener:function(e,t){"auto"===u&&(c.current=setTimeout(t,f.current||0))},timeout:"auto"===u?null:u},l),(function(e,t){return kC.cloneElement(n,WC({style:WC({opacity:0,transform:kF(.75),visibility:"exited"!==e||r?void 0:"hidden"},SF[e],{},a,{},n.props.style),ref:d},t))}))}));CF.muiSupportAuto=!0;var qF=kC.createContext({}),EF=kC.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,u=void 0!==s&&s,l=e.disablePadding,c=void 0!==l&&l,f=e.subheader,d=YC(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=kC.useMemo((function(){return{dense:u}}),[u]);return kC.createElement(qF.Provider,{value:h},kC.createElement(a,WC({className:tO(r.root,i,u&&r.dense,!c&&r.padding,f&&r.subheader),ref:t},d),f,n))})),TF=gO({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(EF),DF="undefined"==typeof window?kC.useEffect:kC.useLayoutEffect,OF=kC.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,u=e.children,l=e.classes,c=e.className,f=e.component,d=e.ContainerComponent,h=void 0===d?"li":d,p=e.ContainerProps,m=(p=void 0===p?{}:p).className,v=YC(p,["className"]),g=e.dense,y=e.disabled,b=void 0!==y&&y,x=e.disableGutters,w=void 0!==x&&x,M=e.divider,k=void 0!==M&&M,S=e.focusVisibleClassName,C=e.selected,q=void 0!==C&&C,E=YC(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),T=kC.useContext(qF),D={dense:g||T.dense||!1,alignItems:r},O=kC.useRef(null);DF((function(){o&&O.current&&O.current.focus()}),[o]);var N,_,A=kC.Children.toArray(u),I=A.length&&(N=A[A.length-1],_=["ListItemSecondaryAction"],kC.isValidElement(N)&&-1!==_.indexOf(N.type.muiName)),P=_z(kC.useCallback((function(e){O.current=pz.findDOMNode(e)}),[]),t),L=WC({className:tO(l.root,c,D.dense&&l.dense,!w&&l.gutters,k&&l.divider,b&&l.disabled,s&&l.button,"center"!==r&&l.alignItemsFlexStart,I&&l.secondaryAction,q&&l.selected),disabled:b},E),R=f||"li";return s&&(L.component=f||"div",L.focusVisibleClassName=tO(l.focusVisible,S),R=eF),I?(R=L.component||f?R:"div","li"===h&&("li"===R?R="div":"li"===L.component&&(L.component="div")),kC.createElement(qF.Provider,{value:D},kC.createElement(h,WC({className:tO(l.container,m),ref:P},v),kC.createElement(R,L,A),A.pop()))):kC.createElement(qF.Provider,{value:D},kC.createElement(R,WC({ref:P},L),A))})),NF=gO((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(OF),_F=kC.forwardRef((function(e,t){var n=e.classes,r=e.className,i=YC(e,["classes","className"]),o=kC.useContext(qF);return kC.createElement("div",WC({className:tO(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),AF=gO((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(_F),IF=kC.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,u=void 0!==s&&s,l=e.primary,c=e.primaryTypographyProps,f=e.secondary,d=e.secondaryTypographyProps,h=YC(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),p=kC.useContext(qF).dense,m=null!=l?l:n;null==m||m.type===rF||a||(m=kC.createElement(rF,WC({variant:p?"body2":"body1",className:r.primary,component:"span"},c),m));var v=f;return null==v||v.type===rF||a||(v=kC.createElement(rF,WC({variant:"body2",className:r.secondary,color:"textSecondary"},d),v)),kC.createElement("div",WC({className:tO(r.root,i,p&&r.dense,u&&r.inset,m&&v&&r.multiline),ref:t},h),m,v)})),PF=gO({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(IF);function LF(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function RF(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function jF(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function zF(e){return"function"==typeof e?e():e}var FF=kC.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,u=void 0===s?"anchorEl":s,l=e.children,c=e.classes,f=e.className,d=e.container,h=e.elevation,p=void 0===h?8:h,m=e.getContentAnchorEl,v=e.marginThreshold,g=void 0===v?16:v,y=e.onEnter,b=e.onEntered,x=e.onEntering,w=e.onExit,M=e.onExited,k=e.onExiting,S=e.open,C=e.PaperProps,q=void 0===C?{}:C,E=e.transformOrigin,T=void 0===E?{vertical:"top",horizontal:"left"}:E,D=e.TransitionComponent,O=void 0===D?CF:D,N=e.transitionDuration,_=void 0===N?"auto":N,A=e.TransitionProps,I=void 0===A?{}:A,P=YC(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),L=kC.useRef(),R=kC.useCallback((function(e){if("anchorPosition"===u)return a;var t=zF(r),n=(t instanceof fF(t).Element?t:aF(L.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+LF(n,i),left:n.left+RF(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,u]),j=kC.useCallback((function(e){var t=0;if(m&&"anchorEl"===u){var n=m(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[o.vertical,u,m]),z=kC.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:LF(e,T.vertical)+t,horizontal:RF(e,T.horizontal)}}),[T.horizontal,T.vertical]),F=kC.useCallback((function(e){var t=j(e),n={width:e.offsetWidth,height:e.offsetHeight},i=z(n,t);if("none"===u)return{top:null,left:null,transformOrigin:jF(i)};var o=R(t),a=o.top-i.vertical,s=o.left-i.horizontal,l=a+n.height,c=s+n.width,f=fF(zF(r)),d=f.innerHeight-g,h=f.innerWidth-g;if(a<g){var p=a-g;a-=p,i.vertical+=p}else if(l>d){var m=l-d;a-=m,i.vertical+=m}if(s<g){var v=s-g;s-=v,i.horizontal+=v}else if(c>h){var y=c-h;s-=y,i.horizontal+=y}return{top:"".concat(a,"px"),left:"".concat(s,"px"),transformOrigin:jF(i)}}),[r,u,R,j,z,g]),B=kC.useCallback((function(e){var t=F(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}),[F]),V=kC.useCallback((function(e){L.current=pz.findDOMNode(e)}),[]),H=kC.useMemo((function(){if(S)return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this,s=function(){e.apply(a,i)};clearTimeout(t),t=setTimeout(s,n)}return r.clear=function(){clearTimeout(t)},r}((function(){B(L.current)}))}),[S,B]);kC.useImperativeHandle(n,(function(){return S?{updatePosition:H}:null}),[S,H]),kC.useEffect((function(){if(H)return window.addEventListener("resize",H),function(){window.removeEventListener("resize",H),H.clear()}}),[H]);var U=_;"auto"!==_||O.muiSupportAuto||(U=void 0);var W=d||(r?aF(zF(r)).body:void 0);return kC.createElement(MF,WC({container:W,open:S,ref:t,BackdropProps:{invisible:!0},className:tO(c.root,f)},P),kC.createElement(O,WC({appear:!0,in:S,onEnter:y,onEntered:b,onExit:w,onExited:M,onExiting:k,timeout:U},I,{onEntering:lF((function(e,t){x&&x(e,t),B(e)}),I.onEntering)}),kC.createElement(xO,WC({elevation:p,ref:V},q,{className:tO(c.paper,q.className)}),l)))})),BF=gO({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(FF);function VF(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function HF(e){var t=e.d,r=e.size,i=e.style,o=void 0===i?{}:i,a=e.viewBox,s=void 0===a?"0 0 16 16":a,u=n({fontSize:VF(r),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},o);return kC.createElement("i",{style:u},kC.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:s,fill:"currentColor"},kC.createElement("path",{d:t})))}var UF={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},WF={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},YF="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",KF={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},$F={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function GF(e,t,n){(function(e){var t=e.model,n=e.properties;return t.modifiers?t.modifiers.apply({model:t,properties:n}):Promise.resolve()})({model:e,properties:n}).then((function(){e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");var r=dk.generate(t,n);r&&r.length&&(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0))}))}function XF(e,t,n,r,i,o){e.getEffectiveProperties().then((function(a){var s=Tg(!0,{},a),u=s.qHyperCubeDef[r][t],l=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];l.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],o||(l.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=l,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=u,i&&i({oldItem:u,newItem:l,oldProperties:a,newProperties:s,model:e}),GF(e,a,s)}))}function JF(e){return"H"===e.qGrouping?e.title||"":e.qFallbackTitle||""}function QF(e){var t=e.dir,n=e.dock,r=e.altList,i=e.model,o=e.translator,a=e.app,s=e.onChange;return 0===r.length?null:{dir:t,dock:n,getAlternatives:function(){var e=r.map((function(e){return function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((function(e){return e.getLayout()})).catch((function(){return null})).then((function(e){return e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")}));var r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);var i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,a,o).then((function(t){return{id:e.qDef.cId,selected:!1,title:t}}))}));return Promise.all(e)},changeTo:function(e,t){XF(i,e,t,"qDimensions",s)}}}function ZF(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/qHyperCubeDef";return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:JF(e),drillUp:function(e){n.drillUp(r,t,e)}}}function eB(e){var t=e.altList,n=e.app,r=e.dir,i=e.dock,o=e.model,a=e.onChange,s=e.skipAttributeExpressions,u=e.translator;return 0===t.length?null:{dir:r,dock:i,getAlternatives:function(){var e=t.map((function(e){return function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((function(e){return e.getLayout()})).catch((function(){return null})).then((function(e){return e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")}));var r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);var i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,n,u).then((function(t){return{id:e.qDef.cId,selected:!1,title:t}}))}));return Promise.all(e)},changeTo:function(e,t){XF(o,e,t,"qMeasures",a,s)}}}function tB(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}var nB=["children"],rB={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},iB=function(e){var t=e.children,n=p(e,nB);return kC.createElement(oF,c({size:"small",disableRipple:!0,disableTouchRipple:!0},n),t)};function oB(){function e(e){var t=e.title,n=e.selected,r=e.onClick,i=ay.detectTextDirection(t);return kC.createElement(NF,{button:!0,onClick:r,style:{textAlign:"start"}},kC.createElement(AF,{style:{minWidth:32}},kC.createElement(HF,{d:n?YF:""})),kC.createElement(PF,{primaryTypographyProps:{dir:i}},t))}function t(t){var n=t.alignTo,r=t.changeTo,i=t.current,o=t.dir,a=t.dock,s=t.list,u=t.onClose,l=t.show,f=s.map((function(t,n){return kC.createElement(e,{key:t.id,title:t.title,onClick:function(){return r(n)}})}));return kC.createElement(BF,c({anchorEl:n,open:l,onClose:u},rB[a],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),kC.createElement(TF,{dense:!0,dir:o,component:"nav"},kC.createElement(e,{title:i,selected:!0,onClick:u}),f))}e.propTypes={title:EC.string.isRequired,selected:EC.bool,onClick:EC.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:EC.any,changeTo:EC.func.isRequired,current:EC.string.isRequired,dir:EC.string.isRequired,dock:EC.string.isRequired,list:EC.array,onClose:EC.func.isRequired,show:EC.bool.isRequired},t.defaultProps={list:[],alignTo:null};var r=function(e){f(i,e);var r=g(i);function i(e){var t;return a(this,i),(t=r.call(this,e)).state={open:!1,inSelection:e.selections&&e.selections.isActive()},t.openPopover=t.openPopover.bind(m(t)),t.closePopover=t.closePopover.bind(m(t)),t.changeTo=t.changeTo.bind(m(t)),t.alignToRef=kC.createRef(),t}return u(i,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selections;t&&(this.onSelectionsActivated=function(){return e.setState({inSelection:!0})},this.onSelectionsDeactivated=function(){return e.setState({inSelection:!1})},t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated))}},{key:"componentWillUnmount",value:function(){var e=this.props.selections;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}},{key:"changeTo",value:function(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}},{key:"openPopover",value:function(){var e=this;this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((function(t){e.setState({open:!0,alternatives:t})}))}},{key:"closePopover",value:function(){this.setState({open:!1,closeTime:Date.now()})}},{key:"render",value:function(){var e=this.props,r=e.titleData,i=e.popover,o=e.translator,a=e.disabled,s=e.isDimension,u=e.padding,l=e.minWidth,f=e.hasAlternative,d=n({flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal"},this.props.style),h=r.breadcrumbs.length,p=a||this.state.inSelection,m=r.breadcrumbs.map((function(e,t){return kC.createElement(iB,{style:{display:"flex",alignItems:"center",color:p&&"rgba(89, 89, 89, 0.8)",pointerEvents:p?"none":"auto"},key:t,onClick:function(){return p?void 0:r.drillUp(h-t)},title:e},kC.createElement("span",{style:d},e),kC.createElement(HF,c({},$F,{size:"small",style:{margin:"0 8px"}})))})),v=i&&!this.state.open?this.openPopover:this.closePopover,g=!i||a||this.state.inSelection,y={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:!s&&g&&"20px",lineHeight:!s&&g&&"20px",border:!s&&g&&"none"};u&&(y.padding=u),l&&(y.minWidth=l);var b=ay.detectTextDirection(r.text),x=kC.createElement(iB,{style:y,onClick:g?void 0:v,title:r.text,tabIndex:"-1"},r.locked&&kC.createElement(HF,c({},WF,{size:"small",title:o.get("Tooltip.selections.locked")})),kC.createElement("span",{style:d,dir:b},r.text),i&&kC.createElement(HF,c({},KF,{size:"small",style:{margin:"0 8px"}})));return kC.createElement(kC.Fragment,null,r.drilldown&&kC.createElement(HF,c({},UF,{size:"small",title:o.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),m,kC.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:f?"auto":"none"}},x),i&&kC.createElement(t,{dock:i.dock,dir:i.dir,current:r.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}]),i}(kC.Component);function i(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function o(e){return!e.isDimension&&Fg(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:EC.bool.isRequired,padding:EC.string,minWidth:EC.string,titleData:EC.shape({breadcrumbs:EC.arrayOf(EC.string).isRequired,drilldown:EC.bool.isRequired,index:EC.number.isRequired,locked:EC.bool.isRequired,text:EC.string.isRequired,popoverText:EC.string.isRequired,drillUp:EC.func}).isRequired,popover:EC.shape({dir:EC.string.isRequired,dock:EC.string.isRequired,changeTo:EC.func.isRequired,getAlternatives:EC.func.isRequired}),translator:EC.shape({get:EC.func.isRequired}).isRequired,selections:EC.shape({isActive:EC.func,addListener:EC.func,removeListener:EC.func}),style:EC.shape({fontSize:EC.string,color:EC.string,fontFamily:EC.string}).isRequired,isDimension:EC.bool.isRequired,hasAlternative:EC.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||o(this.settings.settings)?28:20},render:function(){var e,t=this,n=this.settings,a=n.settings,s=a.app,u=a.disabled,l=a.explicitItemInfos,c=a.hyperCube,f=a.hyperCubeDef,d=a.isDimension,h=a.minWidth,p=a.model,m=a.onChangeToAlternative,v=a.padding,g=a.rtl,y=a.selections,b=a.skipAttributeExpressions,x=a.translator,w=n.layout.dock,M="top"!==w&&"bottom"!==w||!g?"ltr":"rtl",k=function(e,t){var n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(n.width="".concat(t.height,"px"),n.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),n.transformOrigin="top left"):"right"===e&&(n.width="".concat(t.height,"px"),n.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),n.transformOrigin="top left"),n}(w,this.rect),S=f&&f.qLayoutExclude&&f.qLayoutExclude.qHyperCubeDef,C=S&&S[d?"qDimensions":"qMeasures"]||[],q=l||c[d?"qDimensionInfo":"qMeasureInfo"],E=d?QF:eB,T=d?ZF:tB,D=p&&p.colorSupport&&p.modifiers&&E({altList:C,app:s,dir:g?"rtl":"ltr",dock:i(w),model:p,onChange:m,skipAttributeExpressions:b,translator:x}),O=(e=this.settings.settings).isDimension&&Fg(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||o(this.settings.settings),N=q.map((function(e,n){var i="number"==typeof e.explicitColumn?e.explicitColumn:n,o=T(e,i,p),a=n===q.length-1;return kC.createElement(kC.Fragment,{key:e.cId},kC.createElement(r,{popover:D,titleData:o,model:p,translator:x,selections:y,disabled:u(),style:t.style,isDimension:d,padding:v,minWidth:h,hasAlternative:O}),!a&&kC.createElement("span",null,", "))}));return kC.createElement("div",{style:k,dir:M},N)}}}var aB=Fq({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});function sB(e,t){return kC.createElement(HD,{generateClassName:t},kC.createElement(mO,{theme:aB},e))}var uB=Hq({productionPrefix:"q".concat("0815"),disableGlobal:!0,seed:""});function lB(){return function(e){var t;e.renderer("react",function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=e.y,r=e.width,i=e.height,o=e.scaleRatio,a=e.margin,s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return s.x=Number.isNaN(t)?s.x:t,s.y=Number.isNaN(n)?s.y:n,s.width=Number.isNaN(r)?s.width:r,s.height=Number.isNaN(i)?s.height:i,void 0!==o&&(s.scaleRatio.x=Number.isNaN(o.x)?s.scaleRatio.x:o.x,s.scaleRatio.y=Number.isNaN(o.y)?s.scaleRatio.y:o.y),void 0!==a&&(s.margin.left=Number.isNaN(a.left)?0:a.left,s.margin.top=Number.isNaN(a.top)?0:a.top),s}return function(){var t,n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createElement,r=void 0===n?document.createElement.bind(document):n,i=e(),o={element:function(){return t},root:function(){return t},appendTo:function(e){return t||((t=r("div")).style.position="absolute",t.style["-webkit-font-smoothing"]="antialiased",t.style["-moz-osx-font-smoothing"]="antialiased",t.style.pointerEvents="none"),e.appendChild(t),t},render:function(e){if(!t)return!1;var n=i.scaleRatio.x,r=i.scaleRatio.y;return t.style.left="".concat(Math.round(i.margin.left+i.x*n),"px"),t.style.top="".concat(Math.round(i.margin.top+i.y*r),"px"),t.style.width="".concat(Math.round(i.width),"px"),t.style.height="".concat(Math.round(i.height),"px"),t.style.transform="scale(".concat(n,", ").concat(r,")"),t.style.transformOrigin="top left",pz.render(sB(e,uB),t),!0},itemsAt:function(){return[]},findShapes:function(){return[]},clear:function(){return t&&pz.unmountComponentAtNode(t),o},destroy:function(){t&&t.parentElement&&(pz.unmountComponentAtNode(t),t.parentElement.removeChild(t)),t=null},size:function(t){return t&&(i=e(t)),i}};return o}}()),e.component("data-title",oB()),e.component("disclaimer",((t=function(e){f(n,e);var t=g(n);function n(){return a(this,n),t.apply(this,arguments)}return u(n,[{key:"render",value:function(){var e=this.props,t=e.label,n=e.spanStyle;return kC.createElement(kC.Fragment,null,kC.createElement("span",{ref:this.alignToRef,style:n,title:t},t))}}]),n}(kC.Component)).propTypes={label:EC.string.isRequired,spanStyle:EC.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render:function(){var e=this.settings,n=e.settings,r=n.label,i=n.rtl,o=e.layout.dock,a="top"!==o&&"bottom"!==o||!i?"ltr":"rtl",s=function(e,t){var n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width="".concat(t.height,"px"),n.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),n.transformOrigin="top left";break;case"right":n.width="".concat(t.height,"px"),n.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),n.transformOrigin="top left";break;case"center":n.width="".concat(t.width,"px"),n.height="".concat(t.height,"px"),n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(o,this.rect),u="center"===o?r:"* ".concat(r),l="center"!==o?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return kC.createElement("div",{style:s,dir:a},kC.createElement(kC.Fragment,null,kC.createElement(t,{label:u,spanStyle:l})))}}))}}var cB=2e3;function fB(e){var t=e.model,n=e.layoutService,r=e.definitionPath,i=void 0===r?"/qHyperCubeDef":r;return{fetch:function(e,n){var r={qStart:e,qEnd:n,qNbrPoints:this.computeNbrOfBins(),qMaxNbrTicks:300,qMaxNumberLines:this.computeMaxNumberLines()};return t.getHyperCubeContinuousData(i,r,!1)},shouldFetchReduced:function(){var e=n.getLayout().qHyperCube;return e.qSize.qcy*e.qMeasureInfo.length>=cB},computeNbrOfBins:function(){var e=n.getLayout().qHyperCube;if(!this.shouldFetchReduced())return cB;var t=e.qMeasureInfo.length||1,r=4+2*(t-1);return e.qDimensionInfo.length>1&&(t=Math.max(1,Math.min(12,n.meta.size.dimensions[1])),r=4),Math.ceil(cB/(t*r))},computeMaxNumberLines:function(){return n.getLayout().qHyperCube.qDimensionInfo.length>1&&!this.shouldFetchReduced()?n.meta.size.dimensions[1]+1:12}}}function dB(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cache,n=void 0===t?{}:t;return{fetch:function(){return Promise.resolve(n.merged)}}}function hB(e){var t=e.layoutService,n=e.viewCache;return{fetch:function(){var e=t.getHyperCube(),n=e.qAxisData,r=e.qDataPages;return Promise.resolve({qAxisData:n,qDataPages:r})},getSnapshotData:function(){var e=t.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in e&&"min"in e.zoom&&"max"in e.zoom?{zoom:e.zoom}:function(e,t){var n=e.scrollOffset,r=void 0===n?0:n,i=e.viewRange,o=void 0===i?0:i,a=t+r,s=a+o;return 1===o&&0===r&&(a=t-.5,s=t+.5),{zoom:{min:a,max:s}}}(e,n.get("continuousMin"))}}}function pB(){var e=function(){},t=[],n={};return e.set=function(e,r){var i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=function(e){t.forEach((function(t,r){return e(n[t],r)}))},e.has=function(e){return e in n},e}function mB(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function(e){for(var t=e.start,n=e.end,r=e.matrix,i=[],o=pB(),a=pB(),s=0;s<r.length;s++){var u=r[s],l=u[1].qElemNumber.toString();u[0].qNum<t?o.set(l,u):u[0].qNum>n&&(a.has(l)||a.set(l,u)),u[0].qNum>=t&&u[0].qNum<=n&&i.push(u)}return o.forEach((function(e,t){return i.splice(t,0,e)})),a.forEach((function(e){return i.push(e)})),i}({start:e,end:t,matrix:n}):function(e){for(var t,n,r=e.start,i=e.end,o=e.matrix,a=[],s=0;s<o.length;s++){var u=o[s];u[0].qNum<r?t=u:u[0].qNum>i&&(n||(n=u)),u[0].qNum>=r&&u[0].qNum<=i&&a.push(u)}return t&&a.unshift(t),n&&a.push(n),a}({start:e,end:t,matrix:n})}function vB(e,t){return n(n({},e),{},{qWidth:t[0]?t[0].length:0,qHeight:t.length})}function gB(e,t,r){var i={qDataPages:(r.qDataPages||[]).map((function(r){var i=mB(e,t,r.qMatrix),o=vB(r.qArea,i);return n(n({},r),{},{qArea:o,qMatrix:i})}))};return r.qAxisData&&r.qAxisData.qAxis&&(i.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((function(n){return{qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce((function(n,r){return(r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n}),[])}}))}}(e,t,r.qAxisData)),i}function yB(e,t){var r={};return r.qDataPages=(e.qDataPages||[]).map((function(e,r){var i=function(e,t){if(!t||!t.length||!t[0].length)return e;for(var n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[],a=0,s=e.length;a<s;a++){var u=e[a][0];u.qNum<n?i.push(e[a]):u.qNum>r&&o.push(e[a])}return[].concat(i,b(t),o)}(e.qMatrix,t.qDataPages[r].qMatrix),o=vB(e.qArea,i);return n(n({},e),{},{qArea:o,qMatrix:i})})),e.qAxisData&&e.qAxisData.qAxis&&(r.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((function(e){return!e.qTicks.length})))return e;for(var n=t.qAxis.map((function(e){return e.qName})),r=t.qAxis.map((function(e){return{start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}})),i=t.qAxis.map((function(e){return{qName:e.qName,qTags:b(e.qTags),qTicks:b(e.qTicks)}})),o=0,a=e.qAxis.length;o<a;o++){var s=e.qAxis[o],u=n.indexOf(s.qName),l=[],c=[];if(u>-1){for(var f=r[u],d=f.start,h=f.end,p=0,m=s.qTicks.length;p<m;p++){var v=s.qTicks[p];v.qStart<d?l.push(v):v.qStart>h&&c.push(v)}i[u].qTicks=[].concat(l,b(i[u].qTicks),c)}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),r}function bB(e){return{qDataPages:e.qDataPages.map((function(e){var t=vB(e.qArea,e.qMatrix);return n(n({},e),{},{qArea:t})})),qAxisData:e.qAxisData}}var xB=Math.pow(2,.5),wB=1/xB,MB=Math.pow(wB,44);function kB(e,t){return Math.max(1e-6,(t-e)*MB)}function SB(e){return e.qIsOtherCell}function CB(e){var t={};return e.forEach((function(e){if(!e.some(SB)){var n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}function qB(e){var t=0;return e.forEach((function(e){e.some(SB)||t++})),t}function EB(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.qDataPages,n=void 0===t?[]:t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.length?n[0].qMatrix:[];return r.isStackedByDimension?CB(i):qB(i)}function TB(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.qMin,n=e.qMax;return{initialMin:t=Number.isNaN(+t)?0:t,initialMax:n=Number.isNaN(+n)?0:n}}var DB={command:{processDataPage:function(){}}};function OB(e){return(OB="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}function NB(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function _B(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){NB(o,r,i,a,s,"next",e)}function s(e){NB(o,r,i,a,s,"throw",e)}a(void 0)}))}}function AB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function PB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IB(Object(n),!0).forEach((function(t){AB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IB(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function LB(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function RB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||zB(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jB(e){return function(e){if(Array.isArray(e))return FB(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||zB(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zB(e,t){if(e){if("string"==typeof e)return FB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?FB(e,t):void 0}}function FB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var BB=Object.prototype.hasOwnProperty,VB=Object.prototype.toString,HB=Object.defineProperty,UB=Object.getOwnPropertyDescriptor,WB=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===VB.call(e)},YB=function(e){if(!e||"[object Object]"!==VB.call(e))return!1;var t,n=BB.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&BB.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||BB.call(e,t)},KB=function(e,t){HB&&"__proto__"===t.name?HB(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},$B=function(e,t){if("__proto__"===t){if(!BB.call(e,t))return;if(UB)return UB(e,t).value}return e[t]},GB=function e(){var t,n,i,o,a,s,u=arguments[0],l=1,c=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},l=2),(null==u||"object"!=r(u)&&"function"!=typeof u)&&(u={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=$B(u,n),u!==(o=$B(t,n))&&(f&&o&&(YB(o)||(a=WB(o)))?(a?(a=!1,s=i&&WB(i)?i:[]):s=i&&YB(i)?i:{},KB(u,{name:n,newValue:e(f,s,o)})):void 0!==o&&KB(u,{name:n,newValue:o}));return u};function XB(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",t);return r.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function JB(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",t);return r.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function QB(e,t,n,r,i){var o,a=i.byRow,s=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(o=e.hc.qDataPages[0])||void 0===o?void 0:o.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var u=t.pic.extract({field:r.key(),trackBy:r.value}).length;return a(r,u)}return{}}function ZB(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function eV(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function tV(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function nV(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function rV(){}var iV=1/.7,oV="\\s*([+-]?\\d+)\\s*",aV="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",sV="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uV=/^#([0-9a-f]{3,8})$/,lV=new RegExp("^rgb\\("+[oV,oV,oV]+"\\)$"),cV=new RegExp("^rgb\\("+[sV,sV,sV]+"\\)$"),fV=new RegExp("^rgba\\("+[oV,oV,oV,aV]+"\\)$"),dV=new RegExp("^rgba\\("+[sV,sV,sV,aV]+"\\)$"),hV=new RegExp("^hsl\\("+[aV,sV,sV]+"\\)$"),pV=new RegExp("^hsla\\("+[aV,sV,sV,aV]+"\\)$"),mV={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 vV(){return this.rgb().formatHex()}function gV(){return this.rgb().formatRgb()}function yV(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=uV.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?bV(t):3===n?new kV(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?xV(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?xV(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=lV.exec(e))?new kV(t[1],t[2],t[3],1):(t=cV.exec(e))?new kV(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=fV.exec(e))?xV(t[1],t[2],t[3],t[4]):(t=dV.exec(e))?xV(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=hV.exec(e))?EV(t[1],t[2]/100,t[3]/100,1):(t=pV.exec(e))?EV(t[1],t[2]/100,t[3]/100,t[4]):mV.hasOwnProperty(e)?bV(mV[e]):"transparent"===e?new kV(NaN,NaN,NaN,0):null}function bV(e){return new kV(e>>16&255,e>>8&255,255&e,1)}function xV(e,t,n,r){return r<=0&&(e=t=n=NaN),new kV(e,t,n,r)}function wV(e){return e instanceof rV||(e=yV(e)),e?new kV((e=e.rgb()).r,e.g,e.b,e.opacity):new kV}function MV(e,t,n,r){return 1===arguments.length?wV(e):new kV(e,t,n,null==r?1:r)}function kV(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function SV(){return"#"+qV(this.r)+qV(this.g)+qV(this.b)}function CV(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"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===e?")":", "+e+")")}function qV(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function EV(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new DV(e,t,n,r)}function TV(e){if(e instanceof DV)return new DV(e.h,e.s,e.l,e.opacity);if(e instanceof rV||(e=yV(e)),!e)return new DV;if(e instanceof DV)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new DV(a,s,u,e.opacity)}function DV(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function OV(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function NV(e){return function(){return e}}function _V(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):NV(isNaN(e)?t:e)}tV(rV,yV,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:vV,formatHex:vV,formatHsl:function(){return TV(this).formatHsl()},formatRgb:gV,toString:gV}),tV(kV,MV,nV(rV,{brighter:function(e){return e=null==e?iV:Math.pow(iV,e),new kV(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new kV(this.r*e,this.g*e,this.b*e,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:SV,formatHex:SV,formatRgb:CV,toString:CV})),tV(DV,(function(e,t,n,r){return 1===arguments.length?TV(e):new DV(e,t,n,null==r?1:r)}),nV(rV,{brighter:function(e){return e=null==e?iV:Math.pow(iV,e),new DV(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new DV(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new kV(OV(e>=240?e-240:e+120,i,r),OV(e,i,r),OV(e<120?e+240:e-120,i,r),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 e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var AV=function e(t){var n=function(e){return 1==(e=+e)?_V:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):NV(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=MV(e)).r,(t=MV(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=_V(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),IV=/^class(-pyramid)?/,PV=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,s=o,u=t.limits,l={},c="percent"===t.limitType?u.map((function(e){return i+(o-i)*e})):u,f=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(jB(c))),o=Math.max.apply(Math,[o].concat(jB(c))),l.min=i,l.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))l.type="categorical",Object.assign(l,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){o.push(i[s]);break}}for(var u=0;u<r.length;u++)t<r[u]&&r[u]<n&&(a.push(r[u]),o.push(i[u]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var l=0;l<r.length;l++)if(r[l]>n){o.push(i[l]),o.push(i[l]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:f,limits:"percent"===t.limitType?c:u}));else if(t.breakTypes){var d=t.breakTypes;l.type="continuous",l.domain=[i],l.range=[f[0]];for(var h=0;h<c.length;h+=1)if(d[h]){var p=f[h],m=f[h+1],v=AV(p,m)(.5);l.range.push(v),l.domain.push(c[h]),h<c.length-1&&d[h+1]&&(l.range.push(f[h+1]),l.domain.push((c[h]+c[h+1])/2))}else l.range.push(f[h]),l.range.push(f[h+1]),l.domain.push(c[h]),l.domain.push(c[h]+Math.min(1e-6,(o-i)/1e6));l.range.push(f[f.length-1]),l.domain.push(o)}else l.domain=c,l.range=f;return l};function LV(e,t,n,r,i){var o,a,s,u=0,l=[],c=(e-t)/(r+1);if(0===c)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),s=n[o]>e?Math.floor(e/c):n[o]<t?0:Math.floor(a/c),Number.isNaN(s)||(l[s]?l[s]+=1:l[s]=1);for(o=0;o<l.length;o+=1)l[o]&&(u+=1);return u<=r||u>=i?Math.max(u,r):LV(e,t,n,r+1,i)}var RV=function(e,t,n,r){var i,o,a=t.theme,s=t.hc,u=r.f,l={mode:"field",fieldType:"measure",field:u?u.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],f=!0;if(u){if(Number.isNaN(+u.min())||Number.isNaN(+u.max()))return{invalid:!0};(f=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:u.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,jB(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(l.min=n.input.measureMin,l.max=n.input.measureMax,l.max<l.min)return{invalid:!0}}else if(u&&!f)l.min=u.min(),l.max=u.max();else if(u){if(!c.length)return{invalid:!0};l.min=Math.min.apply(Math,jB(c)),l.max=Math.max.apply(Math,jB(c))}if(n.input.measureScheme&&(l.palettes={quant:n.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];l.type=d&&IV.test(d.type)?"categorical":"continuous","categorical"===l.type&&(o=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,jB(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===l.type){for(var h=f?LV(l.max,l.min,c,1,o):o,p=(l.max-l.min)/h,m=[],v=0;v<h+1;v+=1)m.push(l.min+p*v);l.domain=m,l.range=function(e){for(var t=e.resources.theme.palette("quant",h),n=Math.max(1,Math.floor(t.length/h)),r=[],i=0;i<h;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return l};function jV(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function zV(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function FV(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(o);-1===s?(n.push(o),r.push(a.primary)):r[s]=a.primary,e[o]=null}else if(a){i.push(o);var u=n.indexOf(o);-1!==u&&(n.splice(u,1),r.splice(u,1))}}return{domain:n,range:r,exclude:i}}function BV(e,t,n,r){var i=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?jV:o,s=n.input.byMeasureDef||{activeMeasureIndex:0},u=a(n,s),l=RV(0,{theme:r,hc:i},n,{f:u});if(l.invalid)return l;("expression"===s.type||s.activeMeasureIndex<0)&&(l.label=s.label,u&&"color.altLabel"===u.raw().labelExpRef&&(l.label=n.input.altLabel)),!l.label&&u&&(l.label=u.title());var c=s.activeMeasureIndex>=0?u:null;if(!c&&u&&void 0!==u.raw().matchMeasure&&u.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[u.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var f=c.raw().coloring;f&&f.gradient&&GB(l,PV(e,f.gradient,l,c))}else l.auxiliary=s;return l}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?ZB:i,a=r.getCByField,s=void 0===a?eV:a,u=r.getPersistence,l=void 0===u?QB:u,c=o(t,n),f=s(n,c),d=f?f.raw():{},h=n&&n.pic?n.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!h.qHasOtherValues)return{invalid:!0};var p={mode:"field",fieldType:"dimension",type:"categorical",field:f?f.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(p.label=c.label,"color.altLabel"===d.labelExpRef&&(p.label=n.input.altLabel)),!p.label&&f&&(p.label=f.title()),n.input.dimensionScheme&&(p.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(p.auxiliary=c),GB(p,l(t,n,c,f,{byRow:JB,byElemNo:XB})),p}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!(s&&s.raw().qFallbackTitle&&(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor)))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var u=RV(0,{hc:i,theme:o},n,{f:s});return u.invalid||(u.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),u}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var u=[],l=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){u.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?l.push(r.primary):l.push(i)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,f=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&f&&(c={categorical:f.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:u.length?{domain:u,range:l}:void 0}}if("dimension"===s){var d=[],h=[];return i.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?h.push(r.primary):h.push(i)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:h}:void 0}}var p=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(p=e.resolveUIColor(n.input.paletteColor));else{var m=n.input.singleColor;"number"!=typeof m||Number.isNaN(m)||(p=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][m])}return{mode:"constant",type:"constant",primary:p}}(e,n,t,r)}return{}}(e,t,n,r);return t.input.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var s=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),PB(PB({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),o=i;return PB(PB({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})})),function(e,t){var n,r,i,o=t.translator;if(zV(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=FV(e.measureOverrides,e.explicit),zV(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=FV(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,n)):i}function VV(e){var t=PB({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(GB(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=GB(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(n.input=GB(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=e.auxiliary||{},o=i.key;if("measure"===e.fieldType)return r.getMeasure(o,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),o?r.getDimensionColorMap(o,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return PV(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],u=r[1]?r[1].colorMap:null;if(s){var l=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=l}return u?function(e,t,n,r){var i=r.external,o=r.field,a=PB({},e);GB(a,XB(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,GB(a,XB(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),GB(a,XB(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var s=0;s<i.items.length;s++){var u=i.items[s],l=(u.text||u).label;r[l]&&-1===a.indexOf(u.value)&&(a.push(u.value),o.push(t.resolveUIColor(r[l])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,u,i,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=PB(PB({},e),r.getDataColorSpecials())),n.settings=GB(e,BV(this,n,t,e))}return n.settings}};return i}var HV=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},UV=function(e){throw e.isHandled=!0,e},WV=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},YV=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},KV=function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(UV):Promise.reject()};function $V(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}function GV(e){return function(t){return"object"===OB(t.datum[e])?t.datum[e].value:void 0}}function XV(e){return"object"===OB(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function JV(e){return-3===e.datum.value}var QV=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},ZV=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function eH(e,t){var n=e.styleReference,r=e.chart,i=e.rtl,o=t.legendProps,a=t.coloring,s=t.theme,u=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:QV(o,r,i)},show:"function"==typeof o.show?function(){return ZV(o,u,a)}:ZV(o,u,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==o.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(n,"legend.title","color"):void 0,fontSize:s?s.getStyle(n,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(n,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function tH(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=eH(e,t);if(!r.show)return!1;var i=e.key,o=e.styleReference,a=e.viewState,s=e.rtl,u=e.settings,l=e.style,c=t.scaleKey,f=t.theme,d=t.scales,h={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},p="".concat(c,"Legend");return GB(!0,r,{type:"legend-cat",key:"".concat(i,"-cat"),scale:p in d?p:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:f?f.getStyle(o,"legend.label","color"):void 0,fontSize:f?f.getStyle(o,"legend.label","fontSize"):void 0,fontFamily:f?f.getStyle(o,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:h[n]})])])}}}},brush:{consume:[{context:"selection",data:["",i],style:{inactive:{opacity:.3}}}]}},{settings:u,style:l})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n=e.key,r=e.styleReference,i=e.rtl,o=e.settings,a=e.style,s=t.scaleKey,u=t.theme,l=eH(e,t);return!!l.show&&GB(!0,l,{type:"legend-seq",key:"".concat(n,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:u?u.getStyle(r,"legend.label","color"):void 0,fontSize:u?u.getStyle(r,"legend.label","fontSize"):void 0,fontFamily:u?u.getStyle(r,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!i||"top"!==l.layout.dock&&"bottom"!==l.layout.dock?void 0:"right",padding:parseFloat(l.settings.title.fontSize)||16}}},{settings:o,style:a})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,i=t.requireFailure,o=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var i;return this.started===n||!t||!(null!=a&&null!==(i=a.interact)&&void 0!==i&&i.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(r,"-cat")}))}},events:(e={},AB(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),AB(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),AB(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:i,components:r}}var nH=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function rH(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=VV(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var n=t.layout,r=t.app;return WV(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return YV(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,i=t.app;return KV(e,{layout:n,model:r,app:i})}));return n.getSnapshotData=HV,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=PB({},i),r={},!n.key)throw new Error("Missing key");t.set(PB(PB({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=PB(PB({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,u=r.getDataColorScales().filter((function(e){return e.key===s}))[0];if(u){var l=u.colors[0]?u.colors:[[]].concat(jB(u.colors.slice(1)));l=Array.isArray(l[0])?l.map((function(e){return e.slice().reverse()})):l.slice().reverse(),i.push({key:"quant",colors:l})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},u=i;if(n){var l={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(jB((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(jB((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,f=$V({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var d=0,h={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return h[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return h[e.qElemNumber]}}}}}}var p={data:f,range:n.range,domain:n.domain,explicit:l,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[u]=p,c&&(s["".concat(u,"Legend")]=PB(PB({},p),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||p.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var m={data:{field:n.field},min:n.min,max:n.max};s[u]=GB({},m,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[u].type&&(s["".concat(u,"Range")]=GB({},m,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var v={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:l,type:"categorical-color"};s[u]=v}else if("measure"===n.mode){var g={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:l,type:"categorical-color"};s[u]=g}}return s}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=GV(r),o=GV("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,u=e.nil,l=e.others,c=e.primary,f=e.type;return a?function(e){return JV(e)||o(e)?l:u}:n[t]?function(e){return JV(e)?l:XV(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?u:o(e)?l:e.resources.scale(t)(i(e))||l}:"constant"===s?function(e){return JV(e)||o(e)?l:XV(e)?u:c}:"color"===f?function(e){return JV(e)||o(e)?l:XV(e)?u:i(e)||l}:null},s=a(t,r);if(t.measureOverrides){var u=GV("".concat(r,"MeasureIdx")),l=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=u(e);return l[t]?l[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,l=a,c=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?nH(e.qNum):e.qText&&yV(e.qText)?e.qText:c})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=u);var f=AB({},l,n);return r.qDimensionInfo.length>1&&(f["".concat(l,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(f["".concat(l,"MeasureIdx")]=u),f}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,s=e.rtl,u=e.styleReference,l=void 0===u?"object.legend":u,c=e.settings,f=void 0===c?{}:c,d=e.style,h=void 0===d?{}:d,p=arguments.length>1?arguments[1]:void 0;return tH({eventName:t,key:r,rtl:s,viewState:o,chart:a,styleReference:l,settings:f,style:h},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},p)}};return o}var iH=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function oH(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(iH),o=r.some(iH),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function aH(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=PB(PB(PB({},e),t),{},{colorProps:PB(PB({},e.colorProps),t.colorProps||{})});return n}var sH=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function uH(e){var t,n=e.qHyperCube.qDimensionInfo.some(sH),r=e.qHyperCube.qMeasureInfo.some(sH),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var lH=function(){};function cH(e){var t,n,r,i,o=e.picasso,a=e.model,s=e.app,u=e.translator,l=e.layoutService,c=void 0===l?void 0:l,f=e.createConfig,d=void 0===f?lH:f,h=e.config,p=void 0===h?{}:h,m=e.custom,v=void 0===m?{}:m,g=p.localeInfo,y=p.key,b=p.theme,x=void 0===b?void 0:b,w=p.auto,M=void 0===w?void 0:w,k=p.definitionPath,S=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),C={theme:x,key:y,localeInfo:g,layout:S,hc:null==c||null===(n=c.getHyperCube)||void 0===n?void 0:n.call(c),legendProps:null==c||null===(r=c.getLayoutValue)||void 0===r?void 0:r.call(c,"legend"),colorProps:PB(PB({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:S?oH(S):void 0})},q=rH({picasso:o,model:a,app:s,translator:u,auto:M});!1!==M&&q.auto((function(e){return M?M({layout:e,defaultAuto:uH}):uH(e)}));var E=!1;return{getColor:function(){return q.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return q.resolveUIColor({index:t,color:n})},getData:function(){return q.data()},getDatumProps:function(e){return q.datumProps(e)},getSnapshotData:function(){return q.getSnapshotData(k)},getSettingsForMeasure:function(e){return q.settingsForMeasure(e)},getSettings:function(){return q.settings()},getLegend:function(e,t){return q.legend(e,t)},getScales:function(){return q.scales()},getPalettes:function(){return q.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return q.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return E},custom:PB({},v),initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createConfig,n=void 0===t?d:t,r=n({getUseBaseColors:oH}),i=aH(C,r);q.config(i);var o=q.getAuxiliarySettings(k).then((function(){E=!0}));return o}}}function fH(e){var t=e.chart,n=e.logicalSize;if(n)return n;var r=t?t.element.getBoundingClientRect():{};return{width:r.width,height:r.height}}var dH=[{key:"FULL",size:{width:550,height:450}},{key:"MEDIUM",size:{width:400,height:220}},{key:"SMALL",size:{width:300,height:150}},{key:"XSMALL",size:{width:150,height:75}}];function hH(e){var t=e.width,n=e.height,r=dH.filter((function(e){return t>=e.size.width&&n>=e.size.height})).shift();return r?r.key:"SPARK"}var pH={left:"right",right:"left",top:"bottom",bottom:"top",near:"far",far:"near"};function mH(e){var t=e.orientation,n=e.dock,r=e.btt,i=e.rtl,o="horizontal"===t?function(e){return"bottom"===e||"near"===e?"bottom":"top"}(n):function(e,t){var n="left"===e||"near"===e?"left":"right";return t?pH[n]:n}(n,i),a=function(e,t,n){return"vertical"===e?t?"bottom":"top":n?"right":"left"}(t,r,i);return{current:o,opposite:pH[o],start:a,end:pH[a]}}function vH(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=i.logicalSize,a=void 0!==o&&o,s=i.rtl,u=void 0!==s&&s,l={chart:{size:void 0,mode:void 0},x:{dock:void 0,opposite:void 0,size:void 0},y:{dock:void 0,opposite:void 0,size:void 0}},c={type:"x-y",meta:l,update:function(e){l.chart.size={width:e.width,height:e.height},l.chart.mode=hH(e);var t=mH({orientation:"horizontal",dock:n.getLayoutValue("xAxis.dock"),btt:!1,rtl:u}),r=t.current,i=t.opposite;l.x.dock=r,l.x.opposite=i,l.x.size=e.width;var o=mH({orientation:"vertical",dock:n.getLayoutValue("yAxis.dock"),btt:!0,rtl:u}),a=o.current,s=o.opposite;l.y.dock=a,l.y.opposite=s,l.y.size=e.height}};return c.update(fH({chart:t,logicalSize:a})),c}var gH="vertical",yH="horizontal";function bH(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o,s=i.logicalSize,u=void 0!==s&&s,l=i.rtl,c=void 0!==l&&l,f=a.fallback===gH?gH:yH,d=!!a.invert,h=a.measureAxes||[{ref:"measureAxis",name:"minor"}],p={chart:{orientation:void 0,size:void 0,mode:void 0},major:{orientation:void 0,dock:void 0,opposite:void 0,size:void 0}},m={type:"major-minor",meta:p,update:function(e){p.chart.orientation=n.getLayoutValue("orientation",f),p.chart.size={width:e.width,height:e.height},p.chart.mode=hH(e),p.major.orientation=function(e){var t=e.chartOrientation,n=e.invert;return e.layoutService.meta.isContinuous?yH:n?t===gH?yH:gH:t}({layoutService:n,chartOrientation:p.chart.orientation,invert:d});var t=mH({orientation:p.major.orientation,dock:n.getLayoutValue("dimensionAxis.dock"),btt:!1,rtl:c}),r=t.current,i=t.opposite;p.major.dock=r,p.major.opposite=i,p.major.size=p.major.orientation===gH?e.height:e.width,h.forEach((function(t){var r={};r.orientation=p.major.orientation===gH?yH:gH;var i=mH({orientation:r.orientation,dock:n.getLayoutValue("".concat(t.ref,".dock")),btt:!0,rtl:c}),o=i.current,a=i.opposite,s=i.start,u=i.end;r.dock=o,r.opposite=a,r.start=s,r.end=u,r.size=r.orientation===gH?e.height:e.width,p[t.name]=r}))}};return m.update(fH({chart:t,logicalSize:u})),m}function xH(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o;return("x-y"===a.type?vH:bH)({chart:t,layoutService:n,config:i,typeConfig:a})}function wH(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}function MH(e,t,n){if(void 0!==e&&void 0!==t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}function kH(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function SH(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=kH();return function(r){var i=t(r);return n.has(i)?n.get(i):n.set(i,e(r))}}function CH(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=function(){return e.apply(r,o)};clearTimeout(t),t=setTimeout(s,n)}}function qH(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];n=s;var l=Date.now()-o,c=function(){o=Date.now(),r=0,e.apply(t,n)};r||(l>=i?c():r=setTimeout(c,i-l))}}function EH(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[]).map((function(e){var t,n=null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal;if(n)return n;var r=e.qStateCounts||{},i=r.qLocked,o=void 0===i?0:i,a=r.qOption,s=void 0===a?0:a,u=r.qSelected;return o+s+(void 0===u?0:u)}))}function TH(e){switch(e.qHyperCube.qMode){case"S":return function(e){var t=e.qHyperCube.qSize;return{refs:{dataPages:"qHyperCube.qDataPages"},size:{x:t.qcx,y:t.qcy,dimensions:EH(e)}}}(e);case"K":return function(e){var t=EH(e);return{refs:{dataPages:"qHyperCube.qStackedDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);case"T":return function(e){var t=EH(e);return{refs:{dataPages:"qHyperCube.qTreeDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);default:throw new Error("Mode not supported")}}function DH(e){var t=e.source,n=e.metaAdditionsFn,r=GB(!0,{},t),i=TH(r),o=function(){return function(e){var t=e.layout,n=e.additionsFn,r=void 0===n?function(){return{}}:n,i=e.additionsProps,o=void 0===i?{}:i,a=t.qHyperCube,s=a.qDimensionInfo,u=a.qMeasureInfo,l=a.qMode,c=s.length,f=u.length,d=PB({mode:{S:"S"===l,P:"P"===l,K:"K"===l,T:"T"===l},dimensionCount:c,measureCount:f,hasMultipleDimensions:c>1,hasMultipleMeasures:f>1,isOneDimensional:1===c,isTwoDimensional:2===c},o);return PB(PB({},d),r({layout:t,meta:d}))}({layout:r,additionsFn:n,additionsProps:{size:i.size}})},a={refs:PB({},i.refs),meta:o(),getLayout:function(){return r},getLayoutValue:function(e,t){return wH(r,e,t)},setLayoutValue:function(e,t){MH(r,e,t),i=TH(r),a.meta=o()},getHyperCube:function(){return r.qHyperCube},getHyperCubeValue:function(e,t){return wH(r.qHyperCube,e,t)},setHyperCubeValue:function(e,t){MH(r.qHyperCube,e,t),i=TH(r),a.meta=o()},getDataPages:function(){return wH(r,i.refs.dataPages)},setDataPages:function(e){MH(r,i.refs.dataPages,e),a.meta=o()}};return a}function OH(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n})),n>-1?t[n]=e:t.push(e)})),t):n}function NH(e){return(NH="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}function _H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function IH(e,t,n){return t&&AH(e.prototype,t),n&&AH(e,n),e}function PH(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LH(Object(n),!0).forEach((function(t){PH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jH(e,t){return(jH=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zH(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function FH(e,t,n){return(FH=zH()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&jH(i,n.prototype),i}).apply(null,arguments)}function BH(e){return function(e){if(Array.isArray(e))return HH(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||VH(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VH(e,t){if(e){if("string"==typeof e)return HH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?HH(e,t):void 0}}function HH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var UH=Object.prototype.hasOwnProperty,WH=Object.prototype.toString,YH=Object.defineProperty,KH=Object.getOwnPropertyDescriptor,$H=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===WH.call(e)},GH=function(e){if(!e||"[object Object]"!==WH.call(e))return!1;var t,n=UH.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&UH.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||UH.call(e,t)},XH=function(e,t){YH&&"__proto__"===t.name?YH(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},JH=function(e,t){if("__proto__"===t){if(!UH.call(e,t))return;if(KH)return KH(e,t).value}return e[t]},QH=function e(){var t,n,i,o,a,s,u=arguments[0],l=1,c=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},l=2),(null==u||"object"!=r(u)&&"function"!=typeof u)&&(u={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=JH(u,n),u!==(o=JH(t,n))&&(f&&o&&(GH(o)||(a=$H(o)))?(a?(a=!1,s=i&&$H(i)?i:[]):s=i&&GH(i)?i:{},XH(u,{name:n,newValue:e(f,s,o)})):void 0!==o&&XH(u,{name:n,newValue:o}));return u};function ZH(e,t,n){if(!e)return-1;var r=n.cache,i=e.origin?e.origin():null;i&&(e=i);var o=r.fields.indexOf(e),a=-1,s=-1;if(-1===o)for(var u=0;u<r.wrappedFields.length;u++)if(s=r.wrappedFields[u].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[u].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){o=u;break}return(o-=t.qArea.qLeft)<0||o>=t.qArea.qWidth?-1:s>=0?function(e){return e[o].qAttrDims.qValues[s]}:a>=0?function(e){return e[o].qAttrExps.qValues[a]}:function(e){return e[o]}}function eU(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function tU(e){var t=e.cache,n=e.f,r=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,s=e.row,u=e.sourceKey,l=e.target,c=e.targetProp,f=r;if(i.field&&i.field!==n){var d=ZH(i.field,o,{cache:t});if(-1===d)return;f=QH({qRow:a},d(s))}l[c]=eU(i,f,{key:u})}function nU(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){for(var s=t.raw(),u=t.key(),l="object"===NH(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),f=c.props,d=c.main,h=Object.keys(f),p=!!i[a].trackBy,m=NH(i[a].trackBy),v={},g=[],y=[],b=0;b<s.qDataPages.length;b++){var x=ZH(l,s.qDataPages[b],{cache:n});if(-1!==x)for(var w=0;w<s.qDataPages[b].qMatrix.length;w++){var M=s.qDataPages[b].qArea.qTop+w,k=QH({qRow:M},x(s.qDataPages[b].qMatrix[w])),S=eU(d,k,{key:u});if(!d.filter||d.filter(k)){for(var C=0;C<h.length;C++){var q=f[h[C]],E=q.fields||[q];q.fields&&(S[h[C]]=[]);for(var T=0;T<E.length;T++)tU({cache:n,f:l,mainCell:k,p:E[T],prop:h[C],props:f,page:s.qDataPages[b],rowIdx:M,row:s.qDataPages[b].qMatrix[w],sourceKey:u,target:q.fields?S[h[C]]:S,targetProp:q.fields?T:h[C]});if(q.fields){var D=S[h[C]].map((function(e){return e.value})),O=S[h[C]].map((function(e){return e.label}));S[h[C]]={value:"function"==typeof q.value?q.value(D):void 0!==q.value?q.value:D,label:"function"==typeof q.label?q.label(O):void 0!==q.label?String(q.label):String(S[h[C]].value)}}}p&&r.track({cfg:i[a],itemData:k,obj:S,target:g,tracker:v,trackType:m}),y.push(S)}}}p?o.push.apply(o,BH(r.collect(g,{main:d,propsArr:h,props:f}))):o.push.apply(o,y)}return o}function rU(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function iU(e,t){var n,r,i,o,a,s=new uU(e),u=+e.value&&(s.value=e.value),l=[s];for(null==t&&(t=oU);n=l.pop();)if(u&&(n.value=+n.data.value),(i=t(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new uU(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(sU)}function oU(e){return e.children}function aU(e){e.data=e.data.data}function sU(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function uU(e){this.data=e,this.depth=this.height=0,this.parent=null}function lU(e){if("function"!=typeof e)throw new Error;return e}uU.prototype=iU.prototype={constructor:uU,count:function(){return this.eachAfter(rU)},each:function(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return iU(this).eachBefore(aU)}};var cU={depth:-1},fU={};function dU(e){return e.id}function hU(e){return e.parentId}function pU(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),i=t,o=0;o<r.length;o++){if("*"===r[o]&&Array.isArray(i)){var a=[];n=r.slice(o+1).join("/");for(var s=0;s<i.length;s++){var u=pU(n,i[s]);Array.isArray(u)?a.push.apply(a,BH(u)):a.push(u)}return a}if(!r[o]&&Array.isArray(i)){var l=new Array(i.length);n=r.slice(o+1).join("/");for(var c=0;c<i.length;c++)l[c]=pU(n,i[c]);return l}r[o]in i&&(i=i[r[o]])}return i}function mU(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var i=n>=0?[e[n]]:e;r.push.apply(r,BH(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&r.push.apply(r,BH(mU(e[o].children,t-1,n)));return r}function vU(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),i=BH(Array(r)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(i,";"))}if(t>e){var o=Math.max(0,Math.min(100,t-e));return function(e){return mU(e.children,o-1,n)}}return!1}function gU(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var i=0;i<r.length;i++)if(e(r[i]))return r[i];return!1}if("string"==typeof e){for(var o=0;o<r.length;o++)if(r[o].key()===e||r[o].title()===e)return r[o]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var yU=/^qDimensionInfo(?:\/(\d+))?/,bU=/^\/?qMeasureInfo\/(\d+)/,xU=/\/qAttrExprInfo\/(\d+)/,wU=/\/qAttrDimInfo\/(\d+)/;function MU(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function kU(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,u=-1,l=-1,c=r,f=n.qEffectiveInterColumnSortOrder,d=MU(n);return yU.test(c)&&(i=!0,o=+yU.exec(c)[1],c=r.replace(yU,"")),bU.test(c)&&("K"===n.qMode?u=+bU.exec(c)[1]:f&&-1!==f.indexOf(-1)?(u=+bU.exec(c)[1],l=0):l=+bU.exec(c)[1],c=c.replace(bU,"")),c&&(wU.exec(c)?s=+wU.exec(c)[1]:xU.exec(c)&&(a=+xU.exec(c)[1])),{fieldDepth:(i?"S"===n.qMode?d[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:u,measureIdx:l,attrDimIdx:s,attrIdx:a}}function SU(e,t){var n,r,i=vU(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function CU(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function qU(e){for(var t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var u=n[t[s]],l=u.fields||[u],c=void 0,f=void 0;u.fields&&(c=[],f=[]);for(var d=function(e){var n=l[e],d=void 0,h=void 0,p=void 0,m=void 0,v=void 0,g=void 0;if("primitive"===n.type?(p=n.value,g=String(n.value)):("function"==typeof n.value&&(d=function(e){return n.value(e,r)}),"function"==typeof n.label&&(h=function(e){return n.label(e,r)}),n.accessor?(m=n.accessor(r),Array.isArray(m)?(v=m.map(n.valueAccessor),n.attrAccessor&&(v=v.map(n.attrAccessor)),d&&(p=v.map(d),d=null),h&&(g=v.map(h),h=null),p=n.reduce?n.reduce(p):p,g=n.reduceLabel?n.reduceLabel(g,p):String(p)):g=p=n.attrAccessor?n.attrAccessor(n.valueAccessor(m)):n.valueAccessor(m)):(p=i,g=i)),u.fields){var y=d?d(p):p;c.push(y),f.push(h&&null!=g?h(g):null!=g?g:String(y))}else{var b=d?d(p):p;o[t[s]]={value:b,label:h?h(g):null!=g?g:String(b)},n.field&&(o[t[s]].source={field:n.field.key(),key:a})}},h=0;h<l.length;h++)d(h);c&&(o[t[s]]={value:"function"==typeof u.value?u.value(c,r):c,label:"function"==typeof u.label?u.label(f,r):f})}}var EU=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=pU(r,e);return o&&o[0]?(t.tree=iU(o[0],n.children||function(e){return e[i]}),t.tree):null};function TU(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),i=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),o=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var u=t[s],l="__root",c=!1,f=0;f<i.length;f++){var d=u[i[f]],h="".concat(l,"__").concat(d.qText);a[h]||(a[h]=RH({__id:h,__parent:l,qValues:[]},d),c=!0),l=h}if(c)for(var p=0;p<o.length;p++){var m=u[o[p]];a[l].qValues.push(m)}}var v=Object.keys(a).map((function(e){return a[e]}));return function(){var e=dU,t=hU;function n(n){var r,i,o,a,s,u,l,c=n.length,f=new Array(c),d={};for(i=0;i<c;++i)r=n[i],s=f[i]=new uU(r),null!=(u=e(r,i,n))&&(u+="")&&(d[l="$"+(s.id=u)]=l in d?fU:s);for(i=0;i<c;++i)if(s=f[i],null!=(u=t(n[i],i,n))&&(u+="")){if(!(a=d["$"+u]))throw new Error("missing: "+u);if(a===fU)throw new Error("ambiguous: "+u);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=cU,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(sU),o.parent=null,c>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=lU(t),n):e},n.parentId=function(e){return arguments.length?(t=lU(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(v)}var DU=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var u=n[t[s]],l=u.fields?u.fields:[u],c=0;c<l.length;c++){var f=l[c];if(f.field!==a){var d=SU(o,kU(f.field,{cube:r,cache:i}));f.accessor=d.nodeFn,f.valueAccessor=d.valueFn,f.attrAccessor=d.attrFn}}};function OU(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=t.raw(),o=t.key(),a="S"===i.qMode?TU(t):EU(i,n,e);if(!a)return null;for(var s=a.height,u=[],l=0;l<=s;l++){var c=null;if(l>0)if("S"===i.qMode){var f=MU(i),d=f[l-1];c=n.fields[d]}else{var h=i.qEffectiveInterColumnSortOrder[l-1];l>i.qEffectiveInterColumnSortOrder.length&&(h=i.qDimensionInfo.length),c=n.fields[h]}var p=r.normalizeConfig(RH(RH({},e),{},{field:c?c.key():void 0}),t),m=p.props,v=p.main,g=Object.keys(m);u[l]={propsArr:g,props:m,main:v};var y=c?kU(c,{cube:i,cache:n}):{fieldDepth:0};DU({propsArr:g,props:m,cube:i,cache:n,itemDepthObject:y,f:c})}for(var b=a.copy(),x=b.descendants(),w=a.descendants(),M=0;M<w.length;M++){var k=u[w[M].depth].propsArr,S=u[w[M].depth].props,C=u[w[M].depth].main,q=x[M],E=q.data,T=CU(C,E,{key:o});qU({propsArr:k,props:S,item:q,itemData:E,ret:T,sourceKey:o,isTree:!0}),w[M].data=T}return a}function NU(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){var s=t.raw(),u=t.key();if(!EU(s,n,e))continue;var l="object"===NH(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),f=c.props,d=c.main,h=Object.keys(f),p=kU(l,{cube:s,cache:n}),m=SU({fieldDepth:0},p),v=m.nodeFn,g=m.attrFn,y=m.valueFn;DU({propsArr:h,props:f,cube:s,cache:n,itemDepthObject:p,f:l});for(var b=!!i[a].trackBy,x=NH(i[a].trackBy),w={},M=[],k=v(n.tree),S=[],C=0;C<k.length;C++){var q=k[C],E=g?g(y(q)):y(q);if(!d.filter||d.filter(E)){var T=CU(d,E,{key:u});qU({propsArr:h,props:f,item:q,itemData:E,ret:T,sourceKey:u}),b&&r.track({cfg:i[a],itemData:E,obj:T,target:M,tracker:w,trackType:x}),S.push(T)}}b?o.push.apply(o,BH(r.collect(M,{main:d,propsArr:h,props:f}))):o.push.apply(o,S)}return o}var _U,AU=(function(e){
|
|
17
|
+
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
18
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,u,l,c,f,d=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),v=m.search(/[0-9\-\+#]/),g=d-v,y=e.substring(g,g+1),b=g+("."===y||","===y?1:0),x=v>0?e.substring(b,d):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;l[0].length<e[0].length-a;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],u=c[1]&&c[c.length-1].length){for(m="",g=(f=t[0]).length%u,d=f.length,b=0;b<d;b++)m+=f.charAt(b),!((b-g+1)%u)&&b<d-u&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}}(_U={exports:{}}),_U.exports);function IU(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var PU={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},LU=/%$/,RU=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,jU=/^\(oct\)/i,zU=/^\(dec\)/i,FU=/^\(hex\)/i,BU=/^\(bin\)/i,VU=/^\(rom\)/i,HU=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,UU=/#|0/g;function WU(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function YU(e,t,n){var r=IU(e);return n?r:new RegExp(r||"",t)}function KU(e,t,n){var r,i,o,a,s,u,l,c,f,d,h,p=e.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),e.abbreviate=!0),d=t,(h=n)&&(h=IU(h)),d&&(d=IU(d)),f=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(h,"[#0]+)?")),a=(o=(o=p.match(f))?o[0]:"")?p.substr(0,p.indexOf(o)):p,s=o?p.substring(p.indexOf(o)+o.length):"",o||(o=p?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(o=o.replace(YU(u,"g"),t)),l=n,n=".",l&&(o=o.replace(YU(l,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var m,v=p.split(l);v[1]&&(m=v[1].match(UU)),e.prefix=a||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=m?m.length:2,e.percentage=LU.test(p),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(YU(t,null,!0),"|").concat(YU(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=n,e.temp=c}var $U=function(){function e(t,n,r,i,o){_H(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return PU;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return IH(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],HU.test(e[0])&&(r.positive.isFunctional=!0),e[1]?HU.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?HU.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||KU(r.positive,t,n),r.negative&&!r.negative.isFunctional&&KU(r.negative,t,n),r.zero&&!r.zero.isFunctional&&KU(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,s,u,l,c=this._prepared,f="",d="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=function(e,t,n){var r;return RU.test(t)?e=WU(e,Number(/\d{2}/.exec(t)[0]),t,n):jU.test(t)?e=WU(e,8,t,n):zU.test(t)?e=WU(e,10,t,n):FU.test(t)?e=WU(e,16,t,n):BU.test(t)?e=WU(e,2,t,n):VU.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var p,m,v=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),g=v[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);g<=n&&s<v.length;)g=v[++s];s>0&&(p=v[s-1]),p&&n>0&&p>0?m=p:(n<0&&p<0||!p)&&(g<0&&g-n<=c.maxPrecision?m=g:p<=n&&!(g>0&&-n<=c.maxPrecision)&&(m=p)),m&&(f=this.abbreviations[m],e/=Math.pow(10,m))}if(r=Math.abs(e),t=c.temp,l=(u=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==u.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var y=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=u.split(o)[0];if(e=AU(b+=o,y)||"0",l){var x=Math.max(0,Math.min(14,l.length)),w=l.replace(/#+$/,"").length,M=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=M.length;s<w;s++)M+="0";M&&(e+=o+M)}else 0===y&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),d=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(u+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)u+="#";e=AU(u,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+d+f+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function GU(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,u=r.toKey,l=void 0===u?function(e){return e}:u,c=Object.create(null),f=Object.create(null),d=0,h=0;return(t=s?function(){return n=l.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=l(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return d>=o&&(delete c[f[h]],delete f[h],d--,h++),c[e]=t,f[d]=e,d++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),f=Object.create(null),d=0,h=0},t.size=function(){return d},t}function XU(e,t,n,r,i){var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return FH($U,t)}(i,e,t,n,r),a=GU(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var JU=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],QU=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ZU=["January","February","March","April","May","June","July","August","September","October","November","December"],eW=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function tW(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function nW(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var rW=function(){function e(t,n,r){_H(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:JU,qDayNames:QU,qLongMonthNames:ZU,qMonthNames:eW}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n||(n=(PH(i={},"T",o.qTimeFmt||"hh:mm:ss"),PH(i,"D",o.qDateFmt||"YYYY-MM-DD"),PH(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]),this.pattern=n}return IH(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,i,o,a,s=/t+/gi.test(t);e instanceof Date?(i=s,o=(r=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:o,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*nW(t),r=60*nW(n),i=60*nW(r),o=1e3*nW(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,u=r.f,l=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(l=n?n.getDay()-1:0)<0&&(l=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:s,f:u,t:c}}(e,t));var u=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:tW("".concat(t.year).slice(-2),2),YYY:tW("".concat(t.year).slice(-3),3),def:function(e){return tW("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:tW("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:tW("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return tW("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return tW("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return tW("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return tW("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),l=[];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&l.push(c);var f=new RegExp(l.join("|"),"g");return t.replace(f,(function(e){var t,n,r;for(n in u)if(Object.prototype.hasOwnProperty.call(u,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var i in u[n])if(i===e||i.toLowerCase()===e){void 0===(r=u[n][i])&&(r=u[n][i.toLowerCase()]);break}return void 0===r&&(r=u[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function iW(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return FH(rW,t)}function oW(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function aW(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=iW(n,e,t),i=GU(r.format.bind(r),{toKey:function(e){return"object"===NH(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return"IV"!==t?oW(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=iW(n,e,t),i=GU(r.format.bind(r),{toKey:function(e){return"object"===NH(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function sW(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return aW(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##A"),o="U"),XU(n,r,i,o,t)}function uW(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,u=t.type,l=t.sourceField,c=s||("dimension"===u?function(e){return e.qElemNo}:function(e){return e.qValue}),f=function(e){return e.qText||""},d="dimension"===u?"first":"avg",h=sW(n,o),p="dimension"===u?"first":function(e,t){return h(t)},m={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return u},origin:function(){return l},items:function(){return e||(e=a(m)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:f,reduce:d,reduceLabel:p,formatter:function(){return h},tags:function(){return n.qTags}};return m}function lW(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:uW(QH({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=lW("qAttrDimInfo",t,n,a,QH({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=lW("qAttrExprInfo",t,n,a,QH({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=lW("qMeasureInfo",t,n,a,QH({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function cW(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,o=r.data,a=r.config,s=void 0===a?{}:a,u={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},l=o;if(!l)throw new Error('Missing "data" input');if(!l.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=cW.util,f={cache:u,cube:l,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},d={key:function(){return i},raw:function(){return l},field:function(e){return gU(e,f)},fields:function(){return u.fields.slice()},extract:function(e){return f.extractor(e,d,u,c)},hierarchy:function(e){return f.hierarchy(e,d,u,c)},_cache:function(){return u}};"K"===l.qMode||"T"===l.qMode||!l.qMode&&l.qNodesOnDim?(f.extractor=NU,f.hierarchy=OU,f.pages="K"===l.qMode?l.qStackedDataPages:l.qTreeDataPages):"S"===l.qMode?(f.extractor=nU,f.pages=l.qDataPages,f.hierarchy=OU):f.extractor=function(){return[]},f.fieldExtractor=function(e){return f.extractor({field:e},d,u,c)};var h="S"===l.qMode?function(e){return e.qElemNumber}:void 0,p="S"===l.qMode?function(e){return e.qNum}:void 0;(e=u.wrappedFields).push.apply(e,BH(lW("qDimensionInfo",l,i,"",QH({},f,{value:h,type:"dimension"})))),(t=u.wrappedFields).push.apply(t,BH(lW("qMeasureInfo",l,i,"",QH({},f,{value:p,type:"measure"})))),u.fields=u.wrappedFields.map((function(e){return e.instance}));var m=function e(t){t.forEach((function(t){u.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return m(u.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=d.field(e.from),n=uW(RH({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return f.extractor({field:e},d,u,c)},key:e.key,type:t.type(),localeInfo:f.localeInfo,value:t.value},e.override||{}));u.virtualFields.push(n)})),(n=u.allFields).push.apply(n,BH(u.virtualFields)),d}var fW=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],dW=/\/qDimensionInfo(?:\/(\d+))?/,hW=/\/qMeasureInfo\/(\d+)/,pW=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,mW=/\/qAttrExprInfo\/(\d+)/,vW=/\/?qHyperCube/,gW=/\/?qTreeData/,yW=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},bW=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function xW(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};vW.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=yW):gW.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=bW);var s=!0;if(dW.test(e)&&(r=+dW.exec(e)[1]),hW.test(e)&&(i=+hW.exec(e)[1]),pW.test(e)){i=-1,r=0;var u=+pW.exec(n)[2];isNaN(u)||(r=u,n=n.replace(/\/\d+$/,"")),s=!1}if(mW.test(e)){var l=i;if(t){i=0;var c=pU(o,t);i+=(c.qMeasureInfo||[]).length,r>-1?(i=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,l).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+mW.exec(n)[1]}else r>-1?(r=-1,i=+mW.exec(n)[1]):i+=+mW.exec(n)[1]+1}return fW.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||VH(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],i=t[1];n=n.replace(r,i)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function wW(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},u=e.isActive(),l=!1;return e.brushes().forEach((function(e){var t=xW(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(l=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var u=e.brush.ranges();u.length&&(l=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),u.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(l=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var f=r.qHyperCube,d=f.qNoOfLeftDims,h=f.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var p=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===d||h>=d)&&d>-1?p.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:h-d})})):p.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),l=!!s.selectHyperCubeCells.values.length);else{var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));l=!!m.length,a.push({params:[t.path,t.dimensionIdx,m,!1],method:"selectHyperCubeValues"})}}})),!l&&u?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function MW(e){cW.util=e.data("matrix").util,e.data("q",cW),e.formatter("q-number",XU),e.formatter("q-time",aW)}function kW(e){var t=wH(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function SW(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===OB(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function CW(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}MW.qBrushHelper=wW,MW.selections=wW;var qW="Shift";function EW(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;r.forEach((function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var u=e.filter((function(e){return-2!==e.value}));return u.length>1?function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=kW({layout:n,path:e}),r=i.filter((function(t){return t.key===e})),o=t?[r.pop()]:r;a.push.apply(a,jB(o))})),a.filter(Boolean)}({layout:s,values:u}):u},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var TW=[],DW=0,OW=function(e){var t=TW.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))},NW=function(){document.addEventListener("keyup",OW)},_W=function(){document.removeEventListener("keyup",OW)},AW=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},IW=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function PW(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function LW(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,u=e.emit,l=void 0===u?"rangeClear":u,c=r.event===i,f=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!f)return!1;var d=t.component(o);return!!d&&(d.emit(l),"string"==typeof s&&t.brush(s).clear(),d)}function RW(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,u=e.cleared;return LW({selectionInfo:t,chart:n,document:r,eventName:void 0!==u&&u?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}function jW(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,u=e.cleared;return LW({selectionInfo:t,chart:n,document:r,eventName:void 0!==u&&u?void 0:o,componentName:s,brushName:e.brushName})}function zW(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,u=e.cleared,l=void 0!==u&&u,c=e.brushName,f=LW({selectionInfo:t,chart:n,document:r,eventName:l?void 0:s,componentName:o,brushName:void 0!==c&&c});if(f){var d=f.settings.settings,h=d.scale,p=d.brush,m=n.scale(h).data().fields.map((function(e){return e.id()})),v=n.brush(p),g=v.brushes().filter((function(e){return"range"===e.type&&m.some((function(t){return t===e.id}))}));v&&g.length&&g.forEach((function(e){v.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function FW(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;LW({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}function BW(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(n&&o.includes(n.event)){var u=n.currentComponent;n.previousComponent!==u&&(r.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function VW(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,u=void 0===s?"legend-range-brush":s,l=e.cleared,c=void 0!==l&&l,f=e.brushName;LW({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:u,brushName:void 0!==f&&f})&&i.clear()}var HW=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=LB(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function UW(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function WW(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,u=e.selectionEvents;if(!1===i||!1===u)return function(){};var l=(a||{}).lasso,c=void 0!==l&&l,f=i.reset,d=void 0===f?UW:f,h=i.clear,p=!1!==h&&function(e){var t=e.clear,n=void 0===t?HW:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(PB({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return RW(PB(PB({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return jW(PB(PB({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return zW(PB(PB({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return FW(PB(PB({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return BW(PB(PB({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return VW(PB(PB({},t),e))}},t))}}({clear:h,selections:s,selectionInfo:r,chart:n}),m=function(e){var t=e.chart,n=e.lasso,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:p,reset:d,lasso:c}),v={};Object.entries(m).forEach((function(e){var t=RB(e,2),n=t[0],r=t[1];v[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,u[n])}));var g=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,u={selections:n,selectionInfo:r,chart:o,document:a},l=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(PB(PB({},void 0===t?{}:t),{},{event:r,components:o.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:i,chart:o,selectionInfo:r,setSelectionInfo:l})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(PB(PB({defaultFunc:c({event:e,components:t}),setSelectionInfo:l,clear:i},u),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:u,selections:s,selectionInfo:r,clear:p,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",g),Object.entries(v).forEach((function(e){var t=RB(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",g),Object.entries(v).forEach((function(e){var t=RB(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var YW=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function KW(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,u=o.majorScale,l=void 0===u?void 0:u,c=o.selectionActions,f=(c=void 0===c?{}:c).clear,d=c.reset,h=o.selectionEvents,p=void 0===h?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:h,m=o.brushEvents,v=void 0===m?{}:m,g=o.brushName,y=void 0===g?"selection":g,b=o.brushMaxListeners,x=void 0===b?20:b,w=o.brushRanges,M=void 0!==w&&w,k=o.interceptors,S=void 0===k?{}:k,C=t.brush(y);if("number"==typeof x&&C.setMaxListeners(x),M){var q=!0===M?YW:M;C.configure({ranges:q})}var E={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},T=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.picassoQ,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,u=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var l=++DW,c=null,f=[],d={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var h=EW({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:f}}}),p=h.rangeInterceptor,m=h.interceptor;r.intercept("set-ranges",p),r.intercept("toggle-ranges",p),r.intercept("toggle-values",m),r.intercept("set-values",m),r.intercept("add-values",m),r.on("start",(function(){return n.begin(u)}));var v={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};AW(n,v);var g=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(d=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){a.selections(r,d,c).forEach((function(e){PW(e,o.select.brushSelectionIncludeMax,g),n.select(e)}))}))):r.on("update",(function(){a.selections(r,d,c).forEach((function(e){return n.select(e)}))})),0===TW.length&&NW(),TW.push({key:l,selections:n}),{layout:function(e){c=e},allowSimultaneous:function(e){f=e},release:function(){c=null;var e=TW.indexOf(TW.filter((function(e){return e.key===l}))[0]);-1!==e&&TW.splice(e,1),TW.length||_W(),IW(n,v)}}}({brush:C,majorScale:l,actions:n,selections:r,picassoQ:i});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=RB(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(r,e)}))}))}({brush:C,interceptors:S});var D=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,u=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map((function(e){var i=RB(e,2),o=i[0],a=i[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(o,s),[o,s]}));return function(){a.forEach((function(e){var n=RB(e,2),r=n[0],i=n[1];t.removeListener(r,i)}))}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),l=WW({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==qW||(t.lasso.action(!0),n=!0)},i=function(e){e.key===qW&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){u(),l(),c()}}({chart:t,brush:C,actions:n,selections:r,selectionInfo:E.selectionInfo,selectionActions:{clear:f,reset:d},selectionEvents:p,brushEvents:v});if(s){var O=!0===s?jB(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;T.allowSimultaneous(O)}return{unbindEvents:D,state:E,picassoSelections:T,brush:C}}function $W(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,s=KW({chart:t,actions:i,selections:n,picassoQ:MW,config:a}),u=s.unbindEvents,l=s.state,c=s.picassoSelections,f=s.brush,d=a.custom,h=void 0===d?{}:d,p=a.legendAlias,m=void 0===p?void 0:p,v=a.setBrushAliases,g=void 0===v?CW:v;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return l.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:SW(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.singleSelectIndex;return l.singleSelectDimensions[e]},getCanSelect:function(){return l.canSelect},getSelectionInfo:function(){return l.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var u=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,l=void 0===u?[]:u;return s.lockedDimensions=l.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=l.map((function(e,t){return kW({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===l.length||l.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=l[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:c,layout:e});Object.assign(l,t)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=LB(e,["colorField","useLegendCube"]),o=PB({useLegendCube:r,colorField:t,brush:f,legendAlias:m},i);g(PB(PB({},o),{},{defaultFunc:function(){return CW(o)}}))},destroy:function(){u(),c.release()},custom:PB({},h)}}var GW="QlikView Sans, sans-serif",XW="#737373",JW="#cccccc",QW="#e6e6e6";function ZW(e){var t={};return[].concat(jB(e),jB([["","","color"],["object","axis.title","fontFamily",GW],["object","axis.title","fontSize","13px"],["object","axis.title","color"],["object","axis.label.name","fontFamily",GW],["object","axis.label.name","fontSize","12px"],["object","axis.label.name","color","#595959"],["object","axis.line.major","color",JW],["object","axis.line.minor","color",QW],["object","grid.line.major","color",JW],["object","grid.line.minor","color",QW],["object","grid.line.highContrast","color",QW],["object","referenceLine.label.name","fontFamily",GW],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.label.name","color","#333333"],["object","referenceLine.outOfBounds","fontFamily",GW],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","color",QW],["object","referenceLine.outOfBounds","backgroundColor",XW,function(e){return"transparent"===e?XW:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}function eY(e,t){var n={};return e.forEach((function(e){var r=RB(e,5),i=r[0],o=r[1],a=r[2],s=r[3],u=r[4],l=(void 0===u?function(e){return e}:u)(function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(!e||!1===t)return i;var o=e.getStyle(t,n,r);return void 0===o?i:o}(t,i,o,a,s));MH(n,[o,a].filter(Boolean).join("."),l)})),n}var tY={created:function(){this.state={}},beforeUpdate:function(){this.state={}},beforeRender:function(e){var t=e.size;this.state.ticks=this.scale.ticks({distance:t.width}).filter((function(e){return!e.isMinor})),"linear"===this.scale.type&&function(e,t){for(var n=y(e.domain(),2)[1],r=0;r<t.length;r++){var i=t[r],o=t[r+1];i.data={},o||1===i.end?o?(i.data.start=i.value,i.data.end=o.value,i.end=o.position):(i.data.start=i.value,i.data.end=i.value):(i.data.start=i.value,i.data.end=n,i.end=1)}}(this.scale,this.state.ticks)},render:function(){var e=this,t=this.scale.data().fields.length?this.scale.data().fields[0].id():"",n=this.state.ticks,r=n.map((function(n){return{type:"rect",fill:"none",data:{source:{field:t},value:[n.data.start,n.data.end]},x:n.start*e.rect.width,y:0,width:(n.end-n.start)*e.rect.width,height:e.rect.height}}));if(n.length&&n[0].start>0){var i=n[0];r.unshift({type:"rect",fill:"none",data:{source:{field:t},value:[this.scale.domain()[0],i.data.start]},x:0,y:0,width:i.start*this.rect.width,height:this.rect.height})}return r}};function nY(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(t%2==0)return e;var n=Math.round(e),r=e-n;return r>0?n+=.5:n-=.5,n}function rY(e,t){var n=t.localProps.size,r=t.props.anchor,i=function(e){var t=e.props,n=e.localProps.size,r=e.style,i=e.renderer,o=t.label.padding,a=Math.max(0,Math.min(t.label.justify,1)),s=Math.max(0,Math.min(t.label.align,1)),u=function(e){return i.measureText({text:e,fontSize:r.label.fontSize,fontFamily:r.label.fontFamily})};return{resolve:function(e,t){var i="string"==typeof e.label?e.label:"",l=u(i),c=t.x,f=t.width;e.start===e.end&&(f=l.width+2*o,1===e.end&&(c-=f));var d={x:c+o,y:o,width:f-2*o,height:n.height-2*o},h=u("".concat(i[0]).concat("…")).width,p=Math.max(0,d.width-l.width),m=Math.max(0,d.height-l.height),v=a*p,g=s*m;return{show:d.width>=Math.min(h,l.width),text:i,dx:v,dy:g,rect:d,style:r.label,segment:{x:c+v,width:l.width+2*o}}}}}(t),o=function(e){var t=e.localProps.size,n=e.style,r=e.scale,i=e.props,o=y(r.domain(),2),a=o[0],s=o[1],u=Math.max(0,Math.min(1,i.guideLine.major.justify));return{resolve:function(e,r){var i=u*r.width,o=nY(r.x+i,n.majorGuideLine.strokeWidth);return{show:e.value>=a&&e.value<=s,x1:o,y1:0,x2:o,y2:nY(t.height,n.majorGuideLine.strokeWidth),style:n.majorGuideLine}}}}(t),a=e.map((function(e){var t=function(e,t,n){var r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){var n=e.length;if(!(n<2)){var r,i,o=e[n-1],a=t[n-1].label;if(o&&o.start===o.end)for(var s=n-2;s>-1;s--){var u=t[s].label;u.show=u.show&&(r=u.segment,i=a.segment,!(r.x<i.x?r.x+r.width>=i.x:i.x+i.width>=r.x))}}}(e,a),a}function iY(e,t){var n=function(e){var t=e.localProps.size,n=e.props,r=e.style;return{resolve:function(e){var i=Math.max(t.height-n.guideLine.minor.size,0)*Math.max(0,Math.min(n.guideLine.minor.align,1)),o=nY(e.position*t.width,r.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:nY(i,r.minorGuideLine.strokeWidth),x2:o,y2:nY(n.guideLine.minor.size+i,r.minorGuideLine.strokeWidth),style:r.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function oY(e){return e.filter((function(e){return e.show})).map((function(e){return Tg({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2})}))}var aY={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:function(){return{size:30,edgeBleed:{left:1,right:1}}},init:function(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created:function(){this.init()},beforeUpdate:function(){this.init()},beforeRender:function(e){var t=e.size;this.localProps.size=t;var n=this.scale.ticks({distance:t.width}),r=n.filter((function(e){return!e.isMinor})),i=n.filter((function(e){return e.isMinor}));this.state.line=function(e){var t=e.localProps.size,n=e.style,r=e.props,i=nY(1,n.line.strokeWidth);return{show:r.line.show,x1:nY(0,n.line.strokeWidth),y1:i,x2:nY(t.width,n.line.strokeWidth),y2:i,style:n.line}}(this),this.state.major=rY(r,this),this.state.minor=iY(i,this)},render:function(){return[].concat(b(oY([this.state.line])),b(this.state.major.map((function(e){return e.label})).filter((function(e){return e.show})).map((function(e){return Tg({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge"})}))),b(oY(this.state.major.map((function(e){return e.guideLine})))),b(oY(this.state.minor.map((function(e){return e.guideLine})))))}};function sY(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every((function(e,n){return e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd}))}function uY(e){return e.qTags.indexOf("$qualified")>-1}function lY(e){for(var t=e.qAxis,n=[],r=[],i=0;i<t.length;i++){var o=i+1,a=t[i],s=t[o];sY(a,s)?(uY(s)?(n.push(o),r.push(i)):(n.push(i),r.push(o)),i++):(n.push(i),r.push(i))}return{qualified:n,nonQualified:r}}function cY(e){var t=e.qualifiedMeta,n=e.nonQualifiedMeta;return{resolve:function(e){for(var r,i=NaN,o=NaN,a=NaN,s=!1,u=t.length-1;u>=0;u--){var l=t[u];if(l.queries.outer(e)){var c=n[u+1];if(i=l.index,r=u,l.attrs.isDayOrShorter()&&l.queries.canFitHalfDayTicks(e)){o="auto",s=!0;break}if(c&&c.queries.inner(e)){o=c.index;var f=n[u+2];f&&f.queries.minor(e)&&(a=f.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;var d=n[r+1];d&&d.queries.minor(e)&&(a=d.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function fY(e){var t=e.qTicks,n=e.measureText,r=void 0===n?function(){return{width:0}}:n,i=e.cache,o=void 0===i?{}:i,a=e.scale,s=o;return{isDayOrShorter:function(){return s.isDayOrShorter=t.length>0&&Math.abs(t[0].qStart-t[0].qEnd)<=1,s.isDayOrShorter},count:function(){return t.length},maxRange:function(){return s.maxRange=t.length?Math.max.apply(Math,b(t.map((function(e){return Math.abs(a(e.qStart)-a(e.qEnd))})))):0,s.maxRange},rangeAndWidth:function(){var e=a.clamp();return a.clamp(!1),s.rangeAndWidth=t.map((function(e){return{range:Math.abs(a(e.qStart)-a(e.qEnd)),width:r("".concat(e.qText)).width+16}})),a.clamp(e),s.rangeAndWidth}}}function dY(e){var t=e.attrs,n=e.reqAutoFitWidth;return{outer:function(e){return!t.rangeAndWidth().some((function(t){return t.width>t.range*e}))},inner:function(e){return!t.rangeAndWidth().some((function(t){return t.width>t.range*e}))},minor:function(e){return t.maxRange()*e>=6},canFitHalfDayTicks:function(e){return e>=n*t.count()}}}function hY(e){var t=e.qualified,n=e.nonQualified,r=e.qAxis,i=e.measureText,o=e.reqAutoFitWidth,a=e.scale,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{attributesFactory:fY,queryFactory:dY},u=s.attributesFactory,l=void 0===u?fY:u,c=s.queryFactory,f=void 0===c?dY:c;function d(e,t){var n=e.qTicks,r=l({qTicks:n,measureText:i,scale:a});return{data:e,index:t,attrs:r,queries:f({attrs:r,reqAutoFitWidth:o})}}var h=r.map((function(e,t){return d(e,t)})),p=t.map((function(e){return h[e]})),m=n.map((function(e){return h[e]}));return{qAxisMeta:h,qualifiedMeta:p,nonQualifiedMeta:m}}function pY(e){return!Array.isArray(e)||0===e.length||e.every((function(e){return 0===e.qTicks.length}))}function mY(e){var t=e.qAxis,n=void 0===t?[]:t,r=e.measureText,i=void 0===r?function(){return{width:0}}:r,o=e.cache,a=void 0===o?{}:o,s=e.reqAutoFitWidth,u=void 0===s?0:s,l=e.scale,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{metaFactory:hY,mapper:lY,resolver:cY},f=c.metaFactory,d=void 0===f?hY:f,h=c.mapper,p=void 0===h?lY:h,m=c.resolver,v=void 0===m?cY:m,g=p({qAxis:n}),y=g.qualified,b=g.nonQualified,x=d({qAxis:n,qualified:y,nonQualified:b,measureText:i,reqAutoFitWidth:u,scale:l}),w=x.qualifiedMeta,M=x.nonQualifiedMeta,k=v({qualifiedMeta:w,nonQualifiedMeta:M});return{resolve:function(e){var t=a.key({distance:e});if(a.get(t))return a.get(t);if(pY(n))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};var r=k.resolve(e);return a.set(t,r),r}}}function vY(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}var gY=vY(0).getTime();function yY(e){return(e.getTime()-gY)/86400/1e3}var bY=new Date,xY=new Date;function wY(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return wY((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return bY.setTime(+t),xY.setTime(+r),e(bY),e(xY),Math.floor(n(bY,xY))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var MY=36e5,kY=wY((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),SY=wY((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),CY=wY((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*MY)}),(function(e,t){return(t-e)/MY}),(function(e){return e.getUTCHours()})),qY=wY((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function EY(e){return wY((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var TY=EY(0);EY(1),EY(2),EY(3),EY(4),EY(5),EY(6);var DY=wY((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),OY=wY((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));OY.every=function(e){return isFinite(e=Math.floor(e))&&e>0?wY((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var NY=1,_Y=2,AY=3,IY=4,PY=5,LY=6;function RY(e){var t,n=e.timeScale,r=e.labels,i=e.distance,o=e.isDayOrShorter,a=e.cache,s=e.timeOnly,u=y(n.domain(),2),l=u[0],c=u[1],f=a.key({distance:i});a.get(f,1)?t=a.get(f,1):(t=function(e,t,n,r,i){var o=kY.count(e,t),a=SY.count(e,t),s=CY.count(e,t),u=qY.count(e,t),l=TY.count(e,t),c=DY.count(e,t),f=OY.count(e,t),d=n/r.second.width-1,h=n/r.minute.width-1,p=n/r.date.width-1,m=n/r.year.width-1,v={type:"year",desc:"year",count:f,interval:OY.every(1),formatter:r.year.formatter};return o<=d?(v.type=NY,v.desc="second",v.count=o,v.interval=kY.every(1),v.formatter=r.second.formatter):o/2<=d?(v.type=NY,v.desc="every other second",v.count=o/2,v.interval=kY.every(2),v.formatter=r.second.formatter):o/5<=d?(v.type=NY,v.desc="every 5 second",v.count=o/5,v.interval=kY.every(5),v.formatter=r.second.formatter):o/15<=d?(v.type=NY,v.desc="every 15 second",v.count=o/15,v.interval=kY.every(15),v.formatter=r.second.formatter):o/30<=d?(v.type=NY,v.desc="every 30 second",v.count=o/30,v.interval=kY.every(30),v.formatter=r.second.formatter):a<=h?(v.type=_Y,v.desc="minute",v.count=a,v.interval=SY.every(1),v.formatter=r.minute.formatter):a/2<=h?(v.type=_Y,v.desc="every 2 minute",v.count=a/2,v.interval=SY.every(2),v.formatter=r.minute.formatter):a/5<=h?(v.type=_Y,v.desc="every 5 minute",v.count=a/5,v.interval=SY.every(5),v.formatter=r.minute.formatter):a/10<=h?(v.type=_Y,v.desc="every 10 minute",v.count=a/10,v.interval=SY.every(10),v.formatter=r.minute.formatter):a/15<=h?(v.type=_Y,v.desc="every 15 minute",v.count=a/15,v.interval=SY.every(15),v.formatter=r.minute.formatter):a/30<=h?(v.type=_Y,v.desc="every 30 minute",v.count=a/30,v.interval=SY.every(30),v.formatter=r.minute.formatter):s<=h?(v.type=AY,v.desc="hour",v.count=s,v.interval=CY.every(1),v.formatter=r.minute.formatter):s/2<=h?(v.type=AY,v.desc="every 2 hour",v.count=s/2,v.interval=CY.every(2),v.formatter=r.minute.formatter):s/3<=h?(v.type=AY,v.desc="every 3 hour",v.count=s/3,v.interval=CY.every(3),v.formatter=r.minute.formatter):s/6<=h?(v.type=AY,v.desc="every 6 hour",v.count=s/6,v.interval=CY.every(6),v.formatter=r.minute.formatter):s/12<=h||i?(v.type=AY,v.desc="every 12 hour",v.count=s/12,v.interval=CY.every(12),v.formatter=r.minute.formatter):u<=p?(v.type=IY,v.desc="day",v.count=u,v.interval=qY.every(1),v.formatter=r.date.formatter):u/2<=p?(v.type=IY,v.desc="every 2 day",v.count=u/2,v.interval=qY.every(2),v.formatter=r.date.formatter):u/3<=p?(v.type=IY,v.desc="every 3 day",v.count=u/3,v.interval=qY.every(3),v.formatter=r.date.formatter):l<=p?(v.type=IY,v.desc="week",v.count=l,v.interval=TY.every(1),v.formatter=r.date.formatter):l/2<=p?(v.type=IY,v.desc="every 2 week",v.count=l/2,v.interval=TY.every(2),v.formatter=r.date.formatter):c<=p?(v.type=PY,v.desc="month",v.count=c,v.interval=DY.every(1),v.formatter=r.date.formatter):c/3<=p?(v.type=PY,v.desc="quarter",v.count=c/3,v.interval=DY.every(3),v.formatter=r.date.formatter):c/6<=p?(v.type=PY,v.desc="half year",v.count=c/6,v.interval=DY.every(6),v.formatter=r.date.formatter):f<=m?(v.type=LY,v.desc="year",v.count=f,v.interval=OY.every(1),v.formatter=r.year.formatter):f/2<=m?(v.type=LY,v.desc="every 2 year",v.count=f/2,v.interval=OY.every(2),v.formatter=r.year.formatter):f/5<=m?(v.type=LY,v.desc="every 5 year",v.count=f/5,v.interval=OY.every(5),v.formatter=r.year.formatter):f/10<=m?(v.type=LY,v.desc="every 10 year",v.count=f/10,v.interval=OY.every(10),v.formatter=r.year.formatter):(v.type=LY,v.desc="every nth year",v.count=Math.floor(f/m),v.interval=OY.every(Math.floor(f/m)),v.formatter=r.year.formatter),v}(l,c,i,r.all(),o),a.set(f,t,1));var d=n.ticks(t.interval).map((function(e,n,r){var i=r[n+1]?r[n+1]-e:c-e;return{start:e,end:new Date(e.getTime()+i),formatter:t.formatter}})),h=[];if(!s&&t.type<=AY){var p=r.getFormat("date"),m=n.ticks(qY.every(1));h=(m.length?m:[l]).map((function(e,t,n){var r=n[t+1]?n[t+1]-e:c-e;return{start:e,end:new Date(e.getTime()+r),formatter:p.formatter}}))}return{inner:d,outer:h}}var jY=86400,zY=1440,FY={};function BY(e,t,n,r){return{type:e,start:new Date(Date.UTC.apply(Date,b(t))),end:new Date(Date.UTC.apply(Date,b(n))),formatter:r}}function VY(e,t,n){var i=t.ticks,o=i.generator,a=i.anchor,s=i.clamp,u=i.level,l=t.formatter.qNumFormat;e.clamp(s);var c=y(e.domain(),2),f=c[0],d=c[1],h=function(){return fb.apply(ek(Tw,Ew,Sw,Mw,ww,xw,hw,sw,Aw).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([vY(f),vY(d)]);h.clamp(s),h.range(t.invert?[1,0]:[0,1]);var p,m="object"===r(o)?o.type:o;p="d3"===m?function(e,r){return RY({timeScale:h,labels:n,distance:e,isDayOrShorter:r,cache:t.cache,timeOnly:"T"===l.qType})}:function(e){return function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(FY[[t,n,r,r,o]])return FY[[t,n,r,r,o]];var a,s,u,l={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},c=vY(n),f=c.getFullYear(),d=c.getMonth(),h=c.getDate(),p=r-n,m=t/(i-r),v=m/1440,g=m/jY,y=366*m,b=3*m*30,x=l.second.width/g,w=l.minute.width/v,M=l.date.width/b,k=l.year.width/y,S=0,C=0,q=null,E=null,T=null,D=null,O=null,N=null,_={outer:[],inner:[]};for(x<1?(q=1,C=1/jY):x<2?(q=2,C=1/jY*2):x<5?(q=5,C=1/jY*5):x<10?(q=10,C=1/jY*10):x<30?(q=30,C=1/jY*30):w<1?(E=1,C=1/zY):w<2?(E=2,C=1/zY*2):w<5?(E=5,C=1/zY*5):w<10?(E=10,C=.006944444444444445):w<30?(E=30,C=.020833333333333336):w<60?(T=1,C=1/24):w<120?(T=2,C=2/24):w<360?(T=6,C=.25):w<720?(T=12,C=.5):M<1/90?(C=1,D=1):M<2/90?(C=2,D=2):M<7/90?(C=7,D=7):M<31/90?(O=1,C=31):M<1?(O=3,C=90):k<1?(N=1,C=366):k<2?(N=2,C=732):k<5?(N=5,C=1826.25):(N=10,C=3652.5),s=Math.floor((p+n%1)/C);S<i;){u=s+1,S=yY((a=N?BY("year",[f+s*N,0,1],[f+u*N,0,1],l.year.formatter):O?BY("month",[f,d+s*O,1],[f,d+u*O,1],l.date.formatter):D?BY("day",[f,d,h+s*D],[f,d,h+u*D],l.date.formatter):T?BY("hour",[f,d,h,0+s*T],[f,d,h,0+u*T],l.minute.formatter):E?BY("minute",[f,d,h,0,0+s*E],[f,d,h,0,0+u*E],l.minute.formatter):BY("second",[f,d,h,0,0,0+s*q],[f,d,h,0,0,0+u*q],l.second.formatter)).start),_.inner.push(a);var A=Math.floor(S);if(!(o||N||O||D)){var I={type:"day",start:vY(A),end:vY(A+1),formatter:l.date.formatter,qStart:A};_.outer[_.outer.length-1]&&_.outer[_.outer.length-1].qStart===I.qStart||_.outer.push(I)}s++}return _.min=r,_.max=i,FY[[t,n,r,r,o]]=_,_}(n,e,o.min,f,d,"T"===l.qType)};var v={transform:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.isMinor,i=void 0!==r&&r;return t.map((function(t){var n;n="start"===a?t.qStart:"end"===a?t.qEnd:(t.qStart+t.qEnd)/2;var r=e.clamp();i&&e.clamp(!1);var o=e(n),s=e(t.qStart),u=e(t.qEnd);return e.clamp(r),{value:n,position:o,start:s,end:u,label:t.qText,isMinor:i,data:i?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((function(e){return e.position>=0&&e.position<=1}))},generate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=arguments.length>1?arguments[1]:void 0,r=p(t,n),i=r[u];return i.map((function(t){var n;return n="start"===a?yY(t.start):"end"===a?yY(t.end):(yY(t.start)+yY(t.end))/2,{position:h(t.start),start:h(t.start),end:h(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:yY(t.start),end:yY(t.end),scaleStart:e.domain()[0]}}})).filter((function(e){return e.position>=0&&e.position<=1}))}};return v}var HY=/t+/i;function UY(e){var t={},n=e.formatter,r=n.measureText,i=n.fn,o=n.localeInfo,a={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return o&&HY.test(o.qTimestampFmt)&&(a.minute.pattern+=" tt",a.second.pattern+=" tt"),a.date.pattern=o&&o.qDateFmt?o.qDateFmt:a.date.pattern,Object.keys(a).forEach((function(e){a[e].formatter=i(a[e].pattern),a[e].width=Math.max(a[e].width,r(a[e].formatter(41000.2343433)).width+16)})),t.getFormat=function(e){return a[e]},t.all=function(){return a},t.getFormatFromTicks=function(e){var t=e.filter((function(e){return!e.isMinor})),n=t.length;if(!n)return a.date;var r=vY(t[0].data.start),i=vY(t[n-1].data.start);return qY.count(r,i)/n>=1?a.date:CY.count(r,i)/n>0?a.minute:SY.count(r,i)/n>0?a.second:a.date},t}function WY(e,t,n){var i={};return Object.keys(t).forEach((function(o){var a=e[o],s=r(a);"function"===s?i[o]=a(n):"object"!==s||Array.isArray(a)?i[o]="undefined"===s?t[o]:a:i[o]=Tg(!0,{},t[o],a)})),i}var YY={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:function(){return function(e){return e}},measureText:function(){return{width:0,height:0}},localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:function(){return!1},set:function(){},key:function(){return""}}};function KY(e,t){var n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min.apply(Math,b(t[t.length-1].qTicks.map((function(e){return e.qStart})))),r=Math.max.apply(Math,b(t[t.length-1].qTicks.map((function(e){return e.qEnd}))))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}function $Y(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}var GY="continuousPan";var XY={model:function(e){var t,r,i,o=e.model,a=e.layoutService,s=e.dataProcessorModel,u=void 0===s?DB:s,l=e.viewCache,c=e.viewState,f=e.definitionPath,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=d.engineFetcherFactory,p=void 0===h?fB:h,m=d.snapshotFetcherFactory,v=void 0===m?hB:m,g=d.cacheFetcherFactory,y=void 0===g?dB:g,b=d.cache,x=void 0===b?{initial:{},merged:{}}:b,w=p({model:o,layoutService:a,definitionPath:f}),M=v({layoutService:a,viewCache:l}),k=y({cache:x}),S=function(e){throw e.isHandled=!0,e};return{update:function(e){var n=TB(e.qHyperCube.qDimensionInfo[0]);if(r=n.initialMin,i=n.initialMax,l.set("continuousMin",r),l.set("continuousMax",i),l.set("minimiumZoomSpan",kB(r,i)),t=a.meta.isSnapshot?M:w,a.meta.isSnapshot){var o=M.getSnapshotData().zoom;r=o.min,i=o.max}c.preventSet("zoom",{min:r,max:i})},updateLayout:function(e){var t=e.qDataPages,n=e.qAxisData;return a.setHyperCubeValue("qDataPages",t),a.setHyperCubeValue("qAxisData",n),a.setHyperCubeValue("qMode","S"),e},initialFetch:function(){var e=this;return t.fetch(r,i).then((function(e){var t=bB(e);return u.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),x.initial=t,x.merged=t,e})).then((function(e){return gB(r,i,e)})).then((function(t){return e.updateLayout(t)})).catch(S)},fetch:function(e,n){return t.fetch(e,n).then((function(e){return yB(x.initial,e)})).then((function(e){return u.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),x.merged=e,e})).then((function(t){return gB(e,n,t)})).catch(S)},fetchFromCache:function(e,t){return k.fetch(e,t).then((function(n){return gB(e,t,n)}))},fetchMinMaxData:function(){return Promise.resolve(x.initial.qDataPages||[])},getInitialCube:function(){var e=a.getHyperCube();return Tg({},e,n({},x.initial))},getInitialLayout:function(){var e=this.getInitialCube();return Tg({},a.getLayout(),{qHyperCube:e})},getDimensionCardinality:function(){return EB(x.initial,a.meta)},setSnapshotData:function(e){var t=e.qHyperCube;t.qDataPages=x.merged.qDataPages,t.qAxisData=x.merged.qAxisData}}},event:{onZoomChange:function(e,t){var n=e.layoutService,r=e.continuousDataModel;function i(e,n,i){return r[e](n,i).then((function(e){return r.updateLayout(e),t(),e}))}var o=CH((function(e,t){return i("fetch",e,t)}),50);return function(e,t){var r=e.min,a=e.max,s=t.min,u=t.max;return!n.meta.isContinuous||r===s&&a===u?Promise.resolve(null):i("fetchFromCache",r,a).then((function(e){return o(r,a),e}))}},onZoomIntercept:function(e){var t=e.viewCache,n=NaN,r=NaN,i=NaN;return function(e,o){return n=t.get("continuousMin"),r=t.get("continuousMax"),i=t.get("minimiumZoomSpan"),Math.abs(e.max-e.min)<i?o:{min:Math.min(e.max,Math.max(n,e.min)),max:Math.max(e.min,Math.min(r,e.max))}}},onZoom:function(e,t){var n=e.viewCache,r=e.viewState,i=e.chart,o=t.threshold,a=void 0===o?50:o,s=t.rtl,u=void 0!==s&&s,l=t.targetKey,c=n.get("continuousMin"),f=n.get("continuousMax");return qH((function(e,t){var n=function(e){return i.componentsFromPoint(e).filter((function(e){return e.key===l}))[0]}(e);if(n){var o=function(e,t,n){var r=e.x;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,i,n),a=u?1-o:o,s=r.get("zoom"),d=s.min,h=s.max,p=Math.abs(h-d),m=p-(t>0?wB:xB)*p,v=d+m*a,g=h-m*(1-a),y=v<c?c-v:0,b=g>f?g-f:0;r.set("zoom",{min:Math.max(v-b,c),max:Math.min(g+y,f)})}}),a)}},interactions:{areaPan:function(e){var t,n=e.targetKey,r=e.chart,i=e.actions,o=e.viewState,a=e.viewCache;return{type:"Pan",key:"continuous:pan",options:{event:GY,pointers:1,threshold:10,enable:function(e,t){return this.started===GY||!t||!!i.scroll.enabled()&&r.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key===n}))}},events:(t={},l(t,"".concat(GY,"start"),(function(e){e.preventDefault(),this.started=GY;var t=o.get("zoom"),i=t.min,a=t.max;this[GY]={min:i,max:a,size:r.component(n).rect.computedInner.width,span:a-i}})),l(t,"".concat(GY,"move"),(function(e){e.preventDefault();var t=this[GY],n=t.span,r=t.min,i=t.max,s=t.size,u=-e.deltaX/s;o.set("zoom",{min:Math.min(r+u*n,a.get("continuousMax")-n),max:Math.max(i+u*n,a.get("continuousMin")+n)})})),l(t,"".concat(GY,"end"),(function(e){e.preventDefault(),this.started=!1})),l(t,"".concat(GY,"cancel"),(function(e){e.preventDefault(),this.started=!1})),t)}}},picassoComponents:{axisOverlay:tY,timeAxis:aY},picassoScales:{time:function e(t){var n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=WY(t,YY,i),a=o.qAxis,s=rw(),u={instance:null,invert:!1},l=KY(o,a),c=l.min,f=l.max,d=[],h=function(e){return Number.isNaN(+e)?NaN:s(e)};h.ticks=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.distance,i=e.resolve,s=void 0===i?n.resolve:i,u=s(t),l=u[o.ticks.level];if(Number.isNaN(+l)||(d=r.transform(a[l].qTicks,{isMinor:!1})),!Number.isNaN(+u.minor)){var c=r.transform(a[u.minor].qTicks,{isMinor:!0});d=d.concat(c)}return"auto"===l&&(d=r.generate(t,u.isDayOrShorter)),d},h.invert=function(e){return s.invert(e)},h.domain=function(e){return Array.isArray(e)?s.domain(e):s.domain()},h.range=function(e){return Array.isArray(e)?s.range(e):s.range()},h.norm=function(e){return $Y(u,h),u.instance(e)},h.normInvert=function(e){return $Y(u,h),u.instance.invert(e)},h.copy=function(){return e(t,i)},h.clamp=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return s.clamp(e),s.clamp()},h.min=function(){return Math.min(c,f)},h.max=function(){return Math.max(c,f)},s.range(o.invert?[1,0]:[0,1]),s.domain([c,f]),u.invert=o.invert;var p=UY(o);return r=VY(s.copy(),o,p),n=mY({qAxis:a,measureText:o.formatter.measureText,reqAutoFitWidth:2*p.getFormat("minute").width,cache:o.cache,scale:h}),h.data=function(){return{fields:[{formatter:h.formatter,id:function(){return"qHyperCube/".concat(o.field)},key:function(){return o.field},raw:wH(i,"fields.0.raw",(function(){return{}}))}]}},h.formatter=function(){return p.getFormatFromTicks(d).formatter},h}}},JY={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}},QY={OPTIONS:JY,DEFAULT:JY.MINI_CHART};function ZY(e){var t=e.layoutService,r=e.discrete;return function(e){var i=e.h,o=e.rect,a=e.orientation,s=e.minThumbSize,u=r.query.getCurrentDataPage(),l=t.meta.size.y,c="horizontal"===a,f=o[c?"width":"height"],d=u.qArea.qTop/l*f,h=u.qArea.qHeight/l*f;if(h<s){var p=(s-h)/2;d=d-p+(Math.max(0,0-(d-p))-Math.max(0,d+h+p-f)),h=s}return i("div",{style:n({position:"absolute",right:0,bottom:0,background:"red",opacity:.2},c?{top:0,left:d,width:h}:{top:d,left:0,height:h})})}}function eK(e){var t=e.layoutService,n=e.viewState,r=e.viewCache;return t.meta.isContinuous?function(e,t){var n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(n,r):function(e){return e.get("viewRange")}(n)}var tK=function(e){return{miniChart:e===QY.OPTIONS.MINI_CHART.value,bar:e===QY.OPTIONS.BAR.value,none:e===QY.OPTIONS.NONE.value}};function nK(e){var t=e.layoutService,n=e.override,r=void 0===n?void 0:n,i=function(e){var t=e.layoutService,n=t.getLayoutValue("scrollbar");if(n)return tK(n);var r=t.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===r)return tK(QY.DEFAULT.value);var i=t.getLayoutValue("dimensionAxis.continuousAuto"),o=t.getLayoutValue("preferContinuousAxis");return tK(!r&&(i||!i&&o)?QY.OPTIONS.NONE.value:QY.OPTIONS.MINI_CHART.value)}({layoutService:t});return r&&r.predicate({layoutService:t,scrollbar:i})&&(i.miniChart=r.value===QY.OPTIONS.MINI_CHART.value,i.bar=r.value===QY.OPTIONS.BAR.value,i.none=r.value===QY.OPTIONS.NONE.value),i}function rK(e){var t=e.layoutService,n=e.dockService,r=e.discrete,i=e.continuousDataModel,o=e.viewState,a=e.viewCache,s=e.themeService,u=e.rtl,l=e.scrollbarOverride,c=e.visualizeCache,f=void 0!==c&&c,d=e.deviceType,h=nK({layoutService:t,override:l});if(h.none)return!1;var p=n.meta.major.orientation,m={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===p?n.meta.minor.start:n.meta.minor.end,minimumLayoutMode:"XSMALL"},show:function(){return t.meta.isContinuous?i.getDimensionCardinality()>1:r.query.getCanScroll()},settings:{orientation:p,rtl:u,isContinuous:t.meta.isContinuous,range:function(){return eK({layoutService:t,viewState:o,viewCache:a})}}};h.bar&&(m.settings.style="slim",m.settings.size={area:"touch"===d?{max:16,min:16}:{max:8,min:8}},t.meta.isContinuous||(m.settings.size.thumb={min:4}));var v=s.getStyles();return v.color&&(m.style={standard:{thumb:{"border-color":v.color,opacity:.4},before:{background:v.color,opacity:.1},after:{background:v.color,opacity:.1}}}),t.meta.isDiscrete&&f&&(m.settings.injections=function(){return[ZY({layoutService:t,discrete:r})]}),m}function iK(e){var t=e.componentKey,n=e.chart,r=e.viewState,i=e.viewCache,o=e.layoutService,a=e.dockService,s=e.rtl;return function(e){var u=e.center,l=u.x,c=u.y,f=n.element.getBoundingClientRect(),d=n.component(t),h="horizontal"===a.meta.major.orientation,p=h?l-f.left-d.rect.computedInner.x:c-f.top-d.rect.computedInner.y,m=h?d.rect.computedInner.width:d.rect.computedInner.height,v=h&&s?m-p:p,g=Math.max(0,Math.min(v/m,1)),b=y(eK({layoutService:o,viewState:r,viewCache:i}),2),x=b[0],w=g<x,M=g>b[1],k=!w&&!M;return{pixel:v,relative:g,thumb:k?v-x*m:0,beforeThumb:w,afterThumb:M,onThumb:k}}}function oK(e){var t=e.componentKey,n=e.chart,r=e.viewState,i=e.viewCache,o=e.layoutService,a=e.dockService;return function(){var e=n.component(t),s=a.meta.major.orientation,u=e.rect.computedInner,l=u.width,c=u.height,f="horizontal"===s?l:c,d=y(eK({layoutService:o,viewState:r,viewCache:i}),2),h=d[0];return{size:f,thumbSize:(d[1]-h)*f}}}function aK(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.viewState,o=e.viewCache,a=e.layoutService,s=e.dockService,u=e.discrete,l=e.rtl,c=iK({componentKey:t,chart:n,viewState:i,viewCache:o,layoutService:a,dockService:s,rtl:l}),f=oK({componentKey:t,chart:n,viewState:i,viewCache:o,layoutService:a,dockService:s});return{type:"Tap",options:{event:"scrollbarTap",enable:function(e,i){return!i||!!r.scroll.enabled()&&n.componentsFromPoint({x:i.center.x,y:i.center.y}).some((function(e){return e.key===t}))}},events:{scrollbarTap:function(e){e.preventDefault();var r=c(e);if(a.meta.isContinuous){var s=i.get("zoom"),l=s.max-s.min,d=o.get("continuousMin"),h=o.get("continuousMax"),p=d+(h-d)*r.relative;i.set("zoom",{min:Math.min(p-l/2,h-l),max:Math.max(p+l/2,d+l)})}else{var m=f(),v=r.pixel-m.thumbSize/2,g=Math.max(0,v/m.size);u.command.scrollTo(g)}n.component(t).emit("render")}}}}var sK="data-scrollbar-handle";function uK(e){var t=e.e;return(t.srcEvent||t).srcElement.getAttribute(sK)||""}var lK="scrollbarResize";function cK(e){var t,n=e.componentKey,r=e.chart,i=e.actions,o=e.viewState,a=e.viewCache,s=e.layoutService,u=e.dockService,c=e.rtl,f=iK({componentKey:n,chart:r,viewState:o,viewCache:a,layoutService:s,dockService:u,rtl:c});return{type:"Pan",key:"event:".concat(lK),options:{event:lK,threshold:0,enable:function(e,t){return!(!s.meta.isContinuous||!i.scroll.enabled())&&(!t||(this[lK]=this[lK]||{},function(e){var t=y(e.changedPointers,1)[0];return t&&("pointerdown"===t.type||"mousedown"===t.type)}(t)&&uK({e:t})&&(this[lK].panningEvent=t.srcEvent),!!this[lK].panningEvent))}},events:(t={},l(t,"".concat(lK,"start"),(function(e){e.preventDefault(),this[lK]=this[lK]||{},this[lK].panningEvent&&r.component(n).emit("dragStart",this[lK].panningEvent)})),l(t,"".concat(lK,"move"),(function(e){if(e.preventDefault(),this[lK]=this[lK]||{},this[lK].panningEvent){var t=o.get("zoom"),i=a.get("continuousMin"),s=a.get("continuousMax"),u=a.get("minimiumZoomSpan"),l=(s-i)*f(e).relative+i,c=uK({e:this[lK].panningEvent}),d="start"===c?Math.min(l,t.max):t.min,h="end"===c?Math.max(l,t.min):t.max;d===h&&(d-="start"===c?u:0,h+="end"===c?u:0),o.set("zoom",{min:d,max:h}),r.component(n).emit("render")}})),l(t,"".concat(lK,"end"),(function(e){e.preventDefault(),this[lK]=this[lK]||{},delete this[lK].panningEvent,r.component(n).emit("dragEnd")})),l(t,"".concat(lK,"cancel"),(function(e){e.preventDefault(),this[lK]=this[lK]||{},delete this[lK].panningEvent,r.component(n).emit("dragEnd")})),t)}}var fK="scrollbarPan";function dK(e){var t,n=e.componentKey,r=e.chart,i=e.actions,o=e.viewState,a=e.viewCache,s=e.layoutService,u=e.dockService,c=e.discrete,f=e.rtl,d=iK({componentKey:n,chart:r,viewState:o,viewCache:a,layoutService:s,dockService:u,rtl:f}),h=oK({componentKey:n,chart:r,viewState:o,viewCache:a,layoutService:s,dockService:u});return{type:"Pan",key:"event:".concat(fK),options:{event:fK,threshold:0,enable:function(e,t){return this[fK]=this[fK]||{},!(t&&!this[fK].isPanning)||!!i.scroll.enabled()&&((!t||t.target===r.element)&&r.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key===n})))}},events:(t={},l(t,"".concat(fK,"start"),(function(e){e.preventDefault();var t=d(e);if(this[fK]=this[fK]||{},this[fK].isPanning=!0,r.component(n).emit("lockState"),s.meta.isContinuous){var i=o.get("zoom"),u=i.max-i.min,l=a.get("continuousMin"),c=a.get("continuousMax"),f=l+(c-l)*t.relative;f<i.min?o.set("zoom",{min:Math.min(f,c-u),max:Math.max(f+u,l+u)}):f>i.max&&o.set("zoom",{min:Math.min(f-u,c-u),max:Math.max(f,l+u)}),this[fK].relative=t.relative,this[fK].zoom=o.get("zoom"),this[fK].zoom.span=this[fK].zoom.max-this[fK].zoom.min,this[fK].zoom.fullSpan=c-l}else if(t.onThumb)this[fK].offset=t.thumb;else{var p=h();this[fK].offset=t.beforeThumb?0:p.thumbSize}})),l(t,"".concat(fK,"move"),(function(e){e.preventDefault();var t=d(e);if(this[fK]=this[fK]||{},s.meta.isContinuous){var i=t.relative-this[fK].relative,u=this[fK].zoom,l=u.fullSpan,f=u.span,p=u.min,m=u.max,v=a.get("continuousMin"),g=a.get("continuousMax");o.set("zoom",{min:Math.min(p+i*l,g-f),max:Math.max(m+i*l,v+f)})}else{var y=t.pixel-(this[fK].offset||0),b=h(),x=Math.max(0,y/b.size);c.command.scrollTo(x)}r.component(n).emit("render")})),l(t,"".concat(fK,"end"),(function(e){e.preventDefault(),this[fK]=this[fK]||{},this[fK].isPanning=!1,r.component(n).emit("unlockState")})),l(t,"".concat(fK,"cancel"),(function(e){e.preventDefault(),this[fK]=this[fK]||{},this[fK].isPanning=!1,r.component(n).emit("unlockState")})),t)}}function hK(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.viewState,o=e.viewCache,a=e.layoutService,s=e.dockService,u=e.discrete,l=e.rtl;return[aK({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:s,discrete:u,rtl:l}),cK({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:s,rtl:l}),dK({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:s,discrete:u,rtl:l})]}function pK(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.layoutService,o=function(e,o){if(i.meta.isContinuous){var a=n.component(t);a&&a.emit&&r.scroll.enabled()&&a.emit(e,o)}};return{type:"native",events:{mousemove:function(e){return o("hover",e)},mouseleave:function(){return o("leave")}}}}function mK(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.viewState,o=e.viewCache,a=e.layoutService;return{gestures:b(hK({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:e.dockService,discrete:e.discrete,rtl:e.rtl})),native:pK({componentKey:t,chart:n,actions:r,layoutService:a})}}var vK={background:"rgba(0, 0, 0, 0.1)"},gK={top:-1,bottom:-1,width:6},yK={width:2,background:"#595959"},bK={before:vK,after:vK,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:gK,endHandle:gK,startHandleBorder:yK,endHandleBorder:yK},xK={background:"rgba(0, 0, 0, 0.1)"},wK={top:-1,bottom:-1,width:6},MK={width:2,background:"#595959"},kK={before:xK,after:xK,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:wK,endHandle:wK,startHandleBorder:MK,endHandleBorder:MK},SK={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},CK={pointerEvents:"initial"},qK={pointerEvents:"none"};var EK="ew-resize",TK="default";function DK(){var e=this.rect,t=this.settings.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function OK(){var e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?EK:TK}function NK(e,t,n){var r=this.settings.settings.size.thumb.min;if(n-t<r){var i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function _K(e){var t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function AK(){var e=DK.call(this),t=e.size,n=e.start,r=e.end;this.renderer.render(this.elements(this.h,NK.call(this,t,n,r)))}function IK(){var e=this.state,t=this.settings,r=this.style,i=t.settings.style;return e.style[i]||(e.style[i]=function(e){var t=e.id,r=e.style,i="slim"===t?kK:bK;return{container:n({},SK),before:n(n(n({},SK),i.before),r.before),after:n(n(n({},SK),i.after),r.after),thumb:n(n(n({},SK),i.thumb),r.thumb),startHandle:n(n(n({},SK),CK),i.startHandle),endHandle:n(n(n({},SK),CK),i.endHandle),startHandleBorder:n(n(n({},SK),qK),i.startHandleBorder),endHandleBorder:n(n(n({},SK),qK),i.endHandleBorder)}}({id:t.settings.style,style:r[i]})),e.style[i]}var PK={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:function(){return[0,1]},injections:function(){return[]}},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render:function(){AK.call(this)},lockState:function(){this.state.locked=!0},unlockState:function(){this.state.locked=!1},hover:function(e){if(!(this.state.locked||this.state.drag.start||this.state.drag.end||!_K.call(this,e)&&this.state.hover.isPristine())){this.state.hover.reset();var t=uK({e:e});t&&(this.state.hover[t]=!0),OK.call(this),AK.call(this)}},leave:function(){this.state.locked||(this.state.hover.reset(),OK.call(this),AK.call(this))},dragStart:function(e){if(!this.state.locked){this.state.drag.reset();var t=uK({e:e});t&&(this.state.drag[t]=!0),OK.call(this)}},dragEnd:function(){this.state.locked||(this.state.drag.reset(),OK.call(this),AK.call(this))}},preferredSize:function(e){var t=e.outer,n=this.settings.settings.size.area,r=n.min,i=n.max,o=n.ratio,a="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(r,Math.min(i,t[a]*o))},created:function(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset:function(){this.start=!1,this.end=!1},isPristine:function(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset:function(){this.start=!1,this.end=!1}}}},render:function(e){this.h=e;var t=DK.call(this),n=t.size,r=t.start,i=t.end;return this.elements(e,NK.call(this,n,r,i))},properties:function(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements:function(e,t){var r=this,i=t.size,o=t.start,a=t.end,s=this.settings.settings,u=s.injections().map((function(t){return t({h:e,rect:r.rect,orientation:s.orientation,minThumbSize:s.size.thumb.min})}));return function(e){var t,r=e.h,i=e.size,o=e.start,a=e.end,s=e.properties,u=e.startHandleActive,c=e.endHandleActive,f=e.style,d=e.continuous,h=e.invert,p=e.injections,m={before:l({},s.end,i-o),after:l({},s.start,a),startHandle:{left:-3},startHandleBorder:{left:1},endHandle:{right:-3,left:"auto"},endHandleBorder:{left:3}},v=r("div",{style:n(n({},f.before),h?m.after:m.before),class:"scrollbar--before"}),g=r("div",{style:n(n({},f.after),h?m.before:m.after),class:"scrollbar--after"}),y=[];if(d){var x=r("div",l({style:n(n({},f.startHandle),h?m.endHandle:m.startHandle),class:"scrollbar--start-handle"},sK,"start"),u?r("div",{style:n(n({},f.startHandleBorder),h?m.endHandleBorder:m.startHandleBorder)}):void 0);y.push(x);var w=r("div",l({style:n(n({},f.endHandle),h?m.startHandle:m.endHandle),class:"scrollbar--end-handle"},sK,"end"),c?r("div",{style:n(n({},f.endHandleBorder),h?m.startHandleBorder:m.endHandleBorder)}):void 0);y.push(w)}var M=r("div",{style:n(n({},f.thumb),{},(t={},l(t,s.start,o),l(t,s.end,i-a),t)),class:"scrollbar--thumb"},y);return r("div",{style:n({},f.container)},[v,M,g].concat(b(p)))}({h:e,size:i,start:o,end:a,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:IK.call(this),continuous:s.isContinuous,invert:"horizontal"===s.orientation&&s.rtl,injections:u})}},LK=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size,n=void 0===t?10:t,r=e.fill,i=void 0===r?"#999":r,o=e.alignment;return{show:!0,type:"n-polygon",fill:i,stroke:"#000",strokeWidth:0,size:n,sides:3,startAngle:-90,alignment:o}},RK=function(e){var t,n=e.oob,r=e.dockValue,i=e.boxCenter,o=e.rendWidth,a=e.rendHeight,s="x",u="y",c=o,f=a,d=r<.5?90:-90;return e.flipXY&&(s="y",u="x",c=a,f=o,d=r<.5?180:0),(0,e.symbol)(Tg({},n,(l(t={},s,i*c),l(t,u,f-Math.max(n.size/2,Math.min(r*f,f-n.size/2))),l(t,"startAngle",d),t)))};function jK(e){var t,n=e.i,r=e.width,i=e.height,o=e.resolved,a=e.keys,s=e.flipXY,u=e.calcKey,l=void 0===u?"box":u,c=null,f=null;void 0!==o.major.settings.binStart?(c=o.major.items[n].binStart,f=o.major.items[n].binEnd,t=o.major.settings.binStart.scale):c=(t=o.major.settings.major.scale)?o.major.items[n].major:0;var d=0;t?t.bandwidth?c-=(d=t.bandwidth())/2:d=f-c:d=1;var h=Tg({},{major:c,majorEnd:f},o.minor.items[n]);a.forEach((function(e){h[e]=o[e].items[n]}));var p=s?i:r,m=function(e){var t=e.bandwidth,n=e.width,r=e.minWidthPx,i=e.maxWidthPx,o=e.maxMajorWidth,a=t>=0?1:-1,s=Math.min(a*t*n,Number.isNaN(Number(i))?o:i/o);return(s=Number.isNaN(Number(r))?s:Math.max(r/o,s))*a}({bandwidth:d,width:h[l].width,minWidthPx:h[l].minWidthPx,maxWidthPx:h[l].maxWidthPx,maxMajorWidth:p}),v=(d-m)/2,g=v+h.major+m/2;return{item:h,boxCenter:g,boxWidth:m,boxPadding:v,rendWidth:r,rendHeight:i}}function zK(e){var t,n=e.keys,i=e.data,o=e.defaultSettings,a=e.style,s=e.settings,u=e.width,l=e.height,c=e.resolver,f=Tg(!0,{},o||{},a||{}),d={major:"horizontal"===s.orientation?l:u,minor:"horizontal"===s.orientation?u:l},h=s.major;t="object"===r(h)&&"object"===r(h.ref)&&void 0!==h.ref.start&&void 0!==h.ref.end?c.resolve({data:i,defaults:{start:0,end:1},scaled:d,settings:Tg(!0,{},{binStart:{scale:s.major.scale,ref:s.major.ref.start},binEnd:{scale:s.major.scale,ref:s.major.ref.end}})}):"object"===r(h)&&void 0!==h.binStart&&void 0!==h.binEnd?c.resolve({data:i,defaults:{start:0,end:1},scaled:d,settings:Tg(!0,{},{binStart:{scale:s.major.scale,ref:"binStart"},binEnd:{scale:s.major.scale,ref:"binEnd"}},s.major)}):c.resolve({data:i,scaled:d,defaults:{major:.5},settings:{major:s.major}});for(var p,m=s.minor||{},v={major:t,minor:c.resolve({data:i,defaults:{start:0,end:1},scaled:d,settings:Tg(!0,{},{start:{scale:m.scale,ref:"start"},end:{scale:m.scale,ref:"end"},min:{scale:m.scale,ref:"min"},max:{scale:m.scale,ref:"max"},med:{scale:m.scale,ref:"med"}},m)})},g=0,y=n.length;g<y;g++)v[p=n[g]]=c.resolve({data:i,defaults:f[p],settings:s[p],scaled:d});return v}var FK=["oob"];var BK={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created:function(){this.state={}},preferredSize:function(){return this.settings.settings.size},render:function(){var e=this.rect,t=e.width,n=e.height,r=this.settings.settings.dockValue,i="horizontal"===this.settings.settings.orientation,o=this.data,a=this.style,s=this.resolver,u=this.symbol,l=zK({keys:FK,data:o,defaultSettings:{oob:LK()},style:a,settings:this.settings.settings,width:t,height:n,resolver:s}),c=l.settings;return function(e){for(var t=e.width,n=e.height,r=e.flipXY,i=e.resolved,o=e.keys,a=e.symbol,s=e.dockValue,u=e._calcItemRenderingOpts,l=void 0===u?jK:u,c=[],f=i.major.items,d=0,h=f.length;d<h;d++){var p=l({i:d,width:t,height:n,resolved:i,keys:o,flipXY:r,calcKey:"oob"}),m=p.item,v=p.boxCenter,g=p.rendWidth,y=p.rendHeight,b=f[d].data,x=[];if(m.oob.show){x.push(RK({oob:m.oob,dockValue:s,boxCenter:v,rendWidth:g,rendHeight:y,flipXY:r,symbol:a}));var w={type:"container",data:b,collider:{type:"bounds"},children:x};c.push(w)}}return c}({items:l.items,settings:c,width:t,height:n,flipXY:i,resolved:l,keys:FK,symbol:u,dockValue:r})}},VK={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},HK=["hat"];function UK(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",r=0;r<e.length;r++){var i=e[r];n+=0===r?"M".concat(i.x," ").concat(i.y):"L".concat(i.x," ").concat(i.y),n+=" "}return t&&(n+="Z"),n}function WK(e){var t,n,r,i,o,a,s,u,c,f,d=e.item,h=e.boxWidth,p=e.boxPadding,m=e.rendWidth,v=e.rendHeight,g=e.flipXY,y="x",b="y",x=m,w=v,M=d.hat.alignment||0;g&&(y="y",b="x",x=v,w=m,M=1-M);var k=(p+d.major)*x,S=[(t={},l(t,y,k),l(t,b,0+w),t),(n={},l(n,y,k+h*M*x),l(n,b,8),n),(r={},l(r,y,k+h*x),l(r,b,0+w),r),(i={},l(i,y,k+h*x),l(i,b,0+w+10),i),(o={},l(o,y,k),l(o,b,0+w+10),o)],C=Tg({},d.hat,{type:"path",d:UK(S)});return S=[(a={},l(a,y,k),l(a,b,0),a),(s={},l(s,y,k+h*(1-M)*x),l(s,b,0+w-8),s),(u={},l(u,y,k+h*x),l(u,b,0),u),(c={},l(c,y,k+h*x),l(c,b,-10),c),(f={},l(f,y,k),l(f,b,-10),f)],[C,Tg({},d.hat,{type:"path",d:UK(S)})]}var YK,KK={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created:function(){this.state={}},preferredSize:function(){return this.settings.settings.size},render:function(){var e=this.rect,t=e.width,n=e.height,r="horizontal"===this.settings.settings.orientation,i=this.data,o=this.style,a=this.resolver,s=zK({keys:HK,data:i,defaultSettings:VK,style:o,settings:this.settings.settings,width:t,height:n,resolver:a}),u=s.settings;return function(e){for(var t=e.width,n=e.height,r=e.flipXY,i=e.resolved,o=e.keys,a=e._calcItemRenderingOpts,s=void 0===a?jK:a,u=[],l=i.major.items,c=0,f=l.length;c<f;c++){var d=s({i:c,width:t,height:n,resolved:i,keys:o,flipXY:r,calcKey:"hat"}),h=d.item,p=d.boxWidth,m=d.boxPadding,v=d.rendWidth,g=d.rendHeight,y=l[c].data,x=[];h.hat.show&&x.push.apply(x,b(WK({item:h,boxWidth:p,boxPadding:m,rendWidth:v,rendHeight:g,flipXY:r})));var w={type:"container",data:y,collider:{type:"bounds"},children:x};u.push(w)}return u}({items:s.items,settings:u,width:t,height:n,flipXY:r,resolved:s,keys:HK})}},$K="equal-higher",GK="equal-lower",XK="equal-void",JK="higher-equal",QK="higher-higher-acute",ZK="higher-higher-obtuse",e$="higher-lower-negative",t$="higher-lower-positive",n$="higher-void",r$="lower-equal",i$="lower-higher-negative",o$="lower-higher-positive",a$="lower-lower-acute",s$="lower-lower-obtuse",u$="lower-void",l$="void-equal",c$="void-higher",f$="void-lower",d$="void-void",h$="top",p$="top-right",m$="right",v$="bottom-right",g$="bottom",y$="bottom-left",b$="left",x$="top-left";function w$(e,t,n,r){var i=function(t){var n=String(t);return e(n)};return i.ticks=function(){return t.map((function(t){var o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}}))},i.bandwidth=function(){return e.bandwidth()},i.data=function(){return e.data()},i.domain=function(){return e.domain()},i.pxScale=function(r){var i=e.pxScale(r);return i===e?this:w$(i,t,n)},i}function M$(e){var t=e.scale("band");e.scale("group-by-measure",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],u=e.measureCount;return o.forEach((function(e,t){for(var n=0;n<u;++n)s.push(String([e,n]));s.push("SPACER_".concat(t,"_SPACER"))})),s.splice(-1),i.domain(s),w$(i,a,u,e.invert)}))}function k$(){var e=pm();return e.use(dg),e.use(function(e){if("function"!=typeof e.interaction)return function(t){t.interaction("hammer",mg(e))};e.interaction("hammer",mg(Hammer))}(bg)),e.use(lB()),e.use(M$),e.component("box-sliced-hat",KK),e.component("box-out-of-bounds",BK),e.component("scrollbar",PK),e.component("scroll-hint",ik),e.component("reference-line-labels",yS),e.component("axis-overlay",XY.picassoComponents.axisOverlay),e.component("time-axis",XY.picassoComponents.timeAxis),e.scale("q-time-axis",XY.picassoScales.time),e}l(YK={},"equal-equal",[h$,g$]),l(YK,$K,[g$,v$]),l(YK,GK,[h$,p$]),l(YK,XK,[h$,g$]),l(YK,JK,[b$,y$,h$,p$]),l(YK,QK,[g$,y$,b$,p$]),l(YK,ZK,[g$,h$]),l(YK,e$,[h$,p$,m$]),l(YK,t$,[g$,y$,b$]),l(YK,n$,[h$]),l(YK,r$,[h$]),l(YK,i$,[h$,x$]),l(YK,o$,[v$]),l(YK,a$,[h$,x$,b$,p$,m$]),l(YK,s$,[h$,g$]),l(YK,u$,[h$]),l(YK,l$,[h$]),l(YK,c$,[h$,g$]),l(YK,f$,[h$,g$,b$]),l(YK,d$,[h$]);var S$={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function C$(e){var t=e.split("/");return"qmem:"===t[0]&&""===t[1]}function q$(e){var t,n,r,i,o;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(n=(void 0!==(t=e.session.options||e.enigmaModel.session.sessionConfig).secure?t.secure:t.isSecure)?"https://":"http://",r=t.host||"localhost",i=t.port?":".concat(t.port):"","/"!==(o=t.prefix?t.prefix:"/")[o.length-1]&&(o="".concat(o,"/")),n+r+i+o):""}function E$(e,t){var n=e.replace(t,"").replace(/^\.\.\//i,"/");return"/"!==n[0]?"/".concat(n):n}function T$(e,t){return t+("/"===e[0]?e.substr(1):e)}var D$=function(e,t){var n;function r(){n&&(clearTimeout(n),n=null)}function i(e){var t=e;t.onload=null,t.onerror=null,r()}var o={small:50,medium:200,large:340,original:340};return new Promise((function(a){var s=new Image;s.referrerPolicy="no-referrer",s.onload=function(){var e,n=s.height,u=s.width,l=o[t]*(n>u?1:n/u),c=o[t]*(u>n?1:u/n);!n||!u||0===n&&0===u?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(l,n),width:Math.min(c,u)},r()):(e={height:l,width:c},r()),a(e)},s.onerror=function(){i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((function(){i(s),a({height:20,width:20,imageError:!0})}),3e3)}))};function O$(e,t,n){return N$.apply(this,arguments)}function N$(){return(N$=o(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.ref.qStaticContentUrl.qUrl,(o=q$(r))&&(E$(i,o),i=T$(i=(i=i.replace(/"/g,'\\"')).replace(/'/g,"\\'"),o)),e.next=5,D$(i,n);case 5:return a=e.sent,s=a.height,u=a.width,l=a.imageError,e.abrupt("return",{src:i,size:n,height:s,width:u,imageError:l});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _$(e,t,n,r,i){return A$.apply(this,arguments)}function A$(){return(A$=o(regeneratorRuntime.mark((function e(t,n,r,i,o){var a,s,u,l,c,f,d,h,p,m,v,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=r.ref,o&&o.label&&(s=o.label),!(n.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=t&&t.getImage&&C$(s))){e.next=21;break}return e.prev=3,e.next=6,t.getImage(s);case 6:return u=e.sent,l="data:image/png;base64, ".concat(u),e.next=10,D$(l,i);case 10:c=e.sent,f=c.height,d=c.width,h=c.imageError,a={src:l,size:i,height:f,width:d,imageError:h},e.next=19;break;case 17:e.prev=17,e.t0=e.catch(3);case 19:e.next=28;break;case 21:return e.next=23,D$(s,i);case 23:p=e.sent,m=p.height,v=p.width,g=p.imageError,a={src:s,size:i,height:m,width:v,imageError:g};case 28:return e.abrupt("return",a);case 29:case"end":return e.stop()}}),e,null,[[3,17]])})))).apply(this,arguments)}function I$(e,t,n,r){return P$.apply(this,arguments)}function P$(){return(P$=o(regeneratorRuntime.mark((function e(t,n,r,i){var o,a,s,u,l,c,f,d,h,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=i.label,s=n.qFallbackTitle,!C$(u="qmem://".concat(s,"/").concat(a))){e.next=21;break}return e.prev=4,e.next=7,t.getImage(u);case 7:if(!(l=e.sent)){e.next=17;break}return c="data:image/png;base64, ".concat(l),e.next=12,D$(c,r);case 12:f=e.sent,d=f.height,h=f.width,p=f.imageError,o={src:c,size:r,height:d,width:h,imageError:p};case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(4);case 21:return e.abrupt("return",o);case 22:case"end":return e.stop()}}),e,null,[[4,19]])})))).apply(this,arguments)}function L$(e,t,n,r){return R$.apply(this,arguments)}function R$(){return(R$=o(regeneratorRuntime.mark((function e(t,n,r,i){var o,a,s,u,l,c,f,d,h,p,m,v,g,b,x,w,M,k;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=n.app,d=n.flags,h=null===(o=t.layout)||void 0===o||null===(a=o.tooltip)||void 0===a?void 0:a.imageComponents){e.next=4;break}return e.abrupt("return",[]);case 4:p=y(h,1),m=p[0],v=m.size||"small",g=m.type||"media",b=-1,x=0;case 9:if(!(x<r.length)){e.next=16;break}if(r[x].cId!==m.cId){e.next=13;break}return b=x,e.abrupt("break",16);case 13:x++,e.next=9;break;case 16:if(w=(null===(s=i.data)||void 0===s||null===(u=s.customTooltipAttrExps)||void 0===u?void 0:u.value)||[],-1!==b&&w[b]&&(M=w[b]),"media"!==g||null===(l=m.ref)||void 0===l||null===(c=l.qStaticContentUrl)||void 0===c||!c.qUrl){e.next=20;break}return e.abrupt("return",O$(m,v,f));case 20:if("url"!==g){e.next=22;break}return e.abrupt("return",_$(f,d,m,v,M));case 22:if(!(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===g&&M&&M.label)){e.next=25;break}return k=r[b],e.abrupt("return",I$(f,k,v,M));case 25:return e.abrupt("return",[]);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var j$=function(e){return o(regeneratorRuntime.mark((function t(){var n,r,i,o,a,s,u,l,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=e.customTooltipModel,r=e.nodes,i=e.attrExps,o=e.opts,a=r,s=[],u=0;u<a.length;u++)s.push(L$(n,o,i,a[u]));return t.next=6,Promise.all(s);case 6:for(l=t.sent,c=0;c<a.length;c++)a[c].data.customTooltipImages=[l[c]];return t.abrupt("return",a);case 9:case"end":return t.stop()}}),t)})))()},z$=function(e){var t,n,r=null===(t=e.customTooltipModel.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0},F$=function(e){return o(regeneratorRuntime.mark((function t(){var n,r,i,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.customTooltipModel,r=e.nodes,i=e.attrExps,o=e.opts,a=r,t.next=4,j$({customTooltipModel:n,nodes:r,attrExps:i,opts:o});case 4:return a=t.sent,t.abrupt("return",a);case 6:case"end":return t.stop()}}),t)})))()},B$=function(e){var t=e.customTooltipModel;return z$({customTooltipModel:t})};var V$=function(e,t){var n,r,i,o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,u=t;return{qInfo:{qType:S$.CHART.CHART_PARENT_TYPE,qId:S$.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:u}},H$=function(e){var t,n,r,i=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:S$.CHART.CHART_CHILD_TYPE},qExtendsId:i}};function U$(e){return W$.apply(this,arguments)}function W$(){return(W$=o(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,u,l,c,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.app,i=t.properties,o=t.customTooltipModel,null===(n=(a=o).miniChartToken.sessionObj)||void 0===n||!n.id){e.next=5;break}return e.next=5,r.destroySessionObject(a.miniChartToken.sessionObj.id);case 5:return s=S$.CHART.STATE,u=V$(i,s),e.next=9,r.createSessionObject(u);case 9:if(l=e.sent,c=H$(i),l.id===S$.CHART.CHART_OBJECT_ID){e.next=14;break}return r.destroySessionObject(l.id),e.abrupt("return",void 0);case 14:return a.miniChartToken.sessionObj=l,e.next=17,l.createChild(c);case 17:if(f=e.sent,a.miniChartToken.sessionObj&&a.miniChartToken.sessionObj.id===l.id){e.next=21;break}return r.destroySessionObject(l.id),e.abrupt("return",void 0);case 21:return a.miniChartToken.model=f,e.abrupt("return",f);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y$(e){return K$.apply(this,arguments)}function K$(){return(K$=o(regeneratorRuntime.mark((function e(t){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.app,r=t.customTooltipModel,i=r,o=S$.CHART.STATE,e.next=5,n.removeSessionAlternateState(o);case 5:i.miniChartToken.alternateState=void 0;case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $$(e){return G$.apply(this,arguments)}function G$(){return(G$=o(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,r=t.properties,i=t.customTooltipModel,o=i,a=S$.CHART.STATE,s=r.qStateName,o.miniChartToken.alternateState){e.next=9;break}return o.miniChartToken.alternateState=a,e.next=8,n.addSessionAlternateState(a,s);case 8:o.miniChartToken.alternateState=a;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var X$,J$,Q$={createContainer:function(e){var t,n,r=e.ctx,i=e.layout;if(!((null===(t=i.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var n,r,i,o,a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(i=r.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==n?n:"medium",s=S$.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:S$.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(r,i)},show:(J$=o(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,u,l,c,f,d,h,p,m,v,g,y,b;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.app,a=t.properties,s=t.selectedNodes,u=t.dimIndex,l=t.customTooltipModel,c=t.rtl,f=l,d=null==a||null===(n=a.tooltip)||void 0===n||null===(r=n.chart)||void 0===r||null===(i=r.object)||void 0===i?void 0:i.refId,null!=f&&f.embed&&o.removeSessionAlternateState&&o.addSessionAlternateState&&d&&!(a.qHyperCubeDef.qDimensions.length<=0)){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,Q$.hide({app:o,customTooltipModel:l});case 7:return e.prev=7,e.next=10,$$({app:o,properties:a,customTooltipModel:l});case 10:return e.next=12,U$({app:o,properties:a,customTooltipModel:l});case 12:if(h=e.sent,!(f.miniChartToken.alternateState&&f.miniChartToken.sessionObj&&h)){e.next=23;break}return v=s.map((function(e){var t;return null===(t=e.data)||void 0===t?void 0:t.value})).filter((function(e){return void 0!==e})),g=void 0!==u?u:a.qHyperCubeDef.qDimensions.length-1,f.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",g,v,!1),y=document.getElementById(S$.CHART.CONTAINER_ID),b={direction:c?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1},e.next=22,l.embed.render({element:y,model:f.miniChartToken.model,options:b,id:null===(p=f.miniChartToken.model)||void 0===p?void 0:p.id,type:null===(m=f.miniChartToken.model)||void 0===m?void 0:m.genericType});case 22:f.miniChartToken.vis=e.sent;case 23:e.next=29;break;case 25:return e.prev=25,e.t0=e.catch(7),e.next=29,Q$.hide({app:o,customTooltipModel:l});case 29:case"end":return e.stop()}}),e,null,[[7,25]])}))),function(e){return J$.apply(this,arguments)}),hide:(X$=o(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,r=t.customTooltipModel,null!=(i=r)&&i.embed){e.next=4;break}return e.abrupt("return");case 4:return Q$.destroyVisualization({customTooltipModel:r}),e.next=7,n.destroySessionObject(S$.CHART.CHART_OBJECT_ID);case 7:return i.miniChartToken.sessionObj=void 0,e.next=10,Y$({app:n,customTooltipModel:r});case 10:case"end":return e.stop()}}),e)}))),function(e){return X$.apply(this,arguments)}),destroyVisualization:function(e){var t,n,r=e.customTooltipModel;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function Z$(e,t){var n=t,r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[S$.CUSTOM.QUARANTINE]=[],e.forEach((function(e){r.quarantine[S$.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}function eG(e){var t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function tG(){var e=S$.CUSTOM,t=e.EXPRESSION,n=e.TITLE,r=e.DESCRIPTION,i=e.IMAGES,o={};return o[t]=!0,o[n]=!0,o[r]=!0,o[i]=!0,o}function nG(e){var t=tG();return e.filter((function(e){return t[e.id]}))}var rG={getNodes:function(e,t){var n=function(e,t){var n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);var i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes:function(e,t){var n,r=[],i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((function(t){var o,a,s,u,l=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!l||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[t.type]){if(null!==(u=t.data)&&void 0!==u&&u.customTooltipAttrExps&&!t.data.customTooltipImages){var c=t;c.data.customTooltipImages=[],r.push(c)}}else{n||(n=[],Object.keys(i).forEach((function(t){n=n.concat(e.findShapes(t).filter((function(e){return e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key]})))})));var f=n.filter((function(e){var t,n,r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===l.value&&r.label===l.label}));f.length>0&&(r=r.concat(f[0]))}})),r},displayTooltip:function(e,t,n){var r=n.nodes,i=n.opts,o=void 0===i?{}:i,a=n.customTooltipModel,s=n.extractedNodes,u=void 0===s?[]:s,l=n.hide;if(a&&!l){var c=a.layout,f=a.chart,d=rG.getAttrExprData(c).attrExps;u.length||r.length?F$({customTooltipModel:a,nodes:rG.getDataNodes(f,u.length>0?u:r),attrExps:d,opts:o}).then((function(){t.emit("show",e,r.length?{nodes:r}:void 0)})):t.emit("show",e,r.length?{nodes:r}:void 0)}else{var h,p;null!==(h=o.flags)&&void 0!==h&&h.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!=a&&null!==(p=a.miniChartToken)&&void 0!==p&&p.alternateState&&Q$.hide({app:o.app,customTooltipModel:a}),t.emit("hide")}},checkIfPromisesExist:function(e){var t=e.customTooltipModel;return B$({customTooltipModel:t})},getAttrExps:function(e,t){var n,r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData:function(e){var t,n=[],r="",i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s,u=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.qDimensionInfo)||void 0===a||null===(s=a[u])||void 0===s?void 0:s.qAttrExprInfo)||[],r="qDimensionInfo/".concat(u,"/qAttrExprInfo")}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[S$.CUSTOM.QUARANTINE];if(!i){var o=r.qAttributeExpressions||[],a=nG(o);Z$(a,e)}},unquarantineCustomTooltipAttrs:function(e){var t,n,r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[S$.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[S$.CUSTOM.QUARANTINE]},setAttrsFromQuarantine:function(e,t){var n=eG(e);if(n){var r=void 0!==t?t:n.length-1;if(n[r]){var i=this.getAttrExps(e,n[r]);if(0===nG(i).length){var o,a,s=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],u=[].concat(b(i),b(s)),l=e;l.qHyperCubeDef?l.qHyperCubeDef.qDimensions[r].qAttributeExpressions=u:l.qHyperCube.qDimensionInfo[r].qAttrExprInfo=u}}}},moveCustomTooltipAttrs:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=[],i=eG(e)||[],o=[].concat(b(i),[t]);o.forEach((function(e){var t=nG(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));var a=tG(),s=i.map((function(e){var t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((function(e){return!a[e.id]})),t})),u=void 0!==n?n:s.length-1;s.length>0&&(s[u].qAttributeExpressions=s[u].qAttributeExpressions.concat(r));var l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=s:l.qHyperCube.qDimensionInfo=s},addCallbackCustomTooltip:function(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip:function(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip:function(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip:function(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows:function(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50};function iG(e,t,n,r){var i,o,a,s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[n])||void 0===o||null===(a=o[r])||void 0===a?void 0:a.qAttrExprInfo)||[],u=[],l=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return l?(s.forEach((function(e,t){var i=l.qValues&&l.qValues[t]?l.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){var n;switch(e.id){case S$.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case S$.CUSTOM.TITLE:case S$.CUSTOM.DESCRIPTION:case S$.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);u.push({source:{key:"qHyperCube",field:"".concat(n,"/").concat(r,"/qAttrExprInfo/").concat(t)},label:o,value:"value"})})),u):u}var oG=function(e,t){var n=t.dimensionCount;if(n&&!(n<1)){var r=n-1,i="qDimensionInfo";return{field:"".concat(i,"/").concat(r),value:function(t){return iG(t,e,i,r)}}}};var aG=function(e,t,r){var i,o,a={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},s=(null===(i=t.data)||void 0===i||null===(o=i.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];return Number.isNaN(s)?a:function(e,t,r,i){var o,a=(l(o={},S$.CUSTOM.TITLE,!0),l(o,S$.CUSTOM.DESCRIPTION,!0),o),s=rG.getAttrExprData(e),u=s.attrExps,c=s.fieldPath;return 0===t.length||0===u.length||""===c||u.forEach((function(e,o){var s=t[o];if(e.id===S$.CUSTOM.EXPRESSION&&s){var u=e.qFallbackTitle,l="NaN"===s.value||e.isCustomFormatted?s.value:r("qHyperCube").field("".concat(c,"/").concat(o)).formatter()(s.value);i.customTooltipAttrExpsArr.push({label:u,value:l})}else if(a[e.id]&&s){var f="-"!==s.value&&"NaN"!==s.value?s.value:s.label;f&&"undefined"!==f&&i.customTooltipInfoAttrExpsArr.push(n(n({},e.id===S$.CUSTOM.TITLE&&{title:f}),{},{value:f,id:e.id}))}})),i}(r,s.map((function(t){return sy.getMeasure(e,t)})),e,a)};function sG(e){return function(e,t,n){var r=[];return e.forEach((function(e){r.push(aG(n,e,t))})),r}(e.nodes,e.layout,e.dataset).reduce((function(e,t){return{customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)}}),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function uG(e){var t=S$.CUSTOM.EXPRESSION,n=e.qDef,r=n.qNumFormat,i=n.qLabel,o=n.qLabelExpression,a=n.cId;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:r,qLabel:i,qLabelExpression:o,cId:a}:{qExpression:e.qDef.qDef,id:t,qNumFormat:r,qLabel:i,qLabelExpression:o,cId:a}}function lG(e){var t,n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var cG={attrExpr:{migrateProperties:function(e){var t,n,r,i,o=Tg(!0,{},e),a=(null===(t=o.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],s=lG(o);return function(e,t){var n,r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(s=function(e,t){return t.concat(e.map((function(e){return uG(e)})))}(a,s),o),null===(i=o.tooltip)||void 0===i||delete i.data,o},getPatches:function(e){var t,n,r,i,o=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qDimensions.length)-1;return function(e,t,n){var r=e.length,i=[];return t.forEach((function(e){var t=uG(e),o=JSON.stringify(t);i.push({qPath:"/qHyperCubeDef/qDimensions/".concat(n,"/qAttributeExpressions/").concat(r),qOp:"add",qValue:o}),r++})),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(lG(e),o,a)},checkForBackwardCompatibility:function(e,t){return(e.qMeasureInfo||[]).length>0&&t.length>0},updateProperties:function(e,t){var n=this;return new Promise((function(r){var i,o,a,s,u,l=(null===(i=t.qHyperCube)||void 0===i?void 0:i.qDimensionInfo)||[],c=(null===(o=t.tooltip)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.qHyperCube)||{},f=null===(s=t.qMeta)||void 0===s||null===(u=s.privileges)||void 0===u?void 0:u.includes("update");e&&e.getEffectiveProperties&&n.checkForBackwardCompatibility(c,l)&&e.getEffectiveProperties().then((function(t){if(f){var i=n.migrateProperties(t);e.setProperties(i).then((function(){e.app.clearUndoBuffer(),r(!0)}))}else{var o=n.getPatches(t);e.applyPatches(o,!0).then((function(){e.app.clearUndoBuffer(),r(!0)}))}})),r(!1)}))}}},fG=function(e){if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){var t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&Bg(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},dG=function(e,t){t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&Bg(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&Bg(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},hG=function(e){if(e.qHyperCubeDef){var t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}},pG=function(e,t){var n=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===r.length){var i=n[0];return i.qLibraryId?t.getDimension(i.qLibraryId).then((function(e){return e.getLayout()})).then((function(t){if(t&&t.qDimInfos&&t.qDimInfos[0]){var n=t.qDimInfos[0].qCardinal;dG(e,n)}return i})):t.getField(i.qDef.qFieldDefs[0]).then((function(t){return t.getCardinal().then((function(t){return dG(e,t),i}))}),(function(){return i}))}return fG(e),Promise.resolve()};function mG(e){var t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,r=e.color.mode;t.length>1&&e.color?MH(e,"color.persistent",!0):"byDimension"===r&&n.length>1?MH(e,"color.mode","byMultiple"):"byExpression"===r&&0===n.length?MH(e,"color.mode","primary"):0===t.length&&n.length>0&&(MH(e,"color.byMeasureDef",void 0),MH(e,"color.byDimDef",void 0),1===n.length&&MH(e,"color.mode","primary"))}var vG=function(e,t,n){mG(t),nb(e),n.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&rG.addCallbackCustomTooltip(t)},gG=function(e){mG(e)};function yG(e){var t=e.translator,n=e.flags;return{dimensions:{min:0,max:function(e){return e>1?1:2},description:function(e,n,r){var i,o=e.qHyperCubeDef.qDimensions.length;return r.isAutoChart&&n>o-1?i="Visualizations.Descriptions.Color":o>1&&0===n?"stacked"===e.barGrouping.grouping?i="Visualizations.Descriptions.Stack":(i="Visualizations.Descriptions.Group",e.qHyperCubeDef.qColumnOrder=[0,1,2]):i="Visualizations.Descriptions.Bars",t.get(i)},add:function(e,t,r){return t.qHyperCubeDef.qDimensions.length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),null!=r&&r.app?pG(t,r.app).then((function(){return vG(e,t,n),e})):(hG(t),vG(e,t,n),e)},move:function(e,t){t.qHyperCubeDef.qDimensions.length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),fG(t),mG(t),n.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&rG.moveCallbackCustomTooltip(t,e)},remove:function(e,t){var r=t.qHyperCubeDef.qDimensions;mG(t),1===r.length&&(t.qHyperCubeDef.qMode="S"),n.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&rG.removeCallbackCustomTooltip(t,e)},replace:function(e,t,r,i){n.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&rG.replaceCallbackCustomTooltip(i,t)}},measures:{min:1,max:function(e){return e>1?1:15},description:function(){return t.get("Visualizations.Descriptions.LengthBars")},add:function(e,t,n){return null!=n&&n.app?pG(t,n.app).then((function(){return e.qSortBy.qSortByNumeric=-1,gG(t),e})):(hG(t),gG(t),e)},move:function(e,t){fG(t),mG(t)},remove:function(e,t){var n=t.qHyperCubeDef.qDimensions;mG(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function bG(e){return{properties:{version:"1.12.11",barGrouping:{grouping:"grouped"},color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[],dataPoint:{showLabels:!1,showSegmentLabels:!1,showTotalLabels:!0},dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},footnote:"",gridLine:{auto:!0,spacing:2},legend:{dock:"auto",show:!0,showTitle:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},orientation:"vertical",preferContinuousAxis:!0,qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},refLine:{refLines:[],dimRefLines:[]},scrollbar:"miniChart",scrollStartPos:0,showDetails:!1,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[n({path:"/qHyperCubeDef"},yG(e))]}}}var xG={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}}};function wG(t){var n=t.env,r=n.flags,i=e.useTranslator();!function(e){if(e&&e.get&&e.add){var t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(xG).forEach((function(t){e.add(xG[t])}))}}(n.translator);var o=e.useEmbed(),a=e.useTheme(),s=y(e.useState(),2),u=s[0],l=s[1],c=e.useDeviceType(),f=e.useAppLayout().localeInfo;return e.useEffect((function(){l({translator:i,theme:a,embed:o,deviceType:c,localeInfo:f,flags:r})}),[f,i.language(),a.name(),c]),u}function MG(){return{viewCache:y(e.useState((function(){return kH()})),1)[0],viewState:y(e.useState((function(){return function(e){var t=PB({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({viewRange:[0,1],scrollOffset:void 0})})),1)[0]}}var kG="REJECTED",SG=function(){},CG=1e4,qG=2,EG=20,TG=200,DG=10;var OG={contains:function(e,t){if(!e)return!1;var n=e.qArea;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function(e){var t=e.layoutService,n=function(e){e.qArea.qHeight=e.qMatrix.length,e.qArea.qWidth=t.meta.size.x};return n.should=function(e){return 0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length},n},slicer:function(e,t){for(var n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),u=Math.max(0,o-e.qArea.qLeft),l=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:l-u,qTop:i,qLeft:o},qMatrix:[]},f=a;f<s;f++)c.qMatrix.push(e.qMatrix[f].slice(u,l));return c},cacheWarden:function(e){var t=e.bounds,n=void 0===t?{width:0,height:0}:t;return{release:function(e,t){var r=t.qTop-DG<=e.qTop,i=t.qLeft+t.qWidth+DG>=e.qLeft+e.qWidth,o=t.qTop+t.qHeight+DG>=e.qTop+e.qHeight,a=t.qLeft-DG<=e.qLeft;return r&&e.qTop>0||i&&e.qLeft+e.qWidth<n.width||o&&e.qTop+e.qHeight<n.height||a&&e.qLeft>0}}},request:function(e){var t=e.definitionPath;return function(e){return{method:"getHyperCubeData",args:[t,[e]]}}}};var NG={contains:function(e,t){if(!e)return!1;var n=e.qArea;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function(e){var t=e.layoutService,n=function(e){e.qArea.qHeight=e.qData[0].qSubNodes.length,e.qArea.qWidth=t.meta.size.x};return n.should=function(e){return 0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length},n},slicer:function(e,t){for(var r=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+r-e.qArea.qTop,e.qArea.qHeight),u=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-i-(s-a),l={qArea:{qHeight:s-a,qWidth:e.qArea.qWidth,qTop:i,qLeft:o},qData:[n(n({},e.qData[0]),{},{qUp:i,qDown:u,qSubNodes:[]})]},c=a;c<s;c++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[c]);return l},cacheWarden:function(e){var t=e.bounds,n=void 0===t?{height:0}:t;return{release:function(e,t){var r=t.qTop-DG<=e.qTop,i=t.qTop+t.qHeight+DG>=e.qTop+e.qHeight;return r&&e.qTop>0||i&&e.qTop+e.qHeight<n.height}}},request:function(e){var t=e.layoutService,n=e.definitionPath,r=t.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return function(e){var t={method:"getHyperCubeStackData",args:[n,[e]]};return"auto"===r&&t.args.push(600),t}}};var _G={contains:function(){return!1},patcher:function(){var e=function(e){return e};return e.should=function(){return!1},e},slicer:function(e){return e},cacheWarden:function(){return{release:function(){return!0}}},request:function(e){var t=e.definitionPath;return function(e){return{method:"getHyperCubeTreeData",args:[t,[e]]}}}};var AG="pages";var IG="discretePan";function PG(e){var t,n=e.chart,r=e.actions,i=e.componentKey,o=e.dockService,a=e.rtl,s=e.scroller;return{type:"Pan",key:"discrete:pan",options:{event:IG,pointers:1,threshold:10,enable:function(e,t){return this.started===IG||!t||!!r.scroll.enabled()&&n.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key===i}))}},events:(t={},l(t,"".concat(IG,"start"),(function(e){e.preventDefault(),this.started=IG;var t="horizontal"===o.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10})),l(t,"".concat(IG,"move"),(function(e){e.preventDefault();var t="horizontal"===o.meta.major.orientation,n=t?e.deltaX:e.deltaY,r=t&&a?-1:1,i=(n-this.previousTotalDelta)*r;this.previousTotalDelta=n,s.scroll(i)})),l(t,"".concat(IG,"end"),(function(e){e.preventDefault(),this.started=!1})),l(t,"".concat(IG,"cancel"),(function(e){e.preventDefault(),this.started=!1})),t)}}function LG(e){var t=e.chart,n=e.componentKey,r=e.actions,i=e.scroller;return function(e){if(r.scroll.enabled()&&y(t.componentsFromPoint({x:e.clientX,y:e.clientY}).filter((function(e){return e.key===n})),1)[0]){e.preventDefault();var o=Math.abs(e.deltaY)>Math.abs(e.deltaX)?e.deltaY:e.deltaX,a=100*Math.sign(-o);i.scroll(a)}}}function RG(e){var t=e.layoutService,n=void 0===e.areaBuffer?function(e){var t=e.layoutService,n=Math.floor(CG/(t.meta.dimensionCount+t.meta.measureCount));return function(e){var t=e.width,r=e.height,i=Math.min(n,Math.max(TG,r));return{width:t,height:Math.max(EG,Math.min(r*qG,i))}}}({layoutService:t}):function(e){var t=e.layoutService,n=Math.floor(CG/(t.meta.dimensionCount+t.meta.measureCount));return function(e){var t=e.width,r=e.height;return{width:t,height:Math.min(n,r)}}}({layoutService:t}),r={width:t.meta.size.x,height:t.meta.size.y};return function(e){var t=n({width:e.qWidth,height:e.qHeight}),i=t.width,o=t.height,a=o?Math.ceil((o-e.qHeight)/2):0,s=i?Math.ceil((i-e.qWidth)/2):0;return{qHeight:o?Math.min(o,r.height):e.qHeight,qWidth:i?Math.min(i,r.width):e.qWidth,qTop:o?Math.max(0,Math.min(e.qTop-a,r.height-o)):e.qTop,qLeft:i?Math.max(0,Math.min(e.qLeft-s,r.width-i)):e.qLeft}}}function jG(e){var t,n,r=function r(i){var o=(t=i).request,a=o.method,s=o.args;e[a].apply(e,b(s)).then((function(e){if(t.canceled||n)return t.reject(kG),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},i=function(e){return new Promise((function(i,o){var a={request:e,resolve:i,reject:o,canceled:!1,cancel:function(){a.canceled=!0}};t?function(e){n&&n.reject(kG),n=e}(a):r(a)}))};return i.isProcessing=function(){return!!t},i.hasQueued=function(){return!!n},i.cancel=function(){i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(kG),n=null)},i}var zG={command:{update:function(){}}};function FG(e){var t=e.dataStore,n=e.composition,r=e.enigmaModel,i=e.layoutService,o=e.trendLineModel,a=void 0===o?zG:o,s=e.definitionPath,u=e.areaBuffer,l=e.processDataPage,c=n.slicer,f=n.cacheWarden,d=n.request,h=function(e){var t=e.dataStore,n=e.slice,r=e.warden,i=e.expand,o=e.request,a=e.process,s=e.connectionless,u=e.processDataPage;return function(e){var l=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).onProcessing;if(t.contains(e)){var c=t.getCurrent();if(s)return Promise.resolve(n(c,e));var f=r.release(c.qArea,e),d=a.isProcessing();if(!f&&d&&a.cancel(),!f||d)return Promise.resolve(n(c,e))}if(s)return Promise.resolve(t.getCurrent());a.isProcessing()&&l&&l();var h=i(e);return a(o(h)).then((function(r){return u(r),t.add(r),n(r,e)}))}}({dataStore:t,slice:c,warden:f({bounds:{width:i.meta.size.x,height:i.meta.size.y}}),expand:RG({layoutService:i,areaBuffer:u}),request:d({layoutService:i,definitionPath:s}),process:jG(r),connectionless:i.meta.isSnapshot,processDataPage:l}),p=qH((function(e,t){var n=t.onProcessing,r=t.onData;h(e,{onProcessing:n}).then((function(e){return r(e)})).catch((function(e){if(e!==kG)throw e}))}),50);return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.onProcessing,r=void 0===n?SG:n,o=t.onDataPage,s=void 0===o?SG:o;p(e,{onProcessing:r,onData:function(e){i.setDataPages(e?[e]:[]),a.command.update(),s(e)}})}}var BG={inTotal:function(e){return e.layoutService.meta.size.x},area:function(e){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.layoutService.meta.size.x}},scaleRange:function(e){var t=e.layoutService,n=e.offsets,r=e.items,i=e.viewSize,o=n.pixel,a=t.getDataPages()[0],s=o/i;return[s,r.inView>=r.inTotal?s+1:s+a.qArea.qWidth/r.inView]}};var VG={inTotal:function(e){var t=e.layoutService;if(t.meta.isSnapshot&&!t.getLayoutValue("reducedHyperCube")){var n=y(t.getDataPages(),1)[0];if(n)return n.qArea.qHeight}return t.meta.size.y},area:function(e){var t=e.layoutService,n=e.itemOffset,r=e.inView,i=e.areaBuffer,o=void 0===i?4:i,a=Math.max(0,Math.floor(n)-o/2);return{qTop:a,qHeight:Math.min(t.meta.size.y-a,Math.max(0,Math.ceil(r+o))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function(e){var t=e.layoutService,n=e.offsets,r=e.items,i=e.viewSize,o=n.pixel,a=t.getDataPages()[0],s=i/r.inView,u=(o+a.qArea.qTop*s)/i;return[u,r.inView>=r.inTotal?u+1:u+a.qArea.qHeight/r.inView]}};function HG(e){var t=e.meta,n=t.groupSize,r=t.measureCount;return null!=n?n:r}function UG(e,t){for(var n=[],r=0;r<e.length;r++){var i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function WG(e){return UG(e.qMatrix,(function(e){return e[0].qElemNumber}))-1}var YG={inTotal:function(e){var t=e.layoutService,n=HG(t);return t.meta.size.y*n*(1+1/n)-1},area:function(e){var t=e.layoutService,n=e.itemOffset,r=e.inView,i=e.areaBuffer,o=HG(t),a=void 0===i?o:i,s=n/(o+1),u=Math.max(0,Math.floor((n-s-a/2)/o));return{qTop:u,qHeight:Math.min(t.meta.size.y-u,Math.max(0,Math.ceil((r+a)/o+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function(e){var t=e.layoutService,n=e.offsets,r=e.items,i=e.viewSize,o=HG(t),a=t.getDataPages()[0],s=i/r.inView,u=n.pixel,l=WG(a),c=a.qArea.qHeight*o+l,f=(u+(a.qArea.qTop*o+a.qArea.qTop)*s)/i;return[f,r.inView>=r.inTotal?f+1:f+c/r.inView]}};var KG=function(e,t){return t/(e.meta.size.y/e.meta.size.dimensions[0]+1)};function $G(e){return{itemOffset:function(t,n){if(0!==t.qArea.qTop)return KG(e,n);var r=function(e,t){for(var n={successful:!0,count:0},r=Math.abs(Math.floor(t)),i=[],o=0;o<=r;o++){if(!e[o])return n.successful=!1,n;var a=e[o][0].qElemNumber;-1===i.indexOf(a)&&(i.push(a),r--)}return n.count=i.length-1,n}(t.qMatrix,n);return r.successful?r.count:KG(e,n)},area:function(t,n,r){return 0!==t.qArea.qTop?KG(e,n):UG(t.qMatrix.slice(0,r.qTop+1),(function(e){return e[0].qElemNumber}))-1}}}var GG={inTotal:function(e){var t=e.layoutService;return t.meta.size.y+t.meta.size.dimensions[0]-1},area:function(e){var t=e.getDataPages,n=e.layoutService,r=e.itemOffset,i=e.inView,o=$G(n).itemOffset(t(),r),a=Math.max(0,Math.floor(r-o));return{qTop:a,qHeight:Math.min(n.meta.size.y-a,Math.max(0,Math.ceil(i+1))),qLeft:0,qWidth:n.meta.size.x}},scaleRange:function(e){var t=e.getDataPages,n=e.layoutService,r=e.offsets,i=e.items,o=e.viewSize,a=e.upperBound,s=n.getDataPages()[0],u=o/i.inView,l=r.item,c=r.pixel,f=$G(n).area(t(),l,s.qArea),d=WG(s),h=s.qArea.qHeight+d,p=c===a?(i.inView-h)*u/o:(c+(s.qArea.qTop+f)*u)/o;return[p,i.inView>=i.inTotal?p+1:p+h/i.inView]}};function XG(e){var t=e.rect,n=e.dockService,r=e.itemWidths,i=e.dimensionAxis,o=e.inTotal,a=e.isMajorVisible,s=e.isMajorLabelless,u=e.maxDataRows,l=r[n.meta.chart.mode],c=l.DEFAULT,f=l.SQUEEZE,d=l.LABELLESS,h=i.axisDisplayMode,p=void 0===h?"auto":h,m=i.maxVisibleItems,v=void 0===m?10:m,g="horizontal"===n.meta.major.orientation?t.width:t.height,y=g/o>=f;switch(p){case"max":return Math.min(o,u);case"custom":return Math.min(v,u);case"auto":default:return!a||s?g/d:y?o:g/c}}function JG(e){var t=e.chart,n=e.getRect,r=e.getDataPages,i=e.layoutService,o=e.dockService,a=e.getItemWidths,s=e.axisKey,u=e.areaBuffer,l=e.rtl,c=function(e){var t=e.layoutService.meta,n=t.isDimensionless,r=t.isGrouped,i=t.isGroupedByMeasure;return n?BG:r?i?YG:GG:VG}({layoutService:i}),f=c.inTotal,d=c.area,h=c.scaleRange,p=function(){return"horizontal"===o.meta.major.orientation?n().width:n().height},m=function(e){return e?p()/e:0},v=function(e,t){return-(e-t)*m(t)};return{getItems:function(){var e=i.getLayoutValue("dimensionAxis"),r=f({layoutService:i}),u=t.component(s),l=!s||!u||u.isVisible();return{inTotal:r,inView:XG({rect:n(),dockService:o,itemWidths:a(),dimensionAxis:e,inTotal:r,isMajorVisible:l,isMajorLabelless:"none"===e.show||"title"===e.show,maxDataRows:Math.floor(CG/(i.meta.dimensionCount+i.meta.measureCount))})}},getItemSize:function(e){var t=e.items.inView;return m(t)},getOffsets:function(e){var t=e.pixelOffset,n=e.items,r=n.inTotal,i=n.inView,o=Math.min(0,Math.max(t,v(r,i)));return{pixel:o,item:i?Math.abs(i*o/p()):0}},getUpperBound:function(e){var t=e.items,n=t.inTotal,r=t.inView;return v(n,r)},getViewRange:function(e){var t=e.pixelOffset,n=e.items,r=n.inTotal,i=n.inView;return function(e){var t=e.viewSize,n=e.inTotal,r=e.inView,i=e.pixelOffset,o=t/r*n,a=Math.abs(i)/o;return[a,a+t/o]}({viewSize:p(),inTotal:r,inView:i,pixelOffset:t})},getArea:function(e){var t=e.itemOffset,n=e.items;return d({getDataPages:r,layoutService:i,itemOffset:t,inView:n.inView,areaBuffer:u})},getScaleRange:function(e){var t=e.offsets,n=e.items,a=h({getDataPages:r,layoutService:i,offsets:t,items:n,viewSize:p(),upperBound:v(n.inTotal,n.inView)});return"horizontal"===o.meta.major.orientation&&l?function(e){return[1-e[1],1-e[0]]}(a):a},validate:{offset:function(e){var t=e.pixelOffset,n=e.items,r=n.inTotal,i=n.inView;return t<=0&&t>=v(r,i)}},convert:{itemToPixelOffset:function(e){var t=e.itemOffset,n=e.items.inView,r=t*m(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset:function(e){var t=e.relativeOffset,n=e.items,r=n.inTotal,i=n.inView;return-t*(m(i)*r)}}}}function QG(e){var t=e.chart,n=e.componentKey,r=e.state,i=e.dataStore,o=e.pageData,a=e.layoutService,s=e.dockService,u=e.itemWidths,l=e.getRect,c=e.axisKey,f=e.areaBuffer,d=e.viewState,h=e.rtl;r.set("rect",{width:0,height:0}),r.set("itemWidths",{}),r.set("itemSize",0),r.set("items",{}),r.set("offsets",{}),r.set("finished",0),r.set("scaleRange",[0,1]);var p=JG({chart:t,getRect:function(){return r.get("rect")},getDataPages:i.getCurrent,layoutService:a,dockService:s,getItemWidths:function(){return r.get("itemWidths")},axisKey:c,areaBuffer:f,rtl:h}),m=function(){var e=p.getItems();return r.set("items",e),e},v=function(e){var t=e.pixelOffset,n=e.items,i=p.getOffsets({pixelOffset:t,items:n});return r.set("offsets",i),i},g=function(e){var t=Date.now(),n=m(),i=v({pixelOffset:e,items:n}),s=p.getArea({itemOffset:i.item,items:n});if(function(e){var t=y(a.getDataPages(),1)[0].qArea;return!!t&&Object.keys(e).every((function(n){return e[n]===t[n]}))}(s))(p.validate.offset({pixelOffset:e,items:n})||d.get("scrollOffset")!==i.item)&&(r.set("finished",t),r.set("scaleRange",p.getScaleRange({offsets:i,items:n})),d.preventSet("viewRange",p.getViewRange({pixelOffset:i.pixel,items:n})),d.set("scrollOffset",i.item));else{d.preventSet("viewRange",p.getViewRange({pixelOffset:i.pixel,items:n}));var u=function(){r.get("finished")>t||(r.set("finished",t),r.set("scaleRange",p.getScaleRange({offsets:i,items:n})),d.set("scrollOffset",i.item))};o(s,{onProcessing:u,onDataPage:u})}};return{enabled:function(){var e=r.get("items");return e.inTotal>e.inView},itemSize:function(){return r.get("itemSize")},scaleRange:function(){return r.get("scaleRange")},initialize:function(){var e=t.component(n);if(!e)return Promise.resolve();r.set("rect","function"==typeof l?l():e.rect),r.set("itemWidths","function"==typeof u?u():u);var i=m();r.set("itemSize",p.getItemSize({items:i}));var s=void 0===d.get("scrollOffset")?function(e){var t=e.items;return 1===a.getLayoutValue("scrollStartPos")?p.getUpperBound({items:t}):0}({items:i}):p.convert.itemToPixelOffset({itemOffset:d.get("scrollOffset"),items:i}),c=v({pixelOffset:s,items:i});d.preventSet("viewRange",p.getViewRange({pixelOffset:c.pixel,items:i}));var f=p.getArea({itemOffset:c.item,items:i});return new Promise((function(e){o(f,{onDataPage:function(){r.set("scaleRange",p.getScaleRange({offsets:c,items:i})),d.preventSet("scrollOffset",c.item),e()}})}))},scroll:function(e){var t=r.get("offsets").pixel+e;g(t)},scrollToRelative:function(e){var t=r.get("items"),n=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});g(n)}}}function ZG(e){var t=e.chart,n=e.actions,r=e.componentKey,i=e.enigmaModel,o=e.layoutService,a=e.dockService,s=e.trendLineModel,u=e.itemWidths,l=e.viewState,c=e.rtl,f=e.options,d=(f=void 0===f?{}:f).definitionPath,h=void 0===d?"/qHyperCubeDef":d,p=f.getRect,m=void 0===p?void 0:p,v=f.axisKey,g=void 0===v?void 0:v,y=f.areaBuffer,b=void 0===y?void 0:y,x=f.processDataPage,w=void 0===x?function(){}:x,M=kH(),k=function(e){switch(e.qMode){case"S":default:return OG;case"K":return NG;case"T":return _G}}({qMode:o.getHyperCubeValue("qMode")}),S=function(e){var t=e.state,n=e.contains;return t.set(AG,[]),{add:function(e){var n=t.get(AG);n.length=0,n.push(e)},getCurrent:function(){return t.get(AG)[0]},getAll:function(){return t.get(AG)},contains:function(e){return n(t.get(AG)[0],e)}}}({state:M,contains:k.contains});!function(e){var t=e.layoutService,n=e.dataStore,r=e.composition,i=t.getDataPages()[0];if(i){var o=r.patcher({layoutService:t});o.should(i)&&o(i),n.add(i)}}({layoutService:o,dataStore:S,composition:k});var C=function(e){var t=e.buffer;return void 0===t?void 0:2*Math.round(t/2)}({buffer:b}),q=FG({dataStore:S,composition:k,enigmaModel:i,layoutService:o,trendLineModel:s,definitionPath:h,areaBuffer:C,processDataPage:w}),E=QG({chart:t,componentKey:r,state:M,dataStore:S,pageData:q,layoutService:o,dockService:a,itemWidths:u,getRect:m,axisKey:g,areaBuffer:C,viewState:l,rtl:c}),T=function(e){var t=e.layoutService,n=e.dataStore;return function(e){var r=wH(e,"".concat(t.refs.dataPages));r.length=0,r.push(n.getCurrent())}}({layoutService:o,dataStore:S});return{interactions:function(e){var t=e.chart,n=e.actions,r=e.componentKey,i=e.dockService,o=e.rtl,a=e.scroller;return{gestures:[PG({chart:t,actions:n,componentKey:r,dockService:i,rtl:o,scroller:a})],native:{type:"native",events:{wheel:LG({chart:t,actions:n,componentKey:r,scroller:a})}}}}({chart:t,actions:n,componentKey:r,dockService:a,rtl:c,scroller:E}),query:{getCanScroll:function(){return E.enabled()},getItemSize:function(){return E.itemSize()},getScaleRange:function(){return E.scaleRange()},getCurrentDataPage:function(){return S.getCurrent()}},command:{initialize:function(){return E.initialize()},scrollTo:function(e){return E.scrollToRelative(e)},setSnapshotData:function(e){return T(e)}}}}var eX="AVERAGE",tX="LINEAR",nX="POLYNOMIAL2",rX="POLYNOMIAL3",iX="POLYNOMIAL4",oX="EXPONENTIAL",aX="LOG",sX="POWER";function uX(e){var t=e.dimValue,n=e.value,r=e.qTrendLine,i=r.qType,o=r.qCoeff,a={x:t,y:o[2]*Math.pow(n,2)+o[1]*n+o[0]};switch(i){default:case nX:return a;case rX:return a.y+=o[3]*Math.pow(n,3),a;case iX:return a.y+=o[4]*Math.pow(n,4)+o[3]*Math.pow(n,3),a}}var lX={average:function(e){return{x:e.dimValue,y:e.qTrendLine.qCoeff[0]}},linear:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:r.qCoeff[1]*n+r.qCoeff[0]}},polynomial2:uX,polynomial3:uX,polynomial4:uX,exponential:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:Math.exp(r.qCoeff[0]+n*r.qCoeff[1])}},log:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:r.qCoeff[1]+r.qCoeff[0]*Math.log(n)}},power:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:Math.pow(10,r.qCoeff[0]+r.qCoeff[1]*Math.log(n)*Math.LOG10E)}}};function cX(e,t){for(var n=lX[t.qType.toLowerCase()],r=Math.max(1,e/500),i=1/0,o=-1/0,a=0;a<e;a+=r){var s=n({dimValue:null,value:a+1,qTrendLine:t}).y;i=Math.min(s,i),o=Math.max(s,o)}return{min:i,max:o}}function fX(e){return lX[e.qType.toLowerCase()]}function dX(e,t){return e.meta.isContinuous?function(e,t){return{generate:function(e,n,r){var i=[],o=fX(e),a=t.get("zoom"),s=a.min,u=a.max,l=(u-s)/100;if(l>0){for(var c=function(t){var a=o({dimValue:t,value:t,qTrendLine:e});a.layerId=n,a.measureIndex=r,a.dimValue=t,i.push(a)},f=s,d=s;d<=u;d+=l)c(d),f=d;f!==u&&c(u)}return i},calculate:function(e,t){return fX(e)({dimValue:t,value:t,qTrendLine:e})},findMinMax:function(e,t){var n=this.generate(t).map((function(e){return e.y}));return{min:Math.min.apply(Math,b(n)),max:Math.max.apply(Math,b(n))}}}}(0,t):e.meta.mode.K?function(e){return{generate:function(t,n,r){for(var i=[],o=e.getDataPages()[0],a=o.qData[0].qSubNodes,s=o.qArea.qTop,u=lX[t.qType.toLowerCase()],l=0;l<a.length;l++){var c=a[l],f=u({dimValue:c.qElemNo,value:l+s+1,qTrendLine:t});f.layerId=n,f.measureIndex=r,f.dimValue=c.qText,i.push(f)}return i},findMinMax:cX}}(e):function(e){return{generate:function(t,n,r){for(var i=[],o=e.getDataPages()[0],a=o.qMatrix,s=o.qArea.qTop,u=lX[t.qType.toLowerCase()],l=0;l<a.length;l++){var c=a[l][0],f=l+s+1,d=u({dimValue:c.qElemNumber,value:f,qTrendLine:t});d.layerId=n,d.measureIndex=r,d.dimValue=c.qText,i.push(d)}return i},calculate:function(e,t,n){return(0,lX[e.qType.toLowerCase()])({dimValue:n,value:t,qTrendLine:e})},findMinMax:cX}}(e)}var hX={TYPES:{AVERAGE:"properties.trendlines.types.average",LINEAR:"properties.trendlines.types.linear",POLYNOMIAL2:"properties.trendlines.types.polynomial2",POLYNOMIAL3:"properties.trendlines.types.polynomial3",POLYNOMIAL4:"properties.trendlines.types.polynomial4",EXPONENTIAL:"properties.trendlines.types.exponential",LOG:"properties.trendlines.types.logarithmic",POWER:"properties.trendlines.types.power"},STYLE:{DASHED:"properties.trendlines.style.dashed"},TYPE:"properties.trendlines.type",HEADER:"properties.trendlines",ADD_BUTTON:"properties.trendlines.button.add"},pX={color:"#f93f17",index:9},mX=tb.isDark,vX={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN},gX=function(e){var t=e.layoutService,n=e.viewState,r=e.colorModel,i=e.chart,o=e.env,a=e.keys.colorScale,s=e.isEnabled,u=void 0===s?function(){return!1}:s,l=o.translator,c=[vX],f=[],d=[],h=dX(t,n);return t.getLayoutValue("qHyperCube.qMeasureInfo",[]).forEach((function(e,t){Array.isArray(e.qTrendLines)&&(f.push.apply(f,b(e.qTrendLines)),d.push.apply(d,b(e.qTrendLines.map((function(){return t})))))})),{query:{hasTrendLines:function(){return!!f.length&&u()},getData:function(){return c},getStroke:SH((function(e){var t=(f[e]||{}).style,n=r.settings();if(t.autoColor){if("measure"===n.mode){var o=d[e],s=i.scale(a)(o);return mX(s)?function(e){var t=Qy(e);return t.l<30?t.l+=15:t.l<50?t.l+=10:t.l+=5,t.toString()}(s):function(e){var t=Qy(e);return t.l-=5,t.toString()}(s)}return r.resolveUIColor(pX)}return t.paletteColor?r.resolveUIColor(t.paletteColor):"none"})),getLineDash:function(e){return(f[e]||{}).style.lineDash},getLabel:function(e){return(f[e]||{}).label},getType:function(e){var t=(f[e]||{}).qType;return l.get(hX.TYPES[t])},getMinMax:function(){var e=1/0,n=-1/0;return f.forEach((function(r){var i=h.findMinMax(t.meta.size.y,r);e=Math.min(i.min,e),n=Math.max(i.max,n)})),{min:e,max:n}},getCalculatedValue:function(e,t,n){var r=f[e];return h.calculate(r,t,n)}},command:{update:function(){c.length=0,f.forEach((function(e,t){var n=h.generate(e,t,d[t]);c.push.apply(c,b(n))}))}}}},yX={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}},bX=function(e){var t=e.meta;return t.isContinuous?function(e){return(0,e.scale)(e.datum.value)}:t.isGroupedByMeasure?function(e){var t=e.scale,n=e.datum;return t([n.value,n.measureIndex.value])+t.bandwidth()/2}:function(e){var t=e.scale;return t(e.datum.value)+t.bandwidth()/2}},xX=function(e,t){var n=t.layoutService,r=t.trendLineModel,i=t.dockService;return r.query.hasTrendLines()?[function(e,t){var n=e.majorScale,r=e.minorScale,i=t.trendLineModel,o=t.layoutService,a=t.dockService,s=bX(o);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:yX,settings:{connect:!0,orientation:a.meta.major.orientation,coordinates:{major:{scale:n,fn:s},minor:{scale:r},layerId:{ref:"layer"}},layers:{curve:"monotone",line:{strokeWidth:2,stroke:function(e){var t=e.datum;return i.query.getStroke(t.layer.value)},strokeDasharray:function(e){var t=e.datum;return i.query.getLineDash(t.layer.value)}}}}}}(e,{trendLineModel:r,layoutService:n,dockService:i}),function(e,t){var n=e.majorScale,r=e.minorScale,i=e.tooltipOverlay,o=void 0===i?"trend-lines-tooltip-overlay":i,a=t.layoutService,s=t.dockService,u=bX(a),l="horizontal"===s.meta.major.orientation,c={scale:n,fn:u},f={scale:r,ref:"minor"};return{key:o,type:"point",layout:{dock:"center"},data:yX,settings:{x:l?c:f,y:l?f:c,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}}(e,{layoutService:n,dockService:i})]:[]};function wX(e,t){var n=t.query,r=n.getLabel,i=n.getType,o=n.getLineDash,a=n.getStroke;return function(t){var n=t.node,s=t.resources,u={type:"icon",style:{stroke:a(n.data.layer.value),"min-width":"16px","vertical-align":"middle","stroke-dasharray":o(n.data.layer.value)}},l={content:[{content:r(n.data.layer.value),style:{"font-weight":"bold"}},{content:i(n.data.layer.value)}],style:{"min-width":"136px"}};return{title:n.data.dimValue.label,row:[u,l,{content:s.formatter(e.formatter)(n.data.minor.value)}]}}}function MX(e,t){var r=t.h,i=t.style;return e.map((function(e){var t={style:n(n({direction:"string"==typeof e.content?ay.detectTextDirection(e.content):void 0},i.cell||{}),e.style||{}),class:e.class};e.colspan&&(t.colspan=e.colspan);var o=function(e,t){return Array.isArray(t.content)?e("div",{style:{display:"flex","flex-direction":"column"}},t.content.map((function(t){return e("span",{style:t.style,direction:ay.detectTextDirection(t.content)},t.content)}))):"icon"===t.type?function(e){var t=e("line",{x1:"0px",y1:"".concat(16,"px"),x2:"".concat(16,"px"),y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 ".concat(16," ").concat(16)},t)}(e):t.content}(r,e);return r("td",t,o)}))}function kX(e,t){return function(n){var r=n.h,i=n.data,o=n.style,a=i[0].title,s=i.filter((function(e){return e.title===a})),u=[function(e,t){var n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:ay.detectTextDirection(t)},t);return e("tr",{},n)}(r,a)];if(s.slice(0,2).forEach((function(e){u.push(r("tr",{},MX(e.row,{h:r,style:o})))})),i.length>2){var l=i.length-2;u.push.apply(u,b(function(e,t,n,r){var i=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),o=ay.detectTextDirection(i);return[e("tr",{},e("td",{style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:3},"")),e("tr",{},e("td",{style:{"font-weight":"bold","text-align":n?"right":"left",direction:o},colspan:3},i))]}(r,e,t,l)))}return u}}function SX(e,t){var n=t.trendLineModel,r=t.translator,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.query.hasTrendLines())return!1;var o=i.rtl,a=ny({key:e.tooltip,rtl:o});return Tg(!0,a,{settings:{extract:wX(e,n),content:kX(r,o),placement:"pointer",direction:i.rtl?"rtl":"ltr"}})}function CX(e,t){var n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function qX(e,t){var n=t.chart,r=t.viewState,i=t.trendLineModel,o=t.layoutService,a=t.rtl,s=o.meta.isContinuous,u={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=function(e){var t=CX(e,n);return n.shapesAt(t,u)};if(s){var c=i.query.getCalculatedValue;u={components:[{key:"trend-lines"}],propagation:"stop"},l=function(t,i){var o=CX(t,n),s=n.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(o),u);if(s.length){var l=function(e,t,n,r){var i=(e.x-t.rect.computed.x)/t.rect.computed.width;i=r?1-i:i;var o=n.get("zoom"),a=o.min;return a+(o.max-a)*i}(o,i,r,a),f=n.scale(e.majorInnerScale),d=(null!=f&&f.formatter?f.formatter():n.formatter({data:{fields:["qDimensionInfo/0"]}}))(l);s.forEach((function(e){e.data.dimValue.value=l,e.data.dimValue.label=d,e.data.minor.value=c(e.data.layer.value,l).y}))}return s}}return function(t){var r=n.component(e.tooltip);if(r&&function(t){return n.componentsFromPoint({x:t.clientX,y:t.clientY}).some((function(t){return t.key===e.tooltipOverlay}))}(t)){var i=l(t,r);return i.length?(r.emit("show",t,{nodes:i}),!0):(r.emit("hide"),!1)}return!1}}var EX="Possible",TX="Never",DX=function(e){return!wH(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis},OX=function(e){e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},NX=function(e){OX(e),e.qMultiDimMode="Sum",e.qXColIx=0};function _X(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.translator,n=e.events,i=void 0===n?{onGlobalChange:function(){}}:n,o=e.allowStackedByDimension,a=void 0!==o&&o,s=function(e){var t=wH(e,"qHyperCubeDef.qMeasures",[]).reduce((function(e,t){return Array.isArray(t.qTrendLines)&&e.push.apply(e,b(t.qTrendLines)),e}),[]),n=DX(e)?EX:TX;t.forEach((function(e){e.qContinuousXAxis=n})),i.onGlobalChange(e,t)},u=function(e){var n=r(e.label);return"string"===n&&e.label?e.label:"object"===n?e.label.qStringExpression?e.label.qStringExpression.qExpr:e.label.qValueExpression.qExpr:t.get(hX.TYPES[e.qType])};return{show:function(e,t,n){var r=n.layout;return!Yg.dimensionless(r)&&!Yg.groupedByDimension(r)&&(a||!Yg.stackedByDimension(r))},type:"array",ref:"qTrendLines",titleTranslation:hX.HEADER,itemTitleRef:u,max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:hX.ADD_BUTTON,add:NX,globalChange:s,items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:hX.TYPE,options:[{value:eX,translation:hX.TYPES.AVERAGE},{value:tX,translation:hX.TYPES.LINEAR},{value:nX,translation:hX.TYPES.POLYNOMIAL2},{value:rX,translation:hX.TYPES.POLYNOMIAL3},{value:iX,translation:hX.TYPES.POLYNOMIAL4},{value:oX,translation:hX.TYPES.EXPONENTIAL},{value:aX,translation:hX.TYPES.LOG},{value:sX,translation:hX.TYPES.POWER}],defaultValue:eX},autoColor:{ref:"style.autoColor",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},paletteColor:{ref:"style.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:pX,show:function(e){return!e.style.autoColor}},dashed:{ref:"style.dashed",translation:hX.STYLE.DASHED,type:"boolean",defaultValue:!0,change:OX}}}}var AX={};function IX(){IX.init.call(this)}AX.isObject=function(e){return"object"===r(e)&&null!==e},AX.isNumber=function(e){return"number"==typeof e},AX.isUndefined=function(e){return void 0===e},AX.isFunction=function(e){return"function"==typeof e};var PX=IX;IX.EventEmitter=IX,IX.prototype._events=void 0,IX.prototype._maxListeners=void 0,IX.defaultMaxListeners=10,IX.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},IX.prototype.setMaxListeners=function(e){if(!AX.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},IX.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],AX.isUndefined(n))return!1;if(AX.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(AX.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},IX.prototype.addListener=function(e,t){var n;if(!AX.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,AX.isFunction(t.listener)?t.listener:t),this._events[e]?AX.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,AX.isObject(this._events[e])&&!this._events[e].warned)&&((n=AX.isUndefined(this._maxListeners)?IX.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,AX.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),AX.isFunction(console.trace)&&console.trace()));return this},IX.prototype.on=IX.prototype.addListener,IX.prototype.once=function(e,t){if(!AX.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},IX.prototype.removeListener=function(e,t){var n,r,i,o;if(!AX.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||AX.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(AX.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},IX.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],AX.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},IX.prototype.listeners=function(e){return this._events&&this._events[e]?AX.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},IX.listenerCount=function(e,t){return e._events&&e._events[t]?AX.isFunction(e._events[t])?1:e._events[t].length:0};var LX={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};function RX(){var t=y(e.useState({}),1)[0],r=y(e.useState({}),1)[0],i=function(){var t,n,r,i=e.useLayout(),o=!!i.qSelectionInfo.qInSelections,a=!(null===(t=i.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n||null===(r=n[0])||void 0===r||!r.qIsOneAndOnlyOne),s=y(e.useState(!1),2),u=s[0],l=s[1],c=y(e.useState(!1),2),f=c[0],d=c[1],h=y(e.useState({key:"lasso",enabled:function(){return!1},active:function(){return!1},action:function(){return!1}}),2),p=h[0],m=h[1],v=function(e){d("boolean"==typeof e?e:!f)};return e.useAction((function(){return m({key:"lasso",action:v,enabled:function(){return u},active:function(){return f}}),{key:"lasso",label:"Lasso",icon:LX,hidden:!u||!o||a,active:f,action:v}}),[o,a,f,u]),{get:function(){return p},setAllows:function(e){l(!!e)}}}(),o=y(e.useState(),2),a=o[0],s=o[1];return e.useEffect((function(){var e={};e.scroll={key:"scroll",isActive:!0,isEnabled:!0,action:function(){this.isActive=!this.isActive},active:function(){return this.isActive},enabled:function(){var e=t.layoutService,n=t.discrete;return r.allowScroll&&((null==e?void 0:e.meta.isContinuous)||(null==n?void 0:n.query.getCanScroll()))}},e.interact={key:"interact",isEnabled:!0,enabled:function(){return r.allowInteract}},e.tooltip={key:"tooltip",isActive:!0,isEnabled:!0,action:function(e){this.isActive=!!e},active:function(){return this.isActive},enabled:function(){return r.allowTooltip}},e.select={key:"select",isActive:!1,isEnabled:!0,action:function(){this.isActive=!this.isActive},active:function(){return this.isActive},enabled:function(){return r.allowSelect}},e.lasso=i.get(),Object.keys(e).forEach((function(t){return n=e[t],Object.keys(PX.prototype).forEach((function(e){n[e]=PX.prototype[e]})),PX.init(n),n;var n})),s(e)}),[]),e.useEffect((function(){a&&i&&(a.lasso=n(n({},a.lasso),i.get()))}),[i]),{get:function(){return a},setAllows:function(e){Object.assign(r,e),i.setAllows(null==e?void 0:e.allowSelect)},setContext:function(e){Object.assign(t,e)},destroy:function(){Object.keys(a).forEach((function(e){return a[e].removeAllListeners()}))}}}var jX={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}},zX={SCALE:{MAIN:{MINOR:"minor",MAJOR:"major",MAJOR_INNER:"majorInner",MAJOR_NUM:"majorNum",COLOR:"fill"},REDUCED:{MINOR:"miniMinor",MAJOR:"miniMajor",COLOR:"reducedFill"}},COMPONENT:{BAR:"bar",GHOST_BAR_OOB:"ghost-bar",STACK:"stack",BAR_AXIS:"bar-axis",GROUP_AXIS:"group-axis",BAR_OOB_MAX:"bar-oob-max",BAR_OOB_MIN:"bar-oob-min",STACK_TOTAL_BAR:"stack-total-bar",BASE_TOOLTIP:"tooltip",LEGEND_CAT_TOOLTIP:"legend-cat-tooltip",LEGEND_COLOR_CAT:"legend-color-cat",MEASURE_REF_LINE:"mes-ref-line",DIMENSION_REF_LINE:"dim-ref-line",MEASURE_REF_LINE_LABEL:"mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label",TREND_LINES_TOOLTIP:"trend-lines-tooltip",TREND_LINES_TOOLTIP_OVERLAY:"trend-lines-tooltip-overlay"},COLLECTION:{MAIN:"main-collection",MINI:"mini-collection",MINI_STACK:"mini-stack-collection",MINI_CONTINUOUS:"mini-continuous-collection",STACK_TOTAL:"stack-total-collection"},FORMATTER:{MINOR:"bar",COLOR:"fill"}};function FX(e){var t=e.layout,n=zg.canBeContinuous(t),r=Yg.continuous(t),i=Yg.dimensionless(t);return{canBeContinuous:n,isDiscrete:!r,isContinuous:r,isTime:zg.isTime(r,t),isDimensionless:i,isSimple:Yg.simple(t),isGrouped:Yg.grouped(t),isGroupedByMeasure:Yg.groupedByMeasure(t),isGroupedByDimension:Yg.groupedByDimension(t),isStacked:Yg.stacked(t),isStackedByDimension:Yg.stackedByDimension(t),isStackedByMeasure:Yg.stackedByMeasure(t),isSnapshot:Yg.snapshot(t)}}var BX="QlikView Sans, sans-serif",VX=[["object.barChart","","fontFamily"],["object.barChart","outOfRange","color","#999"],["object.barChart","axis.title","color"],["object.barChart","axis.title","fontSize","13px"],["object.barChart","axis.title","fontFamily",BX],["object.barChart","axis.label.name","color","#595959"],["object.barChart","axis.label.name","fontSize","12px"],["object.barChart","axis.label.name","fontFamily",BX],["object.barChart","axis.line.major","color","#cccccc"],["object.barChart","axis.line.minor","color","#e6e6e6"],["object.barChart","label.value","color","#333333"],["object.barChart","label.value","fontSize","11px",function(e){return parseInt(e,10)}],["object.barChart","label.value","fontFamily",BX],[!1,"label.value","lightColor","#E6E6E6"],[!1,"label.value","darkColor","#595959"]],HX={extractDimsAndNode:function(e){var t,n=[];return e.forEach((function(e){if(e.key===zX.COMPONENT.BAR){t=e;var r=wH(e,"data.selectionDimension",!1);r&&(n.push(r.label),r.label!==e.data.label&&n.push(e.data.label))}})),{nodeDims:n,node:t}}};function UX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/qHyperCubeDef";return{fetch:function(){return Gg(e,t,this.settings())},settings:function(){var e=t.getHyperCubeValue("qDimensionInfo"),r=t.meta.isStacked&&e.length>1?1:0,i=t.getHyperCubeValue("qMeasureInfo");return{path:n,rect:{qTop:0,qLeft:r,qWidth:e.length+i.length+r,qHeight:Math.min(2e3,1e4/(i.length+1))},zoomLevel:-1,filter:"D1"}}}}function WX(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"reducedHyperCube";return{fetch:function(){return Promise.resolve({reducedCube:e.getLayoutValue(t)||e.getHyperCube()})}}}function YX(e){return{fetch:function(){var t=e.getHyperCube(),r=n(n({},t),{},{qDataPages:t.qDataPages.slice()});return Promise.resolve({reducedCube:r})}}}function KX(e){var t=e.layoutService.meta,n=t.isSnapshot,r=t.isStackedByDimension,i=function(e){e.qDimensionInfo.unshift({key:"dummy-patch-dimension"})};return i.should=function(e){return n&&r&&1===e.qDimensionInfo.length},i}function $X(e){return 2===e.qDimensionInfo.length&&2===e.qMeasureInfo.length}function GX(e){return e.qMeasureInfo.length>1&&1===e.qDimensionInfo.length}function XX(e){var t=e.clearMinor,n=e.clearLegend,r=e.clearDiscrete,i=e.clearContinuous,o=e.selectionInfo;n({componentName:"legendRangeBrush"}),t({eventName:"measureRange",componentName:"measureRangeBrush"}),r({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==o.event&&i({componentName:"continuousRangeBrush",brushName:!1})}function JX(e){var t=e.layout,n=e.defaultAuto;return t.qHyperCube.qDimensionInfo.length>1?{mode:"byDimension",useDimColVal:!0,useBaseColors:"dimension",byDimDef:{activeDimensionIndex:1}}:t.qHyperCube.qMeasureInfo.length>1?{mode:"primary",useBaseColors:"measure",paletteColor:null}:n(t)}function QX(t){var n=t.picasso,r=t.chart,i=t.environment,o=t.viewState,a=t.viewCache,s=e.useStaleLayout(),u=e.useModel(),l=e.useApp(),c=e.usePlugins(),f=e.useSelections(),d=e.useOptions(),h=y(e.useState(),2),p=h[0],m=h[1],v=y(e.useState(),2),g=v[0],b=v[1],x=y(e.useState(),2),w=x[0],M=x[1],k=e.useConstraints(),S=RX();return e.useEffect((function(){if(!r)return function(){};var e=S.get(),t=function(e){var t=e.chart,n=e.actions,r=e.selections,i=t.scale(zX.SCALE.MAIN.MAJOR);return $W({chart:t,actions:n,selections:r,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:i,selectionActions:{clear:XX},custom:{getActions:function(){return n}},setBrushAliases:function(e){var t=e.defaultFunc,n=e.brush;t(),n.addKeyAlias("miniCube/qDimensionInfo/0","qHyperCube/qDimensionInfo/0"),n.addKeyAlias("miniCube/qDimensionInfo/1","qHyperCube/qDimensionInfo/1")}}})}({chart:r,actions:e,selections:f});return b(e),M(t),function(){t.destroy(),S.destroy()}}),[r]),e.useEffect((function(){if(k){var e={allowScroll:!k.active,allowInteract:!k.active,allowTooltip:!k.passive,allowSelect:!k.select&&!k.active};S.setAllows(e)}}),[k]),e.useEffect((function(){if(w&&i){var e=i.theme,t=i.translator,f=i.localeInfo,h=i.flags,p=i.embed,v=d.direction,y=void 0===v?"ltr":v,b=function(e){return e.color.auto?e.qHyperCube.qDimensionInfo.length>1:"byDimension"===e.color.mode&&e.color.byDimDef&&e.color.byDimDef.activeDimensionIndex>-1}(s)?DH({source:s}):void 0,x=function(e){var t=e.layout,n=e.options,r=void 0===n?{}:n;return!(null==t||!t.snapshotData||r.freeResize)&&{width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h}}({layout:s,options:d}),M=DH({source:s,metaAdditionsFn:FX}),k=function(e){var t={};return t.fields=function(e){var t=e.meta,n={majorGroup:t.isGroupedByDimension?"qDimensionInfo/0":void 0,majorStack:t.isStacked?"qDimensionInfo/0":void 0,major:t.isDimensionless?void 0:"qDimensionInfo/".concat(t.dimensionCount-1),majors:e.getHyperCubeValue("qDimensionInfo").map((function(e,t){return"qDimensionInfo/".concat(t)})),minor:e.getHyperCubeValue("qMeasureInfo").map((function(e,t){return"qMeasureInfo/".concat(t)}))};return n.majorNumeric="".concat(t.isStackedByDimension?n.majorStack:n.major,":numeric"),n}(e),t.selectionDimensionIdx=function(e){for(var t=e.qDimensionInfo.length,n=0;n<t;n++){var r=e.qDimensionInfo[n];if(!(r.qLocked||r.qCardinalities.qHypercubeCardinal<=1&&n<t-1))return n}}(e.getHyperCube()),t.selectionDimensionProp=function(e){return void 0===t.selectionDimensionIdx||void 0!==e&&t.selectionDimensionIdx!==e?{}:{selectionDimension:{field:t.selectionDimensionIdx}}},t}(M),C=xH({chart:r,layoutService:M,config:{logicalSize:x,rtl:"rtl"===y},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0}}),q=function(e){var t=e.theme,n=e.styleMatrix,r={theme:t,styleMatrix:ZW(void 0===n?[]:n),styles:void 0};return r.styles=eY(r.styleMatrix,t),{getStyles:function(){return r.styles},getTheme:function(){return r.theme},setTheme:function(e){r.theme=e,r.styles=eY(r.styleMatrix,e)}}}({theme:e,styleMatrix:VX}),E=XY.model({model:u,layoutService:M,viewCache:a,viewState:o}),T=function(e){var t=e.enigma,n=e.layoutService,r=e.viewModel,i=e.definitionPath,o=e.reducedHyperCubePath,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=UX(t,n,i),u=WX(n,o),l=YX(n),c=KX({layoutService:n}),f={mode:{isReduced:!1}};return{fetch:function(){return n.meta.isSnapshot?u.fetch():n.meta.isContinuous?l.fetch():n.meta.isStacked||n.getHyperCubeValue("qSize.qcy",NaN)!==n.getHyperCubeValue("qDataPages.0.qArea.qHeight",NaN)?s.fetch():l.fetch()},model:function(){return f},update:function(e){c.should(e)&&c(e),f.mode=Tg(f.mode,n.meta),f.mode.isReduced=e.qDataPages[0]&&e.qDataPages[0].qIsReduced,f.mode.isStackedByDimension=f.mode.isStacked&&$X(e),f.mode.isStackedByMeasure=f.mode.isStacked&&GX(e),f.fields={major:f.mode.isStackedByDimension?"qDimensionInfo/".concat(e.qDimensionInfo.length-1):r.fields.major,majorGroup:r.fields.majorGroup,minor:f.mode.isStackedByDimension?e.qMeasureInfo.map((function(e,t){return"qMeasureInfo/".concat(t)})):r.fields.minor},f.scales={major:zX.SCALE.REDUCED.MAJOR,minor:zX.SCALE.REDUCED.MINOR},f.cube=e,a.qDataPages=e.qDataPages},fetchMinMaxData:function(){if(a.qDataPages)return Promise.resolve(a.qDataPages);var e=s.settings(),r="K"===n.getHyperCubeValue("qMode")?1:e.rect.qHeight;return e=Tg(!0,{},e,{rect:{qHeight:r}}),t.getHyperCubeReducedData(e.path,[e.rect],e.zoomLevel,e.filter).then((function(e){return e}))},setSnapshotData:function(e){e.reducedHyperCube=f.cube}}}({enigma:u,layoutService:M,viewModel:k}),D=function(e){var t=e.app,n=e.model,r=e.translator,i=e.picasso,o=e.localeInfo,a=e.theme,s=e.continuousDataModel,u=e.layoutService,l=e.legendLayoutService,c=e.reducedDataModel,f=u.meta,d=f.isContinuous,h=f.isStacked,p={main:void 0,mini:{getScales:function(){return{}},getColor:function(){return function(e){return e}},getDatumProps:function(){return{}},getAuxiliarySettings:function(){}}};return{initialize:function(){var e=[],f=c.model().mode.isReduced,m=d||f||h,v=!d&&(f||h)&&l?l.getHyperCube():void 0,g=v?"legendCube":void 0;return p.main=cH({app:t,model:n,translator:r,picasso:i,layoutService:u,config:{localeInfo:o,auto:JX,key:zX.SCALE.MAIN.COLOR},createConfig:function(){return{hc:m?v||u.getHyperCube():c.model().cube,source:m?g:"miniCube",theme:a}}}),e.push(p.main.initialize()),d&&(p.mini=cH({app:t,model:n,translator:r,picasso:i,layoutService:u,config:{localeInfo:o,auto:JX,key:zX.SCALE.REDUCED.COLOR},createConfig:function(){return{layout:s.getInitialLayout(),hc:s.getInitialCube(),source:"miniCube",theme:a}}}),e.push(p.mini.initialize())),Promise.all(e)},getMain:function(){return p.main},getMini:function(){return p.mini}}}({picasso:n,model:u,app:l,translator:t,localeInfo:f,theme:e,continuousDataModel:E,layoutService:M,legendLayoutService:b,reducedDataModel:T}),O=gX({layoutService:M,viewState:o,colorModel:{settings:function(){return D.getMain().getSettings()},resolveUIColor:function(e){return D.getMain().getPaletteColor(e)}},chart:r,env:i,keys:{colorScale:zX.SCALE.MAIN.COLOR},isEnabled:function(){return!M.meta.isGroupedByDimension&&(!M.meta.isStackedByDimension||h.isEnabled("TRENDLINES_STACKED_DIM"))&&!M.meta.isDimensionless}});cG.attrExpr.updateProperties(u,s,h);var N,_=function(e){var t=e.layout,n=e.app,r=e.picasso,i=e.model,o=e.chart,a=e.translator,s=e.localeInfo,u=e.embed;return{layout:t,app:n,picasso:r,model:i,chart:o,translator:a,localeInfo:s,useCustomTooltip:t.tooltip&&!t.tooltip.auto,utils:rG,miniChartToken:{},embed:u}}({layout:s,app:l,model:u,picasso:n,chart:r,translator:t,localeInfo:f,embed:p,extractDimsAndNode:HX.extractDimsAndNode});M.meta.isDiscrete&&(N=ZG({chart:r,actions:g,componentKey:zX.COMPONENT.BAR,enigmaModel:u,layoutService:M,dockService:C,trendLineModel:O,itemWidths:jX,viewState:o,rtl:"rtl"===y,options:{axisKey:zX.COMPONENT.BAR_AXIS}}));var A=CS({layoutService:M,discreteModel:N}),I=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAIN:{MINOR:zX.SCALE.MAIN.MINOR,MAJOR:zX.SCALE.MAIN.MAJOR}},COMPONENT:{BAR:zX.COMPONENT.BAR,BAR_AXIS:zX.COMPONENT.BAR_AXIS,Y_AXIS:"y-axis",MEASURE_TITLE:"measure-title",DIMENSION_TITLE:"dimension-title"},COLLECTION:{MAIN:zX.COLLECTION.MAIN}}}}(M),P=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return _B(regeneratorRuntime.mark((function e(){var r,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=_B(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(PB({},i));case 4:if("object"===OB(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(PB({},i))}))),e.next=6,Promise.all([a,s]);case 6:u=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,jB(u[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=RB(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=GB(!0,{},n.brush);GB(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===OB(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=OH({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=OH({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:n,plugins:c||[],pluginArgs:I});S.setContext({discrete:N,layoutService:M}),m({discrete:N,continuous:XY,legendLayoutService:b,layoutService:M,viewModel:k,dockService:C,themeService:q,continuousDataModel:E,reducedDataModel:T,colorService:D,trendLineModel:O,refLineModel:A,pluginService:P,customTooltipModel:_,selectionService:w,logicalSize:x})}}),[w,d,i,s]),p}function ZX(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function eJ(e){return e.some(ZX)}function tJ(e,t){var n=NaN,r=NaN;return e.forEach((function(e){eJ(e)||e.slice(-t).forEach((function(e){"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),r=Number.isNaN(r)?e.qNum:Math.max(e.qNum,r))}))})),{min:n,max:r}}function nJ(e){var t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){var r=e.getLayoutValue("measureAxis.minMax");"min"!==r&&"minMax"!==r||(t=+e.getLayoutValue("measureAxis.min")),"max"!==r&&"minMax"!==r||(n=+e.getLayoutValue("measureAxis.max"))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function rJ(e,t){var n=NaN,r=NaN;return e.forEach((function(e){if(!eJ(e)){var i=0,o=0;e.slice(-t).forEach((function(e){"NaN"!==e.qNum&&(e.qNum>=0?o+=e.qNum:i+=e.qNum)})),n=Number.isNaN(n)?i:Math.min(i,n),r=Number.isNaN(r)?o:Math.max(o,r)}})),{min:n,max:r}}function iJ(e,t){var n={};e.forEach((function(e){if(!eJ(e)){var r=e[0].qElemNumber;n[r]=n[r]?n[r]:{min:0,max:0,cId:r},e.slice(t).forEach((function(e){"NaN"!==e.qNum&&(e.qNum>=0?n[r].max+=e.qNum:n[r].min+=e.qNum)}))}}));var r=NaN,i=NaN;return Object.keys(n).forEach((function(e){r=Number.isNaN(r)?n[e].min:Math.min(n[e].min,r),i=Number.isNaN(i)?n[e].max:Math.max(n[e].max,i)})),{min:r,max:i}}function oJ(e){return"number"==typeof e&&!Number.isNaN(e)}function aJ(e){var t=e.getHyperCubeValue("qMeasureInfo");return{min:Math.min.apply(Math,b(t.filter((function(e){return oJ(e.qMin)})).map((function(e){return e.qMin})))),max:Math.max.apply(Math,b(t.filter((function(e){return oJ(e.qMax)})).map((function(e){return e.qMax}))))}}function sJ(e){return e.length?{min:Math.min.apply(Math,b(e[0].qSubNodes.map((function(e){return e.qMinNeg})))),max:Math.max.apply(Math,b(e[0].qSubNodes.map((function(e){return e.qMaxPos}))))}:{min:0,max:0}}function uJ(e,t,n){for(var r=e.length-1;r>-1;r--)if(t(e[r]))return e[r];return n}function lJ(e){var t=uJ(wH(e,"0.qData.0.qSubNodes",[]),ZX,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}function cJ(e){return!Number.isNaN(+e.qNum)}function fJ(e){return e.qNum}function dJ(e){var t=uJ(wH(e,"0.qMatrix",[]),eJ,[]).filter(cJ).map(fJ);return{min:Math.min.apply(Math,[0].concat(b(t))),max:Math.max.apply(Math,[0].concat(b(t)))}}function hJ(e){return!Number.isNaN(+e.qNum)}function pJ(e){return e.qNum}function mJ(e,t){return e.push.apply(e,b(t)),e}function vJ(e){var t=wH(e,"0.qMatrix",[]).filter(eJ).reduce(mJ,[]).filter(hJ).map(pJ);return{min:Math.min.apply(Math,[0].concat(b(t))),max:Math.max.apply(Math,[0].concat(b(t)))}}var gJ=bk,yJ=xk,bJ=.2;function xJ(e,t){return Math.abs(e/t)<5||0===t}function wJ(e){var t,r,i,o,a,s,u,l,c=(r=(t=e).reducedDataModel,i=t.layoutService,o=t.continuousDataModel,a=i.meta,s=i.getHyperCubeValue,u=function(e){return!e.length&&a.mode.K},l=function(e){var t=s("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}},{resolve:function(){var e=s("qMeasureInfo").length,t=s("qDimensionInfo").length,n=s("qHasOtherValues");if(!a.isStacked&&!n)return Promise.resolve({qDataPages:[{}],count:e});if(a.isContinuous){var i=a.isStackedByDimension?t:e;return o.fetchMinMaxData().then((function(e){return{qDataPages:e,count:i}}))}var c=a.isStackedByDimension?1:e;return r.fetchMinMaxData().then((function(e){if(u(e))return l(n);var t=[];return n&&(t=a.mode.K?s("qStackedDataPages",[]):s("qDataPages",[])),{qDataPages:e,count:c,others:t}}))}}),f=function(e){var t=e.layoutService,r=e.trendLineModel,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.stackedByMeasureExtractor,a=void 0===o?rJ:o,s=i.stackedByDimensionExtractor,u=void 0===s?iJ:s,l=i.straightExtractor,c=void 0===l?tJ:l,f=i.measureInfoExtractor,d=void 0===f?aJ:f,h=i.explicitExtractor,p=void 0===h?nJ:h,m=t.meta;return{extract:function(e){var t,i,o=e.qDataPages,a=e.qStackedDataPages,s=e.others,u=e.count;if(Array.isArray(a)){var l=this.extractFromStacked(a);t=l.min,i=l.max}else{var c=this.extractFromStraight(o,u);t=c.min,i=c.max}if(r.query.hasTrendLines()){var f=r.query.getMinMax(),d=f.min,h=f.max;t=Number.isFinite(d)?Math.min(t,d):t,i=Number.isFinite(h)?Math.max(i,h):i}var p=this.extractOthers(s),m=p.min,v=p.max,g=this.extractExplicit(),y=[0,t,i].filter((function(e){return yJ(e)})),x=Math.min.apply(Math,b(y)),w=Math.max.apply(Math,b(y));x=xJ(m,x)?Math.min(x,m):x,w=xJ(v,w)?Math.max(w,v):w;var M=[g.explicitMin,g.explicitMax,x,w].filter((function(e){return yJ(e)}));return(t=Number.isNaN(g.explicitMin)?Math.min.apply(Math,b(M)):g.explicitMin)===(i=Number.isNaN(g.explicitMax)?Math.max.apply(Math,b(M)):g.explicitMax)&&(Number.isNaN(g.explicitMin)?t=gJ(t,-.2):Number.isNaN(g.explicitMax)&&(i=gJ(i,bJ))),n({min:t,max:i,implicitMin:x,implicitMax:w,otherMin:m,otherMax:v,hasOtherMin:m<t,hasOtherMax:v>i},g)},extractExplicit:function(){var e=p(t),n=e.min,r=e.max,i=e.isExplicitMin,o=e.isExplicitMax;return{hasExplicitMinMax:i||o,hasExplicitMin:i,hasExplicitMax:o,explicitMin:n,explicitMax:r}},extractFromStacked:function(e){return sJ(e.length?e[0].qData:[])},extractFromStraight:function(e,n){var r=e.length?e[0].qMatrix:[];return m.isStackedByMeasure?a(r,n):m.isStackedByDimension?u(r,n):t.getHyperCubeValue("qHasOtherValues")?c(r,n):d(t)},extractOthers:function(e){return m.isStackedByDimension?lJ(e):m.isGroupedByDimension?vJ(e):dJ(e)}}}(e);return c.resolve().then((function(e){return f.extract(e)}))}var MJ="lasso";function kJ(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");var r,i=n({key:"lasso"},e),o={key:(r=i).key,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:r.components},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}};return{interactions:[function(e,t){var n=e.key,r=e.componentTargetKey,i=e.requireFailure,o=e.recognizeWith;return{key:"event:".concat(n),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:MJ,enable:function(e,n){return this.started===MJ||!n||!!(t.actions.select.enabled()&&t.actions.lasso.enabled()&&t.actions.lasso.active())&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((function(e){return e.key===r})).length>0}},events:{lassostart:function(e){e.preventDefault(),this.started!==MJ&&(t.actions.select.emit("start",MJ),this.chart.component(n).emit("lassoStart",e),this.started=MJ)},lassomove:function(e){e.preventDefault(),this.chart.component(n).emit("lassoMove",e)},lassoend:function(e){e.preventDefault(),this.started=!1,this.chart.component(n).emit("lassoEnd",e),t.actions.select.emit("end",MJ)}}}}(i,t)],components:[o]}}function SJ(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[function(e,t){var n,r=e.targets,i=e.requireFailure,o=e.recognizeWith,a=e.components,s=e.eventName,u=void 0===s?"tap":s,c=t.customTooltipModel?t.customTooltipModel.utils:void 0,f=c?t.debouncer(c.displayTooltip,c.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:i,recognizeWith:o,options:{event:u,interval:10,pointers:1,enable:function(e,i){return!i||!(!t.actions.select.enabled()&&!t.actions.tooltip.enabled())&&(n=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((function(e){return-1!==r.indexOf(e.key)}))).length>0}},events:l({},u,(function(e){e.preventDefault();var i=function(e,t){var n,r,i=t.element.getBoundingClientRect();return e.center?(n=e.center.x,r=e.center.y):(n=e.clientX,r=e.clientY),{x:n-i.left,y:r-i.top}}(e,this.chart),o=t.hitRadius?t.hitRadius(n):0,s=o>0?{cx:i.x,cy:i.y,r:o}:i,l=t.shapesAt?t.shapesAt(s):this.chart.shapesAt(s,{components:r.map((function(e){return{key:e,propagation:"stop"}})),propagation:"stop"}),d=this.chart.component("tooltip"),h="mouse"!==e.pointerType&&d&&d.show;if(!t.isLocked(n)&&!t.tooltipOnly&&t.actions.select.enabled()){var p=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),m=p.some((function(e){return"legend-cat"===e.type}));if(!l.length&&m||(this.chart.brushSelectionIncludeMax=!1,t.actions.select.brushSelectionIncludeMax=!1,t.actions.select.emit("start",u,p)),l.length&&a){this.chart.brushSelectionIncludeMax=!1,t.actions.select.brushSelectionIncludeMax=!1;var v="function"==typeof a?a(e,l):a;this.chart.brushFromShapes(l,{components:v}),t.actions.select.emit("end",u)}}if(d&&t.actions.tooltip.enabled())if(l.length){var g=t.customTooltipModel;if(g.useCustomTooltip&&c.checkIfPromisesExist({customTooltipModel:g})){var y=c.getNodes(e,this.chart);f(e,d,{nodes:y,opts:t,customTooltipModel:g})}else d.emit("show",e,{nodes:l})}else h&&d.emit("hide")}))}}(e,t)],components:[]}}var CJ=function(e,t,n){var r,i=e.eventName,o=e.key,a=e.fillTargets,s=void 0===a?[]:a,u=e.requireFailure,c=e.recognizeWith;return{key:"event:".concat(o),type:"Pan",requireFailure:u,recognizeWith:c,options:{event:i,enable:function(e,n){if(this.started===i||!n)return!0;if(!t.actions.select.enabled())return!1;var r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((function(e){return-1!==s.indexOf(e.key)}));return 0===r.length&&function(e,t){var n=e.srcEvent.target;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf("".concat(t,"-")))}(n,o)?(this.started=i,!0):r.length>0}},events:(r={},l(r,"".concat(i,"start"),(function(e){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,t.actions.select.brushSelectionIncludeMax=!0),e.preventDefault(),t.actions.select.emit("start",i),this.chart.component(o).emit("".concat(n,"Start"),e),this.started=i})),l(r,"".concat(i,"move"),(function(e){e.preventDefault(),this.chart.component(o).emit("".concat(n,"Move"),e)})),l(r,"".concat(i,"end"),(function(e){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,t.actions.select.brushSelectionIncludeMax=!0),e.preventDefault(),this.chart.component(o).emit("".concat(n,"End"),e),t.actions.select.emit("end",i),this.started=!1})),r)}};function qJ(e,t){var n=function(e){var t=e.key,n=e.targets,r=e.fillTargets,i=e.targetSelector,o=e.targetFillSelector,a=e.dock,s=e.scale,u=e.bubblesPlacement,l=void 0===u?"inside":u,c=e.observeBrush,f=void 0!==c&&c,d=e.multiple,h=void 0!==d&&d,p=e.toLabel,m=e.onEdited;return{key:t,type:"brush-range",layout:{dock:n.map((function(e){return"@".concat(e)})).join(",")},on:m?{bubbleEnd:function(){m()}}:{},settings:{brush:f?{context:"selection",observe:!0}:"selection",scale:s,multiple:h,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:p},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=CJ(e,t,"range");return{interactions:[e.onEdited?function(e,t){var n=e.key,r=e.requireFailure,i=e.recognizeWith,o=e.eventName,a=void 0===o?"tap":o;return{prio:1,key:"event:".concat(n,"-tap"),type:"Tap",requireFailure:r,recognizeWith:i,options:{event:"".concat(a,"-").concat(n,"-tap"),interval:10,pointers:1,enable:function(e,r){return!!(r&&t.actions.select.enabled()&&(r.target&&"INPUT"===r.target.nodeName||r.target&&r.target.hasAttribute("data-other-value")&&(r.target.getAttribute("data-key")||"").split("-bubble")[0]===n))}},events:l({},"".concat(a,"-").concat(n,"-tap"),(function(e){(e.target.getAttribute("data-key")||"").split("-bubble")[0]&&(e.preventDefault(),this.chart.component(n).emit("bubbleStart",e))}))}}(e,t):null,r].filter(Boolean),components:[n]}}var EJ={refLines:{minimumLayoutMode:"SPARK"},measureAxisTitle:{minimumLayoutMode:"XSMALL"},dimensionAxisTitle:{minimumLayoutMode:"XSMALL"},measureAxis:{minimumLayoutMode:"XSMALL"},dimensionAxis:{minimumLayoutMode:"XSMALL"},gridLines:{minimumLayoutMode:"XSMALL"},refLinesLabels:{minimumLayoutMode:"SMALL"},horizontalDimensionAxis:{minimumLayoutMode:{width:"XSMALL",height:"SMALL"}},verticalDimensionAxis:{minimumLayoutMode:{width:"SMALL",height:"XSMALL"}},horizontalDimensionAxisTitle:{minimumLayoutMode:{width:"XSMALL",height:"MEDIUM"}},verticalDimensionAxisTitle:{minimumLayoutMode:{width:"MEDIUM",height:"XSMALL"}}},TJ="inner-time-axis",DJ="outer-time-axis";var OJ=function(e,t){return e.qDimensionInfo[t].qApprMaxGlyphCount},NJ=function(e){var t,n=null==e||null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal,r=(null==e?void 0:e.qStateCounts)||{},i=r.qLocked,o=void 0===i?0:i,a=r.qOption,s=void 0===a?0:a,u=r.qSelected,l=void 0===u?0:u;return[void 0,0].includes(n)?o+s+l:n},_J={getMajorAxisMaxGlyphCount:function(e,t){var n=0;if(e.qDimensionInfo.length){var r=t?0:e.qDimensionInfo.length-1;n=OJ(e,r)}else e.qMeasureInfo.forEach((function(e){n=Math.max(n,e.qFallbackTitle.length)}));return n},getAxisData:function(e,t){return e.qDimensionInfo.length?wH(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo},getBarAxisMaxGlyphCount:function(e,t){if(e){var n=_J.getAxisData(e,t),r=!e.qDimensionInfo.length,i=r||t?void 0:e.qDimensionInfo.length-1,o=_J.getMajorAxisMaxGlyphCount(e,t),a=r?"qFallbackTitle":"qText";return Zg.getAdjustedMaxGlyphCount(o,n,i,a)}},getGroupAxisMaxGlyphCount:function(e){if(e){var t=_J.getAxisData(e),n=OJ(e,0);return Zg.getAdjustedMaxGlyphCount(n,t,0)}}},AJ=3,IJ=13;function PJ(e,t,n,r){var i=t.layoutService.meta,o=[],a=!("none"===e.measureAxis.show),s=!("title"===e.measureAxis.show);i.isContinuous?o.push.apply(o,b(function(e,t,n,r){var i=t.layoutService.meta,o=t.themeService.getStyles(),a=o.axis,s=o.grid,u=t.layoutService.getLayoutValue("gridLine",{}),l=u.auto,c=u.spacing,f=[],d="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,h=EJ["".concat(t.dockService.meta.major.orientation,"DimensionAxis")].minimumLayoutMode,p={type:"grid-line",x:{},layout:{minimumLayoutMode:EJ.gridLines.minimumLayoutMode},ticks:{stroke:s.line.major.color},minorTicks:{show:!1,stroke:s.line.minor.color}},m=!!e.showMiniChartForContinuousAxis&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:t.reducedDataModel.scales.major,brush:"selection",fill:"#6CB33F",opacity:.2}};if(i.isTime){if(d){var v=n?"end":"start",g=n?1:0,y="bottom"===t.dockService.meta.major.dock?0:1,b={label:{fill:a.label.name.color,fontSize:a.label.name.fontSize,fontFamily:a.label.name.fontFamily},majorGuideLine:{stroke:a.line.major.color},minorGuideLine:{stroke:a.line.minor.color}},x={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:h},preferredSize:function(){return{size:2*parseFloat(a.label.name.fontSize),edgeBleed:{left:1,right:1}}},settings:{anchor:v,label:{align:y,justify:g},guideLine:{major:{justify:g},minor:{align:y}}},style:b};f.push(Tg(!0,{},x,{key:TJ,scale:zX.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!l&&0===c}},style:Tg(!0,{},b,{line:{stroke:a.line.major.color},majorGuideLine:{stroke:a.line.minor.color},minorGuideLine:{stroke:a.line.major.color}})})),f.push(Tg(!0,{},x,{key:DJ,scale:zX.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),f.push({type:"axis-overlay",key:"outer-axis-overlay",scale:zX.SCALE.MAIN.MAJOR,layout:{dock:"@".concat(DJ),minimumLayoutMode:h}}),f.push({type:"axis-overlay",key:"inner-axis-overlay",scale:zX.SCALE.MAIN.MAJOR_INNER,layout:{dock:"@".concat(TJ),minimumLayoutMode:h}}),f.push(m)}return f.push(Tg(!0,{},p,{key:"inner-time-grid",x:{scale:zX.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:s.line.minor.color}})),f.push(Tg(!0,{},p,{key:"outer-time-grid",x:{scale:zX.SCALE.MAIN.MAJOR}})),f}if(i.isContinuous){var w="continuous-axis";d&&(f.push({type:"axis",key:w,scale:zX.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:h},settings:{labels:{align:0,offset:4,fill:a.label.name.color,fontSize:a.label.name.fontSize,fontFamily:a.label.name.fontFamily},ticks:{show:!0,stroke:a.line.major.color},line:{show:!r},minorTicks:{show:!1}}}),f.push({type:"axis-overlay",key:"inner-axis-overlay",scale:zX.SCALE.MAIN.MAJOR,layout:{dock:"@".concat(w),minimumLayoutMode:h}}),f.push(m)),f.push(Tg(!0,{},p,{key:"continuous-grid",x:{scale:zX.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return f}(e,t,n,r))):o.push.apply(o,b(function(e,t,n,r){if("none"===e.dimensionAxis.show)return[];var i=t.layoutService.meta,o=t.themeService.getStyles(),a=[],s=function(e,t){return!t.layoutService.meta.isGroupedByDimension||!e.legend.show||t.colorService.getMain().getSettings().field!==t.viewModel.fields.major}(e,t),u=function(e,t){return!(!t.layoutService.meta.isGroupedByDimension||e.legend.show&&t.colorService.getMain().getSettings().field===t.viewModel.fields.majorGroup)}(e,t),l="horizontal"===t.dockService.meta.major.orientation,c=l?e.dimensionAxis.label:"auto",f="horizontal"===c?void 0:t.dockService.meta.minor.size/4,d={type:"axis",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:EJ["".concat(t.dockService.meta.major.orientation,"DimensionAxis")].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:c,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:f,fill:o.axis.label.name.color,fontSize:o.axis.label.name.fontSize,fontFamily:o.axis.label.name.fontFamily},line:{show:!r,stroke:o.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension"],style:{inactive:{opacity:.3}}}]}};u&&a.push(Tg(!0,{},d,{key:"group-axis",scale:zX.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:s?10:4,labels:{mode:s?"horizontal":d.settings.labels.mode,maxGlyphCount:_J.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:f},line:{show:(l||!s)&&d.settings.line.show}}}));var h=_J.getBarAxisMaxGlyphCount(e.qHyperCube,i.isStackedByDimension);return s&&a.push(Tg(!0,{},d,{key:zX.COMPONENT.BAR_AXIS,scale:zX.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:h,maxLengthPx:f,tiltThreshold:h>AJ&&h<IJ?1:void 0},line:{show:!(l&&u)&&d.settings.line.show}}})),l||2!==a.length?a:[a[1],a[0]]}(e,t,n,r)));var u=t.themeService.getStyles();return a&&o.push({type:"axis",key:"y-axis",formatter:zX.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:EJ.measureAxis.minimumLayoutMode},scale:zX.SCALE.MAIN.MINOR,settings:{labels:{show:s,fill:u.axis.label.name.color,fontSize:u.axis.label.name.fontSize,fontFamily:u.axis.label.name.fontFamily},line:{stroke:u.axis.line.major.color},ticks:{stroke:u.axis.line.major.color},minorTicks:{stroke:u.axis.line.minor.color}}}),o}var LJ={BAR:{WIDTH:.7,STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};function RJ(e){var t=e.layoutService,n=e.discrete,r=e.componentKey,i=t.meta,o=i.isContinuous,a=i.isGrouped;if(o)return 1;var s=(t.getLayoutValue("components",[])||[]).filter((function(e){return e.key===r}))[0];if(s){var u=s.style;return u.strokeWidth&&"none"!==u.strokeWidth?function(){var e=LJ.BAR.STROKE.WIDTH[u.strokeWidth.toUpperCase()]/n.query.getItemSize(),t=u.width+e;return t>1?u.width-(t-1):u.width}:u.width}return a?.9:.7}var jJ={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function zJ(e,t,n){return e*(1-n)+t*n}function FJ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var i=r.data,o=e.chart.component(t).rect;if(!i.items.length||!o)return 2;var a=e.viewState.get("zoom"),s=a.min,u=a.max;if(n[[s,u]])return n[[s,u]];var l=jJ[Pg(o.width,Number.MAX_VALUE)];n={};var c=Math.abs(u-s),f=Math.abs(e.viewCache.get("continuousMax")-e.viewCache.get("continuousMin"));if(0===f)return l;var d=zJ(2,l,1-Math.min(c/f/.2,1));return n[[s,u]]=Math.max(2,Math.min(l,d)),n[[s,u]]}}function BJ(e,t){var n=t.hasExplicitMax,r=t.explicitMax;return!!n&&e>r&&r<=0}function VJ(e,t){var n=t.hasExplicitMin,r=t.explicitMin;return!!n&&e<r&&r>=0}function HJ(e,t){var n=t.hasExplicitMax,r=t.explicitMax;return!!n&&e>r&&r>0}function UJ(e,t){var n=t.hasExplicitMin,r=t.explicitMin;return!!n&&e<r&&r<0}var WJ="max",YJ="min",KJ={min:"Min",max:"Max"};function $J(e,t,n){return void 0===n?BJ(e,t)||VJ(e,t):n===WJ?BJ(e,t):VJ(e,t)}function GJ(e){var t=e.minorMinMax,n=e.type;return!(function(e){var t=e.minorMinMax,n=e.type;return!t["hasExplicit".concat(KJ[n])]}({minorMinMax:t,type:n})||function(e){var t=e.minorMinMax,n=e.type,r=n===WJ?t.implicitMax:t.implicitMin;return!$J(Number(r.toFixed(13)),t,n)}({minorMinMax:t,type:n}))}function XJ(e,t){var n=t.barComponent,r=t.type,i=t.isStacked,o=e.viewCache,a=e.dockService,s=e.themeService,u=o.get("minorMinMax");if(!u.hasExplicitMinMax)return!1;var l=r===WJ?u.implicitMax:u.implicitMin;if(!$J(Number(l.toFixed(13)),u,r))return!1;var c=r===WJ?a.meta.minor.end:a.meta.minor.start,f="end";i&&(f=r===WJ?"sumOfPositives":"sumOfNegatives");var d=s.getStyles();return{type:"box-out-of-bounds",key:"bar-oob-".concat(r),layout:{dock:c},data:n.data,brush:n.brush,settings:{orientation:n.settings.orientation,major:n.settings.major,minor:n.settings.minor,dockValue:Xg.getDockValue(c),oob:Tg({},n.settings.box,{fill:d.outOfRange.color,alignment:1,opacity:1,show:function(e){var t;return!0!==(null===(t=e.datum.null)||void 0===t?void 0:t.value)&&((!i||0!==e.datum[f].value)&&$J(e.datum[f].value,u,r))}})}}}function JJ(e){return Math.min(Math.max(0,e),1)}var QJ=function(e,t){var n,r=t.chart,i=t.type,o=t.componentKey,a=t.collectionKey,s=e.layoutService,u=e.dockService,l=e.viewCache,c=s.meta.isStacked,f=l.get("minorMinMax"),d=e.layoutService.meta;if(!GJ({minorMinMax:f,type:i}))return!1;d.isGroupedByDimension?n=function(e){var t=e.scale,n=e.datum;return t([n.group.value,n.value])+t.bandwidth([n.group.value,n.value])/2}:d.isGroupedByMeasure&&(n=function(e){var t=e.scale,n=e.datum;return t([n.value,n.measureIndex.value])+t.bandwidth()/2});return{type:"box",key:"".concat(zX.COMPONENT.GHOST_BAR_OOB,"-").concat(i),data:{collection:a},settings:{orientation:u.meta.minor.orientation,major:{scale:zX.SCALE.MAIN.MAJOR,fn:n},minor:{scale:zX.SCALE.MAIN.MINOR,start:function(e){var t,n;return JJ(r.scale(zX.SCALE.MAIN.MINOR)((null==e||null===(t=e.datum)||void 0===t||null===(n=t.start)||void 0===n?void 0:n.value)||0))},end:function(e){var t=r.scale(zX.SCALE.MAIN.MINOR),n="end";c&&(n="max"===i?"sumOfPositives":"sumOfNegatives");var o=e.datum[n]?e.datum[n].value:t[i]();return JJ(t(o))}},box:{width:RJ({layoutService:e.layoutService,discrete:e.discrete,componentKey:o}),minWidthPx:2,fill:"none",stroke:"transparent",show:function(e){var t=r.scale(zX.SCALE.MAIN.MINOR),n="end";c&&(n="max"===i?"sumOfPositives":"sumOfNegatives");var o=e.datum[n]?e.datum[n].value:t.max();return"max"===i?o>t.max():o<t.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function ZJ(e){return function(t){return tb.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}function eQ(e){var t="horizontal"===e.dockService.meta.major.orientation;return{placements:e.simplifiedPlacements.map((function(n){return function(e,t,n){var r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:e.onBackground?t.color:ZJ(t),overflow:e.overflow,background:e.background,padding:r}}(n,e.style,t)})),label:e.label}}function tQ(e,t){if(t){if(function(e,t){return BJ(e,t)}(e,t))return-1;if(function(e,t){return VJ(e,t)}(e,t))return 1}return function(e,t){if(t&&0===e){var n=t.min,r=t.max;return 0===r&&0===n?1:r<=0?-1:n>=0||r>=-n?1:-1}return e>=0?1:-1}(e,t)}function nQ(e,t,n,r){var i=tQ(e,r),o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}function rQ(e,t){var n=e.dataPoint;if(!n.showLabels)return!1;var r=t.layoutService.meta,i=r.isStacked,o=r.isContinuous;return!i||!o&&!!n.showSegmentLabels}function iQ(e,t){var n=e.dataPoint;if(!n.showLabels)return!1;var r=t.layoutService.meta,i=r.isStacked,o=r.isContinuous;return!!i&&(!!o||!1!==n.showTotalLabels)}function oQ(e,t,n,r){var i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}function aQ(e,t,n){var r=e.layout,i=e.component,o=e.minorScale;if(!rQ(r,t))return!1;var a,s=t.viewModel,u=t.ds,l=t.viewCache,c=t.layoutService,f=t.dockService,d=t.themeService,h=c.meta,p=l.get("minorMinMax"),m=d.getStyles();!h.isStacked&&(a=h.isStacked?1:0);var v=0===a?1:0,g=h.isStacked?.5:1,y=s.fields.minor[0],b=void 0===y?void 0:u.field(y).formatter(),x=-1;var w={label:h.isStacked?h.isStackedByMeasure||!b?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>x?b(e.data.segment.value):""}:function(e){return e.data.end.label},simplifiedPlacements:oQ(a,v,g,h.isContinuous),style:m.label.value},M=[eQ(Tg(t,w))],k={key:"bar-labels",type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[{component:i,selector:"rect",strategy:{type:"bar",settings:{direction:function(e){return nQ(e.data.end.value,f.meta.minor.orientation,n,p)},labels:M,fontSize:m.label.value.fontSize,fontFamily:m.label.value.fontFamily}}}]}};return h.isStackedByDimension&&b&&(k.beforeRender=function(){x=function(e,t,n){var r="vertical"===t.dockService.meta.minor.orientation?"height":"width",i=t.chart.component(e),o=i&&i.rect?i.rect[r]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/o}(i,t,o)}),k}var sQ={isSameMeasureAndColorRow:function(e,t,n){return t&&e&&t[0].content[0]===e[0].content[0]&&t[0].content[1]===e[0].content[1]&&t[1].content[n?0:1]===e[1].content[0]},getTitle:function(e,t){var n,r=e.data;return t.isStackedByDimension?n=r.stack?r.stack.label:void 0:t.isGroupedByDimension&&(n=r.group?r.group.label:void 0),void 0!==n?"".concat(r.label,", ").concat(n):r.label},getMeasure:function(e,t,n,r,i){if(n.isStacked&&("bar-oob-max"===t.key||"bar-oob-min"===t.key))return!1;var o,a=t.data,s=n.isStacked?r.viewModel.fields.minor[n.isStackedByDimension?0:a.measureIndex.value]:void 0,u=n.isStacked?{source:{key:a.source.key,field:s},label:!0===(null===(o=a.null)||void 0===o?void 0:o.value)?"":n.isStackedByDimension&&i?i(a.segment.value):a.segment.label}:a.end;return sy.getMeasure(e,u)},getMeasures:function(e,t,n,r,i){var o=e.resources.dataset;return t.map((function(e){return sQ.getMeasure(o,e,n,r,i)})).filter(Boolean)},getCustomTooltipAttrExps:function(e,t,n){var r=e.resources.dataset;return sG({nodes:t,layout:n.layoutService.getLayout(),dataset:r})},extractBarTooltipData:function(e,t,n,r,i){var o={title:sQ.getTitle(t,n),color:sy.getColor(e,t,r),measures:sQ.getMeasures(e,t.childrenNodes?t.childrenNodes:[t],n,r,i)};if(sQ.useCustomTooltip(r)){var a,s,u,l,c=sQ.getCustomTooltipAttrExps(e,t.childrenNodes?t.childrenNodes:[t],r);o.customMeasures=c.customTooltipAttrExpsArr,o.customTitle=c.customTooltipInfoAttrExpsArr.filter((function(e){return e.id===S$.CUSTOM.TITLE})),o.customDescription=c.customTooltipInfoAttrExpsArr.filter((function(e){return e.id===S$.CUSTOM.DESCRIPTION}));var f=[];(t.childrenNodes?t.childrenNodes:[t]).forEach((function(e){var t;(null===(t=e.data.customTooltipImages)||void 0===t?void 0:t.length)>0&&!Array.isArray(e.data.customTooltipImages[0])&&(f=e.data.customTooltipImages)})),f.length>0&&(o.customImages=f);var d,h,p,m,v=r.layoutService.getLayout();if(r.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!==(a=v.tooltip)&&void 0!==a&&null!==(s=a.chart)&&void 0!==s&&null!==(u=s.object)&&void 0!==u&&u.refId&&r.customTooltipModel.embed&&"function"==typeof(null===(l=r.customTooltipModel.model)||void 0===l?void 0:l.getEffectiveProperties))if(null!==(d=(h=r.app).isInModalSelection)&&void 0!==d&&d.call(h)){if((null==v||null===(p=v.qHyperCube)||void 0===p||null===(m=p.qDimensionInfo)||void 0===m?void 0:m.length)>0){Q$.destroyVisualization({customTooltipModel:r.customTooltipModel});var g=r.customTooltipModel.translator.get("properties.tooltip.notselectedmessage");o.customLimitation=g}}else{var y=Q$.createContainer({ctx:e,layout:v});o.customChart=y}}return o},getTotalStackTitle:function(e,t){return e>0?t?t.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives":e<0?t?t.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives":""},extractStackTotalBarTooltipData:function(e,t,n){return{title:e.data.label,measures:[e.data.sumOfPositives.value,e.data.sumOfNegatives.value].filter((function(e){return 0!==e})).map((function(e){return{label:"".concat(sQ.getTotalStackTitle(e,t)),value:n?n(e):e}}))}},extractTooltipData:function(e,t){var n=t.chart.formatter(zX.FORMATTER.MINOR),r=t.layoutService.meta,i=e.node.childrenNodes?e.node.childrenNodes:[e.node],o=Math.max(0,i.length-6);i.length=Math.min(i.length,6);var a=e.node.stackTotalBarNodes,s=a&&a.length?a.map((function(e){return sQ.extractStackTotalBarTooltipData(e,t.translator,n)})):[];return{barTooltipData:i.map((function(i){return sQ.extractBarTooltipData(e,i,r,t,n)})),stackTotalBarTooltipData:s,numInvisibleNodesPhase1:o}},extractBarNodeData:function(e,t,n,r,i,o,a){var s=!i&&sy.getTitleRow(t,r),u=sy.hideColorRow(t,n),l=!o&&!u&&sy.getColorRow(e,t,r),c=t.measures.map((function(i){return!a&&sy.getMeasureRow(i,e,t,r,u&&i.field===n.coloring.field)})).filter((function(e){return!sQ.isSameMeasureAndColorRow(e,l,r)}));if(sQ.useCustomTooltip(n)){var f=i?[]:t.customMeasures.map((function(n){return sy.getMeasureRow(n,e,t,r,!1)})),d=!(!t.customTitle[0]||i)&&sy.getTitleRow(t.customTitle[0],r),h=!(!t.customDescription[0]||i)&&sy.getDescriptionRow(t.customDescription[0],r),p=[d,h,s=!sQ.shouldIgnoreTitleRowForCtt(d,h,c,f)&&s,l].concat(b(c),b(f));if(n.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&t.customChart&&p.push(t.customChart),t.customLimitation&&p.push(sy.getFooterRow(t.customLimitation,r)),t.customImages){var m=t.customImages.map((function(t){return sy.getImageRow(t,e)}));p.push.apply(p,b(m))}return p.filter(Boolean)}return[s,l].concat(b(c)).filter(Boolean)},extractStackTotalBarNodeData:function(e,t,n){var r=!!t.measures.length&&sy.getTitleRow(t,n),i=t.measures.map((function(r){return sy.getMeasureRow(r,e,t,n,!1)}));return[r].concat(b(i)).filter(Boolean)},useCustomTooltip:function(e){return wH(e,"customTooltipModel.useCustomTooltip",!1)},shouldIgnoreTitleRow:function(e,t){return e.isDimensionless||t>0&&!e.isGroupedByDimension&&!e.isStackedByDimension},shouldIgnoreTitleRowForCtt:function(e,t,n,r){return!1===n[0]&&0===r.length&&(e.length>0||t.length>0)},shouldIgnoreColorRow:function(e,t){return t>0&&(e.isGroupedByMeasure||e.isStackedByMeasure)},shouldIgnoreMeasureRow:function(e,t,n){return e&&t.measures.some((function(e){return e.field===n.coloring.field}))},shouldIgnoreDefaultRows:function(e,t){return sQ.useCustomTooltip(t)&&wH(e,"tooltip.hideBasic",0)},extractBarsData:function(e,t,n,r){var i,o,a=t.layoutService.meta,s=t.layoutService.getLayout(),u=r.length,l=[],c=sQ.shouldIgnoreDefaultRows(s,t);for(i=0;i<u;i++){o=r[i];var f=sQ.shouldIgnoreTitleRow(a,i),d=c||sQ.shouldIgnoreColorRow(a,i),h=c||sQ.shouldIgnoreMeasureRow(d,o,t);if((l=l.concat(sQ.extractBarNodeData(e,o,t,n,f,d,h))).length>=6||o.customImages||o.customChart||o.customLimitation)return{barsData:l,numInvisibleNodesPhase2:u-(i+1)}}return{barsData:l,numInvisibleNodesPhase2:0}},extractStackTotalBarsData:function(e,t,n){var r=[];return n.some((function(e){return e.measures.length}))&&n.forEach((function(n){r=r.concat(sQ.extractStackTotalBarNodeData(e,n,t))})),r},extractData:function(e,t,n){var r=sQ.extractTooltipData(e,t),i=r.barTooltipData,o=r.numInvisibleNodesPhase1,a=r.stackTotalBarTooltipData,s=sQ.extractStackTotalBarsData(e,n,a);s.length&&s.push(sy.getSeparatorRow());var u=sQ.extractBarsData(e,t,n,i),l=u.barsData,c=u.numInvisibleNodesPhase2,f=s.concat(l),d=o+c;return d&&f.push(sy.getNMoreRow(d,t.translator,n)),f},calculateBoundsFromBars:function(e){var t=e.filter((function(e){var t=e.bounds;return t.width>0&&t.height>0})),n=t.length?t:e;return qS(n.map((function(e){return e.bounds})))},calculateBoundsFromScale:function(e){var t,n,r,i=e.opts,o=e.barKey,a=e.scale,s=e.majorScale,u=e.data,l=e.groupProp,c=i.chart.component(o).rect,f=i.dockService.meta.major.orientation,d="horizontal"===f?"width":"height",h=i.chart.scale(a).pxScale(c[d]);if(i.layoutService.meta.isGroupedByMeasure){var p=i.viewModel.fields.minor.length;t=u.value,n=a===s&&void 0!==t?(h([t,0])+h([t,p-1]))/2:0,r=a===s&&void 0!==t?h.bandwidth([t,0]):0}else{var m=u.value;t=u[l]?u[l].value:void 0,n=h(a===s&&void 0!==t?[t,m]:m),r=a===s&&void 0!==t?h.bandwidth([t,m]):h.bandwidth(m)}var v=(n+r/2)*c[d],g={width:0,height:0};return"horizontal"===f?(g.x=v,g.y=c.height):(g.y=v,g.x=0),g},calculateTotalBounds:function(e){var t=e.opts,n=e.labels,r=e.bars,i=e.barKey,o=e.barAxisKey,a=e.majorScale,s=e.majorInnerScale,u=e.groupProp,l=r.filter((function(e){return e.children&&e.children.length}));return l.length?sQ.calculateBoundsFromBars(l):sQ.calculateBoundsFromScale({opts:t,barKey:i,scale:n[0].key===o?a:s,majorScale:a,data:n[0].data,groupProp:u})},filterNodesOnKeys:function(e,t){return e.filter((function(e){return e.data&&t.indexOf(e.key)>-1}))},isBarMatchingLabel:function(e,t){return t.data.value===e.data.value},isBarMatchingLabelOnProp:function(e,t,n){return t.data.value===(e.data[n]?e.data[n].value:e.data.value)},findBarsMatchingLabels:function(e,t,n,r){return e.filter((function(e){return t.some((function(t){return n(e,t,r)}))}))},findBarsFromGroupLabelsInGroupedByDim:function(e,t,n){var r=sQ.isBarMatchingLabelOnProp;return sQ.findBarsMatchingLabels(e,t,r,n)},findBarsFromBarLabelsInGroupedByDim:function(e,t,n){return e.filter((function(e){return t.some((function(t){return t.data.group&&t.data.group.value===e.data[n].value&&t.data.value===e.data.value}))}))},findBarsFromLabelsInSingleDim:function(e,t){var n=sQ.isBarMatchingLabel;return sQ.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInGroupedByDim:function(e,t,n,r){var i=t.filter((function(e){return e.key===n})),o=t.filter((function(e){return e.key!==n})),a=sQ.findBarsFromBarLabelsInGroupedByDim(e,i,r),s=sQ.findBarsFromGroupLabelsInGroupedByDim(e,o,r);return a.concat(s)},findStackTotalBarsFromLabelsInStackedByDim:function(e,t){var n=sQ.isBarMatchingLabel;return sQ.findBarsMatchingLabels(e,t,n)},findStackTotalBarsFromLabelsInStackedByMeasure:function(e,t){var n=sQ.isBarMatchingLabel;return sQ.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInStackedByDim:function(e,t,n){var r=sQ.isBarMatchingLabelOnProp;return sQ.findBarsMatchingLabels(e,t,r,n)},findBarsFromLabelsInStackedByMeasure:function(e,t){return sQ.findBarsFromLabelsInSingleDim(e,t)},findBarsFromLabels:function(e){var t=e.labels,n=e.opts,r=e.filterKeys,i=e.barAxisKey,o=e.groupProp,a=e.stackProp,s=n.layoutService.meta,u=sQ.filterNodesOnKeys(n.chart.findShapes("container"),r);return s.isStackedByDimension?sQ.findBarsFromLabelsInStackedByDim(u,t,a):s.isStackedByMeasure?sQ.findBarsFromLabelsInStackedByMeasure(u,t):s.isGroupedByDimension?sQ.findBarsFromLabelsInGroupedByDim(u,t,i,o):sQ.findBarsFromLabelsInSingleDim(u,t)},findStackTotalBarsFromLabels:function(e){var t=e.labels,n=e.opts,r=e.stackTotalBarKey,i=n.layoutService.meta;if(i.isStacked){var o=sQ.filterNodesOnKeys(n.chart.findShapes("container"),[r]);return i.isStackedByDimension?sQ.findStackTotalBarsFromLabelsInStackedByDim(o,t):sQ.findStackTotalBarsFromLabelsInStackedByMeasure(o,t)}return[]},isSingleBarMode:function(e,t){var n=e.isSimple||1===t.length;return n&&t[0].children&&t[0].children.length},filterNodesOnLabels:function(e){var t=e.labels,n=e.opts,r=e.barKey,i=e.stackTotalBarKey,o=e.barAxisKey,a=e.barOobMaxKey,s=e.barOobMinKey,u=e.groupProp,l=e.stackProp,c=e.majorScale,f=e.majorInnerScale,d=e.filterFn,h=n.layoutService.meta;if(t.length){var p=sQ.findBarsFromLabels({labels:t,opts:n,filterKeys:[r],stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:u,stackProp:l});if(d&&(p=p.filter(d)),sQ.isSingleBarMode(h,p))return[p[0]];if(p.length){var m=sQ.findBarsFromLabels({labels:t,opts:n,filterKeys:[r,a,s],stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:u,stackProp:l});d&&(m=m.filter(d));var v=sQ.calculateTotalBounds({opts:n,labels:t,bars:m,barKey:r,barAxisKey:o,groupProp:u,majorScale:c,majorInnerScale:f}),g=sQ.findStackTotalBarsFromLabels({labels:t,opts:n,stackTotalBarKey:i});return[{key:r,bounds:v,childrenNodes:p,data:p.map((function(e){return e.data})),stackTotalBarNodes:g}]}return[]}return[]},filterNodesForOob:function(e,t,n){return e.key===t&&0===e.children.length||e.key===n},filterNodes:function(e){var t=e.nodes,n=e.opts,r=e.barKey,i=e.stackTotalBarKey,o=e.barAxisKey,a=e.groupAxisKey,s=e.barOobMaxKey,u=e.barOobMinKey,l=e.groupProp,c=e.stackProp,f=e.majorScale,d=e.majorInnerScale,h=sQ.filterNodesOnKeys(t,[o,a]),p=h&&h.length?[h[0]]:[],m=sQ.filterNodesOnLabels({labels:p,opts:n,barKey:r,stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:s,barOobMinKey:u,groupProp:l,stackProp:c,majorScale:f,majorInnerScale:d});if(m&&m.length)return m;var v=n.layoutService.meta;if(v.isStackedByMeasure){p=(h=sQ.filterNodesOnKeys(t,[s,u]))&&h.length?[h[0]]:[];var g=sQ.filterNodesOnLabels({labels:h,opts:n,barKey:r,stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:s,barOobMinKey:u,groupProp:l,stackProp:c,majorScale:f,majorInnerScale:d,filterFn:function(e){return sQ.filterNodesForOob(e,r,s)}});if(g&&g.length)return g[0].stackTotalBarNodes=void 0,g}if(v.isStackedByDimension){p=(h=sQ.filterNodesOnKeys(t,[s,u]))&&h.length?[h[0]]:[];var y=sQ.filterNodesOnLabels({labels:h,opts:n,barKey:r,stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:s,barOobMinKey:u,groupProp:l,stackProp:c,majorScale:f,majorInnerScale:d,filterFn:function(e){return sQ.filterNodesForOob(e,r,s)}});if(y&&y.length)return y[0].stackTotalBarNodes=void 0,y}var b=sQ.filterNodesOnKeys(t,[r,s,u]);return b.length?[b[0]]:[]}};function uQ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=[],i=ny({key:zX.COMPONENT.BASE_TOOLTIP,rtl:n});return Tg(!0,i,{scale:zX.SCALE.MAIN.COLOR,settings:{filter:function(e){return sQ.filterNodes({nodes:e,opts:t,barKey:zX.COMPONENT.BAR,stackTotalBarKey:zX.COMPONENT.STACK_TOTAL_BAR,barAxisKey:zX.COMPONENT.BAR_AXIS,groupAxisKey:zX.COMPONENT.GROUP_AXIS,barOobMaxKey:zX.COMPONENT.BAR_OOB_MAX,barOobMinKey:zX.COMPONENT.BAR_OOB_MIN,groupProp:"group",stackProp:"stack",majorScale:"major",majorInnerScale:"majorInner"})},extract:function(e){return r=e.node.childrenNodes?e.node.childrenNodes:[e.node],sQ.extractData(e,t,n)},placement:"bounds",afterShow:function(){var e,i,o=t.app,a=t.properties,s=t.customTooltipModel;t.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&(null===(e=(i=t.app).isInModalSelection)||void 0===e||!e.call(i))&&s.useCustomTooltip&&s.embed&&Q$.show({app:o,properties:a,selectedNodes:r,customTooltipModel:s,rtl:n})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}var lQ=function(e,t){return[sy.getTitleRow({title:e.node.data.label},t)]},cQ=function(e,t){var n=e.filter((function(e){return e.data&&e.key===t}));return n.length?[n[0]]:[]};function fQ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("categorical"!==t.colorService.getMain().getSettings().type)return!1;var r=ny({key:zX.COMPONENT.LEGEND_CAT_TOOLTIP,rtl:n});return Tg(!0,r,{scale:zX.SCALE.MAIN.COLOR,settings:{filter:function(e){return cQ(e,zX.COMPONENT.LEGEND_COLOR_CAT)},extract:function(e){return lQ(e,n)},placement:"pointer",direction:n?"rtl":"ltr"},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function dQ(e){return"NaN"===e.qMin&&"NaN"===e.qMax}function hQ(e,t,n){return function(e,t,n){if(!e)return!1;var r=t.translator,i=n.rtl;return{key:"disclaimer",type:"disclaimer",layout:{dock:Ng[e].alignment},settings:{label:r.get("Object.Disclaimer.".concat(e)),rtl:i}}}(function(e,t){if(e.qHyperCube.qSize.qcx*e.qHyperCube.qSize.qcy==0)return"NoDataExist";if(e.qHyperCube.qMeasureInfo.every(dQ))return"OnlyNanData";var n=!1;if(t.layoutService.meta.isContinuous&&2===e.qHyperCube.qDimensionInfo.length){var r=e.qHyperCube.qDimensionInfo[1];n=NJ(r)>zg.maxNumberOfLines}return!!n&&"LimitedData"}(e.layout,t),t,{rtl:n})}function pQ(e,t){var n,r=t.fill;return l(n={},zX.FORMATTER.MINOR,{data:{fields:e.viewModel.fields.minor}}),l(n,zX.FORMATTER.COLOR,r&&r.data&&r.data.field?{data:{field:r.data.field}}:{}),n}var mQ=1,vQ=3;function gQ(e){return e.getLayoutValue("gridLine.auto")}function yQ(e){return!gQ(e)&&e.getLayoutValue("gridLine.spacing")===mQ}function bQ(e){return!gQ(e)&&e.getLayoutValue("gridLine.spacing")===vQ}var xQ=function(e,t){var n=t.themeService,r=t.layoutService,i=t.dockService;if(!gQ(r)&&function(e){return!e.getLayoutValue("gridLine.spacing")}(r))return!1;var o=n.getStyles().grid,a={key:"grid-line",type:"grid-line",layout:{minimumLayoutMode:EJ.measureAxis.minimumLayoutMode},preferredSize:function(){return{size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}},ticks:{show:!yQ(r)||function(e,t){return t%2==0},stroke:o.line.major.color},minorTicks:{show:bQ(r),stroke:o.line.minor.color}};return a["horizontal"===i.meta.major.orientation?"y":"x"]=zX.SCALE.MAIN.MINOR,a};function wQ(e,t){var n=[xQ(0,t)];return n[0]&&n.push(function(e){var t=e.dockService,n=e.themeService,r=e.viewCache.get("minorMinMax");if(r.min>0||r.max<0)return!1;var i=n.getStyles(),o={};return o["horizontal"===t.meta.minor.orientation?"x":"y"]=[{value:0,scale:zX.SCALE.MAIN.MINOR,line:{stroke:i.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:zX.SCALE.MAIN.MINOR,lines:o}}(t)),n}var MQ="areaPan",kQ=function(e){return{type:"Pan",key:"panorama",options:{event:MQ,pointers:1,threshold:10,enable:function(t,n){return this.started===MQ||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key===zX.COMPONENT.BAR}))}},events:{areaPanstart:function(t){t.preventDefault(),this.started=MQ;var n=e.viewState.get("zoom");this.areaPan={min:n.min,max:n.max,size:e.chart.component(zX.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove:function(t){t.preventDefault();var n=this.areaPan,r=n.span,i=n.min,o=n.max,a=n.size,s=-t.deltaX/a;e.viewState.set("zoom",{min:Math.min(i+s*r,e.viewCache.get("continuousMax")-r),max:Math.max(o+s*r,e.viewCache.get("continuousMin")+r)})},areaPanend:function(e){e.preventDefault(),this.started=!1},areaPancancel:function(e){e.preventDefault(),this.started=!1}}}};function SQ(e,t){if(e.layoutService.meta.isDiscrete)return{};var n=e.viewCache,r=e.viewState,i=e.chart,o=t.rtl,a=XY.event.onZoom({viewCache:n,viewState:r,chart:i},{threshold:100,rtl:o,targetKey:zX.COMPONENT.BAR}),s={last:0,diff:0};return{type:"Pinch",key:"continuous-pinch-zoom",options:{event:"zoom",pointers:2,threshold:0,enable:function(t,n){return!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key===zX.COMPONENT.BAR}))}},events:{zoomstart:function(e){s.last=e.scale,e.preventDefault()},zoommove:function(e){var t=e.scale-s.last;(function(e){return Math.abs(e)>.01})(t)&&a(e.center,t>0?1:-1),e.preventDefault(),s.last=e.scale}}}}function CQ(e,t,n){var r,i=e.chart,o=i.component(zX.COMPONENT.BASE_TOOLTIP);o&&o.show&&(o.emit("hide"),null!=n&&null!==(r=n.customTooltipModel)&&void 0!==r&&r.useCustomTooltip&&t&&t({},o,{nodes:[],opts:n,customTooltipModel:n.customTooltipModel,hide:!0}));var a=i.component(zX.COMPONENT.LEGEND_CAT_TOOLTIP);a&&a.show&&a.emit("hide");var s=i.component(zX.COMPONENT.TREND_LINES_TOOLTIP);s&&s.show&&s.emit("hide")}function qQ(e,t){var n=e.viewCache,r=e.viewState,i=e.chart,o=e.trendLineModel,a=e.layoutService,s=t.rtl,u=e.layoutService.meta.isContinuous?XY.event.onZoom({viewCache:n,viewState:r,chart:i},{rtl:s,threshold:50,targetKey:zX.COMPONENT.BAR}):void 0,l=qX({majorInnerScale:zX.SCALE.MAIN.MAJOR_INNER,tooltip:zX.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:zX.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:i,viewState:r,trendLineModel:o,layoutService:a,rtl:s}),c=[zX.COMPONENT.BAR,zX.COMPONENT.BAR_AXIS,zX.COMPONENT.GROUP_AXIS,zX.COMPONENT.BAR_OOB_MAX,zX.COMPONENT.BAR_OOB_MIN],f=e.customTooltipModel.utils,d=e.debouncer(f.displayTooltip,f.DEBOUNCE_THRESHOLD);return{type:"native",events:{wheel:function(t){var n,r=!1;if(e.actions.scroll.enabled()){var i={x:t.clientX,y:t.clientY};(n=y(e.chart.componentsFromPoint(i).filter((function(e){return e.key===zX.COMPONENT.BAR})),1)[0])&&(e.layoutService.meta.isContinuous&&u(i,Math.sign(-t.deltaY)),r=!0)}!r&&e.actions.interact.enabled()&&((n=y(e.chart.componentsFromPoint(t).filter((function(e){return e.key===zX.COMPONENT.LEGEND_COLOR_CAT})),1)[0])&&(r=!0,function(e,t){var n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n)));r&&t.preventDefault(),CQ(e,d,e)},mousemove:function(t){if(e.actions.tooltip.enabled()){if(l(t))return;var n=this.chart.componentsFromPoint({x:t.clientX,y:t.clientY}),r=this.chart.component(zX.COMPONENT.BASE_TOOLTIP);if(r&&r.show)if(n.some((function(e){return c.indexOf(e.key)>-1}))){var i=e.customTooltipModel;if(i.useCustomTooltip&&f.checkIfPromisesExist({customTooltipModel:i})){var o=f.getNodes(t,this.chart);d(t,r,{nodes:o,opts:e,customTooltipModel:i})}else r.emit("show",t)}else r.emit("hide");var a=this.chart.component(zX.COMPONENT.LEGEND_CAT_TOOLTIP);a&&a.show&&(n.some((function(e){return e.key===zX.COMPONENT.LEGEND_COLOR_CAT}))?a.emit("show",t):a.emit("hide"))}},mouseup:function(t){2===t.button&&CQ(this,d,e)},mouseleave:function(){CQ(this,d,e)}}}}var EQ=function(e,t){return{type:"hammer",enable:!0,gestures:[].concat(b((t.hammer||{}).gestures||[]),b(mK(n(n({},e),{},{componentKey:"scrollbar",rtl:t.rtl})).gestures),b(e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[kQ(e,t.rtl),SQ(e,t)]))}};function TQ(e,t){if(!e.actions.interact.enabled())return[];var r=[EQ(e,t),qQ(e,t),mK(n(n({},e),{},{componentKey:"scrollbar",rtl:t.rtl})).native];return e.layoutService.meta.isDiscrete&&r.push(e.discrete.interactions.native),r}var DQ=function(e,t,n,r,i){var o=i.ds,a=i.colorService.getMain();if("measure"===a.getSettings().mode||"field"===a.getSettings().mode||/qAttrDimInfo/.test(a.getSettings().field))return r.map((function(r){return function(r){return e.measureText({text:r,fontSize:t,fontFamily:n})}(r.label)})).reduce((function(e,t){return t&&t.width>e.width?t:e}),{width:0});var s=o.field(a.getSettings().field).raw().qApprMaxGlyphCount;s=Zg.getAdjustedMaxGlyphCount(s,r,void 0,"label");var u=new Array(s+1).join("m");return e.measureText({text:u,fontSize:t,fontFamily:n})};var OQ=function(e,t,r){var i=r.collectionKey;if(!nK({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return function(e,t,n){var r=t.reducedDataModel,i=t.colorService,o=t.continuousDataModel;return{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:function(){return o.getDimensionCardinality()>1},data:{collection:n.collectionKey},settings:{box:Tg(!0,{},e.settings.box,{minWidthPx:2,fill:i.getMini().getColor(),strokeWidth:0}),major:Tg(!0,{},e.settings.major,{scale:r.scales.major}),minor:e.settings.minor,orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}}(e,t,{collectionKey:i});var o,a=t.reducedDataModel,s=a.mode,u=a.scales;return s.isGroupedByDimension&&!s.isReduced?o=function(e){var t=e.scale,n=e.datum;return t([n.group.value,n.value])+t.bandwidth([n.group.value,n.value])/2}:s.isGroupedByMeasure&&(o=function(e){var t=e.scale,n=e.datum;return t([n.value,n.measureIndex.value])+t.bandwidth()/2}),{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:function(){return t.discrete.query.getCanScroll()},data:{collection:i},settings:{box:n(n({},e.settings.box),{},{fill:s.isReduced||s.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0}),major:{scale:u.major,fn:o},minor:{scale:u.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}},NQ=pm.renderer("svg")().measureText;function _Q(e,t,n){return{reducedMinor:function(e){var t=Tg(!0,{},e);return delete t.data,t}(t.minor),reducedMajor:function(e,t,n){var r=n.majorScaleInvert,i=n.maxPxStep,o=n.align,a=n.getProp,s={invert:r,data:{extract:e.mode.isDimensionless?e.fields.minor.map((function(e,t){return{field:e,value:t}})):{source:"miniCube",field:"qDimensionInfo/0"}},type:e.mode.isDimensionless?"band":void 0,maxPxStep:i,align:o};return e.mode.isStackedByDimension?s.data.extract.field="qDimensionInfo/1":e.mode.isGroupedByDimension?e.mode.isReduced||(s.data={source:"miniCube",hierarchy:{value:function(e){return e.qElemNumber}}}):e.mode.isGroupedByMeasure?(s=Tg(!0,{},t)).data.extract.source="miniCube":e.mode.isContinuous&&(s=Tg(!0,{},t,{min:function(){return a("continuousMin")},max:function(){return a("continuousMax")}})),s}(e,t.major,n)}}var AQ=50,IQ=100,PQ=200;function LQ(e,t){var n=function(e){var t=e.getLayoutValue("measureAxis.spacing",1);switch(t){case.5:return AQ;case 1:return IQ;case 2:return PQ;default:return 125*t}}(t);return Math.max(1,Math.round(e/n))}function RQ(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function jQ(e,t,n){return 0===t||0===e||t===n.length-1}function zQ(e){for(var t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}function FQ(e,t,n,r,i){e.domain([t,n]),e.nice(10);var o=y(e.domain(),2),a=o[0],s=o[1],u=e.ticks(10),l=function(e){return e.length%2==0}(u),c=function(e){var t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((function(e){return 0===e}))}(u),f=c?jQ:RQ;u=u.filter(f),l&&!c&&!r&&u.length>1&&(u=[u[0],(u[0]+u[u.length-1])/2,u[u.length-1]]);var d=i?i.formatter(zX.FORMATTER.MINOR):void 0;return zQ(d?u.map(d):u)&&(u=[u[0],u[u.length-1]]),{roundedMin:a,roundedMax:s,ticks:u}}function BQ(e,t,n,r,i,o,a,s){var u=o.formatter(zX.FORMATTER.MINOR),l=s.getStyles(),c="horizontal"===a.meta.major.orientation?"height":"width",f=function(e){return NQ({text:e,fontSize:l.axis.label.name.fontSize,fontFamily:l.axis.label.name.fontFamily})[c]},d=y(e.domain(),2),h=d[0],p=d[1],m=e.ticks(r);function v(){var e=m.map(u);return!zQ(e)&&function(e){var t=i/m.length;return Math.max.apply(Math,b(e.map(f)))<=t}(e)}for(var g=r-1;g>0&&!v();g--){e.domain([t,n]),e.nice(g);var x=y(e.domain(),2);h=x[0],p=x[1],m=e.ticks(g)}return{roundedMin:h,roundedMax:p,ticks:m}}var VQ=function(e,t){return e.value-t.value},HQ=function(e){return{value:e,isMinor:!1}},UQ=function(e){return{value:e,isMinor:!0}};function WQ(e,t,n){var r=Number.isNaN(t)&&Number.isNaN(n)?3:2;return e.filter((function(e){return function(e){return Number.isNaN(t)||e>=t}(e)&&function(e){return Number.isNaN(n)||e<=n}(e)})).length<=r}function YQ(e){var t=e.chart,n=e.viewCache,r=e.dockService,i=e.layoutService,o=e.themeService,a=n.get("minorMinMax"),s=a.explicitMin,u=a.explicitMax,l=a.hasExplicitMin,c=a.hasExplicitMax,f=function(e){var t=e.get("minorMinMax"),n=t.min,r=t.max;return n===r&&0===n&&(n-=1,r+=1),{min:n,max:r}}(n),d=f.min,h=f.max,p=SH((function(){var e,a,f=function(e,t,n){var r;return r=e?n.meta.chart.size:t.component(zX.COMPONENT.BAR).rect,"horizontal"===n.meta.major.orientation?r.height:r.width}(n.get("isPreRender"),t,r),p=LQ(f,i),m=function(e,t,n){var r=rw().domain([e,t]);return r.nice(n),r}(d,h,p),v=[];if("SPARK"===r.meta.chart.mode){var g=function(e,t){return{roundedMin:e,roundedMax:t}}(d,h);e=g.roundedMin,a=g.roundedMax}else{var y=BQ(m,d,h,p,f,t,r,o);if(e=y.roundedMin,a=y.roundedMax,WQ(v=y.ticks,s,u)){var x=FQ(m,d,h,l||c,t);e=x.roundedMin,a=x.roundedMax,v=x.ticks}}var w=function(e,t){for(var n=[],r=0;r<e.length-1;r++)for(var i=e[r],o=(e[r+1]-i)/(t+1),a=1;a<=t;a++)n.push(i+o*a);return n}(v,1);return v=function(e,t,n){return e&&n.length&&!n.some((function(e){return e===t}))?(n.unshift(t),n.filter((function(e){return e>=t}))):n}(l,s,v),{roundedMin:e,roundedMax:a,ticks:function(e,t){return[].concat(b(e.map(HQ)),b(t.map(UQ))).sort(VQ)}(v=function(e,t,n){return e&&n.length&&!n.some((function(e){return e===t}))?(n.push(t),n.filter((function(e){return e<=t}))):n}(c,u,v),w)}}),(function(){return n.get("isPreRender")}));return{values:function(){return p().ticks},min:function(){return l?s:p().roundedMin},max:function(){return c?u:p().roundedMax}}}function KQ(e,t,r){var i,o,a=t.picasso,s=t.discrete,u=t.layoutService,l=t.dockService,c=t.viewModel,f=t.viewCache,d=t.reducedDataModel,h=t.colorService,p=t.themeService,m=t.viewState,v=t.chart,g=r.localeInfo,y=r.rtl,x=u.meta,w=c.fields,M=function(){if("custom"!==u.getLayoutValue("dimensionAxis.axisDisplayMode"))return Math.min(200,l.meta.chart.size["horizontal"===l.meta.major.orientation?"height":"width"]/4)},k=!("none"===u.getLayoutValue("measureAxis.show"))?(i=l.meta.minor.orientation,o=l.meta.minor.dock,"vertical"===i?"near"===o||"left"===o?0:1:"near"===o||"bottom"===o?1:0):.5,S={},C="vertical"===l.meta.minor.orientation&&y,q=h.getMain().getScales(),E=h.getMini().getScales();if(Object.assign(S,q,{reducedFill:E.reducedFill}),S[zX.SCALE.MAIN.MINOR]=function(e,t){var n=e.chart,r=e.viewModel.fields,i=e.dockService,o=e.viewCache,a=e.layoutService,s=e.themeService,u=t.rtl,l=YQ({chart:n,dockService:i,viewCache:o,layoutService:a,themeService:s}),c={invert:"vertical"===i.meta.minor.orientation||u,ticks:{values:l.values},minorTicks:{count:1},min:l.min,max:l.max};return a.meta.isStacked||(c.data={source:"qHyperCube",fields:r.minor}),c}({chart:v,viewModel:c,dockService:l,viewCache:f,layoutService:u,themeService:p},{rtl:y}),x.isGroupedByDimension)[zX.SCALE.MAIN.MAJOR_INNER,zX.SCALE.MAIN.MAJOR].forEach((function(e,t){S[e]={invert:C,data:{source:"qHyperCube",hierarchy:{label:function(e){return e.qText?e.qText:""},value:function(e){return e.qElemNumber},props:n(n({},c.selectionDimensionProp(t)),{},{group:x.isGroupedByDimension?{field:w.majorGroup}:void 0})}},label:function(e){return e.datum.label},ticks:{depth:t+1},maxPxStep:M,align:k}}));else if(x.isGroupedByMeasure)S[zX.SCALE.MAIN.MAJOR]={type:"group-by-measure",invert:C,data:{extract:{source:"qHyperCube",field:"qDimensionInfo/0",props:n({},c.selectionDimensionProp(0))}},measureCount:e.qHyperCube.qMeasureInfo.length,maxPxStep:M,align:k};else if(x.isTime){var T=function(e,t){var n=e.layoutService,r=e.viewModel,i=e.viewCache,o=e.picasso,a=e.viewState,s=e.localeInfo,u=e.themeService,l=function(){return n.getHyperCubeValue("qAxisData.qAxis",[])},c=o.formatter("q-time"),f=u.getStyles(),d=function(e){return NQ({text:e,fontSize:f.axis.label.name.fontSize,fontFamily:f.axis.label.name.fontFamily})};i.set("qTimeAxisCache",[]);var h={get:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=i.get("qTimeAxisCache");return n[t]&&n[t][0]===e?n[t][1]:void 0},set:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;i.get("qTimeAxisCache")[n]=[e,t]},key:function(e){var t=e.distance,n=a.get("zoom"),r=n.min,o=(n.max-r)/(i.get("continuousMax")-i.get("continuousMin")),s=l().map((function(e){return e.qName}));return[t,o.toString().length>12?o.toPrecision(12):o].concat(b(s)).toString()}};return{innerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:l,field:r.fields.majorNumeric,min:function(){return a.get("zoom").min},max:function(){return a.get("zoom").max},invert:!!t,formatter:{fn:c,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:d},ticks:{generator:{type:"d3"},level:"inner",anchor:"start",clamp:!0},cache:h},outerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:l,field:r.fields.majorNumeric,min:function(){return a.get("zoom").min},max:function(){return a.get("zoom").max},invert:!!t,formatter:{fn:c,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:d},ticks:{generator:{type:"d3"},level:"outer",anchor:"start",clamp:!0},cache:h}}}({picasso:a,localeInfo:g,viewState:m,viewModel:c,viewCache:f,themeService:p,layoutService:u},y),D=T.innerTime,O=T.outerTime;S[zX.SCALE.MAIN.MAJOR_INNER]=D,S[zX.SCALE.MAIN.MAJOR]=O}else x.isContinuous?S[zX.SCALE.MAIN.MAJOR]={type:"linear",invert:C,data:{extract:{key:"qHyperCube",field:w.majorNumeric}},ticks:{forceBounds:!0,count:m.get("zoom").min===m.get("zoom").max?1:void 0},minorTicks:{count:1},min:function(){return m.get("zoom").min},max:function(){return m.get("zoom").max}}:S[zX.SCALE.MAIN.MAJOR]={invert:C,data:{extract:x.isDimensionless?w.minor.map((function(t,n){return{field:t,label:function(){return e.qHyperCube.qMeasureInfo[n].qFallbackTitle},value:n}})):{source:"qHyperCube",field:"qDimensionInfo/0",props:n({},c.selectionDimensionProp(0))}},type:x.isDimensionless?"band":void 0,maxPxStep:M,align:k};var N=_Q(d,{major:S[zX.SCALE.MAIN.MAJOR],minor:S[zX.SCALE.MAIN.MINOR]},{majorScaleInvert:C,maxPxStep:M,align:k,getProp:f.get}),_=N.reducedMinor,A=N.reducedMajor;return x.isDiscrete&&(S[zX.SCALE.MAIN.MAJOR].range=s.query.getScaleRange,x.isGroupedByDimension&&(S[zX.SCALE.MAIN.MAJOR_INNER].range=s.query.getScaleRange)),S[d.scales.major]=A,S[d.scales.minor]=_,S}function $Q(e){return function(e,t){var n=function(e){var t=e.key,n=e.targets,r=e.components,i=e.fillTargets,o=e.dock;return{key:t,type:"brush-area-dir",layout:{dock:n.map((function(e){return"@".concat(e)})).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[CJ(e,t,"area")],components:[n]}}({eventName:"discreteRange",components:[{key:zX.COMPONENT.BAR,contexts:["selection"],action:"set",data:["selectionDimension"]}],key:"discreteRangeBrush",targets:["group-axis",zX.COMPONENT.BAR_AXIS,zX.COMPONENT.BAR],fillTargets:["group-axis",zX.COMPONENT.BAR_AXIS],dock:e.dockService.meta.major.dock},e)}function GQ(e,t){var r=void 0===t,i=e.selectionService.getIsSingleSelect(t),o=function(e,t,r){var i=e.layoutService,o=e.colorService;return SJ({targets:[i.meta.isStackedByDimension&&i.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1?zX.COMPONENT.STACK_TOTAL_BAR:zX.COMPONENT.BAR,zX.COMPONENT.BAR_AXIS,zX.COMPONENT.GROUP_AXIS,"outer-axis-overlay","inner-axis-overlay",zX.COMPONENT.LEGEND_COLOR_CAT],components:function(e,t){var i={action:e.srcEvent.ctrlKey||r?"set":"toggle",contexts:["selection"],key:t[0].key};return[zX.COMPONENT.BAR,zX.COMPONENT.BAR_AXIS,zX.COMPONENT.GROUP_AXIS].includes(t[0].key)?[n(n({},i),{},{data:["selectionDimension"]})]:[i]}},n(n({},e),{},{isLocked:function(n){return n.some((function(e){return e.key===zX.COMPONENT.LEGEND_COLOR_CAT}))?o.getMain().isSelectionLocked({isMeasureSelectionLocked:t}):e.isLocked(n)}}))}(e,r,i);if(r||i)return{components:b(o.components),gestures:b(o.interactions)};var a=function(e){var t=e.layoutService.meta.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1;return kJ({key:"lasso",componentTargetKey:zX.COMPONENT.BAR,components:[t?{key:zX.COMPONENT.STACK_TOTAL_BAR,contexts:["selection"],action:"add"}:{key:zX.COMPONENT.BAR,contexts:["selection"],action:"add",data:["selectionDimension"]}]},e)}(e),s=function(e){return e.layoutService.meta.isStacked?{components:[],interactions:[]}:qJ({eventName:"measureRange",key:"measureRangeBrush",targets:["y-axis",zX.COMPONENT.BAR],fillTargets:["y-axis"],dock:e.dockService.meta.minor.dock,scale:zX.SCALE.MAIN.MINOR,onEdited:function(){e.actions.select.emit("end","measureRange")}},e)}(e),u=function(e){return e.layoutService.meta.isContinuous?qJ({eventName:"continuousRange",key:"continuousRangeBrush",targets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis",zX.COMPONENT.BAR]:["continuous-axis",zX.COMPONENT.BAR],fillTargets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis"]:["continuous-axis"],observeBrush:!0,multiple:!0,dock:e.dockService.meta.major.dock,scale:e.layoutService.meta.isTime?zX.SCALE.MAIN.MAJOR_INNER:zX.SCALE.MAIN.MAJOR,toLabel:function(t){var n=t.datum,r=t.data,i=t.scale,o=e.layoutService.meta.isTime?i.formatter():e.chart.formatter(zX.FORMATTER.MINOR),a=e.chart&&e.chart.brushSelectionIncludeMax;return"".concat(n!==Math.max.apply(Math,b(r))||a?"":"<").concat(o(n))}},e):{components:[],interactions:[]}}(e),l=$Q(e);return{components:[].concat(b(o.components),b(a.components),b(s.components),b(l.components),b(u.components)),gestures:[].concat(b(a.interactions),b(o.interactions),b(s.interactions),b(l.interactions),b(u.interactions))}}function XQ(e){var t=e.layoutService,n=e.viewModel,r=e.dockService,i=t.meta;if(!i.isStackedByDimension||i.isContinuous)return!1;var o=n.fields,a=t.getLayoutValue("components",null),s=a?a.filter((function(e){return"bar"===e.key}))[0]:null;return{key:"shadow-bar",type:"box",data:{extract:[{field:o.majorStack,filter:function(e){return 0!==e.qDown||0!==e.qUp},props:{start:{value:function(e){return function(e){return Number(e.map((function(e){return e.qMaxPos})).reduce((function(e,t){return e+t}),0).toFixed(13))}(e.qSubNodes)}},end:{value:function(e){return Number(e.qMaxPos.toFixed(13))}}}},{field:o.majorStack,filter:function(e){return 0!==e.qDown||0!==e.qUp},props:{start:{value:function(e){return function(e){return Number(e.map((function(e){return e.qMinNeg})).reduce((function(e,t){return e+t}),0).toFixed(13))}(e.qSubNodes)}},end:{value:function(e){return Number(e.qMinNeg.toFixed(13))}}}}]},settings:{major:{scale:zX.SCALE.MAIN.MAJOR},minor:{scale:zX.SCALE.MAIN.MINOR},orientation:r.meta.minor.orientation,box:{width:s&&s.style.width>0?s.style.width:.7,fill:function(){return{type:"pattern",fill:"rgba(165, 165, 165, 0.8)",width:4,height:4,shapes:[{type:"rect",x:0,y:3,width:1,height:1},{type:"rect",x:1,y:2,width:1,height:1},{type:"rect",x:2,y:1,width:1,height:1},{type:"rect",x:3,y:0,width:1,height:1}]}}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}}var JQ={min:"Min",max:"Max"};function QQ(e,t,n){var r=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?HJ(e,t)||UJ(e,t):n===WJ?HJ(e,t):UJ(e,t)}(Number(r.toFixed(13)),e,t)}function ZQ(e,t){var n=t.barComponent,r=t.type,i=t.isStacked,o=e.viewCache,a=e.layoutService,s=e.dockService,u=o.get("minorMinMax"),l=r===WJ;if(function(e,t){return!e["hasOther".concat(JQ[t])]}(u,r)){if(function(e,t){return!e["hasExplicit".concat(JQ[t])]}(u,r))return!1;if(QQ(u,r,l))return!1}if(function(e,t,n){var r=n?function(e){return e<0}:function(e){return e>0};return e["hasExplicit".concat(JQ[t])]&&r(e["explicit".concat(JQ[t])])}(u,r,l))return!1;var c="end";i&&(c=l?"sumOfPositives":"sumOfNegatives");var f=function(e){var t;return function(){return void 0===t&&(t=e()),t}}((function(){return e.chart.scale(zX.SCALE.MAIN.MINOR)[r]()})),d=l?function(e){return e.datum[c].value>f()}:function(e){return e.datum[c].value<f()},h=zX.COMPONENT.BAR,p=e.layoutService.getLayoutValue("components",[]),m=p?p.filter((function(e){return e.key===h}))[0]:null;return{type:"box-sliced-hat",key:"sliced-hat-".concat(r),layout:{dock:l?s.meta.minor.end:s.meta.minor.start},data:n.data,brush:n.brush,settings:{orientation:n.settings.orientation,major:n.settings.major,minor:n.settings.minor,hat:Tg({},n.settings.box,{fill:a.meta.isStacked?"#999":n.settings.box.fill,alignment:1,opacity:1,show:d,width:RJ({layoutService:e.layoutService,discrete:e.discrete,componentKey:h}),strokeWidth:m?LJ.BAR.STROKE.WIDTH[m.style.strokeWidth.toUpperCase()]:LJ.BAR.STROKE.WIDTH.NONE,stroke:m?m.style.strokeColor.color:LJ.BAR.STROKE.COLOR})}}}function eZ(e,t){var n;return n=e.isContinuous?1:.7,!e.isContinuous&&t&&t.style.width>0?t.style.width:n}function tZ(e,t,r){var i=t.collectionKey,o=e.layoutService.meta,a=e.viewModel.fields,s=o.isStackedByDimension&&!o.isContinuous?"qValue":"qNum",u=function(e){return"NaN"===e[s]?0:e[s]};function l(t){var n=e.ds.field(t).raw(),r=e.ds.field(t).formatter(),i=!n.isCustomFormatted&&(n.qIsAutoFormat||"U"===n.qNumFormat.qType);return{field:t,reduceLabel:"none",value:u,label:function(e){return i?function(e){return"NaN"===e[s]?"-":r(e[s])}(e):e.qText}}}var c=o.isStackedByDimension?function(e){return"NaN"===e.qValue}:function(e){return!!e.qIsNull};function f(e){return{field:e,reduceLabel:"none",reduce:"first",value:c}}var d={key:i,data:{extract:a.minor.map((function(t,i){var s=e.colorService.getMain().getDatumProps(i),u=e.colorService.getMini().getDatumProps(i),c=s[Object.keys(s)[0]],d=null==c?void 0:c.field,h=d?{field:d,reduceLabel:"none",value:function(e){return void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}}:void 0,p={field:o.isDimensionless?t:a.major,props:n(n(n(n({},e.viewModel.selectionDimensionProp()),{},{start:0,end:l(t),null:f(t),segment:o.isStacked?l(t):void 0,group:o.isGroupedByDimension?{field:a.majorGroup}:void 0,stack:o.isStacked?{field:a.majorStack}:void 0,measureIndex:o.isGroupedByDimension||o.isStackedByDimension?void 0:i,timeStart:o.isContinuous?{field:a.majorNumeric}:void 0,timeEnd:o.isContinuous?{field:a.majorNumeric}:void 0,fillTooltip:h},s),u),{},{id:{value:function(e){return"r".concat(e.qRow,"e").concat(e.qElemNumber,"m").concat(i)}},customTooltipAttrExps:0!==o.dimensionCount?oG(e.layoutService.getLayout(),o):void 0})};return o.isDimensionless&&(p.value=i),void 0!==r&&(p.source=r),Vg(p.props),p}))}};return o.isStacked&&(d.data.stack={stackKey:function(e){return e.stack.value},value:function(e){return e.end.value},offset:"diverging"}),d}function nZ(e,t){var n=e.layoutService,r=e.viewModel,i=t.collectionKey,o=n.meta,a=r.fields;return!!o.isStacked&&{key:i,data:{extract:o.isStackedByMeasure?function(e,t){var n={field:0,props:{sumOfPositives:{fields:t.minor.map((function(e){return{field:e}})),value:function(e){return e.reduce((function(e,t){return t>0?e+t:e}),0)},reduceLabel:"none"},sumOfNegatives:{fields:t.minor.map((function(e){return{field:e}})),value:function(e){return e.reduce((function(e,t){return t<0?e+t:e}),0)},reduceLabel:"none"},null:{fields:t.minor.map((function(e){return{field:e}})),value:function(e){return Array.isArray(e)&&e.every((function(e){return"NaN"===e}))},reduceLabel:"none"}}};if(e.isContinuous){var r={field:t.major,value:function(e){return e.qNum},reduceLabel:"none"};n.props.timeStart=r,n.props.timeEnd=r,n.value=function(e){return e.qNum}}return n}(o,a):function(e,t){if(!e.isContinuous)return{field:t.majorStack,reduceLabel:"none",props:{sumOfPositives:{value:function(e){return Number(e.qMaxPos.toFixed(13))}},sumOfNegatives:{value:function(e){return Number(e.qMinNeg.toFixed(13))}},null:{value:function(e){var t=e.qSubNodes;return(void 0===t?[]:t).every((function(e){return"NaN"===((e.qSubNodes||[])[0]||{}).qValue}))}}}};var n={field:t.majors[0],value:function(e){return e.qNum},reduceLabel:"none"};return{field:t.majorStack,trackBy:function(e){return e.qNum},reduce:function(e){return e[0]},props:{sumOfPositives:{field:t.minor[0],reduceLabel:"none",reduce:function(e){return e.reduce((function(e,t){return t>0?e+t:e}),0)}},sumOfNegatives:{field:t.minor[0],reduceLabel:"none",reduce:function(e){return e.reduce((function(e,t){return t<0?e+t:e}),0)}},timeStart:n,timeEnd:n}}}(o,a)}}}var rZ="main-collection",iZ="stack-total-collection";var oZ="mini-collection",aZ="mini-stack-collection",sZ="mini-continuous-collection",uZ="miniCube",lZ=function(e,t){var r=[];return nK({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?r.push(tZ(t,{collectionKey:sZ},uZ)):t.layoutService.meta.isStacked?r.push(function(e,t){var r=t.collectionKey,i=e.colorService,o=e.reducedDataModel,a=o.fields,s=o.mode;return{key:r,data:{extract:a.minor.map((function(e,t){var r=n({end:{field:e,reduceLabel:"none"}},s.isStackedByMeasure&&!s.isReduced?i.getMain().getDatumProps(t):{});return s.isContinuous&&(r.timeStart={field:a.major,value:function(e){return e.qNum}},r.timeEnd=r.timeStart),{source:"miniCube",field:a.major,props:r}})),stack:{stackKey:function(e){return e.value},value:function(e){return e.end.value},offset:"diverging"}}}}(t,{collectionKey:aZ})):r.push(function(e,t){var r=t.collectionKey,i=e.colorService,o=e.reducedDataModel,a=o.fields,s=o.mode;return{key:r,data:{extract:a.minor.map((function(e,t){var r=s.isReduced?{}:i.getMain().getDatumProps(t),o=n({end:{field:e},start:0,group:{field:a.majorGroup},measureIndex:t},r),u={source:"miniCube",field:s.isDimensionless?e:a.major,props:o};return s.isDimensionless&&(u.value=t),u}))}}}(t,{collectionKey:oZ}))),r},cZ=function(e,t){var n=function(e){var t=[tZ(e,{collectionKey:rZ})];return e.layoutService.meta.isStacked&&t.push(nZ(e,{collectionKey:iZ})),t}(t),r=lZ(0,t);return n.concat(r)};function fZ(e,t,n){var r=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function dZ(e,t,n){var r=e.layout,i=e.component;if(!iQ(r,t))return!1;var o=t.layoutService.meta,a=!rQ(r,t),s=t.themeService.getStyles();function u(e){var n=t.chart.formatter(zX.FORMATTER.MINOR);return n?n(e):e}var l={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":u(e.data.sumOfPositives.value)},simplifiedPlacements:fZ("outside",a,o.isContinuous),style:s.label.value},c={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":u(e.data.sumOfNegatives.value)},simplifiedPlacements:fZ("opposite",a,o.isContinuous),style:s.label.value};return{key:"stack-total-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:i,selector:"rect",strategy:{type:"bar",settings:{direction:function(e){return nQ(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,n)},labels:[eQ(Tg(t,l)),eQ(Tg(t,c))],fontSize:s.label.value.fontSize,fontFamily:s.label.value.fontFamily}}}]}}}function hZ(e,t,n){var r=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&r.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),r}function pZ(e,t){var n=e.layout,r=e.type,i=t.layoutService,o=t.viewCache,a=t.themeService,s=i.meta,u=s.isStacked;if(!u&&!rQ(n,t)||u&&!iQ(n,t))return!1;var l=o.get("minorMinMax");if(!l.hasExplicitMinMax||r===WJ&&0===l.max||r===YJ&&0===l.min)return!1;if(!$J(r===WJ?l.implicitMax:l.implicitMin,l,r))return!1;var c=a.getStyles();var f=function(e){return e.data.end.label};s.isStacked&&(f=r===WJ?function(e){if($J(e.data.sumOfNegatives.value,l,r)){var n=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,i=t.chart.formatter(zX.FORMATTER.MINOR);return i?i(n):n}return""}:function(e){if($J(e.data.sumOfPositives.value,l,r)){var n=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,i=t.chart.formatter(zX.FORMATTER.MINOR);return i?i(n):n}return""});var d={color:"#595959",lightColor:"#E6E6E6",darkColor:"#595959",fontSize:13,fontFamily:"'Source Sans Pro', 'Arial', 'sans-serif'"},h={label:f,simplifiedPlacements:hZ("outside",true,s.isContinuous),style:d},p={label:f,simplifiedPlacements:hZ("opposite",true,s.isContinuous),style:d},m=[eQ(Tg(t,h)),eQ(Tg(t,p))],v="vertical"===t.dockService.meta.minor.orientation?"down":"right",g=[{component:"".concat(zX.COMPONENT.GHOST_BAR_OOB,"-").concat(r),selector:"rect",strategy:{type:"bar",settings:{direction:v,labels:m,fontSize:c.label.value.fontSize,fontFamily:c.label.value.fontFamily}}}];return{key:"bar-oob-labels-".concat(r),type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:g}}}function mZ(e){return"all"===e||"title"===e}function vZ(e,t,n){if(!mZ(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;var r=t.actions,i=t.properties,o=t.themeService.getStyles(),a={hyperCube:e.qHyperCube,hyperCubeDef:i&&i.qHyperCubeDef,isDimension:!0,disabled:function(){var e;return!(null!=r&&null!==(e=r.interact)&&void 0!==e&&e.enabled())},model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections};return t.layoutService.meta.hasMultipleDimensions&&(a.padding="0",a.minWidth="auto"),{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:EJ["".concat(t.dockService.meta.major.orientation,"DimensionAxisTitle")].minimumLayoutMode,dock:t.dockService.meta.major.dock},settings:a,style:{fontFamily:o.axis.title.fontFamily,fontSize:o.axis.title.fontSize,color:o.axis.title.color}}}function gZ(e,t,n){if(!mZ(e.measureAxis.show))return!1;var r=t.layoutService,i=t.actions,o=t.properties,a=r.getLayoutValue("qUndoExclude")?"qUndoExclude.qHyperCubeDef":"qHyperCubeDef",s=t.themeService.getStyles(),u={hyperCube:r.getHyperCube(),hyperCubeDef:wH(o,a),isDimension:!1,disabled:function(){return!i.interact.enabled()},model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections};return t.layoutService.meta.hasMultipleMeasures&&(u.padding="0",u.minWidth="auto"),{key:"measure-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},settings:u,style:{fontFamily:s.axis.title.fontFamily,fontSize:s.axis.title.fontSize,color:s.axis.title.color}}}var yZ=function(e,t,r){var i,o=t.layoutService,a=t.dockService,s=t.colorService,u=t.chart,l=t.actions,c=t.discrete,f=t.continuousDataModel,d=t.reducedDataModel,h=t.viewModel,p=t.viewState,m=t.viewCache,v=t.themeService,g=t.refLineModel,y=t.pluginService,x=t.rtl,w=t.logicalSize,M=r.localeInfo,k=hQ({layout:e},t,x);if(k&&"center"===k.layout.dock)return{components:[k]};var S=KQ(e,t,{localeInfo:M,rtl:x}),C=!(null!=l&&null!==(i=l.interact)&&void 0!==i&&i.enabled()),q=s.getMain().getLegend({eventName:"legend-c",key:"legend-color",viewState:p,chart:u,styleReference:"object.barChart",rtl:x,settings:{item:{shape:{size:10}}}},{actions:l,navigationDisabled:C}),E=q.components[0];if(E){var T=E.layout.dock;if(S.fillRange&&(["right","left"].includes(T)||x)&&(S.fillRange.invert=!0),"legend-seq"===E.type&&void 0!==h.selectionDimensionIdx&&S.fillRange&&S.fillRange.min<S.fillRange.max){var D,O,N=qJ({eventName:"legendRange",key:"legendRangeBrush",targets:[E.key],fillTargets:[E.key],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:E.layout.dock,scale:"fillRange",bubblesPlacement:"outside",onEdited:function(){l.select.emit("end","legendRange")}},t);(D=q.components).push.apply(D,b(N.components)),(O=q.interactions).unshift.apply(O,b(N.interactions))}if("legend-cat"===E.type){var _=function(e,t){var n=["top","bottom"].indexOf(e.layout.dock)>-1,r=wH(t,"properties.legend.showTitle"),i=t.chart.theme().style("$font-family"),o=t.picasso.renderer(e.renderer)(),a=function(e,t,n,r){return e.measureText({text:r,fontSize:t,fontFamily:n})}(o,wH(e,"settings.title.fontSize","16px"),i,t.colorService.getMain().getSettings().label),s=n&&!r?0:Math.min(135,a.width),u=function(e,t){var n=t.ds,r=t.picasso,i=t.colorService.getMain(),o=i.getData().map((function(e){return e.key})).indexOf("attrDim");return"field"===i.getSettings().mode&&"measure"===i.getSettings().fieldType?function(e,t){for(var n=[],r=e.field(t.data.field).formatter(),i=t.domain,o=1;o<i.length;o++)n.push({label:"".concat(r(i[o-1])," - < ").concat(r(i[o]))});return n}(n,i.getScales()[e]):"measure"===i.getSettings().mode?n.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return{label:e.title()}})):o>-1?r.data("q")({data:i.getData()[o].data}).extract({field:"qDimensionInfo/0"}):n.field(i.getSettings().field).items()}(e.scale,t),l=DQ(o,wH(e,"settings.item.label.fontSize","12px"),i,u,t),c=Math.min(117,l.width),f=Math.min(151,Math.max(s+16,c+24+10)),d=f-10-24,h={key:e.key,preferredSize:function(){return f},settings:{title:{maxWidth:function(){return f-16}},item:{label:{maxWidth:function(){return d},wordBreak:"break-word",maxLines:2}}}};return n&&(d=136,h={key:e.key,settings:{item:{label:{maxWidth:function(){return d}}}},beforeRender:function(e){var t=wH(e.size,"computedInner.width",0);d=(t-s-16)/u.length-10-16,d=Math.max(d,136)}}),h}(E,t);q.components.forEach((function(e){e.key===_.key&&Tg(!0,e,_)}))}}else S.fillRange&&x&&(S.fillRange.invert=!0);var A,I=function(e,t){var n,r,i=t.componentKey,o=t.collectionKey,a=e.layoutService.meta;a.isGroupedByDimension?n=function(e){var t=e.scale,n=e.datum;return t([n.group.value,n.value])+t.bandwidth([n.group.value,n.value])/2}:a.isGroupedByMeasure&&(n=function(e){var t=e.scale,n=e.datum;return t([n.value,n.measureIndex.value])+t.bandwidth()/2});var s=2;a.isContinuous?(r={start:"timeStart",end:"timeEnd"},s=FJ(e,i)):a.isStacked&&(r="stack");var u=a.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1,l=function(e){var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)},c=e.layoutService.getLayoutValue("components",null),f=c?c.filter((function(e){return e.key===i}))[0]:null;return{key:i,type:"box",data:{collection:o},preferredSize:a.isContinuous?function(){return{size:0,edgeBleed:{left:1,right:1}}}:void 0,brush:{consume:[{context:"selection",data:["selectionDimension","end","fill","timeEnd"],style:{active:{strokeWidth:a.isContinuous||u?0:2,stroke:"#000"},inactive:{opacity:.3}}}]},settings:{major:{scale:zX.SCALE.MAIN.MAJOR,fn:n,ref:r},minor:{scale:zX.SCALE.MAIN.MINOR},orientation:e.dockService.meta.minor.orientation,box:{width:RJ({layoutService:e.layoutService,discrete:e.discrete,componentKey:i}),minWidthPx:s,fill:e.colorService.getMain().getColor(),opacity:function(e){return l(e)?0:void 0},minHeightPx:function(e){return a.isStacked?.1:l(e)?.01:.3},strokeWidth:f?LJ.BAR.STROKE.WIDTH[f.style.strokeWidth.toUpperCase()]:LJ.BAR.STROKE.WIDTH.NONE,stroke:f?f.style.strokeColor.color:LJ.BAR.STROKE.COLOR},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}}(t,{componentKey:zX.COMPONENT.BAR,collectionKey:zX.COLLECTION.MAIN}),P=function(e,t){var n=t.componentKey,r=t.collectionKey,i=e.layoutService.meta;if(!i.isStacked)return!1;var o=2;i.isContinuous&&(o=FJ(e,n));var a=e.layoutService.getLayoutValue("components",null),s=a?a.filter((function(e){return e.key===n}))[0]:null,u={key:n,type:"box",data:{collection:r},settings:{major:{scale:zX.SCALE.MAIN.MAJOR},minor:{scale:zX.SCALE.MAIN.MINOR,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:e.dockService.meta.minor.orientation,box:{width:eZ(i,s),minWidthPx:o,opacity:0,fill:"none"},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:{consume:[{context:"selection",data:[""],style:{active:{strokeWidth:2,stroke:"#000",opacity:function(e){var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:1}},inactive:{opacity:function(e){var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:.3}}}}]}};return i.isContinuous&&(u.settings.major.ref={start:"timeStart",end:"timeEnd"}),u}(t,{componentKey:zX.COMPONENT.STACK_TOTAL_BAR,collectionKey:zX.COLLECTION.STACK_TOTAL}),L=GQ(t,h.selectionDimensionIdx),R=o.meta.isStacked;A=d.mode.isContinuous?zX.COLLECTION.MINI_CONTINUOUS:R?zX.COLLECTION.MINI_STACK:zX.COLLECTION.MINI;var j=R?P:I,z=wQ(0,t),F=[].concat(b(z),[ZQ(t,{barComponent:j,type:"max",isStacked:R}),ZQ(t,{barComponent:j,type:"min",isStacked:R}),XJ(t,{barComponent:j,type:"max",isStacked:R}),XJ(t,{barComponent:j,type:"min",isStacked:R}),QJ(t,{chart:u,barComponent:j,type:"max",scales:S,collectionKey:R?zX.COLLECTION.STACK_TOTAL:zX.COLLECTION.MAIN}),QJ(t,{chart:u,barComponent:j,type:"min",scales:S,collectionKey:R?zX.COLLECTION.STACK_TOTAL:zX.COLLECTION.MAIN})],b(PJ(e,t,x,!!z[0])),[I,P,XQ({layoutService:o,viewModel:h,layout:e,dockService:a}),vZ(e,t,x),gZ(e,t,x)],b(function(e){var t=e.environment,n=e.rtl,r=e.refLineModel,i=e.layoutService,o=e.colorService,a=e.dockService,s=e.themeService,u=e.chart,l=t.theme,c=t.localeInfo,f={resolveUIColor:o.getMain().getPaletteColor},d=s.getStyles();return[MS({refLineModel:r,layoutService:i,colorModel:f,dockService:a,chart:u,scale:zX.SCALE.MAIN.MINOR,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:zX.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:EJ.refLines.minimumLayoutMode}),MS({isDimension:!0,refLineModel:r,layoutService:i,colorModel:f,dockService:a,chart:u,scale:zX.SCALE.MAIN.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:n,key:zX.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:zX.COMPONENT.BAR,minimumLayoutMode:EJ.refLines.minimumLayoutMode})].concat(b(SS({refLineModel:r,layoutService:i,colorModel:f,dock:a.meta.minor.opposite,scale:zX.SCALE.MAIN.MINOR,style:d,formatter:zX.FORMATTER.MINOR,theme:l,localeInfo:c,rtl:n,key:zX.COMPONENT.MEASURE_REF_LINE_LABEL})),b(SS({isDimension:!0,refLineModel:r,layoutService:i,colorModel:f,dock:a.meta.major.opposite,scale:zX.SCALE.MAIN.MAJOR,style:d,theme:l,localeInfo:c,rtl:n,key:zX.COMPONENT.DIMENSION_REF_LINE_LABEL})))}({environment:r,rtl:x,refLineModel:g,layoutService:o,colorService:s,dockService:a,themeService:v,chart:u})),[ok({viewState:p,viewCache:m,layoutService:o,dockService:a,rtl:x}),OQ(I,t,{collectionKey:A}),rK({layoutService:o,dockService:a,discrete:c,continuousDataModel:f,viewState:p,viewCache:m,themeService:v,rtl:x})],b(xX({majorScale:zX.SCALE.MAIN.MAJOR,minorScale:zX.SCALE.MAIN.MINOR,tooltipOverlay:zX.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},t)),b(q.components),[aQ({layout:e,component:zX.COMPONENT.BAR,minorScale:S.minor},t,x),dZ({layout:e,component:zX.COMPONENT.STACK_TOTAL_BAR},t,x),pZ({layout:e,component:"bar-oob-max",type:"max"},t),pZ({layout:e,component:"bar-oob-min",type:"min"},t)],b(L.components),[uQ({layout:e},n(n({},t),{},{coloring:s.getMain().getSettings()}),x),fQ({layout:e},n(n({},t),{},{coloring:s.getMain().getSettings()}),x),(!1!==e.showDisclaimer||!t.flags.isEnabled("SHOW_DISCLAIMER"))&&k,SX({tooltip:zX.COMPONENT.TREND_LINES_TOOLTIP,formatter:zX.FORMATTER.MINOR,majorScale:zX.SCALE.MAIN.MAJOR},t,{rtl:x})]).filter(Boolean);return function(e){if(e&&0!==e.length)for(var t=0;t<e.length;t++)e[t].layout=e[t].layout||{},e[t].layout.displayOrder=t}(F),{interactions:TQ(t,{rtl:x,hammer:{gestures:[].concat(b(q.interactions),b(L.gestures)).sort((function(e,t){return(t.prio||0)-(e.prio||0)}))}}),scales:S,palettes:s.getMain().getPalettes(),components:y.extendComponents(F),strategy:Lg(0,{logicalSize:w,minCenterRatio:0}),formatters:pQ(t,S),collections:cZ(0,t)}};function bZ(t){var r=t.picasso,i=t.chart,o=t.services,a=t.environment,s=t.viewState,u=t.viewCache,l=e.useRect(),c=l.width,f=l.height,d=e.useModel(),h=e.useSelections(),p=e.useOptions(),m=y(e.useState(),2),v=m[0],g=m[1],x=y(e.useState(),2),w=x[0],M=x[1],k=y(e.useState(),2),S=k[0],C=k[1],q=y(e.useState(),2),E=q[0],T=q[1],D=e.useApp();function O(){if(!i.update)return Promise.resolve();var e=o.discrete,t=o.layoutService;u.set("isPreRender",!0);var l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o.selectionService,l=o.refLineModel,c=o.discrete,f=o.reducedDataModel,m=o.continuousDataModel,g=o.trendLineModel,y=o.pluginService,b=o.colorService,x=o.viewModel,w=o.dockService,M=o.themeService,k=o.customTooltipModel,S=o.layoutService,C=o.logicalSize,q=t.custom.getActions(),E=r.data("q")(v.prepPicassoDataSet()),T=n({picasso:r,ds:E,rtl:"rtl"===(null==p?void 0:p.direction),model:d,app:D,chart:i,actions:q,localeInfo:a.localeInfo,logicalSize:C,flags:a.flags,translator:a.translator,selections:h,isLocked:t.getIsSelectionLocked,viewCache:u,viewState:s,layoutService:S,dockService:w,viewModel:x,colorService:b,selectionService:t,themeService:M,trendLineModel:g,discrete:c,continuousDataModel:m,reducedDataModel:f.model(),customTooltipModel:k,debouncer:CH,refLineModel:l,pluginService:y},e);return yZ(S.getLayout(),T,a)}(w);v.extractDataPages(),i.update({settings:l,data:S}),u.set("isPreRender",!1),v.insertDataPages();var c=[];return 1!==l.components.length&&t.meta.isDiscrete&&c.push(e.command.initialize()),Promise.all(c)}var N=y(e.usePromise((function(){var e;if(!(r&&i&&o&&a&&s&&u))return Promise.resolve();var t=o.layoutService,n=o.selectionService,l=o.refLineModel,c=o.discrete,f=o.continuous,h=o.reducedDataModel,m=o.continuousDataModel,v=o.trendLineModel,g=o.legendLayoutService;if(null==n||null===(e=n.custom)||void 0===e||!e.getActions())return Promise.resolve();var y=function(){T(Date.now())};s.onChanged("scrollOffset",(function(){g&&g.setDataPages([c.query.getCurrentDataPage()]),l&&l.update(),y()})),s.onChanged("legendScrollOffset",y),s.intercept("zoom",f.event.onZoomIntercept({viewCache:u})),s.onChanged("zoom",f.event.onZoomChange({layoutService:t,continuousDataModel:m},y)),n.setLayout(t.getLayout());var b=[];return t.meta.isContinuous&&(m.update(t.getLayout()),b.push(m.initialFetch())),v.command.update(),function(e){var t=e.layoutService,n=e.viewState,r=e.viewStateOptions,i=void 0===r?{}:r,o=t.meta.isSnapshot?t.getLayoutValue("snapshotData.content.chartData",{}):i;n.preventSet("scrollOffset",o.scrollOffset),n.preventSet("legendScrollOffset",o.legendScrollOffset||0),o.zoom&&n.preventSet("zoom",o.zoom)}({layoutService:t,viewState:s,viewStateOptions:p.viewStateOptions}),b.push(h.fetch().then((function(e){var t=e.reducedCube;h.update(t)}))),b.push(function(e){var t=e.layout,n=e.model;return Yg.snapshot(t)?Promise.resolve(null):n.getEffectiveProperties().then((function(e){return{properties:e}}))}({layout:t.getLayout(),model:d,env:a})),Promise.all(b)}),[o]),1)[0],_=y(e.usePromise((function(){if(null==N||!N.length)return Promise.resolve();var e=o.layoutService,t=o.reducedDataModel,n=o.continuousDataModel,r=o.trendLineModel,i=o.colorService;return Promise.all([o.pluginService.initialize(),i.initialize(),wJ({reducedDataModel:t,layoutService:e,continuousDataModel:n,trendLineModel:r})]).then((function(e){return e.pop()}))}),[N]),1)[0];e.useEffect((function(){var e;if(null!=o&&null!==(e=o.colorService)&&void 0!==e&&e.getMain()&&_){var t=o.layoutService,r=o.selectionService,i=o.reducedDataModel,s=o.continuousDataModel,l=o.trendLineModel,c=o.legendLayoutService,f=o.colorService,d=o.viewModel;u.set("minorMinMax",_);var h=t.getHyperCube(),p=t.meta.isContinuous?s.getInitialCube():i.model().cube,m=f.getMain().getSettings().field,v=!t.meta.isContinuous&&(i.model().mode.isReduced||t.meta.isStacked)&&c,y=v?c.getHyperCube():void 0;r.setBrushAliases({colorField:m,useLegendCube:v,legendAlias:"legendCube/".concat(m)});var x=function(e){var t=e.mainCube,n=e.miniCube,r=e.legendCube,i=e.localeInfo,o=e.layoutService,a=e.viewModel,s=e.trendLineModel,u=o.refs.dataPages.split(".").pop(),l=[],c=[],f=o.meta.isContinuous?[{key:a.fields.majorNumeric,from:o.meta.isStackedByDimension?a.fields.majorStack:a.fields.major,override:{value:function(e){return e.qNum}}}]:void 0;return{prepPicassoDataSet:function(){return{key:"qHyperCube",data:t,config:{localeInfo:i,virtualFields:f}}},prepPicassoData:function(e){var o=[{type:"q",key:"qHyperCube",data:t,config:{localeInfo:i,virtualFields:f}},{type:"q",key:"miniCube",data:n,config:{localeInfo:i,virtualFields:f}}].concat(b(e));return r&&o.push({type:"q",key:"legendCube",data:r,config:{localeInfo:i,virtualFields:f}}),s.query.hasTrendLines()&&o.push({key:"trend",data:s.query.getData()}),o},extractDataPages:function(){l=t[u],c=n.qDataPages,t[u]=[],n.qDataPages=[]},insertDataPages:function(){t[u]=l,n.qDataPages=c}}}({mainCube:h,miniCube:p,legendCube:y,localeInfo:a.localeInfo,layoutService:t,viewModel:d,trendLineModel:l}),w=N[N.length-1];M(n({localeInfo:a.localeInfo},w)),g(x)}}),[_]),e.useEffect((function(){if(o&&w&&v){var e=o.colorService.getMain();if(e){v.prepPicassoDataSet();var t=v.prepPicassoData(e.getData());C(t)}}}),[w]),e.useEffect((function(){var e;null!=o&&null!==(e=o.colorService)&&void 0!==e&&e.getMain()&&i.update&&v&&S&&O().then((function(){var e=o.layoutService,t=o.discrete,n=o.legendLayoutService;n&&(1===e.getLayoutValue("scrollStartPos")&&n.setDataPages([t.query.getCurrentDataPage()]));i.update()}))}),[S]),e.useEffect((function(){if(c&&f&&v&&null!=i&&i.update&&null!=o&&o.colorService.getMain()){var e=o.dockService,t=o.themeService;e.update({width:c,height:f}),t.setTheme(a.theme),O().then((function(){i.update&&i.update()}))}}),[c,f]),e.useEffect((function(){null!=i&&i.update&&i.update({partialData:!0,excludeFromUpdate:["mini-marker","dim-title","measure-title","ref-line","grid-line"]})}),[E])}var xZ={exports:{}};!function(e,t){!function(t,n){e.exports=n()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s="./index.js")}({"../node_modules/extend/index.js":
|
|
19
|
+
/*!***************************************!*\
|
|
20
|
+
!*** ../node_modules/extend/index.js ***!
|
|
21
|
+
\***************************************/
|
|
22
|
+
/*! no static exports found */
|
|
23
|
+
function(e,t,n){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=i.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&i.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||i.call(e,t)},c=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},f=function(e,t){if("__proto__"===t){if(!i.call(e,t))return;if(s)return s(e,t).value}return e[t]};e.exports=function e(){var t,n,i,o,a,s,d=arguments[0],h=1,p=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},h=2),(null==d||"object"!==r(d)&&"function"!=typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)i=f(d,n),d!==(o=f(t,n))&&(m&&o&&(l(o)||(a=u(o)))?(a?(a=!1,s=i&&u(i)?i:[]):s=i&&l(i)?i:{},c(d,{name:n,newValue:e(m,s,o)})):void 0!==o&&c(d,{name:n,newValue:o}));return d}},"../node_modules/qlik-modifiers/dist/qlik-modifiers.js":
|
|
24
|
+
/*!*************************************************************!*\
|
|
25
|
+
!*** ../node_modules/qlik-modifiers/dist/qlik-modifiers.js ***!
|
|
26
|
+
\*************************************************************/
|
|
27
|
+
/*! no static exports found */
|
|
28
|
+
function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=i.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&i.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||i.call(e,t)},c=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},f=function(e,t){if("__proto__"===t){if(!i.call(e,t))return;if(s)return s(e,t).value}return e[t]};e.exports=function e(){var t,n,i,o,a,s,d=arguments[0],h=1,p=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},h=2),(null==d||"object"!=r(d)&&"function"!=typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)i=f(d,n),d!==(o=f(t,n))&&(m&&o&&(l(o)||(a=u(o)))?(a?(a=!1,s=i&&u(i)?i:[]):s=i&&l(i)?i:{},c(d,{name:n,newValue:e(m,s,o)})):void 0!==o&&c(d,{name:n,newValue:o}));return d}},function(e,t,n){n.r(t);var i=n(0),o=n.n(i),a={setValue:function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},getValue:function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o}},s="".concat(" ","(").concat(" "),u="".concat(" ",")").concat(" ");function l(e){return s+e+u}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var u=a.qFieldDefs[s];if(u.qName===i)return u}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function f(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function h(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function p(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function v(e){return void 0===e?")":", 0, ".concat(e,")")}function g(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function y(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,u=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var l=g(c(r[0],i),p(0));return"".concat(a,"({1<").concat(l,">}").concat(u,")")}if(r&&2===r.length){var f=c(r[0],i),d=c(r[1],i),h=p(0),m=p(1),v=g(f,h),y=g(d,m);return"".concat(a,"({1<").concat(v,",").concat(y,">}").concat(u,")")}return"".concat(a,"({1}").concat(u,")")}function b(e){return"".concat(e,"(")}function x(){return")"}function w(e){var t=e.properties,n=e.layout;return a.getValue(t,"qHyperCubeDef.qDimensions",a.getValue(n,"qHyperCube.qDimensionInfo",[])).length}var M={isFullRange:f,getNumDimensions:w,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=l(h(t));if(!n.showExcludedValues)return a;var s=y({modifier:n,dimensions:r,dimensionAndFieldList:i}),u=o?"":", 0";if(r&&1===r.length){var c=p(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(u,")")}if(r&&2===r.length){var f=p(0),d=p(1);return"If(Count(".concat(f,") * Count(").concat(d,") > 0, ").concat(a," + ").concat(s).concat(u,")")}return a},getRowNoComp:d,getNumStepComp:function(e,t){if(!f(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return d(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:v,getAboveComp:function(e,t,n,r){return m(e,t)+n+v(r)},getFunctionPrefix:b,getFunctionSuffix:x,getRangeComp:function(e,t){return b(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===w({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=p(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:h,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(u);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=w({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:l,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(u);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:p,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function k(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function S(e){return(S="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}var C=o.a.bind(null,!0),q={},E=Array.isArray;function T(e){return null!=e&&!Array.isArray(e)&&"object"===S(e)}function D(e){return void 0===e}function O(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function N(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=D(e[n||t])?o:e[t],e=e[n||t]}})),e}function _(e,t){var n=!0;if(T(e)&&T(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){_(e[r],t[r])||(n=!1)})),n);if(E(e)&&E(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!_(e[r],t[r]))return!1;return!0}return e===t}q.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?C({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);_(o,a)||O(t,i)||(D(a)?r.push({op:"add",path:s,value:o}):T(o)&&T(a)?r=r.concat(q.generate(a,o,s)):E(o)&&E(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&D(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(_(t,i))return r;if(!D(t[0])&&D(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(q.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var u=0,l=t.length;u<l;u+=1)-1===(o=a(i,t[u].qInfo&&t[u].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(u),value:t[u]}),i.splice(u,0,t[u])):o!==u&&(r.push({op:"move",path:"".concat(n,"/").concat(u),from:"".concat(n,"/").concat(o)}),i.splice(u,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){D(t[i])&&!O(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},q.apply=function(e,t){t.forEach((function(t){var n,r=N(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(E(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(E(o)&&E(t.value)){var s,u=t.value.slice();o.length=0,(s=o).push.apply(s,k(u))}else if(T(o)&&T(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!O(n,e)&&delete n[e]})),C(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[i]=t.value}else if("move"===t.op){var l=N(e,t.from);E(r)?r.splice(+i,0,l.splice(+a,1)[0]):(r[i]=l[a],delete l[a])}else"remove"===t.op&&(E(r)?r.splice(+i,1):delete r[i])}))},q.clone=function(e){return C({},e)},q.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},q.updateObject=function(e,t){Object.keys(e).length?q.apply(e,q.generate(e,t)):C(e,t)};var A=q,I={saveSoftProperties:function(e,t,n){if(!e)return Promise.resolve();var r=A.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0)):Promise.resolve()}},P="accumulation";function L(e,t){var n=a.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===P)return n[r]}function R(e,t){var n=function(e,t){var n=a.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===P)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},z={translationKey:"properties.modifier.accumulation",needDimension:M.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return M.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var u=o;void 0===u&&(u=M.getNumDimensions({properties:r,layout:i}));var l=a.getValue(r,"qHyperCubeDef.qDimensions",[]),c=M.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:s}),f=M.getNumStepComp(n,u),d=M.getAboveComp(n,u,c,f),h=M.getRangeComp("RangeSum",d);if(M.needDimension({modifier:n,properties:r,layout:i})){var p=M.getDimComp(l,1),m=M.getDimComp(l,0),v=M.getAggrComp(h,p,m);h=n.showExcludedValues?M.getExcludedComp({modifier:n,dimensions:l,dimensionAndFieldList:s,valueComp:v}):v}return h},extractInputExpression:M.extractInputExpression,initModifier:function(e){M.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!M.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(R(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(R(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(R(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(R(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=L(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=L(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(R(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(P))return!1;var o=L(t,e);return o&&!o.disabled}}}},F="movingAverage";function B(e,t){var n=a.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===F)return n[r]}function V(e,t){var n=function(e,t){var n=a.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===F)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},U={translationKey:"properties.modifier.movingAverage",needDimension:M.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return M.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,o=e.layout,s=e.numDimensions,u=e.dimensionAndFieldList;if(!r)return n;var l=s;void 0===l&&(l=M.getNumDimensions({properties:i,layout:o}));var c=a.getValue(i,"qHyperCubeDef.qDimensions",[]),f=r.showExcludedValues&&r.nullSuppression,d=M.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:u,treatMissingAsNull:f}),h=M.getNumStepComp(r,l),p=M.getAboveComp(r,l,d,h);if(r.nullSuppression)t=M.getRangeComp("RangeAvg",p);else{var m=M.getRangeComp("RangeSum",p),v=function(e,t){var n=M.getRowNoComp(e,t);if(!M.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,l);t="".concat(m," / ").concat(v)}var g=t;if(M.needDimension({modifier:r,properties:i,layout:o})){var y=M.getDimComp(c,1),b=M.getDimComp(c,0),x=M.getAggrComp(g,y,b);g=r.showExcludedValues?M.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:u,funcComp:"Only",valueComp:x}):x}return g},extractInputExpression:M.extractInputExpression,initModifier:function(e){M.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!M.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(V(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(V(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(V(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=B(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=B(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(V(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(F))return!1;var o=B(t,e);return o&&!o.disabled}}}},W="difference";function Y(e,t){var n=a.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===W)return n[r]}function K(e,t){var n=function(e,t){var n=a.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===W)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var $={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},G={translationKey:"properties.modifier.difference",needDimension:M.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return M.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:M.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var u=o;void 0===u&&(u=M.getNumDimensions({properties:r,layout:i}));var l=a.getValue(r,"qHyperCubeDef.qDimensions",[]),c=M.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:s}),f=M.getAboveComp(n,u,c),d="".concat(c," - ").concat(f);if(M.needDimension({modifier:n,properties:r,layout:i})){var h=M.getDimComp(l,1),p=M.getDimComp(l,0),m=M.getAggrComp(d,h,p);d=n.showExcludedValues?M.getExcludedComp({modifier:n,dimensions:l,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return d},initModifier:function(e){Object.keys($).forEach((function(t){void 0===e[t]&&(e[t]=$[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!M.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(K(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(K(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(K(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=Y(t,e);return o&&!o.disabled}}}},X={SELECTION:{CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},DIMENSION:{ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2}},J="normalization";function Q(e,t){var n=a.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===J)return n[r]}function Z(e,t){var n=function(e,t){var n=a.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===J)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ee(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function te(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:X.DIMENSION.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:X.DIMENSION.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:X.DIMENSION.DISREGARD_ALL_DIMENSIONS,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t,n){if(e<2){var r=ee(t,0);t.splice(r,1)}return t}(i,o),function(e,t,n){if(0===e){var r=ee(t,1);t.splice(r,1)}return t}(Q(e,r).selectionScope,o)}function ne(e,t,n){var r=[{value:X.SELECTION.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:X.SELECTION.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:X.SELECTION.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=ee(t,0);t.splice(r,1)}return t}(Q(e,n).dimensionalScope,r)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:X.DIMENSION.DISREGARD_ALL_DIMENSIONS,selectionScope:X.SELECTION.DISREGARD_SELECTION};function ie(e){return 2===e?"{1}":""}function oe(e,t,n){return 1===e?"{$<".concat(M.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ae(e,t){return 0===e&&t>1||2===e?"Total":""}function se(e,t,n){return 0===e&&t>1?"<".concat(M.getDimDefWithWrapper(n),">"):""}function ue(e,t,n,r,i,o,a){var s=ie(t),u=oe(t,n,r),l=""===s&&""===u?"":s||u,c=ae(i,o),f=se(i,o,a),d=function(e){for(var t=[],n=0;n<e;n++)t[n]=M.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(l," ").concat(c).concat(f," Aggr(").concat(l," ").concat(e,", ").concat(d,"))")}var le={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return M.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:M.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var u=o;void 0===u&&(u=M.getNumDimensions({properties:r,layout:i}));var l=a.getValue(r,"qHyperCubeDef.qDimensions",[]),c=M.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:s}),f=n.selectionScope,d=n.dimensionalScope;return ue(c,f,n.field,n.value,d,u,n.primaryDimension)},initModifier:function(e){Object.keys(re).forEach((function(t){void 0===e[t]&&(e[t]=re[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!M.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(Z(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:X.SELECTION.DISREGARD_SELECTION,options:function(n){return ne(n,t,e)}},field:{refFn:function(t){return"".concat(Z(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return Q(t,e).selectionScope===X.SELECTION.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(Z(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Q(t,e).selectionScope===X.SELECTION.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(Z(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:X.DIMENSION.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return te(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,n){return(Q(t,e).dimensionalScope||0)===X.DIMENSION.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(J))return!1;var o=Q(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ie,getFieldSelectionComp:oe,getTotalComp:ae,getSelectedDimComp:se};function ce(e){var t=e.model,n=e.callback,r={},i={},o={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function u(e){var t={},n=a.getValue(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=a.getValue(e,n)})),JSON.stringify(t)}function l(e){var t=e.qInfo.qId;if(r[t]){var i=u(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(l),enabled:!1,properties:u(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.measureLibraryIds,n=e.dimensionLibraryIds;i={},t.forEach((function(e){i[e]=!0})),o={},n.forEach((function(e){o[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:a}),Object.keys(r).forEach((function(e){i[e]||o[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(c(e,"getMeasure"))})),Object.keys(o).forEach((function(e){o[e]&&!r[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}var fe={getExpression:function(e){return a.getValue(e,"qDef.base.qDef")||a.getValue(e,"qDef.qDef")},getExpressionRef:function(e){return a.getValue(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a.getValue(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a.getValue(e,"qDef.base.qLibraryId")||a.getValue(e,"qLibraryId")},getLabelRef:function(e){return a.getValue(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a.getValue(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},de={initBase:function(e,t){(t||de.isValid(e))&&(a.setValue(e,"qDef.base.qDef",a.getValue(e,"qDef.qDef")),a.setValue(e,"qDef.base.qLibraryId",a.getValue(e,"qLibraryId")),a.setValue(e,"qDef.base.qLabel",a.getValue(e,"qDef.qLabel")),a.setValue(e,"qDef.base.qLabelExpression",a.getValue(e,"qDef.qLabelExpression")))},restoreBase:function(e){de.isValid(e)&&(a.setValue(e,"qDef.qDef",a.getValue(e,"qDef.base.qDef")),a.setValue(e,"qLibraryId",a.getValue(e,"qDef.base.qLibraryId")),a.setValue(e,"qDef.qLabel",a.getValue(e,"qDef.base.qLabel")),a.setValue(e,"qDef.qLabelExpression",a.getValue(e,"qDef.base.qLabelExpression")),a.getValue(e,"qDef.qAggrFunc")&&a.getValue(e,"qDef.base.qAggrFunc")&&a.setValue(e,"qDef.qAggrFunc",a.getValue(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a.getValue(e,"qDef.base.qDef"),n=a.getValue(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},he=de;function pe(e){return(pe="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}var me={accumulation:z,movingAverage:U,difference:G,normalization:le},ve=(t.default={modifiers:me,apply:ge,applyModifiers:ye,cleanUpMeasure:be,destroy:function(e){e&&ve[e.id]&&ve[e.id].masterItemSubscriber&&(ve[e.id].masterItemSubscriber&&ve[e.id].masterItemSubscriber.unsubscribe(),delete ve[e.id])},hasActiveModifiers:xe,getActiveModifier:we,initBase:he.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return me[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return me[e]&&me[e].isApplicable({properties:n,layout:r})}))},measureBase:fe,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=Se(e);Ne({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Le({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:Me},{});function ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,s=e.masterItem;ve[t.id]=ve[t.id]||{isFirstTime:!0};var u=ve[t.id].isFirstTime;if(ve[t.id].isFirstTime=!1,n&&"object"===pe(n))return ye({model:t,properties:n});var l=t?t.layout:void 0,c=a.getValue(l,"qSelectionInfo.qInSelections");if(i||c)return Promise.resolve(!1);var f=a.getValue(l,"qHyperCube.qMeasureInfo"),d=ve[t.id].lastReloadTime;if(ve[t.id].lastReloadTime=a.getValue(t,"app.layout.qLastReloadTime"),xe({measures:f,layout:l})){var h=function(e){var t=e.measures,n=e.layout,r=e.model,i=e.lastReloadTime;return a.getValue(r,"app.layout.qLastReloadTime")!==i&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Oe({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:f,layout:l,model:t,lastReloadTime:d});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Ne({modifiers:Se(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:f,layout:l,masterItem:s,isFirstTime:u})?t.getEffectiveProperties().then((function(e){var n=o()(!0,{},e);qe(n);var r=Re(n);return _e({model:t}).then((function(i){return Ae({libraryIds:r,model:t}).then((function(r){return h&&function(e){var t=e.properties;ke(t).forEach((function(e){return function(e){var t=e.measure,n=e.properties;if(Oe({measure:t,properties:n})){var r=0,i=t.qDef.modifiers;Array.isArray(i)&&i.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(r++,"object"!==pe(me[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=me[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Te(t)&&M.simplifyExpression(t.qDef.base.qDef)!==M.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),ye({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:r,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===pe(e.base)}))}(f)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Re(n);return je({model:t,libraryIds:r}).then((function(){var e=o()(!0,{},n);return ke(n).forEach((function(e){return be(e)})),Pe({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function ye(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,s=e.runUpdateIfChange,u=void 0!==s&&s,l=e.masterItem,c=e.libraryItemsProps,f=e.dimensionAndFieldList;void 0===n&&(n=u?o()(!0,{},r):r),qe(r);var d=Re(r);return je({model:t,libraryIds:d,masterItem:l}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=ke(n)),!t.length)return Promise.resolve();if(!xe({measures:t,properties:n}))return t.forEach((function(e){return be(e)})),Promise.resolve();var u=i?void 0:Re(n);return _e({model:r,dimensionAndFieldList:s}).then((function(e){return Ae({libraryIds:u,model:r,libraryItemsProps:i}).then((function(r){t.forEach((function(t){Ne({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,s=0;he.isValid(t)||he.initBase(t,!0);var u=t.qDef,l=u.modifiers,c=u.base;Array.isArray(l)&&l.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(s++,"object"!==pe(me[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");me[e.type].initModifier(e);var u=t.qLibraryId||c&&c.qLibraryId;u?function(e){var t=e.measure,n=e.modifier,r=e.libraryId,i=e.properties,a=e.libraryItemsProps,s=e.dimensionAndFieldList,u=a[r],l=u.qMeasure.qDef,c=me[n.type].generateExpression({expression:l,modifier:n,properties:i,dimensionAndFieldList:s});n.outputExpression=c,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||u.qMeasure.qLabel)&&(t.qDef.qLabel=u.qMeasure.qLabel),(t.qDef.qLabelExpression||u.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=u.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&u.qMeasure.qNumFormat&&(t.qDef.qNumFormat=u.qMeasure.qNumFormat,t.qDef.isCustomFormatted=u.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=u.qMeasure.coloring,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:u,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof me[n.type].updateModifier&&me[n.type].updateModifier(n,r.qHyperCubeDef);var a=fe.getExpression(t),s=me[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=a.getValue(e,"qDef.qAggrFunc");"Expr"!==t||Me(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Me(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),Ee(t)):be(t)}))}))}))}({measures:i,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:f}).then((function(){return u?Pe({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function be(e){!function(e){var t=Se(e);return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&!me[e.type]}))}(e)?he.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ee(e)}function xe(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ne({modifiers:Se(e),properties:n,layout:r})}))}function we(e){var t=Se(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(me[r.type]&&!r.disabled)return r}}function Me(e){var t=we(e);return!t||me[t.type].enableTotalsFunction(e)}function ke(e){return a.getValue(e,"qHyperCubeDef.qMeasures",[]).concat(a.getValue(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Se(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Ce(e){return a.getValue(e,"outputExpression.qValueExpression.qExpr")||a.getValue(e,"outputExpression")}function qe(e){ke(e).forEach((function(e){return function(e){var t=we(e);t&&(void 0!==t.outputExpression&&Ce(t)!==e.qDef.qDef?delete e.qDef.base:!he.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)}))}function Ee(e){var t=Se(e);Array.isArray(t)&&t.forEach((function(t){"object"===pe(t)&&(t.disabled||!me[t.type]&&Ce(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Te(e){return e.base||e.qDef&&e.qDef.base}function De(e){var t=Te(e);return e.qLibraryId||t&&t.qLibraryId}function Oe(e){var t=e.measure,n=e.properties,r=e.layout;return!De(t)&&Ne({modifiers:Se(t),properties:n,layout:r})}function Ne(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==pe(e)||e.disabled||!me[e.type])&&(void 0===i[e.type]&&(i[e.type]=me[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function _e(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));r.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return i}))}function Ae(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Ie(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Pe(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(a.getValue(t,"qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(a.getValue(n,"qHyperCubeDef.qMeasures"),Ie)||JSON.stringify(a.getValue(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(a.getValue(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&a.getValue(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):I.saveSoftProperties(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Le(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&me[e.type]&&me[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Re(e){var t=ke(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=Se(t);if(Ne({modifiers:r,properties:e})){var o=De(t);o&&n.push(o),i=i||Le({modifiers:r,properties:e})}})),a.getValue(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function je(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(ve[t.id].masterItemSubscriber=ve[t.id].masterItemSubscriber||ce({model:t,callback:function(e){return ge({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),ve[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},"./axis-chart/export-properties/index.js":
|
|
29
|
+
/*!***********************************************!*\
|
|
30
|
+
!*** ./axis-chart/export-properties/index.js ***!
|
|
31
|
+
\***********************************************/
|
|
32
|
+
/*! exports provided: default */
|
|
33
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
34
|
+
/*! ../../quarantine/quarantine-property */
|
|
35
|
+
"./quarantine/quarantine-property.js"),i=n(
|
|
36
|
+
/*! ../../color-chart */
|
|
37
|
+
"./color-chart/index.js");function o(e){var t=e.propertyTree,n=e.hypercubePath,o=e.viewDataMode,a=e.supportedAutoMinMax,s=void 0===a||a,u=i.default.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:o}),l=u.properties;return s?(Object(r.default)(l,"measureAxis.min","supportedAutoMinMax"),Object(r.default)(l,"measureAxis.max","supportedAutoMinMax")):(Object(r.default)(l,"measureAxis.min","unsupportedAutoMinMax"),Object(r.default)(l,"measureAxis.max","unsupportedAutoMinMax")),u}},"./axis-chart/import-properties/helpers/get-measures-per-axis.js":
|
|
38
|
+
/*!***********************************************************************!*\
|
|
39
|
+
!*** ./axis-chart/import-properties/helpers/get-measures-per-axis.js ***!
|
|
40
|
+
\***********************************************************************/
|
|
41
|
+
/*! exports provided: default */
|
|
42
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=["bar","marker","line"];function i(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,i=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),r.includes(i)&&t[o].type[i]++,t[o].type.total++}})),t}},"./axis-chart/import-properties/helpers/handle-auto-min-max.js":
|
|
43
|
+
/*!*********************************************************************!*\
|
|
44
|
+
!*** ./axis-chart/import-properties/helpers/handle-auto-min-max.js ***!
|
|
45
|
+
\*********************************************************************/
|
|
46
|
+
/*! exports provided: default */
|
|
47
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
|
|
48
|
+
/*! extend */
|
|
49
|
+
"../node_modules/extend/index.js"),i=n.n(r),o=n(
|
|
50
|
+
/*! ../../../quarantine/unquarantine-property */
|
|
51
|
+
"./quarantine/unquarantine-property.js");function a(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?Object(o.default)(n,"unsupportedAutoMinMax")||i()(n.measureAxis,t.measureAxis):Object(o.default)(n,"supportedAutoMinMax")||i()(n.measureAxis,t.measureAxis)}},"./axis-chart/import-properties/helpers/handle-measures-axis.js":
|
|
52
|
+
/*!**********************************************************************!*\
|
|
53
|
+
!*** ./axis-chart/import-properties/helpers/handle-measures-axis.js ***!
|
|
54
|
+
\**********************************************************************/
|
|
55
|
+
/*! exports provided: default */
|
|
56
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
|
|
57
|
+
/*! extend */
|
|
58
|
+
"../node_modules/extend/index.js"),i=n.n(r),o=n(
|
|
59
|
+
/*! ./should-update-measure-axis */
|
|
60
|
+
"./axis-chart/import-properties/helpers/should-update-measure-axis.js"),a=n(
|
|
61
|
+
/*! ./get-measures-per-axis */
|
|
62
|
+
"./axis-chart/import-properties/helpers/get-measures-per-axis.js");function s(e){var t,n=e.exportFormat,r=e.initialProperties,s=e.properties,u=e.measureType,l=s.qHyperCubeDef,c=s.measureAxis;if(Object(o.default)({exportFormat:n,initialProperties:r})){var f=Object(a.default)(l);f.length?(u&&(t=f.filter((function(e){return e.type[u]>0})).sort((function(e,t){return t.type[u]-e.type[u]}))),t&&t.length||(t=f.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&i()(c,n.properties.measureAxes[t[0].axis])):i()(c,n.properties.measureAxes[0])}}},"./axis-chart/import-properties/helpers/index.js":
|
|
63
|
+
/*!*******************************************************!*\
|
|
64
|
+
!*** ./axis-chart/import-properties/helpers/index.js ***!
|
|
65
|
+
\*******************************************************/
|
|
66
|
+
/*! exports provided: default */
|
|
67
|
+
function(e,t,n){n.r(t);var r=n(
|
|
68
|
+
/*! ./handle-auto-min-max */
|
|
69
|
+
"./axis-chart/import-properties/helpers/handle-auto-min-max.js"),i=n(
|
|
70
|
+
/*! ./handle-measures-axis */
|
|
71
|
+
"./axis-chart/import-properties/helpers/handle-measures-axis.js"),o=n(
|
|
72
|
+
/*! ./set-inter-column-sort-order */
|
|
73
|
+
"./axis-chart/import-properties/helpers/set-inter-column-sort-order.js");t.default={handleAutoMinMax:r.default,handleMeasuresAxis:i.default,setInterColumnSortOrder:o.default}},"./axis-chart/import-properties/helpers/set-inter-column-sort-order.js":
|
|
74
|
+
/*!*****************************************************************************!*\
|
|
75
|
+
!*** ./axis-chart/import-properties/helpers/set-inter-column-sort-order.js ***!
|
|
76
|
+
\*****************************************************************************/
|
|
77
|
+
/*! exports provided: default */
|
|
78
|
+
function(e,t,n){function r(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}}n.r(t),n.d(t,"default",(function(){return r}))},"./axis-chart/import-properties/helpers/should-update-measure-axis.js":
|
|
79
|
+
/*!****************************************************************************!*\
|
|
80
|
+
!*** ./axis-chart/import-properties/helpers/should-update-measure-axis.js ***!
|
|
81
|
+
\****************************************************************************/
|
|
82
|
+
/*! exports provided: default */
|
|
83
|
+
function(e,t,n){function r(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}n.r(t),n.d(t,"default",(function(){return r}))},"./axis-chart/import-properties/index.js":
|
|
84
|
+
/*!***********************************************!*\
|
|
85
|
+
!*** ./axis-chart/import-properties/index.js ***!
|
|
86
|
+
\***********************************************/
|
|
87
|
+
/*! exports provided: default */
|
|
88
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
89
|
+
/*! ./helpers */
|
|
90
|
+
"./axis-chart/import-properties/helpers/index.js"),i=n(
|
|
91
|
+
/*! ../../color-chart */
|
|
92
|
+
"./color-chart/index.js");function o(e){var t=e.exportFormat,n=e.initialProperties,o=e.dataDefinition,a=e.defaultPropertyValues,s=e.hypercubePath,u=e.measureType,l=i.default.importProperties({exportFormat:t,initialProperties:n,dataDefinition:o,defaultPropertyValues:a,hypercubePath:s}),c=l.qProperty;return r.default.handleAutoMinMax({initialProperties:n,properties:c}),r.default.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:c,measureType:u}),r.default.setInterColumnSortOrder(c.qHyperCubeDef),l}},"./axis-chart/index.js":
|
|
93
|
+
/*!*****************************!*\
|
|
94
|
+
!*** ./axis-chart/index.js ***!
|
|
95
|
+
\*****************************/
|
|
96
|
+
/*! exports provided: default */
|
|
97
|
+
function(e,t,n){n.r(t);var r=n(
|
|
98
|
+
/*! ./export-properties */
|
|
99
|
+
"./axis-chart/export-properties/index.js"),i=n(
|
|
100
|
+
/*! ./import-properties */
|
|
101
|
+
"./axis-chart/import-properties/index.js");t.default={exportProperties:r.default,importProperties:i.default}},"./color-chart/export-properties/index.js":
|
|
102
|
+
/*!************************************************!*\
|
|
103
|
+
!*** ./color-chart/export-properties/index.js ***!
|
|
104
|
+
\************************************************/
|
|
105
|
+
/*! exports provided: default */
|
|
106
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
107
|
+
/*! ../../utils/attribute-expression-util */
|
|
108
|
+
"./utils/attribute-expression-util/index.js"),i=n(
|
|
109
|
+
/*! ../../hypercube */
|
|
110
|
+
"./hypercube/index.js");function o(e){var t=e.propertyTree,n=e.hypercubePath,o=e.viewDataMode,a=i.default.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:o}),s=a.data[0],u=s.dimensions.concat(s.excludedDimensions),l=s.measures.concat(s.excludedMeasures),c=r.default.IDMAP,f=c.COLOR_BY_ALTERNATIVE,d=c.COLOR_BY_EXPRESSION;return r.default.moveByIdFromGroup(u,[],"qAttributeDimensions",f),r.default.moveByIdFromGroup(u,[],"qAttributeExpressions",f),r.default.moveByIdFromGroup(l,[],"qAttributeExpressions",d),a}},"./color-chart/import-properties/helpers/add-color-by-expression.js":
|
|
111
|
+
/*!**************************************************************************!*\
|
|
112
|
+
!*** ./color-chart/import-properties/helpers/add-color-by-expression.js ***!
|
|
113
|
+
\**************************************************************************/
|
|
114
|
+
/*! exports provided: default */
|
|
115
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
116
|
+
/*! ../../../utils */
|
|
117
|
+
"./utils/index.js");function i(e){var t=r.default.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=r.default.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),r.default.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)}},"./color-chart/import-properties/helpers/change-property.js":
|
|
118
|
+
/*!******************************************************************!*\
|
|
119
|
+
!*** ./color-chart/import-properties/helpers/change-property.js ***!
|
|
120
|
+
\******************************************************************/
|
|
121
|
+
/*! exports provided: default */
|
|
122
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
123
|
+
/*! ../../../utils */
|
|
124
|
+
"./utils/index.js"),i=n(
|
|
125
|
+
/*! ./update-layout-exclude */
|
|
126
|
+
"./color-chart/import-properties/helpers/update-layout-exclude.js");function o(e,t,n){r.default.setValue(e,t,n),r.default.isAtomicValue(n)&&Object(i.default)(e,t,n)}},"./color-chart/import-properties/helpers/clear-attribute-by-type.js":
|
|
127
|
+
/*!**************************************************************************!*\
|
|
128
|
+
!*** ./color-chart/import-properties/helpers/clear-attribute-by-type.js ***!
|
|
129
|
+
\**************************************************************************/
|
|
130
|
+
/*! exports provided: default */
|
|
131
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
132
|
+
/*! ../../../utils/array-util */
|
|
133
|
+
"./utils/array-util.js");function i(e,t,n){if(Array.isArray(e[t])){var i=r.default.findIndexByPropertyValue(e[t],"id",n);i>=0&&e[t].splice(i,1)}else e[t]=[]}},"./color-chart/import-properties/helpers/clear-color-by-item.js":
|
|
134
|
+
/*!**********************************************************************!*\
|
|
135
|
+
!*** ./color-chart/import-properties/helpers/clear-color-by-item.js ***!
|
|
136
|
+
\**********************************************************************/
|
|
137
|
+
/*! exports provided: default */
|
|
138
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
139
|
+
/*! ../../../utils/attribute-expression-util */
|
|
140
|
+
"./utils/attribute-expression-util/index.js"),i=n(
|
|
141
|
+
/*! ./clear-attribute-by-type */
|
|
142
|
+
"./color-chart/import-properties/helpers/clear-attribute-by-type.js");function o(e,t){var n=r.default.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){Object(i.default)(e,"qAttributeDimensions",n),Object(i.default)(e,"qAttributeExpressions",n)})),t.forEach((function(e){Object(i.default)(e,"qAttributeDimensions",n),Object(i.default)(e,"qAttributeExpressions",n)}))}},"./color-chart/import-properties/helpers/delete-total-mode.js":
|
|
143
|
+
/*!********************************************************************!*\
|
|
144
|
+
!*** ./color-chart/import-properties/helpers/delete-total-mode.js ***!
|
|
145
|
+
\********************************************************************/
|
|
146
|
+
/*! exports provided: default */
|
|
147
|
+
function(e,t,n){function r(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/get-can-color-by.js":
|
|
148
|
+
/*!*******************************************************************!*\
|
|
149
|
+
!*** ./color-chart/import-properties/helpers/get-can-color-by.js ***!
|
|
150
|
+
\*******************************************************************/
|
|
151
|
+
/*! exports provided: default */
|
|
152
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
153
|
+
/*! ./get-color-options */
|
|
154
|
+
"./color-chart/import-properties/helpers/get-color-options.js");function i(e,t){var n={primary:!0};if(e){var i=Object(r.default)(t);n.byDimension=i.dimension(e),n.byMeasure=i.measure(e),n.byMultiple=i.multiColor(e),n.byExpression=i.expression(e)}return n}},"./color-chart/import-properties/helpers/get-color-by-definition.js":
|
|
155
|
+
/*!**************************************************************************!*\
|
|
156
|
+
!*** ./color-chart/import-properties/helpers/get-color-by-definition.js ***!
|
|
157
|
+
\**************************************************************************/
|
|
158
|
+
/*! exports provided: default */
|
|
159
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
|
|
160
|
+
/*! ./get-expression */
|
|
161
|
+
"./color-chart/import-properties/helpers/get-expression.js"),i=n(
|
|
162
|
+
/*! ./get-dimension-label */
|
|
163
|
+
"./color-chart/import-properties/helpers/get-dimension-label.js"),o=n(
|
|
164
|
+
/*! ./get-measure-label */
|
|
165
|
+
"./color-chart/import-properties/helpers/get-measure-label.js"),a=n(
|
|
166
|
+
/*! ./get-measure-library-id */
|
|
167
|
+
"./color-chart/import-properties/helpers/get-measure-library-id.js");function s(e,t,n,s){var u,l,c={};switch(e){case"dimension":n.qLibraryId?(c.type="dimension",c.name=n.qLibraryId,c.id=n.qLibraryId):(c.type="field",t?(c.name=n.label||n.qDef,c.id=n.qDef):(c.name=n.qDef.qFieldDefs[0],c.label=Object(i.default)(n)));break;case"measure":(u=Object(a.default)(n,t))?(c.type="measure",c.name=u,c.id=u,(l=Object(r.default)(n,s))&&(c.expression=l)):(c.type="expression",t?(c.name=n.label||n.qExpression,c.id=n.qExpression):(c.name=n.qDef.qDef,c.label=Object(o.default)(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return c}},"./color-chart/import-properties/helpers/get-color-options.js":
|
|
168
|
+
/*!********************************************************************!*\
|
|
169
|
+
!*** ./color-chart/import-properties/helpers/get-color-options.js ***!
|
|
170
|
+
\********************************************************************/
|
|
171
|
+
/*! exports provided: default */
|
|
172
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
|
|
173
|
+
/*! ./patches/default */
|
|
174
|
+
"./color-chart/import-properties/helpers/patches/default.js"),i=n(
|
|
175
|
+
/*! ./patches/scatter-plot */
|
|
176
|
+
"./color-chart/import-properties/helpers/patches/scatter-plot.js"),o=n(
|
|
177
|
+
/*! ./patches/pie-chart */
|
|
178
|
+
"./color-chart/import-properties/helpers/patches/pie-chart.js"),a=n(
|
|
179
|
+
/*! ./patches/line-chart */
|
|
180
|
+
"./color-chart/import-properties/helpers/patches/line-chart.js"),s=n(
|
|
181
|
+
/*! ./patches/map */
|
|
182
|
+
"./color-chart/import-properties/helpers/patches/map.js"),u=n(
|
|
183
|
+
/*! ./patches/distribution-plot */
|
|
184
|
+
"./color-chart/import-properties/helpers/patches/distribution-plot.js"),l={scatterplot:i.default,piechart:o.default,linechart:a.default,map:s.default,distributionplot:u.default};function c(e){return(l[e]||r.default).colorModeOptions||r.default.colorModeOptions}},"./color-chart/import-properties/helpers/get-dimension-label.js":
|
|
185
|
+
/*!**********************************************************************!*\
|
|
186
|
+
!*** ./color-chart/import-properties/helpers/get-dimension-label.js ***!
|
|
187
|
+
\**********************************************************************/
|
|
188
|
+
/*! exports provided: default */
|
|
189
|
+
function(e,t,n){function r(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qFieldLabels&&t.qFieldLabels[0]?t.qFieldLabels[0]:t.qFieldDefs[0]}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/get-expression.js":
|
|
190
|
+
/*!*****************************************************************!*\
|
|
191
|
+
!*** ./color-chart/import-properties/helpers/get-expression.js ***!
|
|
192
|
+
\*****************************************************************/
|
|
193
|
+
/*! exports provided: default */
|
|
194
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
195
|
+
/*! qlik-modifiers */
|
|
196
|
+
"../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=n.n(r);function o(e,t){return i.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}},"./color-chart/import-properties/helpers/get-measure-label.js":
|
|
197
|
+
/*!********************************************************************!*\
|
|
198
|
+
!*** ./color-chart/import-properties/helpers/get-measure-label.js ***!
|
|
199
|
+
\********************************************************************/
|
|
200
|
+
/*! exports provided: default */
|
|
201
|
+
function(e,t,n){function r(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/get-measure-library-id.js":
|
|
202
|
+
/*!*************************************************************************!*\
|
|
203
|
+
!*** ./color-chart/import-properties/helpers/get-measure-library-id.js ***!
|
|
204
|
+
\*************************************************************************/
|
|
205
|
+
/*! exports provided: default */
|
|
206
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
207
|
+
/*! qlik-modifiers */
|
|
208
|
+
"../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=n.n(r);function o(e,t){return t?e.qLibraryId:i.a.measureBase.getLibraryId(e)}},"./color-chart/import-properties/helpers/index.js":
|
|
209
|
+
/*!********************************************************!*\
|
|
210
|
+
!*** ./color-chart/import-properties/helpers/index.js ***!
|
|
211
|
+
\********************************************************/
|
|
212
|
+
/*! exports provided: default */
|
|
213
|
+
function(e,t,n){n.r(t);var r=n(
|
|
214
|
+
/*! ./change-property */
|
|
215
|
+
"./color-chart/import-properties/helpers/change-property.js"),i=n(
|
|
216
|
+
/*! ./get-can-color-by */
|
|
217
|
+
"./color-chart/import-properties/helpers/get-can-color-by.js"),o=n(
|
|
218
|
+
/*! ./should-update-color-by */
|
|
219
|
+
"./color-chart/import-properties/helpers/should-update-color-by.js"),a=n(
|
|
220
|
+
/*! ./update-color-by */
|
|
221
|
+
"./color-chart/import-properties/helpers/update-color-by.js"),s=n(
|
|
222
|
+
/*! ./delete-total-mode */
|
|
223
|
+
"./color-chart/import-properties/helpers/delete-total-mode.js"),u=n(
|
|
224
|
+
/*! ./should-add-color-by-expression */
|
|
225
|
+
"./color-chart/import-properties/helpers/should-add-color-by-expression.js"),l=n(
|
|
226
|
+
/*! ./add-color-by-expression */
|
|
227
|
+
"./color-chart/import-properties/helpers/add-color-by-expression.js"),c=n(
|
|
228
|
+
/*! ./switch-to-auto-color */
|
|
229
|
+
"./color-chart/import-properties/helpers/switch-to-auto-color.js"),f=n(
|
|
230
|
+
/*! ./should-switch-to-color-persistent */
|
|
231
|
+
"./color-chart/import-properties/helpers/should-switch-to-color-persistent.js");t.default={changeProperty:r.default,getCanColorBy:i.default,shouldUpdateColorBy:o.default,updateColorBy:a.default,deleteTotalMode:s.default,shouldAddColorByExpression:u.default,addColorByExpression:l.default,switchToAutoColor:c.default,shouldSwitchToColorPersistent:f.default}},"./color-chart/import-properties/helpers/is-map-point-layer.js":
|
|
232
|
+
/*!*********************************************************************!*\
|
|
233
|
+
!*** ./color-chart/import-properties/helpers/is-map-point-layer.js ***!
|
|
234
|
+
\*********************************************************************/
|
|
235
|
+
/*! exports provided: default */
|
|
236
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
237
|
+
/*! ../../../utils */
|
|
238
|
+
"./utils/index.js");function i(e,t,n){var i=r.default.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=r.default.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===i&&"point"===s}},"./color-chart/import-properties/helpers/patches/default.js":
|
|
239
|
+
/*!******************************************************************!*\
|
|
240
|
+
!*** ./color-chart/import-properties/helpers/patches/default.js ***!
|
|
241
|
+
\******************************************************************/
|
|
242
|
+
/*! exports provided: default */
|
|
243
|
+
function(e,t,n){n.r(t);var r=n(
|
|
244
|
+
/*! ../../../../utils/hypercube-util */
|
|
245
|
+
"./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return r.default.getNumDimensions(e)>0&&r.default.getNumMeasures(e)<=1},multiColor:function(e){return r.default.getNumMeasures(e)>1},measure:function(e){return r.default.getNumDimensions(e)>0},expression:function(e){return r.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/distribution-plot.js":
|
|
246
|
+
/*!****************************************************************************!*\
|
|
247
|
+
!*** ./color-chart/import-properties/helpers/patches/distribution-plot.js ***!
|
|
248
|
+
\****************************************************************************/
|
|
249
|
+
/*! exports provided: default */
|
|
250
|
+
function(e,t,n){n.r(t);var r=n(
|
|
251
|
+
/*! ../../../../utils/hypercube-util */
|
|
252
|
+
"./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return r.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/line-chart.js":
|
|
253
|
+
/*!*********************************************************************!*\
|
|
254
|
+
!*** ./color-chart/import-properties/helpers/patches/line-chart.js ***!
|
|
255
|
+
\*********************************************************************/
|
|
256
|
+
/*! exports provided: default */
|
|
257
|
+
function(e,t,n){n.r(t);var r=n(
|
|
258
|
+
/*! ../../../../utils/hypercube-util */
|
|
259
|
+
"./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return r.default.getNumDimensions(e)>1},multiColor:function(e){return r.default.getNumMeasures(e)>1},measure:function(e){return r.default.getNumDimensions(e)<=1},expression:function(e){return r.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/map.js":
|
|
260
|
+
/*!**************************************************************!*\
|
|
261
|
+
!*** ./color-chart/import-properties/helpers/patches/map.js ***!
|
|
262
|
+
\**************************************************************/
|
|
263
|
+
/*! exports provided: default */
|
|
264
|
+
function(e,t,n){n.r(t);var r=n(
|
|
265
|
+
/*! ../../../../utils/hypercube-util */
|
|
266
|
+
"./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return r.default.getNumDimensions(e)>=1},multiColor:function(e){return r.default.getNumMeasures(e)>1},measure:function(e){return r.default.getNumDimensions(e)>=1},expression:function(e){return r.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/pie-chart.js":
|
|
267
|
+
/*!********************************************************************!*\
|
|
268
|
+
!*** ./color-chart/import-properties/helpers/patches/pie-chart.js ***!
|
|
269
|
+
\********************************************************************/
|
|
270
|
+
/*! exports provided: default */
|
|
271
|
+
function(e,t,n){n.r(t);var r=n(
|
|
272
|
+
/*! ../../../../utils/hypercube-util */
|
|
273
|
+
"./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return r.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/scatter-plot.js":
|
|
274
|
+
/*!***********************************************************************!*\
|
|
275
|
+
!*** ./color-chart/import-properties/helpers/patches/scatter-plot.js ***!
|
|
276
|
+
\***********************************************************************/
|
|
277
|
+
/*! exports provided: default */
|
|
278
|
+
function(e,t,n){n.r(t);var r=n(
|
|
279
|
+
/*! ../../../../utils/hypercube-util */
|
|
280
|
+
"./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return r.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/resolve-color-by-property-def.js":
|
|
281
|
+
/*!********************************************************************************!*\
|
|
282
|
+
!*** ./color-chart/import-properties/helpers/resolve-color-by-property-def.js ***!
|
|
283
|
+
\********************************************************************************/
|
|
284
|
+
/*! exports provided: default */
|
|
285
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return u}));var r=n(
|
|
286
|
+
/*! ../../../utils */
|
|
287
|
+
"./utils/index.js"),i=n(
|
|
288
|
+
/*! ../../../utils/attribute-expression-util */
|
|
289
|
+
"./utils/attribute-expression-util/index.js"),o=n(
|
|
290
|
+
/*! ./clear-color-by-item */
|
|
291
|
+
"./color-chart/import-properties/helpers/clear-color-by-item.js"),a=n(
|
|
292
|
+
/*! ./set-attribute-by-expression */
|
|
293
|
+
"./color-chart/import-properties/helpers/set-attribute-by-expression.js"),s=n(
|
|
294
|
+
/*! ./set-attribute-by-library */
|
|
295
|
+
"./color-chart/import-properties/helpers/set-attribute-by-library.js");function u(e){var t=e.properties,n=e.isDimension,u=e.dimensions,l=e.excludedDimensions,c=e.measures,f=e.label;Object(o.default)(u,l);var d=u[u.length-1];if(d){var h=n?r.default.getValue(t,"color.byDimDef"):r.default.getValue(t,"color.byMeasureDef"),p=r.default.getValue(t,"color.formatting.qNumFormat"),m=r.default.getValue(t,"color.formatting.isCustomFormatted");if(h){var v=i.default.create(i.default.IDMAP.COLOR_BY_ALTERNATIVE);switch(h.type){case"expression":Object(a.default)({attributeExpression:v,label:f,item:h,isDimension:n,qNumFormat:p,isCustomFormatted:m});break;case"libraryItem":Object(s.default)({attributeExpression:v,measures:c,item:h,isDimension:n,qNumFormat:p,isCustomFormatted:m})}n?(v.qSortBy={qSortByAscii:1},d.qAttributeDimensions.push(v)):d.qAttributeExpressions.push(v)}}}},"./color-chart/import-properties/helpers/set-alt-label.js":
|
|
296
|
+
/*!****************************************************************!*\
|
|
297
|
+
!*** ./color-chart/import-properties/helpers/set-alt-label.js ***!
|
|
298
|
+
\****************************************************************/
|
|
299
|
+
/*! exports provided: default */
|
|
300
|
+
function(e,t,n){function r(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/set-attribute-by-expression.js":
|
|
301
|
+
/*!******************************************************************************!*\
|
|
302
|
+
!*** ./color-chart/import-properties/helpers/set-attribute-by-expression.js ***!
|
|
303
|
+
\******************************************************************************/
|
|
304
|
+
/*! exports provided: default */
|
|
305
|
+
function(e,t,n){function r(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/set-attribute-by-library.js":
|
|
306
|
+
/*!***************************************************************************!*\
|
|
307
|
+
!*** ./color-chart/import-properties/helpers/set-attribute-by-library.js ***!
|
|
308
|
+
\***************************************************************************/
|
|
309
|
+
/*! exports provided: default */
|
|
310
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
311
|
+
/*! ../../../utils/array-util */
|
|
312
|
+
"./utils/array-util.js");function i(e){var t=e.attributeExpression,n=e.measures,i=e.item,o=e.isDimension,a=e.qNumFormat,s=e.isCustomFormatted;o||(t.matchMeasure=r.default.findIndexByPropertyValue(n,"qLibraryId",i.key),a&&(t.qNumFormat=a,t.isCustomFormatted=s)),void 0!==i.expression?t.qExpression=i.expression:t.qLibraryId=i.key,t.colorMapRef=i.key}},"./color-chart/import-properties/helpers/set-color-by-dimension-1.js":
|
|
313
|
+
/*!***************************************************************************!*\
|
|
314
|
+
!*** ./color-chart/import-properties/helpers/set-color-by-dimension-1.js ***!
|
|
315
|
+
\***************************************************************************/
|
|
316
|
+
/*! exports provided: default */
|
|
317
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
|
|
318
|
+
/*! ../../../utils */
|
|
319
|
+
"./utils/index.js"),i=n(
|
|
320
|
+
/*! ./get-color-by-definition */
|
|
321
|
+
"./color-chart/import-properties/helpers/get-color-by-definition.js"),o=n(
|
|
322
|
+
/*! ./set-color-by-property-def */
|
|
323
|
+
"./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),a=r.default.getValue(e,"color.byDimDef");a.activeDimensionIndex=Math.min(a.activeDimensionIndex,n.length-1);var s=n[a.activeDimensionIndex],u=Object(i.default)("dimension",!1,s);u.activeDimensionIndex=a.activeDimensionIndex,Object(o.default)(e,u)}},"./color-chart/import-properties/helpers/set-color-by-dimension-2.js":
|
|
324
|
+
/*!***************************************************************************!*\
|
|
325
|
+
!*** ./color-chart/import-properties/helpers/set-color-by-dimension-2.js ***!
|
|
326
|
+
\***************************************************************************/
|
|
327
|
+
/*! exports provided: default */
|
|
328
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return l}));var r=n(
|
|
329
|
+
/*! ../../../utils */
|
|
330
|
+
"./utils/index.js"),i=n(
|
|
331
|
+
/*! ../../../utils/array-util */
|
|
332
|
+
"./utils/array-util.js"),o=n(
|
|
333
|
+
/*! ../../../utils/attribute-expression-util */
|
|
334
|
+
"./utils/attribute-expression-util/index.js"),a=n(
|
|
335
|
+
/*! ./get-color-by-definition */
|
|
336
|
+
"./color-chart/import-properties/helpers/get-color-by-definition.js"),s=n(
|
|
337
|
+
/*! ./set-color-by-property-def */
|
|
338
|
+
"./color-chart/import-properties/helpers/set-color-by-property-def.js"),u=n(
|
|
339
|
+
/*! ./is-map-point-layer */
|
|
340
|
+
"./color-chart/import-properties/helpers/is-map-point-layer.js");function l(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),l=n[Object(u.default)(n,e,t)?0:n.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,f=i.default.findItemByPropertyValue(l.qAttributeDimensions,"id",c);return Object(s.default)(e,Object(a.default)("dimension",!!f,f||l)),!!f}},"./color-chart/import-properties/helpers/set-color-by-measure-1.js":
|
|
341
|
+
/*!*************************************************************************!*\
|
|
342
|
+
!*** ./color-chart/import-properties/helpers/set-color-by-measure-1.js ***!
|
|
343
|
+
\*************************************************************************/
|
|
344
|
+
/*! exports provided: default */
|
|
345
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
|
|
346
|
+
/*! ../../../utils */
|
|
347
|
+
"./utils/index.js"),i=n(
|
|
348
|
+
/*! ./get-color-by-definition */
|
|
349
|
+
"./color-chart/import-properties/helpers/get-color-by-definition.js"),o=n(
|
|
350
|
+
/*! ./set-color-by-property-def */
|
|
351
|
+
"./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var n=r.default.getValue(e,"".concat(t,"qMeasures"),[]),a=r.default.getValue(e,"color.byMeasureDef");if(a.activeMeasureIndex=Math.min(a.activeMeasureIndex,n.length-1),a.activeMeasureIndex>-1){var s=n[a.activeMeasureIndex],u=Object(i.default)("measure",!1,s,!0);u.activeMeasureIndex=a.activeMeasureIndex,Object(o.default)(e,u)}}},"./color-chart/import-properties/helpers/set-color-by-measure-2.js":
|
|
352
|
+
/*!*************************************************************************!*\
|
|
353
|
+
!*** ./color-chart/import-properties/helpers/set-color-by-measure-2.js ***!
|
|
354
|
+
\*************************************************************************/
|
|
355
|
+
/*! exports provided: default */
|
|
356
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return u}));var r=n(
|
|
357
|
+
/*! ../../../utils */
|
|
358
|
+
"./utils/index.js"),i=n(
|
|
359
|
+
/*! ../../../utils/array-util */
|
|
360
|
+
"./utils/array-util.js"),o=n(
|
|
361
|
+
/*! ../../../utils/attribute-expression-util */
|
|
362
|
+
"./utils/attribute-expression-util/index.js"),a=n(
|
|
363
|
+
/*! ./get-color-by-definition */
|
|
364
|
+
"./color-chart/import-properties/helpers/get-color-by-definition.js"),s=n(
|
|
365
|
+
/*! ./set-color-by-property-def */
|
|
366
|
+
"./color-chart/import-properties/helpers/set-color-by-property-def.js");function u(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),u=r.default.getValue(e,"".concat(t,"qMeasures"),[]),l=n[n.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,f=i.default.findItemByPropertyValue(l.qAttributeExpressions,"id",c);return Object(s.default)(e,Object(a.default)("measure",!!f,f||u[0])),!!f}},"./color-chart/import-properties/helpers/set-color-by-property-def.js":
|
|
367
|
+
/*!****************************************************************************!*\
|
|
368
|
+
!*** ./color-chart/import-properties/helpers/set-color-by-property-def.js ***!
|
|
369
|
+
\****************************************************************************/
|
|
370
|
+
/*! exports provided: default */
|
|
371
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
|
|
372
|
+
/*! ../../../utils/hypercube-util */
|
|
373
|
+
"./utils/hypercube-util.js"),i=n(
|
|
374
|
+
/*! ../../../utils/number-format-util */
|
|
375
|
+
"./utils/number-format-util.js"),o=n(
|
|
376
|
+
/*! ./set-alt-label */
|
|
377
|
+
"./color-chart/import-properties/helpers/set-alt-label.js");function a(e,t,n,a){var s=n?"expression":t.type,u=e.color,l=u.mode,c=r.default.getItemLabel(t);switch(Object(o.default)(e,c||""),s){case"field":l="byDimension",u.byDimDef={label:t.label||r.default.wrapFieldName(t.name),key:r.default.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":l="byMeasure",u.byMeasureDef={label:n||c,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":l="byDimension",u.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":l="byMeasure",u.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},u.formatting&&i.default.useMasterNumberFormat(u.formatting)}a||(u.auto=!1,u.mode=l)}},"./color-chart/import-properties/helpers/should-add-color-by-expression.js":
|
|
378
|
+
/*!*********************************************************************************!*\
|
|
379
|
+
!*** ./color-chart/import-properties/helpers/should-add-color-by-expression.js ***!
|
|
380
|
+
\*********************************************************************************/
|
|
381
|
+
/*! exports provided: default */
|
|
382
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
383
|
+
/*! ../../../utils */
|
|
384
|
+
"./utils/index.js");function i(e){var t=e.shouldUpdateColorBy,n=e.properties,i=r.default.getValue(n,"qHyperCubeDef.qMeasures",[]),o=r.default.getValue(n,"color.mode","");return!t&&"byExpression"===o&&i.length>0}},"./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js":
|
|
385
|
+
/*!**********************************************************************************!*\
|
|
386
|
+
!*** ./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js ***!
|
|
387
|
+
\**********************************************************************************/
|
|
388
|
+
/*! exports provided: default */
|
|
389
|
+
function(e,t,n){function r(e){return!!(e&&e.activeDimensionIndex>-1)}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js":
|
|
390
|
+
/*!**********************************************************************************!*\
|
|
391
|
+
!*** ./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js ***!
|
|
392
|
+
\**********************************************************************************/
|
|
393
|
+
/*! exports provided: default */
|
|
394
|
+
function(e,t,n){function r(e){return!e||!e.key}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/should-set-color-by-measure-1.js":
|
|
395
|
+
/*!********************************************************************************!*\
|
|
396
|
+
!*** ./color-chart/import-properties/helpers/should-set-color-by-measure-1.js ***!
|
|
397
|
+
\********************************************************************************/
|
|
398
|
+
/*! exports provided: default */
|
|
399
|
+
function(e,t,n){function r(e){return!!(e&&e.activeMeasureIndex>-1)}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/should-set-color-by-measure-2.js":
|
|
400
|
+
/*!********************************************************************************!*\
|
|
401
|
+
!*** ./color-chart/import-properties/helpers/should-set-color-by-measure-2.js ***!
|
|
402
|
+
\********************************************************************************/
|
|
403
|
+
/*! exports provided: default */
|
|
404
|
+
function(e,t,n){function r(e,t){return(!e||!e.key)&&t.length>0}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/should-switch-to-color-persistent.js":
|
|
405
|
+
/*!************************************************************************************!*\
|
|
406
|
+
!*** ./color-chart/import-properties/helpers/should-switch-to-color-persistent.js ***!
|
|
407
|
+
\************************************************************************************/
|
|
408
|
+
/*! exports provided: default */
|
|
409
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
410
|
+
/*! ../../../utils */
|
|
411
|
+
"./utils/index.js");function i(e){var t=r.default.getValue(e,"qHyperCubeDef.qDimensions",[]),n=r.default.getValue(e,"color.persistent",!1);return t.length>1&&!n}},"./color-chart/import-properties/helpers/should-update-color-by-dimension.js":
|
|
412
|
+
/*!***********************************************************************************!*\
|
|
413
|
+
!*** ./color-chart/import-properties/helpers/should-update-color-by-dimension.js ***!
|
|
414
|
+
\***********************************************************************************/
|
|
415
|
+
/*! exports provided: default */
|
|
416
|
+
function(e,t,n){function r(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/should-update-color-by-measure.js":
|
|
417
|
+
/*!*********************************************************************************!*\
|
|
418
|
+
!*** ./color-chart/import-properties/helpers/should-update-color-by-measure.js ***!
|
|
419
|
+
\*********************************************************************************/
|
|
420
|
+
/*! exports provided: default */
|
|
421
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
422
|
+
/*! ../../../utils */
|
|
423
|
+
"./utils/index.js");function i(e){var t=e.auto,n=e.colorMode,i=e.dimensions,o=e.measures,a=e.properties,s=r.default.getValue(a,"visualization");return!(t||"byMeasure"!==n||!i.length||"map"!==s&&!o.length)}},"./color-chart/import-properties/helpers/should-update-color-by.js":
|
|
424
|
+
/*!*************************************************************************!*\
|
|
425
|
+
!*** ./color-chart/import-properties/helpers/should-update-color-by.js ***!
|
|
426
|
+
\*************************************************************************/
|
|
427
|
+
/*! exports provided: default */
|
|
428
|
+
function(e,t,n){function r(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/switch-to-auto-color.js":
|
|
429
|
+
/*!***********************************************************************!*\
|
|
430
|
+
!*** ./color-chart/import-properties/helpers/switch-to-auto-color.js ***!
|
|
431
|
+
\***********************************************************************/
|
|
432
|
+
/*! exports provided: default */
|
|
433
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
434
|
+
/*! ../../../utils */
|
|
435
|
+
"./utils/index.js");function i(e){r.default.setValue(e,"color.mode","primary"),r.default.setValue(e,"color.auto",!0)}},"./color-chart/import-properties/helpers/update-color-by-dimension.js":
|
|
436
|
+
/*!****************************************************************************!*\
|
|
437
|
+
!*** ./color-chart/import-properties/helpers/update-color-by-dimension.js ***!
|
|
438
|
+
\****************************************************************************/
|
|
439
|
+
/*! exports provided: default */
|
|
440
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
|
|
441
|
+
/*! ../../../utils */
|
|
442
|
+
"./utils/index.js"),i=n(
|
|
443
|
+
/*! ./set-alt-label */
|
|
444
|
+
"./color-chart/import-properties/helpers/set-alt-label.js"),o=n(
|
|
445
|
+
/*! ./resolve-color-by-property-def */
|
|
446
|
+
"./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=n(
|
|
447
|
+
/*! ./should-set-color-by-dimension-1 */
|
|
448
|
+
"./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js"),s=n(
|
|
449
|
+
/*! ./should-set-color-by-dimension-2 */
|
|
450
|
+
"./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js"),u=n(
|
|
451
|
+
/*! ./set-color-by-dimension-1 */
|
|
452
|
+
"./color-chart/import-properties/helpers/set-color-by-dimension-1.js"),l=n(
|
|
453
|
+
/*! ./set-color-by-dimension-2 */
|
|
454
|
+
"./color-chart/import-properties/helpers/set-color-by-dimension-2.js");function c(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),c=r.default.getValue(e,"".concat(t,"qMeasures"),[]),f=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),d=r.default.getValue(e,"color.byDimDef");if(d&&Object(i.default)(e,d.label),Object(a.default)(d))Object(u.default)(e,t);else if(Object(s.default)(d)&&Object(l.default)(e,t))return;var h=r.default.getValue(e,"color.byDimDef.label");Object(o.default)({properties:e,isDimension:!0,dimensions:n,excludedDimensions:f,measures:c,label:h})}},"./color-chart/import-properties/helpers/update-color-by-measure.js":
|
|
455
|
+
/*!**************************************************************************!*\
|
|
456
|
+
!*** ./color-chart/import-properties/helpers/update-color-by-measure.js ***!
|
|
457
|
+
\**************************************************************************/
|
|
458
|
+
/*! exports provided: default */
|
|
459
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
|
|
460
|
+
/*! ../../../utils */
|
|
461
|
+
"./utils/index.js"),i=n(
|
|
462
|
+
/*! ./set-alt-label */
|
|
463
|
+
"./color-chart/import-properties/helpers/set-alt-label.js"),o=n(
|
|
464
|
+
/*! ./resolve-color-by-property-def */
|
|
465
|
+
"./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=n(
|
|
466
|
+
/*! ./set-color-by-measure-1 */
|
|
467
|
+
"./color-chart/import-properties/helpers/set-color-by-measure-1.js"),s=n(
|
|
468
|
+
/*! ./set-color-by-measure-2 */
|
|
469
|
+
"./color-chart/import-properties/helpers/set-color-by-measure-2.js"),u=n(
|
|
470
|
+
/*! ./should-set-color-by-measure-1 */
|
|
471
|
+
"./color-chart/import-properties/helpers/should-set-color-by-measure-1.js"),l=n(
|
|
472
|
+
/*! ./should-set-color-by-measure-2 */
|
|
473
|
+
"./color-chart/import-properties/helpers/should-set-color-by-measure-2.js");function c(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),c=r.default.getValue(e,"".concat(t,"qMeasures"),[]),f=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),d=r.default.getValue(e,"color.byMeasureDef");if(d&&Object(i.default)(e,d.label),Object(u.default)(d))Object(a.default)(e,t);else if(Object(l.default)(d,c)&&Object(s.default)(e,t))return;var h=r.default.getValue(e,"color.byMeasureDef.label");Object(o.default)({properties:e,isDimension:!1,dimensions:n,excludedDimensions:f,measures:c,label:h})}},"./color-chart/import-properties/helpers/update-color-by-other.js":
|
|
474
|
+
/*!************************************************************************!*\
|
|
475
|
+
!*** ./color-chart/import-properties/helpers/update-color-by-other.js ***!
|
|
476
|
+
\************************************************************************/
|
|
477
|
+
/*! exports provided: default */
|
|
478
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
479
|
+
/*! ../../../utils */
|
|
480
|
+
"./utils/index.js"),i=n(
|
|
481
|
+
/*! ./clear-color-by-item */
|
|
482
|
+
"./color-chart/import-properties/helpers/clear-color-by-item.js");function o(e,t){var n=r.default.getValue(e,"color.mode"),o=r.default.getValue(e,"".concat(t,"qDimensions"),[]),a=r.default.getValue(e,"".concat(t,"qMeasures"),[]),s=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&a.length<2&&r.default.setValue(e,"color.mode","primary"),Object(i.default)(o,s)}},"./color-chart/import-properties/helpers/update-color-by.js":
|
|
483
|
+
/*!******************************************************************!*\
|
|
484
|
+
!*** ./color-chart/import-properties/helpers/update-color-by.js ***!
|
|
485
|
+
\******************************************************************/
|
|
486
|
+
/*! exports provided: default */
|
|
487
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
|
|
488
|
+
/*! ../../../utils */
|
|
489
|
+
"./utils/index.js"),i=n(
|
|
490
|
+
/*! ./clear-color-by-item */
|
|
491
|
+
"./color-chart/import-properties/helpers/clear-color-by-item.js"),o=n(
|
|
492
|
+
/*! ./should-update-color-by-dimension */
|
|
493
|
+
"./color-chart/import-properties/helpers/should-update-color-by-dimension.js"),a=n(
|
|
494
|
+
/*! ./should-update-color-by-measure */
|
|
495
|
+
"./color-chart/import-properties/helpers/should-update-color-by-measure.js"),s=n(
|
|
496
|
+
/*! ./update-color-by-dimension */
|
|
497
|
+
"./color-chart/import-properties/helpers/update-color-by-dimension.js"),u=n(
|
|
498
|
+
/*! ./update-color-by-measure */
|
|
499
|
+
"./color-chart/import-properties/helpers/update-color-by-measure.js"),l=n(
|
|
500
|
+
/*! ./update-color-by-other */
|
|
501
|
+
"./color-chart/import-properties/helpers/update-color-by-other.js");function c(e,t){var n=r.default.getValue(e,"color.mode"),c=r.default.getValue(e,"color.auto"),f=r.default.getValue(e,"".concat(t,"qDimensions"),[]),d=r.default.getValue(e,"".concat(t,"qMeasures"),[]),h=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);c?Object(i.default)(f,h):Object(o.default)({auto:c,colorMode:n,dimensions:f})?Object(s.default)(e,t):Object(a.default)({auto:c,colorMode:n,dimensions:f,measures:d,properties:e})?Object(u.default)(e,t):Object(l.default)(e,t)}},"./color-chart/import-properties/helpers/update-layout-exclude.js":
|
|
502
|
+
/*!************************************************************************!*\
|
|
503
|
+
!*** ./color-chart/import-properties/helpers/update-layout-exclude.js ***!
|
|
504
|
+
\************************************************************************/
|
|
505
|
+
/*! exports provided: default */
|
|
506
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
507
|
+
/*! ../../../utils */
|
|
508
|
+
"./utils/index.js");function i(e,t,n){var i=e.qLayoutExclude;i&&(i.changed||(i.changed={}),i.changed[t]={from:r.default.getValue(e,t),to:n})}},"./color-chart/import-properties/index.js":
|
|
509
|
+
/*!************************************************!*\
|
|
510
|
+
!*** ./color-chart/import-properties/index.js ***!
|
|
511
|
+
\************************************************/
|
|
512
|
+
/*! exports provided: default */
|
|
513
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
|
|
514
|
+
/*! ../../utils */
|
|
515
|
+
"./utils/index.js"),i=n(
|
|
516
|
+
/*! ./helpers */
|
|
517
|
+
"./color-chart/import-properties/helpers/index.js"),o=n(
|
|
518
|
+
/*! ../../hypercube */
|
|
519
|
+
"./hypercube/index.js");function a(e){var t=e.exportFormat,n=e.initialProperties,a=e.dataDefinition,s=e.defaultPropertyValues,u=e.hypercubePath,l=o.default.importProperties({exportFormat:t,initialProperties:n,dataDefinition:a,defaultPropertyValues:s,hypercubePath:u}),c=l.qProperty,f=r.default.getValue(c,"visualization"),d=r.default.getValue(c,"qHyperCubeDef.qDimensions",[]),h=r.default.getValue(c,"color.mode",""),p=r.default.getValue(c,"color.auto",""),m=i.default.getCanColorBy(c,f),v=i.default.shouldUpdateColorBy({canColorBy:m,autoColor:p,colorMode:h,dimensions:d});return m[h]?i.default.shouldAddColorByExpression({shouldUpdateColorBy:v,properties:c})&&i.default.addColorByExpression(c):i.default.switchToAutoColor(c),v&&i.default.updateColorBy(c,"qHyperCubeDef."),i.default.shouldSwitchToColorPersistent(c)&&i.default.changeProperty(c,"color.persistent",!0),i.default.deleteTotalMode(d),l}},"./color-chart/index.js":
|
|
520
|
+
/*!******************************!*\
|
|
521
|
+
!*** ./color-chart/index.js ***!
|
|
522
|
+
\******************************/
|
|
523
|
+
/*! exports provided: default */
|
|
524
|
+
function(e,t,n){n.r(t);var r=n(
|
|
525
|
+
/*! ./export-properties */
|
|
526
|
+
"./color-chart/export-properties/index.js"),i=n(
|
|
527
|
+
/*! ./import-properties */
|
|
528
|
+
"./color-chart/import-properties/index.js");t.default={exportProperties:r.default,importProperties:i.default}},"./conditional-coloring.js":
|
|
529
|
+
/*!*********************************!*\
|
|
530
|
+
!*** ./conditional-coloring.js ***!
|
|
531
|
+
\*********************************/
|
|
532
|
+
/*! exports provided: default */
|
|
533
|
+
function(e,t,n){n.r(t);var r=n(
|
|
534
|
+
/*! ./quarantine/quarantine-array-prop */
|
|
535
|
+
"./quarantine/quarantine-array-prop.js"),i=n(
|
|
536
|
+
/*! ./quarantine/unquarantine-array-prop */
|
|
537
|
+
"./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="conditionalColoring",s="measures",u="qDef.conditionalColoring";t.default={quarantine:function(e){Object(r.default)({properties:e,arrayPath:o,quarantineName:a,arrayName:s,itemPath:u})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,itemPath:u,arrayName:s,quarantineName:a})}}},"./conditional-show.js":
|
|
538
|
+
/*!*****************************!*\
|
|
539
|
+
!*** ./conditional-show.js ***!
|
|
540
|
+
\*****************************/
|
|
541
|
+
/*! exports provided: default */
|
|
542
|
+
function(e,t,n){n.r(t);var r=n(
|
|
543
|
+
/*! ./quarantine/quarantine-array-prop */
|
|
544
|
+
"./quarantine/quarantine-array-prop.js"),i=n(
|
|
545
|
+
/*! ./quarantine/unquarantine-array-prop */
|
|
546
|
+
"./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="measures",s="qHyperCubeDef.qDimensions",u="dimensions",l="qCalcCondition",c="conditionalShowHide";t.default={quarantine:function(e){Object(r.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:l}),Object(r.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:u,itemPath:l})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:l}),Object(i.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:u,itemPath:l})}}},"./export-format.js":
|
|
547
|
+
/*!**************************!*\
|
|
548
|
+
!*** ./export-format.js ***!
|
|
549
|
+
\**************************/
|
|
550
|
+
/*! exports provided: default */
|
|
551
|
+
function(e,t,n){function r(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/export-properties/helpers/add-dimensions.js":
|
|
552
|
+
/*!***************************************************************!*\
|
|
553
|
+
!*** ./hypercube/export-properties/helpers/add-dimensions.js ***!
|
|
554
|
+
\***************************************************************/
|
|
555
|
+
/*! exports provided: default */
|
|
556
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
|
|
557
|
+
/*! ../../../utils */
|
|
558
|
+
"./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t,n=e.exportFormat,o=e.qHyperCubeDef,a=n.data[0];(t=a.dimensions).push.apply(t,i(o.qDimensions));var s,u=r.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qDimensions");u&&(s=a.excludedDimensions).push.apply(s,i(u))}},"./hypercube/export-properties/helpers/add-measures.js":
|
|
559
|
+
/*!*************************************************************!*\
|
|
560
|
+
!*** ./hypercube/export-properties/helpers/add-measures.js ***!
|
|
561
|
+
\*************************************************************/
|
|
562
|
+
/*! exports provided: default */
|
|
563
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
|
|
564
|
+
/*! ../../../utils */
|
|
565
|
+
"./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t,n=e.exportFormat,o=e.qHyperCubeDef,a=n.data[0];(t=a.measures).push.apply(t,i(o.qMeasures));var s,u=r.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qMeasures");u&&(s=a.excludedMeasures).push.apply(s,i(u))}},"./hypercube/export-properties/helpers/copy-properties.js":
|
|
566
|
+
/*!****************************************************************!*\
|
|
567
|
+
!*** ./hypercube/export-properties/helpers/copy-properties.js ***!
|
|
568
|
+
\****************************************************************/
|
|
569
|
+
/*! exports provided: default */
|
|
570
|
+
function(e,t,n){function r(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/export-properties/helpers/index.js":
|
|
571
|
+
/*!******************************************************!*\
|
|
572
|
+
!*** ./hypercube/export-properties/helpers/index.js ***!
|
|
573
|
+
\******************************************************/
|
|
574
|
+
/*! exports provided: default */
|
|
575
|
+
function(e,t,n){n.r(t);var r=n(
|
|
576
|
+
/*! ./add-dimensions */
|
|
577
|
+
"./hypercube/export-properties/helpers/add-dimensions.js"),i=n(
|
|
578
|
+
/*! ./add-measures */
|
|
579
|
+
"./hypercube/export-properties/helpers/add-measures.js"),o=n(
|
|
580
|
+
/*! ./set-inter-column-sort-order */
|
|
581
|
+
"./hypercube/export-properties/helpers/set-inter-column-sort-order.js"),a=n(
|
|
582
|
+
/*! ./copy-properties */
|
|
583
|
+
"./hypercube/export-properties/helpers/copy-properties.js"),s=n(
|
|
584
|
+
/*! ./update-layout-exclude */
|
|
585
|
+
"./hypercube/export-properties/helpers/update-layout-exclude.js"),u=n(
|
|
586
|
+
/*! ./store-measures-modifiers */
|
|
587
|
+
"./hypercube/export-properties/helpers/store-measures-modifiers.js");t.default={addDimensions:r.default,addMeasures:i.default,setInterColumnSortOrder:o.default,copyProperties:a.default,updateLayoutExclude:s.default,storeMeasuresModifiers:u.default}},"./hypercube/export-properties/helpers/restore-changed-properties.js":
|
|
588
|
+
/*!***************************************************************************!*\
|
|
589
|
+
!*** ./hypercube/export-properties/helpers/restore-changed-properties.js ***!
|
|
590
|
+
\***************************************************************************/
|
|
591
|
+
/*! exports provided: default */
|
|
592
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
593
|
+
/*! ../../../utils */
|
|
594
|
+
"./utils/index.js");function i(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===r.default.getValue(e,t)&&r.default.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}},"./hypercube/export-properties/helpers/set-inter-column-sort-order.js":
|
|
595
|
+
/*!****************************************************************************!*\
|
|
596
|
+
!*** ./hypercube/export-properties/helpers/set-inter-column-sort-order.js ***!
|
|
597
|
+
\****************************************************************************/
|
|
598
|
+
/*! exports provided: default */
|
|
599
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
600
|
+
/*! ../../../utils */
|
|
601
|
+
"./utils/index.js"),i=n(
|
|
602
|
+
/*! ../../../utils/array-util */
|
|
603
|
+
"./utils/array-util.js");function o(e){var t=e.exportFormat,n=e.qHyperCubeDef,o=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),o.interColumnSortOrder=n.qInterColumnSortOrder.concat();var a=r.default.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");a&&i.default.isOrderedSubset(a,o.interColumnSortOrder)&&(o.interColumnSortOrder=a.concat())}},"./hypercube/export-properties/helpers/store-measures-modifiers.js":
|
|
604
|
+
/*!*************************************************************************!*\
|
|
605
|
+
!*** ./hypercube/export-properties/helpers/store-measures-modifiers.js ***!
|
|
606
|
+
\*************************************************************************/
|
|
607
|
+
/*! exports provided: default */
|
|
608
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
609
|
+
/*! qlik-modifiers */
|
|
610
|
+
"../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=n.n(r);function o(e){e.forEach((function(e){i.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}},"./hypercube/export-properties/helpers/update-layout-exclude.js":
|
|
611
|
+
/*!**********************************************************************!*\
|
|
612
|
+
!*** ./hypercube/export-properties/helpers/update-layout-exclude.js ***!
|
|
613
|
+
\**********************************************************************/
|
|
614
|
+
/*! exports provided: default */
|
|
615
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
616
|
+
/*! ../../../utils */
|
|
617
|
+
"./utils/index.js"),i=n(
|
|
618
|
+
/*! ./restore-changed-properties */
|
|
619
|
+
"./hypercube/export-properties/helpers/restore-changed-properties.js");function o(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(Object(i.default)(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!r.default.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude}},"./hypercube/export-properties/index.js":
|
|
620
|
+
/*!**********************************************!*\
|
|
621
|
+
!*** ./hypercube/export-properties/index.js ***!
|
|
622
|
+
\**********************************************/
|
|
623
|
+
/*! exports provided: default */
|
|
624
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
|
|
625
|
+
/*! ../../export-format */
|
|
626
|
+
"./export-format.js"),i=n(
|
|
627
|
+
/*! ../../utils */
|
|
628
|
+
"./utils/index.js"),o=n(
|
|
629
|
+
/*! ./helpers */
|
|
630
|
+
"./hypercube/export-properties/helpers/index.js");function a(e){var t=e.propertyTree,n=e.hypercubePath,a=e.viewDataMode,s=Object(r.default)(),u=t.qProperty,l=i.default.getValue(u,n||""),c=l.qHyperCubeDef;return c.qInterColumnSortOrder||(c.qInterColumnSortOrder=[]),o.default.addDimensions({exportFormat:s,qHyperCubeDef:c}),o.default.addMeasures({exportFormat:s,qHyperCubeDef:c}),o.default.setInterColumnSortOrder({exportFormat:s,qHyperCubeDef:c}),delete c.qLayoutExclude,o.default.copyProperties({exportFormat:s,properties:u}),n&&(s.properties.qHyperCubeDef=c,delete l.qHyperCubeDef),o.default.updateLayoutExclude({exportFormat:s,properties:u}),a||o.default.storeMeasuresModifiers(s.properties.qHyperCubeDef.qMeasures),s}},"./hypercube/import-properties/helpers/add-dimensions.js":
|
|
631
|
+
/*!***************************************************************!*\
|
|
632
|
+
!*** ./hypercube/import-properties/helpers/add-dimensions.js ***!
|
|
633
|
+
\***************************************************************/
|
|
634
|
+
/*! exports provided: default */
|
|
635
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
636
|
+
/*! ./create-dimension */
|
|
637
|
+
"./hypercube/import-properties/helpers/create-dimension.js");function i(e){var t,n=e.exportFormat,i=e.maxDimensions,o=e.minDimensions,a=e.newHyperCubeDef,s=e.defaultDimension,u=n.data[0];for(t=0;t<u.dimensions.length;++t){var l=Object(r.default)(u.dimensions[t],s);a.qDimensions.length<i?a.qDimensions.push(l):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<u.excludedDimensions.length;++t){var c=Object(r.default)(u.excludedDimensions[t],s);a.qDimensions.length<o?a.qDimensions.push(c):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}}},"./hypercube/import-properties/helpers/add-measures.js":
|
|
638
|
+
/*!*************************************************************!*\
|
|
639
|
+
!*** ./hypercube/import-properties/helpers/add-measures.js ***!
|
|
640
|
+
\*************************************************************/
|
|
641
|
+
/*! exports provided: default */
|
|
642
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
643
|
+
/*! ./create-measure */
|
|
644
|
+
"./hypercube/import-properties/helpers/create-measure.js");function i(e){var t,n=e.exportFormat,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=e.defaultMeasure,u=n.data[0];for(t=0;t<u.measures.length;++t){var l=Object(r.default)(u.measures[t],s);a.qMeasures.length<i?a.qMeasures.push(l):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<u.excludedMeasures.length;++t){var c=Object(r.default)(u.excludedMeasures[t],s);a.qMeasures.length<o?a.qMeasures.push(c):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}}},"./hypercube/import-properties/helpers/copy-property-if-exist.js":
|
|
645
|
+
/*!***********************************************************************!*\
|
|
646
|
+
!*** ./hypercube/import-properties/helpers/copy-property-if-exist.js ***!
|
|
647
|
+
\***********************************************************************/
|
|
648
|
+
/*! exports provided: default */
|
|
649
|
+
function(e,t,n){function r(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/copy-property-or-set-default.js":
|
|
650
|
+
/*!*****************************************************************************!*\
|
|
651
|
+
!*** ./hypercube/import-properties/helpers/copy-property-or-set-default.js ***!
|
|
652
|
+
\*****************************************************************************/
|
|
653
|
+
/*! exports provided: default */
|
|
654
|
+
function(e,t,n){function r(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/create-dimension.js":
|
|
655
|
+
/*!*****************************************************************!*\
|
|
656
|
+
!*** ./hypercube/import-properties/helpers/create-dimension.js ***!
|
|
657
|
+
\*****************************************************************/
|
|
658
|
+
/*! exports provided: default */
|
|
659
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
|
|
660
|
+
/*! extend */
|
|
661
|
+
"../node_modules/extend/index.js"),i=n.n(r),o=n(
|
|
662
|
+
/*! ../../../utils */
|
|
663
|
+
"./utils/index.js"),a=n(
|
|
664
|
+
/*! ./get-others-label */
|
|
665
|
+
"./hypercube/import-properties/helpers/get-others-label.js");function s(e,t){var n=i()(!0,{},t,e);return o.default.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.default.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.default.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.default.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel=Object(a.default)()),n}},"./hypercube/import-properties/helpers/create-measure.js":
|
|
666
|
+
/*!***************************************************************!*\
|
|
667
|
+
!*** ./hypercube/import-properties/helpers/create-measure.js ***!
|
|
668
|
+
\***************************************************************/
|
|
669
|
+
/*! exports provided: default */
|
|
670
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
671
|
+
/*! extend */
|
|
672
|
+
"../node_modules/extend/index.js"),i=n.n(r);function o(e,t){return i()(!0,{},t,e)}},"./hypercube/import-properties/helpers/create-new-properties.js":
|
|
673
|
+
/*!**********************************************************************!*\
|
|
674
|
+
!*** ./hypercube/import-properties/helpers/create-new-properties.js ***!
|
|
675
|
+
\**********************************************************************/
|
|
676
|
+
/*! exports provided: default */
|
|
677
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
|
|
678
|
+
/*! extend */
|
|
679
|
+
"../node_modules/extend/index.js"),i=n.n(r),o=n(
|
|
680
|
+
/*! ../../../utils */
|
|
681
|
+
"./utils/index.js"),a=n(
|
|
682
|
+
/*! ./is-master-item-property */
|
|
683
|
+
"./hypercube/import-properties/helpers/is-master-item-property.js");function s(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,s={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(s.qLayoutExclude.quarantine=i()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.default.setValue(s,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||Object(a.default)(e)?s[e]=t.properties[e]:s.qLayoutExclude.disabled[e]=t.properties[e]})),null===(s=i()(!0,{},n,s)).components&&(s.components=[]),s}},"./hypercube/import-properties/helpers/get-default-dimension.js":
|
|
684
|
+
/*!**********************************************************************!*\
|
|
685
|
+
!*** ./hypercube/import-properties/helpers/get-default-dimension.js ***!
|
|
686
|
+
\**********************************************************************/
|
|
687
|
+
/*! exports provided: default */
|
|
688
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
689
|
+
/*! ./get-others-label */
|
|
690
|
+
"./hypercube/import-properties/helpers/get-others-label.js");function i(){return{qDef:{autoSort:!0,cId:"",othersLabel:Object(r.default)()},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}}},"./hypercube/import-properties/helpers/get-default-measure.js":
|
|
691
|
+
/*!********************************************************************!*\
|
|
692
|
+
!*** ./hypercube/import-properties/helpers/get-default-measure.js ***!
|
|
693
|
+
\********************************************************************/
|
|
694
|
+
/*! exports provided: default */
|
|
695
|
+
function(e,t,n){function r(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/get-max-min-dimension-measure.js":
|
|
696
|
+
/*!******************************************************************************!*\
|
|
697
|
+
!*** ./hypercube/import-properties/helpers/get-max-min-dimension-measure.js ***!
|
|
698
|
+
\******************************************************************************/
|
|
699
|
+
/*! exports provided: default */
|
|
700
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
701
|
+
/*! ./resolve-value */
|
|
702
|
+
"./hypercube/import-properties/helpers/resolve-value.js"),i=Math.pow(2,53)-1;function o(e){var t=e.exportFormat,n=e.dataDefinition,o=void 0===n?{}:n,a=t.data[0],s=o.dimensions||{max:0},u=o.measures||{max:0},l=Object(r.default)(u.max,a.dimensions.length,i),c=Object(r.default)(u.min,a.dimensions.length,0);return{maxDimensions:Object(r.default)(s.max,l,i),minDimensions:Object(r.default)(s.min,c,0),maxMeasures:l,minMeasures:c}}},"./hypercube/import-properties/helpers/get-others-label.js":
|
|
703
|
+
/*!*****************************************************************!*\
|
|
704
|
+
!*** ./hypercube/import-properties/helpers/get-others-label.js ***!
|
|
705
|
+
\*****************************************************************/
|
|
706
|
+
/*! exports provided: default */
|
|
707
|
+
function(e,t,n){function r(){return"Others"}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/import-common-properties.js":
|
|
708
|
+
/*!*************************************************************************!*\
|
|
709
|
+
!*** ./hypercube/import-properties/helpers/import-common-properties.js ***!
|
|
710
|
+
\*************************************************************************/
|
|
711
|
+
/*! exports provided: default */
|
|
712
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
713
|
+
/*! ../../../utils */
|
|
714
|
+
"./utils/index.js");function i(e,t,n){var i="masterobject"===r.default.getValue(t,"properties.qInfo.qType")?"masterobject":r.default.getValue(n,"qInfo.qType");r.default.setValue(e,"qInfo.qType",i),e.visualization=n.visualization}},"./hypercube/import-properties/helpers/index.js":
|
|
715
|
+
/*!******************************************************!*\
|
|
716
|
+
!*** ./hypercube/import-properties/helpers/index.js ***!
|
|
717
|
+
\******************************************************/
|
|
718
|
+
/*! exports provided: default */
|
|
719
|
+
function(e,t,n){n.r(t);var r=n(
|
|
720
|
+
/*! ./import-common-properties */
|
|
721
|
+
"./hypercube/import-properties/helpers/import-common-properties.js"),i=n(
|
|
722
|
+
/*! ./copy-property-if-exist */
|
|
723
|
+
"./hypercube/import-properties/helpers/copy-property-if-exist.js"),o=n(
|
|
724
|
+
/*! ./copy-property-or-set-default */
|
|
725
|
+
"./hypercube/import-properties/helpers/copy-property-or-set-default.js"),a=n(
|
|
726
|
+
/*! ./get-default-dimension */
|
|
727
|
+
"./hypercube/import-properties/helpers/get-default-dimension.js"),s=n(
|
|
728
|
+
/*! ./get-default-measure */
|
|
729
|
+
"./hypercube/import-properties/helpers/get-default-measure.js"),u=n(
|
|
730
|
+
/*! ./add-dimensions */
|
|
731
|
+
"./hypercube/import-properties/helpers/add-dimensions.js"),l=n(
|
|
732
|
+
/*! ./add-measures */
|
|
733
|
+
"./hypercube/import-properties/helpers/add-measures.js"),c=n(
|
|
734
|
+
/*! ./get-max-min-dimension-measure */
|
|
735
|
+
"./hypercube/import-properties/helpers/get-max-min-dimension-measure.js"),f=n(
|
|
736
|
+
/*! ./set-inter-column-sort-order */
|
|
737
|
+
"./hypercube/import-properties/helpers/set-inter-column-sort-order.js"),d=n(
|
|
738
|
+
/*! ./create-new-properties */
|
|
739
|
+
"./hypercube/import-properties/helpers/create-new-properties.js"),h=n(
|
|
740
|
+
/*! ./should-init-layout-exclude */
|
|
741
|
+
"./hypercube/import-properties/helpers/should-init-layout-exclude.js"),p=n(
|
|
742
|
+
/*! ./init-layout-exclude */
|
|
743
|
+
"./hypercube/import-properties/helpers/init-layout-exclude.js"),m=n(
|
|
744
|
+
/*! ./update-dimensions-on-added */
|
|
745
|
+
"./hypercube/import-properties/helpers/update-dimensions-on-added.js"),v=n(
|
|
746
|
+
/*! ./update-measures-on-added */
|
|
747
|
+
"./hypercube/import-properties/helpers/update-measures-on-added.js");t.default={importCommonProperties:r.default,copyPropertyIfExist:i.default,copyPropertyOrSetDefault:o.default,getDefaultDimension:a.default,getDefaultMeasure:s.default,addDimensions:u.default,addMeasures:l.default,getMaxMinDimensionMeasure:c.default,setInterColumnSortOrder:f.default,createNewProperties:d.default,shouldInitLayoutExclude:h.default,initLayoutExclude:p.default,updateDimensionsOnAdded:m.default,updateMeasuresOnAdded:v.default}},"./hypercube/import-properties/helpers/init-layout-exclude.js":
|
|
748
|
+
/*!********************************************************************!*\
|
|
749
|
+
!*** ./hypercube/import-properties/helpers/init-layout-exclude.js ***!
|
|
750
|
+
\********************************************************************/
|
|
751
|
+
/*! exports provided: default */
|
|
752
|
+
function(e,t,n){function r(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/is-master-item-property.js":
|
|
753
|
+
/*!************************************************************************!*\
|
|
754
|
+
!*** ./hypercube/import-properties/helpers/is-master-item-property.js ***!
|
|
755
|
+
\************************************************************************/
|
|
756
|
+
/*! exports provided: default */
|
|
757
|
+
function(e,t,n){function r(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/resolve-value.js":
|
|
758
|
+
/*!**************************************************************!*\
|
|
759
|
+
!*** ./hypercube/import-properties/helpers/resolve-value.js ***!
|
|
760
|
+
\**************************************************************/
|
|
761
|
+
/*! exports provided: default */
|
|
762
|
+
function(e,t,n){function r(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/set-inter-column-sort-order.js":
|
|
763
|
+
/*!****************************************************************************!*\
|
|
764
|
+
!*** ./hypercube/import-properties/helpers/set-inter-column-sort-order.js ***!
|
|
765
|
+
\****************************************************************************/
|
|
766
|
+
/*! exports provided: default */
|
|
767
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
768
|
+
/*! ../../../utils/array-util */
|
|
769
|
+
"./utils/array-util.js");function i(e){var t=e.exportFormat,n=e.newHyperCubeDef,i=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=i.interColumnSortOrder.concat();var a=n.qInterColumnSortOrder.length;if(a!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=i.interColumnSortOrder.concat());a!==o;)a<o?(r.default.indexAdded(n.qInterColumnSortOrder,a),++a):(--a,r.default.indexRemoved(n.qInterColumnSortOrder,a))}},"./hypercube/import-properties/helpers/should-init-layout-exclude.js":
|
|
770
|
+
/*!***************************************************************************!*\
|
|
771
|
+
!*** ./hypercube/import-properties/helpers/should-init-layout-exclude.js ***!
|
|
772
|
+
\***************************************************************************/
|
|
773
|
+
/*! exports provided: default */
|
|
774
|
+
function(e,t,n){function r(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/update-dimensions-on-added.js":
|
|
775
|
+
/*!***************************************************************************!*\
|
|
776
|
+
!*** ./hypercube/import-properties/helpers/update-dimensions-on-added.js ***!
|
|
777
|
+
\***************************************************************************/
|
|
778
|
+
/*! exports provided: default */
|
|
779
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
|
|
780
|
+
/*! ../../../utils */
|
|
781
|
+
"./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=r.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qDimensions);a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),n.dimensions.added(e,t)}))}}},"./hypercube/import-properties/helpers/update-measures-on-added.js":
|
|
782
|
+
/*!*************************************************************************!*\
|
|
783
|
+
!*** ./hypercube/import-properties/helpers/update-measures-on-added.js ***!
|
|
784
|
+
\*************************************************************************/
|
|
785
|
+
/*! exports provided: default */
|
|
786
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
|
|
787
|
+
/*! ../../../utils */
|
|
788
|
+
"./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=r.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qMeasures);a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),n.measures.added(e,t)}))}}},"./hypercube/import-properties/index.js":
|
|
789
|
+
/*!**********************************************!*\
|
|
790
|
+
!*** ./hypercube/import-properties/index.js ***!
|
|
791
|
+
\**********************************************/
|
|
792
|
+
/*! exports provided: default */
|
|
793
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
794
|
+
/*! ../../utils */
|
|
795
|
+
"./utils/index.js"),i=n(
|
|
796
|
+
/*! ./helpers */
|
|
797
|
+
"./hypercube/import-properties/helpers/index.js");function o(e){var t=e.exportFormat,n=e.initialProperties,o=void 0===n?{}:n,a=e.dataDefinition,s=void 0===a?{}:a,u=e.defaultPropertyValues,l=void 0===u?{}:u,c=e.hypercubePath,f={qChildren:[]},d=i.default.createNewProperties({exportFormat:t,initialProperties:o,hypercubePath:c}),h=r.default.getValue(o,c||"").qHyperCubeDef,p=r.default.getValue(d,c||"").qHyperCubeDef,m=i.default.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:s}),v=m.maxDimensions,g=m.minDimensions,y=m.maxMeasures,b=m.minMeasures,x=l.defaultDimension,w=void 0===x?i.default.getDefaultDimension():x,M=l.defaultMeasure,k=void 0===M?i.default.getDefaultMeasure():M;return p.qDimensions.length=0,p.qMeasures.length=0,i.default.shouldInitLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:g,maxMeasures:y,minMeasures:b})&&i.default.initLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:g,maxMeasures:y,minMeasures:b,newHyperCubeDef:p}),i.default.addDimensions({exportFormat:t,maxDimensions:v,minDimensions:g,newHyperCubeDef:p,defaultDimension:w}),i.default.addMeasures({exportFormat:t,maxMeasures:y,minMeasures:b,newHyperCubeDef:p,defaultMeasure:k}),i.default.updateDimensionsOnAdded({newProperties:d,dataDefinition:s,hypercubePath:c}),i.default.updateMeasuresOnAdded({newProperties:d,dataDefinition:s,hypercubePath:c}),i.default.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:p}),i.default.copyPropertyIfExist("qMaxStackedCells",h,p),i.default.copyPropertyIfExist("qNoOfLeftDims",h,p),i.default.copyPropertyOrSetDefault("qInitialDataFetch",h,p,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),i.default.copyPropertyOrSetDefault("qMode",h,p,"S"),i.default.copyPropertyOrSetDefault("qReductionMode",h,p,"N"),i.default.copyPropertyOrSetDefault("qSortbyYValue",h,p),i.default.copyPropertyOrSetDefault("qIndentMode",h,p),i.default.copyPropertyOrSetDefault("qShowTotalsAbove",h,p),i.default.importCommonProperties(d,t,o),f.qProperty=d,f}},"./hypercube/index.js":
|
|
798
|
+
/*!****************************!*\
|
|
799
|
+
!*** ./hypercube/index.js ***!
|
|
800
|
+
\****************************/
|
|
801
|
+
/*! exports provided: default */
|
|
802
|
+
function(e,t,n){n.r(t);var r=n(
|
|
803
|
+
/*! ./export-properties */
|
|
804
|
+
"./hypercube/export-properties/index.js"),i=n(
|
|
805
|
+
/*! ./import-properties */
|
|
806
|
+
"./hypercube/import-properties/index.js");t.default={exportProperties:r.default,importProperties:i.default}},"./index.js":
|
|
807
|
+
/*!******************!*\
|
|
808
|
+
!*** ./index.js ***!
|
|
809
|
+
\******************/
|
|
810
|
+
/*! exports provided: default */
|
|
811
|
+
function(e,t,n){n.r(t);var r=n(
|
|
812
|
+
/*! ./hypercube */
|
|
813
|
+
"./hypercube/index.js"),i=n(
|
|
814
|
+
/*! ./color-chart */
|
|
815
|
+
"./color-chart/index.js"),o=n(
|
|
816
|
+
/*! ./axis-chart */
|
|
817
|
+
"./axis-chart/index.js"),a=n(
|
|
818
|
+
/*! ./quarantine/quarantine-property */
|
|
819
|
+
"./quarantine/quarantine-property.js"),s=n(
|
|
820
|
+
/*! ./quarantine/unquarantine-property */
|
|
821
|
+
"./quarantine/unquarantine-property.js"),u=n(
|
|
822
|
+
/*! ./quarantine/quarantine-array-prop */
|
|
823
|
+
"./quarantine/quarantine-array-prop.js"),l=n(
|
|
824
|
+
/*! ./quarantine/unquarantine-array-prop */
|
|
825
|
+
"./quarantine/unquarantine-array-prop.js"),c=n(
|
|
826
|
+
/*! ./conditional-coloring */
|
|
827
|
+
"./conditional-coloring.js"),f=n(
|
|
828
|
+
/*! ./conditional-show */
|
|
829
|
+
"./conditional-show.js");t.default={hypercube:r.default,colorChart:i.default,axisChart:o.default,quarantineProperty:a.default,unquarantineProperty:s.default,quarantineArrayProp:u.default,unquarantineArrayProp:l.default,conditionalColoring:c.default,conditionalShow:f.default}},"./quarantine/get-quarantine-path.js":
|
|
830
|
+
/*!*******************************************!*\
|
|
831
|
+
!*** ./quarantine/get-quarantine-path.js ***!
|
|
832
|
+
\*******************************************/
|
|
833
|
+
/*! exports provided: default */
|
|
834
|
+
function(e,t,n){function r(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}n.r(t),n.d(t,"default",(function(){return r}))},"./quarantine/quarantine-array-item.js":
|
|
835
|
+
/*!*********************************************!*\
|
|
836
|
+
!*** ./quarantine/quarantine-array-item.js ***!
|
|
837
|
+
\*********************************************/
|
|
838
|
+
/*! exports provided: default */
|
|
839
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
840
|
+
/*! ../utils */
|
|
841
|
+
"./utils/index.js"),i=n(
|
|
842
|
+
/*! ./get-quarantine-path */
|
|
843
|
+
"./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,n=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,u=r.default.getValue(a,s);if(void 0!==u){var l=r.default.getValue(a,"qDef.cId");l||(l=r.default.generateId(),r.default.setValue(a,"qDef.cId",l));var c=Object(i.default)(n,o,l);r.default.setValue(t,c,u),r.default.setValue(a,s,void 0)}}},"./quarantine/quarantine-array-prop.js":
|
|
844
|
+
/*!*********************************************!*\
|
|
845
|
+
!*** ./quarantine/quarantine-array-prop.js ***!
|
|
846
|
+
\*********************************************/
|
|
847
|
+
/*! exports provided: default */
|
|
848
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
849
|
+
/*! ../utils */
|
|
850
|
+
"./utils/index.js"),i=n(
|
|
851
|
+
/*! ./quarantine-array-item */
|
|
852
|
+
"./quarantine/quarantine-array-item.js");function o(e){var t=e.properties,n=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;r.default.getValue(t,n,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/quarantine-property.js":
|
|
853
|
+
/*!*******************************************!*\
|
|
854
|
+
!*** ./quarantine/quarantine-property.js ***!
|
|
855
|
+
\*******************************************/
|
|
856
|
+
/*! exports provided: default */
|
|
857
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
858
|
+
/*! ../utils */
|
|
859
|
+
"./utils/index.js");function i(e,t,n){var i,o,a=r.default.getValue(e,t);if(!r.default.isAtomicValue(a))try{if((o=(o=(i=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(i)}catch(e){return}r.default.getValue(e,"qLayoutExclude.quarantine")||r.default.setValue(e,"qLayoutExclude.quarantine",{});var s=r.default.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}},"./quarantine/unquarantine-array-item.js":
|
|
860
|
+
/*!***********************************************!*\
|
|
861
|
+
!*** ./quarantine/unquarantine-array-item.js ***!
|
|
862
|
+
\***********************************************/
|
|
863
|
+
/*! exports provided: default */
|
|
864
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
865
|
+
/*! ../utils */
|
|
866
|
+
"./utils/index.js"),i=n(
|
|
867
|
+
/*! ./get-quarantine-path */
|
|
868
|
+
"./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,n=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,u=r.default.getValue(a,"qDef.cId");if(u){var l=Object(i.default)(n,o,u),c=r.default.getValue(t,l);void 0!==c&&(r.default.setValue(a,s,c),r.default.setValue(t,l,void 0))}}},"./quarantine/unquarantine-array-prop.js":
|
|
869
|
+
/*!***********************************************!*\
|
|
870
|
+
!*** ./quarantine/unquarantine-array-prop.js ***!
|
|
871
|
+
\***********************************************/
|
|
872
|
+
/*! exports provided: default */
|
|
873
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
874
|
+
/*! ../utils */
|
|
875
|
+
"./utils/index.js"),i=n(
|
|
876
|
+
/*! ./unquarantine-array-item */
|
|
877
|
+
"./quarantine/unquarantine-array-item.js");function o(e){var t=e.properties,n=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;r.default.getValue(t,n,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/unquarantine-property.js":
|
|
878
|
+
/*!*********************************************!*\
|
|
879
|
+
!*** ./quarantine/unquarantine-property.js ***!
|
|
880
|
+
\*********************************************/
|
|
881
|
+
/*! exports provided: default */
|
|
882
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
883
|
+
/*! ../utils */
|
|
884
|
+
"./utils/index.js");function i(e,t){var n=r.default.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){r.default.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}},"./utils/array-util.js":
|
|
885
|
+
/*!*****************************!*\
|
|
886
|
+
!*** ./utils/array-util.js ***!
|
|
887
|
+
\*****************************/
|
|
888
|
+
/*! exports provided: default */
|
|
889
|
+
function(e,t,n){n.r(t);var r=n(
|
|
890
|
+
/*! ./find-item-by-property-value */
|
|
891
|
+
"./utils/find-item-by-property-value.js"),i=n(
|
|
892
|
+
/*! ./find-index-by-property-value */
|
|
893
|
+
"./utils/find-index-by-property-value.js");t.default={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:r.default,findIndexByPropertyValue:i.default}},"./utils/attribute-expression-util/create.js":
|
|
894
|
+
/*!***************************************************!*\
|
|
895
|
+
!*** ./utils/attribute-expression-util/create.js ***!
|
|
896
|
+
\***************************************************/
|
|
897
|
+
/*! exports provided: default */
|
|
898
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function i(e,t){if(!e||!r[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n}},"./utils/attribute-expression-util/index.js":
|
|
899
|
+
/*!**************************************************!*\
|
|
900
|
+
!*** ./utils/attribute-expression-util/index.js ***!
|
|
901
|
+
\**************************************************/
|
|
902
|
+
/*! exports provided: default */
|
|
903
|
+
function(e,t,n){n.r(t);var r=n(
|
|
904
|
+
/*! ./create */
|
|
905
|
+
"./utils/attribute-expression-util/create.js"),i=n(
|
|
906
|
+
/*! ./move-by-id-from-group */
|
|
907
|
+
"./utils/attribute-expression-util/move-by-id-from-group.js");t.default={create:r.default,moveByIdFromGroup:i.default,IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}}},"./utils/attribute-expression-util/is-size-changed.js":
|
|
908
|
+
/*!************************************************************!*\
|
|
909
|
+
!*** ./utils/attribute-expression-util/is-size-changed.js ***!
|
|
910
|
+
\************************************************************/
|
|
911
|
+
/*! exports provided: default */
|
|
912
|
+
function(e,t,n){function r(e,t){return e.length!==t}n.r(t),n.d(t,"default",(function(){return r}))},"./utils/attribute-expression-util/move-by-id-from-group.js":
|
|
913
|
+
/*!******************************************************************!*\
|
|
914
|
+
!*** ./utils/attribute-expression-util/move-by-id-from-group.js ***!
|
|
915
|
+
\******************************************************************/
|
|
916
|
+
/*! exports provided: default */
|
|
917
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
|
|
918
|
+
/*! ./move-by-id */
|
|
919
|
+
"./utils/attribute-expression-util/move-by-id.js"),i=n(
|
|
920
|
+
/*! ./is-size-changed */
|
|
921
|
+
"./utils/attribute-expression-util/is-size-changed.js");function o(e,t,n,o,a){n=n||"qAttributeExpressions",a=a||"id";for(var s=0;s<e.length;s++){var u=e[s][n],l=t.length;if(Object(r.default)(u,t,o,a),Object(i.default)(t,l))return t}return t}},"./utils/attribute-expression-util/move-by-id.js":
|
|
922
|
+
/*!*******************************************************!*\
|
|
923
|
+
!*** ./utils/attribute-expression-util/move-by-id.js ***!
|
|
924
|
+
\*******************************************************/
|
|
925
|
+
/*! exports provided: default */
|
|
926
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
927
|
+
/*! ../find-index-by-property-value */
|
|
928
|
+
"./utils/find-index-by-property-value.js");function i(e,t,n,i){t=t||[];var o=Object(r.default)(e,i,n),a=Object(r.default)(t,i,n);if(-1!==o&&-1===a){var s=e.splice(o,1);t.push(s[0])}return t}},"./utils/find-index-by-property-value.js":
|
|
929
|
+
/*!***********************************************!*\
|
|
930
|
+
!*** ./utils/find-index-by-property-value.js ***!
|
|
931
|
+
\***********************************************/
|
|
932
|
+
/*! exports provided: default */
|
|
933
|
+
function(e,t,n){function r(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}n.r(t),n.d(t,"default",(function(){return r}))},"./utils/find-item-by-property-value.js":
|
|
934
|
+
/*!**********************************************!*\
|
|
935
|
+
!*** ./utils/find-item-by-property-value.js ***!
|
|
936
|
+
\**********************************************/
|
|
937
|
+
/*! exports provided: default */
|
|
938
|
+
function(e,t,n){function r(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null}n.r(t),n.d(t,"default",(function(){return r}))},"./utils/generate-id.js":
|
|
939
|
+
/*!******************************!*\
|
|
940
|
+
!*** ./utils/generate-id.js ***!
|
|
941
|
+
\******************************/
|
|
942
|
+
/*! exports provided: default */
|
|
943
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
944
|
+
/*! ./get-base62 */
|
|
945
|
+
"./utils/get-base62.js");function i(){return Object(r.default)(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},"./utils/get-base62.js":
|
|
946
|
+
/*!*****************************!*\
|
|
947
|
+
!*** ./utils/get-base62.js ***!
|
|
948
|
+
\*****************************/
|
|
949
|
+
/*! exports provided: default */
|
|
950
|
+
function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
|
|
951
|
+
/*! ./get-char */
|
|
952
|
+
"./utils/get-char.js");function i(e){var t=Object(r.default)(e%62),n=Math.floor(e/62);return n>0?i(n)+t:t}},"./utils/get-char.js":
|
|
953
|
+
/*!***************************!*\
|
|
954
|
+
!*** ./utils/get-char.js ***!
|
|
955
|
+
\***************************/
|
|
956
|
+
/*! exports provided: default */
|
|
957
|
+
function(e,t,n){function r(e){var t,n=e;return n>9?(t=65+n-10)>90&&(t+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?r(n+1):String.fromCharCode(t)}n.r(t),n.d(t,"default",(function(){return r}))},"./utils/hypercube-util.js":
|
|
958
|
+
/*!*********************************!*\
|
|
959
|
+
!*** ./utils/hypercube-util.js ***!
|
|
960
|
+
\*********************************/
|
|
961
|
+
/*! exports provided: default */
|
|
962
|
+
function(e,t,n){n.r(t);var r=n(
|
|
963
|
+
/*! . */
|
|
964
|
+
"./utils/index.js"),i=n(
|
|
965
|
+
/*! ./wrap-file-name */
|
|
966
|
+
"./utils/wrap-file-name.js");t.default={getNumDimensions:function(e){return r.default.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return r.default.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:i.default,getItemLabel:function(e){return e.label||e.name}}},"./utils/index.js":
|
|
967
|
+
/*!************************!*\
|
|
968
|
+
!*** ./utils/index.js ***!
|
|
969
|
+
\************************/
|
|
970
|
+
/*! exports provided: default */
|
|
971
|
+
function(e,t,n){n.r(t);var r=n(
|
|
972
|
+
/*! ./generate-id */
|
|
973
|
+
"./utils/generate-id.js");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.default={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:r.default}},"./utils/number-format-util.js":
|
|
974
|
+
/*!*************************************!*\
|
|
975
|
+
!*** ./utils/number-format-util.js ***!
|
|
976
|
+
\*************************************/
|
|
977
|
+
/*! exports provided: default */
|
|
978
|
+
function(e,t,n){n.r(t),t.default={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}}},"./utils/wrap-file-name.js":
|
|
979
|
+
/*!*********************************!*\
|
|
980
|
+
!*** ./utils/wrap-file-name.js ***!
|
|
981
|
+
\*********************************/
|
|
982
|
+
/*! exports provided: default */
|
|
983
|
+
function(e,t,n){function r(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}n.r(t),n.d(t,"default",(function(){return r}))}})}))}(xZ);var wZ=gg(xZ.exports);function MZ(e){if("custom"===e.dimensionAxis.axisDisplayMode){var t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length,r=e.dimensionAxis.maxVisibleItems;r<1?e.dimensionAxis.maxVisibleItems=10:r>1e4/(n+t)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(n+t))))}}var kZ=function(e){return{get:function(t,n,r){return Yg.continuous(r.layout)?e:t(n.type)},set:function(e,t,n){var r=Jg(n.type,n);t(n.type,e,r)}}},SZ=function(e){return e&&!Yg.continuous(e)&&Yg.stacked(e)},CZ=function(e){var t=e.translator,n=e.flags,r={uses:"settings",items:{general:{items:{showDisclaimer:null!=n&&n.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{boxStyling:{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"bar",ref:"components",defaultValues:function(e){var t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length;return{key:"bar",style:{width:"grouped"===e.barGrouping.grouping&&n>0&&t+n>2?.9:.7,strokeColor:{index:-1,color:"#205891"},strokeWidth:"none"}}},items:{bar:{components:"items",type:"items",uses:"styling.box",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:function(e){return"none"!==e.style.strokeWidth}},width:{show:function(e,t,n){return!Yg.continuous(n.layout)},component:"slider",min:.01,max:1,step:.01,defaultValue:.7}}}}},grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:function(e){var t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length;return n>0&&t+n>2},change:function(e,t){t.getDimensions().length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"},readOnly:function(e,t,n){return Yg.continuous(n.layout)},convertFunctions:kZ("stacked")},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:function(e,t,n){return Yg.continuous(n.layout)},convertFunctions:kZ("vertical")},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(QY.OPTIONS).map((function(e){return QY.OPTIONS[e]})),defaultValue:QY.DEFAULT.value},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:function(e,t,n){return!Yg.continuous(n.layout)}}}},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:function(e){return e.gridLine&&!e.gridLine.auto}}}},valueLabels:{type:"items",snapshot:{tid:"property-valueLabels"},items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,label:function(e,n){return function(e,t,n){return n&&n.get(SZ(t.layout)?"properties.on":"Common.Auto")}(0,n,t)}},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:function(e,t,n){return e.dataPoint.showLabels&&SZ(n.layout)}},showTotalLabels:{ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:function(e,t,n){return e.dataPoint.showLabels&&SZ(n.layout)}}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:function(e,t,r){return n&&n.isEnabled("BC_XAXIS_MODE")&&!Yg.continuous(r.layout)},items:{axisDisplayMode:{ref:"dimensionAxis.axisDisplayMode",type:"string",translation:"properties.axis.displaymode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{ref:"dimensionAxis.maxVisibleItems",translation:"properties.axis.maxvisiblevalues",expression:"optional",type:"integer",invalid:function(e){var t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length,r=e.dimensionAxis.maxVisibleItems;return r<0||r>1e4/(n+t)},globalChange:MZ,defaultValue:10,show:function(e){return"custom"===e.dimensionAxis.axisDisplayMode}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint",style:"hint",show:function(e){return["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{items:{miniChart:null}}}},measureAxis:{uses:"axis.flippableMeasureAxis"},tooltip:{uses:"tooltip"}}};return null!=n&&n.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(r.items.dimensionAxis.items.othersGroup={items:{label:{options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]}}}),r},qZ={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:function(e,t,n){return 1===n.getMeasures().length&&2===n.getDimensions().length&&0===e},items:{autoSort:{change:function(e){nb(e)}}}}}}}},EZ=function(e){var t=e.translator,n=e.flags;return{uses:"data",items:{dimensions:{items:{nullSuppression:{show:function(e,t,n){var r=function(e,t){return t.properties&&t.properties.qHyperCubeDef.qDimensions[0]===e}(e,t),i=Yg.continuous(n.layout);return!(r&&i)}}}},measures:{items:{trendLines:_X({translator:t,allowStackedByDimension:n&&n.isEnabled("TRENDLINES_STACKED_DIM")})}}}}};function TZ(e){var t=e.translator,n=e.flags,r=function(e){return{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:e&&e.isEnabled("DIM_REF_LINES")?{uses:"dimReflines"}:void 0}}}(n);return{type:"items",component:"accordion",items:{data:EZ({translator:t,flags:n}),sorting:qZ,addons:r,settings:CZ({translator:t,flags:n})}}}function DZ(e){var t={},n=wH(e,"components"),r=wH(e,"dimensionAxis.axisDisplayMode"),i=wH(e,"dimensionAxis.maxVisibleItems"),o=n?n.filter((function(e){return"bar"===e.key}))[0]:void 0,a=wH(e,"tooltip");if(o&&o.style&&Object.keys(o.style).forEach((function(e){t["chart_style_".concat(e)]=o.style[e]})),i&&(t.chart_dimaxis_maxVisibleItems=i),r&&(t.chart_dimaxis_axisDisplayMode=r),a){t.chart_tooltip_custom=!a.auto;var s=wH(a,"chart.object.refId");!a.auto&&s&&(t.chart_tooltip_custom_mini_chart=s)}return t}var OZ=function(e){return!!(e&&e.qHyperCube.qSize.qcy>0)},NZ={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function _Z(e){var t=[];return Object.keys(NZ).forEach((function(n){e.isEnabled(n)&&t.push(NZ[n])})),t}function AZ(e){var t=e.flags;return{definition:TZ(e),softDefinition:{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked:function(e,t){var n=t.qHyperCubeDef.qMeasures.length,r=t.qHyperCubeDef.qDimensions.length;return 1===n&&2===r&&0===e}}}}}},presentation:{uses:"presentation",items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:function(e,t){return e.qHyperCubeDef.qMeasures.length+e.qHyperCubeDef.qDimensions.length>2&&!Yg.continuous(t)},change:function(e){e.qHyperCubeDef.qDimensions.length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:function(e,t){return!Yg.continuous(t)}}}},color:{uses:"color"}}},support:{snapshot:OZ,export:OZ,exportData:!0,sharing:OZ,viewData:!0,effects:!0,modifiers:_Z(t)},importProperties:function(t,n,r,i){var o={layout:{templateId:n.templateId}};r.mapProperties(o);var a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=wZ.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:yG(e),defaultPropertyValues:a,hypercubePath:i}),u=s.qProperty;return u.qHyperCubeDef.qDimensions.length>1&&"stacked"===u.barGrouping.grouping&&(u.qHyperCubeDef.qMode="K"),s},exportProperties:function(e,t,n){return wZ.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:function(e){return e.qExtendsId||(function(e){e.qHyperCubeDef.qDimensions.forEach(nb)}(e),function(e){var t=e.properties,n=t.scrollbar,r=t.dimensionAxis,i=t.preferContinuousAxis,o=t.showMiniChartForContinuousAxis;if(!n&&!1===o){var a=r.continuousAuto;(a||!a&&i)&&(t.scrollbar=QY.OPTIONS.NONE.value)}}({properties:e})),e}},extendMetrics:DZ}}return function(t){var r=k$();return{qae:bG(t),ext:AZ(t),component:function(){var i=wG({env:t}),o=MG(),a=o.viewState,s=o.viewCache,u=function(t){var n=t.picasso,r=e.useElement(),i=e.useOptions(),o=y(e.useState(),2),a=o[0],s=o[1];return e.useEffect((function(){if(!n)return function(){};r.style.overflow="hidden";var e=n({renderer:{prio:[(null==i?void 0:i.renderer)||"canvas"]},style:{"$font-family":"QlikView Sans, sans-serif"}}).chart({element:r,data:[],settings:{}});s(e);var t=e.destroy;return function(){t()}}),[i.renderer]),a}({picasso:r}),l=QX({picasso:r,chart:u,environment:i,viewState:a,viewCache:s});bZ({picasso:r,chart:u,services:l,environment:i,viewState:a,viewCache:s}),function(t){var r=t.services,i=t.chart,o=t.viewState;e.onTakeSnapshot((function(e){if(r){var t=r.layoutService,a=r.dockService,s=r.colorService,u=r.discrete,l=r.continuousDataModel,c=r.reducedDataModel,f=a.meta.chart.size,d=f.width,h=f.height;return e.snapshotData=e.snapshotData||{},e.snapshotData.content={size:{w:d,h:h}},t.meta.isSnapshot?Promise.resolve():(e.snapshotData.content.chartData={scrollOffset:o.get("scrollOffset"),zoom:o.get("zoom"),legendScrollOffset:Kg(i,zX.COMPONENT.LEGEND_COLOR_CAT)},t.meta.isDiscrete?(u.command.setSnapshotData(e),c.setSnapshotData(e)):l.setSnapshotData(e),s.getMain().getSnapshotData().then((function(t){e.snapshotData.content.chartData=n(n({},e.snapshotData.content.chartData),t)})).catch((function(){})))}})),e.useImperativeHandle((function(){return{getViewState:function(){if(o&&i)return{scrollOffset:o.get("scrollOffset"),zoom:o.get("zoom"),legendScrollOffset:Kg(i,zX.COMPONENT.LEGEND_COLOR_CAT)}}}}),[o,i])}({services:l,chart:u,viewState:a})}}}}));
|