@nebula.js/sn-waterfall 0.36.8 → 1.0.2
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/README.md +1 -5
- package/api-specifications/api.md +0 -99
- package/api-specifications/properties.json +48 -63
- package/core/esm/index.js +4 -6
- package/core/esm/index.js.map +1 -1
- package/dist/sn-waterfall.js +7 -9
- package/dist/sn-waterfall.js.map +1 -1
- package/dist/sn-waterfall.systemjs.js +6 -8
- package/dist/sn-waterfall.systemjs.js.map +1 -1
- package/package.json +7 -6
- package/sn-waterfall-ext/dist/sn-waterfall.js +27 -0
- package/sn-waterfall-ext/sn-waterfall.js +1 -0
- package/sn-waterfall-ext/sn-waterfall.qext +9 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @nebula.js/sn-waterfall v1.0.1
|
|
3
|
+
* Copyright (c) 2025 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-waterfall"]=t(e.stardust)}(this,(function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,i={exports:{}},r=i.exports;
|
|
8
|
+
/*!
|
|
9
|
+
* jQuery JavaScript Library v3.7.1
|
|
10
|
+
* https://jquery.com/
|
|
11
|
+
*
|
|
12
|
+
* Copyright OpenJS Foundation and other contributors
|
|
13
|
+
* Released under the MIT license
|
|
14
|
+
* https://jquery.org/license
|
|
15
|
+
*
|
|
16
|
+
* Date: 2023-08-28T13:37Z
|
|
17
|
+
*/var o=(n||(n=1,function(e){!function(t,n){e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}}("undefined"!=typeof window?window:r,(function(e,t){var n=[],i=Object.getPrototypeOf,r=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},s=n.push,a=n.indexOf,l={},c=l.toString,u=l.hasOwnProperty,h=u.toString,d=h.call(Object),f={},p=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},g=function(e){return null!=e&&e===e.window},m=e.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function v(e,t,n){var i,r,o=(n=n||m).createElement("script");if(o.text=e,t)for(i in y)(r=t[i]||t.getAttribute&&t.getAttribute(i))&&o.setAttribute(i,r);n.head.appendChild(o).parentNode.removeChild(o)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var x="3.7.1",w=/HTML$/i,k=function(e,t){return new k.fn.init(e,t)};function M(e){var t=!!e&&"length"in e&&e.length,n=b(e);return!p(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function _(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}k.fn=k.prototype={jquery:x,constructor:k,length:0,toArray:function(){return r.call(this)},get:function(e){return null==e?r.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(k.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(k.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},k.extend=k.fn.extend=function(){var e,t,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||p(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)i=e[t],"__proto__"!==t&&s!==i&&(c&&i&&(k.isPlainObject(i)||(r=Array.isArray(i)))?(n=s[t],o=r&&!Array.isArray(n)?[]:r||k.isPlainObject(n)?n:{},r=!1,s[t]=k.extend(c,o,i)):void 0!==i&&(s[t]=i));return s},k.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e)||(t=i(e))&&("function"!=typeof(n=u.call(t,"constructor")&&t.constructor)||h.call(n)!==d))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){v(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,i=0;if(M(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},text:function(e){var t,n="",i=0,r=e.nodeType;if(!r)for(;t=e[i++];)n+=k.text(t);return 1===r||11===r?e.textContent:9===r?e.documentElement.textContent:3===r||4===r?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?k.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:a.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!w.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,o=e.length,s=!n;r<o;r++)!t(e[r],r)!==s&&i.push(e[r]);return i},map:function(e,t,n){var i,r,s=0,a=[];if(M(e))for(i=e.length;s<i;s++)null!=(r=t(e[s],s,n))&&a.push(r);else for(s in e)null!=(r=t(e[s],s,n))&&a.push(r);return o(a)},guid:1,support:f}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=n[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){l["[object "+t+"]"]=t.toLowerCase()}));var S=n.pop,q=n.sort,D=n.splice,A="[\\x20\\t\\r\\n\\f]",E=new RegExp("^"+A+"+|((?:^|[^\\\\])(?:\\\\.)*)"+A+"+$","g");k.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var C=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function T(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}k.escapeSelector=function(e){return(e+"").replace(C,T)};var N=m,R=s;!function(){var t,i,o,s,l,c,h,d,p,g,m=R,y=k.expando,v=0,b=0,x=ee(),w=ee(),M=ee(),C=ee(),T=function(e,t){return e===t&&(l=!0),0},O="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="(?:\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",L="\\["+A+"*("+I+")(?:"+A+"*([*^$|!~]?=)"+A+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+A+"*\\]",P=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+L+")*)|.*)\\)|)",j=new RegExp(A+"+","g"),z=new RegExp("^"+A+"*,"+A+"*"),F=new RegExp("^"+A+"*([>+~]|"+A+")"+A+"*"),H=new RegExp(A+"|>"),V=new RegExp(P),B=new RegExp("^"+I+"$"),$={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+L),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+A+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+A+"*((?:-\\d)?\\d*)"+A+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,U=/^h\d$/i,Y=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,K=new RegExp("\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\([^\\r\\n\\f])","g"),G=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){le()},Z=de((function(e){return!0===e.disabled&&_(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(n=r.call(N.childNodes),N.childNodes),n[N.childNodes.length].nodeType}catch(e){m={apply:function(e,t){R.apply(e,r.call(t))},call:function(e){R.apply(e,r.call(arguments,1))}}}function Q(e,t,n,i){var r,o,s,a,l,u,h,g=t&&t.ownerDocument,v=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==v&&9!==v&&11!==v)return n;if(!i&&(le(t),t=t||c,d)){if(11!==v&&(l=Y.exec(e)))if(r=l[1]){if(9===v){if(!(s=t.getElementById(r)))return n;if(s.id===r)return m.call(n,s),n}else if(g&&(s=g.getElementById(r))&&Q.contains(t,s)&&s.id===r)return m.call(n,s),n}else{if(l[2])return m.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&t.getElementsByClassName)return m.apply(n,t.getElementsByClassName(r)),n}if(!(C[e+" "]||p&&p.test(e))){if(h=e,g=t,1===v&&(H.test(e)||F.test(e))){for((g=X.test(e)&&ae(t.parentNode)||t)==t&&f.scope||((a=t.getAttribute("id"))?a=k.escapeSelector(a):t.setAttribute("id",a=y)),o=(u=ue(e)).length;o--;)u[o]=(a?"#"+a:":scope")+" "+he(u[o]);h=u.join(",")}try{return m.apply(n,g.querySelectorAll(h)),n}catch(t){C(e,!0)}finally{a===y&&t.removeAttribute("id")}}}return ve(e.replace(E,"$1"),t,n,i)}function ee(){var e=[];return function t(n,r){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function te(e){return e[y]=!0,e}function ne(e){var t=c.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e){return function(t){return _(t,"input")&&t.type===e}}function re(e){return function(t){return(_(t,"input")||_(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Z(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function se(e){return te((function(t){return t=+t,te((function(n,i){for(var r,o=e([],n.length,t),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))}))}))}function ae(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var t,n=e?e.ownerDocument||e:N;return n!=c&&9===n.nodeType&&n.documentElement?(h=(c=n).documentElement,d=!k.isXMLDoc(c),g=h.matches||h.webkitMatchesSelector||h.msMatchesSelector,h.msMatchesSelector&&N!=c&&(t=c.defaultView)&&t.top!==t&&t.addEventListener("unload",J),f.getById=ne((function(e){return h.appendChild(e).id=k.expando,!c.getElementsByName||!c.getElementsByName(k.expando).length})),f.disconnectedMatch=ne((function(e){return g.call(e,"*")})),f.scope=ne((function(){return c.querySelectorAll(":scope")})),f.cssHas=ne((function(){try{return c.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),f.getById?(i.filter.ID=function(e){var t=e.replace(K,G);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var t=e.replace(K,G);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n,i,r,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),i.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},i.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&d)return t.getElementsByClassName(e)},p=[],ne((function(e){var t;h.appendChild(e).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||p.push("\\["+A+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+y+"-]").length||p.push("~="),e.querySelectorAll("a#"+y+"+*").length||p.push(".#.+[+~]"),e.querySelectorAll(":checked").length||p.push(":checked"),(t=c.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(t=c.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||p.push("\\["+A+"*name"+A+"*="+A+"*(?:''|\"\")")})),f.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),T=function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!f.sortDetached&&t.compareDocumentPosition(e)===n?e===c||e.ownerDocument==N&&Q.contains(N,e)?-1:t===c||t.ownerDocument==N&&Q.contains(N,t)?1:s?a.call(s,e)-a.call(s,t):0:4&n?-1:1)},c):c}for(t in Q.matches=function(e,t){return Q(e,null,null,t)},Q.matchesSelector=function(e,t){if(le(e),d&&!C[t+" "]&&(!p||!p.test(t)))try{var n=g.call(e,t);if(n||f.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){C(t,!0)}return Q(t,c,null,[e]).length>0},Q.contains=function(e,t){return(e.ownerDocument||e)!=c&&le(e),k.contains(e,t)},Q.attr=function(e,t){(e.ownerDocument||e)!=c&&le(e);var n=i.attrHandle[t.toLowerCase()],r=n&&u.call(i.attrHandle,t.toLowerCase())?n(e,t,!d):void 0;return void 0!==r?r:e.getAttribute(t)},Q.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},k.uniqueSort=function(e){var t,n=[],i=0,o=0;if(l=!f.sortStable,s=!f.sortStable&&r.call(e,0),q.call(e,T),l){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)D.call(e,n[i],1)}return s=null,e},k.fn.uniqueSort=function(){return this.pushStack(k.uniqueSort(r.apply(this)))},i=k.expr={cacheLength:50,createPseudo:te,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(K,G),e[3]=(e[3]||e[4]||e[5]||"").replace(K,G),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Q.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Q.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=ue(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(K,G).toLowerCase();return"*"===e?function(){return!0}:function(e){return _(e,t)}},CLASS:function(e){var t=x[e+" "];return t||(t=new RegExp("(^|"+A+")"+e+"("+A+"|$)"))&&x(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(i){var r=Q.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(j," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,h,d,f,p=o!==s?"nextSibling":"previousSibling",g=t.parentNode,m=a&&t.nodeName.toLowerCase(),b=!l&&!a,x=!1;if(g){if(o){for(;p;){for(h=t;h=h[p];)if(a?_(h,m):1===h.nodeType)return!1;f=p="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&b){for(x=(d=(c=(u=g[y]||(g[y]={}))[e]||[])[0]===v&&c[1])&&c[2],h=d&&g.childNodes[d];h=++d&&h&&h[p]||(x=d=0)||f.pop();)if(1===h.nodeType&&++x&&h===t){u[e]=[v,d,x];break}}else if(b&&(x=d=(c=(u=t[y]||(t[y]={}))[e]||[])[0]===v&&c[1]),!1===x)for(;(h=++d&&h&&h[p]||(x=d=0)||f.pop())&&(!(a?_(h,m):1===h.nodeType)||!++x||(b&&((u=h[y]||(h[y]={}))[e]=[v,x]),h!==t)););return(x-=r)===i||x%i===0&&x/i>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||Q.error("unsupported pseudo: "+e);return r[y]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,n){for(var i,o=r(e,t),s=o.length;s--;)e[i=a.call(e,o[s])]=!(n[i]=o[s])})):function(e){return r(e,0,n)}):r}},pseudos:{not:te((function(e){var t=[],n=[],i=ye(e.replace(E,"$1"));return i[y]?te((function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return Q(e,t).length>0}})),contains:te((function(e){return e=e.replace(K,G),function(t){return(t.textContent||k.text(t)).indexOf(e)>-1}})),lang:te((function(e){return B.test(e||"")||Q.error("unsupported lang: "+e),e=e.replace(K,G).toLowerCase(),function(t){var n;do{if(n=d?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===function(){try{return c.activeElement}catch(e){}}()&&c.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return _(e,"input")&&!!e.checked||_(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return U.test(e.nodeName)},input:function(e){return W.test(e.nodeName)},button:function(e){return _(e,"input")&&"button"===e.type||_(e,"button")},text:function(e){var t;return _(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:se((function(){return[0]})),last:se((function(e,t){return[t-1]})),eq:se((function(e,t,n){return[n<0?n+t:n]})),even:se((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:se((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:se((function(e,t,n){var i;for(i=n<0?n+t:n>t?t:n;--i>=0;)e.push(i);return e})),gt:se((function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e}))}},i.pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=ie(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=re(t);function ce(){}function ue(e,t){var n,r,o,s,a,l,c,u=w[e+" "];if(u)return t?0:u.slice(0);for(a=e,l=[],c=i.preFilter;a;){for(s in n&&!(r=z.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),n=!1,(r=F.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(E," ")}),a=a.slice(n.length)),i.filter)!(r=$[s].exec(a))||c[s]&&!(r=c[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?Q.error(e):w(e,l).slice(0)}function he(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function de(e,t,n){var i=t.dir,r=t.next,o=r||i,s=n&&"parentNode"===o,a=b++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||s)return e(t,n,r);return!1}:function(t,n,l){var c,u,h=[v,a];if(l){for(;t=t[i];)if((1===t.nodeType||s)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||s)if(u=t[y]||(t[y]={}),r&&_(t,r))t=t[i]||t;else{if((c=u[o])&&c[0]===v&&c[1]===a)return h[2]=c[2];if(u[o]=h,h[2]=e(t,n,l))return!0}return!1}}function fe(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function pe(e,t,n,i,r){for(var o,s=[],a=0,l=e.length,c=null!=t;a<l;a++)(o=e[a])&&(n&&!n(o,i,r)||(s.push(o),c&&t.push(a)));return s}function ge(e,t,n,i,r,o){return i&&!i[y]&&(i=ge(i)),r&&!r[y]&&(r=ge(r,o)),te((function(o,s,l,c){var u,h,d,f,p=[],g=[],y=s.length,v=o||function(e,t,n){for(var i=0,r=t.length;i<r;i++)Q(e,t[i],n);return n}(t||"*",l.nodeType?[l]:l,[]),b=!e||!o&&t?v:pe(v,p,e,l,c);if(n?n(b,f=r||(o?e:y||i)?[]:s,l,c):f=b,i)for(u=pe(f,g),i(u,[],l,c),h=u.length;h--;)(d=u[h])&&(f[g[h]]=!(b[g[h]]=d));if(o){if(r||e){if(r){for(u=[],h=f.length;h--;)(d=f[h])&&u.push(b[h]=d);r(null,f=[],u,c)}for(h=f.length;h--;)(d=f[h])&&(u=r?a.call(o,d):p[h])>-1&&(o[u]=!(s[u]=d))}}else f=pe(f===s?f.splice(y,f.length):f),r?r(null,s,f,c):m.apply(s,f)}))}function me(e){for(var t,n,r,s=e.length,l=i.relative[e[0].type],c=l||i.relative[" "],u=l?1:0,h=de((function(e){return e===t}),c,!0),d=de((function(e){return a.call(t,e)>-1}),c,!0),f=[function(e,n,i){var r=!l&&(i||n!=o)||((t=n).nodeType?h(e,n,i):d(e,n,i));return t=null,r}];u<s;u++)if(n=i.relative[e[u].type])f=[de(fe(f),n)];else{if((n=i.filter[e[u].type].apply(null,e[u].matches))[y]){for(r=++u;r<s&&!i.relative[e[r].type];r++);return ge(u>1&&fe(f),u>1&&he(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(E,"$1"),n,u<r&&me(e.slice(u,r)),r<s&&me(e=e.slice(r)),r<s&&he(e))}f.push(n)}return fe(f)}function ye(e,t){var n,r=[],s=[],a=M[e+" "];if(!a){for(t||(t=ue(e)),n=t.length;n--;)(a=me(t[n]))[y]?r.push(a):s.push(a);a=M(e,function(e,t){var n=t.length>0,r=e.length>0,s=function(s,a,l,u,h){var f,p,g,y=0,b="0",x=s&&[],w=[],M=o,_=s||r&&i.find.TAG("*",h),q=v+=null==M?1:Math.random()||.1,D=_.length;for(h&&(o=a==c||a||h);b!==D&&null!=(f=_[b]);b++){if(r&&f){for(p=0,a||f.ownerDocument==c||(le(f),l=!d);g=e[p++];)if(g(f,a||c,l)){m.call(u,f);break}h&&(v=q)}n&&((f=!g&&f)&&y--,s&&x.push(f))}if(y+=b,n&&b!==y){for(p=0;g=t[p++];)g(x,w,a,l);if(s){if(y>0)for(;b--;)x[b]||w[b]||(w[b]=S.call(u));w=pe(w)}m.apply(u,w),h&&!s&&w.length>0&&y+t.length>1&&k.uniqueSort(u)}return h&&(v=q,o=M),x};return n?te(s):s}(s,r)),a.selector=e}return a}function ve(e,t,n,r){var o,s,a,l,c,u="function"==typeof e&&e,h=!r&&ue(e=u.selector||e);if(n=n||[],1===h.length){if((s=h[0]=h[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===t.nodeType&&d&&i.relative[s[1].type]){if(!(t=(i.find.ID(a.matches[0].replace(K,G),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(s.shift().value.length)}for(o=$.needsContext.test(e)?0:s.length;o--&&(a=s[o],!i.relative[l=a.type]);)if((c=i.find[l])&&(r=c(a.matches[0].replace(K,G),X.test(s[0].type)&&ae(t.parentNode)||t))){if(s.splice(o,1),!(e=r.length&&he(s)))return m.apply(n,r),n;break}}return(u||ye(e,h))(r,t,!d,n,!t||X.test(e)&&ae(t.parentNode)||t),n}ce.prototype=i.filters=i.pseudos,i.setFilters=new ce,f.sortStable=y.split("").sort(T).join("")===y,le(),f.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(c.createElement("fieldset"))})),k.find=Q,k.expr[":"]=k.expr.pseudos,k.unique=k.uniqueSort,Q.compile=ye,Q.select=ve,Q.setDocument=le,Q.tokenize=ue,Q.escape=k.escapeSelector,Q.getText=k.text,Q.isXML=k.isXMLDoc,Q.selectors=k.expr,Q.support=k.support,Q.uniqueSort=k.uniqueSort}();var O=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&k(e).is(n))break;i.push(e)}return i},I=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},L=k.expr.match.needsContext,P=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return p(t)?k.grep(e,(function(e,i){return!!t.call(e,i,e)!==n})):t.nodeType?k.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?k.grep(e,(function(e){return a.call(t,e)>-1!==n})):k.filter(t,e,n)}k.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?k.find.matchesSelector(i,e)?[i]:[]:k.find.matches(e,k.grep(t,(function(e){return 1===e.nodeType})))},k.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(k(e).filter((function(){for(t=0;t<i;t++)if(k.contains(r[t],this))return!0})));for(n=this.pushStack([]),t=0;t<i;t++)k.find(e,r[t],n);return i>1?k.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&L.test(e)?k(e):e||[],!1).length}});var z,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=k.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||z,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:F.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:m,!0)),P.test(i[1])&&k.isPlainObject(t))for(i in t)p(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=m.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):p(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)};H.prototype=k.fn,z=k(m);var V=/^(?:parents|prev(?:Until|All))/,B={children:!0,contents:!0,next:!0,prev:!0};function $(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0}))},closest:function(e,t){var n,i=0,r=this.length,o=[],s="string"!=typeof e&&k(e);if(!L.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?a.call(k(e),this[0]):a.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return O(e,"parentNode")},parentsUntil:function(e,t,n){return O(e,"parentNode",n)},next:function(e){return $(e,"nextSibling")},prev:function(e){return $(e,"previousSibling")},nextAll:function(e){return O(e,"nextSibling")},prevAll:function(e){return O(e,"previousSibling")},nextUntil:function(e,t,n){return O(e,"nextSibling",n)},prevUntil:function(e,t,n){return O(e,"previousSibling",n)},siblings:function(e){return I((e.parentNode||{}).firstChild,e)},children:function(e){return I(e.firstChild)},contents:function(e){return null!=e.contentDocument&&i(e.contentDocument)?e.contentDocument:(_(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},(function(e,t){k.fn[e]=function(n,i){var r=k.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=k.filter(i,r)),this.length>1&&(B[e]||k.uniqueSort(r),V.test(e)&&r.reverse()),this.pushStack(r)}}));var W=/[^\x20\t\r\n\f]+/g;function U(e){return e}function Y(e){throw e}function X(e,t,n,i){var r;try{e&&p(r=e.promise)?r.call(e).done(t).fail(n):e&&p(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return k.each(e.match(W)||[],(function(e,n){t[n]=!0})),t}(e):k.extend({},e);var t,n,i,r,o=[],s=[],a=-1,l=function(){for(r=r||e.once,i=t=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=o.length,n=!1);e.memory||(n=!1),t=!1,r&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(a=o.length-1,s.push(n)),function t(n){k.each(n,(function(n,i){p(i)?e.unique&&c.has(i)||o.push(i):i&&i.length&&"string"!==b(i)&&t(i)}))}(arguments),n&&!t&&l()),this},remove:function(){return k.each(arguments,(function(e,t){for(var n;(n=k.inArray(t,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(e){return e?k.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},k.extend({Deferred:function(t){var n=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return k.Deferred((function(t){k.each(n,(function(n,i){var r=p(e[i[4]])&&e[i[4]];o[i[1]]((function(){var e=r&&r.apply(this,arguments);e&&p(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(t,i,r){var o=0;function s(t,n,i,r){return function(){var a=this,l=arguments,c=function(){var e,c;if(!(t<o)){if((e=i.apply(a,l))===n.promise())throw new TypeError("Thenable self-resolution");c=e&&("object"==typeof e||"function"==typeof e)&&e.then,p(c)?r?c.call(e,s(o,n,U,r),s(o,n,Y,r)):(o++,c.call(e,s(o,n,U,r),s(o,n,Y,r),s(o,n,U,n.notifyWith))):(i!==U&&(a=void 0,l=[e]),(r||n.resolveWith)(a,l))}},u=r?c:function(){try{c()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,u.error),t+1>=o&&(i!==Y&&(a=void 0,l=[e]),n.rejectWith(a,l))}};t?u():(k.Deferred.getErrorHook?u.error=k.Deferred.getErrorHook():k.Deferred.getStackHook&&(u.error=k.Deferred.getStackHook()),e.setTimeout(u))}}return k.Deferred((function(e){n[0][3].add(s(0,e,p(r)?r:U,e.notifyWith)),n[1][3].add(s(0,e,p(t)?t:U)),n[2][3].add(s(0,e,p(i)?i:Y))})).promise()},promise:function(e){return null!=e?k.extend(e,r):r}},o={};return k.each(n,(function(e,t){var s=t[2],a=t[5];r[t[1]]=s.add,a&&s.add((function(){i=a}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),s.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=s.fireWith})),r.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),o=r.call(arguments),s=k.Deferred(),a=function(e){return function(n){i[e]=this,o[e]=arguments.length>1?r.call(arguments):n,--t||s.resolveWith(i,o)}};if(t<=1&&(X(e,s.done(a(n)).resolve,s.reject,!t),"pending"===s.state()||p(o[n]&&o[n].then)))return s.then();for(;n--;)X(o[n],a(n),s.reject);return s.promise()}});var K=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&K.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},k.readyException=function(t){e.setTimeout((function(){throw t}))};var G=k.Deferred();function J(){m.removeEventListener("DOMContentLoaded",J),e.removeEventListener("load",J),k.ready()}k.fn.ready=function(e){return G.then(e).catch((function(e){k.readyException(e)})),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==e&&--k.readyWait>0||G.resolveWith(m,[k]))}}),k.ready.then=G.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?e.setTimeout(k.ready):(m.addEventListener("DOMContentLoaded",J),e.addEventListener("load",J));var Z=function(e,t,n,i,r,o,s){var a=0,l=e.length,c=null==n;if("object"===b(n))for(a in r=!0,n)Z(e,t,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,p(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(k(e),n)})),t))for(;a<l;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return r?e:c?t.call(e):l?t(e[0],n):o},Q=/^-ms-/,ee=/-([a-z])/g;function te(e,t){return t.toUpperCase()}function ne(e){return e.replace(Q,"ms-").replace(ee,te)}var ie=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function re(){this.expando=k.expando+re.uid++}re.uid=1,re.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ie(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[ne(t)]=n;else for(i in t)r[ne(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][ne(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(ne):(t=ne(t))in i?[t]:t.match(W)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||k.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var oe=new re,se=new re,ae=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,le=/[A-Z]/g;function ce(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(le,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ae.test(e)?JSON.parse(e):e)}(n)}catch(e){}se.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return se.hasData(e)||oe.hasData(e)},data:function(e,t,n){return se.access(e,t,n)},removeData:function(e,t){se.remove(e,t)},_data:function(e,t,n){return oe.access(e,t,n)},_removeData:function(e,t){oe.remove(e,t)}}),k.fn.extend({data:function(e,t){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(r=se.get(o),1===o.nodeType&&!oe.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=ne(i.slice(5)),ce(o,i,r[i]));oe.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each((function(){se.set(this,e)})):Z(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=se.get(o,e))||void 0!==(n=ce(o,e))?n:void 0;this.each((function(){se.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){se.remove(this,e)}))}}),k.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=oe.get(e,t),n&&(!i||Array.isArray(n)?i=oe.access(e,t,k.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),i=n.length,r=n.shift(),o=k._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,(function(){k.dequeue(e,t)}),o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return oe.get(e,n)||oe.access(e,n,{empty:k.Callbacks("once memory").add((function(){oe.remove(e,[t+"queue",n])}))})}}),k.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?k.queue(this[0],e):void 0===t?this:this.each((function(){var n=k.queue(this,e,t);k._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&k.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){k.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=k.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=oe.get(o[s],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(t)}});var ue=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,he=new RegExp("^(?:([+-])=|)("+ue+")([a-z%]*)$","i"),de=["Top","Right","Bottom","Left"],fe=m.documentElement,pe=function(e){return k.contains(e.ownerDocument,e)},ge={composed:!0};fe.getRootNode&&(pe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(ge)===e.ownerDocument});var me=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&pe(e)&&"none"===k.css(e,"display")};function ye(e,t,n,i){var r,o,s=20,a=i?function(){return i.cur()}:function(){return k.css(e,t,"")},l=a(),c=n&&n[3]||(k.cssNumber[t]?"":"px"),u=e.nodeType&&(k.cssNumber[t]||"px"!==c&&+l)&&he.exec(k.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)k.style(e,t,u+c),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),u/=o;u*=2,k.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}var ve={};function be(e){var t,n=e.ownerDocument,i=e.nodeName,r=ve[i];return r||(t=n.body.appendChild(n.createElement(i)),r=k.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),ve[i]=r,r)}function xe(e,t){for(var n,i,r=[],o=0,s=e.length;o<s;o++)(i=e[o]).style&&(n=i.style.display,t?("none"===n&&(r[o]=oe.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&me(i)&&(r[o]=be(i))):"none"!==n&&(r[o]="none",oe.set(i,"display",n)));for(o=0;o<s;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}k.fn.extend({show:function(){return xe(this,!0)},hide:function(){return xe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){me(this)?k(this).show():k(this).hide()}))}});var we,ke,Me=/^(?:checkbox|radio)$/i,_e=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Se=/^$|^module$|\/(?:java|ecma)script/i;we=m.createDocumentFragment().appendChild(m.createElement("div")),(ke=m.createElement("input")).setAttribute("type","radio"),ke.setAttribute("checked","checked"),ke.setAttribute("name","t"),we.appendChild(ke),f.checkClone=we.cloneNode(!0).cloneNode(!0).lastChild.checked,we.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!we.cloneNode(!0).lastChild.defaultValue,we.innerHTML="<option></option>",f.option=!!we.lastChild;var qe={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function De(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&_(e,t)?k.merge([e],n):n}function Ae(e,t){for(var n=0,i=e.length;n<i;n++)oe.set(e[n],"globalEval",!t||oe.get(t[n],"globalEval"))}qe.tbody=qe.tfoot=qe.colgroup=qe.caption=qe.thead,qe.th=qe.td,f.option||(qe.optgroup=qe.option=[1,"<select multiple='multiple'>","</select>"]);var Ee=/<|&#?\w+;/;function Ce(e,t,n,i,r){for(var o,s,a,l,c,u,h=t.createDocumentFragment(),d=[],f=0,p=e.length;f<p;f++)if((o=e[f])||0===o)if("object"===b(o))k.merge(d,o.nodeType?[o]:o);else if(Ee.test(o)){for(s=s||h.appendChild(t.createElement("div")),a=(_e.exec(o)||["",""])[1].toLowerCase(),l=qe[a]||qe._default,s.innerHTML=l[1]+k.htmlPrefilter(o)+l[2],u=l[0];u--;)s=s.lastChild;k.merge(d,s.childNodes),(s=h.firstChild).textContent=""}else d.push(t.createTextNode(o));for(h.textContent="",f=0;o=d[f++];)if(i&&k.inArray(o,i)>-1)r&&r.push(o);else if(c=pe(o),s=De(h.appendChild(o),"script"),c&&Ae(s),n)for(u=0;o=s[u++];)Se.test(o.type||"")&&n.push(o);return h}var Te=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function Re(){return!1}function Oe(e,t,n,i,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)Oe(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Re;else if(!r)return e;return 1===o&&(s=r,r=function(e){return k().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=k.guid++)),e.each((function(){k.event.add(this,t,r,i,n)}))}function Ie(e,t,n){n?(oe.set(e,t,!1),k.event.add(e,t,{namespace:!1,handler:function(e){var n,i=oe.get(this,t);if(1&e.isTrigger&&this[t]){if(i)(k.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=r.call(arguments),oe.set(this,t,i),this[t](),n=oe.get(this,t),oe.set(this,t,!1),i!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else i&&(oe.set(this,t,k.event.trigger(i[0],i.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===oe.get(e,t)&&k.event.add(e,t,Ne)}k.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,c,u,h,d,f,p,g,m=oe.get(e);if(ie(e))for(n.handler&&(n=(o=n).handler,r=o.selector),r&&k.find.matchesSelector(fe,r),n.guid||(n.guid=k.guid++),(l=m.events)||(l=m.events=Object.create(null)),(s=m.handle)||(s=m.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(W)||[""]).length;c--;)f=g=(a=Te.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f&&(h=k.event.special[f]||{},f=(r?h.delegateType:h.bindType)||f,h=k.event.special[f]||{},u=k.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&k.expr.match.needsContext.test(r),namespace:p.join(".")},o),(d=l[f])||((d=l[f]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,i,p,s)||e.addEventListener&&e.addEventListener(f,s)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,u):d.push(u),k.event.global[f]=!0)},remove:function(e,t,n,i,r){var o,s,a,l,c,u,h,d,f,p,g,m=oe.hasData(e)&&oe.get(e);if(m&&(l=m.events)){for(c=(t=(t||"").match(W)||[""]).length;c--;)if(f=g=(a=Te.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(h=k.event.special[f]||{},d=l[f=(i?h.delegateType:h.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)u=d[o],!r&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(d.splice(o,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(e,u));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,p,m.handle)||k.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)k.event.remove(e,f+t[c],n,i,!0);k.isEmptyObject(l)&&oe.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=new Array(arguments.length),l=k.event.fix(e),c=(oe.get(this,"events")||Object.create(null))[l.type]||[],u=k.event.special[l.type]||{};for(a[0]=l,t=1;t<arguments.length;t++)a[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(s=k.event.handlers.call(this,l,c),t=0;(r=s[t++])&&!l.isPropagationStopped();)for(l.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(i=((k.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,i,r,o,s,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},n=0;n<l;n++)void 0===s[r=(i=t[n]).selector+" "]&&(s[r]=i.needsContext?k(r,this).index(c)>-1:k.find(r,this,null,[c]).length),s[r]&&o.push(i);o.length&&a.push({elem:c,handlers:o})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(k.Event.prototype,e,{enumerable:!0,configurable:!0,get:p(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return Me.test(t.type)&&t.click&&_(t,"input")&&Ie(t,"click",!0),!1},trigger:function(e){var t=this||e;return Me.test(t.type)&&t.click&&_(t,"input")&&Ie(t,"click"),!0},_default:function(e){var t=e.target;return Me.test(t.type)&&t.click&&_(t,"input")&&oe.get(t,"click")||_(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:Re,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Re,isPropagationStopped:Re,isImmediatePropagationStopped:Re,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},(function(e,t){function n(e){if(m.documentMode){var n=oe.get(this,"handle"),i=k.event.fix(e);i.type="focusin"===e.type?"focus":"blur",i.isSimulated=!0,n(e),i.target===i.currentTarget&&n(i)}else k.event.simulate(t,e.target,k.event.fix(e))}k.event.special[e]={setup:function(){var i;if(Ie(this,e,!0),!m.documentMode)return!1;(i=oe.get(this,t))||this.addEventListener(t,n),oe.set(this,t,(i||0)+1)},trigger:function(){return Ie(this,e),!0},teardown:function(){var e;if(!m.documentMode)return!1;(e=oe.get(this,t)-1)?oe.set(this,t,e):(this.removeEventListener(t,n),oe.remove(this,t))},_default:function(t){return oe.get(t.target,e)},delegateType:t},k.event.special[t]={setup:function(){var i=this.ownerDocument||this.document||this,r=m.documentMode?this:i,o=oe.get(r,t);o||(m.documentMode?this.addEventListener(t,n):i.addEventListener(e,n,!0)),oe.set(r,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,r=m.documentMode?this:i,o=oe.get(r,t)-1;o?oe.set(r,t,o):(m.documentMode?this.removeEventListener(t,n):i.removeEventListener(e,n,!0),oe.remove(r,t))}}})),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){k.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=e.relatedTarget,r=e.handleObj;return i&&(i===this||k.contains(this,i))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}})),k.fn.extend({on:function(e,t,n,i){return Oe(this,e,t,n,i)},one:function(e,t,n,i){return Oe(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,k(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Re),this.each((function(){k.event.remove(this,e,n,t)}))}});var Le=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function ze(e,t){return _(e,"table")&&_(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Fe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ve(e,t){var n,i,r,o,s,a;if(1===t.nodeType){if(oe.hasData(e)&&(a=oe.get(e).events))for(r in oe.remove(t,"handle events"),a)for(n=0,i=a[r].length;n<i;n++)k.event.add(t,r,a[r][n]);se.hasData(e)&&(o=se.access(e),s=k.extend({},o),se.set(t,s))}}function Be(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Me.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function $e(e,t,n,i){t=o(t);var r,s,a,l,c,u,h=0,d=e.length,g=d-1,m=t[0],y=p(m);if(y||d>1&&"string"==typeof m&&!f.checkClone&&Pe.test(m))return e.each((function(r){var o=e.eq(r);y&&(t[0]=m.call(this,r,o.html())),$e(o,t,n,i)}));if(d&&(s=(r=Ce(t,e[0].ownerDocument,!1,e,i)).firstChild,1===r.childNodes.length&&(r=s),s||i)){for(l=(a=k.map(De(r,"script"),Fe)).length;h<d;h++)c=r,h!==g&&(c=k.clone(c,!0,!0),l&&k.merge(a,De(c,"script"))),n.call(e[h],c,h);if(l)for(u=a[a.length-1].ownerDocument,k.map(a,He),h=0;h<l;h++)c=a[h],Se.test(c.type||"")&&!oe.access(c,"globalEval")&&k.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?k._evalUrl&&!c.noModule&&k._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):v(c.textContent.replace(je,""),c,u))}return e}function We(e,t,n){for(var i,r=t?k.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||k.cleanData(De(i)),i.parentNode&&(n&&pe(i)&&Ae(De(i,"script")),i.parentNode.removeChild(i));return e}k.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var i,r,o,s,a=e.cloneNode(!0),l=pe(e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(s=De(a),i=0,r=(o=De(e)).length;i<r;i++)Be(o[i],s[i]);if(t)if(n)for(o=o||De(e),s=s||De(a),i=0,r=o.length;i<r;i++)Ve(o[i],s[i]);else Ve(e,a);return(s=De(a,"script")).length>0&&Ae(s,!l&&De(e,"script")),a},cleanData:function(e){for(var t,n,i,r=k.event.special,o=0;void 0!==(n=e[o]);o++)if(ie(n)){if(t=n[oe.expando]){if(t.events)for(i in t.events)r[i]?k.event.remove(n,i):k.removeEvent(n,i,t.handle);n[oe.expando]=void 0}n[se.expando]&&(n[se.expando]=void 0)}}}),k.fn.extend({detach:function(e){return We(this,e,!0)},remove:function(e){return We(this,e)},text:function(e){return Z(this,(function(e){return void 0===e?k.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return $e(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ze(this,e).appendChild(e)}))},prepend:function(){return $e(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ze(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return $e(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return $e(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(De(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return k.clone(this,e,t)}))},html:function(e){return Z(this,(function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!qe[(_e.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(De(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return $e(this,arguments,(function(t){var n=this.parentNode;k.inArray(this,e)<0&&(k.cleanData(De(this)),n&&n.replaceChild(t,this))}),e)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){k.fn[e]=function(e){for(var n,i=[],r=k(e),o=r.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),k(r[a])[t](n),s.apply(i,n.get());return this.pushStack(i)}}));var Ue=new RegExp("^("+ue+")(?!px)[a-z%]+$","i"),Ye=/^--/,Xe=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Ke=function(e,t,n){var i,r,o={};for(r in t)o[r]=e.style[r],e.style[r]=t[r];for(r in i=n.call(e),t)e.style[r]=o[r];return i},Ge=new RegExp(de.join("|"),"i");function Je(e,t,n){var i,r,o,s,a=Ye.test(t),l=e.style;return(n=n||Xe(e))&&(s=n.getPropertyValue(t)||n[t],a&&s&&(s=s.replace(E,"$1")||void 0),""!==s||pe(e)||(s=k.style(e,t)),!f.pixelBoxStyles()&&Ue.test(s)&&Ge.test(t)&&(i=l.width,r=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=s,s=n.width,l.width=i,l.minWidth=r,l.maxWidth=o)),void 0!==s?s+"":s}function Ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",fe.appendChild(c).appendChild(u);var t=e.getComputedStyle(u);i="1%"!==t.top,l=12===n(t.marginLeft),u.style.right="60%",s=36===n(t.right),r=36===n(t.width),u.style.position="absolute",o=12===n(u.offsetWidth/3),fe.removeChild(c),u=null}}function n(e){return Math.round(parseFloat(e))}var i,r,o,s,a,l,c=m.createElement("div"),u=m.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===u.style.backgroundClip,k.extend(f,{boxSizingReliable:function(){return t(),r},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,n,i,r;return null==a&&(t=m.createElement("table"),n=m.createElement("tr"),i=m.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="box-sizing:content-box;border:1px solid",n.style.height="1px",i.style.height="9px",i.style.display="block",fe.appendChild(t).appendChild(n).appendChild(i),r=e.getComputedStyle(n),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===n.offsetHeight,fe.removeChild(t)),a}}))}();var Qe=["Webkit","Moz","ms"],et=m.createElement("div").style,tt={};function nt(e){var t=k.cssProps[e]||tt[e];return t||(e in et?e:tt[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;n--;)if((e=Qe[n]+t)in et)return e}(e)||e)}var it=/^(none|table(?!-c[ea]).+)/,rt={position:"absolute",visibility:"hidden",display:"block"},ot={letterSpacing:"0",fontWeight:"400"};function st(e,t,n){var i=he.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function at(e,t,n,i,r,o){var s="width"===t?1:0,a=0,l=0,c=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(c+=k.css(e,n+de[s],!0,r)),i?("content"===n&&(l-=k.css(e,"padding"+de[s],!0,r)),"margin"!==n&&(l-=k.css(e,"border"+de[s]+"Width",!0,r))):(l+=k.css(e,"padding"+de[s],!0,r),"padding"!==n?l+=k.css(e,"border"+de[s]+"Width",!0,r):a+=k.css(e,"border"+de[s]+"Width",!0,r));return!i&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l+c}function lt(e,t,n){var i=Xe(e),r=(!f.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,i),o=r,s=Je(e,t,i),a="offset"+t[0].toUpperCase()+t.slice(1);if(Ue.test(s)){if(!n)return s;s="auto"}return(!f.boxSizingReliable()&&r||!f.reliableTrDimensions()&&_(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===k.css(e,"display",!1,i))&&e.getClientRects().length&&(r="border-box"===k.css(e,"boxSizing",!1,i),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+at(e,t,n||(r?"border":"content"),o,i,s)+"px"}function ct(e,t,n,i,r){return new ct.prototype.init(e,t,n,i,r)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Je(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=ne(t),l=Ye.test(t),c=e.style;if(l||(t=nt(a)),s=k.cssHooks[t]||k.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(e,!1,i))?r:c[t];"string"==(o=typeof n)&&(r=he.exec(n))&&r[1]&&(n=ye(e,t,r),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=r&&r[3]||(k.cssNumber[a]?"":"px")),f.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var r,o,s,a=ne(t);return Ye.test(t)||(t=nt(a)),(s=k.cssHooks[t]||k.cssHooks[a])&&"get"in s&&(r=s.get(e,!0,n)),void 0===r&&(r=Je(e,t,i)),"normal"===r&&t in ot&&(r=ot[t]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),k.each(["height","width"],(function(e,t){k.cssHooks[t]={get:function(e,n,i){if(n)return!it.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?lt(e,t,i):Ke(e,rt,(function(){return lt(e,t,i)}))},set:function(e,n,i){var r,o=Xe(e),s=!f.scrollboxSize()&&"absolute"===o.position,a=(s||i)&&"border-box"===k.css(e,"boxSizing",!1,o),l=i?at(e,t,i,a,o):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-at(e,t,"border",!1,o)-.5)),l&&(r=he.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=k.css(e,t)),st(0,n,l)}}})),k.cssHooks.marginLeft=Ze(f.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Je(e,"marginLeft"))||e.getBoundingClientRect().left-Ke(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),k.each({margin:"",padding:"",border:"Width"},(function(e,t){k.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+de[i]+t]=o[i]||o[i-2]||o[0];return r}},"margin"!==e&&(k.cssHooks[e+t].set=st)})),k.fn.extend({css:function(e,t){return Z(this,(function(e,t,n){var i,r,o={},s=0;if(Array.isArray(t)){for(i=Xe(e),r=t.length;s<r;s++)o[t[s]]=k.css(e,t[s],!1,i);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)}),e,t,arguments.length>1)}}),k.Tween=ct,ct.prototype={constructor:ct,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=ct.propHooks[this.prop];return e&&e.get?e.get(this):ct.propHooks._default.get(this)},run:function(e){var t,n=ct.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ct.propHooks._default.set(this),this}},ct.prototype.init.prototype=ct.prototype,ct.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[nt(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},ct.propHooks.scrollTop=ct.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=ct.prototype.init,k.fx.step={};var ut,ht,dt=/^(?:toggle|show|hide)$/,ft=/queueHooks$/;function pt(){ht&&(!1===m.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(pt):e.setTimeout(pt,k.fx.interval),k.fx.tick())}function gt(){return e.setTimeout((function(){ut=void 0})),ut=Date.now()}function mt(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=de[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function yt(e,t,n){for(var i,r=(vt.tweeners[t]||[]).concat(vt.tweeners["*"]),o=0,s=r.length;o<s;o++)if(i=r[o].call(n,t,e))return i}function vt(e,t,n){var i,r,o=0,s=vt.prefilters.length,a=k.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var t=ut||gt(),n=Math.max(0,c.startTime+c.duration-t),i=1-(n/c.duration||0),o=0,s=c.tweens.length;o<s;o++)c.tweens[o].run(i);return a.notifyWith(e,[c,i,n]),i<1&&s?n:(s||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:k.extend({},t),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},n),originalProperties:t,originalOptions:n,startTime:ut||gt(),duration:n.duration,tweens:[],createTween:function(t,n){var i=k.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(function(e,t){var n,i,r,o,s;for(n in e)if(r=t[i=ne(n)],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),(s=k.cssHooks[i])&&"expand"in s)for(n in o=s.expand(o),delete e[i],o)n in e||(e[n]=o[n],t[n]=r);else t[i]=r}(u,c.opts.specialEasing);o<s;o++)if(i=vt.prefilters[o].call(c,e,u,c.opts))return p(i.stop)&&(k._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return k.map(u,yt,c),p(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),k.fx.timer(k.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}k.Animation=k.extend(vt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ye(n.elem,e,he.exec(t),n),n}]},tweener:function(e,t){p(e)?(t=e,e=["*"]):e=e.match(W);for(var n,i=0,r=e.length;i<r;i++)n=e[i],vt.tweeners[n]=vt.tweeners[n]||[],vt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,r,o,s,a,l,c,u,h="width"in t||"height"in t,d=this,f={},p=e.style,g=e.nodeType&&me(e),m=oe.get(e,"fxshow");for(i in n.queue||(null==(s=k._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always((function(){d.always((function(){s.unqueued--,k.queue(e,"fx").length||s.empty.fire()}))}))),t)if(r=t[i],dt.test(r)){if(delete t[i],o=o||"toggle"===r,r===(g?"hide":"show")){if("show"!==r||!m||void 0===m[i])continue;g=!0}f[i]=m&&m[i]||k.style(e,i)}if((l=!k.isEmptyObject(t))||!k.isEmptyObject(f))for(i in h&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=m&&m.display)&&(c=oe.get(e,"display")),"none"===(u=k.css(e,"display"))&&(c?u=c:(xe([e],!0),c=e.style.display||c,u=k.css(e,"display"),xe([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===k.css(e,"float")&&(l||(d.done((function(){p.display=c})),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),l=!1,f)l||(m?"hidden"in m&&(g=m.hidden):m=oe.access(e,"fxshow",{display:c}),o&&(m.hidden=!g),g&&xe([e],!0),d.done((function(){for(i in g||xe([e]),oe.remove(e,"fxshow"),f)k.style(e,i,f[i])}))),l=yt(g?m[i]:0,i,d),i in m||(m[i]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?vt.prefilters.unshift(e):vt.prefilters.push(e)}}),k.speed=function(e,t,n){var i=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||p(e)&&e,duration:e,easing:n&&t||t&&!p(t)&&t};return k.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in k.fx.speeds?i.duration=k.fx.speeds[i.duration]:i.duration=k.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){p(i.old)&&i.old.call(this),i.queue&&k.dequeue(this,i.queue)},i},k.fn.extend({fadeTo:function(e,t,n,i){return this.filter(me).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=k.isEmptyObject(e),o=k.speed(t,n,i),s=function(){var t=vt(this,k.extend({},e),o);(r||oe.get(this,"finish"))&&t.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,r=null!=e&&e+"queueHooks",o=k.timers,s=oe.get(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&ft.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));!t&&n||k.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=oe.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=k.timers,s=i?i.length:0;for(n.finish=!0,k.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish}))}}),k.each(["toggle","show","hide"],(function(e,t){var n=k.fn[t];k.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(mt(t,!0),e,i,r)}})),k.each({slideDown:mt("show"),slideUp:mt("hide"),slideToggle:mt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){k.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}})),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(ut=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),ut=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){ht||(ht=!0,pt())},k.fx.stop=function(){ht=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(t,n){return t=k.fx&&k.fx.speeds[t]||t,n=n||"fx",this.queue(n,(function(n,i){var r=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(r)}}))},function(){var e=m.createElement("input"),t=m.createElement("select").appendChild(m.createElement("option"));e.type="checkbox",f.checkOn=""!==e.value,f.optSelected=t.selected,(e=m.createElement("input")).value="t",e.type="radio",f.radioValue="t"===e.value}();var bt,xt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return Z(this,k.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){k.removeAttr(this,e)}))}}),k.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(r=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?bt:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=k.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&_(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(W);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),bt={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=xt[t]||k.find.attr;xt[t]=function(e,t,i){var r,o,s=t.toLowerCase();return i||(o=xt[s],xt[s]=r,r=null!=n(e,t,i)?s:null,xt[s]=o),r}}));var wt=/^(?:input|select|textarea|button)$/i,kt=/^(?:a|area)$/i;function Mt(e){return(e.match(W)||[]).join(" ")}function _t(e){return e.getAttribute&&e.getAttribute("class")||""}function St(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(W)||[]}k.fn.extend({prop:function(e,t){return Z(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[k.propFix[e]||e]}))}}),k.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,r=k.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||kt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){k.propFix[this.toLowerCase()]=this})),k.fn.extend({addClass:function(e){var t,n,i,r,o,s;return p(e)?this.each((function(t){k(this).addClass(e.call(this,t,_t(this)))})):(t=St(e)).length?this.each((function(){if(i=_t(this),n=1===this.nodeType&&" "+Mt(i)+" "){for(o=0;o<t.length;o++)r=t[o],n.indexOf(" "+r+" ")<0&&(n+=r+" ");s=Mt(n),i!==s&&this.setAttribute("class",s)}})):this},removeClass:function(e){var t,n,i,r,o,s;return p(e)?this.each((function(t){k(this).removeClass(e.call(this,t,_t(this)))})):arguments.length?(t=St(e)).length?this.each((function(){if(i=_t(this),n=1===this.nodeType&&" "+Mt(i)+" "){for(o=0;o<t.length;o++)for(r=t[o];n.indexOf(" "+r+" ")>-1;)n=n.replace(" "+r+" "," ");s=Mt(n),i!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,i,r,o,s=typeof e,a="string"===s||Array.isArray(e);return p(e)?this.each((function(n){k(this).toggleClass(e.call(this,n,_t(this),t),t)})):"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):(n=St(e),this.each((function(){if(a)for(o=k(this),r=0;r<n.length;r++)i=n[r],o.hasClass(i)?o.removeClass(i):o.addClass(i);else void 0!==e&&"boolean"!==s||((i=_t(this))&&oe.set(this,"__className__",i),this.setAttribute&&this.setAttribute("class",i||!1===e?"":oe.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+Mt(_t(n))+" ").indexOf(t)>-1)return!0;return!1}});var qt=/\r/g;k.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=p(e),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?e.call(this,n,k(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=k.map(r,(function(e){return null==e?"":e+""}))),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=k.valHooks[r.type]||k.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(qt,""):null==n?"":n:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:Mt(k.text(e))}},select:{get:function(e){var t,n,i,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:r.length;for(i=o<0?l:s?o:0;i<l;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!_(n.parentNode,"optgroup"))){if(t=k(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=k.makeArray(t),s=r.length;s--;)((i=r[s]).selected=k.inArray(k.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],(function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},f.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Dt=e.location,At={guid:Date.now()},Et=/\?/;k.parseXML=function(t){var n,i;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){}return i=n&&n.getElementsByTagName("parsererror")[0],n&&!i||k.error("Invalid XML: "+(i?k.map(i.childNodes,(function(e){return e.textContent})).join("\n"):t)),n};var Ct=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(t,n,i,r){var o,s,a,l,c,h,d,f,y=[i||m],v=u.call(t,"type")?t.type:t,b=u.call(t,"namespace")?t.namespace.split("."):[];if(s=f=a=i=i||m,3!==i.nodeType&&8!==i.nodeType&&!Ct.test(v+k.event.triggered)&&(v.indexOf(".")>-1&&(b=v.split("."),v=b.shift(),b.sort()),c=v.indexOf(":")<0&&"on"+v,(t=t[k.expando]?t:new k.Event(v,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=b.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:k.makeArray(n,[t]),d=k.event.special[v]||{},r||!d.trigger||!1!==d.trigger.apply(i,n))){if(!r&&!d.noBubble&&!g(i)){for(l=d.delegateType||v,Ct.test(l+v)||(s=s.parentNode);s;s=s.parentNode)y.push(s),a=s;a===(i.ownerDocument||m)&&y.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=y[o++])&&!t.isPropagationStopped();)f=s,t.type=o>1?l:d.bindType||v,(h=(oe.get(s,"events")||Object.create(null))[t.type]&&oe.get(s,"handle"))&&h.apply(s,n),(h=c&&s[c])&&h.apply&&ie(s)&&(t.result=h.apply(s,n),!1===t.result&&t.preventDefault());return t.type=v,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(y.pop(),n)||!ie(i)||c&&p(i[v])&&!g(i)&&((a=i[c])&&(i[c]=null),k.event.triggered=v,t.isPropagationStopped()&&f.addEventListener(v,Tt),i[v](),t.isPropagationStopped()&&f.removeEventListener(v,Tt),k.event.triggered=void 0,a&&(i[c]=a)),t.result}},simulate:function(e,t,n){var i=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(i,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each((function(){k.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}});var Nt=/\[\]$/,Rt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Lt(e,t,n,i){var r;if(Array.isArray(t))k.each(t,(function(t,r){n||Nt.test(e)?i(e,r):Lt(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)}));else if(n||"object"!==b(t))i(e,t);else for(r in t)Lt(e+"["+r+"]",t[r],n,i)}k.param=function(e,t){var n,i=[],r=function(e,t){var n=p(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,(function(){r(this.name,this.value)}));else for(n in e)Lt(n,e[n],t,r);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&It.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!Me.test(e))})).map((function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,(function(e){return{name:t.name,value:e.replace(Rt,"\r\n")}})):{name:t.name,value:n.replace(Rt,"\r\n")}})).get()}});var Pt=/%20/g,jt=/#.*$/,zt=/([?&])_=[^&]*/,Ft=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,Vt=/^\/\//,Bt={},$t={},Wt="*/".concat("*"),Ut=m.createElement("a");function Yt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(W)||[];if(p(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Xt(e,t,n,i){var r={},o=e===$t;function s(a){var l;return r[a]=!0,k.each(e[a]||[],(function(e,a){var c=a(t,n,i);return"string"!=typeof c||o||r[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)})),l}return s(t.dataTypes[0])||!r["*"]&&s("*")}function Kt(e,t){var n,i,r=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&k.extend(!0,e,i),e}Ut.href=Dt.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Dt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Kt(Kt(e,k.ajaxSettings),t):Kt(k.ajaxSettings,e)},ajaxPrefilter:Yt(Bt),ajaxTransport:Yt($t),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,r,o,s,a,l,c,u,h,d,f=k.ajaxSetup({},n),p=f.context||f,g=f.context&&(p.nodeType||p.jquery)?k(p):k.event,y=k.Deferred(),v=k.Callbacks("once memory"),b=f.statusCode||{},x={},w={},M="canceled",_={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Ft.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)_.always(e[_.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||M;return i&&i.abort(t),S(0,t),this}};if(y.promise(_),f.url=((t||f.url||Dt.href)+"").replace(Vt,Dt.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(W)||[""],null==f.crossDomain){l=m.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Ut.protocol+"//"+Ut.host!=l.protocol+"//"+l.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=k.param(f.data,f.traditional)),Xt(Bt,f,n,_),c)return _;for(h in(u=k.event&&f.global)&&0===k.active++&&k.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ht.test(f.type),r=f.url.replace(jt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Pt,"+")):(d=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(Et.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(zt,"$1"),d=(Et.test(r)?"&":"?")+"_="+At.guid+++d),f.url=r+d),f.ifModified&&(k.lastModified[r]&&_.setRequestHeader("If-Modified-Since",k.lastModified[r]),k.etag[r]&&_.setRequestHeader("If-None-Match",k.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&_.setRequestHeader("Content-Type",f.contentType),_.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Wt+"; q=0.01":""):f.accepts["*"]),f.headers)_.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(p,_,f)||c))return _.abort();if(M="abort",v.add(f.complete),_.done(f.success),_.fail(f.error),i=Xt($t,f,n,_)){if(_.readyState=1,u&&g.trigger("ajaxSend",[_,f]),c)return _;f.async&&f.timeout>0&&(a=e.setTimeout((function(){_.abort("timeout")}),f.timeout));try{c=!1,i.send(x,S)}catch(e){if(c)throw e;S(-1,e)}}else S(-1,"No Transport");function S(t,n,s,l){var h,d,m,x,w,M=n;c||(c=!0,a&&e.clearTimeout(a),i=void 0,o=l||"",_.readyState=t>0?4:0,h=t>=200&&t<300||304===t,s&&(x=function(e,t,n){for(var i,r,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(f,_,s)),!h&&k.inArray("script",f.dataTypes)>-1&&k.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),x=function(e,t,n,i){var r,o,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=c[l+" "+o]||c["* "+o]))for(r in c)if((a=r.split(" "))[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[r]:!0!==c[r]&&(o=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(f,x,_,h),h?(f.ifModified&&((w=_.getResponseHeader("Last-Modified"))&&(k.lastModified[r]=w),(w=_.getResponseHeader("etag"))&&(k.etag[r]=w)),204===t||"HEAD"===f.type?M="nocontent":304===t?M="notmodified":(M=x.state,d=x.data,h=!(m=x.error))):(m=M,!t&&M||(M="error",t<0&&(t=0))),_.status=t,_.statusText=(n||M)+"",h?y.resolveWith(p,[d,M,_]):y.rejectWith(p,[_,M,m]),_.statusCode(b),b=void 0,u&&g.trigger(h?"ajaxSuccess":"ajaxError",[_,f,h?d:m]),v.fireWith(p,[_,M]),u&&(g.trigger("ajaxComplete",[_,f]),--k.active||k.event.trigger("ajaxStop")))}return _},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],(function(e,t){k[t]=function(e,n,i,r){return p(n)&&(r=r||i,i=n,n=void 0),k.ajax(k.extend({url:e,type:t,dataType:r,data:n,success:i},k.isPlainObject(e)&&e))}})),k.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),k._evalUrl=function(e,t,n){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t,n)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(p(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return p(e)?this.each((function(t){k(this).wrapInner(e.call(this,t))})):this.each((function(){var t=k(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=p(e);return this.each((function(n){k(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){k(this).replaceWith(this.childNodes)})),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Jt=k.ajaxSettings.xhr();f.cors=!!Jt&&"withCredentials"in Jt,f.ajax=Jt=!!Jt,k.ajaxTransport((function(t){var n,i;if(f.cors||Jt&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);n=function(e){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Gt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout((function(){n&&i()}))},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}})),k.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),k.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,r){t=k("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),m.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Zt,Qt=[],en=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Qt.pop()||k.expando+"_"+At.guid++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",(function(t,n,i){var r,o,s,a=!1!==t.jsonp&&(en.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&en.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=p(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(en,"$1"+r):!1!==t.jsonp&&(t.url+=(Et.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return s||k.error(r+" was not called"),s[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){s=arguments},i.always((function(){void 0===o?k(e).removeProp(r):e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,Qt.push(r)),s&&p(o)&&o(s[0]),s=o=void 0})),"script"})),f.createHTMLDocument=((Zt=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Zt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((i=(t=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,t.head.appendChild(i)):t=m),o=!n&&[],(r=P.exec(e))?[t.createElement(r[1])]:(r=Ce([e],t,o),o&&o.length&&k(o).remove(),k.merge([],r.childNodes)));var i,r,o},k.fn.load=function(e,t,n){var i,r,o,s=this,a=e.indexOf(" ");return a>-1&&(i=Mt(e.slice(a)),e=e.slice(0,a)),p(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),s.length>0&&k.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done((function(e){o=arguments,s.html(i?k("<div>").append(k.parseHTML(e)).find(i):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},k.expr.pseudos.animated=function(e){return k.grep(k.timers,(function(t){return e===t.elem})).length},k.offset={setOffset:function(e,t,n){var i,r,o,s,a,l,c=k.css(e,"position"),u=k(e),h={};"static"===c&&(e.style.position="relative"),a=u.offset(),o=k.css(e,"top"),l=k.css(e,"left"),("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1?(s=(i=u.position()).top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),p(t)&&(t=t.call(e,n,k.extend({},a))),null!=t.top&&(h.top=t.top-a.top+s),null!=t.left&&(h.left=t.left-a.left+r),"using"in t?t.using.call(e,h):u.css(h)}},k.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){k.offset.setOffset(this,e,t)}));var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===k.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((r=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),r.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-k.css(i,"marginTop",!0),left:t.left-r.left-k.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||fe}))}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;k.fn[e]=function(i){return Z(this,(function(e,i,r){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r)return o?o[t]:e[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):e[i]=r}),e,i,arguments.length)}})),k.each(["top","left"],(function(e,t){k.cssHooks[t]=Ze(f.pixelPosition,(function(e,n){if(n)return n=Je(e,t),Ue.test(n)?k(e).position()[t]+"px":n}))})),k.each({Height:"height",Width:"width"},(function(e,t){k.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,i){k.fn[i]=function(r,o){var s=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===o?"margin":"border");return Z(this,(function(t,n,r){var o;return g(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?k.css(t,n,a):k.style(t,n,r,a)}),t,s?r:void 0,s)}}))})),k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){k.fn[t]=function(e){return this.on(t,e)}})),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){k.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var tn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;k.proxy=function(e,t){var n,i,o;if("string"==typeof t&&(n=e[t],t=e,e=n),p(e))return i=r.call(arguments,2),o=function(){return e.apply(t||this,i.concat(r.call(arguments)))},o.guid=e.guid=e.guid||k.guid++,o},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=_,k.isFunction=p,k.isWindow=g,k.camelCase=ne,k.type=b,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},k.trim=function(e){return null==e?"":(e+"").replace(tn,"$1")};var nn=e.jQuery,rn=e.$;return k.noConflict=function(t){return e.$===k&&(e.$=rn),t&&e.jQuery===k&&(e.jQuery=nn),k},void 0===t&&(e.jQuery=e.$=k),k}))}(i)),i.exports),s=t(o),a={"Visualization.Histogram.MeasureAxisLabel":{id:"Visualization.Histogram.MeasureAxisLabel",locale:{"en-US":"Frequency","zh-TW":"頻率","zh-CN":"频率","tr-TR":"Sıklık","sv-SE":"Frekvens","it-IT":"Frequenza","es-ES":"Frecuencia","de-DE":"Häufigkeit","pl-PL":"Częstotliwość","nl-NL":"Frequentie","ko-KR":"빈도","pt-BR":"Frequência","fr-FR":"Fréquence","ja-JP":"レコード数","ru-RU":"Частота"}},"waterfall.legend.positiveValue.label":{id:"waterfall.legend.positiveValue.label",locale:{"en-US":"Positive","zh-TW":"正值","zh-CN":"正","tr-TR":"Pozitif","sv-SE":"Positiv","it-IT":"Positivi","es-ES":"Positivo","de-DE":"Positiv","pl-PL":"Dodatnie","nl-NL":"Positief","ko-KR":"양수","pt-BR":"Positivo","fr-FR":"Positive","ja-JP":"正","ru-RU":"Положительное"}},"waterfall.legend.negativeValue.label":{id:"waterfall.legend.negativeValue.label",locale:{"en-US":"Negative","zh-TW":"負值","zh-CN":"负","tr-TR":"Negatif","sv-SE":"Negativ","it-IT":"Negativi","es-ES":"Negativo","de-DE":"Negativ","pl-PL":"Ujemne","nl-NL":"Negatief","ko-KR":"음수","pt-BR":"Negativo","fr-FR":"Négative","ja-JP":"負","ru-RU":"Отрицательное"}},"waterfall.legend.subtotal.label":{id:"waterfall.legend.subtotal.label",locale:{"en-US":"Subtotal","zh-TW":"小計","zh-CN":"小计","tr-TR":"Ara Toplam","sv-SE":"Deltotal","it-IT":"Subtotale","es-ES":"Subtotal","de-DE":"Teilsumme","pl-PL":"Suma częściowa","nl-NL":"Subtotaal","ko-KR":"소계","pt-BR":"Subtotal","fr-FR":"Sous-total","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_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_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_RequireNumericDimension:{id:"Object.Disclaimer.RequireNumericDimension",locale:{"en-US":"This visualization requires a numeric diemnsion."}},"properties.boxplot.calculationMode.tukey.elements.boxEnd":{id:"properties.boxplot.calculationMode.tukey.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.tukey.elements.boxMiddle":{id:"properties.boxplot.calculationMode.tukey.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Drittes Quartil","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.tukey.elements.boxStart":{id:"properties.boxplot.calculationMode.tukey.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.tukey.elements.firstWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.firstWhisker",locale:{"en-US":"Box start - {0} IQR","zh-TW":"方塊開始 - {0} IQR","zh-CN":"框开始 - {0} IQR","tr-TR":"Kutu başlangıcı - {0} IQR","sv-SE":"Rutans start - {0} IQR","it-IT":"Inizio scatola - {0} IQR","es-ES":"Inicio de caja - {0} IQR","de-DE":"Box-Beginn - {0} IQR","pl-PL":"Początek wykresu pudełkowego - {0} IQR","nl-NL":"Begin box - {0} IQR","ko-KR":"상자 시작 - {0} IQR","pt-BR":"Início da caixa - {0} IQR","fr-FR":"Début de la boîte - {0} IQR","ja-JP":"ボックス開始 - {0} IQR","ru-RU":"Начало поля - {0} IQR"}},"properties.boxplot.calculationMode.tukey.elements.lastWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.lastWhisker",locale:{"en-US":"Box end + {0} IQR","zh-TW":"方塊結束 + {0} IQR","zh-CN":"框结束 + {0} IQR","tr-TR":"Kutu bitişi + {0} IQR","sv-SE":"Rutans slut + {0} IQR","it-IT":"Fine scatola + {0} IQR","es-ES":"Fin de caja + {0} IQR","de-DE":"Box-Ende + {0} IQR","pl-PL":"Koniec wykresu pudełkowego - {0} IQR","nl-NL":"Einde box + {0} IQR","ko-KR":"상자 끝 + {0} IQR","pt-BR":"Fim da caixa + {0} IQR","fr-FR":"Fin de la boîte + {0} IQR","ja-JP":"ボックス終了 + {0} IQR","ru-RU":"Конец поля + {0} IQR"}},"properties.boxplot.calculationMode.stdDev.elements.boxEnd":{id:"properties.boxplot.calculationMode.stdDev.elements.boxEnd",locale:{"en-US":"Box middle + 1 standard deviation","zh-TW":"方塊中間 + 1 個標準差","zh-CN":"框中部 + 1 个标准偏差","tr-TR":"Kutu ortası + 1 standart sapma","sv-SE":"Rutans mitt + 1 standardavvikelse","it-IT":"Centro scatola + 1 deviazione standard","es-ES":"Mitad de la caja + 1 desviación estándar","de-DE":"Box-Mitte +1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego + 1 odch. stand","nl-NL":"Midden box + 1 standaardafwijking","ko-KR":"상자 중간 + 1개 표준 편차","pt-BR":"Meio da caixa + 1 desvio padrão","fr-FR":"Milieu de la boîte + 1 écart type","ja-JP":"ボックス中間 + 1 標準偏差","ru-RU":"Середина поля + 1 стандартное отклонение"}},"properties.boxplot.calculationMode.stdDev.elements.boxMiddle":{id:"properties.boxplot.calculationMode.stdDev.elements.boxMiddle",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.boxplot.calculationMode.stdDev.elements.boxStart":{id:"properties.boxplot.calculationMode.stdDev.elements.boxStart",locale:{"en-US":"Box middle - 1 standard deviation","zh-TW":"方塊中間 - 1 個標準差","zh-CN":"框中部 - 1 个标准偏差","tr-TR":"Kutu ortası - 1 standart sapma","sv-SE":"Rutans mitt - 1 standardavvikelse","it-IT":"Centro scatola - 1 deviazione standard","es-ES":"Mitad de la caja - {1} desviación estándar","de-DE":"Box-Mitte -1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego - 1 odch. stand","nl-NL":"Midden box - 1 standaardafwijking","ko-KR":"상자 중간 - 1개 표준 편차","pt-BR":"Середина поля - 1 стандартное отклонение","fr-FR":"Milieu de la boîte - 1 écart type","ja-JP":"ボックス中間 - 1 標準偏差","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.stdDev.elements.firstWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.firstWhisker",locale:{"en-US":"Box middle - {0} standard deviations","zh-TW":"方塊中間 - {0} 個標準差","zh-CN":"框中部 - {0} 个标准偏差","tr-TR":"Kutu ortası - {0} standart sapma","sv-SE":"Rutans mitt - {0} standardavvikelser","it-IT":"Centro scatola - {0} deviazioni standard","es-ES":"Mitad de la caja - {0} desviaciones estándar","de-DE":"Box-Mitte -{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego - {0} odch. stand","nl-NL":"Midden box - {0} standaardafwijkingen","ko-KR":"상자 중간 - {0}개 표준 편차","pt-BR":"Meio da caixa - {0} desvios padrão","fr-FR":"Milieu de la boîte - {0} écarts types","ja-JP":"ボックス中間 - {0} 標準偏差","ru-RU":"Середина поля - {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.stdDev.elements.lastWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.lastWhisker",locale:{"en-US":"Box middle + {0} standard deviations","zh-TW":"方塊中間 + {0} 個標準差","zh-CN":"框中部 + {0} 个标准偏差","tr-TR":"Kutu ortası + {0} standart sapma","sv-SE":"Rutans mitt + {0} standardavvikelser","it-IT":"Centro scatola + {0} deviazioni standard","es-ES":"Mitad de la caja + {0} desviaciones estándar","de-DE":"Box-Mitte +{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego + {0} odch. stand","nl-NL":"Midden box + {0} standaardafwijkingen","ko-KR":"상자 중간 + {0}개 표준 편차","pt-BR":"Meio da caixa + {0} desvios padrão","fr-FR":"Milieu de la boîte + {0} écarts types","ja-JP":"ボックス中間 + {0} 標準偏差","ru-RU":"Середина поля + {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.fractiles.elements.boxEnd":{id:"properties.boxplot.calculationMode.fractiles.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile<","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.boxMiddle":{id:"properties.boxplot.calculationMode.fractiles.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Median","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.fractiles.elements.boxStart":{id:"properties.boxplot.calculationMode.fractiles.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth",locale:{"en-US":"5th percentile","zh-TW":"第 5 個百分位數","zh-CN":"第 5 个百分位","tr-TR":"5. yüzdebirlik","sv-SE":"5:e percentilen","it-IT":"5° percentile","es-ES":"5º percentil","de-DE":"5. Perzentil","pl-PL":"5. percentyl","nl-NL":"5e percentiel","ko-KR":"5번째 백분위수","pt-BR":"5º percentil","fr-FR":"5e centile","ja-JP":"5 番目のパーセンタイル","ru-RU":"5-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first",locale:{"en-US":"1st percentile","zh-TW":"第 1 個百分位數","zh-CN":"第 1 个百分位","tr-TR":"1. yüzdebirlik","sv-SE":"1:e percentilen","it-IT":"1° percentile","es-ES":"1er percentil","de-DE":"1. Perzentil","pl-PL":"1. percentyl","nl-NL":"1e percentiel","ko-KR":"1번째 백분위수","pt-BR":"1º percentil","fr-FR":"1er centile","ja-JP":"1 番目のパーセンタイル","ru-RU":"1-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min",locale:{"en-US":"Minimum","zh-TW":"最小","zh-CN":"最小值","tr-TR":"En az","sv-SE":"Min","it-IT":"Minimo","es-ES":"Mínimo","de-DE":"Minimum","pl-PL":"Minimum","nl-NL":"Minimum","ko-KR":"최소","pt-BR":"Mínimo","fr-FR":"Minimale","ja-JP":"最小値","ru-RU":"Минимум"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth",locale:{"en-US":"10th percentile","zh-TW":"第 10 個百分位數","zh-CN":"第 10 个百分位","tr-TR":"10. yüzdebirlik","sv-SE":"10:e percentilen","it-IT":"10° percentile","es-ES":"10º percentil","de-DE":"10. Perzentil","pl-PL":"10. percentyl","nl-NL":"10e percentiel","ko-KR":"10번째 백분위수","pt-BR":"10º percentil","fr-FR":"10e centile","ja-JP":"10 番目のパーセンタイル","ru-RU":"10-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max",locale:{"en-US":"Maximum","zh-TW":"最大","zh-CN":"最大值","tr-TR":"En fazla","sv-SE":"Max","it-IT":"Massimo","es-ES":"Máximo","de-DE":"Maximum","pl-PL":"Maksimum","nl-NL":"Maximum","ko-KR":"최대","pt-BR":"Máximo","fr-FR":"Maximale","ja-JP":"最大値","ru-RU":"Максимум"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth",locale:{"en-US":"90th percentile","zh-TW":"第 90 個百分位數","zh-CN":"第 90 个百分位","tr-TR":"90. yüzdebirlik","sv-SE":"90:e percentilen","it-IT":"90° percentile","es-ES":"90º percentil","de-DE":"90. Perzentil","pl-PL":"90. percentyl","nl-NL":"90e percentiel","ko-KR":"90번째 백분위수","pt-BR":"90º percentil","fr-FR":"90e centile","ja-JP":"90 番目の百分位数","ru-RU":"90-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth",locale:{"en-US":"95th percentile","zh-TW":"第 95 個百分位數","zh-CN":"第 95 个百分位","tr-TR":"95. yüzdebirlik","sv-SE":"95:e percentilen","it-IT":"95° percentile","es-ES":"95º percentil","de-DE":"95. Perzentil","pl-PL":"95. percentyl","nl-NL":"95e percentiel","ko-KR":"95번째 백분위수","pt-BR":"95º percentil","fr-FR":"95e centile","ja-JP":"95 番目の百分位数","ru-RU":"95-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth",locale:{"en-US":"99th percentile","zh-TW":"第 99 個百分位數","zh-CN":"第 99 个百分位","tr-TR":"99. yüzdebirlik","sv-SE":"99:e percentilen","it-IT":"99° percentile","es-ES":"99º percentil","de-DE":"99. Perzentil","pl-PL":"99. percentyl","nl-NL":"99e percentiel","ko-KR":"99번째 백분위수","pt-BR":"99º percentil","fr-FR":"99e centile","ja-JP":"99 番目の百分位数","ru-RU":"99-й процентиль"}}};var l=Object.prototype.hasOwnProperty,c=Object.prototype.toString,u=Object.defineProperty,h=Object.getOwnPropertyDescriptor,d=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===c.call(e)},f=function(e){if(!e||"[object Object]"!==c.call(e))return!1;var t,n=l.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&l.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||l.call(e,t)},p=function(e,t){u&&"__proto__"===t.name?u(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},g=function(e,t){if("__proto__"===t){if(!l.call(e,t))return;if(h)return h(e,t).value}return e[t]},m=function e(){var t,n,i,r,o,s,a=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},l=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=g(a,n),a!==(r=g(t,n))&&(u&&r&&(f(r)||(o=d(r)))?(o?(o=!1,s=i&&d(i)?i:[]):s=i&&f(i)?i:{},p(a,{name:n,newValue:e(u,s,r)})):void 0!==r&&p(a,{name:n,newValue:r}));return a},y="2.8.2";function v(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e){return!!e.changedTouches}function k(e){return"number"==typeof e&&!isNaN(e)}function M(e){return"number"!=typeof e||isNaN(e)}function _(e){const t=e.length;let n=NaN,i=NaN,r=NaN,o=NaN;for(let s=0;s<t;s++)n=isNaN(n)?e[s].x:Math.min(n,e[s].x),i=isNaN(i)?e[s].x:Math.max(i,e[s].x),r=isNaN(r)?e[s].y:Math.min(r,e[s].y),o=isNaN(o)?e[s].y:Math.max(o,e[s].y);return[n,r,i,o]}function S(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function q(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 D(e){const[t,n,i,r]=_(e);return{x:t,y:n,width:i-t,height:r-n}}function A(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function E(e){const{x:t,y:n,width:i,height:r,x1:o,x2:s,y1:a,y2:l,cx:c,cy:u,r:h,vertices:d}=e||{};return k(c)&&k(u)&&k(h)?"circle":k(o)&&k(s)&&k(a)&&k(l)?"line":k(t)&&k(n)&&k(i)&&k(r)?"rect":k(t)&&k(n)?"point":Array.isArray(d)?d.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function C(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var T=Math.PI,N=2*T,R=1e-6,O=N-R;function I(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function L(){return new I}function P(e){return function(){return e}}I.prototype=L.prototype={constructor:I,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,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(e,t,n,i,r,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(e,t,n,i,r){e=+e,t=+t,n=+n,i=+i,r=+r;var o=this._x1,s=this._y1,a=n-e,l=i-t,c=o-e,u=s-t,h=c*c+u*u;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>R)if(Math.abs(u*a-l*c)>R&&r){var d=n-o,f=i-s,p=a*a+l*l,g=d*d+f*f,m=Math.sqrt(p),y=Math.sqrt(h),v=r*Math.tan((T-Math.acos((p+h-g)/(2*m*y)))/2),b=v/y,x=v/m;Math.abs(b-1)>R&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+r+","+r+",0,0,"+ +(u*d>c*f)+","+(this._x1=e+x*a)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,i,r,o){e=+e,t=+t,o=!!o;var s=(n=+n)*Math.cos(i),a=n*Math.sin(i),l=e+s,c=t+a,u=1^o,h=o?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>R||Math.abs(this._y1-c)>R)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%N+N),h>O?this._+="A"+n+","+n+",0,1,"+u+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>R&&(this._+="A"+n+","+n+",0,"+ +(h>=T)+","+u+","+(this._x1=e+n*Math.cos(r))+","+(this._y1=t+n*Math.sin(r))))},rect:function(e,t,n,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var j=Math.abs,z=Math.atan2,F=Math.cos,H=Math.max,V=Math.min,B=Math.sin,$=Math.sqrt,W=1e-12,U=Math.PI,Y=U/2,X=2*U;function K(e){return e>=1?Y:e<=-1?-Y:Math.asin(e)}function G(e){return e.innerRadius}function J(e){return e.outerRadius}function Z(e){return e.startAngle}function Q(e){return e.endAngle}function ee(e){return e&&e.padAngle}function te(e,t,n,i,r,o,s){var a=e-n,l=t-i,c=(s?o:-o)/$(a*a+l*l),u=c*l,h=-c*a,d=e+u,f=t+h,p=n+u,g=i+h,m=(d+p)/2,y=(f+g)/2,v=p-d,b=g-f,x=v*v+b*b,w=r-o,k=d*g-p*f,M=(b<0?-1:1)*$(H(0,w*w*x-k*k)),_=(k*b-v*M)/x,S=(-k*v-b*M)/x,q=(k*b+v*M)/x,D=(-k*v+b*M)/x,A=_-m,E=S-y,C=q-m,T=D-y;return A*A+E*E>C*C+T*T&&(_=q,S=D),{cx:_,cy:S,x01:-u,y01:-h,x11:_*(r/w-1),y11:S*(r/w-1)}}function ne(){var e=G,t=J,n=P(0),i=null,r=Z,o=Q,s=ee,a=null;function l(){var l,c,u=+e.apply(this,arguments),h=+t.apply(this,arguments),d=r.apply(this,arguments)-Y,f=o.apply(this,arguments)-Y,p=j(f-d),g=f>d;if(a||(a=l=L()),h<u&&(c=h,h=u,u=c),h>W)if(p>X-W)a.moveTo(h*F(d),h*B(d)),a.arc(0,0,h,d,f,!g),u>W&&(a.moveTo(u*F(f),u*B(f)),a.arc(0,0,u,f,d,g));else{var m,y,v=d,b=f,x=d,w=f,k=p,M=p,_=s.apply(this,arguments)/2,S=_>W&&(i?+i.apply(this,arguments):$(u*u+h*h)),q=V(j(h-u)/2,+n.apply(this,arguments)),D=q,A=q;if(S>W){var E=K(S/u*B(_)),C=K(S/h*B(_));(k-=2*E)>W?(x+=E*=g?1:-1,w-=E):(k=0,x=w=(d+f)/2),(M-=2*C)>W?(v+=C*=g?1:-1,b-=C):(M=0,v=b=(d+f)/2)}var T=h*F(v),N=h*B(v),R=u*F(w),O=u*B(w);if(q>W){var I,P=h*F(b),H=h*B(b),G=u*F(x),J=u*B(x);if(p<U&&(I=function(e,t,n,i,r,o,s,a){var l=n-e,c=i-t,u=s-r,h=a-o,d=h*l-u*c;if(!(d*d<W))return[e+(d=(u*(t-o)-h*(e-r))/d)*l,t+d*c]}(T,N,G,J,P,H,R,O))){var Z=T-I[0],Q=N-I[1],ee=P-I[0],ne=H-I[1],ie=1/B(function(e){return e>1?0:e<-1?U:Math.acos(e)}((Z*ee+Q*ne)/($(Z*Z+Q*Q)*$(ee*ee+ne*ne)))/2),re=$(I[0]*I[0]+I[1]*I[1]);D=V(q,(u-re)/(ie-1)),A=V(q,(h-re)/(ie+1))}}M>W?A>W?(m=te(G,J,T,N,h,A,g),y=te(P,H,R,O,h,A,g),a.moveTo(m.cx+m.x01,m.cy+m.y01),A<q?a.arc(m.cx,m.cy,A,z(m.y01,m.x01),z(y.y01,y.x01),!g):(a.arc(m.cx,m.cy,A,z(m.y01,m.x01),z(m.y11,m.x11),!g),a.arc(0,0,h,z(m.cy+m.y11,m.cx+m.x11),z(y.cy+y.y11,y.cx+y.x11),!g),a.arc(y.cx,y.cy,A,z(y.y11,y.x11),z(y.y01,y.x01),!g))):(a.moveTo(T,N),a.arc(0,0,h,v,b,!g)):a.moveTo(T,N),u>W&&k>W?D>W?(m=te(R,O,P,H,u,-D,g),y=te(T,N,G,J,u,-D,g),a.lineTo(m.cx+m.x01,m.cy+m.y01),D<q?a.arc(m.cx,m.cy,D,z(m.y01,m.x01),z(y.y01,y.x01),!g):(a.arc(m.cx,m.cy,D,z(m.y01,m.x01),z(m.y11,m.x11),!g),a.arc(0,0,u,z(m.cy+m.y11,m.cx+m.x11),z(y.cy+y.y11,y.cx+y.x11),g),a.arc(y.cx,y.cy,D,z(y.y11,y.x11),z(y.y01,y.x01),!g))):a.arc(0,0,u,w,x,g):a.lineTo(R,O)}else a.moveTo(0,0);if(a.closePath(),l)return a=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-U/2;return[F(i)*n,B(i)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:P(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:P(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:P(+e),l):n},l.padRadius=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:P(+e),l):i},l.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:P(+e),l):r},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:P(+e),l):o},l.padAngle=function(e){return arguments.length?(s="function"==typeof e?e:P(+e),l):s},l.context=function(e){return arguments.length?(a=null==e?null:e,l):a},l}function ie(e){this._context=e}function re(e){return new ie(e)}function oe(e){return e[0]}function se(e){return e[1]}function ae(){var e=oe,t=null,n=P(0),i=se,r=P(!0),o=null,s=re,a=null;function l(l){var c,u,h,d,f,p=l.length,g=!1,m=new Array(p),y=new Array(p);for(null==o&&(a=s(f=L())),c=0;c<=p;++c){if(!(c<p&&r(d=l[c],c,l))===g)if(g=!g)u=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),h=c-1;h>=u;--h)a.point(m[h],y[h]);a.lineEnd(),a.areaEnd()}g&&(m[c]=+e(d,c,l),y[c]=+n(d,c,l),a.point(t?+t(d,c,l):m[c],i?+i(d,c,l):y[c]))}if(f)return a=null,f+""||null}function c(){return function(){var e=oe,t=se,n=P(!0),i=null,r=re,o=null;function s(s){var a,l,c,u=s.length,h=!1;for(null==i&&(o=r(c=L())),a=0;a<=u;++a)!(a<u&&n(l=s[a],a,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(l,a,s),+t(l,a,s));if(c)return o=null,c+""||null}return s.x=function(t){return arguments.length?(e="function"==typeof t?t:P(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:P(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:P(!!e),s):n},s.curve=function(e){return arguments.length?(r=e,null!=i&&(o=r(i)),s):r},s.context=function(e){return arguments.length?(null==e?i=o=null:o=r(i=e),s):i},s}().defined(r).curve(s).context(o)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:P(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:P(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:P(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:P(+e),i=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:P(+e),l):n},l.y1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:P(+e),l):i},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(i)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(r="function"==typeof e?e:P(!!e),l):r},l.curve=function(e){return arguments.length?(s=e,null!=o&&(a=s(o)),l):s},l.context=function(e){return arguments.length?(null==e?o=a=null:a=s(o=e),l):o},l}function le(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function ce(e){return e}ie.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 ue=Array.prototype.slice;function he(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 de(e){this._context=e}function fe(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 pe(e,t){this._context=e,this._k=(1-t)/6}de.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:he(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:he(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},pe.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:fe(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:fe(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 ge=function e(t){function n(e){return new pe(e,t)}return n.tension=function(t){return e(+t)},n}(0);function me(e,t){this._context=e,this._alpha=t}me.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,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(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 i=e._x1,r=e._y1,o=e._x2,s=e._y2;if(e._l01_a>W){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,r=(r*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>W){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(i,r,o,s,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 ye=function e(t){function n(e){return t?new me(e,t):new pe(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function ve(e){return e<0?-1:1}function be(e,t,n){var i=e._x1-e._x0,r=t-e._x1,o=(e._y1-e._y0)/(i||r<0&&-0),s=(n-e._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(ve(o)+ve(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function xe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function we(e,t,n){var i=e._x0,r=e._y0,o=e._x1,s=e._y1,a=(o-i)/3;e._context.bezierCurveTo(i+a,r+a*t,o-a,s-a*n,o,s)}function ke(e){this._context=e}function Me(e){this._context=new _e(e)}function _e(e){this._context=e}function Se(e){this._context=e}function qe(e){var t,n,i=e.length-1,r=new Array(i),o=new Array(i),s=new Array(i);for(r[0]=0,o[0]=2,s[0]=e[0]+2*e[1],t=1;t<i-1;++t)r[t]=1,o[t]=4,s[t]=4*e[t]+2*e[t+1];for(r[i-1]=2,o[i-1]=7,s[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)n=r[t]/o[t-1],o[t]-=n,s[t]-=n*s[t-1];for(r[i-1]=s[i-1]/o[i-1],t=i-2;t>=0;--t)r[t]=(s[t]-r[t+1])/o[t];for(o[i-1]=(e[i]+r[i-1])/2,t=0;t<i-1;++t)o[t]=2*e[t+1]-r[t+1];return[r,o]}function De(e,t){this._context=e,this._t=t}function Ae(e,t){if((r=e.length)>1)for(var n,i,r,o=1,s=e[t[0]],a=s.length;o<r;++o)for(i=s,s=e[t[o]],n=0;n<a;++n)s[n][1]+=s[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Ee(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Ce(e,t){return e[t]}function Te(e){for(var t,n=-1,i=0,r=e.length,o=-1/0;++n<r;)(t=+e[n][1])>o&&(o=t,i=n);return i}function Ne(e){for(var t,n=0,i=-1,r=e.length;++i<r;)(t=+e[i][1])&&(n+=t);return n}function Re(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",i=arguments.length>2?arguments[2]:void 0;const r={},o=e||{get:()=>{},has:()=>!1,default:()=>{}};function s(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in r)&&(r[e]=t,!0)}function a(e){return r[e]||o.get(e)}function l(e,r){if(void 0!==r)return s(e,r);const o=a(e);return i&&void 0===o&&i.warn("".concat(e," does not exist in ").concat(n," registry")),o||a(t)}return t=o.default(),l.add=s,l.get=a,l.has=function(e){return!!r[e]||o.has(e)},l.remove=function(e){const t=r[e];return delete r[e],t},l.getKeys=function(){return Object.keys(r)},l.getValues=function(){return Object.keys(r).map((e=>r[e]))},l.default=function(e){return void 0!==e&&(t=e),t},l.register=s,l}function Oe(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function Ie(e){return(e=Oe(Math.abs(e)))?e[1]:NaN}ke.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:we(this,this._t0,xe(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,we(this,xe(this,n=be(this,e,t)),n);break;default:we(this,this._t0,n=be(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Me.prototype=Object.create(ke.prototype)).point=function(e,t){ke.prototype.point.call(this,t,e)},_e.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,i,r,o){this._context.bezierCurveTo(t,e,i,n,o,r)}},Se.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 i=qe(e),r=qe(t),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],e[s],t[s]);(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)}},De.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 Le,Pe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function je(e){if(!(t=Pe.exec(e)))throw new Error("invalid format: "+e);var t;return new ze({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 ze(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 Fe(e,t){var n=Oe(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}je.prototype=ze.prototype,ze.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 He={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Fe(100*e,t),r:Fe,s:function(e,t){var n=Oe(e,t);if(!n)return e+"";var i=n[0],r=n[1],o=r-(Le=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Oe(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ve(e){return e}var Be,$e,We,Ue=Array.prototype.map,Ye=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Xe(e){var t,n,i=void 0===e.grouping||void 0===e.thousands?Ve:(t=Ue.call(e.grouping,Number),n=e.thousands+"",function(e,i){for(var r=e.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}),r=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?Ve:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Ue.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=je(e)).fill,n=e.align,h=e.sign,d=e.symbol,f=e.zero,p=e.width,g=e.comma,m=e.precision,y=e.trim,v=e.type;"n"===v?(g=!0,v="g"):He[v]||(void 0===m&&(m=12),y=!0,v="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var b="$"===d?r:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===d?o:/[%p]/.test(v)?l:"",w=He[v],k=/[defgprs%]/.test(v);function M(e){var r,o,l,d=b,M=x;if("c"===v)M=w(e)+M,e="";else{var _=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),m),y&&(e=function(e){e:for(var t,n=e.length,i=1,r=-1;i<n;++i)switch(e[i]){case".":r=t=i;break;case"0":0===r&&(r=i),t=i;break;default:if(!+e[i])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}(e)),_&&0===+e&&"+"!==h&&(_=!1),d=(_?"("===h?h:c:"-"===h||"("===h?"":h)+d,M=("s"===v?Ye[8+Le/3]:"")+M+(_&&"("===h?")":""),k)for(r=-1,o=e.length;++r<o;)if(48>(l=e.charCodeAt(r))||l>57){M=(46===l?s+e.slice(r+1):e.slice(r))+M,e=e.slice(0,r);break}}g&&!f&&(e=i(e,1/0));var S=d.length+e.length+M.length,q=S<p?new Array(p-S+1).join(t):"";switch(g&&f&&(e=i(q+e,q.length?p-M.length:1/0),q=""),n){case"<":e=d+e+M+q;break;case"=":e=d+q+e+M;break;case"^":e=q.slice(0,S=q.length>>1)+d+e+M+q.slice(S);break;default:e=q+d+e+M}return a(e)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),M.toString=function(){return e+""},M}return{format:h,formatPrefix:function(e,t){var n=h(((e=je(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(Ie(t)/3))),r=Math.pow(10,-i),o=Ye[8+i/3];return function(e){return n(r*e)+o}}}}!function(e){Be=Xe(e),$e=Be.format,We=Be.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const Ke=new Date,Ge=new Date;function Je(e,t,n,i){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=t=>(e(t=new Date(+t)),t),r.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),r.round=e=>{const t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),r.range=(n,i,o)=>{const s=[];if(n=r.ceil(n),o=null==o?1:Math.floor(o),!(n<i&&o>0))return s;let a;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<i);return s},r.filter=n=>Je((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,i)=>{if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););})),n&&(r.count=(t,i)=>(Ke.setTime(+t),Ge.setTime(+i),e(Ke),e(Ge),Math.floor(n(Ke,Ge))),r.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(i?t=>i(t)%e===0:t=>r.count(0,t)%e===0):r:null)),r}const Ze=6e4,Qe=864e5,et=6048e5,tt=Je((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ze)/Qe),(e=>e.getDate()-1));tt.range;const nt=Je((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Qe),(e=>e.getUTCDate()-1));nt.range;const it=Je((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Qe),(e=>Math.floor(e/Qe)));function rt(e){return Je((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ze)/et))}it.range;const ot=rt(0),st=rt(1),at=rt(2),lt=rt(3),ct=rt(4),ut=rt(5),ht=rt(6);function dt(e){return Je((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/et))}ot.range,st.range,at.range,lt.range,ct.range,ut.range,ht.range;const ft=dt(0),pt=dt(1),gt=dt(2),mt=dt(3),yt=dt(4),vt=dt(5),bt=dt(6);ft.range,pt.range,gt.range,mt.range,yt.range,vt.range,bt.range;const xt=Je((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));xt.every=e=>isFinite(e=Math.floor(e))&&e>0?Je((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,xt.range;const wt=Je((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function kt(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Mt(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function _t(e){let t,n,i;function r(e,i,r=0,o=e.length){if(r<o){if(0!==t(i,i))return o;do{const t=r+o>>>1;n(e[t],i)<0?r=t+1:o=t}while(r<o)}return r}return 2!==e.length?(t=kt,n=(t,n)=>kt(e(t),n),i=(t,n)=>e(t)-n):(t=e===kt||e===Mt?e:St,n=e,i=e),{left:r,center:function(e,t,n=0,o=e.length){const s=r(e,t,n,o-1);return s>n&&i(e[s-1],t)>-i(e[s],t)?s-1:s},right:function(e,i,r=0,o=e.length){if(r<o){if(0!==t(i,i))return o;do{const t=r+o>>>1;n(e[t],i)<=0?r=t+1:o=t}while(r<o)}return r}}}function St(){return 0}wt.every=e=>isFinite(e=Math.floor(e))&&e>0?Je((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,wt.range;const qt=_t(kt).right;_t((function(e){return null===e?NaN:+e})).center;var Dt=qt;class At extends Map{constructor(e,t=Ct){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(Et(this,e))}has(e){return super.has(Et(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):(e.set(i,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const i=t(n);e.has(i)&&(n=e.get(i),e.delete(i));return n}(this,e))}}function Et({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):n}function Ct(e){return null!==e&&"object"==typeof e?e.valueOf():e}const Tt=Math.sqrt(50),Nt=Math.sqrt(10),Rt=Math.sqrt(2);function Ot(e,t,n){const i=(t-e)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=Tt?10:o>=Nt?5:o>=Rt?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=n&&n<2?Ot(e,t,2*n):[a,l,c]}function It(e,t,n){return Ot(e=+e,t=+t,n=+n)[2]}function Lt(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 Pt(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 jt(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function zt(e){var t=e.dateTime,n=e.date,i=e.time,r=e.periods,o=e.days,s=e.shortDays,a=e.months,l=e.shortMonths,c=Ut(r),u=Yt(r),h=Ut(o),d=Yt(o),f=Ut(s),p=Yt(s),g=Ut(a),m=Yt(a),y=Ut(l),v=Yt(l),b={a:function(e){return s[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return a[e.getMonth()]},c:null,d:gn,e:gn,f:xn,g:Tn,G:Rn,H:mn,I:yn,j:vn,L:bn,m:wn,M:kn,p:function(e){return r[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ni,s:ii,S:Mn,u:_n,U:Sn,V:Dn,w:An,W:En,x:null,X:null,y:Cn,Y:Nn,Z:On,"%":ti},x={a:function(e){return s[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return a[e.getUTCMonth()]},c:null,d:In,e:In,f:Fn,g:Jn,G:Qn,H:Ln,I:Pn,j:jn,L:zn,m:Hn,M:Vn,p:function(e){return r[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ni,s:ii,S:Bn,u:$n,U:Wn,V:Yn,w:Xn,W:Kn,x:null,X:null,y:Gn,Y:Zn,Z:ei,"%":ti},w={a:function(e,t,n){var i=f.exec(t.slice(n));return i?(e.w=p.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(e,t,n){var i=h.exec(t.slice(n));return i?(e.w=d.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(e,t,n){var i=y.exec(t.slice(n));return i?(e.m=v.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(e,t,n){var i=g.exec(t.slice(n));return i?(e.m=m.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(e,n,i){return _(e,t,n,i)},d:on,e:on,f:hn,g:en,G:Qt,H:an,I:an,j:sn,L:un,m:rn,M:ln,p:function(e,t,n){var i=c.exec(t.slice(n));return i?(e.p=u.get(i[0].toLowerCase()),n+i[0].length):-1},q:nn,Q:fn,s:pn,S:cn,u:Kt,U:Gt,V:Jt,w:Xt,W:Zt,x:function(e,t,i){return _(e,n,t,i)},X:function(e,t,n){return _(e,i,t,n)},y:en,Y:Qt,Z:tn,"%":dn};function k(e,t){return function(n){var i,r,o,s=[],a=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++a<c;)37===e.charCodeAt(a)&&(s.push(e.slice(l,a)),null!=(r=Ft[i=e.charAt(++a)])?i=e.charAt(++a):r="e"===i?" ":"0",(o=t[i])&&(i=o(n,r)),s.push(i),l=a+1);return s.push(e.slice(l,a)),s.join("")}}function M(e,t){return function(n){var i,r,o=jt(1900,void 0,1);if(_(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?(r=(i=Pt(jt(o.y,0,1))).getUTCDay(),i=r>4||0===r?pt.ceil(i):pt(i),i=nt.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(r=(i=Lt(jt(o.y,0,1))).getDay(),i=r>4||0===r?st.ceil(i):st(i),i=tt.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?Pt(jt(o.y,0,1)).getUTCDay():Lt(jt(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Pt(o)):Lt(o)}}function _(e,t,n,i){for(var r,o,s=0,a=t.length,l=n.length;s<a;){if(i>=l)return-1;if(37===(r=t.charCodeAt(s++))){if(r=t.charAt(s++),!(o=w[r in Ft?t.charAt(s++):r])||(i=o(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return b.x=k(n,b),b.X=k(i,b),b.c=k(t,b),x.x=k(n,x),x.X=k(i,x),x.c=k(t,x),{format:function(e){var t=k(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=k(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e+="",!0);return t.toString=function(){return e},t}}}var Ft={"-":"",_:" ",0:"0"},Ht=/^\s*\d+/,Vt=/^%/,Bt=/[\\^$*+?|[\]().{}]/g;function $t(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(t)+r:r)}function Wt(e){return e.replace(Bt,"\\$&")}function Ut(e){return new RegExp("^(?:"+e.map(Wt).join("|")+")","i")}function Yt(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function Xt(e,t,n){var i=Ht.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function Kt(e,t,n){var i=Ht.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Gt(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function Jt(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function Zt(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function Qt(e,t,n){var i=Ht.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function en(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function tn(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function nn(e,t,n){var i=Ht.exec(t.slice(n,n+1));return i?(e.q=3*i[0]-3,n+i[0].length):-1}function rn(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function on(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function sn(e,t,n){var i=Ht.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function an(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function ln(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function cn(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function un(e,t,n){var i=Ht.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function hn(e,t,n){var i=Ht.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function dn(e,t,n){var i=Vt.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function fn(e,t,n){var i=Ht.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function pn(e,t,n){var i=Ht.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function gn(e,t){return $t(e.getDate(),t,2)}function mn(e,t){return $t(e.getHours(),t,2)}function yn(e,t){return $t(e.getHours()%12||12,t,2)}function vn(e,t){return $t(1+tt.count(xt(e),e),t,3)}function bn(e,t){return $t(e.getMilliseconds(),t,3)}function xn(e,t){return bn(e,t)+"000"}function wn(e,t){return $t(e.getMonth()+1,t,2)}function kn(e,t){return $t(e.getMinutes(),t,2)}function Mn(e,t){return $t(e.getSeconds(),t,2)}function _n(e){var t=e.getDay();return 0===t?7:t}function Sn(e,t){return $t(ot.count(xt(e)-1,e),t,2)}function qn(e){var t=e.getDay();return t>=4||0===t?ct(e):ct.ceil(e)}function Dn(e,t){return e=qn(e),$t(ct.count(xt(e),e)+(4===xt(e).getDay()),t,2)}function An(e){return e.getDay()}function En(e,t){return $t(st.count(xt(e)-1,e),t,2)}function Cn(e,t){return $t(e.getFullYear()%100,t,2)}function Tn(e,t){return $t((e=qn(e)).getFullYear()%100,t,2)}function Nn(e,t){return $t(e.getFullYear()%1e4,t,4)}function Rn(e,t){var n=e.getDay();return $t((e=n>=4||0===n?ct(e):ct.ceil(e)).getFullYear()%1e4,t,4)}function On(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+$t(t/60|0,"0",2)+$t(t%60,"0",2)}function In(e,t){return $t(e.getUTCDate(),t,2)}function Ln(e,t){return $t(e.getUTCHours(),t,2)}function Pn(e,t){return $t(e.getUTCHours()%12||12,t,2)}function jn(e,t){return $t(1+nt.count(wt(e),e),t,3)}function zn(e,t){return $t(e.getUTCMilliseconds(),t,3)}function Fn(e,t){return zn(e,t)+"000"}function Hn(e,t){return $t(e.getUTCMonth()+1,t,2)}function Vn(e,t){return $t(e.getUTCMinutes(),t,2)}function Bn(e,t){return $t(e.getUTCSeconds(),t,2)}function $n(e){var t=e.getUTCDay();return 0===t?7:t}function Wn(e,t){return $t(ft.count(wt(e)-1,e),t,2)}function Un(e){var t=e.getUTCDay();return t>=4||0===t?yt(e):yt.ceil(e)}function Yn(e,t){return e=Un(e),$t(yt.count(wt(e),e)+(4===wt(e).getUTCDay()),t,2)}function Xn(e){return e.getUTCDay()}function Kn(e,t){return $t(pt.count(wt(e)-1,e),t,2)}function Gn(e,t){return $t(e.getUTCFullYear()%100,t,2)}function Jn(e,t){return $t((e=Un(e)).getUTCFullYear()%100,t,2)}function Zn(e,t){return $t(e.getUTCFullYear()%1e4,t,4)}function Qn(e,t){var n=e.getUTCDay();return $t((e=n>=4||0===n?yt(e):yt.ceil(e)).getUTCFullYear()%1e4,t,4)}function ei(){return"+0000"}function ti(){return"%"}function ni(e){return+e}function ii(e){return Math.floor(+e/1e3)}const ri=Re();ri("d3-number",(function(e,t,n){let i,r;function o(e){return r(e)}function s(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return i=Xe(t),r=i.format(e),this},s(),o.format=function(e,r,o,a){return(o||a)&&(t=o,n=a,s()),i.format(e)(r)},o.pattern=function(t){return t&&(e=t,r=i.format(t)),e},o})),ri("d3-time",(function(e){let t=zt({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 i(e){return n(e)}return i.format=function(e,n){return t.format(e)(n)},i.locale=function(){return t=zt(...arguments),n=t.format(e),this},i.parse=function(e,n){return t.parse(e)(n)},i.parsePattern=function(e){return t.parse(e)},i}));const oi={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return ri(t.type||"d3-number")(t.format||"")})(e)};function si(e){let{id:t=oi.id,key:n=oi.key,min:i=oi.min,max:r=oi.max,type:o=oi.type,tags:s=oi.tags,title:a=oi.title,values:l=oi.values,value:c=oi.value,label:u=oi.label,formatter:h=oi.formatter}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{id:()=>t(e),key:()=>n(e),raw:()=>e,tags:()=>s(e),type:()=>o(e),min:()=>i(e),max:()=>r(e),title:()=>a(e),items:()=>l(e),formatter:()=>h(e),value:c,label:u}}const ai=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),li=e=>e.reduce(((e,t)=>e+t),0),ci={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=ai(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=ai(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=ai(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=ai(e),n=t.length;return n?li(t)/n:NaN}};function ui(e,t,n,i){const r={},o=i.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((s=>{const a=n[s],l=r[s]={};-1!==["number","string","boolean"].indexOf(typeof a)?(l.type="primitive",l.value=a):"function"==typeof a?(l.type="function",l.value=a,l.label=a,l.field=o):"object"==typeof a&&(a.fields?l.fields=a.fields.map((n=>ui(e,t,{main:n},i).main)):void 0!==a.field?(l.type="field",l.field=t.field(a.field),l.value=l.field.value,l.label=l.field.label):o&&(l.value=o.value,l.label=o.label,l.field=o),"function"==typeof a.filter&&(l.filter=a.filter),void 0!==a.value&&(l.value=a.value),void 0!==a.label&&(l.label=a.label),"function"==typeof a.reduce?l.reduce=a.reduce:a.reduce?l.reduce=ci[a.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?ci[l.field.reduce]:l.field.reduce),"function"==typeof a.reduceLabel?l.reduceLabel=a.reduceLabel:a.reduceLabel?l.reduceLabel=ci[a.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?ci[l.field.reduceLabel]:l.field.reduceLabel))})),r}function hi(e,t){const{main:n}=ui(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:ui(e,t,e.props||{},n),main:n}}function di(e,t,n,i){const r=Array(e.length),o=Array(e.length);let s;for(let t=0;t<e.length;t++)s=i?e[t][i]:e[t],r[t]=s.value,o[t]=s.label;const a=t.reduce,l=t.reduceLabel,c=a?a(r):r,u={value:c,label:l?l(o,c):n?n(c):String(c)};return i&&e[0][i].source?(u.source=e[0][i].source,u):!i&&e[0].source?(u.source=e[0].source,u):u}function fi(e,t){let{main:n,propsArr:i,props:r}=t,o=[];const s=n.field.formatter(),a={};return i.forEach((e=>{a[e]=r[e].field?r[e].field.formatter():e=>e})),o.push(...e.map((e=>{const t=di(e.items,n,s);return i.forEach((n=>{t[n]=di(e.items,r[n],a[n],n)})),t}))),o}function pi(e){let{cfg:t,itemData:n,obj:i,target:r,tracker:o,trackType:s}=e;const a="function"===s?t.trackBy(n):n[t.trackBy];let l=o[a];l||(l=o[a]={items:[],id:a},r.push(l)),l.items.push(i)}function gi(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let i=0;i<n;i++)t<e[i]&&(t=e[i]);return t}function mi(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let i=0;i<n;i++)t>e[i]&&(t=e[i]);return t}const yi={diverging:function(e,t){if((a=e.length)>0)for(var n,i,r,o,s,a,l=0,c=e[t[0]].length;l<c;++l)for(o=s=0,n=0;n<a;++n)(r=(i=e[t[n]][l])[1]-i[0])>=0?(i[0]=o,i[1]=o+=r):r<0?(i[1]=s,i[0]=s+=r):i[0]=o},none:Ae,silhouette:function(e,t){if((n=e.length)>0){for(var n,i=0,r=e[t[0]],o=r.length;i<o;++i){for(var s=0,a=0;s<n;++s)a+=e[s][i][1]||0;r[i][1]+=r[i][0]=-a/2}Ae(e,t)}},expand:function(e,t){if((i=e.length)>0){for(var n,i,r,o=0,s=e[0].length;o<s;++o){for(r=n=0;n<i;++n)r+=e[n][o][1]||0;if(r)for(n=0;n<i;++n)e[n][o][1]/=r}Ae(e,t)}},wiggle:function(e,t){if((r=e.length)>0&&(i=(n=e[t[0]]).length)>0){for(var n,i,r,o=0,s=1;s<i;++s){for(var a=0,l=0,c=0;a<r;++a){for(var u=e[t[a]],h=u[s][1]||0,d=(h-(u[s-1][1]||0))/2,f=0;f<a;++f){var p=e[t[f]];d+=(p[s][1]||0)-(p[s-1][1]||0)}l+=h,c+=d*h}n[s-1][1]+=n[s-1][0]=o,l&&(o-=c/l)}n[s-1][1]+=n[s-1][0]=o,Ae(e,t)}}},vi={ascending:function(e){var t=e.map(Ne);return Ee(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,i=e.length,r=e.map(Ne),o=function(e){var t=e.map(Te);return Ee(e).sort((function(e,n){return t[e]-t[n]}))}(e),s=0,a=0,l=[],c=[];for(t=0;t<i;++t)n=o[t],s<a?(s+=r[n],l.push(n)):(a+=r[n],c.push(n));return c.reverse().concat(l)},none:Ee,reverse:function(e){return Ee(e).reverse()}};function bi(e,t,n){const i={},r=t.stackKey,o=t.value,s=t.startProp||"start",a=t.endProp||"end",l=t.offset||"none",c=t.order||"none",u=t.valueRef||"";let h=0,d={};for(let t=0;t<e.items.length;t++){let n=e.items[t],o=u?n[u]:null;if(o&&o.source){let e="".concat(o.source.key||"","/").concat(o.source.field);d[e]||(d[e]=o.source)}let s=r(n);i[s]=i[s]||{items:[]},i[s].items.push(n),h=Math.max(h,i[s].items.length)}const f=Array.apply(null,{length:h}).map(Number.call,Number),p=Object.keys(i).map((e=>i[e].items)),g=function(){var e=P([]),t=Ee,n=Ae,i=Ce;function r(r){var o,s,a=e.apply(this,arguments),l=r.length,c=a.length,u=new Array(c);for(o=0;o<c;++o){for(var h,d=a[o],f=u[o]=new Array(l),p=0;p<l;++p)f[p]=h=[0,+i(r[p],d,p,r)],h.data=r[p];f.key=d}for(o=0,s=t(u);o<c;++o)u[s[o]].index=o;return n(u,s),u}return r.keys=function(t){return arguments.length?(e="function"==typeof t?t:P(ue.call(t)),r):e},r.value=function(e){return arguments.length?(i="function"==typeof e?e:P(+e),r):i},r.order=function(e){return arguments.length?(t=null==e?Ee:"function"==typeof e?e:P(ue.call(e)),r):t},r.offset=function(e){return arguments.length?(n=null==e?Ae:e,r):n},r}().keys(f).value(((e,t)=>e[t]?o(e[t]):0)).order(vi[c]).offset(yi[l]);let m=g(p),y=[];for(let e=0;e<m.length;e++){let t=m[e];for(let e=0;e<t.length;e++){let n=t[e],i=t[e].data[t.key];i&&(i[s]={value:n[0]},i[a]={value:n[1]},y.push(n[0],n[1]))}}let v=Object.keys(d).map((e=>{let t=n(d[e].key);return t?t.field(d[e].field):null})).filter((e=>!!e));const b=si({title:v.map((e=>e.title())).join(", "),min:mi(y),max:gi(y),type:"measure",formatter:v[0]?v[0].formatter:void 0});e.fields.push(b)}function xi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map((e=>({value:e,label:String(e)})));else if(e){if("collection"in e)n=x({},t.collection(e.collection));else{const r=t.dataset?t.dataset(e.source):null;let o=e.value||(e=>e),s=e.label||(e=>e);if(e.groupBy||e.mapTo)i.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=r.hierarchy?r.hierarchy(e.hierarchy):null,n.fields=r.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map((e=>({value:o(e),label:String(s(e))})));else if(e.extract){const i=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const o=[];i.forEach((e=>{const i=e.source?t.dataset(e.source):r;i&&(n.items=[...n.items,...i.extract(e)],void 0!==e.field&&o.push(i.field(e.field)))})),o.length&&(n.fields=o),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&r){const t=r.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(o=t.value||(e=>e),s=t.label||(e=>e),n.value=o),n.items=t.items().map((t=>({value:o(t),label:String(s(t)),source:{field:e.field}}))))}else e.fields&&e.fields.forEach((e=>{const i="object"==typeof e&&e.source?t.dataset(e.source):r;if(!i)return;let o;o="object"==typeof e&&void 0!==e.field?i.field(e.field):i.field(e),o&&(n.fields||(n.fields=[]),n.fields.push(o))}));n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&bi(n,e.stack,t.dataset)}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function wi(e,t,n){let i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:xi;if(e.data){const i=r(e.data,t,n);if(i&&i.fields&&i.fields[0])return i.fields[0].formatter()}if(i=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(i)){return n.formatter.get(i)(e.format||"")}throw new Error("Formatter of type '".concat(i,"' was not found"))}function ki(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const Mi=Symbol("implicit");function _i(){var e=new At,t=[],n=[],i=Mi;function r(r){let o=e.get(r);if(void 0===o){if(i!==Mi)return i;e.set(r,o=t.push(r)-1)}return n[o%n.length]}return r.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new At;for(const i of n)e.has(i)||e.set(i,t.push(i)-1);return r},r.range=function(e){return arguments.length?(n=Array.from(e),r):n.slice()},r.unknown=function(e){return arguments.length?(i=e,r):i},r.copy=function(){return _i(t,n).unknown(i)},ki.apply(r,arguments),r}function Si(){var e,t,n=_i().unknown(void 0),i=n.domain,r=n.range,o=0,s=1,a=!1,l=0,c=0,u=.5;function h(){var n=i().length,h=s<o,d=h?s:o,f=h?o:s;e=(f-d)/Math.max(1,n-l+2*c),a&&(e=Math.floor(e)),d+=(f-d-e*(n-l))*u,t=e*(1-l),a&&(d=Math.round(d),t=Math.round(t));var p=function(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(r);++i<r;)o[i]=e+i*n;return o}(n).map((function(t){return d+e*t}));return r(h?p.reverse():p)}return delete n.unknown,n.domain=function(e){return arguments.length?(i(e),h()):i()},n.range=function(e){return arguments.length?([o,s]=e,o=+o,s=+s,h()):[o,s]},n.rangeRound=function(e){return[o,s]=e,o=+o,s=+s,a=!0,h()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(a=!!e,h()):a},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),h()):u},n.copy=function(){return Si(i(),[o,s]).round(a).paddingInner(l).paddingOuter(c).align(u)},ki.apply(h(),arguments)}function qi(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Di(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Ai(){}var Ei=.7,Ci=1/Ei,Ti="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ri="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Oi=/^#([0-9a-f]{3,8})$/,Ii=new RegExp(`^rgb\\(${Ti},${Ti},${Ti}\\)$`),Li=new RegExp(`^rgb\\(${Ri},${Ri},${Ri}\\)$`),Pi=new RegExp(`^rgba\\(${Ti},${Ti},${Ti},${Ni}\\)$`),ji=new RegExp(`^rgba\\(${Ri},${Ri},${Ri},${Ni}\\)$`),zi=new RegExp(`^hsl\\(${Ni},${Ri},${Ri}\\)$`),Fi=new RegExp(`^hsla\\(${Ni},${Ri},${Ri},${Ni}\\)$`),Hi={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 Vi(){return this.rgb().formatHex()}function Bi(){return this.rgb().formatRgb()}function $i(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Oi.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Wi(t):3===n?new Xi(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ui(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ui(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=Ii.exec(e))?new Xi(t[1],t[2],t[3],1):(t=Li.exec(e))?new Xi(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Pi.exec(e))?Ui(t[1],t[2],t[3],t[4]):(t=ji.exec(e))?Ui(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zi.exec(e))?er(t[1],t[2]/100,t[3]/100,1):(t=Fi.exec(e))?er(t[1],t[2]/100,t[3]/100,t[4]):Hi.hasOwnProperty(e)?Wi(Hi[e]):"transparent"===e?new Xi(NaN,NaN,NaN,0):null}function Wi(e){return new Xi(e>>16&255,e>>8&255,255&e,1)}function Ui(e,t,n,i){return i<=0&&(e=t=n=NaN),new Xi(e,t,n,i)}function Yi(e,t,n,i){return 1===arguments.length?function(e){return e instanceof Ai||(e=$i(e)),e?new Xi((e=e.rgb()).r,e.g,e.b,e.opacity):new Xi}(e):new Xi(e,t,n,null==i?1:i)}function Xi(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function Ki(){return`#${Qi(this.r)}${Qi(this.g)}${Qi(this.b)}`}function Gi(){const e=Ji(this.opacity);return`${1===e?"rgb(":"rgba("}${Zi(this.r)}, ${Zi(this.g)}, ${Zi(this.b)}${1===e?")":`, ${e})`}`}function Ji(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Zi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Qi(e){return((e=Zi(e))<16?"0":"")+e.toString(16)}function er(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new nr(e,t,n,i)}function tr(e){if(e instanceof nr)return new nr(e.h,e.s,e.l,e.opacity);if(e instanceof Ai||(e=$i(e)),!e)return new nr;if(e instanceof nr)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=t===o?(n-i)/a+6*(n<i):n===o?(i-t)/a+2:(t-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new nr(s,a,l,e.opacity)}function nr(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function ir(e){return(e=(e||0)%360)<0?e+360:e}function rr(e){return Math.max(0,Math.min(1,e||0))}function or(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}qi(Ai,$i,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Vi,formatHex:Vi,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return tr(this).formatHsl()},formatRgb:Bi,toString:Bi}),qi(Xi,Yi,Di(Ai,{brighter(e){return e=null==e?Ci:Math.pow(Ci,e),new Xi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ei:Math.pow(Ei,e),new Xi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xi(Zi(this.r),Zi(this.g),Zi(this.b),Ji(this.opacity))},displayable(){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,formatHex8:function(){return`#${Qi(this.r)}${Qi(this.g)}${Qi(this.b)}${Qi(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Gi,toString:Gi})),qi(nr,(function(e,t,n,i){return 1===arguments.length?tr(e):new nr(e,t,n,null==i?1:i)}),Di(Ai,{brighter(e){return e=null==e?Ci:Math.pow(Ci,e),new nr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ei:Math.pow(Ei,e),new nr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new Xi(or(e>=240?e-240:e+120,r,i),or(e,r,i),or(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new nr(ir(this.h),rr(this.s),rr(this.l),Ji(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ji(this.opacity);return`${1===e?"hsl(":"hsla("}${ir(this.h)}, ${100*rr(this.s)}%, ${100*rr(this.l)}%${1===e?")":`, ${e})`}`}}));var sr=e=>()=>e;function ar(e){return 1===(e=+e)?lr: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(i){return Math.pow(e+i*t,n)}}(t,n,e):sr(isNaN(t)?n:t)}}function lr(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):sr(isNaN(e)?t:e)}var cr=function e(t){var n=ar(t);function i(e,t){var i=n((e=Yi(e)).r,(t=Yi(t)).r),r=n(e.g,t.g),o=n(e.b,t.b),s=lr(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=r(t),e.b=o(t),e.opacity=s(t),e+""}}return i.gamma=e,i}(1);function ur(e,t){t||(t=[]);var n,i=e?Math.min(t.length,e.length):0,r=t.slice();return function(o){for(n=0;n<i;++n)r[n]=e[n]*(1-o)+t[n]*o;return r}}function hr(e,t){var n,i=t?t.length:0,r=e?Math.min(i,e.length):0,o=new Array(r),s=new Array(i);for(n=0;n<r;++n)o[n]=vr(e[n],t[n]);for(;n<i;++n)s[n]=t[n];return function(e){for(n=0;n<r;++n)s[n]=o[n](e);return s}}function dr(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function fr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function pr(e,t){var n,i={},r={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=vr(e[n],t[n]):r[n]=t[n];return function(e){for(n in i)r[n]=i[n](e);return r}}var gr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mr=new RegExp(gr.source,"g");function yr(e,t){var n,i,r,o=gr.lastIndex=mr.lastIndex=0,s=-1,a=[],l=[];for(e+="",t+="";(n=gr.exec(e))&&(i=mr.exec(t));)(r=i.index)>o&&(r=t.slice(o,r),a[s]?a[s]+=r:a[++s]=r),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:fr(n,i)})),o=mr.lastIndex;return o<t.length&&(r=t.slice(o),a[s]?a[s]+=r:a[++s]=r),a.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,i=0;i<t;++i)a[(n=l[i]).i]=n.x(e);return a.join("")})}function vr(e,t){var n,i=typeof t;return null==t||"boolean"===i?sr(t):("number"===i?fr:"string"===i?(n=$i(t))?(t=n,cr):yr:t instanceof $i?cr:t instanceof Date?dr:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?ur:Array.isArray(t)?hr:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?pr:fr)(e,t)}function br(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function xr(e){return+e}var wr=[0,1];function kr(e){return e}function Mr(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function _r(e,t,n){var i=e[0],r=e[1],o=t[0],s=t[1];return r<i?(i=Mr(r,i),o=n(s,o)):(i=Mr(i,r),o=n(o,s)),function(e){return o(i(e))}}function Sr(e,t,n){var i=Math.min(e.length,t.length)-1,r=new Array(i),o=new Array(i),s=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)r[s]=Mr(e[s],e[s+1]),o[s]=n(t[s],t[s+1]);return function(t){var n=Dt(e,t,1,i)-1;return o[n](r[n](t))}}function qr(){var e,t,n,i,r,o,s=wr,a=wr,l=vr,c=kr;function u(){var e=Math.min(s.length,a.length);return c!==kr&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(s[0],s[e-1])),i=e>2?Sr:_r,r=o=null,h}function h(t){return null==t||isNaN(t=+t)?n:(r||(r=i(s.map(e),a,l)))(e(c(t)))}return h.invert=function(n){return c(t((o||(o=i(a,s.map(e),fr)))(n)))},h.domain=function(e){return arguments.length?(s=Array.from(e,xr),u()):s.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),u()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=br,u()},h.clamp=function(e){return arguments.length?(c=!!e||kr,u()):c!==kr},h.interpolate=function(e){return arguments.length?(l=e,u()):l},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,i){return e=n,t=i,u()}}function Dr(e,t,n,i){var r,o=function(e,t,n){n=+n;const i=(t=+t)<(e=+e),r=i?It(t,e,n):It(e,t,n);return(i?-1:1)*(r<0?1/-r:r)}(e,t,n);switch((i=je(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(r=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ie(t)/3)))-Ie(Math.abs(e)))}(o,s))||(i.precision=r),We(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ie(t)-Ie(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(e){return Math.max(0,-Ie(Math.abs(e)))}(o))||(i.precision=r-2*("%"===i.type))}return $e(i)}function Ar(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const i=t<e,[r,o,s]=i?Ot(t,e,n):Ot(e,t,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let e=0;e<a;++e)l[e]=(o-e)/-s;else for(let e=0;e<a;++e)l[e]=(o-e)*s;else if(s<0)for(let e=0;e<a;++e)l[e]=(r+e)/-s;else for(let e=0;e<a;++e)l[e]=(r+e)*s;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var i=t();return Dr(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var i,r,o=t(),s=0,a=o.length-1,l=o[s],c=o[a],u=10;for(c<l&&(r=l,l=c,c=r,r=s,s=a,a=r);u-- >0;){if((r=It(l,c,n))===i)return o[s]=l,o[a]=c,t(o);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r}i=r}return e},e}function Er(){var e=qr()(kr,kr);return e.copy=function(){return t=e,Er().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},ki.apply(e,arguments),Ar(e)}function Cr(){var e,t=[.5],n=[0,1],i=1;function r(r){return null!=r&&r<=r?n[Dt(t,r,0,i)]:e}return r.domain=function(e){return arguments.length?(t=Array.from(e),i=Math.min(t.length,n.length-1),r):t.slice()},r.range=function(e){return arguments.length?(n=Array.from(e),i=Math.min(t.length,n.length-1),r):n.slice()},r.invertExtent=function(e){var i=n.indexOf(e);return[t[i-1],t[i]]},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return Cr().domain(t).range(n).unknown(e)},ki.apply(r,arguments)}function Tr(e){return void 0===e?e=>e:t=>e(t)}function Nr(e){return Math.max(0,Math.min(1,e))}function Rr(e){return"object"==typeof e}function Or(e,t,n){const i=Math.abs(t-n)/(e+1),r=[];for(let o=1;o<=e;o++){const e=o*i;r.push(t<n?t+e:t-e)}return r}function Ir(e,t,n){if(1===e.length)return e;const i=e.concat([]);for(let r=0;r<e.length;r++){let o=e[r],s=e[r+1];0===r&&o!==n.start()?(i.push(...Or(t,o,s)),o-=s-o,s=e[r],i.push(...Or(t,o,s))):r===e.length-1&&s!==n.end()?(s=o+(o-e[r-1]),i.push(...Or(t,o,s))):i.push(...Or(t,o,s))}return i.filter((e=>e>=n.min()&&e<=n.max()))}function Lr(e){let{distance:t,scale:n,minorCount:i=0,unitDivider:r=100,formatter:o}=e;const s=M(r)||M(t)?2:Math.max(t/r,2),a=Math.min(1e3,Math.round(s));let l=n.ticks(a);l.length<=1&&(l=n.ticks(a+1));const c=i>0?Ir(l,i,n):l;c.sort(((e,t)=>e-t));const u=c.map(Tr(o));return c.map(((e,t)=>{const i=n(e);return{position:i,start:i,end:i,label:u[t],value:e,isMinor:-1===l.indexOf(e)}}))}function Pr(e){let{distance:t,scale:n,minorCount:i=0,unitDivider:r=100,formatter:o}=e;const s=M(r)||M(t)?2:Math.max(t/r,2),a=Math.min(1e3,Math.round(s)),l=a>10?10:a;n.nice(l);const c=n.ticks(a),u=i>0?Ir(c,i,n):c;u.sort(((e,t)=>e-t));const h=u.map(Tr(o));return u.map(((e,t)=>{const i=n(e);return{position:i,start:i,end:i,label:h[t],value:e,isMinor:-1===c.indexOf(e)}}))}function jr(e){let t,{settings:n,scale:i,distance:r,formatter:o=e=>e}=e;const s=n.minorTicks&&!M(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter((e=>"object"==typeof e?!M(e.value):!M(e)));t=function(e){let{values:t,scale:n,formatter:i=e=>e}=e;return t.sort(((e,t)=>(Rr(e)?e.value:e)-(Rr(t)?t.value:t))).filter(((e,t,i)=>{const r=Rr(e)?e.value:e;return r<=n.max()&&r>=n.min()&&i.indexOf(e)===t})).map((e=>{const t=Rr(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)?Nr(n(e.start)):o,end:t&&!isNaN(e.end)?Nr(n(e.end)):o}}))}({values:e,scale:i.copy(),formatter:o})}else if(M(n.ticks.count)){t=(n.ticks.tight?Pr:Lr)({distance:r,minorCount:s,unitDivider:n.ticks.distance,scale:i,formatter:o}),n.ticks.forceBounds&&function(e,t,n){const i=e.map((e=>e.position)),r=t.range();-1===i.indexOf(r[0])?e.splice(0,0,{position:r[0],start:r[0],end:r[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const o=e[e.length-1];-1===i.indexOf(r[1])?e.push({position:r[1],start:r[1],end:r[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,i,o)}else{t=function(e){let{count:t,minorCount:n,scale:i,formatter:r}=e;return i.ticks((t-1)*n+t).map(((e,t)=>{const o=i(e);return{position:o,start:o,end:o,label:r(e),isMinor:t%(n+1)!==0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:s,scale:i.copy(),formatter:o})}return t}function zr(){let 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]:{};const i={};return Object.keys(t).forEach((r=>{const o=typeof e[r];i[r]="function"===o?e[r](n):"undefined"===o?t[r]:e[r]})),i}const Fr={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},Hr={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},Vr={count:NaN};function Br(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 $r(){let 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]:{};const i=Er(),r={instance:null,invert:!1},o={data:t,resources:n},s=zr(e,Fr,o);let a;function l(e){return M(e)?NaN:i(e)}s.ticks=zr(e.ticks,Hr,o),s.minorTicks=zr(e.minorTicks,Vr,o),l.data=()=>t,l.invert=function(e){return i.invert(e)},l.rangeRound=function(e){return i.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return i.clamp(e),l},l.cachedTicks=function(){return a},l.clearTicksCache=function(){return a=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=m(!0,{},s,e.settings),e.scale=l,a=jr(e),a):(a=i.ticks(e),a)},l.nice=function(e){return i.nice(e),l},l.tickFormat=function(e,t){return i.tickFormat(e,t)},l.interpolate=function(e){return i.interpolate(e),l},l.domain=function(e){return arguments.length?(i.domain(e),r.instance&&r.instance.domain([l.start(),l.end()]),l):i.domain()},l.range=function(e){return arguments.length?(i.range(e),l):i.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],i=[],r=t/2;for(let o=0;o<e;o++){let e=n[n.length-1]||0,o=e+t,s=l(e+r);n.push(o,o),i.push(s,s)}return n.pop(),l.domain(n),l.range(i),l},l.copy=function(){const r=$r(e,t,n);return r.domain(l.domain()),r.range(l.range()),r.clamp(i.clamp()),r},l.norm=function(e){return Br(r,l),r.instance(e)},l.normInvert=function(e){return Br(r,l),r.instance.invert(e)};const{mini:c,maxi:u}=function(e,t){const n=+e.min,i=+e.max;let r=0,o=1;if(t&&t[0]){const n=t.map((e=>e.min())).filter((e=>!isNaN(e))),i=t.map((e=>e.max())).filter((e=>!isNaN(e)));if(r=n.length?Math.min(...n):Number.NaN,o=i.length?Math.max(...i):Number.NaN,isNaN(r)||isNaN(o))r=-1,o=1;else if(r===o&&0===r)r=-1,o=1;else if(r===o&&r)r-=Math.abs(.1*r),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){const t=o-r;r-=t*e.expand,o+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter((e=>!isNaN(e)));r=Math.min(...t,r),o=Math.max(...t,o)}}return{mini:isNaN(n)?r:n,maxi:isNaN(i)?o:i}}(s,t?t.fields:[]);return l.domain([c,u]),l.range(s.invert?[1,0]:[0,1]),r.invert=s.invert,l}const Wr={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function Ur(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},i=zr(e,Wr,n),r=t.items||[],o={},s=[],a=[];function l(e,n){e.data=()=>t,e.datum=e=>r[o[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>a,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let{scale:t}=e;const n=t.domain(),i=t.data().items,r=t.labels?t.labels():n,o=t.bandwidth();return n.map(((e,n)=>{const s=t(e);return{position:s+o/2,label:"".concat(r[n]),data:i?i[n]:void 0,start:s,end:s+o}}))}(t,n.trackBy)}}const c=Si();l(c,e),c.pxScale=function(t){const n=i.maxPxStep;if(isNaN(n))return c;const r=c.domain().length,o=Math.max(1,r-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;const s=c.copy();s.type=c.type,l(s,e);const a=o*n/t,u=(1-a)*c.align();return s.range(i.invert?[a+u,u]:[u,a+u]),s};const u="function"==typeof e.value?e.value:e=>e.datum.value,h="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<r.length;e++){const t=m({datum:r[e]},n),i=u(t,e);-1===s.indexOf(i)&&(s.push(i),a.push(h(t,e)),o[i]=e)}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}const Yr={depth:0};function Xr(e,t,n){return e.ancestors().map((e=>t(m({datum:e.data},n)))).reverse().slice(1).toString()}const Kr=e=>e.min(),Gr=e=>e.max();function Jr(e,t){const n=e&&!isNaN(e.min),i=e&&!isNaN(e.max);let r=n?+e.min:0,o=i?+e.max:1;if(t&&t.length){if(!n){const e=t.map(Kr).filter(k);r=e.length?Math.min(...e):r}if(!i){const e=t.map(Gr).filter(k);o=e.length?Math.max(...e):o}}return[r,o]}const Zr={domain:[],range:[],invert:!1,min:NaN,max:NaN};function Qr(){let 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]:{};const i=$r(e,t,n).clamp(!0).interpolate(cr),r=zr(e,Zr,{data:t,resources:n}),o=Array.isArray(r.domain)&&r.domain.length,s=Array.isArray(r.range)&&r.range.length,a=i;m(!0,a,i);const[l,c]=Jr(r,t?t.fields:[]),u=o?r.domain.length:-1,h=n.theme?n.theme.palette("sequential",u>0?u:2):[],d=s?r.range:h;return a.range(r.invert?d.slice().reverse():d.slice()),a.domain(o?r.domain:function(e,t,n){const i=e.length;if(2===i)return[t,n];const r=[],o=(n-t)/(i-1);r.push(t);for(let e=1;e<i-1;e++)r.push(t+o*e);return r.push(n),r}(a.range(),l,c)),a}const eo={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function to(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const no={domain:[],range:[]};const io={domain:[],range:[],unknown:void 0},ro={domain:[],range:[],override:!1};const oo=Re();function so(e,t,n){let i=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),i={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((e=>{i.extract.push({field:e})})));const r=xi(i,t,n);let o,s=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map((e=>"dimension"===e.type()?"band":"linear"));return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(r);return"color"===s&&(s=r.fields&&r.fields[0]&&"dimension"===r.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(s)&&(o=n.scale.get(s),o=o(e,r,{theme:n.theme,logger:n.logger}),o.type=s),o}oo("linear",$r),oo("band",Ur),oo("h-band",(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={data:n,resources:i},o=zr(t,Wr,r);o.ticks=zr(t.ticks,Yr,r),o.value="function"==typeof t.value?t.value:e=>e.datum.value,o.label="function"==typeof t.label?t.label:e=>e.datum.value;let s=Ur(o);const{values:a,labels:l,items:c,ticks:u}=function(e,t,n){const i=t.ticks.depth,r=t.value,o=t.label,s=[],a=[],l={},c=[];let u=0;if(!e)return{values:s,labels:a,items:l,ticks:c};e.eachAfter((e=>{if(e.depth>0){const t=Xr(e,r,n),h=e.leaves()||[e],d=r(m({datum:e.data},n)),f=o(m({datum:e.data},n)),p=Array.isArray(e.children),g={key:t,count:h.length,value:d,label:f,leftEdge:Xr(h[0],r,n),rightEdge:Xr(h[Math.max(h.length-1,0)],r,n),node:e};p?(s.push("SPACER_".concat(u,"_SPACER")),u++):(s.push(t),a.push(f)),(i<=0&&!p||e.depth===i)&&c.push(g),l[t]=g}}));const h=e.height-1;return h>0&&s.splice(-h),{values:s,labels:a,items:l,ticks:c}}(n.root,o,r),h=function(e){const t=String(e),n=c[t];return s(n?o.invert?n.rightEdge:n.leftEdge:t)};m(!0,h,s),h.bandwidth=function(e){const t=c[String(e)],n=s.bandwidth();if(t&&!t.isLeaf){const e=h(t.leftEdge),i=h(t.rightEdge);return Math.abs(e-i)+n}return n},h.step=function(e){const t=c[String(e)],n=t?t.count:1;let i=s.step();return i*=n,i},h.data=()=>n,h.datum=e=>{const t=c[String(e)];return t?t.node.data:null},h.copy=()=>e(t,n,i),h.labels=()=>l,h.ticks=()=>u.map((e=>{const t=h(e.key),n=h.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}}));const d=s.pxScale;return h.pxScale=function(e){return s=d(e),h},h.domain(a),h})),oo("sequential-color",Qr),oo("threshold-color",(function(){let 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]:{};const i=Cr(),r=zr(e,eo,{data:t,resources:n}),o=Array.isArray(r.domain)&&r.domain.length,s=Array.isArray(r.range)&&r.range.length;function a(e){return M(e)?NaN:i(e)}Object.keys(i).forEach((e=>a[e]=i[e]));const l=t.fields,[c,u]=Jr(r,l),h=o?r.domain.length:-1,d=n.theme?n.theme.palette("sequential",h>0?h:2):[];let f=s?r.range:d,p=[];return p=o?r.domain:r.nice?function(e,t,n){const i=2===e.length?10:Math.max(1,e.length),r=Er().domain([t,n]).nice(i).ticks(i);if(!e||!e.length)return r;const o=Math.max(0,e.length-1);for(;r.length>o;)r[0]-t<=n-r[r.length-1]?r.shift():r.pop();return r}(f,c,u):[c+(u-c)/2],f.length>p.length+1?p=function(e,t,n){const i=e.length;if(2===i)return[t+(n-t)/2];const r=[],o=(n-t)/i;for(let e=1;e<i;e++)r.push(t+o*e);return r}(f,c,u):f.length<p.length+1&&(f=function(e,t,n,i){n=e[0],i=e&&e.length>=2?e[e.length-1]:i;const r=Qr().domain([n,i]).range(t);return[n,...to(e),i].map((e=>r(e)))}(p,f,c,u)),a.data=()=>t,a.range(r.invert?f.slice().reverse():f),a.domain(p),a})),oo("categorical-color",(function(){let 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]:{};const i=function(){let 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]:{};const i=_i(),r={data:t,resources:n},o=zr(e,no,r),s="function"==typeof e.value?e.value:e=>e.datum.value,a="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},u=[],h=[];for(let e=0;e<l.length;e++){const t=m({datum:l[e]},r),n=s(t,e);-1===u.indexOf(n)&&(u.push(n),h.push(a(t,e)),c[n]=e)}return i.data=()=>t,i.labels=()=>h,i.label=e=>h[u.indexOf(e)],i.datum=e=>l[c[e]],i.range(o.range),Array.isArray(o.domain)&&o.domain.length?i.domain(o.domain):i.domain(u),i}(e,t,n),r=n.theme,o=zr(e,io,{data:t,resources:n});let s;if(o.explicit=zr(e.explicit,ro,{data:t,resources:n}),s=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():r?r.palette("categorical",i.domain().length).slice():[],o.unknown)i.unknown(o.unknown);else if(r&&r.palette("unknown")){let e=r.palette("unknown");i.unknown(e[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){const e=i.domain().slice(),t=o.explicit.domain,n=Array.isArray(o.explicit.range)?o.explicit.range:[],r=Math.floor(e.length/s.length);for(let e=1;e<r+1;e*=2)s=s.concat(s);if(o.explicit.override)for(let i=0;i<t.length;i++){const r=e.indexOf(t[i]);r>-1&&(s[r]=n[i])}else{const i=t.map(((t,i)=>[e.indexOf(t),t,n[i]])).sort(((e,t)=>e[0]-t[0]));i.forEach((t=>{const n=e.indexOf(t[1]);-1!==n&&s.splice(n,0,t[2])}))}s.length=e.length}return i.range(s),i}));var ao={};function lo(){lo.init.call(this)}ao.isObject=function(e){return"object"==typeof e&&null!==e},ao.isNumber=function(e){return"number"==typeof e},ao.isUndefined=function(e){return void 0===e},ao.isFunction=function(e){return"function"==typeof e};var co=lo;lo.EventEmitter=lo,lo.prototype._events=void 0,lo.prototype._maxListeners=void 0,lo.defaultMaxListeners=10,lo.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},lo.prototype.setMaxListeners=function(e){if(!ao.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},lo.prototype.emit=function(e){var t,n,i,r,o,s;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],ao.isUndefined(n))return!1;if(ao.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(i=arguments.length,r=new Array(i-1),o=1;o<i;o++)r[o-1]=arguments[o];n.apply(this,r)}else if(ao.isObject(n)){for(i=arguments.length,r=new Array(i-1),o=1;o<i;o++)r[o-1]=arguments[o];for(i=(s=n.slice()).length,o=0;o<i;o++)s[o].apply(this,r)}return!0},lo.prototype.addListener=function(e,t){var n;if(!ao.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,ao.isFunction(t.listener)?t.listener:t),this._events[e]?ao.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,ao.isObject(this._events[e])&&!this._events[e].warned)&&((n=ao.isUndefined(this._maxListeners)?lo.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,ao.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),ao.isFunction(console.trace)&&console.trace()));return this},lo.prototype.on=lo.prototype.addListener,lo.prototype.once=function(e,t){if(!ao.isFunction(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},lo.prototype.removeListener=function(e,t){var n,i,r,o;if(!ao.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=(n=this._events[e]).length,i=-1,n===t||ao.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(ao.isObject(n)){for(o=r;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){i=o;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},lo.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],ao.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},lo.prototype.listeners=function(e){return this._events&&this._events[e]?ao.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},lo.listenerCount=function(e,t){return e._events&&e._events[t]?ao.isFunction(e._events[t])?1:e._events[t].length:0};var uo={mixin:e=>(Object.keys(co.prototype).forEach((t=>{e[t]=co.prototype[t]})),co.init(e),e)};function ho(){let e=0,t=0,n=0,i=0;n=n||e;const r={move(e){this.moveTo(n+e)},moveTo(o){const s=Math.max(e,Math.min(t-i,o));n!==s&&(n=s,r.emit("update"))},update(o){let s=!1;({min:e=e,max:t=t}=o),void 0!==o.viewSize&&o.viewSize!==i&&(i=o.viewSize,s=!0);const a=Math.max(e,Math.min(t-i,n));n!==a&&(n=a,s=!0),s&&r.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:i})};return uo.mixin(r),r}function fo(e,t){const n=e.min||0,i=e.max||0,r=e.viewSize||0,o=t||ho();return o.update({min:n,max:i,viewSize:r}),o}function po(e,t){return e<=t}function go(e,t){return e<t}function mo(e,t,n){let i=0;for(;i<e.length&&t>e[i];)++i;return e[i]===t&&n&&++i,i}function yo(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=[];function r(){}return r.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{includeMax:i=!0,includeMin:r=!0}=n;e=i?po:go,t=r?po:go},r.add=e=>{let{min:t,max:n}=e;const r=mo(i,t),o=mo(i,n,!0),s=[r,o-r];r%2==0&&s.push(t),o%2==0&&s.push(n);const a=i.join(",");i.splice(...s);return a!==i.join(",")},r.remove=e=>{let{min:t,max:n}=e;const r=mo(i,t),o=mo(i,n,!0),s=[r,o-r];r%2==1&&s.push(t),o%2==1&&s.push(n);const a=i.join(",");i.splice(...s);return a!==i.join(",")},r.set=e=>{const t=i.join(",");i=[],Array.isArray(e)?e.forEach(r.add):r.add(e);return t!==i.join(",")},r.clear=()=>{const e=i.length>0;return i=[],e},r.containsValue=n=>function(e,t,n,i){const r=e.length;for(let o=1;o<r;o+=2)if(n(e[o-1],t)&&i(t,e[o]))return!0;return!1}(i,n,t,e),r.containsRange=e=>{let{min:t,max:n}=e;const r=mo(i,t,!0),o=mo(i,n);return r===o&&o%2==1},r.toggle=e=>r.containsRange(e)?r.remove(e):r.add(e),r.ranges=()=>{const e=[];for(let t=1;t<i.length;t+=2)e.push({min:i[t-1],max:i[t]});return e},r.configure(n),r}function vo(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const bo={key:void 0,includeMin:!0,includeMax:!0};function xo(e){let{items:t,collection:n,vc:i}=e;const r={},o=[];let s,a;for(let e=0,o=t.length;e<o;e++){s=t[e].key,n[s]||(n[s]=i()),a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[s].add(a[e])&&(r[s]=r[s]||[],r[s].push(a[e]))}const l=Object.keys(r);for(let e=0,t=l.length;e<t;e++)s=l[e],o.push({id:s,values:r[s]});return o}function wo(e){let{items:t,collection:n}=e;const i={},r=[];let o,s;for(let e=0,r=t.length;e<r;e++)if(o=t[e].key,n[o]){s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[o].remove(s[e])&&(i[o]=i[o]||[],i[o].push(s[e]))}const a=Object.keys(i);for(let e=0,t=a.length;e<t;e++)o=a[e],r.push({id:o,values:i[o]});return r}function ko(e){const t={};let n,i;for(let r=0,o=e.length;r<o;r++){n=e[r].key,i=e[r].values||[e[r].value],t[n]||(t[n]=[]);for(let e=0;e<i.length;e++){-1===t[n].indexOf(i[e])&&t[n].push(i[e])}}return t}function Mo(e){let{key:t,collection:n,obj:i,fn:r,value:o}=e;n[t]||(n[t]=r()),i[t]=i[t]||[],i[t].push(o),n[t].add(o)}function _o(e,t){const n=[],i=Object.keys(e);let r,o;const s=e=>-1===t[r].indexOf(e);for(let a=0,l=i.length;a<l;a++)r=i[a],t[r]?(o=e[r].filter(s),o.length&&n.push({id:r,values:o})):n.push({id:r,values:e[r]});return n}function So(e,t,n){const i=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,i=Array(n);for(let r=0;r<n;r++)i[r]=e[r].key in t?m({},e[r],{key:t[e[r].key]}):e[r];return i}(t,n);return e&&e.length?e.reduce(((e,t)=>t(e)),i):i}function qo(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function Do(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function Ao(e,t,n){let{ranges:i,interceptors:r,rc:o,aliases:s,rangeConfig:a}=n;const l=So(r["".concat(t,"Ranges")],e,s);let c=!1;return l.forEach((e=>{const n=e.key;if(i[n]||(i[n]=o(a.sources[n]||a.default)),"set"===t)c=i[n][t](e.ranges||e.range)||c;else{const r=e.ranges||[e.range];for(let e=0;e<r.length;e++)c=i[n][t](r[e])||c}})),c}function Eo(){let{vc:e=vo,rc:t=yo}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,i={},r={},o={},s={sources:{},default:m({},bo)};const a={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},l=()=>{const e={values:{},ranges:{}};return Object.keys(r).forEach((t=>{e.values[t]=r[t].values()})),Object.keys(i).forEach((t=>{e.ranges[t]=i[t].ranges()})),e},c={ls:[],clear(){this.ls.forEach((e=>e.clear()))},start(){this.ls.forEach((e=>e.start()))},end(){this.ls.forEach((e=>e.end()))},update(){const e=l();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=l();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=l();this.ls.forEach((t=>t._state({ranges:e.ranges})))}},u={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(s={sources:{},default:m({},bo)},e.ranges.forEach((e=>{const t={};Object.keys(bo).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:bo[n]})),void 0!==e.key?s.sources[e.key]=t:s.default=t})),Object.keys(i).forEach((e=>i[e].configure(s.sources[e]||s.default))),u.emit("update",[],[]))},link:e=>{if(u===e)throw new Error("Can't link to self");c.ls.push(e),e._state(l())},_state:e=>{if(!e)return l();if(e.values){const t=[];Object.keys(e.values).forEach((n=>{r[n]&&e.values[n].join(";")===r[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(r).forEach((n=>{e.values[n]||t.push({key:n,values:[]})})),t.length&&u.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach((n=>{i[n]&&e.ranges[n].join(";")===i[n].toString()||t.push({key:n,ranges:e.ranges[n]})})),Object.keys(i).forEach((n=>{e.ranges[n]||t.push({key:n,ranges:[]})})),t.length&&u.setRanges(t)}},start:function(){if(!n){n=!0;for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];u.emit("start",...t),c.start()}},end:function(){if(n){n=!1,i={},r={};for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];u.emit("end",...t),c.end()}},isActive:()=>n,clear:()=>{const e=u.brushes().filter((e=>"value"===e.type&&e.brush.values().length)).map((e=>({id:e.id,values:e.brush.values()}))),t=Object.keys(i).length>0||e.length;i={},r={},t&&(u.emit("update",[],e),c.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(i).map((e=>({type:"range",id:e,brush:i[e]})))),e=e.concat(Object.keys(r).map((e=>({type:"value",id:e,brush:r[e]})))),e},addValue:(e,t)=>{u.addValues([{key:e,value:t}])},addValues:t=>{const i=So(a.addValues,t,o),s=xo({vc:e,collection:r,items:i});u.emit("add-values",i),s.length&&(n||(n=!0,u.emit("start")),u.emit("update",s,[]),c.updateValues())}};return u.setValues=t=>{const i=So(a.setValues,t,o),s=function(e){let{items:t,vCollection:n,vc:i}=e;const r={},o=ko(t);let s,a=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)s=u[e],c[s]=n[s].values().slice(),delete n[s];const h=e=>{n[s]&&n[s].contains(e)||Mo({key:s,value:e,collection:n,obj:r,fn:i})},d=Object.keys(o);for(let e=0,t=d.length;e<t;e++)s=d[e],o[s].forEach(h);return l=_o(c,r),a=_o(r,c),[a,l]}({items:i,vCollection:r,vc:e});u.emit("set-values",i),(s[0].length>0||s[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",s[0],s[1]),c.updateValues())},u.removeValue=(e,t)=>{u.removeValues([{key:e,value:t}])},u.removeValues=e=>{const t=So(a.removeValues,e,o),n=wo({collection:r,items:t});u.emit("remove-values",t),n.length&&(u.emit("update",[],n),c.updateValues())},u.addAndRemoveValues=(t,i)=>{const s=So(a.addValues,t,o),l=So(a.removeValues,i,o),h=xo({vc:e,collection:r,items:s}),d=wo({collection:r,items:l});u.emit("add-values",s),u.emit("remove-values",l),(h.length||d.length)&&(n||(n=!0,u.emit("start")),u.emit("update",h,d),c.updateValues())},u.toggleValue=(e,t)=>{u.toggleValues([{key:e,value:t}])},u.toggleValues=t=>{const i=So(a.toggleValues,t,o),s=function(e){let{items:t,values:n,vc:i}=e;const r={},o={},s=[],a=[],l=ko(t);let c,u,h;const d=Object.keys(l);for(let e=0,t=d.length;e<t;e++){c=d[e],h=l[c];for(let e=0,t=h.length;e<t;e++)u=h[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(o[c]=o[c]||[],o[c].push(u),n[c].remove(u)):Mo({key:c,value:u,collection:n,obj:r,fn:i})}const f=Object.keys(r);for(let e=0,t=f.length;e<t;e++)c=f[e],s.push({id:c,values:r[c]});const p=Object.keys(o);for(let e=0,t=p.length;e<t;e++)c=p[e],a.push({id:c,values:o[c]});return[s,a]}({items:i,values:r,vc:e});u.emit("toggle-values",i),(s[0].length>0||s[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",s[0],s[1]),c.updateValues())},u.containsValue=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].contains(t)},u.addRange=(e,t)=>{u.addRanges([{key:e,range:t}])},u.addRanges=e=>{Ao(e,"add",{ranges:i,rc:t,interceptors:a,aliases:o,rangeConfig:s})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.removeRange=(e,t)=>{u.removeRanges([{key:e,range:t}])},u.removeRanges=e=>{Ao(e,"remove",{ranges:i,rc:t,interceptors:a,aliases:o,rangeConfig:s})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.setRange=(e,t)=>{u.setRanges([{key:e,range:t}])},u.setRanges=e=>{Ao(e,"set",{ranges:i,rc:t,interceptors:a,aliases:o,rangeConfig:s})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.toggleRange=(e,t)=>{u.toggleRanges([{key:e,range:t}])},u.toggleRanges=e=>{Ao(e,"toggle",{ranges:i,rc:t,interceptors:a,aliases:o,rangeConfig:s})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.containsRangeValue=(e,t)=>{let n=o[e]||e;return!!i[n]&&i[n].containsValue(t)},u.containsRange=(e,t)=>{let n=o[e]||e;return!!i[n]&&i[n].containsRange(t)},u.containsMappedData=(e,t,n)=>{let s=[];const a=Object.keys(e);let l,c,u,h;for(let t=0,n=a.length;t<n;t++){if(l=a[t],"value"===l)c=e,s[t]={key:"",i:t,bool:!1};else{if("source"===l)continue;c=e[l],s[t]={key:l,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in o&&(u=o[u]),h=c.value,i[u]?s[t].bool=Array.isArray(h)?i[u].containsRange({min:h[0],max:h[1]}):i[u].containsValue(h):r[u]&&r[u].contains(h)&&(s[t].bool=!0))}return t?(s=s.filter((e=>-1!==t.indexOf(e.key))),"and"===n?!!s.length&&!s.some((e=>!1===e.bool)):"xor"===n?!!s.length&&s.some((e=>e.bool))&&s.some((e=>!1===e.bool)):s.some((e=>e.bool))):s.some((e=>e.bool))},u.intercept=(e,t)=>{const n=qo(e);a[n]&&a[n].push(t)},u.removeInterceptor=(e,t)=>{const n=qo(e);if(!a[n])return;const i=a[n].indexOf(t);-1!==i&&a[n].splice(i,1)},u.removeAllInterceptors=e=>{const t=[];if(e){const n=qo(e);a[n]&&a[n].length&&t.push({name:e,handlers:a[n]})}else Object.keys(a).forEach((e=>{a[e].length&&t.push({name:Do(e),handlers:a[e]})}));t.forEach((e=>{e.handlers.slice().forEach((t=>u.removeInterceptor(e.name,t)))}))},u.addKeyAlias=(e,t)=>{o[e]=t},u.removeKeyAlias=e=>{delete o[e]},uo.mixin(u),u}function Co(e){return e*e*e}function To(e){return--e*e*e+1}function No(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}Re();const Ro=["stroke","fill","color","backgroundColor","thumbColor"];function Oo(e,t){const n=t?t.length:0,i=e?Math.min(n,e.length):0,r=new Array(i),o=new Array(n);let s;for(s=0;s<i;++s)r[s]=Io(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(e){for(s=0;s<i;++s)o[s]=r[s](e);return o}}function Io(e,t,n){const i=typeof t;let r;return null==t||"boolean"===i?function(e){return()=>e}(t):("number"===i?fr:"string"===i?(r=$i(t))&&Ro.includes(n)?(t=r,cr):yr:t instanceof $i?cr:t instanceof Date?dr:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?ur:Array.isArray(t)?Oo:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Lo:fr)(e,t)}function Lo(e,t){const n={},i={};let r;for(r in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)r in e?n[r]=Io(e[r],t[r],r):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}function Po(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const jo={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},zo=/^\$/;function Fo(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function Ho(e,t,n){const i=e[t];i&&i.scale&&i.scale.pxScale?i.scale=i.scale.pxScale(n):i&&i.pxScale&&(e[t]=i.pxScale(n))}function Vo(e,t){return e.pxScale?e.pxScale(t):e}const Bo={normalizeSettings:function(e,t,n){const i=m({},e),r=m({},t);return Object.keys(i).forEach((e=>{r[e]={};const o=i[e],s=typeof o;if("function"==typeof o)r[e].fn=o;else if(Fo(o)){let n=t[e];"string"==typeof n&&zo.test(n)&&(n=jo[n]);const i=typeof n;r[e]="undefined"===i||i===s?o:n}else o&&"object"==typeof o&&("function"==typeof o.fn&&(r[e].fn=o.fn),void 0!==o.scale&&(r[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(r[e].ref=o.ref))})),Object.keys(t).forEach((e=>{if(e in i)return;const n=t[e];"string"===typeof n&&zo.test(n)?r[e]=jo[n]:r[e]=n})),r},resolveForItem:function(e,t,n){const i={},r=Object.keys(t),o=r.length,s=e.datum,a=e.datum;for(let l=0;l<o;l++){const o=r[l],c=t[o],u="object"==typeof a&&void 0!==c,h=u&&"string"==typeof c.ref,d=u&&o in a,f=h?a[c.ref]:d?a[o]:s;Fo(c)?i[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),i[o]=c.fn.call(null,e,n)):u&&c.scale&&f?(i[o]=c.scale(f.value),c.scale.bandwidth&&(i[o]+=c.scale.bandwidth()/2)):h&&f?i[o]=f.value:c.fn?i[o]=c.fn.call(null,e,n):i[o]=c}return i},updateScaleSize:Ho};function $o(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...$o(t.children)),e):(e.push(t),e)),[])}function Wo(e,t){let{context:n,data:i,style:r,filter:o,mode:s}=t;const a=e.chart.brush(n),l=i,c=r.active||{},u=r.inactive||{},h=[];Object.keys(c).forEach((e=>{h.push(e)})),Object.keys(u).forEach((e=>{-1===h.indexOf(e)&&h.push(e)}));const d=[];let f=!1;const p=()=>{let t=$o(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},g=()=>{const e=p(),t=e.length;let n,i=!1;const r="function"==typeof l?l({brush:a}):l;for(let i=0;i<t;i++){if(n=e[i].data,!n)continue;e[i].__style||(e[i].__style={},h.forEach((t=>{e[i].__style[t]=e[i][t]})));const t=a.containsMappedData(n,r,s),o=d.indexOf(e[i]);let l=!1;t&&-1===o?(d.push(e[i]),l=!0):t||-1===o||(d.splice(o,1),l=!0),e[i].needToUpdate=l||f,e[i].isActive=t}for(let r=0;r<t;r++)if(n=e[r].data,n){if(e[r].needToUpdate){const t=m({},e[r],e[r].__style),n=e[r].isActive;h.forEach((i=>{e[r][i]=n&&i in c?"function"==typeof c[i]?c[i].call(null,t,d):c[i]:!n&&i in u?"function"==typeof u[i]?u[i].call(null,t,d):u[i]:e[r].__style[i]})),i=!0}delete e[r].needToUpdate}return f=!1,i},y=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,i=p(),r=i.length;for(let e=0;e<r;e++)i[e].data&&(i[e].__style=i[e].__style||{},h.forEach((t=>{i[e].__style[t]=i[e][t],t in u&&(i[e][t]="function"==typeof u[t]?u[t].call(null,i[e]):u[t])})));f=!0,d.length=0,n||e.renderer.render(e.nodes)},v=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,i=p(),r=i.length;for(let e=0;e<r;e++)i[e].__style&&(Object.keys(i[e].__style).forEach((t=>{i[e][t]=i[e].__style[t]})),i[e].__style=void 0);d.length=0,n||e.renderer.render(e.nodes)},b=()=>{if(g()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return a.on("start",y),a.on("end",v),a.on("update",b),{isActive:()=>a.isActive(),update:()=>{d.length=0,f=!0,g()},cleanUp:function(){a.removeListener("start",y),a.removeListener("end",v),a.removeListener("update",b)}}}function Uo(e){let{nodes:t,action:n,chart:i,trigger:r}=e;const o=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&o.push(n)}!function(e){let{dataPoints:t,action:n,chart:i,trigger:r}=e;if(!r)return;const o=r.data||[""];let s={items:[],actionFn:"toggleRanges"},a={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(s.actionFn="".concat(n,"Ranges"),a.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&o.forEach((e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},s.items.push(e)):(e.value=t.value,a.items.push(e))}}))}r.contexts.forEach((e=>{s.items.length?i.brush(e)[s.actionFn](s.items):i.brush(e)[a.actionFn](a.items)}))}({dataPoints:o,action:n,chart:i,trigger:r})}function Yo(e){let{collisions:t,t:n,config:i,action:r}=e,o=[],s=!1;t.length>0&&(o=t,s=!0,"stop"===n.propagation&&(o=[t[t.length-1]]));const a=o.map((e=>e.node));return Uo({nodes:a,action:r,chart:i.chart,data:i.data,trigger:n}),s}function Xo(e,t,n){const i=n.element().getBoundingClientRect();let r=w(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,i):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,i);return null===r||r.x<0||r.y<0||r.x>i.width||r.y>i.height?[]:(t.touchRadius>0&&w(e)?r={cx:r.x,cy:r.y,r:t.touchRadius}:t.mouseRadius>0&&!w(e)&&(r={cx:r.x,cy:r.y,r:t.mouseRadius}),n.itemsAt(r))}function Ko(e,t,n){return e?"function"==typeof e?e(t):e:n}const Go={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function Jo(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const i=e[t];n+=0===t?"M".concat(i.x," ").concat(i.y):"L".concat(i.x," ").concat(i.y),n+=" "}return t&&(n+="Z"),n}function Zo(e,t,n,i){const r=n/2,o=e-i/2,s=t-i/2,a=e-r,l=t-r;return[{x:o,y:s},{x:o,y:l},{x:o+i,y:l},{x:o+i,y:s},{x:a+n,y:s},{x:a+n,y:s+i},{x:o+i,y:s+i},{x:o+i,y:l+n},{x:o,y:l+n},{x:o,y:s+i},{x:a,y:s+i},{x:a,y:s}]}function Qo(e){return-e/180*Math.PI}function es(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),i=n*Math.cos(e),r=n*Math.sin(e);return{x1:i<0?1:0,y1:r<0?1:0,x2:i>=0?i:i+1,y2:r>=0?r:r+1}}(Qo(e))}function ts(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ns(e,t){return{x:e.x-t.x,y:e.y-t.y}}function is(e,t){return{x:e.x*t,y:e.y*t}}function rs(e,t){return e.x-t.x}function os(e,t){return e.y-t.y}function ss(e,t){return rs(e,t)**2+os(e,t)**2}function as(e,t){return Math.sqrt(ss(e,t))}function ls(e,t){return e.x*t.x+e.y*t.y}function cs(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const i=Math.cos(t),r=Math.sin(t),o=ns(e,n);return ts({x:i*o.x-r*o.y,y:r*o.x+i*o.y},n)}const us={up:0,down:180,left:90,right:-90};function hs(e){let{x:t,y:n,size:i}=e;const r=i/2;return{type:"rect",x:t-r,y:n-r,width:i,height:i}}const ds=Re();ds.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),ds.add("diamond",(function(e){const t=e.size,n=e.x-t/2,i=e.y-t/2;return{type:"path",fill:"black",d:Jo([{x:n,y:i+t/2},{x:n+t/2,y:i},{x:n+t,y:i+t/2},{x:n+t/2,y:i+t},{x:n,y:i+t/2}])}})),ds.add("saltire",(function(e){const t=Qo(45),n=e.size/2,i=isNaN(e.width)?n/2:e.width,r=Math.min(i,n);let o=e.size;const s=Math.sin(Math.asin(-t))*(r/2);o+=2*(n/Math.sin(-t)-n),o-=2*s;const a={x:e.x,y:e.y},l=Zo(e.x,e.y,o,r).map((e=>cs(e,t,a)));return{type:"path",fill:"black",d:Jo(l)}})),ds.add("square",(function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),ds.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},i=us[e.direction]||0,r=t/2,o=e.x-r,s=e.y-r;let a=[{x:o,y:s+t},{x:o+r,y:s},{x:o+t,y:s+t},{x:o,y:s+t}];const l=Qo(i);return a=a.map((e=>cs(e,l,n))),{type:"path",fill:"black",d:Jo(a)}})),ds.add("line",(function(e){const t="vertical"===e.direction,n=e.size/2,i=e.x,r=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:i-(t?0:n),y1:r-(t?n:0),x2:i+(t?0:n),y2:r+(t?n:0),collider:hs(e)}})),ds.add("star",(function(e){const t=e.size,n=[],i=t/2,r=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,s=isNaN(e.startAngle)?90:e.startAngle,a=360/r;for(let t=1;t<=r;t++){const r=a*t+s,l=Qo(r),c=Qo(r+a/2),u=Math.sin(l),h=Math.cos(l),d=Math.sin(c),f=Math.cos(c);n.push({x:e.x+h*i,y:e.y+u*i}),n.push({x:e.x+f*o,y:e.y+d*o})}return{type:"path",fill:"black",d:Jo(n)}})),ds.add("n-polygon",(function(e){const t=[],n=e.size/2,i=Math.max(isNaN(e.sides)?6:e.sides,3),r=360/i,o=isNaN(e.startAngle)?0:e.startAngle;for(let s=1;s<=i;s++){const i=Qo(r*s+o),a=Math.sin(i),l=Math.cos(i);t.push({x:e.x+l*n,y:e.y+a*n})}return{type:"path",fill:"black",d:Jo(t)}})),ds.add("cross",(function(e){const t=e.x,n=e.y,i=e.size/2,r=isNaN(e.width)?i/2:e.width,o=Math.min(r,i);return{type:"path",fill:"black",d:Jo(Zo(t,n,e.size,o))}})),ds.add("bar",(function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,i=e.size/2,r=i/2/2;let o=[{x:t.x-i,y:t.y+r},{x:t.x-i,y:t.y-r},{x:t.x+i,y:t.y-r},{x:t.x+i,y:t.y+r}];if(n){const e=Qo(90);o=o.map((n=>cs(n,e,t)))}const s=D(o);return s.type="rect",s.fill="black",s})),ds.add("rect",(function(e){const{x:t,y:n,size:i}=e,r=void 0===e.width?i:e.width,o=void 0===e.height?i:e.height;return{type:"rect",fill:"black",x:t-r/2,y:n-o/2,width:r,height:o}}));const fs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ds;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((n=>{void 0!==Go[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function ps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dock:n="center",displayOrder:i=0,prioOrder:r=0,preferredSize:o=0,minimumLayoutMode:s,show:a=!0}=e;n=n||"center";return{computePreferredSize(e){let{inner:n,outer:i,children:r}=e;return"function"==typeof o?o({inner:n,outer:i,children:r,dock:this.dock()},t):o},dock(e){return void 0!==e?(n=e,this):"function"==typeof n?n(t):n},displayOrder(e){return void 0!==e?(i=e,this):"function"==typeof i?i(t):i},prioOrder(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},minimumLayoutMode(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s},show(e){return void 0!==e?(a=e,this):"function"==typeof a?a(t):a}}}function gs(e,t,n){const{require:i=[]}=t,r=t.mediator||{},{settings:o,formatter:s,scale:a,data:l,renderer:c,chart:u,dockConfig:h,mediator:d,instance:f,rect:p,style:g,registries:m,resolver:y,update:v,_DO_NOT_USE_getInfo:b,symbol:x,isVisible:w}=n;e.emit=()=>{},w&&(e.isVisible=w),Object.defineProperty(e,"settings",{get:o}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:s}),Object.defineProperty(e,"scale",{get:a}),Object.defineProperty(e,"mediator",{get:d}),Object.defineProperty(e,"style",{get:g}),Object.defineProperty(e,"registries",{get:m}),p&&Object.defineProperty(e,"rect",{get:p}),b&&(e._DO_NOT_USE_getInfo=b),Object.keys(t).forEach((n=>{var i;i=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((e=>e===i))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),i.forEach((t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:c}):"chart"===t?Object.defineProperty(e,"chart",{get:u}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:h}):"instance"===t?Object.defineProperty(e,"instance",{get:f}):"update"===t&&v?Object.defineProperty(e,"update",{get:v}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:x})})),Object.keys(r).forEach((t=>{e.mediator.on(t,r[t].bind(e))}))}function ms(e,t,n){const i=t=>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,r={};return r.displayOrder=i("displayOrder"),r.dock=i("dock"),r.prioOrder=i("prioOrder"),r.minimumLayoutMode=i("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==r.displayOrder?r.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==r.prioOrder?r.prioOrder:e.layout.prioOrder,e.layout.dock=r.dock||e.layout.dock,e.layout.minimumLayoutMode=r.minimumLayoutMode||e.layout.minimumLayoutMode,r.show=e.show,r.preferredSize=t,r}function ys(e,t,n){Object.keys(n.on||{}).forEach((i=>{e.eventListeners=e.eventListeners||[];const r=n.on[i].bind(e);e.eventListeners.push({event:i,listener:r}),t.on(i,r)})),e.emit=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.emit(e,...i)}}function vs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultSettings:n={},_DO_NOT_USE_getInfo:i=()=>({})}=e,{chart:r,container:o,mediator:s,registries:a,theme:l,renderer:c}=t,u=uo.mixin({});let h,d,f,p,g,y=t.settings||{},v=m(!0,{},n,y),b=[],w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bo,n={};return{resolve:function(i){let{data:r,settings:o,defaults:s={},scaled:a}=i;const l=n.norm=t.normalizeSettings(o,s,e.chart),c={scale:e.chart.scale,formatter:e.chart.formatter};a&&Object.keys(a).forEach((e=>{l[e]&&t.updateScaleSize(l,e,a[e])}));const u=[];if(!r||!Array.isArray(r.items)){const e={data:r,resources:c};let i=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:i}}{let e;for(let i=0,o=r.items.length;i<o;i++){e={datum:r.items[i],data:r,resources:c};let o=t.resolveForItem(e,n.norm,i);o.data=r.items[i],u.push(o)}}return{settings:n.norm,items:u}}}}({chart:r}),k=!1;const M={nodes:[],chart:r,config:v.brush||{},renderer:null},_={tap:[],over:[]},S=[],q={},D=m({},y);function A(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const r=void 0!==e[t],o=void 0!==y[t];let s;for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return r&&("function"==typeof e[t]?s=e[t].call(q,...l):i&&(s=e[t])),o&&("function"==typeof y[t]?s=y[t].call(D,...l):i&&(s=y[t])),r||o||(s=n.call(q,...l)),s}}const E=A("preferredSize",(()=>0),!0),C=A("resize",(e=>{let{inner:t}=e;return t})),T=A("created"),N=A("beforeMount"),R=A("mounted"),O=A("beforeUnmount"),I=A("beforeUpdate"),L=A("updated"),P=A("beforeRender"),j=A("beforeDestroy"),z=A("destroyed"),F=e.render,H=()=>{v.brush&&(v.brush.consume||[]).forEach((e=>{e.context&&e.style&&S.push(Wo(M,e))}))},V=()=>{v.brush&&(v.brush.trigger||[]).forEach((e=>{"over"===e.on?_.over.push(e):_.tap.push(e)}))};Object.defineProperty(M,"data",{get:()=>b});const B=v.renderer||e.renderer,$=B?c||a.renderer(B)():c||a.renderer()();"function"==typeof $.settings&&$.settings(v.rendererSettings),M.renderer=$;const W={resources:r.logger?{logger:r.logger()}:{}};let U=ps(ms(v,E,r.logger()),W);const Y=e=>{e.key=v.key,e.element=$.element()},X=()=>{};X.dockConfig=()=>U,X.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(y=e.settings,v=m(!0,{},n,e.settings),U=ps(ms(v,E,r.logger()),W),M.config=v.brush||{}),v.scale&&(h=r.scale(v.scale)),v.data){const{rendererSettings:e}=v,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=xi(v.data,{dataset:r.dataset,collection:r.dataCollection},{logger:r.logger()},r.dataCollection);t?t.isFirst?(b=n,b.items&&(b.items=[...n.items])):b.items&&(b.items=[...b.items,...n.items||[]]):b=n}else b=h?h.data():[];"string"==typeof v.formatter||"object"==typeof v.formatter?d=r.formatter(v.formatter):h&&h.data().fields&&(d=h.data().fields[0].formatter()),g=l.style(v.style||{})},X.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=C({inner:e,outer:t});p=n?$.size(n):$.size(e),D.rect=m(!0,{computedPhysical:p.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),p=m(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},p)},X.getRect=()=>D.rect;const K=()=>{const e=$.renderArgs?$.renderArgs.slice(0):[],{rendererSettings:t}=v;let n=b;const i="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return b.items&&i&&(n=x(x({},b),{},{items:b.items.slice(i.start,i.end)})),e.push({data:n}),e};let G,J,Z;function Q(e){const{rendererSettings:t}=v,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?M.nodes=[...e||[]]:M.nodes&&(M.nodes=[...M.nodes,...e||[]]):M.nodes=e}X.beforeMount=N,X.beforeRender=()=>{P({size:p})},X.render=()=>{const e=F.call(q,...K());Q(e),$.render(e),G=e,J=D.rect.computed},X.hide=()=>{X.unmount(),$.size({x:0,y:0,width:0,height:0}),$.clear()},X.beforeUpdate=()=>{I({settings:v,data:b})},X.update=()=>{Z&&Z.stop();const{rendererSettings:e,brush:t,animations:n}=v;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return $.render(),void(G=null);const i=F.call(q,...K());Q(i),S.forEach((e=>e.cleanUp())),S.length=0,_.tap=[],_.over=[],t&&(H(),V()),S.forEach((e=>{e.isActive()&&e.update()})),G&&n&&("function"==typeof n.enabled?n.enabled():n.enabled)?(n.compensateForLayoutChanges&&n.compensateForLayoutChanges({currentNodes:G,currentRect:D.rect.computed,previousRect:J}),Z=function(e,t,n,i){let r,{old:o,current:s}=e,{renderer:a}=t,l=[],c={nodes:[],ips:[]},u={nodes:[],ips:[]},h={nodes:[],ips:[]},d=[],f=null;const p=n.trackBy||Po,g={start(){let e={};if(o.forEach(((t,n)=>{let i=p(t,n);e[i]=t})),s.forEach(((t,n)=>{let i=p(t,n);if(e[i]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter((e=>!e.dummy)),i=t.points.filter((e=>!e.dummy)),r=i.map((e=>e.data.major.value)),o=n.filter((e=>r.includes(e.data.major.value))).map((e=>e.data.major.value)),s=n.filter((e=>o.includes(e.data.major.value))),a=i.filter((e=>o.includes(e.data.major.value)));return{old:s,current:a}}(e[i],t);h.ips.push(Lo(m({},e[i],{points:n.old}),m({},t,{points:n.current}))),l.push(m({},e[i],{commonPoints:n.old}))}else h.ips.push(Lo(e[i],t)),l.push(e[i]);h.nodes.push(t),e[i]=!1}else c.nodes.push(t),c.ips.push(Lo(m({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(Lo(e[t],m({},e[t],{r:1e-4,opacity:0}))))})),d.push({name:"exiting",easing:Co,duration:200,tweens:u.ips,nodes:[...l]}),d.push({name:"updating",easing:No,duration:400,tweens:h.ips,nodes:[]}),d.push({name:"entering",easing:To,duration:200,tweens:c.ips,nodes:[...h.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,r=e?l.filter(e).length:l.length,{isInit:o,shouldBeRemoved:s}=i.getValue("animations.updatingStageMeta");!1===o?(i.setValue("animations.updatingStageMeta.shouldBeRemoved",0===r),i.setValue("animations.updatingStageMeta.isInit",!0)):i.setValue("animations.updatingStageMeta.shouldBeRemoved",s&&0===r)}d.length&&(f=a.getScene(s),d[0].started=Date.now(),"undefined"!=typeof window&&(r=window.requestAnimationFrame(g.tick)))},tick(){let e=d[0];e||g.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,o=[],s=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));const{adjustTweenedNodes:l}=n;if(l&&l(s),o.push(...s),o.push(...e.nodes),a.render(o),t>=1){d.shift();const{isInit:e,shouldBeRemoved:t}=i.getValue("animations.updatingStageMeta");d.length?"updating"===d[0].name&&t&&d.shift():(!0===e&&i.setValue("animations.updatingStageMeta.isInit",!1),g.stop())}r&&(r=window.requestAnimationFrame(g.tick))},stop(){r&&(window.cancelAnimationFrame(r),r=!1)},inProgress:()=>!!r,get targetScene(){return f}};return g}({old:G,current:i},{renderer:$},n,r.storage),Z.start()):$.render(i),G=i,J=D.rect.computed,$.setKey&&"string"==typeof y.key&&$.setKey(y.key)},X.updated=L,X.destroy=()=>{X.unmount(),j(f),$.destroy(),z(),f=null};const ee=e=>{M.nodes=e,S.forEach((e=>{e.isActive()&&e.update()})),$.render(e)};return gs(q,e,{settings:()=>v,data:()=>b,scale:()=>h,formatter:()=>d,renderer:()=>$,chart:()=>r,dockConfig:()=>U,mediator:()=>s,instance:()=>D,rect:()=>D.rect,style:()=>g,update:()=>ee,registries:()=>a,resolver:()=>w,symbol:()=>fs(a.symbol)}),gs(D,y,{settings:()=>v,data:()=>b,scale:()=>h,formatter:()=>d,renderer:()=>$,chart:()=>r,dockConfig:()=>U,mediator:()=>s,style:()=>g,_DO_NOT_USE_getInfo:i.bind(q),isVisible:()=>k}),X.getBrushedShapes=function(e,t,n){const i=[];if(v.brush&&v.brush.consume){const o=r.brush(e),s=$.findShapes("*");v.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let r=0;r<s.length;r++){const a=s[r];a.data&&o.containsMappedData(a.data,n||e.data,t)&&(Y(a),i.push(a),s.splice(r,1),r--)}}))}return i},X.findShapes=e=>{var t;const n=(null!==(t=Z)&&void 0!==t&&t.inProgress()?Z.targetScene:$).findShapes(e);for(let e=0,t=n.length;e<t;e++)Y(n[e]);return n},X.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=$.itemsAt(e);let i;i=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map((e=>e.node));for(let e=0,t=i.length;e<t;e++)Y(i[e]);return i},X.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];Uo({nodes:e,action:t.action||"toggle",trigger:t,chart:r,data:M.data})},X.mount=()=>{f=$.element&&$.element()?f:$.appendTo(o),$.setKey&&"string"==typeof y.key&&$.setKey(y.key),v.brush&&(H(),V()),ys(D,u,y),ys(q,u,e),k=!0},X.mounted=()=>R(f),X.unmount=()=>{[D,q].forEach((e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach((e=>{let{event:n,listener:i}=e;t.removeListener(n,i)})),e.eventListeners.length=0),e.emit=()=>{}}(e,u)})),_.tap=[],_.over=[],S.forEach((e=>{e.cleanUp()})),S.length=0,O(),k=!1},X.onBrushTap=e=>{_.tap.forEach((t=>{(function(e){let{e:t,t:n,config:i}=e;return Yo({collisions:Xo(t,n,i.renderer),t:n,config:i,action:Ko(n.action,t,"toggle")})})({e:e,t:t,config:M})&&"stop"===t.globalPropagation&&r.toggleBrushing(!0)}))},X.onBrushOver=e=>{_.over.forEach((t=>{(function(e){let{e:t,t:n,config:i}=e;return Yo({collisions:Xo(t,n,i.renderer),t:n,config:i,action:Ko(n.action,t,"set")})})({e:e,t:t,config:M})&&"stop"===t.globalPropagation&&r.toggleBrushing(!0)}))},X.def=q,X.ctx=D,X.renderer=()=>$,X.set({settings:y}),T(),X}function bs(e){const t=m(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const i=t.split(".");let r=e;for(let e=0;e<i.length;++e){const t=i[e];if(void 0===r[t])return n;r=r[t]}return r}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const i=t.split("."),r=i[i.length-1];let o=e;for(let e=0;e<i.length-1;++e){const t=i[e];void 0===o[t]&&(o[t]=Number.isNaN(+i[e+1])?{}:[]),o=o[t]}void 0!==n?o[r]=n:delete o[r]}(t,e,n)};return n}function xs(e,t,n){const i=ts(function(e,t){const n=ls(e,t)/ls(t,t)||1;return{x:t.x*n,y:t.y*n}}(ns(n,e),ns(t,e)),e);return i}function ws(e,t,n){return as(e,n)+as(t,n)-as(e,t)<1e-12}function ks(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 Ms(e){return e.x1===e.x2&&e.y1===e.y2}function _s(e){return e.width<=0||e.height<=0}function Ss(e){return e.r<=0}function qs(e){return e.edges.length<=2}function Ds(e,t){let n=!1;for(let i=0,r=t.edges.length;i<r;i++)if(n=Os(e,A(t.edges[i])),!0===n)return!0;return!1}function As(e,t){let n=!1;const{numPolygons:i,polygons:r}=t;for(let t=0;t<i;t++){if(n=Bs(e,r[t]),!0===n)return!0}return!1}function Es(e,t){if(Ss(e))return!1;return ss({x:e.cx,y:e.cy},t)<=e.r**2}function Cs(e,t){if(_s(t)||Ss(e))return!1;const n=t.width/2,i=t.height/2,r=t.x+n,o=t.y+i,s=e.r,a=e.cx,l=e.cy,c=Math.abs(a-r),u=Math.abs(l-o);if(c>n+s||u>i+s)return!1;if(c<=n||u<=i)return!0;return(c-n)**2+(u-i)**2<=s**2}function Ts(e,t){if(Ss(e)||Ms(t))return!1;const[n,i]=S(t);if(Es(e,n)||Es(e,i))return!0;const r={x:e.cx,y:e.cy},o=xs(n,i,r);return ss(o,r)<=e.r**2&&ws(n,i,o)}function Ns(e,t){if(qs(t)||Ss(e))return!1;if(Rs(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let i=0;i<n;i++){if(Ts(e,A(t.edges[i])))return!0}return!1}function Rs(e,t){if(qs(e)||!js(e.boundingRect(),t))return!1;const{x:n,y:i}=t,r=e.vertices;let o,s,a,l,c;for(o=!1,l=-1,s=r.length,a=s-1;++l<s;a=l){if(r[l].x===n&&r[l].y===i)return!0;if(r[l].y===r[a].y&&r[l].y===i&&(n-r[l].x)*(n-r[a].x)<=0)return!0;if(r[l].y<i&&i<=r[a].y||r[a].y<i&&i<=r[l].y){if(c=(r[a].x-r[l].x)*(i-r[l].y)/(r[a].y-r[l].y)+r[l].x,n===c)return!0;n<c&&(o=!o)}}return o}function Os(e,t){if(qs(e))return!1;for(let n=0,i=e.edges.length;n<i;n++){if(Fs(t,A(e.edges[n])))return!0}const[n,i]=S(t);return Rs(e,n)||Rs(e,i)}function Is(e,t){if(qs(e))return!1;for(let n=0,i=e.edges.length;n<i;n++){if(zs(t,A(e.edges[n])))return!0}const[n,i,r,o]=q(t);return Rs(e,n)||Rs(e,i)||Rs(e,r)||Rs(e,o)}function Ls(e,t){return!_s(e)&&!_s(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 Ps(e,t){if(_s(e)||_s(t))return!1;return[{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((t=>js(e,t)))}function js(e,t){return!_s(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function zs(e,t){if(Ms(t)||_s(e))return!1;const[n,i]=S(t);if(js(e,n)||js(e,i))return!0;const r=q(e);let o=r.length;for(let e=0;e<o;e++){if(Fs(A([r[e],r[3!==e?e+1:0]]),t))return!0}return!1}function Fs(e,t){const[n,i]=S(e),[r,o]=S(t),s=rs(i,n),a=os(i,n),l=rs(o,r),c=os(o,r),u=rs(n,r),h=os(n,r);let d=c*s-l*a;const f=l*h-c*u,p=s*h-a*u;let g,m;if(0===s&&0===a)return!1;if(0===l&&0===c)return!1;if(0===d){if(0===f&&0===p){if(0===s){if(0===a)return n.x===i.x&&n.y===i.y;g=os(r,n)/a,m=os(o,n)/a}else g=(r.x-n.x)/s,m=(o.x-n.x)/s;return!(g<0&&m<0||g>1&&m>1)}return!1}const y=f/d;return d=p/d,y>=0&&y<=1&&d>=0&&d<=1}function Hs(e,t){if(Ms(e))return!1;const[n,i]=S(e);return ws(n,i,t)}function Vs(e,t){const n=e.boundingRect(),i=t.boundingRect();return!!Ls(n,i)&&(Ps(n,i)?Ds(e,t):Ds(t,e))}function Bs(e,t){const n=e.boundingRect(),i=t.boundingRect();return!!Ls(n,i)&&(Ps(i,n)?function(e,t){let n=!1;const{numPolygons:i,polygons:r}=e;for(let e=0;e<i;e++)if(n=Vs(t,r[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let i=0,r=t.edges.length;i<r;i++)if(n=Us(e,A(t.edges[i])),!0===n)return!0;return!1}(e,t))}function $s(e,t){if(Ss(e))return!1;if(Ws(t,{x:e.cx,y:e.cy}))return!0;const{numPolygons:n,polygons:i}=t;for(let t=0;t<n;t++){const n=i[t],r=n.edges.length;for(let t=0;t<r;t++){if(Ts(e,A(n.edges[t])))return!0}}return!1}function Ws(e,t){if(!js(e.boundingRect(),t))return!1;const{x:n,y:i}=t,r=e.numPolygons;let o,s,a,l,c,u,h=!1;for(s=0;s<r;s++)for(o=e.vertices[s],c=-1,a=o.length,l=a-1;++c<a;l=c){if(o[c].x===n&&o[c].y===i)return!0;if(o[c].y===o[l].y&&o[c].y===i&&(n-o[c].x)*(n-o[l].x)<=0)return!0;if(o[c].y<i&&i<=o[l].y||o[l].y<i&&i<=o[c].y){if(u=(o[l].x-o[c].x)*(i-o[c].y)/(o[l].y-o[c].y)+o[c].x,n===u)return!0;n<u&&(h=!h)}}return h}function Us(e,t){const[n,i]=S(t);if(Ws(e,n)||Ws(e,i))return!0;const{numPolygons:r,polygons:o}=e;for(let e=0;e<r;e++){const n=o[e];for(let e=0,i=n.edges.length;e<i;e++){if(Fs(t,A(n.edges[e])))return!0}}return!1}function Ys(e,t){const[n,i,r,o]=q(t);if(Ws(e,n)||Ws(e,i)||Ws(e,r)||Ws(e,o))return!0;const{numPolygons:s,polygons:a}=e;for(let e=0;e<s;e++){const n=a[e];for(let e=0,i=n.edges.length;e<i;e++){if(zs(t,A(n.edges[e])))return!0}}return!1}const Xs=/^\$/,Ks="@extend";function Gs(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function Js(e,t,n){if("string"==typeof e){let i=t[e];return-1!==n.indexOf(e)&&Gs(e),Xs.test(i)?(n.push(e),Js(i,t,n)):i}let i=e;const r=m(!0,{},t,e),o={};if(e[Ks]){const o=e[Ks];-1!==n.indexOf(o)&&Gs(o);let s=n.slice();s.push(o),i=m(!0,{},Js(r[o],t,s),e)}return Object.keys(i).forEach((e=>{let t=n.slice();if(e===Ks||Xs.test(e))return;o[e]=i[e];let s=o[e];Xs.test(s)&&s in r?(-1!==n.indexOf(s)&&Gs(s),t.push(s),s=r[s],"object"==typeof s||Xs.test(s)&&s in r?o[e]=Js(s,r,t):o[e]=s):"object"==typeof s&&(o[e]=Js(s,r,t))})),o}function Zs(e,t){return Js(e,t,[])}function Qs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const i=e=>{e.forEach((e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((e=>e?e.length:0))}}))},r={palette:(e,n)=>((e,n)=>{const i=t[e];if(!i)return[];const r=i.sizes;for(let e=0;e<r.length;e++)if(n<=r[e])return i.colors[e];return i.colors[r.length-1]})(e,n),setPalettes:i,style:e=>Zs(e,n),setStyle:t=>{n=m({},e,t)}};return i(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),r}function ea(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 ta(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return m(!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 na(e,t,n,i,r){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:i,margin:isNaN(r)?0:r}}function ia(e,t,n){if(void 0===e.cachedSize){const i=e.config.dock();let r,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 ra(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 oa(e,t){const 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 sa(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const i=e.width-(t.x+t.width);i<n.right&&(t.width-=n.right-i),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const r=e.height-(t.y+t.height);r<n.bottom&&(t.height-=n.bottom-r)}function aa(e,t,n,i,r){const o=m({},t),s=m({},n);ra(o,i),oa(s,i),sa(e,o,s);const a=function(e,t,n){const i=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),r=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=i&&t.height>=r}(e,o,r);return!!a&&(ra(t,i),oa(n,i),!0)}function la(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 ca(e){return D([].concat(...e.map(q)))}function ua(e){let{visible:t,layoutRect:n,reducedRect:i,containerRect:r,translation:o}=e;const s=na(i.x,i.y,i.width,i.height),a=na(i.x,i.y,i.width,i.height),l={},c=t.slice(),u=c.slice().sort(((e,t)=>e.config.displayOrder()-t.config.displayOrder()));return t.sort(((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n})).forEach((e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=s.width,t.x=n.x,c.x=s.x,t.y=c.y=s.y-e.cachedSize,s.y-=e.cachedSize,s.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=s.x,t.y=c.y=s.y+s.height,t.width=n.width,c.width=s.width,t.height=c.height=e.cachedSize,s.height+=e.cachedSize;break;case"left":t.x=c.x=a.x-e.cachedSize,t.y=n.y,c.y=a.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=a.height,a.x-=e.cachedSize,a.width+=e.cachedSize;break;case"right":t.x=c.x=a.x+a.width,t.y=n.y,c.y=a.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=a.height,a.width+=e.cachedSize;break;case"center":t.x=c.x=i.x,t.y=c.y=i.y,t.width=c.width=i.width,t.height=c.height=i.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map((e=>l[e])).filter((e=>!!e));n.length>0&&(t=ca(n.map((e=>e.outerRect))),c=ca(n.map((e=>e.r))))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,i){const r={x:i.width/n.width,y:i.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){const e=r.x<r.y,t=Math.min(r.x,r.y);r.x=t,r.y=t;const s=e?"height":"width",a=(i[s]-n[s]*r.x)*n.align;o.left=e?0:a,o.top=e?a:0}e.scaleRatio=r,e.margin=o,t.scaleRatio=r,t.margin=o,n.scaleRatio=r,n.margin=o}(c,t,n,r),c.edgeBleed=e.edgeBleed,c.computed=la(c),t.edgeBleed=e.edgeBleed,t.computed=la(t),c.x+=o.x,c.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0})),u}function ha(e,t,n){const i=e.layoutModes||{},r=t.minimumLayoutMode();let o=t.show();return o&&"object"==typeof r?o=i[r.width]&&i[r.height]&&n.width>=i[r.width].width&&n.height>=i[r.height].height:o&&void 0!==r&&(o=i[r]&&n.width>=i[r].width&&n.height>=i[r].height),o}function da(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 fa(e){let t=ta(e);const n={};return n.layout=function(e){let 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:[]};const{logicalContainerRect:i,containerRect:r}=function(e,t){const n={x:0,y:0,width:0,height:0},i={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?(i.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,i.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,i.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),i.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(i.width=n.width,i.height=n.height,i.preserveAspectRatio=!1),ea(i),ea(n),{logicalContainerRect:i,containerRect:n}}(e,t),[o,s]=function(e,t,n){const i=[],r=[];for(let o=0;o<e.length;++o){const s=e[o];da(s);let a=s.dockConfig;const l=s.key,c=a.dock(),u=/@/.test(c)?c.split(",").map((e=>e.replace(/^\s*@/,""))):[];ha(t,a,n)?i.push({comp:s,key:l,config:a,referencedDocks:u}):r.push({comp:s,key:l,config:a,referencedDocks:u})}return[i,r]}(n,t,i),a=function(e){let{layoutRect:t,visible:n,hidden:i,settings:r}=e;const o=na(t.x,t.y,t.width,t.height),s={left:0,right:0,top:0,bottom:0},a=n.slice();a.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<a.length;++e){const n=a[e];ia(n,o,t),aa(t,o,s,n,r)||(i.push(a.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let i=e[n];if(i.referencedDocks.length){const r=i.referencedDocks.every((e=>t.some((t=>t.key===e))));r&&t.push(e.splice(n,1)[0])}}}(n,i);const l=n.filter((e=>-1!==a.indexOf(e)));return n.length=0,n.push(...l),sa(t,o,s),o}({layoutRect:i,visible:o,hidden:s,settings:t}),l=ua({visible:o,layoutRect:i,reducedRect:a,containerRect:r,translation:{x:e.x,y:e.y}});return s.forEach((e=>{e.comp.visible=!1;const t=na();e.comp.resize(t,t)})),{visible:o.map((e=>e.comp)),hidden:s.map((e=>e.comp)),ordered:l.map((e=>e.comp))}},n.settings=function(e){t=ta(e)},n}const pa=(e,t)=>{for(let n=0;n<e.length;n++){const i=e[n];if(i.hasKey&&i.key===t)return e[n]}return null},ga=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(x(x({},n),{},{children:ga(e.children)}))}})),ma=(e,t)=>({visible:[],hidden:t,ordered:[]}),ya=e=>(t,n)=>{var i;const r=n.map(((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(x(x({},t),{},{children:ga(e.children)}))}})),o=e=>n[e.index],{visible:s=r,hidden:a=[],ordered:l=s}=null!==(i=e(t,r))&&void 0!==i?i:{};return{visible:s.map(o),hidden:a.map(o),ordered:l.map(o)}},va=e=>"function"==typeof e?ya(e):(e=>{const t=fa(e);return ya(((e,n)=>t.layout(e,n)))})(e);function ba(e,t,n){const i=t.left-n.left,r=t.top-n.top,o=E(e),s=m(!0,{},e);switch(o){case"circle":s.cx+=i,s.cy+=r;break;case"polygon":for(let e=0,t=s.vertices.length;e<t;e++){const t=s.vertices[e];t.x+=i,t.y+=r}break;case"geopolygon":for(let e=0;e<s.vertices.length;e++){const t=s.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=i,n.y+=r}}break;case"line":s.x1+=i,s.y1+=r,s.x2+=i,s.y2+=r;break;case"point":case"rect":s.x+=i,s.y+=r}return s}function xa(e,t){const n=[];let i=0;t.forEach((e=>{n.push(i),i++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(i+=t.length)})),t.forEach(((t,i)=>((e,t,n)=>{const i=t.instance.renderer().element();if(isNaN(n)||!i||!e||!e.children)return;const r=e.children[Math.max(0,n)];if(i===r)return;const o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==r?(e.insertBefore(i,r),o&&o.forEach((t=>{e.insertBefore(t,i)}))):(o&&o.forEach((t=>{e.appendChild(t,i)})),e.appendChild(i))})(e,t,n[i])))}function wa(e,t){let{element:n,data:i=[],settings:r={},on:o={}}=e;const s=t.registries,a=t.logger,l=Qs(t.style,t.palettes),c=[],u=m({},e),h=function(){const e={};return uo.mixin(e),e}();let d=[],f=null,p=null,g=null,y=[],v=()=>{},b=()=>{};const k={};let M=!1;const _=function(e){let{createComponent:t}=e;const n={};let i=[],r=[];const o=e=>{const n=t(e);return n&&(i.push(n),e.components&&(n.children=e.components.map((e=>o(e))).filter((e=>!!e)))),n},s=e=>{const t=i.indexOf(e);-1!==t&&i.splice(t,1)},a=(e,t)=>{for(let n=e.length-1;n>=0;n--){const i=e[n],r=t.find((e=>i.hasKey&&i.key===e.key));r?i.children&&r.components&&a(i.children,r.components):(e.splice(n,1),s(i),i.children&&a(i.children,[]),i.instance.destroy())}},l=e=>{let{compList:t,data:n,excludeFromUpdate:i,formatters:r,scales:s,settingsList:a}=e;return a.map((e=>{const a=pa(t,e.key);return i.indexOf(e.key)>-1?(delete a.updateWith,a):a?(e.rendererSettings&&"function"==typeof a.instance.renderer().settings&&a.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(a.applyTransform=!0,a):(a.updateWith={formatters:r,scales:s,data:n,settings:e},e.components&&(a.children=l({compList:a.children||[],data:n,excludeFromUpdate:i,formatters:r,scales:s,settingsList:e.components})),a)):o(e)})).filter((e=>!!e))},c=e=>{let{components:t,hidden:n,layoutFn:i,ordered:r,rect:o,visible:s}=e;const{visible:a,hidden:l,ordered:u}=i(o,t);s.push(...a),n.push(...l),r.push(...u),a.forEach((e=>{if(e.children){var t,i;const o=va(null!==(t=null===(i=e.settings)||void 0===i?void 0:i.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:o,ordered:r,rect:e.instance.getRect(),visible:s})}})),l.forEach((e=>{e.children&&c({components:e.children,hidden:n,layoutFn:ma,ordered:r,rect:null,visible:s})}))};return n.destroy=()=>{i.forEach((e=>e.instance.destroy())),i=[],r=[]},n.findComponentByKey=e=>pa(i,e),n.forEach=e=>{i.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const i=[],o=[],s=[],a=va(t);return c({components:r,hidden:o,layoutFn:a,ordered:s,rect:n,visible:i}),{visible:i,hidden:o,ordered:s}},n.set=e=>{let{components:t}=e;r=t.map((e=>o(e))).filter((e=>!!e))},n.update=e=>{let{components:t,data:n,excludeFromUpdate:i,formatters:o,scales:s}=e;a(r,t),r=l({compList:r,data:n,excludeFromUpdate:i,formatters:o,scales:s,settingsList:t})},n}({createComponent:e=>{if(!s.component.has(e.type))return a.warn("Unknown component: ".concat(e.type)),!1;return{instance:vs(s.component(e.type),{settings:e,chart:u,mediator:h,registries:s,theme:l,container:n}),settings:m(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function S(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const i="function"==typeof e[t];let r;for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return r=i?e[t].call(u,...s):n.call(u,...s),r}}const q=()=>{let e;r.dockLayout?(a.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=r.dockLayout):e=r.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{x:0,y:0,width:t,height:n}}return{x:0,y:0,width:0,height:0}}(n);return _.layout({layoutSettings:e,rect:t})},D=S("created"),A=S("beforeMount"),E=S("mounted"),C=S("beforeUpdate"),T=S("updated"),N=S("beforeRender"),R=S("beforeDestroy"),O=S("destroyed"),I=function(e,t){let{partialData:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{formatters:i={},scales:r={},scroll:o={}}=t;v=function(e,t){let{types:n,logger:i}=t;const r={},o=[];return Array.isArray(e)?o.push(...e):(i.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach(((e,t)=>{let o=n(e.type);if(o){let n=e.key;void 0===e.key&&(i.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let s=o({key:n,data:e.data,config:e.config});r[n]=s}})),e=>e?r[e]:r[Object.keys(r)[0]]}(e,{logger:a,types:s.data}),n||Object.keys(k).forEach((e=>k[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),b=function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:xi;const r={};return(e||[]).forEach((e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");r[e.key]=()=>i(e.data,t,n)})),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in r))throw new Error("Unknown data collection: ".concat(t));"function"==typeof r[t]&&(r[t]=r[t]());let i=r[t];if(n&&n.fields&&n.fields.filter){let e=i.fields.filter(n.fields.filter);i.fields.length!==e.length&&(i=m(i,{fields:e}))}return i}}(t.collections,{dataset:v},{logger:a});const c={theme:l,logger:a};f=function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:so;const r={};return{get(o){let s;return"string"==typeof o&&e[o]?s=o:"object"==typeof o&&"scale"in o&&e[o.scale]&&(s=o.scale),s?(r[s]=r[s]||i(e[s],t,n),r[s]):i(o,t,n)},all(){return Object.keys(e).forEach(this.get),r}}}(r,{dataset:v,collection:b},x(x({},c),{},{scale:s.scale})),p=function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:wi;const r={};return{get(o){let s;return"string"==typeof o&&e[o]?s=o:"object"==typeof o&&"formatter"in o&&e[o.formatter]?s=o.formatter:"object"==typeof o&&"type"in o&&e[o.type]&&(s=o.type),s?(r[s]=r[s]||i(e[s],t,n),r[s]):i(o||{},t,n)},all(){return Object.keys(e).forEach(this.get),r}}}(i,{dataset:v,collection:b},x(x({},c),{},{formatter:s.formatter})),g=function(e,t){const n={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=fo(e[i],t?t[i]:null));return n}(o,g)};function L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},i=e.filter((e=>!!e.key)).map((e=>e.key));y.forEach((e=>{e.key&&-1!==i.indexOf(e.key)?t[e.key]=e:e.destroy()})),y=e.map((e=>{const i=e.key&&t[e.key]?t[e.key]:s.interaction(e.type)(u,h,n);return i.set(e),i}))}const P=e=>{const t=n.getBoundingClientRect(),i="clientX"in e?e.clientX:e.x,r="clientY"in e?e.clientY:e.y,o={x:i-t.left,y:r-t.top},s=[];return d.forEach((e=>{const t=e.instance.getRect();js(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)&&s.push(e)})),s},j=()=>{if(c.length||!n)return;Object.keys(o).forEach((e=>{const t=o[e].bind(u);n.addEventListener(e,t),c.push({key:e,listener:t})}));const e={},t=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=P(e)},i=t=>{const n=e.comps||P(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=w(e),i=n?e.changedTouches[0]:e,r=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(i.clientX-t.x),s=isNaN(t.y)?0:Math.abs(i.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&s<=12&&r<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),M){M=!1;break}}},r=[];var s;r.push({key:"mousedown",listener:t}),r.push({key:"mouseup",listener:i}),("ontouchstart"in(s=n)&&"ontouchend"in s||navigator.maxTouchPoints>1)&&(r.push({key:"touchstart",listener:t}),r.push({key:"touchend",listener:i})),r.push({key:"mousemove",listener:e=>{const t=P(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),M){M=!1;break}}}}),r.forEach((e=>{n.addEventListener(e.key,e.listener),c.push(e)}))},z=()=>{c.forEach((e=>{let{key:t,listener:i}=e;return n.removeEventListener(t,i)})),c.length=0},F=()=>{n.innerHTML="",(()=>{const{components:e=[]}=r;N(),I(i,r),_.set({components:e});const{visible:t,hidden:o,ordered:s}=q();d=t,o.forEach((e=>{e.instance.hide(),e.visible=!1})),t.forEach((e=>e.instance.beforeMount())),t.forEach((e=>e.instance.mount())),t.forEach((e=>e.instance.beforeRender())),t.forEach((e=>e.instance.render())),t.forEach((e=>e.instance.mounted())),t.forEach((e=>{e.visible=!0})),xa(n,s)})(),j(),L(r.interactions)};return u.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{excludeFromUpdate:t=[]}=e;e.data&&(i=e.data),e.settings&&(r=e.settings,L(e.settings.interactions)),C(),I(i,r);const{formatters:n,scales:o,components:s=[]}=r;_.update({components:s,data:i,excludeFromUpdate:t,formatters:n,scales:o}),_.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),_.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),q()},u.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{partialData:t,excludeFromUpdate:o=[]}=e;let s;e.data&&(i=e.data),e.settings&&(r=e.settings,L(e.settings.interactions)),C(),I(i,r,{partialData:t});const{formatters:a,scales:l,components:c=[]}=r;_.update({components:c,data:i,excludeFromUpdate:o,formatters:a,scales:l}),_.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),_.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const u=[],h=[];let f;if(t)_.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&u.push(e)})),f=u;else{const{visible:e,hidden:t,ordered:n}=q();d=e,f=e,s=n,e.forEach((e=>{e.updateWith&&e.visible?u.push(e):h.push(e)})),t.forEach((e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}h.forEach((e=>e.instance.beforeMount())),h.forEach((e=>e.instance.mount())),f.forEach((e=>e.instance.beforeRender())),f.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||xa(n,s),h.forEach((e=>e.instance.mounted())),u.forEach((e=>e.instance.updated())),d.forEach((e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1})),T()},u.destroy=()=>{R(),_.destroy(),z(),L(),delete u.update,delete u.destroy,O()},u.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=[];return d.filter((e=>null==i||e.key===i)).forEach((i=>{const o=i.instance.getBrushedShapes(e,t,n);r=[...r,...o]})),r},u.findShapes=e=>{let t=[];return d.forEach((n=>{const i=n.instance.findShapes(e);t=[...t,...i]})),t},u.componentsFromPoint=e=>P(e).map((e=>e.instance.ctx)),u.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=[];const r=n.getBoundingClientRect();let o=d;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));o=d.filter((t=>-1!==e.indexOf(t.key))).map((n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]})))}for(let n=o.length-1;n>=0;n--){const s=o[n],a=ba(e,r,s.instance.renderer().element().getBoundingClientRect()),l=s.instance.shapesAt(a,s.opts),c=l.length>0&&"stop"===t.propagation;if(i=[...i,...l],i.length>0&&c)return i}return i},u.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const i=t.components[n].key;d.filter((e=>i===e.key)).forEach((i=>{let r=e.filter((e=>e.key===i.key));i.instance.brushFromShapes(r,t.components[n])}))}},u.scroll=function(){return function(e,t){return t[e]||(t[e]=ho()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",g)},u.dataset=e=>v(e),u.dataCollection=e=>b(e),u.scales=function(){return f.all()},u.formatters=function(){return p.all()},u.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return k[e]||(k[e]=Eo()),k[e]},u.scale=function(e){return f.get(e)},u.formatter=function(e){return p.get(e)},u.toggleBrushing=function(e){M=void 0!==e?e:!M},u.component=e=>{const t=_.findComponentByKey(e);return null==t?void 0:t.instance.ctx},u.logger=()=>a,u.theme=()=>l,u.storage=bs({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(u,"interactions",{get:()=>({instances:y,on(){j(),y.forEach((e=>e.on()))},off(){z(),y.forEach((e=>e.off()))}})}),D(),n&&(A(),F(),E(n),u.element=n),u}const ka=e=>{let t=Re(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var Ma=Re();function _a(e,t,n){let{key:i}=n;const r={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return r.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(r.value),e.field&&(r.source={key:i,field:e.field.key()}),r}const Sa=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const qa=e=>{let{key:t,data:n,cache:i,config:r}=e;if(!n)return;let o=n;"string"==typeof o&&(o=(e=>{let{data:t,config:n}=e;const i=t.split("\n"),r=i[0],o=i[1];let s=",";if(n&&n.parse&&n.parse.delimiter)s=n.parse.delimiter;else if(r){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(r&&o){if(n.test(r)&&n.test(o)&&r.split(n).length===o.split(n).length){s=n;break}}else n.test(r)&&(s=n)}}return i.map((e=>e.split(s)))})({data:n,config:r})),Array.isArray(o)&&function(e){let t,{source:n,data:i,cache:r,config:o}=e,s=i;const a=o&&o.parse;Array.isArray(i[0])?a&&!1===a.headers?t=i[0].map(((e,t)=>t)):(t=i[0],s=i.slice(1)):t=Object.keys(i[0]);const l=!!a&&"function"==typeof a.row&&a.row;let c,u=t;u=a&&"function"==typeof a.fields?a.fields(u.slice()):t.map((e=>({key:e,title:e}))),Array.isArray(i[0])?c=u.map((()=>[])):(c={},u.forEach((e=>{c[e.key]=[]})));for(let e=0;e<s.length;e++){const t=l?l(s[e],e,u):s[e];if(t)if(Array.isArray(t))for(let e=0;e<u.length;e++)c[e].push(t[e]);else for(let e=0;e<u.length;e++)c[u[e].key].push(t[u[e].key])}const h=Array.isArray(c)?e=>c[e]:e=>c[u[e].key];for(let e=0;e<u.length;e++){const t=h(e),i=Sa(t),o=i.length>0,s=o?"measure":"dimension",a=o?Math.min(...i):NaN,l=o?Math.max(...i):NaN;r.fields.push(si(m({source:n,key:e,title:u[e].title,values:t,min:a,max:l,type:s},u[e]),{value:u[e].value,label:u[e].label}))}}({data:o,cache:i,source:t,config:r})};function Da(){let{key:e,data:t,config:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i={fields:[]},r={key:()=>e,raw:()=>t,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:i}),fields:()=>i.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let i=[];return n.forEach((e=>{if(void 0!==e.field){const n=t.field(e.field),r=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const{props:o,main:s}=hi(e,t),a=Object.keys(o),l=!!e.trackBy,c=typeof e.trackBy,u={},h=[],d=n.items(),f=[];for(let t=0;t<d.length;t++){const n=d[t];if(s.filter&&!s.filter(n))continue;const i=_a(s,n,{key:r});a.forEach((e=>{const s=o[e];let a=s.field?s.field.items()[t]:n;i[e]=_a(s,a,{key:r})})),l&&pi({cfg:e,itemData:n,obj:i,target:h,tracker:u,trackType:c}),f.push(i)}i=l?[...i,...fi(h,{main:s,propsArr:a,props:o})]:[...i,...f]}})),i}(e,r),hierarchy:()=>null};return qa({key:e,data:t,config:n,cache:i}),r}Da.util={normalizeConfig:hi,collect:fi,track:pi};const Aa=Re();Aa.default("matrix"),Aa("matrix",Da),Aa("default",Da);const Ea=Re();function Ca(e,t,n){return Math.max(e,Math.min(t,n))}function Ta(e){let{item:t,value:n,boxCenter:i,rendWidth:r,rendHeight:o,flipXY:s,symbol:a}=e,l="x",c="y",u=r,h=o,d=n<.5?90:-90;return s&&(l="y",c="x",u=o,h=r,d=n<.5?180:0),a(m({},t.oob,{[l]:i*u,[c]:Math.max(t.oob.size/2,Math.min(n*h,h-t.oob.size/2)),startAngle:d}))}function Na(e){let{item:t,boxWidth:n,boxPadding:i,rendWidth:r,rendHeight:o,flipXY:s}=e,a="x",l="y",c="width",u="height",h=r,d=o;s&&(a="y",l="x",c="height",u="width",h=o,d=r);const{actualDiff:f,actualLow:p}=function(e){let{start:t,end:n,minPx:i=.1,maxPx:r=1}=e;const o=Math.max(t,n),s=Math.min(t,n),a=Ca(-.1,1.2,o),l=Ca(-.1,1.2,s),c=a*r-l*r,u=Math.max(i,c),h=(u-c)/2;return{actualDiff:u,startModifier:h,actualLow:l*r-h}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:d});return m({},t.box,{type:"rect",[a]:(i+t.major)*h,[l]:p,[u]:f,[c]:n*h,data:t.data||{},collider:{type:null}})}function Ra(e){let{item:t,from:n,to:i,boxCenter:r,rendWidth:o,rendHeight:s,flipXY:a}=e,l="x1",c="y1",u="x2",h="y2",d=o,f=s;return a&&(l="y1",c="x1",u="y2",h="x2",d=s,f=o),m({},t.line,{type:"line",[h]:Math.floor(n*f),[l]:r*d,[c]:Math.floor(i*f),[u]:r*d,data:t.data||{},collider:{type:null}})}function Oa(e){let{item:t,key:n,position:i,width:r,boxCenter:o,rendWidth:s,rendHeight:a,flipXY:l}=e,c="x1",u="y1",h="x2",d="y2",f=s,p=a;l&&(c="y1",u="x1",h="y2",d="x2",f=a,p=s);const g=r/2;return m({type:"line"},t[n],{[u]:Math.floor(i*p),[c]:(o-g)*f,[d]:Math.floor(i*p),[h]:(o+g)*f,r:g*f,cx:o*f,cy:i*p,width:r*f,data:t.data||{},collider:{type:null}})}function Ia(e,t,n){const{width:i,maxWidthPx:r,minWidthPx:o}=t.box,s=e>=0?1:-1;let a=Math.min(s*e*i,isNaN(r)?n:r/n);return a=isNaN(o)?a:Math.max(o/n,a),a*s}Ea("native",(function(e,t,n){let i,r,o={chart:e,mediator:t,element:n},s=[],a=!0;function l(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&Object.keys(i.events).forEach((e=>{const t=i.events[e].bind(o);n.addEventListener(e,t),s.push({key:e,listener:t})}))}function c(){s.forEach((e=>{let{key:t,listener:i}=e;n.removeEventListener(t,i)})),s=[]}return{get key(){return r},set(e){!function(e){r=e.key,i=e,i.events=i.events||[],void 0===i.enable&&(i.enable=!0)}(e),c(),a&&l()},off(){a=!1,c()},on(){a=!0,0===s.length&&l()},destroy(){c(),o=null,i=null}}}));const La={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}},Pa=Object.keys(La),ja={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let{data:t}=e;const{width:n,height:i}=this.rect,r="horizontal"===this.settings.settings.orientation,{style:o,resolver:s,symbol:a}=this,l=Pa.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),c={};l.forEach((e=>c[e]=La[e]));const u=function(e){let{keys:t,data:n,defaultSettings:i,style:r,settings:o,width:s,height:a,resolver:l}=e;const c=m(!0,{},i||{},r||{}),u={major:"horizontal"===o.orientation?a:s,minor:"horizontal"===o.orientation?s:a},h=o.major;let d;d="object"==typeof h&&"object"==typeof h.ref&&void 0!==h.ref.start&&void 0!==h.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:m(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof h&&void 0!==h.binStart&&void 0!==h.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:m(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):l.resolve({data:n,scaled:u,defaults:{major:.5},settings:{major:o.major}});const f=o.minor||{},p={};["start","end","min","max","med"].forEach((e=>{(f[e]||n.items&&n.items.length&&n.items[0][e])&&(p[e]={scale:f.scale,ref:e})}));let g,y={major:d,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:m(!0,{},p,f)})};for(let e=0,i=t.length;e<i;e++)o[g]&&!1===o[g].show||(g=t[e],y[g]=l.resolve({data:n,defaults:c[g],settings:o[g],scaled:u}));return y}({keys:l,data:t,defaultSettings:c,style:o,settings:this.settings.settings,width:n,height:i,resolver:s}),{settings:h,items:d}=u,f=function(e){let{width:t,height:n,flipXY:i,resolved:r,keys:o,symbol:s}=e;const a=[],l=r.major.items;if(!l.length)return a;const c=t,u=n,h=i?n:t,d=r.major.settings,f=["start","end","min","max","med"].filter((e=>void 0!==r.minor.settings[e])),p=f.length,g=o.filter((e=>"oob"!==e));let y,v,b,x,w,M,_,S,q;const D=o?o.length:0,A=g?g.length:0,E={box:function(){b.box&&k(b.start)&&k(b.end)&&y.push(Na({item:b,boxWidth:x,boxPadding:w,rendWidth:c,rendHeight:u,flipXY:i}))},line:function(){k(b.min)&&k(b.start)&&y.push(Ra({item:b,from:b.min,to:b.start,boxCenter:M,rendWidth:c,rendHeight:u,flipXY:i})),k(b.max)&&k(b.end)&&y.push(Ra({item:b,from:b.max,to:b.end,boxCenter:M,rendWidth:c,rendHeight:u,flipXY:i}))},median:function(){b.median&&k(b.med)&&y.push(Oa({item:b,key:"median",position:b.med,width:x,boxCenter:M,rendWidth:c,rendHeight:u,flipXY:i}))},whisker:function(){if(b.whisker){const e=x*b.whisker.width;k(b.min)&&y.push(Oa({item:b,key:"whisker",position:b.min,width:e,boxCenter:M,rendWidth:c,rendHeight:u,flipXY:i})),k(b.max)&&y.push(Oa({item:b,key:"whisker",position:b.max,width:e,boxCenter:M,rendWidth:c,rendHeight:u,flipXY:i}))}}};function C(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let i=0;i<p;i++)e=b[f[i]],k(e)&&(t<e&&(t=e),n>e&&(n=e));_=t<0&&t!==-Number.MAX_VALUE,S=n>1&&n!==Number.MAX_VALUE,q=_||S}for(let e=0,t=l.length;e<t;e++){y=[],v=null;const t=l[e],n=t.data;let f=null,p=null;void 0!==d.binStart?(f=t.binStart,p=t.binEnd,v=d.binStart.scale):(v=d.major.scale,f=v?t.major:0);let k=0;v?v.bandwidth?(k=v.bandwidth(),f-=k/2):k=p-f:k=1,b=m({},{major:f,majorEnd:p},r.minor.items[e]);for(let t=0;t<D;t++)b[o[t]]=r[o[t]].items[e];if(x=Ia(k,b,h),w=(k-x)/2,M=w+b.major+x/2,C(),q)b.oob&&(_?y.push(Ta({item:b,value:0,boxCenter:M,rendWidth:c,rendHeight:u,flipXY:i,symbol:s})):S&&y.push(Ta({item:b,value:1,boxCenter:M,rendWidth:c,rendHeight:u,flipXY:i,symbol:s})));else for(let e=0;e<A;e++)b[g[e]]&&!1===b[g[e]].show||E[g[e]]();const T={type:"container",data:n,collider:{type:"bounds"},children:y};a.push(T)}return a}({width:n,height:i,flipXY:r,resolved:u,keys:l,symbol:a});return f}};const za={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},Fa=/px$/,Ha={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},Va={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function Ba(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 $a(e,t,n,i){let{width:r,height:o}=t;return e.filter((e=>!1!==e.show&&!isNaN(e.x+e.y))).map((e=>{let t=e,s=Fa.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);M(s)&&(t=za,s=n.min+t.size*(n.max-n.min));const[a,l]=function(e){let t=Ha.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),c=x(x({},l),{},{type:a,label:e.label,x:e.x*r,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,s)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity});t===e.errorShape&&(c.width=t.width);const u=i(c);return u.data=e.data,u}))}const Wa={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let{data:t}=e;const n=this.resolver.resolve({data:t,defaults:m({},Ha,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:i,height:r}=this.rect,o=m({},Va,this.settings.settings.sizeLimits),s=n.items,a=function(e,t,n,i,r){const o=Ba(e?e.scale:void 0,n),s=Ba(t?t.scale:void 0,i);let a=Math.min(o.value*r[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],s.value*r[s.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(o.value*r[o.isBandwidth?"minRelDiscrete":"minRelExtent"],s.value*r[s.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(a)),maxGlobal:r.maxPx,minGlobal:r.minPx}}(n.settings.x,n.settings.y,i,r,o);return $a(s,this.rect,a,this.settings.shapeFn||this.symbol)}};const Ua={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function Ya(e,t,n,i){let{x:r,y:o,width:s,height:a}=t;const l=ne(),c={x:r+s/2,y:o+a/2},u=Math.min(s,a)/2,h=Math.min(s,a)/2,d=h/100;return e.map(((e,t)=>{const r=n[t];r.type="path";const o=h*r.outerRadius,s=u*r.innerRadius,a=d*r.cornerRadius;l.innerRadius(s),l.outerRadius(o),l.cornerRadius(a),r.arcDatum=e;const f=l.centroid(e),p=r.offset?function(e,t,n,i){let[r,o]=e;const s=Math.sqrt(r*r+o*o);r/=s,o/=s;const a=n-i;return{x:r*t*a,y:o*t*a}}(f,r.offset,o,s):{x:0,y:0};return r.transform="translate(".concat(p.x,", ").concat(p.y,") translate(").concat(c.x,", ").concat(c.y,")"),r.desc={share:e.value/i,slice:{start:e.startAngle,end:e.endAngle,innerRadius:s,outerRadius:o,cornerRadius:a,offset:{x:c.x+p.x,y:c.y+p.y}}},r}))}function Xa(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const Ka={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let{data:t}=e;const n=[],i=[],r=this.settings.settings,{items:o}=this.resolver.resolve({data:t,defaults:m({},Ua,this.style.slice),settings:r.slice});let s=0;for(let e=0,t=o.length;e<t;e++){const t=Xa(r,o[e]);t>0&&o[e].outerRadius>=o[e].innerRadius&&(n.push(t),i.push(o[e]),s+=t)}const a=function(){var e=ce,t=le,n=null,i=P(0),r=P(X),o=P(0);function s(s){var a,l,c,u,h,d=s.length,f=0,p=new Array(d),g=new Array(d),m=+i.apply(this,arguments),y=Math.min(X,Math.max(-X,r.apply(this,arguments)-m)),v=Math.min(Math.abs(y)/d,o.apply(this,arguments)),b=v*(y<0?-1:1);for(a=0;a<d;++a)(h=g[p[a]=a]=+e(s[a],a,s))>0&&(f+=h);for(null!=t?p.sort((function(e,n){return t(g[e],g[n])})):null!=n&&p.sort((function(e,t){return n(s[e],s[t])})),a=0,c=f?(y-d*b)/f:0;a<d;++a,m=u)l=p[a],u=m+((h=g[l])>0?h*c:0)+b,g[l]={data:s[l],index:a,value:h,startAngle:m,endAngle:u,padAngle:v};return g}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:P(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,n=null,s):t},s.sort=function(e){return arguments.length?(n=e,t=null,s):n},s.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:P(+e),s):i},s.endAngle=function(e){return arguments.length?(r="function"==typeof e?e:P(+e),s):r},s.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:P(+e),s):o},s}().sortValues(null);a.startAngle(r.startAngle),a.endAngle(r.endAngle),a.padAngle(r.padAngle);return Ya(a(n),m({},this.rect,{x:0,y:0}),i,s)}};const Ga=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],i=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((e=>{const n=Math.round(t[e.key]),r=t[e.key]-n;t[e.key]=n,i&&"append"===e.type&&(r>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach((t=>{const n=e[t];n.items=[],n.append.forEach((e=>{n.items.push({key:e,type:"append"})})),n.round.forEach((e=>{n.items.push({key:e,type:"round"})}))})),t.multiple=e=>e.forEach((e=>t(e))),t}();class Ja{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const i=e.substring(0,1);if("x"===i||"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"===i||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,i=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let i=n?this.height:this.width,r=n?this.width:this.height;e=e.fn({width:i,height:r,flipXY:n});const o=Object.keys(e);for(let i=0,r=o.length;i<r;i++){let r=o[i];t[Ja.evaluateKey(r,n)]=e[r]}}else{const i=Object.keys(e);for(let r=0,o=i.length;r<o;r++){let o=i[r];const s=Ja.evaluateKey(o,n),a=this.transposeCoordinate(s,e[o],n);t[s]=a}}return i&&Ga(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function Za(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ja(...t)}function Qa(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const el={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=Za(),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(){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,Ho(this,"x",this.rect.width),Ho(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=m({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=m({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=Qa(this.x,this.rect.width),this.lines.y=Qa(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>m(e,{flipXY:!0})));let e=e=>{let{dir:t,isMinor:n}=e,i=this.lines[t].filter((e=>!!e.isMinor===n)),r=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:r,data:{items:i,dir:t}}).items.forEach((e=>{let n=e.data;var i,r;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(i=n.value)&&void 0!==i?i:null===(r=n.data)||void 0===r?void 0:r.value,dir:t})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function tl(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===i||"right"===i){let r="right"===i;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(r?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(r?e+n:e-n," ").concat(t," Z\n ")}let r="bottom"===i;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(r?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(r?t+n:t-n," Z\n ")}function nl(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===i||"right"===i){let r="right"===i;return"\n M ".concat(e+=r?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(r?e+n:e-n," ").concat(t," Z\n ")}let r="bottom"===i;return t+=r?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(r?t+n:t-n," Z\n ")}function il(e,t,n){return e<t||e>n}function rl(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function ol(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;default:return 0}return 0}function sl(e){var t,n;let{chart:i,blueprint:r,renderer:o,p:s,settings:a,items:l,slopeLine:c}=e,u=!0,h=!1,d=!1,f=!1,p=!1,g=m(!0,{},a.style.line,s.line||{}),y=m(!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:g.stroke});if(h=c?r.processItem({type:"line",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:g.stroke||"black",strokeWidth:g.strokeWidth||1,strokeDasharray:g.strokeDasharray,flipXY:!1,value:s.valueInfo?s.valueInfo.id:s.value}):r.processItem({type:"line",x1:s.position,y1:0,x2:s.position,y2:1,stroke:g.stroke||"black",strokeWidth:g.strokeWidth||1,strokeDasharray:g.strokeDasharray,flipXY:s.flipXY||!1,value:s.valueInfo?s.valueInfo.id:s.value}),s.label&&!1!==s.label.show&&(null==c||!c.slope||0===c.slope)){const e=m(!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:g.stroke},s.label);let t,n={width:0,height:0},c="";t=rl(s,i),!1!==s.label.showValue&&(t?c=" (".concat(t(s.value),")"):s.scale&&(c=" (".concat(s.value,")"))),c&&(n=o.measureText({text:c,fontFamily:e.fontFamily,fontSize:e.fontSize}));let h=o.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),y={width:h.width+n.width,height:Math.max(h.height,n.height)},v=e.padding,b=ol(s.flipXY?e.vAlign:e.align),x=ol(s.flipXY?e.align:e.vAlign),w=Math.min(1+y.width+2*v,e.maxWidth*r.width,e.maxWidthPx),k=y.height+2*v,M=s.flipXY?k:w,_=s.flipXY?w:k;if(d=r.processItem({fn:t=>{let{width:n,height:i}=t,o=s.position*n-(s.flipXY?k:w)*(1-b);o=s.flipXY?o:Math.max(o,0);return{type:"rect",x:o,y:Math.max(Math.abs(x*i-_*x),0),width:s.flipXY?M:Math.min(M,r.width-o),height:_,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:s.flipXY||!1}),d.x<-1||d.x+d.width>r.width+1||d.y<-1||d.y+d.height>r.height+1)d=void 0;else{f={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:d.x+v,y:d.y+d.height/2+y.height/3,maxWidth:d.width-2*v-n.width,anchor:"start"},c&&(p={type:"text",text:c||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:f.x+3+(d.width-(n.width+2*v)),y:f.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?Ls(d,t)&&(u=!1):"line"===t.type&&s.flipXY===t.flipXY&&zs(d,t)&&(u=!1)}}}if(h&&l.push(h),c&&0!==c.slope&&(!1!==(null===(t=c.label)||void 0===t?void 0:t.show)||!1!==(null===(n=c.label)||void 0===n?void 0:n.showValue))){var v,b,x;let e,t;const n=120;let a=!1!==(null===(v=c.label)||void 0===v?void 0:v.show)?null===(b=c.label)||void 0===b?void 0:b.text:"";if(!1!==(null===(x=c.label)||void 0===x?void 0:x.showValue)){var w;const t=rl(s,i),n=t?t(c.value):c.value;e="(".concat(c.slope,"x + ").concat(n,")"),a+=null!==(w=c.label)&&void 0!==w&&w.text?" ".concat(e):e}if(a.length>1){var k,M,_;const e=o.measureText({text:a,fontFamily:y.fontFamily,fontSize:y.fontSize});e.width=e.width>n?n:e.width;const s=function(e,t,n){const i=e.scale({scale:"x"}),r=e.scale({scale:"y"});if(t>0){if(i.max()*t+n>=r.max())return!0}else if(t<0&&i.min()*t+n>=r.max())return!0;return!1}(i,c.slope,c.value)?function(e,t,n){const i=e.scale({scale:"x"}),r=e.scale({scale:"y"});return i((r.max()-n)/t)}(i,c.slope,c.value):void 0,u=void 0===s||c.isRtl?y.padding:3*y.padding,d=void 0!==s||c.slope>0?3*y.padding:y.padding,f=function(e,t,n,i,r,o){let s=0;if(void 0!==n){if(n<.8)return s=e.slope<0||e.isRtl?3*o.padding:2*o.padding,e.isRtl,n*r.width+s;if(1===n)return e.isRtl?n*r.width-(i.width+3*o.padding):n*r.width-(i.width+6*o.padding);if(n>.8)return e.isRtl?n*r.width-(i.width+3*o.padding):n*r.width-(i.width+6*o.padding)}else if(e.slope>0)return t.x2-(i.width+2*o.padding);return e.isRtl?t.x1-(i.width+2*o.padding):t.x1}(c,h,s,e,r,y),p=Math.min(h.y1,h.y2);null!==(k=c.label)&&void 0!==k&&k.stroke&&(t={type:"rect",x:c.isRtl?Math.max(f,u)-2:Math.max(f,u)+2,y:Math.abs(Math.max(p,d)-e.height),rx:3,ry:3,width:e.width+y.padding,height:e.height-2,stroke:g.stroke,fill:g.stroke});const m={type:"text",text:a,fill:null!==(M=null===(_=c.label)||void 0===_?void 0:_.stroke)&&void 0!==M?M:g.stroke,opacity:y.opacity,fontFamily:y.fontFamily,fontSize:y.fontSize,x:t?t.x+2:Math.max(f,u)+2,y:t?t.y+e.height-y.padding:Math.abs(Math.max(p,d)-y.padding/2),anchor:"start",title:a,maxWidth:n,width:e.width};(function(e,t,n,i,r){for(let o=0,s=e.length;o<s;o++){const s=e[o];if("text"===(null==s?void 0:s.type)&&Math.abs(s.x-t.x)<Math.max(s.width+i,t.width+i)&&Math.abs(s.y-t.y)<n.height+r)return!0}return!1})(l,m,e,u,d)||(t&&l.push(t),l.push(m))}}u&&d&&f&&(l.push(d,f),p&&l.push(p))}function al(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function ll(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function cl(e,t){const n=e.min();if(n===e.max()){const i=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return i?2:-1;if(t>n)return i?-1:2}return e(t)}function ul(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const hl={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:()=>30,beforeRender(){this.blueprint=Za(),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(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(ll).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=cl(t,e.value);return m(e,{scale:t,position:n})}return m(e,{position:e.value})})),this.lines.y=this.lines.y.filter(ll).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=cl(t,e.value);return m(e,{scale:t,position:n,flipXY:!0})}return m(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(al(e)),!1))),this.lines.y=this.lines.y.filter((e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(al(e)),!1))));let n=[];return[...this.lines.x,...this.lines.y].forEach((i=>{if(!0===i.show||void 0===i.show){let r;if(i.slope&&0!==i.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),o=e.min(),s=e.max(),a=n.min(),l=n.max();r=x(x({},i),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const c=o*i.slope+i.value,u=s*i.slope+i.value,h=(a-i.value)/i.slope,d=(l-i.value)/i.slope;let f=[];il(c,a,l)||(f[0]={x:cl(e,o),y:cl(n,c)}),il(h,o,s)||(f[1]={x:cl(e,h),y:1}),il(u,a,l)||(f[2]={x:cl(e,s),y:cl(n,u)}),il(d,o,s)||(f[3]={x:cl(e,d),y:0});if(f.filter((e=>!!e)).length>2&&function(e){ul(e[0],e[1])&&(e[1]=void 0),ul(e[1],e[2])&&(e[2]=void 0),ul(e[2],e[3])&&(e[3]=void 0),ul(e[3],e[0])&&(e[3]=void 0)}(f),f=f.filter((e=>!!e)),f.length<2)return void t["y".concat(c>l?0:1)].push(al(i));r.x1=f[0].x,r.y1=f[0].y,r.x2=f[1].x,r.y2=f[1].y}else r=void 0;sl({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:i,settings:e,items:n,slopeLine:r})}})),e.style.oob.show&&function(e){let{blueprint:t,oob:n,settings:i,items:r}=e;const o=Object.keys(n);let s=i.style.oob||{};for(let e=0,i=o.length;e<i;e++){const i=o[e],a=n[i];if(a.length>0){let e=i.charAt(1),n="y"===i.charAt(0),o=s.padding.x+s.width,l=s.padding.y+s.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let{width:i,height:r}=t,u=e*i+("1"===e?-o:o),h=n?l:r-l;return"arc"===s.type?{type:"path",d:tl(n?h:u,n?u:h,s.width,c),x:u,y:h,stroke:s.stroke,fill:s.fill,strokeWidth:s.strokeWidth||0}:{type:"circle",cx:u,cy:h,r:s.width,stroke:s.stroke,fill:s.fill,strokeWidth:s.strokeWidth||0,opacity:s.opacity,data:a}},flipXY:n}),h=u.cx||u.x,d=u.cy||u.y;const f=a.map((e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")"))),p=f.reduce(((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t)),"");let g={type:"text",text:a.length||"",title:p,x:h-.4*s.width,y:d+.4*s.width,fontFamily:s.text.fontFamily,fontSize:"".concat(1.3*s.width,"px"),stroke:s.text.stroke,fill:s.text.fill,strokeWidth:s.text.strokeWidth||0,opacity:s.text.opacity},m={type:"path",d:nl(h,d,s.width,c),x:h,y:d,stroke:s.triangle.stroke,fill:s.triangle.fill,strokeWidth:s.triangle.strokeWidth||0,opacity:s.triangle.opacity};r.push(u,g,m)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function dl(e){const 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=t.x1+e.innerRect.width,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=t.y1+e.innerRect.height),function(e,t){m(e,t.style)}(t,e),t}function fl(e){return"string"==typeof e||"number"==typeof e?e:"-"}function pl(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){const i=n.angle*(Math.PI/180),r=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,s="end"===t.anchor&&i<0,a="start"===t.anchor&&i>=0,l=t.boundingRect.y+(a||s?t.boundingRect.height:0),c=[{x:t.x-r,y:l},{x:t.x+r,y:l}].map((e=>cs(e,i,{x:t.x,y:t.y}))),u={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},h={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},d=i>=0?[u,h]:[h,u];c.push(...d),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const i=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:i,y:0,width:i<0?n.stepSize+i:n.stepSize,height:n.innerRect.height}}else{const 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}}const i=t.collider;i.x=Math.max(i.x,0),i.y=Math.max(i.y,0);const r=i.x+i.width-(n.outerRect.x+n.outerRect.width);i.width=r>0?i.width-r:i.width;const o=i.y+i.height-(n.outerRect.y+n.outerRect.height);i.height=o>0?i.height-o:i.height}(e,t,n)}function gl(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let i=0;if(e.tilted)i=e.stepSize*n;else{const r=t?e.textRect.height:e.textRect.width;i=Math.max(0,e.stepSize-r)*n}return i}function ml(e,t){var n,i;const r={type:"text",text:fl(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(i=e.data)||void 0===i?void 0:i.value};return"top"===t.align||"bottom"===t.align?(r.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+gl(t,!1),r.y="top"===t.align?t.innerRect.height:0,r.anchor=t.stepSize?"start":"middle",r.x+=isNaN(t.style.offset)?0:+t.style.offset):(r.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+gl(t,!0),r.x="left"===t.align?t.innerRect.width:0,r.anchor="left"===t.align?"end":"start",r.baseline=t.stepSize?"text-before-edge":"central",r.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(r,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,i=t.outerRect.width,r=Math.min(t.maxWidth/2,t.textRect.width/2),o=e.x-r,s=e.x+r;o<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):s>i&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,i=t.outerRect.height,r=t.maxHeight/2,o=e.y-r,s=e.y+r;o<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):s>i&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(r,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)}(r,t),function(e,t){if(t.tilted){const n=-t.angle,i=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(i)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(i)/2):e.x-=t.maxHeight*Math.sin(i)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const r=Math.cos(i)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+r>n&&(e.maxWidth=(n-e.x-10)/Math.cos(i))}else{const n=t.paddingEnd;e.x-r<n&&(e.maxWidth=(e.x-n-10)/Math.cos(i))}}}(r,t),function(e,t){e.boundingRect=t.textBounds(e)}(r,t),pl(e,r,t),r}function yl(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};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){m(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){const 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 vl(e){return!e.isMinor&&e.position>=0&&e.position<=1}function bl(e){let{rect:t,state:n,majorTicks:i,measure:r,horizontal:o}=e;return o?function(e){let{majorTicks:t,measureText:n,rect:i,state:r}=e;const o="layered"===r.labels.activeMode?2:1,s=i.width,a=t.map((e=>e.label)).map((e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":""))).map(n).map((e=>e.width));for(let e=0;e<t.length;++e){const n=t[e];if(o*s*Math.abs(n.start-n.end)<a[e])return!0}return!1}({majorTicks:i,measureText:r,rect:t,state:n}):function(e){let{majorTicks:t,measureText:n,rect:i}=e;const r=i.height,o=n("M").height;return!(t.length<2)&&r*Math.abs(t[0].position-t[1].position)<o}({majorTicks:i,measureText:r,rect:t})}function xl(e){let{value:t,maxValue:n,minValue:i,range:r,modifier:o}=e;return isNaN(r)||isNaN(o)||(t=r*o),t>n&&(t=n),t<i&&(t=i),t}function wl(e){let{isDiscrete:t,rect:n,formatter:i,measureText:r,scale:o,settings:s,state:a}=e,l=0;const c={left:0,top:0,right:0,bottom:0},{maxLengthPx:u,minLengthPx:h}=s.labels;if(s.labels.show){const e=s.align,d="top"===e||"bottom"===e,f=d?n.inner.width:n.inner.height,p=o.ticks({settings:s,distance:f,formatter:i}).filter(vl),g=e=>{const t=r({text:e,fontSize:s.labels.fontSize,fontFamily:s.labels.fontFamily});return t.width=xl({value:t.width,maxValue:u,minValue:h}),t};if(t&&d&&"auto"===s.labels.mode&&(!function(e){let{majorTicks:t,measure:n,rect:i,state:r,settings:o}=e;const s=o.labels.maxGlyphCount,a="layered"===r.labels.activeMode?2:1,l=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,c=n("…").width,u=i.width;let h=0,d=0;if(isNaN(s))for(let e=0;e<t.length;e++){const i=t[e],r=i.label,o=n(r).width*(r.length>1?l:1);if(d=a*u*Math.abs(i.start-i.end),o+c>d)return!0}else if(d=a*u*t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0),h=n("M").width*l*s,h+c>d)return!0;return!1}({majorTicks:p,measure:g,rect:n.inner,state:a,settings:s})?a.labels.activeMode="horizontal":a.labels.activeMode="tilted"),!s.labels.filterOverlapping&&"tilted"!==a.labels.activeMode&&bl({rect:n.inner,state:a,majorTicks:p,measure:g,horizontal:d})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let m,y;if("tilted"===a.labels.activeMode){const e=Math.abs(s.labels.tiltAngle)*(Math.PI/180);m=t=>xl({value:t.width,maxValue:u,minValue:h})*Math.sin(e)+t.height*Math.cos(e)}else m=d?e=>e.height:e=>xl({value:e.width,maxValue:u,minValue:h});if(d&&"tilted"!==a.labels.activeMode)y=["M"];else if(isNaN(s.labels.maxGlyphCount))y=p.map((e=>e.label));else{let e="";for(let t=0;t<s.labels.maxGlyphCount;t++)e+="M";y=[e]}const v=y.map(g),b=v.map(m),x=Math.max(...b,0);if(l+=x,l+=s.labels.margin,"layered"===a.labels.activeMode&&(l*=2),"tilted"===a.labels.activeMode){const e="bottom"===s.align==s.labels.tiltAngle>=0,t=Math.abs(s.labels.tiltAngle)*(Math.PI/180),i=(x-g("M").height*Math.cos(t))/Math.sin(t),r=e=>Math.min(i,e.width)*Math.cos(t)+e.height,o=(t,i)=>{const r=p[i]?p[i].position:0;return e?t-r*n.inner.width:t-(1-r)*n.inner.width},a=Math.min(s.labels.maxEdgeBleed,Math.max(...v.map(r).map(o),0))+s.paddingEnd;if(c[e?"left":"right"]=a,!s.labels.filterOverlapping&&function(e){let{majorTicks:t,measureText:n,rect:i,bleedSize:r,angle:o}=e;if(t.length<2)return!1;if(0===o)return!0;const s=Math.abs(o),a=1/(Math.min(i.outer.width-r,i.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(s*(Math.PI/180))/a}({majorTicks:p,measureText:g,rect:n,bleedSize:a,angle:s.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const kl=(e,t,n)=>e.width*Math.abs(t.position-n.position);function Ml(e){let{layered:t,major:n,innerRect:i,outerRect:r,tick:o,index:s}=e;const a=t?2:1,l=n[s-a],c=n[s+a],u=l?kl(i,o,l)/2-2:1/0,h=c?kl(i,o,c)/2-2:1/0;return n.length<2?i.width:l?c?2*Math.min(u,h):(e=>{let{innerRect:t,outerRect:n,tick:i,prevWidth:r}=e;const o=t.x-n.x,s=n.width-t.width-o,a=t.width-t.width*i.position+s,l=2*Math.min(r,a),c=1===i.position?t.width/2-2:0;return Math.max(r,l,c)})({innerRect:i,outerRect:r,tick:o,prevWidth:u}):(e=>{let{innerRect:t,outerRect:n,tick:i,nextWidth:r}=e;const o=t.x-n.x,s=t.width*i.position+o,a=2*Math.min(r,s),l=0===i.position?t.width/2-2:0;return Math.max(r,a,l)})({innerRect:i,outerRect:r,tick:o,nextWidth:h})}function _l(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},i=Math.min(t.height,t.width)/2*e.radius,r=i+e.style.strokeWidth,o={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:i,outerRadius:r}},ticks:[]};return function(e,t){m(e,t.style)}(o,e),o}function Sl(e,t,n,i){return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}function ql(e,t){const n=t.innerRect,i={cx:n.width/2,cy:n.height/2},r=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,s=t.endAngle,a=t.tickSize,l=s-o;let c=s-e.position*l;c-=Math.PI/2;const u=Sl(i.cx,i.cy,r+a,c),h=Sl(i.cx,i.cy,r,c),d={type:"line",x1:u.x,y1:u.y,x2:h.x,y2:h.y,value:e.value};return function(e,t){const n=x({},t.style);m(e,n)}(d,t),d}function Dl(e){return"string"==typeof e||"number"==typeof e?e:"-"}function Al(e,t,n){let i;return i="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),i}function El(e,t){const n=t.innerRect,i={cx:n.width/2,cy:n.height/2},r=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,s=t.endAngle,a=t.tickSize,l=s-o,c=.2;let u,h;u="top"===t.align||"bottom"===t.align?s-e.position*l:o+e.position*l,h=u<-.2&&u>-Math.PI+c?"left":u>.2&&u<Math.PI-c?"right":"center",u-=Math.PI/2;const d=function(e,t,n,i){return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}(i.cx,i.cy,r+a+6,u);let f;f="left"===h?"end":"right"===h?"start":"middle";const p={type:"text",text:Dl(e.label),align:h,x:d.x,y:d.y,maxHeight:t.maxHeight,maxWidth:Al(t,h,d),anchor:f,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(p,t),function(e,t){e.boundingRect=t.textBounds(e)}(p,t),function(e,t,n){let i,r;const o=parseFloat(n.fontSize)||0;i=t.y-o/2,r=e.innerRect.height-(t.y+o/2),(i<0||r<0)&&(n.text="")}(t,d,p),p}function Cl(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function Tl(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function Nl(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=Cl(e)+e.labels.margin,t}function Rl(e,t){return e.map((e=>yl(e,t)))}function Ol(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function Il(e){let{textMetrics:t,settings:n,innerRect:i,scale:r,tilted:o,layered:s,tick:a}=e;const l=t.height,c=Ol(r,a),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=i.width-Nl(n)-n.paddingEnd;else if(s)u.width=c*i.width*2;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(i.height-Nl(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*i.width;return u.width=xl({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function Ll(e){let{textMetrics:t,settings:n,innerRect:i,outerRect:r,tilted:o,layered:s,tick:a,index:l,major:c}=e;const u=t.height,h={width:0,height:u};if("left"===n.align||"right"===n.align)h.width=i.width-Nl(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);h.width=(i.height-Nl(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else h.width=Ml({layered:s,major:c,innerRect:i,outerRect:r,tick:a,index:l});return h.width=xl({value:h.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),h}function Pl(e){let t;function n(){return t=Ll,n}function i(){return t=Il,i}function r(e){let{settings:n,scale:i,innerRect:r,outerRect:o,measureText:s,ticks:a,state:l,textBounds:c}=e;const u=[],h=function(e){return e.filter((e=>!e.isMinor))}(a),d=function(e){return e.filter((e=>e.isMinor))}(a),f={innerRect:r,align:n.align,outerRect:o},p="tilted"===l.labels.activeMode,g="layered"===l.labels.activeMode;let m;if(n.arc&&(f.startAngle=n.arc.startAngle,f.endAngle=n.arc.endAngle,f.radius=n.arc.radius),n.line.show&&(f.style=n.line,f.padding=n.paddingStart,n.arc?u.push(_l(f)):u.push(dl(f))),n.ticks.show&&(f.style=n.ticks,f.tickSize=n.ticks.tickSize,f.padding=Cl(n),n.arc?(f.padding=Tl(n),m=function(e,t){return e.map((e=>ql(e,t)))}(h,f)):m=Rl(h,f)),n.labels.show){const e=Nl(n);f.style=n.labels,f.padding=e,f.tilted=p,f.layered=g,f.angle=n.labels.tiltAngle,f.paddingEnd=n.paddingEnd,f.textBounds=c;const a=(e,a)=>{f.textRect=function(e){let{style:t,measureText:n,tick:i}=e;return n({text:i.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:s,style:f.style});const l=t({textMetrics:f.textRect,settings:n,innerRect:r,outerRect:o,scale:i,tilted:p,layered:g,tick:e,major:h,index:a});f.maxWidth=l.width,f.maxHeight=l.height,f.stepSize=function(e){let{innerRect:t,scale:n,settings:i,tick:r}=e;return("top"===i.align||"bottom"===i.align?t.width:t.height)*Ol(n,r)}({innerRect:r,scale:i,settings:n,tick:e})};let l=[];n.arc?(f.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=Tl(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map(((e,i)=>{n(e,i);const r=El(e,t);return r.data=e.data,r}))}(h,f,a)):l=!g||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,i)=>{n(e,i);const r=ml(e,t);return r.data=e.data,r}))}(h,f,a):function(e,t,n,i){const r=t.padding,o=Nl(n);return e.map(((e,s)=>{i(e,s);const a=o+t.maxHeight+n.labels.margin;t.layer=s%2,t.padding=s%2==0?r:a;const l=ml(e,t);return l.data=e.data,l}))}(h,f,n,a),n.labels.filterOverlapping&&function(e,t,n){let i=(t,n)=>Ls(C(1,e[t].boundingRect),C(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);i=(n,i)=>{const r=1/Math.abs(e[n].x-e[i].x),o=Math.sin(t*(Math.PI/180))/r;return e[n].boundingRect.height>o}}for(let n=0;n<=e.length-1;n++)for(let r=n+1;r<=Math.min(n+5,n+(e.length-1));r++)e[n]&&e[r]&&i(n,r)&&(r===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(r,1),t&&t.splice(r,1)),r--,n--)}(l,m,f),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&d.length>0&&(f.style=n.minorTicks,f.tickSize=n.minorTicks.tickSize,f.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...Rl(d,f))),m&&u.push(...m),u}return n.build=r,i.build=r,e?i():n()}const jl={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"},zl={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"};const Fl={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(){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(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let{state:t,style:n,settings:i}=e;const r=m(!0,{},t.isDiscrete?jl:zl,n),o=m(!0,{},r,i.settings),s=i.layout.dock||t.defaultDock;o.dock=s,o.align=function(e,t){const n=["top","bottom"],i=["left","right"];return-1!==n.indexOf(e)&&-1===i.indexOf(t)||-1!==i.indexOf(e)&&-1===n.indexOf(t)?e:t}(i.settings.align,s),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));const{paddingStart:a,paddingEnd:l}=o;return o.paddingStart="function"==typeof a?a.call(null):a,o.paddingEnd="function"==typeof l?l.call(null):l,o}(this),this.state.concreteNodeBuilder=Pl(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=function(e,t,n){const i=t.labels.mode;return n&&e.isHorizontal?"auto"===i?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?i:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const{formatter:t,state:n,scale:i}=this,r=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=Vo(i,r);const o=function(e){let{isDiscrete:t,rect:n,formatter:i,measureText:r,scale:o,settings:s,state:a}=e,l=0;const{size:c,edgeBleed:u,isToLarge:h}=wl({isDiscrete:t,rect:n,formatter:i,measureText:r,scale:o,settings:s,state:a});if(l+=c,h)return{size:l};if(s.ticks.show&&(l+=s.ticks.margin,l+=s.ticks.tickSize),s.minorTicks&&s.minorTicks.show){const e=s.minorTicks.margin+s.minorTicks.tickSize;e>l&&(l=e)}if(s.line.show){const e=s.line.strokeWidth/2;l+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(s.align)]=Math.ceil(e)}return l+=s.paddingStart,l+=s.paddingEnd,{size:l,edgeBleed:u}}({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});return o},beforeUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{settings:t}=e;this.setState(t)},resize(e){const{inner:t,outer:n}=e,i=m({},t,function(e){let{align:t,inner:n}=e;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})),r=n||i;return m(this.state.innerRect,i),m(this.state.outerRect,r),n},beforeRender(){const{scale:e,formatter:t}=this,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=Vo(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((e=>e.position>=0&&e.position<=1))},render(){const{state:e}=this,t=[];return t.push(...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})),Ga.multiple(t),t}};const Hl={render:()=>[]};function Vl(e,t,n){let i="";if("function"==typeof e)i=e();else if("string"==typeof e)i=e;else if(n){const e=(n.data().fields||[]).map((e=>e.title()));i=e.join(t)}return i}function Bl(e,t){let 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}const $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(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=Vl(e,t,this.scale)},preferredSize(){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(){const{title:e,definitionSettings:t,rect:n}=this,i=[];return i.push(function(e){let{title:t,definitionSettings:n,dock:i,rect:r,measureText:o,style:s}=e;const a={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:Bl(i,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};m(a,s.text);const l=o(a);if("top"===i||"bottom"===i){let e=r.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=r.width-(n.paddingRight||0)),a.x=e,a.y="top"===i?r.height-n.paddingStart:n.paddingStart+l.height,a.dy="top"===i?-l.height/6:-l.height/3,a.maxWidth=.8*r.width}else{let e=r.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=r.height-n.paddingStart),a.y=e,a.x="left"===i?r.width-n.paddingStart:n.paddingStart,a.dx="left"===i?-l.height/3:l.height/3;const t="left"===i?270:90;a.transform="rotate(".concat(t,", ").concat(a.x+a.dx,", ").concat(a.y+a.dy,")"),a.maxWidth=.8*r.height}return isNaN(n.maxLengthPx)||(a.maxWidth=Math.min(a.maxWidth,n.maxLengthPx)),a}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),i},beforeUpdate(e){e.settings&&(m(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=Vl(t,n,this.scale)}};function Wl(e,t){const n=e.settings.layout.dock,i=e.settings.settings.invert,r="top"===n||"bottom"===n,o=r?"width":"height",s=e.rect[o],a=e.chart.scroll(e.settings.scroll);let l;{let e=t[r?"x":"y"];i&&(e=s-e);const n=a.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const o=e/s*(n.max-n.min)+n.min;o<n.start?l.startScroll=o:o>n.start+n.viewSize&&(l.startScroll=o-n.viewSize)}return{update:e=>{let t=e[r?"x":"y"];if(i&&(t=s-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=a.getState(),o=(t-l.startOffset)/s*(n.max-n.min),c=l.startScroll+o;a.moveTo(c)},end:e=>{let t=e[r?"x":"y"];i&&(t=s-t);const n=a.getState();if(l.swipe){const e=(t-l.startOffset)/s*(n.max-n.min),i=l.startScroll+e;a.moveTo(i)}else{const e=t/s*(n.max-n.min)+n.min-n.viewSize/2;a.moveTo(e)}}}}function Ul(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const Yl={require:["chart","renderer"],on:{panStart(e){const t=Ul(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=Wl(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=Ul(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=Ul(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=Ul(e,this.renderer);Wl(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,i="top"===t||"bottom"===t,r=i?"width":"height",o=this.rect[r],s=this.chart.scroll(this.settings.scroll).getState();let a=o*(s.start-s.min)/(s.max-s.min);const l=o*s.viewSize/(s.max-s.min);return n&&(a=o-a-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[i?"left":"top"]:"".concat(a,"px"),[i?"top":"left"]:"25%",[i?"height":"width"]:"50%",[r]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function Xl(e){let{h:t,isVertical:n,value:i,pos:r,align:o,borderHit:s,state:a,idx:l}=e;const c="end"!==o,u=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let h=0,d="100%",f="100%";return a.targetRect&&"start"===a.settings.bubbles.align?(d="".concat(a.targetRect.x+a.targetRect.width,"px"),f="".concat(a.targetRect.y+a.targetRect.height,"px")):a.targetRect&&"end"===a.settings.bubbles.align&&(h=n?a.targetRect.x:a.targetRect.y,d="".concat(a.rect.width-h,"px"),f="".concat(a.rect.height-h,"px")),c||(r-=s),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=a.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":i,"data-key":[a.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?h:r,"px"),top:"".concat(n?r:h,"px"),height:n?"".concat(s,"px"):f,width:n?d:"".concat(s,"px"),pointerEvents:"auto"}},[t("div",{style:m({backgroundColor:a.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function Kl(e){let{h:t,isVertical:n,label:i,otherValue:r,rangeIdx:o,idx:s,pos:a,align:l,state:c,value:u}=e;const h="end"!==l,d="outside"===c.settings.bubbles.placement;let f,p="none";n?(f=h?"left":"right",d&&(p=h?"translate(-100%, 0px)":"translate(100%, 0px)")):(f=h?"top":"bottom",d&&(p=h?"translate(0px, -100%)":"translate(0px, 100%)"));let g=c.edit&&c.edit.rangeIdx===o&&c.edit.bubbleIdx===s;const m={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=c.style.bubble.stroke;const v=g?t("input",{type:"text",value:u,style:x(x({},m),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(y)):c.onEditConfirmed(o,t,r)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",o,s].join("-"),"data-other-value":r,"data-idx":o,"data-bidx":s,style:m},[i]);return t("div",{style:{position:"absolute",[f]:"0",[n?"top":"left"]:"".concat(a,"px"),transform:p}},[v])}function Gl(e){let{h:t,isVertical:n,top:i,height:r,color:o,on:s,opacity:a}=e;return t("div",m({style:{backgroundColor:o,opacity:a,position:"absolute",left:n?0:"".concat(i,"px"),top:n?"".concat(i,"px"):0,height:n?"".concat(r,"px"):"100%",width:n?"100%":"".concat(r,"px"),pointerEvents:"auto"}},s),[])}function Jl(e){let{borderHit:t,els:n,isVertical:i,state:r,vStart:o,vEnd:s,idx:a}=e,l=0;r.targetRect&&(l=i?r.targetRect.y:r.targetRect.x);const c=!!r.scale,u=c?r.scale.norm(o)*r.size:o,h=c?r.scale.norm(s)*r.size:s,d=Math.abs(u-h),f=Math.min(u,h)+l,p=f+d;if(r.targetRect){const e=r.targetFillRect||r.targetRect,t=i?e.height:e.width,a=c?r.scale.norm(o)*t:o,l=c?r.scale.norm(s)*t:s,u=Math.abs(a-l),h=Math.min(a,l),d={h:r.h,isVertical:i,top:h,height:u,color:r.style.target.fill,opacity:r.style.target.opacity};r.style.target.opacity<.8&&(d.on={onmouseover(e){e.srcElement.style.opacity=r.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=r.style.target.opacity}}),n.push(r.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[Gl(d)]))}const g=u<h?o:s,m=u<h?s:o,[y,v]=c?r.scale.domain():[Math.min(o,s),Math.max(o,s)],b=g+1e-5>=y&&g-1e-5<=v,x=m-1e-5<=v&&m+1e-5>=y;b&&n.push(Xl({h:r.h,isVertical:i,borderHit:t,value:g,pos:f,align:"start",state:r,idx:a})),x&&n.push(Xl({h:r.h,isVertical:i,borderHit:t,value:m,pos:p,align:"end",state:r,idx:a}));const w=r.settings.bubbles;if(w&&w.show){w.fontSize,w.fontFamily,w.fill;const e=[o,s];b&&n.push(Kl({h:r.h,isVertical:i,align:w.align,rangeIdx:a,idx:0,otherValue:m,value:g,label:"".concat(r.format(g,e)),pos:f,state:r})),x&&n.push(Kl({h:r.h,isVertical:i,align:w.align,rangeIdx:a,idx:1,otherValue:g,value:m,label:"".concat(r.format(m,e)),pos:p,state:r}))}}function Zl(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let i=e.current-e.start;return i=i<0?Math.max(i,n):Math.min(i,t),i}function Ql(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((i,r)=>{e.active&&r===e.active.idx||Jl({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(i.min,i.max),vEnd:Math.max(i.min,i.max),idx:r})})),e.active){let i=e.start,r=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)i=Math.min(e.active.start,e.active.end),r=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)i=Math.min(e.start,e.current),r=Math.max(e.start,e.current);else{const t=Zl(e);i=e.active.start+t,r=e.active.end+t}Jl({borderHit:5,els:t,isVertical:n,state:e,vStart:i,vEnd:r,idx:e.active.idx})}return t}function ec(e){return{min:e.scale.min(),max:e.scale.max()}}function tc(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function nc(e,t,n){let i,r,o=e.ranges,s=-1;for(i=0;i<o.length;i++){if(o[i].min<=t&&t<=o[i].max){s=i,n.min=i?o[i-1].max:n.min,n.max=i+1<o.length?o[i+1].min:n.max;break}if(t<o[i].min){n.max=o[i].min,n.min=i?o[i-1].max:n.min;break}}-1===s&&o.length&&i>=o.length&&(n.min=o[o.length-1].max),-1!==s&&(r={idx:s,start:o[s].min,end:o[s].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=r}function ic(e){e.renderer.render(Ql(e))}function rc(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),i=(n&&n.fields||[]).map((e=>e.id())),r=t.brushes().filter((e=>"range"===e.type&&-1!==i.indexOf(e.id)))[0];return r?r.brush.ranges():[]}function oc(e,t){let n,i=1/0;const r=t.domain(),o=t.bandwidth()/2;for(let s=0;s<r.length;++s){const a=Math.abs(e-o-t(r[s]));a<i&&(i=a,n=r[s])}return n}function sc(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function ac(e){return D(e.reduce(((e,t)=>(e.push(...q(t.bounds)),e)),[]))}const lc={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(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=rc(this.state,this.state.brushInstance),this.state.active=null,ic(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),i=this.state.rect[0===this.state.direction?"height":"width"];let r=Vo(this.chart.scale(t.scale),i);const o=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,i=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((t=>e.chart.component(t))).filter((e=>!!e&&!!e.rect)),r=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(r.length>0){const i=ac(r);if(t.size=i[0===e.state.direction?"height":"width"],t.scale=Vo(e.chart.scale(n.scale),t.size),t.targetRect=i,o.length>0){const e=ac(o);t.targetFillRect=e}}else if(i&&i.length>0){const n=i.slice(1).reduce(((e,t)=>({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:i[0].rect.computedInner.x,y0:i[0].rect.computedInner.y,x1:i[0].rect.computedInner.x+i[0].rect.computedInner.width,y1:i[0].rect.computedInner.y+i[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(r=o.scale?o.scale:r,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?i:o.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,i){let r=e.ranges.map((e=>({min:e.min,max:e.max})));const o=e.scale.min(),s=e.scale.max();r[t]={min:Math.max(o,Math.min(n,i)),max:Math.min(s,Math.max(n,i))},e.ranges[t]=x({},r[t]);const a=e.scale.data();a&&a.fields&&a.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),r)}))}(this.state,e,t,n),this.emit("bubbleEnd"),ic(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,ic(this.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 t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:r,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(r,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=r;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=$r(),this.state.scale.data=r.data,this.state.format||(this.state.format=(e,t)=>sc(r.range(),t)?function(e,t){const n=t.ticks(),i=t.domain().indexOf(oc(e,t));return-1!==i?n[i].label:"-"}(e,r):"-"),this.state.fauxBrushInstance=Eo(),this.state.findValues=e=>function(e,t){const n=t.domain(),i=t.range(),r=[];return e.forEach((e=>{if(!sc(i,[e.min,e.max]))return;const o=n.indexOf(oc(e.min,t)),s=n.indexOf(oc(e.max,t));r.push.apply(r,n.slice(Math.min(o,s),Math.max(o,s)+1))})),r}(e,r);return this.state.ranges=rc(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[Ql(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let{state:t,e:n,renderer:i,ranges:r,targetSize:o}=e;if(t.started)return;t.edit=null;const s=n.center.x-n.deltaX,a=n.center.y-n.deltaY;let l=document.elementFromPoint(s,a);i.element().contains(l)||(l=null);const c={started:!0};t.offset=m({},i.element().getBoundingClientRect());const u=s-t.offset.left,h=a-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=r(t,t.fauxBrushInstance||t.brushInstance);const d=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],f=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(f/t.size),c.start=t.scale.normInvert(d/t.size);let p=t.ranges;const g=ec(t);let y,v,b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),g.min=b>0?p[b-1].max:g.min,g.max=b+1<p.length?p[b+1].min:g.max;else{for(y=0;y<p.length;y++){if(p[y].min<=c.start&&c.start<=p[y].max){b=y,g.min=y?p[y-1].max:g.min,g.max=y+1<p.length?p[y+1].min:g.max;break}if(c.start<p[y].min){g.max=p[y].min,g.min=y?p[y-1].max:g.min;break}}-1===b&&p.length&&y>=p.length&&(g.min=p[p.length-1].max)}if(-1!==b||t.multi||(c.ranges=[],g.min=t.scale.min(),g.max=t.scale.max()),-1!==b)if(v={idx:b,start:p[b].min,end:p[b].max,limitLow:g.min,limitHigh:g.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),v.mode="modify";else{let e=t.scale.norm(v.start)*t.size,n=t.scale.norm(v.end)*t.size;Math.abs(d-e)<=o?(c.start=v.end,v.mode="modify"):Math.abs(d-n)<=o&&(c.start=v.start,v.mode="modify")}else v={idx:-1,start:c.start,end:c.current,limitLow:g.min,limitHigh:g.max,mode:"current"};c.active=v,"modify"!==v.mode&&t.targetRect&&!js(t.targetRect,{x:u,y:h})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:rc,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=ec(e);nc(e,e.current,n)}(this.state,rc),ic(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,i=e.scale.normInvert(n);e.current=Math.max(Math.min(i,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map((e=>({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{const n=Zl(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)});const n=e.scale.data();n&&n.fields&&n.fields.forEach((n=>{if(e.fauxBrushInstance){let i=rc(e,e.fauxBrushInstance),r=e.findValues(i),o=e.findValues(t),s=o.filter((e=>-1===r.indexOf(e))),a=r.filter((e=>-1===o.indexOf(e))),l=s.map((e=>({key:n.id(),value:e}))),c=a.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),ic(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,i={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(i.rangeIdx)||JSON.stringify(i)===JSON.stringify(this.state.edit))return;this.state.edit=i,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const r=n.parentNode;ic(this.state);const o=r.querySelector("input");o.focus(),o.select()}};function cc(e){e.renderer.render(Ql(e))}function uc(e){return e.rc.ranges()}function hc(e,t){const 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)}const dc={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(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,i=this.state.rect[0===n?"height":"width"],r=this.renderer.element().getBoundingClientRect(),o=(t.target?t.target.components||[t.target.component]:[]).map((e=>this.chart.component(e))).filter((e=>!!e&&!!e.rect)),s=o[0]?o.slice(1).reduce(((e,t)=>({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:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[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=n,this.state.settings=t,this.state.offset=r,this.state.rc=yo(),this.state.renderer=this.renderer,this.state.multi=!!t.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){const i=Math.min(...n),r=Math.max(...n),o={x:e.direction?i+e.rect.x:e.rect.x,y:e.direction?e.rect.y:i+e.rect.y,width:e.direction?r-i:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:r-i},s=e.chart.shapesAt(o,e.settings.brush);if(0===s.length)return"-";const a=s.reduce(((n,r)=>{const o=n.bounds,s=r.bounds;return t===i?o[e.cssCoord.coord]<=s[e.cssCoord.coord]?n:r:o[e.cssCoord.coord]+o[e.cssCoord.area]>=s[e.cssCoord.coord]+s[e.cssCoord.area]?n:r})),l=e.settings.brush.components.reduce(((e,t)=>e.key===a.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(a.data):Array.isArray(l.data)&&l.data.length?a.data[l.data[0]].label:a.data&&a.data.label?a.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let{state:t,e:n,renderer:i,ranges:r,targetSize:o}=e;if(t.started)return;const s=n.center.x-n.deltaX,a=n.center.y-n.deltaY;let l=document.elementFromPoint(s,a);i.element().contains(l)||(l=null);const c={started:!0};t.offset=i.element().getBoundingClientRect(),t.ranges=r(t);const u=s-t.offset.left,h=a-t.offset.top,d=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],f=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let p=f,g=d;c.start=d,c.current=f;let m=t.ranges;const y=tc(t);let v,b,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?m[x-1].max:y.min,y.max=x+1<m.length?m[x+1].min:y.max;else{for(v=0;v<m.length;v++){if(m[v].min<=g&&g<=m[v].max){x=v,y.min=v?m[v-1].max:y.min,y.max=v+1<m.length?m[v+1].min:y.max;break}if(g<m[v].min){y.max=m[v].min,y.min=v?m[v-1].max:y.min;break}}-1===x&&m.length&&v>=m.length&&(y.min=m[m.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(b={idx:x,start:m[x].min,end:m[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),b.mode="modify";else{let e=b.start,t=b.end;Math.abs(d-e)<=o?(c.start=b.end,b.mode="modify"):Math.abs(d-t)<=o&&(c.start=b.start,b.mode="modify")}else b={idx:-1,start:g,end:p,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=b,"modify"!==b.mode&&t.targetRect&&!js(t.targetRect,{x:u,y:h})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:uc,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=tc(e);nc(e,e.current,n)}(this.state,uc),cc(this.state))},move(e){this.state.started&&(!function(e,t){const 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){const t=e.ranges.map((e=>({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{const n=Zl(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);let n=[];t.forEach((t=>{n=[...n,...hc(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),cc(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function fc(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],i=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),i=(n&&n.fields||[]).map((e=>e.id())),r=t.brushes().filter((e=>"range"===e.type&&-1!==i.indexOf(e.id)))[0];return r?r.brush.ranges():[]}(e).map((r=>{const o=e.scale(r.min)*n,s=e.scale(r.max)*n,a=Math.min(o,s),l=Math.abs(o-s);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:a,width:t?i:l,y:t?a:0,height:t?l:i}}))}function pc(e,t,n,i){function r(){!function(e){e.renderer.render(fc(e))}(e)}function o(){!function(e){e.renderer.render(fc(e))}(e)}function s(){!function(e){e.renderer.render(fc(e))}(e)}e.brush=t,t&&(t.on("start",r),t.on("update",o),t.on("end",s),e.start=r,e.update=o,e.end=s,e.brush=t,e.scale=n,e.renderer=i)}function gc(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}const mc={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",i="horizontal"===n?this.rect.width:this.rect.height,r=Vo(this.chart.scale(e.scale),i);return gc(this.state),pc(this.state,t,r,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,fc(this.state)},beforeDestroy(){gc(this.state)}};function yc(e,t){const n=t.center.x,i=t.center.y;return{x:n-e.left,y:i-e.top}}function vc(e,t,n){return ss(e,t.points[0])<n.settings.snapIndicator.threshold**2}function bc(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 xc(e){let{state:t,start:n=null,end:i=null}=e;null!==n&&(t.snapIndicator.x1=n.x,t.snapIndicator.y1=n.y),null!==i&&(t.snapIndicator.x2=i.x,t.snapIndicator.y2=i.y)}function wc(e,t){e.snapIndicator.visible=t}const kc={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(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){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(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){const 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((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})));const n=yc(this.state.rendererBounds,e);bc(this.state,n),xc({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=yc(this.state.rendererBounds,e);vc(t,this.state,this.settings)?wc(this.state,!0):wc(this.state,!1),bc(this.state,t),xc({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter((e=>e.visible));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],i=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=i.x+e.componentDelta.x,e.lineBrushShape.y2=i.y+e.componentDelta.y;const r=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(r,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;wc(this.state,!1);vc(yc(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,i=e.componentDelta.y,r=e.points.map((e=>({x:e.x+n,y:e.y+i}))),o=t.shapesAt({vertices:r},{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(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{e.contexts.forEach((e=>{t.brush(e).end()}))})),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 Mc(e,t,n,i,r){let o,s=0,a=t.length-1;for(;s<a;){let l=Math.floor((s+a)/2);o=r(t[l]),o[n]+o[i]<e[n]?s=l+1:a=l}return s}function _c(e){let{orientation:t,targetNodes:n,labels:i,container:r}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mc;const s=[],a="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const{textBounds:h,node:d}=i[t];if(h[a]<r[a]||h[a]+h[l]>r[a]+r[l])return!1;for(let e=o(h,s,a,l,c);e<s.length;e++)if(Ls(h,s[e].textBounds))return!1;const f=o(h,n,a,l,u),p=h[a]+h[l];for(let e=f;e<n.length;e++){const t=n[e].node;if(p<t.localBounds[a])break;if(Ls(h,t.localBounds)&&d!==t)return!1}return s.push(i[t]),!0}}const Sc=4;function qc(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Dc(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function Ac(e){return x(x({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function Ec(e,t,n){return n?e.width>=t.height:e.width>=t.width}function Cc(e,t,n){return n?e.height>=t.width:e.height>=t.height}function Tc(e,t,n,i,r){let o,s;return"v"===e?(o=i||r||Ec(t,n,!0),s=Cc(t,n,!i)):(o=Ec(t,n),s=r||Cc(t,n,!1)),o&&s}function Nc(e,t,n,i){return e+.5*t+(i-.5)*(t-n)-.5*n}function Rc(e,t,n){const i={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},r=n.textMetrics;if(!n.overflow&&!function(e,t,n){return Ec(e,t,n.rotate)&&Cc(e,t,n.rotate)}(e,r,n))return!1;const o=.5*r.height;return n.rotate?(i.x=Nc(e.x,e.width,r.height,n.align)+o,i.y=Nc(e.y,e.height,r.width,n.justify),"right"===n.dock?i.transform="rotate(90, ".concat(i.x+i.dx,", ").concat(i.y+i.dy,") translate(").concat(r.width,", 0)"):i.transform="rotate(-90, ".concat(i.x+i.dx,", ").concat(i.y+i.dy,")")):(i.x=Nc(e.x,e.width,r.width,n.align),i.y=Nc(e.y,e.height,r.height,n.justify)+o),i}function Oc(e){let{bar:t,view:n,direction:i,position:r,padding:o=Sc,measured:s}=e;const a={};if(m(a,t),r&&"inside"!==r)if("up"===i||"down"===i){const e=Math.max(0,Math.min(t.y,n.height)),o=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===r&&"up"===i||"opposite"===r&&"down"===i?(a.y=0,a.height=e):("outside"===r&&"down"===i||"opposite"===r&&"up"===i)&&(a.y=o,a.height=n.height-o)}else{const e=Math.max(0,Math.min(t.x,n.width)),o=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===r&&"left"===i||"opposite"===r&&"right"===i?(a.x=0,a.width=e):("outside"===r&&"right"===i||"opposite"===r&&"left"===i)&&(a.x=o,a.width=n.width-o)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),i=Math.max(0,Math.min(e.y+e.height,t.height)),r=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=r,e.width=o-r,e.y=n,e.height=i-n}(a,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{top:i=Sc,bottom:r=Sc,left:o=Sc,right:s=Sc}=n,a="function"==typeof o?o(t):o,l="function"==typeof s?s(t):s,c="function"==typeof i?i(t):i,u="function"==typeof r?r(t):r;e.x+=a,e.width-=a+l,e.y+=c,e.height-=c+u}(a,s,o),a}function Ic(e){let t,n,i,r,o,{direction:s,fitsHorizontally:a,measured:l,node:c,orientation:u,placementSettings:h,rect:d}=e,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oc;const p=[],g="h"===u?"width":"height";for(o=0;o<h.length;o++)if(i=h[o],r=f({bar:c.localBounds,view:d,direction:s,position:i.position,padding:i.padding,measured:l}),p.push(r),t=!o||r[g]>t[g]?r:t,Tc(u,r,l,a,i.overflow)){n=r;break}return n||(n=t,o=p.indexOf(n)),i=h[o],{bounds:n,placement:i}}function Lc(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:o=Sc,bottom:s=Sc,left:a=Sc,right:l=Sc}=r,c="function"==typeof a?a(t):a,u="function"==typeof l?l(t):l,h="function"==typeof o?o(t):o,d="function"==typeof s?s(t):s,f=e.x+e.dx,p=e.y+e.dy,g=n?Math.min(t.width,i.height):Math.min(t.height,i.width),m=n?Math.min(t.height,i.height):Math.min(t.width,i.width),y=.5*t.height,v=1e-9;return{x:(n?f-y:f)-c-v,y:(n?p:p-y)-h-v,width:m+(c+u)-v,height:g+(h+d)-v}}function Pc(e){let{chart:t,targetNodes:n,rect:i,fitsHorizontally:r,collectiveOrientation:o}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ic,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Rc,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_c;const c=[],u={container:i,targetNodes:n,labels:[],orientation:o};let h,d,f,p,g,m,y,v,b,w,k,M,_,S;for(let e=0,l=n.length;e<l;e++){m=null,d=n[e],f=d.node,_=qc(f,t),b=d.direction,S="left"===b||"right"===b?"h":"v";for(let t=0;t<d.texts.length;t++){if(p=d.texts[t],!Dc(p))continue;w=d.labelSettings[t],v=d.measurements[t],M=w.placements;const n=s({direction:b,fitsHorizontally:r,lblStngs:w,measured:v,node:f,orientation:S,placements:M,placementSettings:d.placementSettings[t],rect:i});if(m=n.bounds,k=n.placement,m&&k){var q;g=k.justify;const t="function"==typeof w.linkData?w.linkData(_,e):void 0,n="function"==typeof k.overflow?k.overflow(_,e):k.overflow;"up"===b&&(g=1-g),"opposite"===k.position&&(g=1-g),"left"===b&&(g=1-g);const i=!("h"===o||r);if(h=a(m,p,{justify:"h"===S?k.align:g,align:"h"===S?g:k.align,fontSize:w.fontSize,fontFamily:w.fontFamily,textMetrics:v,rotate:i,overflow:!!n,dock:null!==(q=w.dock)&&void 0!==q?q:"left"}),h){const n=Lc(h,v,i,m,k.padding);y="function"==typeof k.fill?k.fill(x(x({},_),{},{textBounds:n}),e):k.fill,h.fill=y,void 0!==t&&(h.data=t),"object"==typeof k.background&&(h.backgroundColor="function"==typeof k.background.fill?k.background.fill(x(x({},_),{},{textBounds:n}),e):k.background.fill,void 0!==h.backgroundColor&&(h.backgroundBounds=Lc(h,v,i,m,k.background.padding))),c.push(h),u.labels.push({node:f,textBounds:n})}}}}const D=c.filter(l(u));return[...D.filter((e=>void 0!==e.backgroundBounds)).map(Ac),...D]}function jc(e){const t=2*Math.PI;return(e%t+t)%t}function zc(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function Fc(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function Hc(e,t,n){let{x:i,y:r}=t;if(i*i+r*r>e*e)return null;let o=Math.sin(n),s=Math.cos(n),a=i*s-r*o,l=e*e-a*a;if(l<0)return null;let c=Math.sqrt(l);return{x:a*s+o*c,y:-a*o+s*c}}function Vc(e){let t,n,{radius:i,size:r,angle:o}=e,{width:s,height:a}=r,l={x:s/2,y:a/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(t=Hc(i,l,o),!t)return null;t.y*=-1,n={x:-s,y:0};break;case 1:if(t=Hc(i,l,Math.PI-o),!t)return null;n={x:-s,y:-a};break;case 2:if(t=Hc(i,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-a};break;case 3:if(t=Hc(i,l,2*Math.PI-o),!t)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:s,height:a}}function Bc(e){let{slice:t,measured:n,padding:i}=e,{start:r,end:o,innerRadius:s,outerRadius:a}=t,l=a-s-2*i,c=o-r;if(c<Math.PI){let e=(n.height/2+i)/Math.tan(c/2);e>s&&(l=a-e-2*i)}if(l<0||l<n.minReqWidth)return null;const u=jc((r+o)/2);let h=a-i,d={x:Math.sin(u)*h,y:-Math.cos(u)*h,width:l,height:n.height};return u<Math.PI?(d.angle=u-Math.PI/2,d.anchor="end"):(d.angle=u+Math.PI/2,d.anchor="start"),d}function $c(e){let{context:t,node:n,bounds:i}=e;let{start:r,end:o}=n.desc.slice;const s=jc((r+o)/2);switch(Math.floor(s/(Math.PI/2))){case 0:t.q1maxY=i.y-2,void 0===t.q2minY&&(t.q2minY=i.y+i.height+2);break;case 1:t.q2minY=i.y+i.height+2;break;case 2:t.q3minY=i.y+i.height+2;break;case 3:t.q4maxY=i.y-2,void 0===t.q3minY&&(t.q3minY=i.y+i.height+2)}}function Wc(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Uc(e,t,n){const i={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)){let t=e.angle*(360/(2*Math.PI));i.transform="rotate(".concat(t,", ").concat(i.x,", ").concat(i.y,")")}return i}function Yc(e){let t,n,{slice:i,direction:r,position:o,padding:s,measured:a,view:l,context:c,store:u}=e,{start:h,end:d,innerRadius:f,offset:p}=i;switch(o){case"into":t="rotate"===r?Bc({slice:i,measured:a,padding:s}):function(e){let{slice:t,padding:n,measured:i}=e,{start:r,end:o,innerRadius:s,outerRadius:a}=t;const l=jc((r+o)/2);let c=Vc({radius:a,size:{width:i.width+2*n+1,height:i.height+2*n},angle:l});return c?(c.baseline="top",zs(c,{x1:0,y1:0,x2:Math.sin(r)*a,y2:-Math.cos(r)*a})||zs(c,{x1:0,y1:0,x2:Math.sin(o)*a,y2:-Math.cos(o)*a})||Cs({cx:0,cy:0,r:s},c)?null:(zc(c,n),c)):null}({slice:i,measured:a,padding:s});break;case"inside":n={start:h,end:d,innerRadius:0,outerRadius:f},t="rotate"===r?Bc({slice:n,measured:a,padding:s}):function(e){let{slice:t,padding:n,measured:i,store:r}=e;const{start:o,end:s,outerRadius:a}=t,l=jc((o+s)/2);let c=Vc({radius:a,size:{width:i.width+2*n+1,height:i.height+2*n},angle:l});return c?(c.baseline="top",zc(c,n),r.insideLabelBounds.some((e=>Ls(e,c)))?null:(r.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:a,padding:s,store:u});break;case"outside":t="rotate"===r?function(e){let{slice:t,measured:n,padding:i,view:r}=e,{start:o,end:s,outerRadius:a,offset:l}=t,c=a+i,u=s-o;if(u<Math.PI&&(n.height/2+i)/Math.tan(u/2)>c)return null;const h=jc((o+s)/2);let d=Math.sin(h)*c,f=-Math.cos(h)*c,p=n.width+1,g=h%Math.PI;if(g>Math.PI/2&&(g=Math.PI-g),Math.cos(g)>.001){let e=f<0?r.y:r.y+r.height,t=Math.abs(e-l.y)/Math.cos(g)-Math.tan(g)*(n.height/2)-2*i-a;t<p&&(p=t)}if(Math.sin(g)>.001){let e=d<0?r.x:r.x+r.width,t=Math.abs(e-l.x)/Math.sin(g)-n.height/2/Math.tan(g)-2*i-a;t<p&&(p=t)}if(p<=0||p<n.minReqWidth)return null;let m={x:d,y:f,width:p,height:n.height};return h<Math.PI?(m.angle=h-Math.PI/2,m.anchor="start"):(m.angle=h+Math.PI/2,m.anchor="end"),m}({slice:i,measured:a,padding:s,view:l}):function(e){let{slice:t,measured:n,padding:i,view:r,context:o}=e,{start:s,end:a,outerRadius:l,offset:c}=t;const u=jc((s+a)/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(u/(Math.PI/2)),r))return null;let h=l+i+n.height/2,d=Math.sin(u)*h,f=-Math.cos(u)*h,p=n.width+1;if(u<Math.PI){let e=Math.abs(r.x+r.width-(d+c.x));e<p&&(p=e)}else{let e=Math.abs(r.x-(d+c.x));e<p&&(p=e)}if(p<n.minReqWidth)return null;let g={x:d,y:f,width:p,height:n.height};return u<Math.PI?g.anchor="start":g.anchor="end",g}({slice:i,measured:a,padding:s,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=p.x,t.y+=p.y,"outside"===o&&"rotate"!==r&&function(e,t,n){const{start:i,end:r,offset:o,outerRadius:s}=n,a=jc((i+r)/2);switch(Math.floor(a/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),i=e.y-n;if(e.y=n,i>1){let t=s+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(a)*t,y2:o.y-Math.cos(a)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),i=n-e.y;if(e.y=n,i>1){let t=s+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(a)*t,y2:o.y-Math.cos(a)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),i=n-e.y;if(e.y=n,i>1){let t=s+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(a)*t,y2:o.y-Math.cos(a)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),i=e.y-n;if(e.y=n,i>1){let t=s+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(a)*t,y2:o.y-Math.cos(a)*t,strokeWidth:1}}}}}(t,c,i)),t}function Xc(e){let{context:t,direction:n,measured:i,node:r,placementSettings:o,rect:s,store:a}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yc;for(let e=0;e<o.length;e++){let c=o[e],u=l({context:t,slice:r.desc.slice,view:s,direction:n,position:c.position,measured:i,padding:c.padding,store:a});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function Kc(e,t,n){const i=t.fontFamily,r="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:i,fontSize:r});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:i,fontSize:r}).width),o}const Gc=/\n+|\r+|\r\n/,Jc=/\s/,Zc=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function Qc(e){return"string"==typeof e?-1!==e.search(Gc):-1!==String(e).search(Gc)}function eu(e){return-1!==e.search(Jc)}function tu(e){return-1!==e.search(Zc)}function nu(e,t,n){return Math.max(t,Math.min(n,e))}function iu(){let{string:e,separator:t="",reverse:n=!1,measureText:i=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:r=[Qc],noBreakAllowedIdentifiers:o=[],suppressIdentifier:s=[eu,Qc,e=>""===e],hyphenationIdentifiers:a=[tu]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(l);const c=l.length,u=n?e=>e>=0:e=>e<c;let h=n?c:-1;function d(e){const t=nu(e,0,c-1),n=l[t],u=i(n),h=function(e,t,n,i,r){return i.some((i=>i(e,t,n)))?1:r.some((i=>i(e,t,n)))?0:2}(n,t,l,r,o);return{index:t,value:n,breakOpportunity:h,suppress:s.some((e=>e(n,t,l))),hyphenation:a.some((e=>e(n,t,l))),width:u.width,height:u.height,done:!1}}return{next:function(e){return isNaN(e)?n?h--:h++:h=nu(e,0,c-1),u(h)?d(h):{done:!0}},peek:d,length:c}}const ru="…",ou=/^\s*\d+(\.\d+)?px\s*$/i;function su(e){return"string"===typeof e&&ou.test(e)}function au(e){const t=e["font-size"]||e.fontSize;return su(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function lu(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const i=au(e);return Math.max(1,Math.min(Math.floor(t/i),n))}function cu(e,t){return{lines:[],line:"",width:0,maxLines:lu(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function uu(e){e.lines.push(e.line),e.line="",e.width=0}function hu(e,t){e.line+=t.value,e.width+=t.width}function du(e,t,n){if(t.width>e.maxWidth)return t;const i=t.index;for(let r=1;r<5;r++){const 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(i-r),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function fu(e,t,n){const i=iu({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=i.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?du(e,t,i):t,uu(e),hu(e,t)):hu(e,t)}}function pu(e,t){const n=iu({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),i=cu(e,t);let r=!0;for(;i.lines.length<i.maxLines;){let e=n.next();if(e.done){uu(i),r=!1;break}1===e.breakOpportunity?uu(i):i.width+e.width>i.maxWidth&&2===e.breakOpportunity?e.suppress?i.width+=e.width:(e=i.hyphens.enabled?du(i,e,n):e,uu(i),hu(i,e)):hu(i,e)}return{lines:i.lines,reduced:r}}function gu(e,t){const n=iu({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),i=cu(e,t);let r=!0;for(;i.lines.length<i.maxLines;){let e=n.next();if(e.done){uu(i),r=!1;break}1===e.breakOpportunity?uu(i):i.width+e.width>i.maxWidth&&2===e.breakOpportunity?e.suppress?uu(i):e.width>i.maxWidth?fu(i,e,t):(uu(i),hu(i,e)):hu(i,e)}return{lines:i.lines,reduced:r}}function mu(e){return{"break-all":pu,"break-word":gu}[e.wordBreak]}function yu(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const i=mu(n);if(!i)return;const r=e(n);if(r.width>n.maxWidth||Qc(n.text)){const o=(au(n)-r.height)/2,s=i(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,i){const r={type:"container",children:[]};void 0!==t.id&&(r.id=t.id);let o=0;return e.lines.forEach(((s,a)=>{const l=m({},t);l.text=s,l._lineBreak=!0,o+=n,e.reduced&&a===e.lines.length-1?l.text+=ru:delete l.maxWidth,l.dy=isNaN(l.dy)?o:l.dy+o,o+=i,o+=n,r.children.push(l)})),r}(s,n,o,r.height)}}}}function vu(e,t){const n=e["font-family"]||e.fontFamily,i=e["font-size"]||e.fontSize,r="string"==typeof e.text?e.text:"".concat(e.text),{maxWidth:o}=e;if(void 0===o)return r;let s=t({text:r,fontSize:i,fontFamily:n}).width;if(s<=o)return r;let a=0,l=r.length-1;for(;a<=l;){let e=Math.floor((a+l)/2);s=t({text:r.substr(0,e)+ru,fontSize:i,fontFamily:n}).width,s<=o?a=e+1:l=e-1}return r.substr(0,l)+ru}function bu(e){const t=e.baseline||e["dominant-baseline"];let n=0;const i=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*i;break;case"text-before-edge":n=.85*i;break;case"middle":n=.25*i;break;case"central":n=.35*i;break;case"mathemetical":n=i/2;break;case"text-after-edge":case"ideographic":n=.2*-i;break;default:n=0}return n}const xu={},wu={},ku={fontSize:void 0,fontFamily:void 0};let Mu;function _u(e,t){return!e&&!t||e===t}function Su(e){let{text:t,fontWeight:n,fontSize:i,fontFamily:r}=e;const o="".concat(t," ").concat(n," ").concat(i," ").concat(r);return"number"!=typeof wu[o]&&(Mu=Mu||document.createElement("canvas").getContext("2d"),function(e){let{fontWeight:t,fontSize:n,fontFamily:i}=e;_u(ku.fontWeight,t)&&_u(ku.fontSize,n)&&_u(ku.fontFamily,i)||(Mu.font=[t,n,i].filter((e=>!!e)).join(" "),ku.fontWeight=t,ku.fontSize=n,ku.fontFamily=i)}({fontWeight:n,fontSize:i,fontFamily:r}),wu[o]=Mu.measureText(t).width),wu[o]}function qu(e){return"number"!=typeof xu[e]&&(xu[e]=function(e){if(su(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),xu[e]}function Du(e){let{text:t,fontWeight:n,fontSize:i,fontFamily:r}=e;return{width:Su({text:t,fontWeight:n,fontSize:i,fontFamily:r}),height:qu(i)}}function Au(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Du;const n=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,r=t({text:e.text,fontFamily:i,fontSize:n}),o=Math.min(e.maxWidth||r.width,r.width),s=e.x||0,a=e.y||0,l=e.dx||0,c={x:0,y:a+((e.dy||0)+bu(e))-.75*r.height,width:o,height:r.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?s+l-o/2:"end"===u?s+l-o:s+l,c}function Eu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Du;const n=mu(e),i=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:r,fontSize:i});if(n&&(o.width>e.maxWidth||Qc(e.text))){const o=n(e,(e=>t({text:e,fontFamily:r,fontSize:i}))),s=m({},e);let a=0,l="";for(let e=0,n=o.lines.length;e<n;e++){let s=o.lines[e];s+=e===n-1&&o.reduced?ru:"";const c=t({text:s,fontSize:i,fontFamily:r}).width;c>=a&&(a=c,l=s)}s.text=l;const c=Au(s,t);return c.height=au(e)*o.lines.length,c}return Au(e,t)}function Cu(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Tu(e,t,n){const i={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},r=n.textMetrics;if(e.width<n.fontSize)return!1;const o=Math.max(0,e.width-r.width);return i.x=e.x+n.align*o,i.y=e.y+r.height/1.2,i}function Nu(e){let{cx:t,cy:n,r:i}=e;return{type:"circle",bounds:{cx:t,cy:n,r:i}}}function Ru(e){return e.desc&&e.desc.slice?function(e){let{start:t,end:n,innerRadius:i,outerRadius:r,offset:o}=e;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let s=0!==i?i:r;return Nu({cx:o.x,cy:o.y,r:s})}(e.desc.slice):"circle"===e.type?Nu(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var Ou={bar:function(e){let{settings:t,chart:n,nodes:i,rect:r,renderer:o,style:s}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pc;const l=m({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},s.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map((e=>m({},l,t,e))),u=t.labels.map((e=>e.placements.map((n=>m({},l,t,e,n))))),{fitsHorizontally:h,hasHorizontalDirection:d,targetNodes:f}=function(e){let{nodes:t,rect:n,chart:i,labelSettings:r,placementSettings:o,settings:s,renderer:a}=e;const l={},c=[];let u,h,d,f,p,g,m,y=!0,v=!1;for(let e=0;e<t.length;e++){if(h=t[e],f=h.localBounds,!Ls(f,n))continue;let b=qc(h,i);u={node:h,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<r.length;t++)g=r[t],d="function"==typeof g.label?g.label(b,e):void 0,Dc(d)&&(m="function"==typeof s.direction?s.direction(b,e):s.direction||"up",v=v||"left"===m||"right"===m,l.fontFamily=g.fontFamily,l.fontSize="".concat(g.fontSize,"px"),l.text=d,p=a.measureText(l),u.measurements.push(p),u.texts.push(d),u.labelSettings.push(g),u.placementSettings.push(o[t]),u.direction=m,y=y&&p.width<=f.width-2*Sc);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:v}}({nodes:i,chart:n,renderer:o,settings:t,rect:r,labelSettings:c,placementSettings:u}),p=function(e){let{orientation:t="auto",defaultOrientation:n="h"}=e;switch(t.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return n}}({orientation:t.orientation,defaultOrientation:d?"h":"v"}),g="h"===p?"y":"x",y="h"===p?"height":"width";return f.sort(((e,t)=>e.node.localBounds[g]+e.node.localBounds[y]-(t.node.localBounds[g]+t.node.localBounds[y]))),a({chart:n,targetNodes:f,stngs:t,rect:r,fitsHorizontally:h,collectiveOrientation:p})},slice:function(e){let{settings:t,chart:n,nodes:i,rect:r,renderer:o,style:s}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xc,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Uc;const c=m({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},s.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map((e=>m({},c,t,e))),h=t.labels.map((e=>e.placements.map((n=>m({},c,t,e,n))))),d=[],f={insideLabelBounds:[]};i=function(e){const t=[],n=[],i=[],r=[];for(let o=0;o<e.length;++o){const{start:s,end:a}=e[o].desc.slice,l=jc((s+a)/2);switch(Math.floor(l/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:i.push(e[o]);break;case 3:r.push(e[o])}}const o=(e,t)=>jc((e.desc.slice.start+e.desc.slice.end)/2)-jc((t.desc.slice.start+t.desc.slice.end)/2),s=(e,t)=>o(t,e);return t.sort(s),n.sort(o),i.sort(s),r.sort(o),t.concat(n,r,i)}(i);const p={};for(let e=0,t=i.length;e<t;e++){const t=i[e],s=Wc(t,n);for(let n=0;n<u.length;n++){const i=u[n],c="function"==typeof i.label?i.label(s,e):"";if(!c)continue;const g="function"==typeof i.direction?i.direction(s,e):i.direction||"horizontal",m="function"==typeof i.linkData?i.linkData(s,e):void 0,y=Kc(c,i,o),v=a({context:p,direction:g,lblStngs:i,measured:y,node:t,placementSettings:h[n],rect:r,store:f}),b=v.bounds,x=v.placement;if(b&&x){if("outside"===x.position&&"rotate"!==g){$c({context:p,node:t,bounds:b});if(!ks(Fc(b),r))continue}const n="function"==typeof x.fill?x.fill(s,e):x.fill,o=l(b,c,{fill:n,fontSize:i.fontSize,fontFamily:i.fontFamily,textMetrics:y});o&&(void 0!==m&&(o.data=m),d.push(o),b.line&&(b.line.stroke=n,d.push(b.line)))}}}return d},rows:function(e){let{settings:t,chart:n,nodes:i,renderer:r,style:o}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tu;const a=m({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);a.fontSize=parseInt(a.fontSize,10);const l=m({},a,t),c=t.labels.map((e=>m({},l,e))),u={},h=[];for(let e=0,t=i.length;e<t;e++){let t=i[e],o=Cu(t,n),{type:a,bounds:d}=Ru(t);if(!d)continue;let f,p=0,g=[],m=[],y="circle"===a?2*d.r*.9:d.height;for(p+=l.padding,f=0;f<c.length;f++){let t=c[f],n="function"==typeof t.label?t.label(o,e):"";u.fontFamily=t.fontFamily,u.fontSize="".concat(t.fontSize,"px"),u.text=n;let i=r.measureText(u);if(p+=i.height+t.padding,p>y)break;m.push(n),g.push(i)}const v=f,b=Math.max(0,y-p);let x;for(x="circle"===a?d.cy-.9*d.r:d.y,x+=l.justify*b+l.padding,f=0;f<v;f++){let t,n=c[f];if("circle"===a){let e=Math.max(Math.abs(x-d.cy),Math.abs(x+g[f].height-d.cy)),n=Math.sqrt(d.r*d.r-e*e);t={x:d.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:g[f].height}}else t={x:d.x+l.padding,y:x,width:d.width-2*l.padding,height:g[f].height};x+=g[f].height+l.padding;let i="function"==typeof n.fill?n.fill(o,e):n.fill;const u="function"==typeof n.linkData?n.linkData(o,e):void 0;let p=s(t,m[f],{fill:i,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:g[f]});if(p){if(p.text&&p.text!==ru){const e=vu(p,r.measureText);if(ru===e)continue;p.ellipsed=e}void 0!==u&&(p.data=u),h.push(p)}}}return h}};const Iu={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&Ou[e.strategy.type]&&e.component&&t.push(...function(e,t){let{chart:n,source:i,rect:r,renderer:o,style:s}=e;if(!n.component(i.component))return[];const a=n.findShapes(i.selector).filter((e=>e.key===i.component));return t({chart:n,settings:i.strategy.settings,nodes:a,rect:{x:0,y:0,width:r.width,height:r.height},renderer:o,style:s})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},Ou[e.strategy.type]))})),t}};const Lu={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,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}};function Pu(e){let{x:t=0,y:n,item:i,globalMetrics:r,createSymbol:o,direction:s="ltr"}=e,a=i.label.displayObject,l=i.label.bounds,c=i.symbol.meta;const u="rtl"===s;let h={x:u?t+r.maxLabelBounds.width:t+r.maxSymbolSize+r.spacing,y:n,width:r.maxLabelBounds.width,height:Math.max(r.maxSymbolSize,r.maxLabelBounds.height)},d=function(e,t,n){const i=Math.max(0,e.width-t),r=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*i,y:e.y+t/2+n.justify*r}}({x:u?t+r.maxLabelBounds.width+r.spacing:t,y:n,width:r.maxSymbolSize,height:h.height},c.size,{align:void 0===c.align?.5:c.align,justify:void 0===c.justify?.5:c.justify});const f=o(m({},c,d));return delete f.collider,a.anchor=u?"end":"start",function(e,t,n){const i=n.textMetrics;if(e.height<i.height)return!1;const r=Math.max(0,e.width-i.width);t.baseline="text-before-edge";const o=Math.max(0,e.height-i.height);t.x=e.x+n.align*r,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(h,a,{textMetrics:l,fontSize:parseInt(a.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:i.label.displayObject.data,children:[f,a],collider:{type:"rect",x:t,y:n,width:r.maxItemBounds.width,height:r.maxItemBounds.height}},metrics:h}}function ju(e,t){const n=e.items.length,i=Math.ceil(n/t),r="horizontal"===e.layout.orientation?"width":"height",o="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*i+(i-1)*e.layout.margin[o]}function zu(e,t){let n,i,r,o,{onScroll:s=()=>{}}=t,a=null,l=0;const c={itemize:t=>{n=function(e,t){let n,i,{resolved:r,dock:o}=e,s=[],a=r.items.items,l=r.symbols.items,c=r.labels.items,u=0,h=0,d=0;for(let e=0;e<a.length;e++){if(!1===a[e].show)continue;const r=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=m({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:r,title:r}),i={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},s.push(i),u=Math.max(l[e].size,u),h=Math.max(i.label.bounds.width,h),d=Math.max(i.label.bounds.height,d)}return{items:s,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,d),width:u+8+h},maxLabelBounds:{width:h,height:d}},layout:{margin:{vertical:void 0!==r.layout.item.vertical?r.layout.item.vertical:4,horizontal:void 0!==r.layout.item.horizontal?r.layout.item.horizontal:4},mode:r.layout.item.mode,size:r.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:r.layout.item.direction,scrollOffset:r.layout.item.scrollOffset}}}(t,e.renderer),a=isNaN(n.layout.scrollOffset)?a:n.layout.scrollOffset},getItemsToRender:t=>{r=t.viewRect,l=c.getContentOverflow(r);const s=c.extent();a=Math.max(0,Math.min(a,l)),o=m({},r);const u="horizontal"===c.orientation()?"x":"y";return o[u]-=a,o["x"===u?"width":"height"]=s,function(e,t,n){let{viewRect:i}=e,{itemized:r,create:o=Pu,parallels:s,createSymbol:a}=n;const l=r.layout.direction,c=r.globalMetrics,u=r.items,h="horizontal"===r.layout.orientation;let d=0;const f=[],p=c.maxItemBounds.height,g=c.maxItemBounds.width,m=r.layout.margin.vertical+p,y=r.layout.margin.horizontal+g;let v=t.x,b=t.y,x=i.x-t.x;for(let e=0;e<u.length;e++){let n=o({y:b,x:"rtl"===l?i.x+x+i.width-g-(v-t.x):v,item:u[e],globalMetrics:c,direction:l,createSymbol:a});if((h&&v>=i.x-g||!h&&b>=i.y-p)&&f.push(n.item),d++,d>=s?(d=0,h?(v+=y,b=t.y):(b+=m,v=t.x)):h?b+=m:v+=y,!h&&b>i.y+i.height)break;if(h&&v>i.x+i.width)break}return f}(t,o,{itemized:n,parallels:i,createSymbol:e.symbol})},parallelize:(e,t)=>(i=function(e,t,n){const i=n.items.length,r="horizontal"===n.layout.orientation?"width":"height",o="width"===r?"horizontal":"vertical",s=n.globalMetrics.maxItemBounds[r]*i+(i-1)*n.layout.margin[o];let a=Math.ceil(s/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",i="width"===e?"horizontal":"vertical",r=n.layout.margin[i]||4,o=Math.floor((t+r)/(r+n.globalMetrics.maxItemBounds[e]));a=Math.min(a,o)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(a,l))}(e,t,n),i),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return ju(n,i)>r[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,ju(n,i)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===c.orientation()?r.x+r.width<o.x+o.width:r.y+r.height<o.y+o.height,hasPrev:()=>"horizontal"===c.orientation()?o.x<r.x:o.y<r.y,next:()=>{c.scroll(-c.getNextSize())},prev:()=>{c.scroll(c.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(l,a-e));t!==a&&(a=t,s())},offset:()=>a,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>ju(n,i),spread:()=>function(e,t){const n=t,i="horizontal"===e.layout.orientation?"height":"width",r="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*n+(n-1)*e.layout.margin[r]}(n,i)};return c}function Fu(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const Hu={up:"▲",right:"▶",down:"▼",left:"◀"};function Vu(e,t){let{size:n,isActive:i,direction:r,nav:o,attrs:s}=t,a={},l="";const c=s;o&&o.button&&("function"==typeof o.button.class?a=o.button.class({direction:r}):o.button.class&&(a=o.button.class),"function"==typeof o.button.content&&(l=o.button.content(e,{direction:r})),void 0!==o.button.tabIndex&&(c.tabindex=o.button.tabIndex));const u={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(a).length||(u.border="0",u.background="none"),(!i||o&&o.disabled)&&(c.disabled="disabled"),e("button",m({class:Fu(a),style:u},c),[l||e("span",{style:{pointerEvents:"none"}},[Hu[r]])])}function Bu(e){let t;const n={itemize:e=>{t=function(e){let{dock:t,navigation:n}=e;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:n}}(e)},render:i=>function(e,t,n,i){let{rect:r,itemRenderer:o}=t;if(!e||!e.renderArgs)return;e.size(r);const s=e.renderArgs[0],a="vertical"===n.layout.orientation,l="rtl"===o.direction(),c=o.hasNext(),u=o.hasPrev();if(!u&&!c)return void e.render([]);const h=a?["right","left"]:["down","up"];l&&a&&h.reverse();const d=[s("div",{style:{position:"relative",display:"flex","flex-direction":a?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!a?"rtl":"ltr"},[Vu(s,{size:32,isActive:c,direction:h[0],attrs:{"data-action":"next","data-component-key":i.settings.key},nav:n.navigation}),Vu(s,{size:32,isActive:u,direction:h[1],attrs:{"data-action":"prev","data-component-key":i.settings.key},nav:n.navigation})])];e.render(d)}(n.renderer,i,t,e),extent:()=>32,spread:()=>64};return n}function $u(e){let t;const n={itemize:n=>{t=function(e,t){let{resolved:n}=e;if(!1===n.title.item.show)return null;const i=m({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(i.anchor&&"start"!==i.anchor?"end"===i.anchor&&(i.anchor="start"):i.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;i.text=e&&e[0]?e[0].title():""}return{displayObject:i,bounds:t.renderer.textBounds(i)}}(n,e)},render:e=>{!function(e,t,n){let{rect:i}=e;if(!t)return;const r=[];if(t.size(i),n){const e={start:0,end:i.width,middle:i.width/2};r.push(m({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(r)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function Wu(e,t,n,i){let r,o,s,{itemRenderer:a,navigationRenderer:l,titleRenderer:c,isPreliminary:u=!1}=i,h=0;const d={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(r={x:d.x,y:d.y,width:d.width,height:c.spread()},"horizontal"===n){r={x:d.x,y:d.y,width:c.extent(),height:c.spread()};const e=d.width-r.width-(r.width?t.spacing:0),n=d.height;a.parallelize(e,u?void 0:n);const i=a.extent()>e?l.extent():0,f=a.spread(),p=i?l.spread():0;o={x:r.x+r.width+(r.width?t.spacing:0),y:d.y+Math.max(0,(p-f)/2),width:d.width-i-r.width-(i?t.spacing:0)-(r.width?t.spacing:0),height:n},s={x:o.x+o.width+(i?t.spacing:0),y:d.y,width:i,height:d.height},r.y=o.y;"rtl"===a.direction()&&(s.x=d.x,o.x=s.x+s.width+(s.width?t.spacing:0),r.x=o.x+o.width+(r.width?t.spacing:0)),h=Math.max(r.height,p,a.spread())}else{const e=d.height-r.height-(r.height?t.spacing:0),n=d.width;a.parallelize(e,u?void 0:n);const i=a.extent()>e?l.extent():0;s={x:d.x,y:d.y+d.height-i,width:d.width,height:i},o={x:d.x,y:r.y+r.height+(r.height?t.spacing:0),width:d.width,height:d.height-r.height-(r.height?t.spacing:0)-s.height-(s.height?t.spacing:0)},h=Math.max(c.extent(),i?l.spread():0,a.spread())}return o=m({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),s.x+=e.x,s.y+=e.y,r.x+=e.x,r.y+=e.y,{title:m({},e,r),content:m({},e,o),navigation:m({},e,s),orientation:n,preferredSize:h}}function Uu(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const i=e.settings.layout.dock;if("threshold-color"===e.scale.type){const r=e.scale.data().fields[0];let o=e=>String(e);e.settings.formatter?o=e.chart.formatter(e.settings.formatter):r&&(o=r.formatter());for(let e=0;e<t.length-1;e++){const i={value:t[e],label:"".concat(o(t[e])," - < ").concat(o(t[e+1]))};r&&(i.source={field:r.id()}),n.items.push(i)}"vertical"==("top"===i||"bottom"===i?"horizontal":"vertical")&&n.items.reverse()}else{const i=e.scale.labels?e.scale.labels():null;n.items=t.map(((t,n)=>{const r=e.scale.datum?m({},e.scale.datum(t)):{value:t};return r.value=t,e.scale.label?r.label=e.scale.label(t):i&&(r.label=i[n]),r}))}const r=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:m(!0,{},Lu.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:Lu.layout,settings:e.settings.settings.layout}),s=e.resolver.resolve({data:n,defaults:m(!0,{},Lu.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),a=m(!0,{},(e.settings.settings.item||{}).shape);void 0===a.fill&&e.settings.scale&&(a.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:m(!0,{},Lu.item.shape,e.style.item.shape),settings:a}),c=e.resolver.resolve({data:n,defaults:m(!0,{},{show:Lu.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function u(e,n){let i=e.data.value,r=t[n+1];e.data.value=[i,r]}"threshold-color"===e.scale.type&&("vertical"==("top"===i||"bottom"===i?"horizontal":"vertical")?(c.items.reverse().forEach(u),c.items.reverse()):c.items.forEach(u));return{title:r,labels:s,symbols:l,items:c,layout:o}}(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 Yu(e){const{rect:t,settings:n,state:i,itemRenderer:r,navigationRenderer:o,titleRenderer:s}=e,a=n.layout.dock,l="top"===a||"bottom"===a?"horizontal":"vertical",c=Wu(t,i.display,l,{itemRenderer:r,navigationRenderer:o,titleRenderer:s});e.renderer.size(c.content);let u=r.getItemsToRender({viewRect:m({},c.content,{x:0,y:0})});return o.render({rect:c.navigation,itemRenderer:r}),s.render({rect:c.title}),e.state.views={layout:c},u}const Xu={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(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(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const 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(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=Yu(this);this.update(e)},this.itemRenderer=zu(this,{onScroll:this.onScroll}),this.navigationRenderer=Bu(this),this.titleRenderer=$u(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),Uu(this)},preferredSize(e){return function(e,t){let n=0;const i=e.settings.layout.dock||"center",r="top"===i||"bottom"===i?"horizontal":"vertical",o=e.state.display,s=Wu(t.inner,o,r,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=s.preferredSize,n+=o.spacing,n}(this,e)},beforeUpdate(){Uu(this)},render(){return Yu(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function Ku(e,t){let n=0;const i=e.state.isVertical?"justify":"align",r=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",s=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[s](),n*=Math.min(1,Math.max(e.stgns[i],0)),t[r]+=n}function Gu(e,t,n){const i=n[e];return"object"==typeof i?-1!==i.valid.indexOf(t)?t:i.default:n.default}function Ju(e){return Gu(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 Zu(e,t){const n={x:0,y:0,width:0,height:0},i=e.stgns.padding;return n.x=i.left,n.y=i.top,n.width=t.width-i.left-i.right,n.height=t.height-i.top-i.bottom,n}function Qu(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,i=e.chart.scale(e.stgns.fill),r=e.chart.scale(e.stgns.major),o=function(e,t){const n=t.domain();let i=n,r=e.stgns.tick.label;!r&&e.formatter?r=e.formatter:!r&&t.data().fields&&(r=t.data().fields[0].formatter()),"function"==typeof r&&(i=n.map(r).map(String));const o=n.map(((n,r)=>{const o=i[r];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})}}));return o}(e,r),s=Gu((a=e.settings).layout.dock,a.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"});var a;if(void 0===n.text){const e=r.data().fields;n.text=e&&e[0]?e[0].title():""}const l=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),c=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),u={isVertical:t,nodes:[],title:{anchor:Ju(e.settings),textMetrics:l,textBounds:c,requiredWidth:()=>{if(!n.show)return 0;let e=c.width,i=n.maxLengthPx;return t||(e+=n.padding,i+=n.padding),Math.min(e,i,u.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=c.height;return t&&(e+=n.padding),Math.min(e,u.rect.height)}},ticks:{values:o,anchor:s,length:Math.min(Math.max(...o.map((e=>e.textMetrics.width))),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===s?Math.max(...u.ticks.values.map((e=>e.textMetrics.height)))+e.stgns.tick.padding:0,height:Math.max(...o.map((e=>e.textMetrics.height)))},legend:{fillScale:i,majorScale:r,length:()=>{const n=t?"height":"width",i=t?"requiredHeight":"requiredWidth",r=Math.min(u.rect[n],u.rect[n]*e.stgns.length)-u.title[i]();return Math.max(0,Math.min(r,e.stgns.maxLengthPx))}}};return u}const eh={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(e){const t=this.state;t.rect=Zu(this,e.inner);let n=this.stgns.size;const i=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=i;const r=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce(((e,t)=>e+t.textMetrics.height),0);if(e>this.state.legend.length())return r;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return r;n+=Math.max(...t.ticks.values.map((e=>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+i,n):Math.max(n,t.title.requiredWidth()+i)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=Qu(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=Qu(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=Zu(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,i="left"===t.ticks.anchor,r="top"===t.ticks.anchor;let o=t.rect.x,s=t.rect.y,a="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,s+=t.title.textMetrics.height,s+=r?t.rect.height-t.title.textBounds.height:0,a="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,s+=t.title.textMetrics.height,s+=r?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=i?t.rect.width:0,s+=t.title.textMetrics.height,a=i?"end":"start");const l={tag:"legend-title",type:"text",x:o,y:Math.min(s,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:a,title:n.title.text};return Ku(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale;return t.domain().map((e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))}))).sort(((e,t)=>e.offset-t.offset))}(this),n=function(e,t){const n=e.state,i=e.stgns,r=n.rect;let o=r.x,s=r.y,a=n.isVertical?i.size:n.legend.length(),l=n.isVertical?n.legend.length():i.size;"left"===n.ticks.anchor?o+=n.rect.width-i.size:"top"===n.ticks.anchor&&(s+=n.rect.height-i.size),"top"===n.title.anchor?s+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());const c={type:"rect",x:o,y:s,width:a,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return Ku(e,c),c}(this,t),i=function(e,t){const n=e.state,i=e.stgns;let r="start";const o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},s=n.ticks.values.map((s=>{let a=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*s.pos,u=0===s.pos?"text-before-edge":"text-after-edge"):a=t.x+t.width*s.pos,"right"===n.ticks.anchor?(a=t.x+i.size+i.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(a=t.x-i.tick.padding,r="end"):"top"===n.ticks.anchor?(l=t.y-i.tick.padding,c-=.25*s.textMetrics.height,r=0===s.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+i.tick.padding,c=.8*s.textMetrics.height,r=0===s.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:a,y:l,dx:0,dy:c,text:s.label,fontSize:i.tick.fontSize,fontFamily:i.tick.fontFamily,fill:i.tick.fill,maxWidth:n.isVertical?i.tick.maxLengthPx:Math.min(i.tick.maxLengthPx,n.legend.length()/2),anchor:r,textBoundsFn:e.renderer.textBounds,title:s.label,baseline:u}}));return{type:"container",id:"legend-seq-ticks",children:[...s,o]}}(this,n),r={id:"legend-seq-target",type:"container",children:[n,i]};this.state.nodes.push(r)},render(){return this.state.nodes}};const th={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!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 nh(e,t){let{generatorType:n,item:i,data:r,major:o,minor:s,layerObj:a,stngs:l}=t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:o,minor:s,layerObj:a,stngs:l,opacity:i.opacity,stroke:i.stroke,strokeWidth:i.strokeWidth,strokeLinejoin:i.strokeLinejoin,fill:c||i.fill,data:r};return i.strokeDasharray&&(u.strokeDasharray=i.strokeDasharray),u}function ih(e){const{metaLayers:t,coordinates:n,layers:i,lines:r,areas:o}=function(e){let{data:t,stngs:n,rect:i,resolver:r,style:o,domain:s}=e;const{width:a,height:l}=i,c=r.resolve({data:t,defaults:th.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:a,minor:"vertical"===n.orientation?a:l}}),u=!n.connect&&s.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),h={};let d=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(u){const e=h[n]?h[n].items[h[n].items.length-1]:null,i=e?s.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&s.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==i&&h[n].items.push({dummy:!0})}h[n]=h[n]||{order:d++,id:n,items:[],dataItems:[],consumableData:{}},h[n].dataItems.push(t.data),h[n].items.push(t)}const f=Object.keys(h).map((e=>(h[e].consumableData=x({points:h[e].dataItems},h[e].dataItems[0]),h[e]))),p={items:f.map((e=>e.consumableData))},g=n.layers||{};return{coordinates:c,metaLayers:f,layers:r.resolve({data:p,defaults:{curve:th.layers.curve,show:th.layers.show},settings:{curve:g.curve,show:g.show}}),lines:r.resolve({data:p,defaults:m({},th.layers.line,o.line),settings:g.line}),areas:r.resolve({data:p,defaults:m({},th.layers.area,o.area),settings:g.area})}}(e),s=[];return t.forEach(((t,a)=>{const l=i.items[a];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let h,d;for(let i=0;i<t.items.length;i++){if(h=t.items[i],d=h.data,!h.dummy){if(isNaN(h.major))continue;e.missingMinor0&&(h.minor0=n.settings.minor.scale?n.settings.minor.scale(d.minor0?d.minor0.value:0):0),isNaN(h.minor)||c.push(h.minor),l.data.push(h.data)}u.push(h)}const f=c.sort(((e,t)=>e-t))[Math.floor((c.length-1)/2)];s.push({layerObj:l,lineObj:r.items[a],areaObj:o.items[a],median:f,points:u,consumableData:t.consumableData})})),s}const rh={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let{data:t}=e;const{width:n,height:i}=this.rect;this.stngs=this.settings.settings||{};const r=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,o=ih({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:r,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){const e=o.map((e=>({id:e.layerObj.id,data:e.layerObj.data}))).sort(this.stngs.layers.sort).map((e=>e.id));o.sort(((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id)))}else o.sort(((e,t)=>e.median-t.median));return function(e,t){let{width:n,height:i,missingMinor0:r,stngs:o}=t;const s=[],a=o.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:l,areaObj:c,points:u}=e;let h={size:i,p:"y"},d={size:n,p:"x"};if("vertical"===o.orientation){const e=m(!0,{},d);d=m(!0,{},h),h=m(!0,{},e)}a.area&&!1!==c.show&&s.push(nh(u,{data:e.consumableData,item:c,generatorType:"area",major:d,minor:h,layerObj:l,stngs:o})),t&&!1!==t.show&&(s.push(nh(u,{data:e.consumableData,item:t,generatorType:"line".concat(h.p.toUpperCase(),"1"),major:d,minor:h,layerObj:l,stngs:o},"none")),!r&&a.area&&!1!==c.show&&!1!==t.showMinor0&&s.push(nh(u,{data:e.consumableData,item:t,generatorType:"line".concat(h.p.toUpperCase(),"0"),major:d,minor:h,layerObj:l,stngs:o},"none")))})),s}(o,{width:n,height:i,missingMinor0:r,stngs:this.stngs})}};function oh(e,t){let n,i,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,i=t.center.y):(n=t.clientX,i=t.clientY);const o=n-e.state.boundingRect.left,s=i-e.state.boundingRect.top;return{x:r?Math.max(0,Math.min(o,e.rect.width)):o,y:r?Math.max(0,Math.min(s,e.rect.height)):s}}function sh(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function ah(e,t){const n=Math.min(e.x,t.x),i=Math.min(e.y,t.y);return{x:n,y:i,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-i}}const lh={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=oh(this,e,!1);js({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"}))),this.state.start=oh(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=oh(this,e),function(e){if(e.state.active){const t=sh(e,e.state.start),n=sh(e,e.state.end),i=e.chart.shapesAt(ah(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(i,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([m({type:"rect"},ah(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{Array.isArray(e.contexts)&&e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function ch(e,t,n){let{renderer:i,style:r,props:o,h:s}=n;const a=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),l=function(e,t,n,i){return i.content({h:e,style:n,data:t})}(s,e,r,o),c=s("div",{dir:o.direction,class:Fu(m({"pic-tooltip":!0},a.tooltip)),style:m({position:"relative",display:"inline-block"},t.computedTooltipStyle)},s("div",{style:r.content,class:Fu(m({"pic-tooltip-content":!0},a.content))},l),s("div",{class:Fu(m({"pic-tooltip-arrow":!0},a.arrow)),style:m({},r.arrow,r["arrow-".concat(t.dock)],t.computedArrowStyle)}));return i.render(c),i.element().children[0]}function uh(e){let{defaultDuration:t,defaultDelay:n}=e,i=null,r=null,o=!1;const s=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach((t=>t(e)))},e.on=(e,n)=>{Array.isArray(e)?e.forEach((e=>t[e].push(n))):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach((e=>{t[e].length=0}))},e}(),a=function(){},l=()=>{i=null,r=null,o=!1,s.set("fulfilled")};return a.invoke=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;i&&(clearTimeout(i),s.set("debounced")),s.set("pending"),i=setTimeout((()=>{e(),o=!0,i=null,s.set("active")}),c),a>0&&(r&&clearTimeout(r),r=setTimeout(l,a+Math.max(c,0)))},a.clear=()=>{o?s.set("cancelled"):i&&(clearTimeout(i),s.set("rejected")),r&&clearTimeout(r),i=null,r=null,o=!1},a.on=(e,t)=>{s.on(e,t)},a.destroy=()=>{a.clear(),s.destroy()},a}function hh(){let 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)"),inside:"translate(-50%, -50%)"}}function dh(e,t){let 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},inside:{x:-e/2,y:-t/2}}}function fh(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function ph(e,t,n,i,r,o){const s=t+o.x,a=n+o.y,l=r;return!(s<0||a<0)&&!(s+i>e.width||a+l>e.height)}function gh(e){let{area:t,vx:n,vy:i,width:r,height:o,offset:s}=e;const a=n+s.x,l=i+s.y,c=r,u=o;let h=a<0?-a:0,d=l<0?-l:0;return h+=a+c>t.width?-(a+c-t.width):0,d+=l+u>t.height?-(l+u-t.height):0,{x:h,y:d}}function mh(e){let{options:t,pointer:n,width:i,height:r,dockOrder:o,x:s,y:a}=e;const{targetBounds:l}=n,c=hh(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(s,"px"),top:"".concat(a,"px"),transform:u},computedArrowStyle:fh(t.offset)[t.dock],dock:t.dock};const h={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},d=dh(i,r,t.offset),f=[],p="target"===t.area?s:l.left+s,g="target"===t.area?a:l.top+a;for(let e=0;e<o.length;e+=1){const n=o[e],l=gh({area:h,vx:p,vy:g,width:i,height:r,offset:d[n]}),u={left:"".concat(s,"px"),top:"".concat(a,"px"),transform:c[n]},m=fh(t.offset)[n];0!==l.x&&(u.width="".concat(i-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(s+l.x,"px"),m.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:m,dock:n,rect:{width:i,height:r}};if(0===l.x&&0===l.y)return y;y.offset=l,f.push(y)}return f.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),f[0]}function yh(e,t,n){const i=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!i)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const r=i.rect;return m({scaleRatio:r.scaleRatio},r.computedInner)}const vh={bounds:function(e){let{resources:t,nodes:n,pointer:i,width:r,height:o,options:s}=e;const{targetBounds:a}=i,{x:l,y:c,width:u,height:h}=t.getNodeBoundsRelativeToTarget(n[0]),d={left:{x:l,y:c+h/2},right:{x:l+u,y:c+h/2},top:{x:l+u/2,y:c},bottom:{x:l+u/2,y:c+h},inside:{x:l+u/2,y:c+h/2}},f=hh(s.offset),p=f[s.dock];if(p)return{computedTooltipStyle:{left:"".concat(d[s.dock].x,"px"),top:"".concat(d[s.dock].y,"px"),transform:p},computedArrowStyle:fh(s.offset)[s.dock],dock:s.dock};const g={width:"target"===s.area?a.width:window.innerWidth,height:"target"===s.area?a.height:window.innerHeight},m=dh(r,o,s.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(ph(g,"target"===s.area?d[t].x:a.left+d[t].x,"target"===s.area?d[t].y:a.top+d[t].y,r,o,m[t]))return{computedTooltipStyle:{left:"".concat(d[t].x,"px"),top:"".concat(d[t].y,"px"),transform:f[t]},computedArrowStyle:fh(s.offset)[t],dock:t}}const v=function(e){let{options:t,docks:n,dockOffsets:i,targetBounds:r,area:o,width:s}=e;const a="top",l="target"===t.area?n[a].x:r.left+n[a].x,c=("target"===t.area?n[a].y:(r.top,n[a].y),i[a]),u=l+c.x,h=(c.y,s);let d=n.top.x;return u<0&&u+h>o.width||(u<0?d-=u:u+h>o.width&&(d-=u+h-o.width)),d}({options:s,docks:d,dockOffsets:m,targetBounds:a,area:g,width:r});return{computedTooltipStyle:{left:"".concat(v,"px"),top:"".concat(d.top.y,"px"),transform:f.top},computedArrowStyle:fh(s.offset+v-d.top.x,s.offset).top,dock:"top"}},pointer:function(e){let{options:t,pointer:n,width:i,height:r}=e;const{x:o,y:s}=n;return mh({x:o,y:s,pointer:n,width:i,height:r,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let{options:t,pointer:n,width:i,height:r,nodes:o,resources:s}=e;const a=o[0],{dx:l,dy:c}=n,u=s.getComponentBoundsFromNode(a),h=l+u.x+u.width/2,d=c+u.y+u.height/2,{start:f,end:p,outerRadius:g}=a.desc.slice,m=(f+p)/2-Math.PI/2,y=2*Math.PI,v=(m%y+y)%y;let b=["top","left","right","bottom"];return"auto"===t.dock&&(b=v<=Math.PI/4||v>=7*Math.PI/4?["right","top","bottom","left"]:v<=3*Math.PI/4?["bottom","left","right","top"]:v<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),mh({x:h+g*u.scaleRatio.x*Math.cos(v),y:d+g*u.scaleRatio.y*Math.sin(v),pointer:n,width:i,height:r,options:t,dockOrder:b})}};function bh(e,t){let{width:n,height:i}=e,{chart:r,state:o,props:s}=t;const a={resources:{formatter:r.formatter,scale:r.scale,component:r.component,getComponentBoundsFromNode:e=>yh(e,o.pointer,r),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const i=yh(e,t,n),r=e.bounds;return{x:i.x+t.dx+r.x,y:i.y+t.dy+r.y,width:r.width,height:r.height}}(e,o.pointer,r)},nodes:o.activeNodes,pointer:o.pointer,width:n,height:i},l=typeof s.placement;if("object"===l&&"function"==typeof s.placement.fn)return s.placement.fn(a);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=m(c,s.placement(a))),"object"===l&&vh[s.placement.type]?c=m(c,s.placement):"string"===l&&vh[s.placement]&&(c=m(c,{type:s.placement})),a.options=c;const u=vh[c.type](a);let{x:h,y:d,width:f,height:p}=a.resources.getComponentBoundsFromNode(a.nodes[0]);return h+=a.pointer.dx,f+=h,d+=a.pointer.dy,p+=d,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,h,parseFloat(u.computedTooltipStyle.left)),f),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,d,parseFloat(u.computedTooltipStyle.top)),p),"px"),u}let xh;function wh(){xh=null}const kh={duration:8e3,delay:500,filter:e=>e.filter((e=>e.data&&void 0!==e.data.value)),extract:e=>e.node.data.value,content:e=>{let{h:t,data:n}=e;return n.map((e=>t("div",{},e)))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every(((e,n)=>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};const Mh={require:["chart","renderer"],defaultSettings:{settings:kh,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(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,{nodes:n,duration:i,delay:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let{chart:n,state:i}=t,r=0,o=0;e.center?(r+=e.center.x,o+=e.center.y):(r+=e.clientX,o+=e.clientY);const s=n.element.getBoundingClientRect(),a=i.targetElement.getBoundingClientRect(),l=r,c=o,u=s.left-a.left,h=s.top-a.top,d=r-s.left,f=o-s.top;return r-=a.left,o-=a.top,{x:r,y:o,dx:u,dy:h,cx:d,cy:f,clientX:l,clientY:c,targetBounds:a,chartBounds:s}}(e,this),t=Array.isArray(n)?this.props.filter(n):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((()=>this.invokeRenderer(this.state.activeNodes)),i,r)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=uh({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){xh&&xh!==e&&xh()}(t),xh=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,m({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,m({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),xh===t&&(xh=null),this.state.tooltipElm=void 0})),this.dispatcher.on("active",(()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}))},created(){this.init(this.settings)},beforeUpdate(e){let{settings:t}=e;this.dispatcher&&(this.dispatcher.destroy(),wh()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),wh()},appendTo(){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;const{width:e,height:t}=this.state.targetElement.getBoundingClientRect();this.renderer.destroy(),this.renderer.size({width:e,height:t}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let{chart:n,scale:i,props:r,h:o}=t;const s={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:i,h:o},a=[];return e.forEach((e=>{if("function"==typeof r.extract){const t=m({node:e},s);a.push(r.extract(t))}})),a}(e,this),n=bh(ch(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=ch(t,n,this)}};const _h={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter((e=>e.key===this.props.target)),t=e.filter((e=>e.collider)).map((e=>e.collider));t.forEach((e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var Sh={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},qh=/([astvzqmhlc])([^astvzqmhlc]*)/gi,Dh=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function Ah(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(qh,((e,n,i)=>{const r=function(e){const t=e.match(Dh);return t?t.map(Number):[]}(i);let o=n.toLowerCase(),s=n;if("m"===o&&r.length>2&&(t.push([s,...r.splice(0,2)]),o="l",s="m"===s?"l":"L"),r.length<Sh[o])return"";for(t.push([s,...r.splice(0,Sh[o])]);r.length>=Sh[o]&&r.length&&Sh[o];)t.push([s,...r.splice(0,Sh[o])]);return""})),t}const Eh=2*Math.PI;function Ch(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function Th(e,t,n,i,r){const o=1-e;return o**3*t+3*o**2*e*n+3*o*e**2*i+e**3*r}function Nh(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||function(e,t,n,i){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+i.x-(n.x+n.x))+Math.abs(t.y+i.y-(n.y+n.y))}(e,t,n,i)<=10)return r[r.length-1]!==e&&r.push(e),r.push(i),r;const s=Ch(e,t),a=Ch(t,n),l=Ch(n,i),c={x:Th(.5,e.x,t.x,n.x,i.x),y:Th(.5,e.y,t.y,n.y,i.y)},u=Ch(s,a),h=Ch(a,l);return Nh(e,s,u,c,r,o-1),Nh(c,h,l,i,r,o-1),r}function Rh(e,t,n){const{cp1:i,cp2: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 Nh(e,i,r,n)}function Oh(e,t,n){const i=[],r=!!e[4],o=!!e[5],s=e[3];let a,l,c,u,h=e[6],d=e[7],f=e[1],p=e[2];if("a"===e[0]&&(h+=t,d+=n),t===d&&n===d)return i;if(!f||!p)return i.push({x:h,y:d}),i;({cx:a,cy:l,rx:f,ry:p,sweepAngle:c,startAngle:u}=function(e,t,n,i,r,o,s,a,l){let c,u,h,d,f,p;const g=Qo(n%360),m=Math.cos(g),y=Math.sin(g),v=(a-o)/2,b=(l-s)/2,x=m*v+y*b,w=m*b-y*v;p=x**2/(e=Math.abs(e))**2+w**2/(t=Math.abs(t))**2,p>1&&(p=Math.sqrt(p),e*=p,t*=p);const k=e*w,M=t*x,_=k**2+M**2,S=(e*t)**2-_;let q=Math.sqrt(Math.max(S/_,0));i===r&&(q=-q);const D=q*(k/t),A=q*(-M/e);d=m*D-y*A+(a+o)/2,f=y*D+m*A+(l+s)/2;const E=(x-D)/e,C=(w-A)/t,T=(-x-D)/e,N=(-w-A)/t;return c=Math.atan2(C,E),c+=c<0?Eh:0,u=Math.atan2(N,T),u+=u<0?Eh:0,h=u-c,!r&&c<u?h-=Eh:r&&u<c&&(h+=Eh),h%=Eh,{startAngle:c,sweepAngle:h,cx:d,cy:f,rx:e,ry:t}}(f,p,s,r,o,h,d,t,n));const g=Math.abs(c*Math.sqrt((f**2+p**2)/2)),m=Math.ceil(g/10),y=c/m;for(let e=1;e<=m;e++){const t=(u+y*e)%Eh,n=Math.cos(t),r=Math.sin(t);i.push({x:a+n*f+-r*n,y:l+r*p+n*r})}return i}function Ih(e){const t=Ah(e),n=[],i=[];let r=0,o=0,s=null,a=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],h=u[0];switch("S"!==h&&"s"!==h&&"C"!==h&&"c"!==h&&(s=null,a=null),"T"!==h&&"t"!==h&&"Q"!==h&&"q"!==h&&(l=null,c=null),h){case"m":i.length&&n.push(i.splice(0));case"l":r+=u[1],o+=u[2],i.push({x:r,y:o});break;case"M":i.length&&n.push(i.splice(0));case"L":r=u[1],o=u[2],i.push({x:r,y:o});break;case"H":r=u[1],i.push({x:r,y:o});break;case"h":r+=u[1],i.push({x:r,y:o});break;case"V":o=u[1],i.push({x:r,y:o});break;case"v":o+=u[1],i.push({x:r,y:o});break;case"a":i.push(...Oh(u,r,o)),r+=u[6],o+=u[7];break;case"A":i.push(...Oh(u,r,o)),r=u[6],o=u[7];break;case"c":i.push(...Nh({x:r,y:o},{x:u[1]+r,y:u[2]+o},{x:u[3]+r,y:u[4]+o},{x:u[5]+r,y:u[6]+o})),s=u[3]+r,a=u[4]+o,r+=u[5],o+=u[6];break;case"C":i.push(...Nh({x:r,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),s=u[3],a=u[4],r=u[5],o=u[6];break;case"s":null!==s&&null!==s||(s=r,a=o),i.push(...Nh({x:r,y:o},{x:2*r-s,y:2*o-a},{x:u[1]+r,y:u[2]+o},{x:u[3]+r,y:u[4]+o})),s=u[1]+r,a=u[2]+o,r+=u[3],o+=u[4];break;case"S":null!==s&&null!==s||(s=r,a=o),i.push(...Nh({x:r,y:o},{x:2*r-s,y:2*o-a},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),s=u[1],a=u[2],r=u[3],o=u[4];break;case"Q":i.push(...Rh({x:r,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],r=u[3],o=u[4];break;case"q":i.push(...Rh({x:r,y:o},{x:u[1]+r,y:u[2]+o},{x:u[3]+r,y:u[4]+o})),l=u[1]+r,c=u[2]+o,r+=u[3],o+=u[4];break;case"T":null!==l&&null!==l||(l=r,c=o),l=2*r-l,c=2*o-c,i.push(...Rh({x:r,y:o},{x:l,y:c},{x:u[1],y:u[2]})),r=u[1],o=u[2];break;case"t":null!==l&&null!==l||(l=r,c=o),l=2*r-l,c=2*o-c,i.push(...Rh({x:r,y:o},{x:l,y:c},{x:u[1]+r,y:u[2]+o})),r+=u[1],o+=u[2];break;case"z":case"Z":i.length&&i.push({x:i[0].x,y:i[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],i=e[t+1];Math.abs(n.x-i.x)<1e-12&&Math.abs(n.y-i.y)<1e-12&&(e.splice(t,1),t--)}}(i),n.push(i.splice(0)),n}const Lh={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter((e=>e.key===this.props.target)),t=[];e.forEach((e=>{Ih(e.attrs.d).forEach((e=>{e.forEach((e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var Ph=[function(e){e.component("box",ja),e.component("box-marker",ja)},function(e){e.component("point",Wa),e.component("point-marker",Wa)},function(e){e.component("pie",Ka)},function(e){e.component("grid-line",el)},function(e){e.component("ref-line",hl)},function(e){e.component("axis",Fl)},function(e){e.component("container",Hl)},function(e){e.component("text",$l)},function(e){e.component("scrollbar",Yl)},function(e){e.component("brush-range",lc),e.component("brush-area-dir",dc)},function(e){e.component("range",mc)},function(e){e.component("brush-lasso",kc)},function(e){e.component("labels",Iu)},function(e){e.component("legend-cat",Xu)},function(e){e.component("legend-seq",eh)},function(e){e.component("line",rh)},function(e){e.component("brush-area",lh)},function(e){e.component("tooltip",Mh)},function(e){e.component("debug-collider",_h)},function(e){e.component("debug-path-to-points",Lh)}];let jh=class{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,i;for(n=0;n<t;n++)i=this.children[n],e.push(i),i.children.length&&(e=[...e,...i.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map((e=>e.toJSON()))}}};class zh{constructor(){let{x:e=0,y:t=0,width:n=0,height:i=0,minWidth:r=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x:e,y:t,width:n,height:i,minWidth:r,minHeight:o})}set(){let{x:e=0,y:t=0,width:n=0,height:i=0,minWidth:r=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="rect",n>=0?(this.x=e,this.width=Math.max(n,r)):(this.x=e+Math.min(n,-r),this.width=-Math.min(n,-r)),i>=0?(this.y=t,this.height=Math.max(i,o)):(this.y=t+Math.min(i,-o),this.height=-Math.min(i,-o))}containsPoint(e){return js(this,e)}intersectsLine(e){return zs(this,A(e))}intersectsRect(e){return Ls(this,D(e))}intersectsCircle(e){return Cs(e,this)}intersectsPolygon(e){return Is(e,this)}intersectsGeoPolygon(e){return Ys(e,this)}points(){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}]}}class Fh{constructor(){let{cx:e=0,cy:t=0,r:n=0,minRadius:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({cx:e,cy:t,r:n,minRadius:i})}set(){let{cx:e=0,cy:t=0,r:n=0,minRadius:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="circle",this.cx=e,this.cy=t,this.r=Math.max(n,i),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return Es(this,e)}intersectsLine(e){return Ts(this,A(e))}intersectsRect(e){return Cs(this,D(e))}intersectsCircle(e){return n=e,!Ss(t=this)&&!Ss(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return Ns(this,e)}intersectsGeoPolygon(e){return $s(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class Hh{constructor(){let{x1:e=0,y1:t=0,x2:n=0,y2:i=0,tolerance:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x1:e,y1:t,x2:n,y2:i,tolerance:r})}set(){let{x1:e=0,y1:t=0,x2:n=0,y2:i=0,tolerance:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="line",this.x1=e,this.y1=t,this.x2=n,this.y2=i,this.tolerance=Math.max(0,Math.round(r)),this.vectors=this.points(),this.zeroSize=e===n&&t===i}containsPoint(e){if(this.tolerance>0){return Ts({cx:e.x,cy:e.y,r:this.tolerance},this)}return Hs(this,e)}intersectsLine(e){return Fs(this,A(e))}intersectsRect(e){return zs(D(e),this)}intersectsCircle(e){return Ts(e,this)}intersectsPolygon(e){return Os(e,this)}intersectsGeoPolygon(e){return Us(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class Vh{constructor(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polygon",this.vertices=e.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],i=e[t+1];n.x===i.x&&n.y===i.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return Rs(this,e)}intersectsCircle(e){return Ns(e,this)}intersectsLine(e){return Os(this,A(e))}intersectsRect(e){return Is(this,D(e))}intersectsPolygon(e){return Vs(this,e)}intersectsGeoPolygon(e){return Bs(e,this)}points(){return this.vertices}bounds(){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}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function Bh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Vh(...t)}function $h(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function Wh(e){for(let t=0;t<e.length-1;t++){const n=e[t],i=e[t+1];n.x===i.x&&n.y===i.y&&(e.splice(t,1),t--)}}class Uh{constructor(){let{vertices:e=[[]]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="geopolygon",this.vertices=e.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)Wh(this.vertices[e]),this.vertices[e].length>2&&$h(this.vertices[e]),this.polygons[e]=Bh({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return Ws(this,e)}intersectsCircle(e){return $s(e,this)}intersectsLine(e){return Us(this,A(e))}intersectsRect(e){return Ys(this,D(e))}intersectsPolygon(e){return Bs(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),i=t.boundingRect();return!!Ls(n,i)&&(Ps(i,n)?As(t,e):As(e,t))}(this,e)}points(){return this.vertices}bounds(){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}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function Yh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Uh(...t)}class Xh{constructor(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({points:e})}set(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polyline",this.segments=[],this._points=e.slice(),this._points.length>1)for(let e=0,i=this._points.length-1;e<i;e++)t=this._points[e],n=this._points[e+1],(t.x!==n.x||t.y!==n.y)&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y});var t,n}containsPoint(e){return this.segments.some((t=>Hs(t,e)))}intersectsCircle(e){return this.segments.some((t=>Ts(e,t)))}intersectsLine(e){const t=A(e);return this.segments.some((e=>Fs(e,t)))}intersectsRect(e){const t=D(e);return this.segments.some((e=>zs(t,e)))}intersectsPolygon(e){return this.segments.some((t=>Os(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>Us(e,t)))}points(){return this._points}}const Kh=Re();function Gh(e,t){return Kh.get(e)(t)}Kh.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new zh(...t)})),Kh.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Fh(...t)})),Kh.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Hh(...t)})),Kh.add("polygon",Bh),Kh.add("geopolygon",Yh),Kh.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Xh(...t)}));class Jh{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((e=>{const t=Gh(e.type,e);t&&this.geometries.push(t)}))}containsPoint(e){return this.geometries.some((t=>t.containsPoint(e)))}intersectsLine(e){return this.geometries.some((t=>t.intersectsLine(e)))}intersectsRect(e){return this.geometries.some((t=>t.intersectsRect(e)))}intersectsCircle(e){return this.geometries.some((t=>t.intersectsCircle(e)))}intersectsPolygon(e){return this.geometries.some((t=>t.intersectsPolygon(e)))}intersectsGeoPolygon(e){return this.geometries.some((t=>t.intersectsGeoPolygon(e)))}}class Zh{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new Zh).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let 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}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,i,r;if(e instanceof Zh&&(e=e._elements),Array.isArray(e)){for(i=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(r=0;r<3;r++)i[t][n]+=this._elements[t][r]*e[r][n];this._elements=i}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,i,r,o){return this.multiply([[e,n,r],[t,i,o],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],i=this._elements[1][0],r=this._elements[1][1],o=this._elements[1][2],s=this._elements[2][0],a=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*r*l+t*o*s+n*i*a-n*r*s-t*i*l-e*o*a,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],i=this._elements[0][2],r=this._elements[1][0],o=this._elements[1][1],s=this._elements[1][2],a=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[o*c-s*l,i*l-n*c,n*s-i*o],[s*a-r*c,t*c-i*a,i*r-t*s],[r*l-o*a,a*n-t*l,t*o-n*r]],this.multiply(1/e),this}transpose(){const 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}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map((e=>e.join("\t"))).join("\n"))}isIdentity(){const 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]}transformPoint(e){let t,n,i=[e.x,e.y,1],r=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]+=i[n]*r[t][n];return{x:o[0],y:o[1]}}transformPoints(e){let t,n,i,r,o,s=this._elements,a=[];for(r=0;r<e.length;r++){for(t=[e[r].x,e[r].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(i=0;i<this._elements[n].length;i++)o[n]+=t[i]*s[n][i];a.push({x:o[0],y:o[1]})}return a}get elements(){const 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]]]}}const Qh=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function ed(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const i=t.args[1],r=t.args[2];e.translate(i,r),e.rotate(n),e.translate(-i,-r)}else 1===t.args.length&&e.rotate(n)}function td(e,t){const n=t.args[0],i=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,i)}function nd(e,t){const n=t.args[0],i=isNaN(t.args[1])?0:t.args[1];e.translate(n,i)}function id(e,t){t.args.length>=6&&e.transform(...t.args)}function rd(e,t){const n=function(e){let t,n=[];for(;null!==(t=Qh.exec(e));){const e=t[2].trim(),i=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:i.filter((e=>e.trim().length>0)).map((e=>Number(e)))})}return n}(e);let i;for(let e=0,r=n.length;e<r;e++)i=n[e],"rotate"===i.cmd?ed(t,i):"scale"===i.cmd?td(t,i):"matrix"===i.cmd?id(t,i):"translate"===i.cmd&&nd(t,i)}const od={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},sd={type:(e,t)=>t.filter((t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()})),attr:(e,t,n,i)=>i.filter((i=>{const r=i.attrs[e];if(!t)return void 0!==r;if(void 0===r)return!1;switch(t){case"=":return n===String(r);case"!=":return n!==String(r);default:return!1}})),universal:e=>e,tag:(e,t)=>t.filter((t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))};function ad(e,t){if(!t||!t.length||!e||"function"!=typeof sd[e.type])return[];switch(e.type){case"type":case"tag":return sd[e.type](e.value,t);case"attr":return sd[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return sd[e.type](t);default:return[]}}var ld={find:function(e,t){const n=[],i=[];let r,o;if(t.isBranch){let s;r=function(e){const t=[];let n,i,r,o;return e.split(/\s*,\s*/).forEach((e=>{e=e.trim(),n=[];const s=t=>{r=e.match(od[t]),r&&(o=!0,e=e.slice(r[0].length),i={type:t,value:r[0]},"attr"===t&&(r=r[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),i.attribute=r[1],i.operator=r[2],i.attributeValue=r[3]),n.push(i))};for(;e&&(o=!1,r=e.match(/^\s*([>+~]|\s)\s*/),r&&(o=!0,n.push({type:" ",value:r[0]}),e=e.slice(r[0].length)),Object.keys(od).forEach(s),n&&n.length&&t.indexOf(n)<0&&t.push(n),o););})),t}(e),o=t.descendants;for(let e=0,t=r.length;e<t;e++){s=r[e];const t=[];let n=o.slice(),a=!1;s.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=o.slice(),void(a=!1);n=ad(e,n),a=!0})),a&&t.push(n);const l=t[0].filter((e=>{let n,i=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(i);i&&n<0;)i=i.parent,n=t[e].indexOf(i);if(n<0)return!1}return!0}));i.push(l)}for(let e=0,t=i.length;e<t;e++)for(let t=0,r=i[e].length;t<r;t++)n.indexOf(i[e][t])<0&&n.push(i[e][t])}return n||[]}};function cd(e,t,n){const i=e.type;let r=e.points();n&&(r=r.every((e=>Array.isArray(e)))?r.map((e=>n.transformPoints(e))):n.transformPoints(r)),function(e,t){for(let n=0,i=e.length;n<i;n++)e[n].x/=t,e[n].y/=t}(r,t);let o=null;if("rect"===i||"bounds"===i)o=D(r),o.type=i;else if("circle"===i)o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(r,e.r),o.type=i;else if("line"===i)o=A(r),o.type=i;else if("polygon"===i||"polyline"===i){o={type:"path",d:Jo(r,"polygon"===i)}}else if("geopolygon"===i){let e="";for(let t=0;t<r.length;t++)e+=Jo(r[t],!0);o={type:"path",d:e}}return o}class ud{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{x:n,y:i,width:r,height:o}=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n,y:i,width:r,height:o}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((e=>cd(e,t,n)))}:cd(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new ud(e))),this._parent=()=>e.parent?new ud(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,i=this._getElementBoundingRect();let r=i.left,o=i.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const{left:t=0,top:n=0}=e.getBoundingClientRect();r-=t,o-=n}return n.x+=r,n.y+=o,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function hd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ud(...t)}class dd{constructor(e){this._node=hd(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function fd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new dd(...t)}function pd(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=fd(n);const e=n.parent;e&&"stage"!==e.type&&pd(e,t.parent)}}function gd(e,t,n){if(null===e.colliderType)return null;const i=function(e,t){let 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{const i={x:t.cx,y:t.cy};({x:n.cx,y:n.cy}=e.inverseModelViewMatrix.transformPoint(i)),n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((e=>Array.isArray(e)))?Yh(n):Bh(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let i=e.descendants.length-1;i>=0;i--){const r=e.descendants[i];if(null!==r.collider&&r.collider[t](n)){const e=fd(r);return pd(r,e),e}}return null}(e,t,i):function(e,t,n){if(e.collider[t](n)){const t=fd(e);return pd(e,t),t}return null}(e,t,i)}function md(e,t,n,i){const r=e.length;for(let o=0;o<r;o++){const r=e[o],s=gd(r,t,i);s&&n.push(s),!r.children||s||r.collider||md(r.children,t,n,i)}}function yd(e,t,n){const i=e.length;for(let r=0;r<i;r++){const i=e[r];if(null!==gd(i,t,n))return!0;if(i.children&&!i.collider)return yd(i.children,t,n)}return!1}function vd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(E(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=q(e).map((e=>is(e,t))),["intersectsRect",n];case"line":return n=S(e).map((e=>is(e,t))),["intersectsLine",n];case"point":return n=is(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>is(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>is(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function bd(e,t){const[n,i]=vd(t,e.dpi),r=[];return n&&(md([e],n,r,i),function(e,t){for(let n=0,i=t.length;n<i;n++)t[n].input=e}(t,r)),r}function xd(e,t){const[n,i]=vd(t,e.dpi);return yd([e],n,i)}class wd extends jh{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const{data:t,desc:n,tag:i,strokeReference:r,fillReference:o}=e;var s,a;s=this.attrs,a=e,Object.keys(Go).forEach((e=>{const t=a[e];void 0!==t&&(s[Go[e]]=t)})),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=m(!0,{},n)),"string"==typeof i&&(this.tag=i),"string"==typeof r&&(this.strokeReference=r),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return ld.find(e,this).map((e=>hd(e)))}getItemsFrom(e){return bd(this,e)}containsPoint(e){return xd(this,e)}intersectsLine(e){return xd(this,e)}intersectsRect(e){return xd(this,e)}intersectsCircle(e){return xd(this,e)}intersectsPolygon(e){return xd(this,e)}intersectsGeoPolygon(e){return xd(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Zh;void 0!==this.attrs.transform&&rd(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Zh;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),i=e.attrs,r=Object.keys(i);if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){const r=n[e];if(!Object.hasOwnProperty.call(i,r))return!1;if(t[r]!==i[r])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const 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))}get collider(){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 new Jh(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=Gh("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=Gh(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class kd extends jh{addChild(e){if(!(e&&e instanceof jh))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}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let 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}}const Md=kd.prototype;class _d extends wd{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const{collider:t}=e,n=m({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},[i,,r]=e.bounds(t),{x:o,y:s}=i,{x:a,y:l}=r,c=isNaN(n.width)?a:Math.max(a,n.width+n.x),u=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?o:Math.min(o,n.x),n.y=isNaN(n.y)?s:Math.min(s,n.y),n.width=c-n.x,n.height=u-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=m({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const 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]}addChild(e){const t=Md.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=m({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=Md.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=m({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,i=n?n.length:0;for(t=0;t<i;t++)n[t]._stage=null;if(Md.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=m(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(Md.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=m(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function Sd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new _d(...t)}class qd extends _d{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const Dd=kd.prototype,Ad=["x1","x2","y1","y2","id","offset","style"];class Ed extends wd{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let i=0,r=Ad.length;i!==r;i++)n=Ad[i],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return Dd.addChild.call(this,e)}addChildren(e){return Dd.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,i=n?n.length:0;for(t=0;t<i;t++)n[t]._stage=null;return Dd.removeChild.call(this,e),this}removeChildren(e){return Dd.removeChildren.call(this,e),this}}function Cd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ed(...t)}const Td=kd.prototype,Nd=["patternUnits","x","y","width","height","id"];class Rd extends wd{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let i=0,r=Nd.length;i!==r;i++)n=Nd[i],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return Td.addChild.call(this,e)}addChildren(e){return Td.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,i=n?n.length:0;for(t=0;t<i;t++)n[t]._stage=null;return Td.removeChild.call(this,e),this}removeChildren(e){return Td.removeChildren.call(this,e),this}}class Od extends wd{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:i=0,height:r=0,rx:o=0,ry:s=0,collider:a}=e,l=m({type:"rect",x:t,y:n,width:i,height:r},a);super.set(e),i>=0?(this.attrs.x=t,this.attrs.width=i):(this.attrs.x=t+i,this.attrs.width=-i),r>=0?(this.attrs.y=n,this.attrs.height=r):(this.attrs.y=n+r,this.attrs.height=-r),o>0&&(this.attrs.rx=o),s>0&&(this.attrs.ry=s),this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=q(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[i,r,o,s]=_(n);return this.__boundingRect[e]={x:i,y:r,width:o-i,height:s-r},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const 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]}}class Id extends wd{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cx:t=0,cy:n=0,r:i=0,collider:r}=e,o=m({type:"circle",cx:t,cy:n,r:i},r);super.set(e),this.attrs.cx=t,this.attrs.cy=n,this.attrs.r=i,this.collider=o,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const 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]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const{cx:t,cy:n,r:i,r:r}=this.attrs,o=t-i,s=n-r;let a=2*i,l=2*r,c=[{x:o,y:s},{x:o+a,y:s},{x:o+a,y:s+l},{x:o,y:s+l}];if(e&&this.modelViewMatrix){c=this.modelViewMatrix.transformPoints(c);const[t,n,i,r]=_(c);a=i-t,l=r-n,this.__bounds[e]=[{x:t,y:n},{x:t+a,y:n},{x:t+a,y:n+l},{x:t,y:n+l}]}else this.__bounds[e]=c;return this.__bounds[e]}}class Ld extends wd{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x1:t=0,y1:n=0,x2:i=0,y2:r=0,collider:o}=e;super.set(e),this.attrs.x1=t,this.attrs.y1=n,this.attrs.x2=i,this.attrs.y2=r;const s={type:"line",x1:t,y1:n,x2:i,y2:r};this.collider=m(s,o),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=S(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,i,r,o]=_(t),s=n!==r||i!==o;return this.__boundingRect[e]={x:n,y:i,width:s?Math.max(1,r-n):0,height:s?Math.max(1,o-i):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const 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]}}const Pd=Math.PI/2;function jd(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function zd(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const Fd={step:function(e){return new De(e,.5)},stepAfter:function(e){return new De(e,1)},stepBefore:function(e){return new De(e,0)},linear:re,basis:function(e){return new de(e)},cardinal:ge.tension(0),catmullRom:ye,monotonex:function(e){return new ke(e)},monotoney:function(e){return new Me(e)},natural:function(e){return new Se(e)}};function Hd(e){if(e.length<2)return!1;const 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}class Vd extends wd{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=ne();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const{major:t,minor:n,layerObj:i,points:r,stngs:o,generatorType:s}=e,a=ae(),l=o.coordinates?o.coordinates.defined:null;a[t.p]((e=>e.major*t.size))["".concat(n.p,"1")]((e=>e.minor*n.size))["".concat(n.p,"0")]((e=>e.minor0*n.size)).curve(Fd["monotone"===i.curve?"monotone".concat(t.p):i.curve]),l?a.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):a.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const c=o.connect?r.filter(a.defined()):r,u=("area"===s?a:a[s]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=Ih(this.attrs.d),this.segments.length>1&&this.segments.every((e=>Hd(e))))return void(this.collider=m({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(Hd(t))this.collider=m({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=[],r=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const o=e.length-1;for(let n=1;n<o;n++){const s=e[n-1],a=e[n],l=e[n+1],c=jd(a,s),u=jd(a,l),h=(c+u)/2,d=h+Math.PI,f=Math.max(h,d),p=Math.min(h,d),g=c>u;if(1===n){const e=jd(s,a);i.push(zd(s,e-Pd,t)),r.unshift(zd(s,e+Pd,t))}const m=g?f:p,y=g?p:f;if(i.push(zd(a,m,t)),r.unshift(zd(a,y,t)),n===o-1){const e=jd(l,a);i.push(zd(l,e+Pd,t)),r.unshift(zd(l,e-Pd,t))}}return{type:"polygon",vertices:[...i,...r]}}(t,n,e.collider)}else this.collider=m({type:"polyline",points:t},e.collider)}))}}boundingRect(){let 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:Ih(this.attrs.d),this.points=function(e){const t=[];let n,i=e.length;for(let r=0;r<i;r++){n=e[r];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,[n,i,r,o]=_(t);return this.__boundingRect[e]={x:n||0,y:i||0,width:r-n||0,height:o-i||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const 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]}}function Bd(e){let{data:t,_boundingRect:n,_textBoundsFn:i}=e;return null!=t&&(n||i)}class $d extends wd{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,dx:i=0,dy:r=0,textBoundsFn:o,text:s,title:a,collider:l,boundingRect:c,ellipsed:u}=e;super.set(e),this.attrs.x=t,this.attrs.y=n,this.attrs.dx=i,this.attrs.dy=r,this.attrs.text=s,void 0!==a&&(this.attrs.title=String(a)),"object"==typeof c?this._textBoundsFn=()=>c:"function"==typeof o&&(this._textBoundsFn=o),"string"==typeof u&&(this.ellipsed=u),this.collider=m({type:Bd(this)?"bounds":null},l),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=q(e),i=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[r,o,s,a]=_(i);return this.__boundingRect[t]={x:r,y:o,width:s-r,height:a-o},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const 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]}}const Wd=Re();function Ud(e,t){return Wd.get(e)(t)}Wd.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Od(...t)})),Wd.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Id(...t)})),Wd.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new $d(...t)})),Wd.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ld(...t)})),Wd.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Vd(...t)})),Wd.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new qd(...t)})),Wd.add("container",Sd),Wd.add("defs",Sd),Wd.add("linearGradient",Cd),Wd.add("radialGradient",Cd),Wd.add("conicGradient",Cd),Wd.add("stop",Cd),Wd.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Rd(...t)}));const Yd=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=n(),o={};let s="";for(let t=0;t<e.length;t++)s=e[t],void 0!==r[s]&&(o[s]=r[s]);return m(o,i),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function Xd(e,t){if(Array.isArray(t))for(let n=0,i=t.length;n<i;n++)t[n](e)}function Kd(e,t,n){e.node=n[t],e.index=t}function Gd(e,t,n,i){let r=!1;const o={siblings:e,node:null,index:0};for(let s=0,a=e.length;s<a;s++){if(Kd(o,s,e),Xd(o,i.create),r="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,r)continue;o.node=Yd.save(o.node);const a=Ud(o.node.type,o.node);a&&(o.node.transform&&(n.save(),rd(o.node.transform,n)),n.isIdentity()||(a.modelViewMatrix=n.clone()),t.addChild(a),o.node.children&&Gd(o.node.children,a,n,i),o.node.transform&&n.restore()),Yd.restore()}}function Jd(e){let{items:t,stage:n,dpi:i,on:r={}}=e;return n||(n=Ud("stage",i)),Gd(t,n,new Zh,r),n}function Zd(e,t,n){const{orientation:i,degree:r,stops:o=[]}=n;let s=null;if("radial"===i){const n=t.boundingRect();s=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===i){const t=n.startAngle||0,i=n.x||0,r=n.y||0;s=e.createConicGradient(t,i,r)}else{const i=es(r);["x1","x2","y1","y2"].forEach((e=>{e in n&&(i[e]=n[e])}));const o=t.boundingRect();s=e.createLinearGradient(o.x+i.x1*o.width,o.y+i.y1*o.height,o.x+i.x2*o.width,o.y+i.y2*o.height)}for(let e=0,t=o.length;e<t;e++){let t=o[e];s.addColorStop(t.offset,t.color)}return s}function Qd(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function ef(){let{x:e,y:t,width:n,height:i,scaleRatio:r,margin:o,edgeBleed:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const a={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 a.x=isNaN(e)?a.x:e,a.y=isNaN(t)?a.y:t,a.width=isNaN(n)?a.width:n,a.height=isNaN(i)?a.height:i,void 0!==r&&(a.scaleRatio.x=isNaN(r.x)?a.scaleRatio.x:r.x,a.scaleRatio.y=isNaN(r.y)?a.scaleRatio.y:r.y),void 0!==o&&(a.margin.left=isNaN(o.left)?0:o.left,a.margin.top=isNaN(o.top)?0:o.top),"object"==typeof s&&["left","right","top","bottom"].forEach((e=>{!isNaN(s[e])&&s[e]>0&&(a.edgeBleed[e]=s[e],a.edgeBleed.bool=!0)})),a.computedPhysical={x:Math.round(a.margin.left+(a.x-a.edgeBleed.left)*a.scaleRatio.x),y:Math.round(a.margin.top+(a.y-a.edgeBleed.top)*a.scaleRatio.y),width:Math.round((a.width+a.edgeBleed.left+a.edgeBleed.right)*a.scaleRatio.x),height:Math.round((a.height+a.edgeBleed.top+a.edgeBleed.bottom)*a.scaleRatio.y)},a}function tf(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:Du,textBounds:Eu,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function nf(e){return t=>{let{node:n}=t;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}const rf=200,of=200;class sf{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,{rect:n,dpiRatio:i,canvasBufferSize:r}=e;t=r?"function"==typeof r?r(n):r:{width:n.computedPhysical.width+2*rf,height:n.computedPhysical.height+2*of},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*i),this.bufferCanvas.height=Math.round(t.height*i)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const af=Re();function lf(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function cf(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function uf(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function hf(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=Object.keys(i);for(let r=0,o=n.length;r<o;r++){let o=n[r];const s=o[0],a=o[1],l=o[2];if(s in t.attrs&&!(a in i)&&e[a]!==t.attrs[s]){const n=l?l(t.attrs[s]):t.attrs[s];"function"==typeof e[a]?e[a](n):e[a]=n}}for(let t=0,n=r.length;t<n;t++){const n=r[t];e[n]=i[n]}}function df(e,t,n,i){for(let r=0,o=e.length;r<o;r++){let o=e[r],s={};t.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"==typeof o.attrs.fill&&"gradient"===o.attrs.fill.type?s.fillStyle=Zd(t,o,o.attrs.fill):o.attrs.fill&&"object"==typeof o.attrs.fill&&"pattern"===o.attrs.fill.type&&(s.fillStyle=i.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"gradient"===o.attrs.stroke.type?s.strokeStyle=Zd(t,o,o.attrs.stroke):o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"pattern"===o.attrs.stroke.type&&(s.strokeStyle=i.patterns.create(o.attrs.stroke))),hf(t,o,n,s),o.modelViewMatrix&&uf(o.modelViewMatrix.elements,t),af.has(o.type)&&af.get(o.type)(o.attrs,{g:t,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&df(o.children,t,n,i),t.restore()}}function ff(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jd;const i={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let r,o=!1,s=ef();const a=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",lf]];let l;const c=tf();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(i).forEach((t=>{void 0!==e[t]&&(i[t]=e[t])})),i),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof i.transform||t||(t=new sf(e)),n.appendChild(e),e),c.getScene=i=>{const r=cf(t&&t.getContext()||e.getContext("2d")),o=s.scaleRatio.x,a=s.scaleRatio.y,l={type:"container",children:i,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*r*o,", ").concat(s.edgeBleed.top*r*a,")"):""};return 1===r&&1===o&&1===a||(l.transform+="scale(".concat(r*o,", ").concat(r*a,")")),n({items:[l],dpi:r,on:{create:[yu(c.measureText),nf(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let i={};return{create(e){const r=e.key;return r?(i[r]=i[r]||Qd(e,t,n),i[r]):Qd(e,t,n)},clear(){i={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),h=cf(u),d=t&&i.transform();if(d)return e.width=e.width,function(e){let{el:t,dpiRatio:n,transform:i}=e;if("object"==typeof i){const e=[i.horizontalScaling,i.horizontalSkewing,i.verticalSkewing,i.verticalScaling,i.horizontalMoving*n,i.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:h,transform:d}),t.apply(),!0;o&&(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*h),e.height=Math.round(s.computedPhysical.height*h),t&&t.updateSize({rect:s,dpiRatio:h,canvasBufferSize:i.canvasBufferSize}));const f=c.getScene(n),p=!r||!f.equals(r);l.clear();const g=o||p,m="function"==typeof i.progressive&&i.progressive();return g&&(m&&!m.isFirst||c.clear(),df(f.children,u,a,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,m&&!m.isFirst&&f.children.unshift(...r.children),r=f,g},c.itemsAt=e=>r?r.getItemsFrom(e):[],c.findShapes=e=>r?r.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),r=null,c),c.size=e=>{if(e){const t=ef(e);JSON.stringify(s)!==JSON.stringify(t)&&(o=!0,s=t)}return s},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),r=null},c}function pf(e,t){af.add(e,t)}function gf(e,t){return Math.max(0,Math.min(e,t))}const mf=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),yf=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),vf=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function bf(e){return mf.test(e)}function xf(e){return yf.test(e)||vf.test(e)}function wf(e){let t,n,i=e?e.length:0;for(t=0;t<i;t++){if(n=e[t],bf(n))return"ltr";if(xf(n))return"rtl"}return"ltr"}const kf={start:"end",end:"start",center:"center",middle:"middle"};function Mf(e,t){return"rtl"===t?kf[e]:e}function _f(e,t){const n=[];let i;const r=[],o=[],s=[];let a,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),a=e.map(c),l=t.map(c);for(let e=0,i=t.length;e<i;e++){-1===a.indexOf(t[e].id)?n.push(t[e]):o.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?r.push(e[t]):s.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=_f([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=o.length;e<t;e++)o[e].diff=_f(s[e].children||[],o[e].content.children||[]),o[e].object=s[e].object,o[e].children=o[e].diff.items;return i=o.concat(n),n.isTree=!0,r.isTree=!0,o.isTree=!0,s.isTree=!0,i.isTree=!0,{added:n,updatedNew:o,updatedOld:s,removed:r,items:i}}function Sf(e,t,n){for(let i=0,r=e.length;i<r;i++)e[i].object=n(e[i].content.type,t)}function qf(e,t){for(let n=0,i=e.length;n<i;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function Df(e,t,n,i){let r;for(let o=0,s=e.length;o<s;o++)r=e[o],null!==r.object&&void 0!==r.object&&(n(r.object,r.content),r.diff&&(Sf(r.diff.added,r.object,t),qf(r.diff.removed,i),Df(r.diff.items,t,n,i)))}function Af(e,t,n,i,r,o){const s=_f(e,t);return Sf(s.added,n,i),qf(s.removed,o),Df(s.items,i,r,o),s.items}pf("rect",(function(e,t){let{g:n,doFill:i,doStroke:r}=t;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,i,r,o,s){o=gf(i/2,o>0?o:s),s=gf(r/2,s>0?s:o),e.moveTo(t,n+s),e.lineTo(t,n+r-s),e.quadraticCurveTo(t,n+r,t+o,n+r),e.lineTo(t+i-o,n+r),e.quadraticCurveTo(t+i,n+r,t+i,n+r-s),e.lineTo(t+i,n+s),e.quadraticCurveTo(t+i,n,t+i-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+s)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),i&&n.fill(),r&&n.stroke()})),pf("circle",(function(e,t){let{g:n,doFill:i,doStroke:r}=t;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),i&&n.fill(),r&&n.stroke()})),pf("line",(function(e,t){let{g:n,doStroke:i}=t;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),i&&n.stroke()})),pf("path",(function(e,t){let{g:n,doStroke:i,doFill:r}=t;const o=new Path2D(e.d);r&&n.fill(o),i&&n.stroke(o)})),pf("text",(function(e,t){let{g:n,ellipsed:i,doStroke:r}=t;const o=i||vu(e,Du);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter((e=>!!e)).join(" ");const s=wf(e.text);n.canvas.dir!==s&&(n.canvas.dir=s);const a=Mf("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);a&&n.textAlign!==a&&(n.textAlign=a);const l=bu(e);n.fillText(o,e.x+e.dx,e.y+e.dy+l),r&&n.strokeText(o,e.x+e.dx,e.y+e.dy+l)}));const Ef="http://www.w3.org/2000/svg",Cf=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(Ef,"container"===e?"g":e);return t.appendChild(n),n},Tf=e=>{e.parentNode&&e.parentNode.removeChild(e)},Nf=(e,t)=>{if((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(const 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||vu(t.attrs,Du);const n=wf(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",Mf(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(Ef,"title");n.textContent=t.attrs.title,e.appendChild(n)}else e.setAttribute(n,t.attrs[n]);else{const i=+e.getAttribute(n)||0;let r=0;r="dominant-baseline"===n?bu(t.attrs):t.attrs[n],e.setAttribute("dy",r+i)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class Rf{constructor(e,t,n,i){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=i}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function Of(){return new Rf(Af,Cf,Nf,Tf)}function If(e){let t,n,i,r=0;if(0===(e=JSON.stringify(e)).length)return r;for(t=0,i=e.length;t<i;t++)n=e.charCodeAt(t),r=(r<<5)-r+n,r&=r;return r}function Lf(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ef,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Jd;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Of)();let i,r,o,s=!1,a=ef();const l={transform:void 0,disableScreenReader:!1},c=tf(),u={type:"defs",children:[]},h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:If,n={},i=Date.now();const r={onCreate(r){let o={};r.node&&"object"==typeof r.node.fill&&"pattern"===r.node.fill.type&&r.node.fill.shapes&&(o.fill=r.node.fill),r.node&&"object"==typeof r.node.stroke&&"pattern"===r.node.stroke.type&&r.node.stroke.shapes&&(o.stroke=r.node.stroke),Object.keys(o).forEach((s=>{let a="";const l=o[s],c=t(l),u="picasso-pattern-".concat(i,"-").concat(c);if("undefined"!=typeof window&&(a=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[c]=!0}r.node["".concat(s,"Reference")]="url('".concat(a,"#").concat(u,"')")}))},clear(){n={}}};return r}(u.children),d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:If,n={},i=Date.now();const r={getOrCreateGradient(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=t(r[o]),l="picasso-gradient-".concat(i,"-").concat(a);if(!n[a]){let{orientation:t,degree:i,stops:s=[]}=r[o],c={};void 0===i&&(i=90),"radial"===t?c.type="radialGradient":(c=es(i),["x1","x2","y1","y2"].forEach((e=>{e in r[o]&&(c[e]=r[o][e])})),c.type="linearGradient"),c.id=l,c.children=s.map((e=>{let{offset:t,color:n,opacity:i}=e;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==i?i:1)}})),e.push(c),n[a]=l}return"url('".concat(s,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=r.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=r.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return r}(u.children);return c.element=()=>i,c.root=()=>r,c.settings=e=>(e&&Object.keys(l).forEach((t=>{void 0!==e[t]&&(l[t]=e[t])})),l),c.appendTo=t=>(i||(i=t.ownerDocument.createElementNS(e,"svg"),i.style.position="absolute",i.style["-webkit-font-smoothing"]="antialiased",i.style["-moz-osx-font-smoothing"]="antialiased",i.style.pointerEvents="none",i.setAttribute("xmlns",e),r=t.ownerDocument.createElementNS(e,"g"),r.style.pointerEvents="auto",i.appendChild(r)),t.appendChild(i),i),c.getScene=e=>{const n=a.scaleRatio.x,i=a.scaleRatio.y,r={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*n,", ").concat(a.edgeBleed.top*i,")"):""};return 1===n&&1===i||(r.transform+="scale(".concat(n,", ").concat(i,")")),t({items:[r],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},d.onCreate,h.onCreate,yu(c.measureText),nf(c)]}})},c.render=e=>{if(!i)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:i,verticalScaling:o,horizontalMoving:s,verticalMoving:a}=t;return r.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(i,", ").concat(o,", ").concat(s,", ").concat(a,")"),!0}r.style.transform="";l.disableScreenReader&&i.setAttribute("aria-hidden",!0),s&&(i.style.left="".concat(a.computedPhysical.x,"px"),i.style.top="".concat(a.computedPhysical.y,"px"),i.setAttribute("width",a.computedPhysical.width),i.setAttribute("height",a.computedPhysical.height)),d.clear(),h.clear(),u.children.length=0;const f=c.getScene(e),p=!o||!f.equals(o),g=s||p;return g&&(c.clear(),n.render(f.children,r)),s=!1,o=f,g},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>{if(!r)return c;o=null;const e=r.cloneNode(!1);return i.replaceChild(e,r),r=e,c},c.destroy=()=>{i&&i.parentNode&&i.parentNode.removeChild(i),i=null,r=null},c.size=e=>{if(e){const t=ef(e);JSON.stringify(a)!==JSON.stringify(t)&&(s=!0,a=t)}return a},c}var Pf,jf,zf,Ff,Hf,Vf,Bf,$f={},Wf=[],Uf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Yf(e,t){for(var n in t)e[n]=t[n];return e}function Xf(e){var t=e.parentNode;t&&t.removeChild(e)}function Kf(e,t,n){var i,r,o,s={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?Pf.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return Gf(e,s,i,r,null)}function Gf(e,t,n,i,r){var o={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++zf:r};return null==r&&null!=jf.vnode&&jf.vnode(o),o}function Jf(e){return e.children}function Zf(e,t){this.props=e,this.context=t}function Qf(e,t){if(null==t)return e.__?Qf(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?Qf(e):null}function ep(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 ep(e)}}function tp(e){(!e.__d&&(e.__d=!0)&&Ff.push(e)&&!np.__r++||Hf!==jf.debounceRendering)&&((Hf=jf.debounceRendering)||Vf)(np)}function np(){var e,t,n,i,r,o,s,a;for(Ff.sort(Bf);e=Ff.shift();)e.__d&&(t=Ff.length,i=void 0,r=void 0,s=(o=(n=e).__v).__e,(a=n.__P)&&(i=[],(r=Yf({},o)).__v=o.__v+1,hp(a,o,r,n.__n,void 0!==a.ownerSVGElement,null!=o.__h?[s]:null,i,null==s?Qf(o):s,o.__h),dp(i,o),o.__e!=s&&ep(o)),Ff.length>t&&Ff.sort(Bf));np.__r=0}function ip(e,t,n,i,r,o,s,a,l,c){var u,h,d,f,p,g,m,y=i&&i.__k||Wf,v=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(f=n.__k[u]=null==(f=t[u])||"boolean"==typeof f||"function"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?Gf(null,f,null,null,f):Array.isArray(f)?Gf(Jf,{children:f},null,null,null):f.__b>0?Gf(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(d=y[u])||d&&f.key==d.key&&f.type===d.type)y[u]=void 0;else for(h=0;h<v;h++){if((d=y[h])&&f.key==d.key&&f.type===d.type){y[h]=void 0;break}d=null}hp(e,f,d=d||$f,r,o,s,a,l,c),p=f.__e,(h=f.ref)&&d.ref!=h&&(m||(m=[]),d.ref&&m.push(d.ref,null,f),m.push(h,f.__c||p,f)),null!=p?(null==g&&(g=p),"function"==typeof f.type&&f.__k===d.__k?f.__d=l=rp(f,l,e):l=op(e,f,d,y,p,l),"function"==typeof n.type&&(n.__d=l)):l&&d.__e==l&&l.parentNode!=e&&(l=Qf(d))}for(n.__e=g,u=v;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=sp(i).nextSibling),gp(y[u],y[u]));if(m)for(u=0;u<m.length;u++)pp(m[u],m[++u],m[++u])}function rp(e,t,n){for(var i,r=e.__k,o=0;r&&o<r.length;o++)(i=r[o])&&(i.__=e,t="function"==typeof i.type?rp(i,t,n):op(n,i,i,r,i.__e,t));return t}function op(e,t,n,i,r,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<i.length;l+=1)if(a==r)break e;e.insertBefore(r,o),s=o}return void 0!==s?s:r.nextSibling}function sp(e){var t,n,i;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(i=sp(n)))return i;return null}function ap(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Uf.test(t)?n:n+"px"}function lp(e,t,n,i,r){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||ap(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||ap(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?i||e.addEventListener(t,o?up:cp,o):e.removeEventListener(t,o?up:cp,o);else if("dangerouslySetInnerHTML"!==t){if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"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&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function cp(e){return this.l[e.type+!1](jf.event?jf.event(e):e)}function up(e){return this.l[e.type+!0](jf.event?jf.event(e):e)}function hp(e,t,n,i,r,o,s,a,l){var c,u,h,d,f,p,g,m,y,v,b,x,w,k,M,_=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=jf.__b)&&c(t);try{e:if("function"==typeof _){if(m=t.props,y=(c=_.contextType)&&i[c.__c],v=c?y?y.props.value:c.__:i,n.__c?g=(u=t.__c=n.__c).__=u.__E:("prototype"in _&&_.prototype.render?t.__c=u=new _(m,v):(t.__c=u=new Zf(m,v),u.constructor=_,u.render=mp),y&&y.sub(u),u.props=m,u.state||(u.state={}),u.context=v,u.__n=i,h=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=_.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=Yf({},u.__s)),Yf(u.__s,_.getDerivedStateFromProps(m,u.__s))),d=u.props,f=u.state,u.__v=t,h)null==_.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==_.getDerivedStateFromProps&&m!==d&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(m,v),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(m,u.__s,v)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=m,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<u._sb.length;b++)u.__h.push(u._sb[b]);u._sb=[],u.__h.length&&s.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(m,u.__s,v),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(d,f,p)}))}if(u.context=v,u.props=m,u.__P=e,x=jf.__r,w=0,"prototype"in _&&_.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),k=0;k<u._sb.length;k++)u.__h.push(u._sb[k]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(i=Yf(Yf({},i),u.getChildContext())),h||null==u.getSnapshotBeforeUpdate||(p=u.getSnapshotBeforeUpdate(d,f)),M=null!=c&&c.type===Jf&&null==c.key?c.props.children:c,ip(e,Array.isArray(M)?M:[M],t,n,i,r,o,s,a,l),u.base=t.__e,t.__h=null,u.__h.length&&s.push(u),g&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=fp(n.__e,t,n,i,r,o,s,l);(c=jf.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),jf.__e(e,t,n)}}function dp(e,t){jf.__c&&jf.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){jf.__e(e,t.__v)}}))}function fp(e,t,n,i,r,o,s,a){var l,c,u,h=n.props,d=t.props,f=t.type,p=0;if("svg"===f&&(r=!0),null!=o)for(;p<o.length;p++)if((l=o[p])&&"setAttribute"in l==!!f&&(f?l.localName===f:3===l.nodeType)){e=l,o[p]=null;break}if(null==e){if(null===f)return document.createTextNode(d);e=r?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,d.is&&d),o=null,a=!1}if(null===f)h===d||a&&e.data===d||(e.data=d);else{if(o=o&&Pf.call(e.childNodes),c=(h=n.props||$f).dangerouslySetInnerHTML,u=d.dangerouslySetInnerHTML,!a){if(null!=o)for(h={},p=0;p<e.attributes.length;p++)h[e.attributes[p].name]=e.attributes[p].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,i,r){var o;for(o in n)"children"===o||"key"===o||o in t||lp(e,o,null,n[o],i);for(o in t)r&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||lp(e,o,t[o],n[o],i)}(e,d,h,r,a),u)t.__k=[];else if(p=t.props.children,ip(e,Array.isArray(p)?p:[p],t,n,i,r&&"foreignObject"!==f,o,s,o?o[0]:n.__k&&Qf(n,0),a),null!=o)for(p=o.length;p--;)null!=o[p]&&Xf(o[p]);a||("value"in d&&void 0!==(p=d.value)&&(p!==e.value||"progress"===f&&!p||"option"===f&&p!==h.value)&&lp(e,"value",p,h.value,!1),"checked"in d&&void 0!==(p=d.checked)&&p!==e.checked&&lp(e,"checked",p,h.checked,!1))}return e}function pp(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){jf.__e(e,n)}}function gp(e,t,n){var i,r;if(jf.unmount&&jf.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||pp(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){jf.__e(e,t)}i.base=i.__P=null,e.__c=void 0}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&gp(i[r],t,n||"function"!=typeof e.type);n||null==e.__e||Xf(e.__e),e.__=e.__e=e.__d=void 0}function mp(e,t,n){return this.constructor(e,n)}function yp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,i,r=ef();const o={transform:void 0,disableScreenReader:!1},s=tf();return s.element=()=>n,s.root=()=>n,s.settings=e=>(e&&Object.keys(o).forEach((t=>{void 0!==e[t]&&(o[t]=e[t])})),o),s.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),s.render=e=>{if(!n)return!1;const t="function"==typeof o.transform&&o.transform();if(t){const{horizontalScaling:e,horizontalSkewing:i,verticalSkewing:r,verticalScaling:o,horizontalMoving:s,verticalMoving:a}=t;return n.style.transform="matrix(".concat(e,", ").concat(i,", ").concat(r,", ").concat(o,", ").concat(s,", ").concat(a,")"),!0}n.style.transform="";let s;return o.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(r.computedPhysical.x,"px"),n.style.top="".concat(r.computedPhysical.y,"px"),n.style.width="".concat(r.computedPhysical.width,"px"),n.style.height="".concat(r.computedPhysical.height,"px"),s=Array.isArray(e)?Kf("div",null,e):e,i=function(e,t,n){var i,r,o;jf.__&&jf.__(e,t),r=(i="function"==typeof n)?null:n&&n.__k||t.__k,o=[],hp(t,e=(!i&&n||t).__k=Kf(Jf,null,[e]),r||$f,$f,void 0!==t.ownerSVGElement,!i&&n?[n]:r?null:t.firstChild?Pf.call(t.childNodes):null,o,!i&&n?n:r?r.__e:t.firstChild,i),dp(o,e)}(s,n,i),!0},s.renderArgs=[Kf],s.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;i=null}return s},s.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,i=null},s.size=e=>(e&&(r=ef(e)),r),s}Pf=Wf.slice,jf={__e:function(e,t,n,i){for(var r,o,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),s=r.__d),s)return r.__E=r}catch(t){e=t}throw e}},zf=0,Zf.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Yf({},this.state),"function"==typeof e&&(e=e(Yf({},n),this.props)),e&&Yf(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),tp(this))},Zf.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tp(this))},Zf.prototype.render=Jf,Ff=[],Vf="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Bf=function(e,t){return e.__v.__b-t.__v.__b},np.__r=0;var vp=[function(e){e.renderer("svg",Lf)},function(e){e.renderer("canvas",ff)},function(e){e.renderer("dom",yp)}];const bp={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const xp=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=function(){let{level:e=bp.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const i={[bp.OFF]:()=>{},[bp.ERROR]:function(){return t.error(...arguments)},[bp.WARN]:function(){return t.warn(...arguments)},[bp.INFO]:function(){return t.info(...arguments)},[bp.DEBUG]:function(){return t.log(...arguments)}},r=function(e){if(e&&!(n<e)){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];(i[e]||i[bp.DEBUG])(...r)}};return{log:r,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r(bp.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r(bp.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r(bp.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r(bp.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:bp}}(t.logger),r={component:Re(n.component,"component",i),data:Re(n.data,"data",i),formatter:Re(n.formatter,"formatter",i),interaction:Re(n.interaction,"interaction",i),renderer:ka(n.renderer),scale:Re(n.scale,"scale",i),symbol:Re(n.symbol,"symbol",i),logger:i};function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:m({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},r)}return t.renderer&&t.renderer.prio&&r.renderer.default(t.renderer.prio[0]),o.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r)},o.chart=e=>wa(e,{registries:r,logger:i,style:t.style,palettes:t.palettes}),o.config=()=>t,Object.keys(r).forEach((e=>{o[e]=r[e]})),o.version=y,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","$font-weight":"normal","$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",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$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:Ma,data:Aa,formatter:ri,interaction:Ea,renderer:ka(),scale:oo,symbol:ds});function wp(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Mp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kp(Object(n),!0).forEach((function(t){wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Ph.forEach(xp.use),vp.forEach(xp.use),[].forEach(xp.use);var _p=Object.prototype.hasOwnProperty,Sp=Object.prototype.toString,qp=Object.defineProperty,Dp=Object.getOwnPropertyDescriptor,Ap=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Sp.call(e)},Ep=function(e){if(!e||"[object Object]"!==Sp.call(e))return!1;var t,n=_p.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&_p.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||_p.call(e,t)},Cp=function(e,t){qp&&"__proto__"===t.name?qp(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Tp=function(e,t){if("__proto__"===t){if(!_p.call(e,t))return;if(Dp)return Dp(e,t).value}return e[t]},Np=function e(){var t,n,i,r,o,s,a=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},l=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=Tp(a,n),a!==(r=Tp(t,n))&&(u&&r&&(Ep(r)||(o=Ap(r)))?(o?(o=!1,s=i&&Ap(i)?i:[]):s=i&&Ep(i)?i:{},Cp(a,{name:n,newValue:e(u,s,r)})):void 0!==r&&Cp(a,{name:n,newValue:r}));return a};function Rp(e,t,n,i){if(!e)return-1;const r=n.cache,o=e.origin?e.origin():null;o&&(e=o);let s=r.fields.indexOf(e),a=-1,l=-1;if(-1===s)for(let t=0;t<r.wrappedFields.length;t++)if(l=r.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),a=r.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==a){s=t;break}if(Array.isArray(i)&&i.some(((e,t)=>e!==t))){const e=i.indexOf(s);-1!==e&&(s=e)}return s-=t.qArea.qLeft,s<0||s>=t.qArea.qWidth?-1:l>=0?e=>e[s].qAttrDims.qValues[l]:a>=0?e=>e[s].qAttrExps.qValues[a]:e=>e[s]}function Op(e,t,n){let{key:i}=n;const r={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return r.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(r.value),e.field&&(r.source={key:i,field:e.field.key()}),r}function Ip(e){let{cache:t,f:n,mainCell:i,p:r,page:o,rowIdx:s,row:a,sourceKey:l,target:c,targetProp:u,columnOrder:h}=e,d=i;if(r.field&&r.field!==n){const e=Rp(r.field,o,{cache:t},h);if(-1===e)return;d=Np({qRow:s},e(a))}c[u]=Op(r,d,{key:l})}function Lp(e,t,n,i){const r=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<r.length;e++)if(void 0!==r[e].field){const s=t.raw(),a=t.key(),l="object"==typeof r[e].field?r[e].field:t.field(r[e].field),{props:c,main:u}=i.normalizeConfig(r[e],t),h=Object.keys(c),d=!!r[e].trackBy,f=typeof r[e].trackBy,p={},g=[],m=[];for(let t=0;t<s.qDataPages.length;t++){const o=Rp(l,s.qDataPages[t],{cache:n},s.qColumnOrder);if(-1!==o)for(let y=0;y<s.qDataPages[t].qMatrix.length;y++){const v=s.qDataPages[t].qArea.qTop+y,b=Np({qRow:v},o(s.qDataPages[t].qMatrix[y])),x=Op(u,b,{key:a});if(!(u.filter&&!u.filter(b))){for(let e=0;e<h.length;e++){const i=c[h[e]];let r=i.fields||[i];i.fields&&(x[h[e]]=[]);for(let o=0;o<r.length;o++)Ip({cache:n,f:l,mainCell:b,p:r[o],prop:h[e],page:s.qDataPages[t],rowIdx:v,row:s.qDataPages[t].qMatrix[y],sourceKey:a,target:i.fields?x[h[e]]:x,targetProp:i.fields?o:h[e],columnOrder:s.qColumnOrder});if(i.fields){const t=x[h[e]].map((e=>e.value)),n=x[h[e]].map((e=>e.label));x[h[e]]={value:"function"==typeof i.value?i.value(t):void 0!==i.value?i.value:t,label:"function"==typeof i.label?i.label(n):void 0!==i.label?String(i.label):String(x[h[e]].value)}}}d&&i.track({cfg:r[e],itemData:b,obj:x,target:g,tracker:p,trackType:f}),m.push(x)}}}const y=d?i.collect(g,{main:u,propsArr:h,props:c}):m;o=[...o,...y]}return o}function Pp(e){var t=0,n=e.children,i=n&&n.length;if(i)for(;--i>=0;)t+=n[i].value;else t=1;e.value=t}function jp(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Fp)):void 0===t&&(t=zp);for(var n,i,r,o,s,a=new Bp(e),l=[a];n=l.pop();)if((r=t(n.data))&&(s=(r=Array.from(r)).length))for(n.children=r,o=s-1;o>=0;--o)l.push(i=r[o]=new Bp(r[o])),i.parent=n,i.depth=n.depth+1;return a.eachBefore(Vp)}function zp(e){return e.children}function Fp(e){return Array.isArray(e)?e[1]:null}function Hp(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Vp(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Bp(e){this.data=e,this.depth=this.height=0,this.parent=null}function $p(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}Bp.prototype=jp.prototype={constructor:Bp,count:function(){return this.eachAfter(Pp)},each:function(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this},eachAfter:function(e,t){for(var n,i,r,o=this,s=[o],a=[],l=-1;o=s.pop();)if(a.push(o),n=o.children)for(i=0,r=n.length;i<r;++i)s.push(n[i]);for(;o=a.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,i,r=this,o=[r],s=-1;r=o.pop();)if(e.call(t,r,++s,this),n=r.children)for(i=n.length-1;i>=0;--i)o.push(n[i]);return this},find:function(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].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(),i=t.ancestors(),r=null;e=n.pop(),t=i.pop();for(;e===t;)r=e,e=n.pop(),t=i.pop();return r}(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},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 jp(this).eachBefore(Hp)},[Symbol.iterator]:function*(){var e,t,n,i,r=this,o=[r];do{for(e=o.reverse(),o=[];r=e.pop();)if(yield r,t=r.children)for(n=0,i=t.length;n<i;++n)o.push(t[n])}while(o.length)}};var Wp={depth:-1},Up={},Yp={};function Xp(e){return e.id}function Kp(e){return e.parentId}function Gp(){var e,t=Xp,n=Kp;function i(i){var r,o,s,a,l,c,u,h,d=Array.from(i),f=t,p=n,g=new Map;if(null!=e){const t=d.map(((t,n)=>function(e){e=`${e}`;let t=e.length;Zp(e,t-1)&&!Zp(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,i)))),n=t.map(Jp),r=new Set(t).add("");for(const e of n)r.has(e)||(r.add(e),t.push(e),n.push(Jp(e)),d.push(Yp));f=(e,n)=>t[n],p=(e,t)=>n[t]}for(s=0,r=d.length;s<r;++s)o=d[s],c=d[s]=new Bp(o),null!=(u=f(o,s,i))&&(u+="")&&(h=c.id=u,g.set(h,g.has(h)?Up:c)),null!=(u=p(o,s,i))&&(u+="")&&(c.parent=u);for(s=0;s<r;++s)if(u=(c=d[s]).parent){if(!(l=g.get(u)))throw new Error("missing: "+u);if(l===Up)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(a)throw new Error("multiple roots");a=c}if(!a)throw new Error("no root");if(null!=e){for(;a.data===Yp&&1===a.children.length;)a=a.children[0],--r;for(let e=d.length-1;e>=0&&(c=d[e]).data===Yp;--e)c.data=null}if(a.parent=Wp,a.eachBefore((function(e){e.depth=e.parent.depth+1,--r})).eachBefore(Vp),a.parent=null,r>0)throw new Error("cycle");return a}return i.id=function(e){return arguments.length?(t=$p(e),i):t},i.parentId=function(e){return arguments.length?(n=$p(e),i):n},i.path=function(t){return arguments.length?(e=$p(t),i):e},i}function Jp(e){let t=e.length;if(t<2)return"";for(;--t>1&&!Zp(e,t););return e.slice(0,t)}function Zp(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function Qp(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let i,r=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(r)){const t=[];i=n.slice(e+1).join("/");for(let e=0;e<r.length;e++){let n=Qp(i,r[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(r)){const t=new Array(r.length);i=n.slice(e+1).join("/");for(let e=0;e<r.length;e++)t[e]=Qp(i,r[e]);return t}n[e]in r&&(r=r[n[e]])}return r}function eg(e,t,n){let i=[];if(!e||!e.length)return i;if(t<=0){const t=n>=0?[e[n]]:e;i=[...i,...t]}else for(let r=0;r<e.length;r++)e[r].children&&e[r].children.length&&(i=[...i,...eg(e[r].children,t-1,n)]);return i}function tg(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const i=Math.max(0,Math.min(100,t-e));return e=>eg(e.children,i-1,n)}return!1}const ng=/^qDimensionInfo(?:\/(\d+))?/,ig=/^\/?qMeasureInfo\/(\d+)/,rg=/\/qAttrExprInfo\/(\d+)/,og=/\/qAttrDimInfo\/(\d+)/;function sg(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t))).filter((t=>t<e.qDimensionInfo.length))}function ag(e,t){let{cube:n}=t;if(!e)return-1;let i=e.origin&&e.origin()?e.origin().key():e.key(),r=!1,o=-1,s=-1,a=-1,l=-1,c=-1,u=-1,h=i;const d=n.qEffectiveInterColumnSortOrder,f=sg(n);return ng.test(h)&&(r=!0,o=+ng.exec(h)[1],h=i.replace(ng,"")),ig.test(h)&&("K"===n.qMode?c=+ig.exec(h)[1]:d&&-1!==d.indexOf(-1)?(c=+ig.exec(h)[1],u=0):u=+ig.exec(h)[1],h=h.replace(ig,"")),h&&(og.exec(h)?a=+og.exec(h)[1]:rg.exec(h)&&(s=+rg.exec(h)[1])),l=r?"S"===n.qMode?f[o]:d?d.indexOf(o):o:d&&-1!==d.indexOf(-1)?d.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:a,attrIdx:s}}function lg(e,t){let n,i,r=tg(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?i=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(i=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:r,attrFn:i,valueFn:n}}function cg(e,t,n){let{key:i}=n;const r={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return r.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(r.value),e.field&&(r.source={key:i,field:e.field.key()}),r}function ug(e){let{propsArr:t,props:n,item:i,itemData:r,ret:o,sourceKey:s}=e;for(let e=0;e<t.length;e++){const a=n[t[e]],l=a.fields||[a];let c,u;a.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const h=l[n];let d,f,p,g,m,y;if("primitive"===h.type?(p=h.value,y=String(h.value)):("function"==typeof h.value&&(d=e=>h.value(e,i)),"function"==typeof h.label&&(f=e=>h.label(e,i)),h.accessor?(g=h.accessor(i),Array.isArray(g)?(m=g.map(h.valueAccessor),h.attrAccessor&&(m=m.map(h.attrAccessor)),d&&(p=m.map(d),d=null),f&&(y=m.map(f),f=null),p=h.reduce?h.reduce(p):p,y=h.reduceLabel?h.reduceLabel(y,p):String(p)):(p=h.attrAccessor?h.attrAccessor(h.valueAccessor(g)):h.valueAccessor(g),y=p)):(p=r,y=r)),a.fields){const e=d?d(p):p;c.push(e),u.push(f&&null!=y?f(y):null!=y?y:String(e))}else{const n=d?d(p):p;o[t[e]]={value:n,label:f?f(y):null!=y?y:String(n)},h.field&&(o[t[e]].source={field:h.field.key(),key:s})}}c&&(o[t[e]]={value:"function"==typeof a.value?a.value(c,i):c,label:"function"==typeof a.label?a.label(u,i):u})}}const hg=(e,t,n)=>{const i="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",r="K"===e.qMode?"qSubNodes":"qNodes",o=Qp(i,e);return o&&o[0]?(t.tree=jp(o[0],n.children||(e=>e[r])),t.tree):null};const dg=e=>{let{propsArr:t,props:n,cube:i,cache:r,itemDepthObject:o,f:s}=e;for(let e=0;e<t.length;e++){const r=n[t[e]],a=r.fields?r.fields:[r];for(let e=0;e<a.length;e++){const t=a[e];if(t.field!==s){const e=lg(o,ag(t.field,{cube:i}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function fg(){let 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,i=arguments.length>3?arguments[3]:void 0;const r=t.raw(),o=t.key(),s="S"===r.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),i=e.fields(),r=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(i.indexOf(e)))),o=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(i.indexOf(e)))),s={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let i="__root",l=!1;for(let e=0;e<r.length;e++){var a;const t=n[r[e]],o="".concat(i,"__").concat(null!==(a=t.qElemNumber)&&void 0!==a?a:t.qElemNo);s[o]||(s[o]=Mp({__id:o,__parent:i,qValues:[]},t),l=!0),i=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];s[i].qValues.push(t)}}const l=Object.keys(s).map((e=>s[e]));return Gp().id((e=>e.__id)).parentId((e=>e.__parent))(l)}(t):hg(r,n,e);if(!s)return null;const a=s.height,l=[];for(let o=0;o<=a;o++){let s=null;if(o>0)if("S"===r.qMode){let e=sg(r)[o-1];s=n.fields[e]}else{let e=r.qEffectiveInterColumnSortOrder[o-1];o>r.qEffectiveInterColumnSortOrder.length&&(e=r.qDimensionInfo.length),s=n.fields[e]}const{props:a,main:c}=i.normalizeConfig(Mp(Mp({},e),{},{field:s?s.key():void 0}),t),u=Object.keys(a);l[o]={propsArr:u,props:a,main:c};const h=s?ag(s,{cube:r}):{fieldDepth:0};dg({propsArr:u,props:a,cube:r,cache:n,itemDepthObject:h,f:s})}const c=s.copy().descendants(),u=s.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,i=l[u[e].depth].main,r=c[e],s=r.data,a=cg(i,s,{key:o});ug({propsArr:t,props:n,item:r,itemData:s,ret:a,sourceKey:o}),u[e].data=a}return s}function pg(e,t,n,i){const r=Array.isArray(e)?e:[e];let o=[];for(let s=0;s<r.length;s++)if(void 0!==r[s].field){const a=t.raw(),l=t.key();if(!hg(a,n,e))continue;const c="object"==typeof r[s].field?r[s].field:t.field(r[s].field),{props:u,main:h}=i.normalizeConfig(r[s],t),d=Object.keys(u),f=ag(c,{cube:a}),{nodeFn:p,attrFn:g,valueFn:m}=lg({fieldDepth:0},f);dg({propsArr:d,props:u,cube:a,cache:n,itemDepthObject:f,f:c});const y=!!r[s].trackBy,v=typeof r[s].trackBy,b={},x=[],w=p(n.tree),k=[];for(let e=0;e<w.length;e++){const t=w[e],n=g?g(m(t)):m(t);if(h.filter&&!h.filter(n))continue;const o=cg(h,n,{key:l});ug({propsArr:d,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&i.track({cfg:r[s],itemData:n,obj:o,target:x,tracker:b,trackType:v}),k.push(o)}const M=y?i.collect(x,{main:h,propsArr:d,props:u}):k;o=[...o,...M]}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var gg=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
|
|
18
|
+
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
19
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,i,r,o,s,a,l,c,u,h,d=e.length,f=e.search(/[0-9\-\+#]/),p=f>0?e.substring(0,f):"",g=e.split("").reverse().join(""),m=g.search(/[0-9\-\+#]/),y=d-m,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=m>0?e.substring(b,d):"";if(n=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,r=(i=e.match(/[^\d\-\+#]/g))&&i[i.length-1]||".",o=i&&i[1]&&i[0]||",",e=e.split(r),t=+(t=t.toFixed(e[1]&&e[1].length))+"",a=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=a)&&(t=(+t).toFixed(a+1)),u=e[0].split(o),e[0]=u.join(""),(s=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-s;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(g="",y=(h=t[0]).length%l,d=h.length,b=0;b<d;b++)g+=h.charAt(b),!((b-y+1)%l)&&b<d-l&&(g+=o);t[0]=g}return t[1]=e[1]&&t[1]?r+t[1]:"","0"!==(i=t.join(""))&&""!==i||(n=!1),p+(n?"-":"")+i+x}}));function mg(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const yg={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"},vg=/%\)?$/,bg=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,xg=/^\(oct\)/i,wg=/^\(dec\)/i,kg=/^\(hex\)/i,Mg=/^\(bin\)/i,_g=/^\(rom\)/i,Sg=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,qg=/#|0/g;function Dg(e,t,n,i){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(".",i||".")}function Ag(e,t,n){let i;return bg.test(t)?e=Dg(e,Number(/\d{2}/.exec(t)[0]),t,n):xg.test(t)?e=Dg(e,8,t,n):wg.test(t)?e=Dg(e,10,t,n):kg.test(t)?e=Dg(e,16,t,n):Mg.test(t)?e=Dg(e,2,t,n):_g.test(t)&&(i="",e<0&&(i="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,i="",r=Number(String(e).slice(-3)),o=(e-r)/1e3,s=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),a=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;r>0;)for(n=0;n<s.length;n++)if(s[n]<=r){i+=a[n],r-=s[n];break}for(n=0;n<o;n++)i="M".concat(i);return t[1]!==t[1].toUpperCase()&&(i=i.toLowerCase()),i}(e,t),e=i+e):e=t+i+e.toExponential(0)),e}function Eg(e,t,n){const i=mg(e);return n?i:new RegExp(i||"",t)}function Cg(e,t,n,i){let r,o,s,a,l,c,u,h,d,f=e.pattern;var p,g;i&&(e.abbreviate=!0),p=t,(g=n)&&(g=mg(g)),p&&(p=mg(p)),d=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(g,"[#0]+)?")),s=f.match(d),s=s?s[0]:"",a=s?f.substr(0,f.indexOf(s)):f,l=s?f.substring(f.indexOf(s)+s.length):"",s||(s=f?"#":"##########"),t&&t===n&&(r=s.split(n),o=r.pop(),s=r.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(s=s.replace(Eg(c,"g"),t)),u=n,n=".",u&&(s=s.replace(Eg(u,"g"),n)),h=s.match(/#/g),h=h?h.length:0;const m=f.split(u);let y;m[1]&&(y=m[1].match(qg)),e.prefix=a||"",e.postfix=l||"",e.pattern=f,e.maxPrecision=y?y.length:2,e.percentage=vg.test(f),e.numericPattern=s||"",e.numericRegex=new RegExp("".concat(Eg(t,null,!0),"|").concat(Eg(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=h}class Tg{constructor(e,t,n,i,r){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=i||".",this.type=r||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return yg;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new Tg(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,i){return this.prepare(t,n,i),this.formatValue(e)}prepare(e,t,n){let i;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});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:""}},i=this._prepared,e=e.split(this.patternSeparator),i.positive.pattern=e[0],i.negative.pattern=e[1],i.zero.pattern=e[2],Sg.test(e[0])&&(i.positive.isFunctional=!0),e[1]?Sg.test(e[1])&&(i.negative.isFunctional=!0):i.negative=!1,e[2]?Sg.test(e[2])&&(i.zero.isFunctional=!0):i.zero=!1;const r="U"===this.type;i.positive.isFunctional||Cg(i.positive,t,n,r),i.negative&&!i.negative.isFunctional&&Cg(i.negative,t,n,r),i.zero&&!i.zero.isFunctional&&Cg(i.zero,t,n,r)}formatValue(e){let t,n,i,r,o,s,a,l,c,u=this._prepared,h="",d="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,s=u.t,u.isFunctional)e=Ag(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let i,r,o=t[0];for(a=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&a<t.length;)a++,o=t[a];a>0&&(i=t[a-1]),i&&n>0&&i>0?r=i:(n<0&&i<0||!i)&&(o<0&&o-n<=u.maxPrecision?r=o:i<=n&&!(o>0&&-n<=u.maxPrecision)&&(r=i)),r&&(h=this.abbreviations[r],e/=10**r)}if(i=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),r=e,c||"#"!==l.slice(-1)[0])if(i>=1e15||i>0&&i<=1e-14)e=i?i.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=gg(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let r=("I"===this.type?0:i%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(a=r.length;a<n;a++)r+="0";r&&(e+=o+r)}else 0===t&&(r=0)}else if(i>=10**t||i<1||i<1e-4)0===e?e="0":i<1e-4||i>=1e20?(e=(e=r.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(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(i)/Math.log(10)))),a=0;a<t;a++)l+="#";e=gg(l,e)}e=e.replace(u.numericRegex,(e=>e===s?u.groupTemp:e===o?u.decTemp:"")),r<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+d+h+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function Ng(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:i=!1,toKey:r=e=>e}=t;let o,s,a=Object.create(null),l=Object.create(null),c=0,u=0;return o=i?function(){return s=r(...arguments),o.has(s)?o.get(s):o.set(s,e(...arguments))}:t=>(s=r(t),o.has(s)?o.get(s):o.set(s,e(t))),o.set=(e,t)=>(c>=n&&(delete a[l[u]],delete l[u],c--,u++),a[e]=t,l[c]=e,c++,t),o.get=e=>a[e],o.has=e=>e in a,o.clear=()=>{a=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function Rg(e,t,n,i,r){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Tg(...t)}(r,e,t,n,i),s=Ng(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function a(e){return s(e)}return a.format=function(e,t,n,i){return s.clear(),o.format(t,e,n,i)},a.pattern=function(e){return e&&(s.clear(),o.pattern=e,o.prepare()),o.pattern},a}const Og="D",Ig="T",Lg="TS",Pg="IV",jg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],zg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Fg=["January","February","March","April","May","June","July","August","September","October","November","December"],Hg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Vg(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function Bg(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function $g(e,t){let n,i=function(e){const t=e,n=24*Bg(t),i=60*Bg(n),r=60*Bg(i),o=1e3*Bg(r);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(i),s:Math.floor(r),f:Math.round(o)}}(e),r=i.d,o=i.h,s=i.m,a=i.s,l=i.f,c=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*r),/h+/gi.test(t)||(s+=60*o),/m+/gi.test(t)||(a+=60*s),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:r,h:o,m:s,s:a,f:l,t:u}}class Wg{constructor(e,t,n){const i=e||{};if(i.qCalendarStrings||(i.qCalendarStrings={qLongDayNames:jg,qDayNames:zg,qLongMonthNames:Fg,qMonthNames:Hg}),this.localeInfo=i,this.locale_days=i.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=i.qCalendarStrings.qDayNames.slice(),this.locale_months=i.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=i.qCalendarStrings.qMonthNames.slice(),!t){t={[Ig]:i.qTimeFmt||"hh:mm:ss",[Og]:i.qDateFmt||"YYYY-MM-DD",[Lg]:i.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new Wg(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let i;e instanceof Date?i=function(e,t){let n=e.getUTCHours(),i=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),i<0&&(i=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:i,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),i=$g(e,t));const r=(o=this,s=i,{"Y+|y+":{Y:"".concat(Number("".concat(s.year).slice(-2))),YY:Vg("".concat(s.year).slice(-2),2),YYY:Vg("".concat(s.year).slice(-3),3),def:e=>Vg("".concat(s.year),e.length)},"M+":{M:s.month+1,MM:Vg("".concat(s.month+1),2),MMM:o.locale_months_abbr[s.month],def:o.locale_months[s.month]},"W+|w+":{W:s.day,WW:Vg("".concat(s.day),2),WWW:o.locale_days_abbr[s.day],def:o.locale_days[s.day]},"D+|d+":{D:s.date,def:e=>Vg("".concat(s.date),e.length)},"h+|H+":{h:s.h,def:e=>Vg("".concat(s.h),e.length)},"m+":{m:s.m,def:e=>Vg("".concat(s.m),e.length)},"s+|S+":{s:s.s,def:e=>Vg("".concat(s.s),e.length)},"f+|F+":{def(e){let t="".concat(s.f),n=e.length-t.length;if(n>0)for(let e=0;e<n;e++)t+="0";else n<0&&(t=t.slice(0,e.length));return t}},"t{1,2}|T{1,2}":{def(e){let t=s.t;return e[0].toUpperCase()===e[0]&&(t=t.toUpperCase()),t=t.slice(0,e.length),t}}});var o,s;const a=[];for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&a.push(e);const l=new RegExp(a.join("|"),"g"),c=t.replace(l,(e=>{let t,n,i;for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in r[n])if(t===e||t.toLowerCase()===e){i=r[n][t],void 0===i&&(i=r[n][t.toLowerCase()]);break}return void 0===i&&(i=r[n].def),"function"==typeof i&&(i=i(e)),i}));return c}}function Ug(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Wg(...t)}function Yg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=Ug(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),i=Ng(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function r(e){return t!==Pg?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=r(e),i(e)}return o.format=function(e,t){return i.clear(),t=r(t),n.format(t,e)},o.locale=function(r){return n=Ug(r,e,t),i=Ng(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},o}function Xg(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Yg(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",i=t&&void 0!==t.qThousandSep?t.qThousandSep:",",r=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",s=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,i=e.qNumFormat.qThou||i,r=e.qNumFormat.qDec||r,o=e.qNumFormat.qType||o,s=s&&-1===["M"].indexOf(e.qNumFormat.qType)):s=!0,(s||"U"===o)&&(n="#".concat(r,"##"),o="U"),Rg(n,i,r,o,t)}function Kg(){let e,{meta:t,id:n,key:i,localeInfo:r,fieldExtractor:o,value:s,type:a,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=s||("dimension"===a?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===a?"first":"avg",h=Xg(t,r),d="dimension"===a?"first":(e,t)=>h(t),f={id:()=>n,key:()=>i,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>a,origin:()=>l,items:()=>(e||(e=o(f)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:d,formatter:()=>h,tags:()=>t.qTags};return f}function Gg(e,t,n,i,r){return(t[e]||[]).map(((t,o)=>{const s="".concat(i?"".concat(i,"/"):"").concat(e,"/").concat(o),a={instance:Kg(Np({id:"".concat(n?"".concat(n,"/"):"").concat(s),key:s,meta:t},r))};return a.attrDims=Gg("qAttrDimInfo",t,n,s,Np({},r,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),a.attrExps=Gg("qAttrExprInfo",t,n,s,Np({},r,{value:e=>null==e?void 0:e.qNum,type:"measure"})),a.measures=Gg("qMeasureInfo",t,n,s,Np({},r,{value:e=>null==e?void 0:e.qValue,type:"measure"})),a}))}function Jg(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},r=t;if(!r)throw new Error('Missing "data" input');if(!r.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=Jg.util,s={cache:i,cube:r,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},a={key:()=>e,raw:()=>r,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const i=n.allFields;if("function"==typeof e){for(let t=0;t<i.length;t++)if(e(i[t]))return i[t];return!1}if("string"==typeof e){for(let t=0;t<i.length;t++)if(i[t].key()===e||i[t].title()===e)return i[t]}else if(e&&-1!==i.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,s),fields:()=>i.fields.slice(),extract:e=>s.extractor(e,a,i,o),hierarchy:e=>s.hierarchy(e,a,i,o),_cache:()=>i};"K"===r.qMode||"T"===r.qMode||!r.qMode&&r.qNodesOnDim?(s.extractor=pg,s.hierarchy=fg,s.pages="K"===r.qMode?r.qStackedDataPages:r.qTreeDataPages):"S"===r.qMode?(s.extractor=Lp,s.pages=r.qDataPages,s.hierarchy=fg):s.extractor=()=>[],s.fieldExtractor=e=>s.extractor({field:e},a,i,o);const l="S"===r.qMode?e=>e.qElemNumber:void 0,c="S"===r.qMode?e=>e.qNum:void 0;i.wrappedFields.push(...Gg("qDimensionInfo",r,e,"",Np({},s,{value:l,type:"dimension"}))),i.wrappedFields.push(...Gg("qMeasureInfo",r,e,"",Np({},s,{value:c,type:"measure"}))),i.fields=i.wrappedFields.map((e=>e.instance));const u=e=>{e.forEach((e=>{i.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)}))};return u(i.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=a.field(t.from),r=Kg(Mp({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>s.extractor({field:e},a,i,o),key:t.key,type:n.type(),localeInfo:s.localeInfo,value:n.value},t.override||{}));i.virtualFields.push(r)})),i.allFields.push(...i.virtualFields),a}const Zg=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Qg=/\/qDimensionInfo(?:\/(\d+))?/,em=/\/qMeasureInfo\/(\d+)/,tm=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,nm=/\/qAttrExprInfo\/(\d+)/,im=/\/?qHyperCube/,rm=/\/?qTreeData/,om=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),sm=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function am(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const i=t.byCells,r=t.primarySource,o=[],s={},a=e.isActive();let l=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,i=-1,r=-1,o="",s=e=>e;im.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),s=om):rm.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),s=sm);let a=!0;if(Qg.test(e)&&(i=+Qg.exec(e)[1]),em.test(e)&&(r=+em.exec(e)[1]),tm.test(e)){r=-1,i=0;const e=+tm.exec(n)[2];isNaN(e)||(i=e,n=n.replace(/\/\d+$/,"")),a=!1}if(nm.test(e)){const e=r;if(t){r=0;const s=Qp(o,t);r+=(s.qMeasureInfo||[]).length,i>-1?(r=s.qDimensionInfo.slice(0,i).reduce(((e,t)=>e+t.qAttrExprInfo.length),r),i=-1):(r=s.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),r),r=s.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),r)),r+=+nm.exec(n)[1]}else i>-1?(i=-1,r=+nm.exec(n)[1]):r+=+nm.exec(n)[1]+1}return Zg.forEach((e=>{let[t,i]=e;n=n.replace(t,i)})),a&&(n=s(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:r,dimensionIdx:i,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>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){const n=e.brush.ranges();n.length&&(l=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>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){const n=e.brush.ranges();n.length&&(l=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>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(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const i=n.qHyperCube,o=i.qNoOfLeftDims,a=i.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===r||!r){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||a>=o)&&o>-1?n.forEach((e=>{s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:a-o})})):n.forEach((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!==r&&(r||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!s.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&a)return[{method:"resetMadeSelections",params:[]}];var c;s.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return s.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&o.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),o}function lm(e){Jg.util=e.data("matrix").util,e.data("q",Jg),e.formatter("q-number",Rg),e.formatter("q-time",Yg)}lm.qBrushHelper=am,lm.selections=am;const cm={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function um(e){return cm[e]||e}function hm(e){return function(t,n,i){let r,o,s,a,l=[],c=!0;function u(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&(r.gestures.forEach((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));const n=um(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),s=s||new e.Manager(i),s.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(o),s.on(e,t.events[e])})),l.push(t))})),r.gestures.forEach((t=>{const n=um(t.type);e&&e[n]&&(t.recognizeWith&&s.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&s.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function h(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{s.off(t,e.events[t])})),s.remove(e.options.event)})),l=[]}return{get key(){return a},set(e){!function(e){a=e.key,r=e,o={chart:t,mediator:n,settings:r},r.gestures=r.gestures||[],void 0===r.enable&&(r.enable=!0)}(e),h(),c&&u()},off(){c=!1,h()},on(){c=!0,0===l.length&&u()},destroy(){h(),s&&s.destroy(),s=null,o=null,r=null}}}}var dm,fm={exports:{}};
|
|
20
|
+
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
21
|
+
* http://hammerjs.github.io/
|
|
22
|
+
*
|
|
23
|
+
* Copyright (c) 2016 Jorik Tangelder;
|
|
24
|
+
* Licensed under the MIT license */var pm=(dm||(dm=1,function(e){!function(t,n,i,r){var o,s=["","webkit","Moz","MS","ms","o"],a=n.createElement("div"),l=Math.round,c=Math.abs,u=Date.now;function h(e,t,n){return setTimeout(v(e,n),t)}function d(e,t,n){return!!Array.isArray(e)&&(f(e,n[t],n),!0)}function f(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==r)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function p(e,n,i){var r="DEPRECATED METHOD: "+n+"\n"+i+" AT \n";return function(){var n=new Error("get-stack-trace"),i=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,r,i),e.apply(this,arguments)}}o="function"!=typeof Object.assign?function(e){if(e===r||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==r&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:Object.assign;var g=p((function(e,t,n){for(var i=Object.keys(t),o=0;o<i.length;)(!n||n&&e[i[o]]===r)&&(e[i[o]]=t[i[o]]),o++;return e}),"extend","Use `assign`."),m=p((function(e,t){return g(e,t,!0)}),"merge","Use `assign`.");function y(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&o(i,n)}function v(e,t){return function(){return e.apply(t,arguments)}}function b(e,t){return"function"==typeof e?e.apply(t&&t[0]||r,t):e}function x(e,t){return e===r?t:e}function w(e,t,n){f(S(t),(function(t){e.addEventListener(t,n,!1)}))}function k(e,t,n){f(S(t),(function(t){e.removeEventListener(t,n,!1)}))}function M(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function _(e,t){return e.indexOf(t)>-1}function S(e){return e.trim().split(/\s+/g)}function q(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function D(e){return Array.prototype.slice.call(e,0)}function A(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var s=e[o][t];q(r,s)<0&&i.push(e[o]),r[o]=s,o++}return i=i.sort((function(e,n){return e[t]>n[t]})),i}function E(e,t){for(var n,i,o=t[0].toUpperCase()+t.slice(1),a=0;a<s.length;){if((i=(n=s[a])?n+o:t)in e)return i;a++}return r}var C=1;function T(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var N="ontouchstart"in t,R=E(t,"PointerEvent")!==r,O=N&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),I="touch",L="mouse",P=24,j=["x","y"],z=["clientX","clientY"];function F(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){b(e.options.enable,[e])&&n.handler(t)},this.init()}function H(e,t,n){var i=n.pointers.length,o=n.changedPointers.length,s=1&t&&i-o===0,a=12&t&&i-o===0;n.isFirst=!!s,n.isFinal=!!a,s&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,i=t.pointers,o=i.length;n.firstInput||(n.firstInput=V(t)),o>1&&!n.firstMultiple?n.firstMultiple=V(t):1===o&&(n.firstMultiple=!1);var s=n.firstInput,a=n.firstMultiple,l=a?a.center:s.center,h=t.center=B(i);t.timeStamp=u(),t.deltaTime=t.timeStamp-s.timeStamp,t.angle=Y(l,h),t.distance=U(l,h),function(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}(n,t),t.offsetDirection=W(t.deltaX,t.deltaY);var d=$(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=a?function(e,t){return U(t[0],t[1],z)/U(e[0],e[1],z)}(a.pointers,i):1,t.rotation=a?function(e,t){return Y(t[1],t[0],z)+Y(e[1],e[0],z)}(a.pointers,i):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,i,o,s,a=e.lastInterval||t,l=t.timeStamp-a.timeStamp;if(8!=t.eventType&&(l>25||a.velocity===r)){var u=t.deltaX-a.deltaX,h=t.deltaY-a.deltaY,d=$(l,u,h);i=d.x,o=d.y,n=c(d.x)>c(d.y)?d.x:d.y,s=W(u,h),e.lastInterval=t}else n=a.velocity,i=a.velocityX,o=a.velocityY,s=a.direction;t.velocity=n,t.velocityX=i,t.velocityY=o,t.direction=s}(n,t);var f=e.element;M(t.srcEvent.target,f)&&(f=t.srcEvent.target),t.target=f}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function V(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:u(),pointers:t,center:B(t),deltaX:e.deltaX,deltaY:e.deltaY}}function B(e){var t=e.length;if(1===t)return{x:l(e[0].clientX),y:l(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:l(n/t),y:l(i/t)}}function $(e,t,n){return{x:t/e||0,y:n/e||0}}function W(e,t){return e===t?1:c(e)>=c(t)?e<0?2:4:t<0?8:16}function U(e,t,n){n||(n=j);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function Y(e,t,n){n||(n=j);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}F.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(T(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(T(this.element),this.evWin,this.domHandler)}};var X={mousedown:1,mousemove:2,mouseup:4},K="mousedown",G="mousemove mouseup";function J(){this.evEl=K,this.evWin=G,this.pressed=!1,F.apply(this,arguments)}y(J,F,{handler:function(e){var t=X[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:L,srcEvent:e}))}});var Z={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:I,3:"pen",4:L,5:"kinect"},ee="pointerdown",te="pointermove pointerup pointercancel";function ne(){this.evEl=ee,this.evWin=te,F.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ee="MSPointerDown",te="MSPointerMove MSPointerUp MSPointerCancel"),y(ne,F,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=Z[i],o=Q[e.pointerType]||e.pointerType,s=o==I,a=q(t,e.pointerId,"pointerId");1&r&&(0===e.button||s)?a<0&&(t.push(e),a=t.length-1):12&r&&(n=!0),a<0||(t[a]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(a,1))}});var ie={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function re(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,F.apply(this,arguments)}function oe(e,t){var n=D(e.touches),i=D(e.changedTouches);return 12&t&&(n=A(n.concat(i),"identifier")),[n,i]}y(re,F,{handler:function(e){var t=ie[e.type];if(1===t&&(this.started=!0),this.started){var n=oe.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:I,srcEvent:e})}}});var se={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ae="touchstart touchmove touchend touchcancel";function le(){this.evTarget=ae,this.targetIds={},F.apply(this,arguments)}function ce(e,t){var n=D(e.touches),i=this.targetIds;if(3&t&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=D(e.changedTouches),a=[],l=this.target;if(o=n.filter((function(e){return M(e.target,l)})),1===t)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),12&t&&delete i[s[r].identifier],r++;return a.length?[A(o.concat(a),"identifier"),a]:void 0}function ue(){F.apply(this,arguments);var e=v(this.handler,this);this.touch=new le(this.manager,e),this.mouse=new J(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function he(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,de.call(this,t)):12&e&&de.call(this,t)}function de(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout((function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)}),2500)}}function fe(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),s=Math.abs(n-r.y);if(o<=25&&s<=25)return!0}return!1}y(le,F,{handler:function(e){var t=se[e.type],n=ce.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:I,srcEvent:e})}}),y(ue,F,{handler:function(e,t,n){var i=n.pointerType==I,r=n.pointerType==L;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)he.call(this,t,n);else if(r&&fe.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var pe=E(a.style,"touchAction"),ge=pe!==r,me="compute",ye="auto",ve="manipulation",be="none",xe="pan-x",we="pan-y",ke=function(){if(!ge)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){e[i]=!n||t.CSS.supports("touch-action",i)})),e}();function Me(e,t){this.manager=e,this.set(t)}Me.prototype={set:function(e){e==me&&(e=this.compute()),ge&&this.manager.element.style&&ke[e]&&(this.manager.element.style[pe]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return f(this.manager.recognizers,(function(t){b(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(_(e,be))return be;var t=_(e,xe),n=_(e,we);return t&&n?be:t||n?t?xe:we:_(e,ve)?ve:ye}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=_(i,be)&&!ke[be],o=_(i,we)&&!ke[we],s=_(i,xe)&&!ke[xe];if(r){var a=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(a&&l&&c)return}if(!s||!o)return r||o&&6&n||s&&n&P?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var _e=32;function Se(e){this.options=o({},this.defaults,e||{}),this.id=C++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function qe(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function De(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function Ae(e,t){var n=t.manager;return n?n.get(e):e}function Ee(){Se.apply(this,arguments)}function Ce(){Ee.apply(this,arguments),this.pX=null,this.pY=null}function Te(){Ee.apply(this,arguments)}function Ne(){Se.apply(this,arguments),this._timer=null,this._input=null}function Re(){Ee.apply(this,arguments)}function Oe(){Ee.apply(this,arguments)}function Ie(){Se.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Le(e,t){return(t=t||{}).recognizers=x(t.recognizers,Le.defaults.preset),new Pe(e,t)}function Pe(e,t){var n;this.options=o({},Le.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||(R?ne:O?le:N?ue:J))(n,H),this.touchAction=new Me(this,this.options.touchAction),je(this,!0),f(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 je(e,t){var n,i=e.element;i.style&&(f(e.options.cssProps,(function(r,o){n=E(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Se.prototype={defaults:{},set:function(e){return o(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(d(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Ae(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return d(e,"dropRecognizeWith",this)||(e=Ae(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(d(e,"requireFailure",this))return this;var t=this.requireFail;return-1===q(t,e=Ae(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(d(e,"dropRequireFailure",this))return this;e=Ae(e,this);var t=q(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 i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+qe(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+qe(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=_e},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=o({},e);if(!b(this.options.enable,[this,t]))return this.reset(),void(this.state=_e);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(Ee,Se,{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,i=6&t,r=this.attrTest(e);return i&&(8&n||!r)?16|t:i||r?4&n?8|t:2&t?4|t:2:_e}}),y(Ce,Ee,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(we),e&P&&t.push(xe),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,s=e.deltaY;return r&t.direction||(6&t.direction?(r=0===o?1:o<0?2:4,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===s?1:s<0?8:16,n=s!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},attrTest:function(e){return Ee.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=De(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),y(Te,Ee,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[be]},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(Ne,Se,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ye]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!i||!n||12&e.eventType&&!r)this.reset();else if(1&e.eventType)this.reset(),this._timer=h((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return _e},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=u(),this.manager.emit(this.options.event,this._input)))}}),y(Re,Ee,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[be]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),y(Oe,Ee,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Ce.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&P&&(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=De(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),y(Ie,Se,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ve]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(i&&r&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,s=!this.pCenter||U(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=h((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return _e},failTimeout:function(){return this._timer=h((function(){this.state=_e}),this.options.interval,this),_e},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Le.VERSION="2.0.7",Le.defaults={domEvents:!1,touchAction:me,enable:!0,inputTarget:null,inputClass:null,preset:[[Re,{enable:!1}],[Te,{enable:!1},["rotate"]],[Oe,{direction:6}],[Ce,{direction:6},["swipe"]],[Ie],[Ie,{event:"doubletap",taps:2},["tap"]],[Ne]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Pe.prototype={set:function(e){return o(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 i=this.recognizers,r=t.curRecognizer;(!r||r&&8&r.state)&&(r=t.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===t.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Se)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(d(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(d(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=q(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==r&&t!==r){var n=this.handlers;return f(S(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==r){var n=this.handlers;return f(S(e),(function(e){t?n[e]&&n[e].splice(q(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var i=n.createEvent("Event");i.initEvent(e,!0,!0),i.gesture=t,t.target.dispatchEvent(i)}(e,t);var i=this.handlers[e]&&this.handlers[e].slice();if(i&&i.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<i.length;)i[r](t),r++}},destroy:function(){this.element&&je(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},o(Le,{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:_e,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:P,DIRECTION_ALL:30,Manager:Pe,Input:F,TouchAction:Me,TouchInput:le,MouseInput:J,PointerEventInput:ne,TouchMouseInput:ue,SingleTouchInput:re,Recognizer:Se,AttrRecognizer:Ee,Tap:Ie,Pan:Ce,Swipe:Oe,Pinch:Te,Rotate:Re,Press:Ne,on:w,off:k,each:f,merge:m,extend:g,assign:o,inherit:y,bindFn:v,prefixed:E}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=Le,e.exports?e.exports=Le:t.Hammer=Le}(window,document)}(fm)),fm.exports),gm=t(pm);function mm(e){e.component("event-area",{mounted(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:()=>[]})}var ym={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render(e){const{settings:{label:t,rtl:n},layout:{dock:i}}=this.settings,r="top"!==i&&"bottom"!==i||!n?"ltr":"rtl",o=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width=`${t.height}px`,n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left";break;case"right":n.width=`${t.height}px`,n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left";break;case"center":n.width=`${t.width}px`,n.height=`${t.height}px`,n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(i,this.rect),s="center"===i?t:`* ${t}`,a="center"!==i?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:o,dir:r},e("span",{ref:this.alignToRef,style:a,title:s},s))}};function vm(e){const t=xp();return t.renderer.prio([e||"canvas"]),t.use(lm),t.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",hm(e))};e.interaction("hammer",hm(Hammer))}(gm)),t.use(mm),t.component("disclaimer",ym),t}const bm={version:"1.0.1",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"S",qInitialDataFetch:[{qWidth:200,qHeight:10}],qSuppressMissing:!0},color:{auto:!0,positiveValue:{paletteColor:{index:6,color:null}},negativeValue:{paletteColor:{index:-1,color:"#cc6677"}},subtotal:{paletteColor:{index:-1,color:"#c3c3c3"}}},dataPoint:{showLabels:!0},dimensionAxis:{dock:"near",label:"auto",show:"labels"},gridlines:{auto:!0,spacing:2},legend:{dock:"auto",show:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"labels",spacing:1},qDef:{qNumFormat:{},numFormatFromTemplate:!0,isCustomFormatted:!1},refLine:{refLines:[]},showTitles:!0,subtitle:"",title:"",footnote:""};function xm(e){const{translator:t}=e;return{path:"/qHyperCubeDef",dimensions:{min:0,max:0},measures:{min:1,max:50,description:()=>t.get("Visualizations.Descriptions.Bars")}}}var wm,km;var Mm,_m=function(){if(km)return wm;km=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var i,r=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!r&&!o)return!1;for(i in n);return void 0===i||e.call(n,i)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},a=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(i)return i(t,n).value}return t[n]};return wm=function e(){var t,n,i,l,c,u,h=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof h&&(p=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)i=a(h,n),h!==(l=a(t,n))&&(p&&l&&(o(l)||(c=r(l)))?(c?(c=!1,u=i&&r(i)?i:[]):u=i&&o(i)?i:{},s(h,{name:n,newValue:e(p,u,l)})):void 0!==l&&s(h,{name:n,newValue:l}));return h},wm}(),Sm=t(_m),qm={exports:{}};var Dm=(Mm||(Mm=1,function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var i,r=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(i in e);return void 0===i||t.call(e,i)},a=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(r)return r(e,n).value}return e[n]};e.exports=function e(){var t,n,i,r,c,u,h=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof h&&(p=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)i=l(h,n),h!==(r=l(t,n))&&(p&&r&&(s(r)||(c=o(r)))?(c?(c=!1,u=i&&o(i)?i:[]):u=i&&s(i)?i:{},a(h,{name:n,newValue:e(p,u,r)})):void 0!==r&&a(h,{name:n,newValue:r}));return h}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var i,r=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(i in e);return void 0===i||t.call(e,i)},a=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(r)return r(e,n).value}return e[n]};e.exports=function e(){var t,n,i,r,c,u,h=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof h&&(p=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)i=l(h,n),h!==(r=l(t,n))&&(p&&r&&(s(r)||(c=o(r)))?(c?(c=!1,u=i&&o(i)?i:[]):u=i&&s(i)?i:{},a(h,{name:n,newValue:e(p,u,r)})):void 0!==r&&a(h,{name:n,newValue:r}));return h}}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{i.r(r),i.d(r,{default:()=>Te});var e=i(229),t=i.n(e);const n=function(e,t,n){if(!t)return!1;var i,r=t.split("."),o=r[r.length-1],s=e;for(i=0;i<r.length-1;++i)void 0===s[r[i]]&&(s[r[i]]=Number.isNaN(+r[i+1])?{}:[]),s=s[r[i]];if(void 0!==n){var a=s[o];return s[o]=n,{updated:n,previous:a}}return delete s[o],!1},o=function(e,t,n){var i,r=t.split("."),o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},s={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var a="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return a+e+l}function u(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,i;for(n=0;n<t.length;n++)if((i=t[n]).qInfo.qId===e)return i;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var i=function(e,t){if(!t)return null;var n,i,r=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((i=t[n]).qName===r)return i;if(i.qDerivedFieldData)for(var o=0;o<i.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var s=i.qDerivedFieldData.qDerivedFieldLists[o],a=0;a<s.qFieldDefs.length;++a){var l=s.qFieldDefs[a];if(l.qName===r)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return i&&i.qTags.indexOf("$numeric")>-1}function h(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function p(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function g(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function m(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,i=e.dimensions,r=e.dimensionAndFieldList,o=e.funcComp,s=void 0===o?"Sum":o,a=e.valueComp,l=void 0===a?"0":a;if(!n.showExcludedValues)return"";if(i&&1===i.length){var c=v(u(i[0],r),p(0));return"".concat(s,"({1<").concat(c,">}").concat(l,")")}if(i&&2===i.length){var h=u(i[0],r),d=u(i[1],r),f=p(0),g=p(1),m=v(h,f),y=v(d,g);return"".concat(s,"({1<").concat(m,",").concat(y,">}").concat(l,")")}return"".concat(s,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function w(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const k={isFullRange:h,getNumDimensions:w,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,i=e.dimensions,r=e.dimensionAndFieldList,o=e.treatMissingAsNull,s=c(f(t));if(!n.showExcludedValues)return s;var a=b({modifier:n,dimensions:i,dimensionAndFieldList:r}),l=o?"":", 0";if(i&&1===i.length){var u=p(0);return"If(Count(".concat(u,") > 0, ").concat(s," + ").concat(a).concat(l,")")}if(i&&2===i.length){var h=p(0),d=p(1);return"If(Count(".concat(h,") * Count(").concat(d,") > 0, ").concat(s," + ").concat(a).concat(l,")")}return s},getRowNoComp:d,getNumStepComp:function(e,t){if(!h(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return d(e,t)},getAboveCompPrefix:g,getAboveCompSuffix:m,getAboveComp:function(e,t,n,i){return g(e,t)+n+m(i)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,n=e.properties,i=e.layout,r=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===r&&2===w({properties:n,layout:i})},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),i=p(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return i;var r=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(r[(n.qSortByNumeric+1)/2],")"):"",s=n.qSortByAscii?"(Text, ".concat(r[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(i,", ").concat(o,", ").concat(s,")"):n.qSortByNumeric?"(".concat(i,", ").concat(o,")"):n.qSortByAscii?"(".concat(i,", ").concat(s,")"):i},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(a);if(-1!==n){var i=t.indexOf(l);if(-1!==i)return t.substring(n+a.length,i)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,i=e.minDimensions,r=void 0===i?1:i,o=e.maxDimensions,s=void 0===o?2:o;if(!t&&!n)return!0;var a=w({properties:t,layout:n});return a>=r&&a<=s},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(a),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:p,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var i=t||e.outputExpression;if(e.base&&e.base.qDef&&(i=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var r=n.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));r&&t!==r.qDef.qLabel&&(i=r.qLibraryId||r.qDef.base.qLibraryId?"[".concat(r.qDef.qLabel,"]"):r.qDef.base.qDef);var o=function(e){var t=s.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?s.EXPRESSIONS[t.value]:""}(e);i=i.startsWith("=")?i.substr(1):i,i="".concat(o,"(").concat(i,", ").concat(e.steps,")")}return i},getDecomposition:function(e){var t="observed";return Object.values(s.EXPRESSIONS).find((function(n){var i=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return s.EXPRESSIONS[n]&&i.includes(s.EXPRESSIONS[n].toLowerCase())&&(t=n),n})),t}};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _(e){return _="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)}var S=t().bind(null,!0),q={},D=Array.isArray;function A(e){return null!=e&&!Array.isArray(e)&&"object"===_(e)}function E(e){return void 0===e}function C(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function T(e,t){var n,i=t.substring(1).split("/").slice(0,-1);return i.forEach((function(t,r){if(r!==i.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=E(e[n||t])?o:e[t],e=e[n||t]}})),e}function N(e,t){var n=!0;if(A(e)&&A(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(i){N(e[i],t[i])||(n=!1)})),n);if(D(e)&&D(t)){if(e.length!==t.length)return!1;for(var i=0,r=e.length;i<r;i+=1)if(!N(e[i],t[i]))return!1;return!0}return e===t}q.generate=function(e,t,n){n=n||"";var i=[];return Object.keys(t).forEach((function(r){var o=function(e){return e?S({},{val:e}).val:e}(t[r]),s=e[r],a="".concat(n,"/").concat(r);N(o,s)||C(t,r)||(E(s)?i.push({op:"add",path:a,value:o}):A(o)&&A(s)?i=i.concat(q.generate(s,o,a)):D(o)&&D(s)?i=i.concat(function(e,t,n){var i=[],r=e.slice(),o=-1;function s(e,t,n){if(e[n]&&E(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var i=0,r=e.length;i<r;i+=1)if(e[i]&&e[i].qInfo.qId===t)return i;return-1}if(N(t,r))return i;if(!E(t[0])&&E(t[0].qInfo))return i.push({op:"replace",path:n,value:t}),i;for(var a=r.length-1;a>=0;a-=1)-1===(o=s(t,r[a].qInfo&&r[a].qInfo.qId,a))?(i.push({op:"remove",path:"".concat(n,"/").concat(a)}),r.splice(a,1)):i=i.concat(q.generate(r[a],t[o],"".concat(n,"/").concat(a)));for(var l=0,c=t.length;l<c;l+=1)-1===(o=s(r,t[l].qInfo&&t[l].qInfo.qId))?(i.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),r.splice(l,0,t[l])):o!==l&&(i.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),r.splice(l,0,r.splice(o,1)[0]));return i}(s,o,a)):i.push({op:"replace",path:"".concat(n,"/").concat(r),value:o}))})),Object.keys(e).forEach((function(r){E(t[r])&&!C(e,r)&&i.push({op:"remove",path:"".concat(n,"/").concat(r)})})),i},q.apply=function(e,t){t.forEach((function(t){var n,i,r=T(e,t.path),o=t.path.split("/").splice(-1)[0],s=o&&Number.isNaN(+o)?r[o]:r[+o]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,s=e),"add"===t.op||"replace"===t.op)if(D(r))"-"===o&&(o=r.length),r.splice(+o,"add"===t.op?0:1,t.value);else if(D(s)&&D(t.value)){var l,c=t.value.slice();s.length=0,(l=s).push.apply(l,function(e){if(Array.isArray(e))return M(e)}(i=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return M(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)?M(e,t):void 0}}(i)||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.")}())}else if(A(s)&&A(t.value))n=s,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!C(n,e)&&delete n[e]})),S(s,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[o]=t.value}else if("move"===t.op){var u=T(e,t.from);D(r)?r.splice(+o,0,u.splice(+a,1)[0]):(r[o]=u[a],delete u[a])}else"remove"===t.op&&(D(r)?r.splice(+o,1):delete r[o])}))},q.clone=function(e){return S({},e)},q.createPatch=function(e,t,n){var i={op:e.toLowerCase(),path:n};return"move"===i.op?i.from=t:void 0!==t&&(i.value=t),i},q.updateObject=function(e,t){Object.keys(e).length?q.apply(e,q.generate(e,t)):S(e,t)};const R=q,O=function(e,n,i){if(!e)return Promise.resolve();var r=R.generate(n,i);return t()(!0,n,i),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()};var I="accumulation";function L(e,t){var n=o(e,t);if(n)for(var i=0;i<n.length;i++)if(n[i].type===I)return n[i]}function P(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var i=0;i<n.length;i++)if(n[i].type===I)return i;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:""};const z={translationKey:"properties.modifier.accumulation",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,i=e.properties,r=e.layout,s=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=s;void 0===l&&(l=k.getNumDimensions({properties:i,layout:r}));var c=o(i,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),h=k.getNumStepComp(n,l),d=k.getAboveComp(n,l,u,h),f=k.getRangeComp("RangeSum",d);if(k.needDimension({modifier:n,properties:i,layout:r})){var p=k.getDimComp(c,1),g=k.getDimComp(c,0),m=k.getAggrComp(f,p,g);f=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,valueComp:m}):m}return f},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(P(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(P(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(P(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(P(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 i=n.steps;n.steps="number"!=typeof i||Number.isNaN(i)?6:Math.abs(i)}},show:function(t){var n=L(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(P(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,i){var r=i.ext.support.modifiers;if(!Array.isArray(r)||-1===r.indexOf(I))return!1;var o=L(t,e);return o&&!o.disabled}};return n}};var F="movingAverage";function H(e,t){var n=o(e,t);if(n)for(var i=0;i<n.length;i++)if(n[i].type===F)return n[i]}function V(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var i=0;i<n.length;i++)if(n[i].type===F)return i;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var B={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const $={translationKey:"properties.modifier.movingAverage",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,i=e.modifier,r=e.properties,s=e.layout,a=e.numDimensions,l=e.dimensionAndFieldList;if(!i)return n;var c=a;void 0===c&&(c=k.getNumDimensions({properties:r,layout:s}));var u=o(r,"qHyperCubeDef.qDimensions",[]),h=i.showExcludedValues&&i.nullSuppression,d=k.getExpressionWithExcludedComp({expression:n,modifier:i,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:h}),f=k.getNumStepComp(i,c),p=k.getAboveComp(i,c,d,f);if(i.nullSuppression)t=k.getRangeComp("RangeAvg",p);else{var g=k.getRangeComp("RangeSum",p),m=function(e,t){var n=k.getRowNoComp(e,t);if(!k.isFullRange(e)){var i=e.steps,r="number"!=typeof i||Number.isNaN(i)?6:i;return"RangeMin(".concat(r,", ").concat(n,")")}return n}(i,c);t="".concat(g," / ").concat(m)}var y=t;if(k.needDimension({modifier:i,properties:r,layout:s})){var v=k.getDimComp(u,1),b=k.getDimComp(u,0),x=k.getAggrComp(y,v,b);y=i.showExcludedValues?k.getExcludedComp({modifier:i,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,B)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!k.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=H(t,e);if(n){var i=n.steps;n.steps="number"!=typeof i||Number.isNaN(i)?6:Math.abs(i)}},show:function(t){var n=H(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 k.isApplicable({properties:t.properties})}}},show:function(t,n,i){var r=i.ext.support.modifiers;if(!Array.isArray(r)||-1===r.indexOf(F))return!1;var o=H(t,e);return o&&!o.disabled}};return n}};var W="timeSeriesDecomposition";function U(e,t){var n=o(e,t);if(n)for(var i=0;i<n.length;i++)if(n[i].type===W)return n[i]}function Y(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var i=0;i<n.length;i++)if(n[i].type===W)return i;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var X={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,i=e.properties;return n?k.generateTSDExpression(n,t,i):t},extractInputExpression:k.extractInputExpression,initModifier:function(e,t){k.initModifier(e,X),""===e.decomposition&&t&&(e.decomposition=k.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(Y(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:s.OPTIONS},steps:{refFn:function(t){return"".concat(Y(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var i=U(t,e);if(i){var r=i.steps;i.steps="number"!=typeof r||Number.isNaN(r)?2:Math.abs(r),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=r:e.steps=e.steps,e})),e}))}},show:function(t){var n=U(t,e);return n&&!n.fullRange}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,i){var r=i.ext.support.modifiers;if(!Array.isArray(r)||-1===r.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}};return n}};var G="difference";function J(e,t){var n=o(e,t);if(n)for(var i=0;i<n.length;i++)if(n[i].type===G)return n[i]}function Z(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var i=0;i<n.length;i++)if(n[i].type===G)return i;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,i=e.properties,r=e.layout,s=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=s;void 0===l&&(l=k.getNumDimensions({properties:i,layout:r}));var c=o(i,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),h=k.getAboveComp(n,l,u),d="".concat(u," - ").concat(h);if(k.needDimension({modifier:n,properties:i,layout:r})){var f=k.getDimComp(c,1),p=k.getDimComp(c,0),g=k.getAggrComp(d,f,p);d=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,funcComp:"Only",valueComp:g}):g}return d},initModifier:function(e){Object.keys(Q).forEach((function(t){void 0===e[t]&&(e[t]=Q[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(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(Z(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(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,i){var r=i.ext.support.modifiers;if(!Array.isArray(r)||-1===r.indexOf(G))return!1;var o=J(t,e);return o&&!o.disabled}};return n}};var te="normalization";function ne(e,t){var n=o(e,t);if(n)for(var i=0;i<n.length;i++)if(n[i].type===te)return n[i]}function ie(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var i=0;i<n.length;i++)if(n[i].type===te)return i;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function re(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function se(e){return 2===e?"{1}":""}function ae(e,t,n){return 1===e?"{$<".concat(k.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(k.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,i=e.properties,r=e.layout,s=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=s;void 0===l&&(l=k.getNumDimensions({properties:i,layout:r}));var c=o(i,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),h=n.selectionScope,d=n.dimensionalScope;return function(e,t,n,i,r,o,s){var a=se(t),l=ae(t,n,i),c=""===a&&""===l?"":a||l,u=le(r,o),h=ce(r,o,s),d=function(e){for(var t=[],n=0;n<e;n++)t[n]=k.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(h," Aggr(").concat(c," ").concat(e,", ").concat(d,"))")}(u,h,n.field,n.value,d,l,n.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach((function(t){void 0===e[t]&&(e[t]=oe[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]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ie(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var i=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return i=function(e,t){if(1===e){var n=re(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,i),i}(n,t,e)}},field:{refFn:function(t){return"".concat(ie(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 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ie(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ie(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,i){return function(e,t,n,i){var r=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===r?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===r?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===r?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===r?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=re(t,0);t.splice(n,1)}return t}(r,o),o=function(e,t){if(0===e){var n=re(t,1);t.splice(n,1)}return t}(ne(e,i).selectionScope,o),o}(n,i,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ie(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 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,i){var r=i.ext.support.modifiers;if(!Array.isArray(r)||-1===r.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}};return n},getDisregardSelectionComp:se,getFieldSelectionComp:ae,getTotalComp:le,getSelectedDimComp:ce};var he="qDef.base",de="qDef.qDef",fe="qDef.base.qDef",pe="qLibraryId",ge="qDef.base.qLibraryId";const me={getExpression:function(e){var t=o(e,fe);return void 0!==t?t:o(e,de)},getExpressionRef:function(e){return void 0!==o(e,fe)?fe:de},getLibraryIdRef:function(e){return o(e,ge)?ge:pe},getLibraryId:function(e){return o(e,ge)||o(e,pe)},getLabelRef:function(e){return o(e,he)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,he)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",ve="qDef.base.qDef",be="qLibraryId",xe="qDef.base.qLibraryId",we="qDef.qLabel",ke="qDef.qLabelExpression",Me="qDef.base.qLabel",_e="qDef.base.qLabelExpression",Se="qDef.qAggrFunc",qe="qDef.base.qAggrFunc",De={initBase:function(e,t){(t||De.isValid(e))&&(n(e,ve,o(e,ye)),n(e,xe,o(e,be)),n(e,Me,o(e,we)),n(e,_e,o(e,ke)))},restoreBase:function(e){De.isValid(e)&&(n(e,ye,o(e,ve)),n(e,be,o(e,xe)),n(e,we,o(e,Me)),n(e,ke,o(e,_e)),o(e,Se)&&o(e,qe)&&n(e,Se,o(e,qe)),delete e.qDef.base)},isValid:function(e){var t=o(e,ve),n=o(e,xe);return void 0!==t||void 0!==n}};const Ae=De;function Ee(e){return Ee="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},Ee(e)}var Ce={accumulation:z,movingAverage:$,difference:ee,normalization:ue,timeSeriesDecomposition:K};const Te={modifiers:Ce,apply:Re,applyModifiers:Oe,cleanUpMeasure:Ie,destroy:function(e){e&&Ne[e.id]&&Ne[e.id].masterItemSubscriber&&(Ne[e.id].masterItemSubscriber&&Ne[e.id].masterItemSubscriber.unsubscribe(),delete Ne[e.id])},hasActiveModifiers:Le,getActiveModifier:Pe,initBase:Ae.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Ce[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,i=e.layout;return Array.isArray(t)&&t.some((function(e){return Ce[e]&&Ce[e].isApplicable({properties:n,layout:i})}))},measureBase:me,limitedSorting:function(e){var t=e.measures,n=e.properties,i=e.layout,r=!1,o=!1;return t.forEach((function(e){var t=Fe(e);Ye({modifiers:t,properties:n,layout:i})&&(r=!0,o=o||Ze({modifiers:t,properties:n,layout:i}))})),r&&!o},ifEnableTotalsFunction:je};var Ne={};function Re(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,i=e.properties,r=e.isSnapshot,s=void 0!==r&&r,a=e.masterItem,l=!1;Ne[n.id]=Ne[n.id]||{isFirstTime:!0};var c=Ne[n.id].isFirstTime;if(Ne[n.id].isFirstTime=!1,i&&"object"===Ee(i))return Oe({model:n,properties:i});var u=n?n.layout:void 0,h=o(u,"qSelectionInfo.qInSelections");if(s||h)return Promise.resolve(l);var d=o(u,"qHyperCube.qMeasureInfo"),f=Ne[n.id].lastReloadTime;if(Ne[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),Le({measures:d,layout:u})){var p=function(e){var t=e.measures,n=e.layout,i=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==i&&function(e){var t=e.measures,n=e.properties,i=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({measure:e,properties:n,layout:i})}))}({measures:t,layout:n})}({measures:d,layout:u,model:n,lastReloadTime:f});return p||function(e){var t=e.measures,n=e.layout,i=e.masterItem,r=e.isFirstTime;return!!Array.isArray(t)&&(r||i||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Ye({modifiers:Fe(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:d,layout:u,masterItem:a,isFirstTime:c})?n.getEffectiveProperties().then((function(e){var i=t()(!0,{},e);Ve(i);var r=Qe(i);return Xe({model:n}).then((function(t){return Ke({libraryIds:r,model:n}).then((function(r){return p&&function(e){var t=e.properties;ze(t).forEach((function(e){return function(e){var t=e.measure;if(Ue({measure:t,properties:e.properties})){var n=0,i=t.qDef.modifiers;Array.isArray(i)&&i.forEach((function(e){if("object"===Ee(e)&&!e.disabled){if(n++,"object"!==Ee(Ce[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var i=Ce[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==i&&$e(t)&&k.simplifyExpression(t.qDef.base.qDef)!==k.simplifyExpression(i)&&(t.qDef.base.qDef=i)}}))}}({measure:e,properties:t})}))}({properties:i}),Oe({model:n,oldProperties:e,properties:i,runUpdateIfChange:!0,masterItem:a,libraryItemsProps:r,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===Ee(e.base)}))}(d)?n.getEffectiveProperties().then((function(e){return function(e){var n=e.model,i=e.properties,r=Qe(i);return et({model:n,libraryIds:r}).then((function(){var e=t()(!0,{},i);return ze(i).forEach((function(e){return Ie(e)})),Je({oldProperties:e,newProperties:i,model:n})}))}({model:n,properties:e})})):Promise.resolve(l)}function Oe(e){var n=e.model,i=e.oldProperties,r=e.properties,s=e.measures,a=e.runUpdateIfChange,l=void 0!==a&&a,c=e.masterItem,u=e.libraryItemsProps,h=e.dimensionAndFieldList;void 0===i&&(i=l?t()(!0,{},r):r),Ve(r);var d=Qe(r);return et({model:n,libraryIds:d,masterItem:c}).then((function(){return function(e){var n=e.measures,i=e.properties,r=e.model,s=e.libraryItemsProps,a=e.dimensionAndFieldList;if(n||(n=ze(i)),!n.length)return Promise.resolve();if(!Le({measures:n,properties:i}))return n.forEach((function(e){return Ie(e)})),Promise.resolve();var l=s?void 0:Qe(i);return Xe({model:r,dimensionAndFieldList:a}).then((function(e){return Ke({libraryIds:l,model:r,libraryItemsProps:s}).then((function(r){n.forEach((function(n){Ye({modifiers:n.qDef.modifiers,properties:i})?(function(e){var n=e.measure,i=e.properties,r=e.libraryItemsProps,s=e.dimensionAndFieldList,a=0;Ae.isValid(n)||Ae.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach((function(e){if("object"===Ee(e)&&!e.disabled){if(a++,"object"!==Ee(Ce[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(a>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ce[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.qLibraryId;l?function(e){var n=e.measure,i=e.modifier,r=e.properties,o=e.dimensionAndFieldList,s=e.libraryItemsProps[e.libraryId],a=s.qMeasure.qDef,l=""===a?a:Ce[i.type].generateExpression({expression:a,modifier:i,properties:r,dimensionAndFieldList:o});i.outputExpression=l,n.qDef.qDef=i.outputExpression,(n.qDef.qLabel||s.qMeasure.qLabel)&&(n.qDef.qLabel=s.qMeasure.qLabel),(n.qDef.qLabelExpression||s.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=s.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&s.qMeasure.qNumFormat&&(n.qDef.qNumFormat=s.qMeasure.qNumFormat,n.qDef.isCustomFormatted=s.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=s.qMeasure.coloring,i.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:i,libraryItemsProps:r,dimensionAndFieldList:s}):function(e){var n=e.measure,i=e.modifier,r=e.properties,o=e.dimensionAndFieldList;"function"==typeof Ce[i.type].updateModifier&&Ce[i.type].updateModifier(i,r.qHyperCubeDef);var s=me.getExpression(n),a=""===s?s:Ce[i.type].generateExpression({expression:s,modifier:i,properties:r,dimensionAndFieldList:o});i.outputExpression=a,n.qDef.qDef=i.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||s,i.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:i,dimensionAndFieldList:s}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||je(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&je(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}}))}({measure:n,properties:i,libraryItemsProps:r,dimensionAndFieldList:e}),Be(n)):Ie(n)}))}))}))}({measures:s,properties:r,model:n,libraryItemsProps:u,dimensionAndFieldList:h}).then((function(){return l?Je({oldProperties:i,newProperties:r,model:n}):Promise.resolve(!1)}))}))}function Ie(e){!function(e){var t=Fe(e);return Array.isArray(t)&&t.some((function(e){return"object"===Ee(e)&&!e.disabled&&!Ce[e.type]}))}(e)?Ae.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Be(e)}function Le(e){var t=e.measures,n=e.properties,i=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ye({modifiers:Fe(e),properties:n,layout:i})}))}function Pe(e){var t=Fe(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var i=t[n];if(Ce[i.type]&&!i.disabled)return i}}function je(e){var t=Pe(e);return!t||Ce[t.type].enableTotalsFunction(e)}function ze(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Fe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function He(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function Ve(e){ze(e).forEach((function(e){return function(e){var n=Pe(e);n&&(void 0!==n.outputExpression&&He(n)!==e.qDef.qDef?delete e.qDef.base:!Ae.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)}))}function Be(e){var t=Fe(e);Array.isArray(t)&&t.forEach((function(t){"object"===Ee(t)&&(t.disabled||!Ce[t.type]&&He(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function $e(e){return e.base||e.qDef&&e.qDef.base}function We(e){var t=$e(e);return e.qLibraryId||t&&t.qLibraryId}function Ue(e){var t=e.measure,n=e.properties,i=e.layout;return!We(t)&&Ye({modifiers:Fe(t),properties:n,layout:i})}function Ye(e){var t=e.modifiers,n=e.properties,i=e.layout,r={};return Array.isArray(t)&&t.some((function(e){return!("object"!==Ee(e)||e.disabled||!Ce[e.type])&&(void 0===r[e.type]&&(r[e.type]=Ce[e.type].isApplicable({properties:n,layout:i})),r[e.type])}))}function Xe(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var i=[],r={},o=t.app.getDimensionList().then((function(e){r.dimensionList=e}));i.push(o);var s=t.app.getFieldList().then((function(e){r.fieldList=e}));return i.push(s),Promise.all(i).then((function(){return r}))}function Ke(e){var t=e.libraryIds,n=e.model,i=e.libraryItemsProps;if(i)return Promise.resolve(i);var r=t.measureLibraryIds,o=t.dimensionLibraryIds,s={},a=[];return r.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){s[e]=t}))}));a.push(t)})),o.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){s[e]=t}))}));a.push(t)})),Promise.all(a).then((function(){return s}))}function Ge(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,i=e.model,r=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Ge)!==JSON.stringify(o(n,"qHyperCubeDef.qMeasures"),Ge)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ge)!==JSON.stringify(o(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ge);return r?function(e){var t=e.model,n=e.oldProperties,i=e.newProperties,r=t.layout;return r&&!r.qHasSoftPatches&&!r.qExtendsId&&o(r,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(i):O(t,n,i)}({model:i,oldProperties:t,newProperties:n}).then((function(){return r})):Promise.resolve(r)}function Ze(e){var t=e.modifiers,n=e.properties,i=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===Ee(e)&&!e.disabled&&Ce[e.type]&&Ce[e.type].needDimension({modifier:e,properties:n,layout:i})}))}function Qe(e){var t=ze(e),n=[],i=[],r=!1;return t.forEach((function(t){var i=Fe(t);if(Ye({modifiers:i,properties:e})){var o=We(t);o&&n.push(o),r=r||Ze({modifiers:i,properties:e})}})),o(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&i.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:i}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Ne[t.id].masterItemSubscriber=Ne[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,i={},r={},s={},a={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=o(e,"qInfo.qType");return n&&a[n]&&a[n].forEach((function(n){t[n]=o(e,n)})),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(i[t]){var r=l(e);i[t].properties!==r&&(i[t].properties=r,"function"==typeof n&&i[t].enabled&&n(e)),i[t].enabled=!0}}function u(e,n){return t.app[n](e).then((function(t){i[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,a=[];return function(e){var t=e.dimensionLibraryIds;r={},e.measureLibraryIds.forEach((function(e){r[e]=!0})),s={},t.forEach((function(e){s[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(i).forEach((function(e){r[e]||s[e]||(i[e].listener.dispose(),delete i[e])})),t.app&&(Object.keys(r).forEach((function(e){r[e]&&!i[e]&&a.push(u(e,"getMeasure"))})),Object.keys(s).forEach((function(e){s[e]&&!i[e]&&a.push(u(e,"getDimension"))}))),Promise.all(a)},unsubscribe:function(){Object.keys(i).forEach((function(e){i[e].listener.dispose()})),i={}}}}({model:t,callback:function(e){return Re({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),Ne[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=r.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};return(()=>{function e(t){var n,i=t;return i>9?(n=65+i-10)>90&&(n+=6):i="".concat(i).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(i+1):String.fromCharCode(n)}function t(n){var i=e(n%62),r=Math.floor(n/62);return r>0?t(r)+i:i}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},r(e)}n.d(i,{default:()=>Ve});const o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var i=t.split("."),r=e,o=0;o<i.length;++o){var s=i[o];if(""!==s){if(void 0===r[s]||null===r[s])return n;r=r[s]}}return r},setValue:function(e,t,n){if(null!=e&&null!=t){for(var i=t.split("."),r=i[i.length-1],o=e,s=0;s<i.length-1;++s){var a=i[s];void 0!==o[a]&&null!==o[a]||(o[a]=Number.isNaN(+i[s+1])?{}:[]),o=o[a]}void 0!==n?o[r]=n:delete o[r]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(r(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function s(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return a(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)?a(e,t):void 0}}(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 a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}(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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function u(e,t,n){if(e){for(var i=0;i<e.length;i++)if(e[i][t]===n)return i;return-1}return-1}const h={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var i=0;i<t.length;i++){var r=e.indexOf(t[i]);if(n>r)return!1;n=r}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,i=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(i=n);return e.splice(i,1),i},findItemByPropertyValue:function(e,t,n){if(e){for(var i=0;i<e.length;i++)if(e[i][t]===n)return e[i];return null}return null},findIndexByPropertyValue:u};var d=n(8),f=n.n(d);const p=function(e){var t,n=e.exportFormat,i=e.qHyperCubeDef,r=n.data[0];(t=r.dimensions).push.apply(t,s(i.qDimensions));var a,l=o.getValue(i,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(a=r.excludedDimensions).push.apply(a,s(l))},g=function(e){var t,n=e.exportFormat,i=e.qHyperCubeDef,r=n.data[0];(t=r.measures).push.apply(t,l(i.qMeasures));var s,a=o.getValue(i,"qLayoutExclude.qHyperCubeDef.qMeasures");a&&(s=r.excludedMeasures).push.apply(s,l(a))},m=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,i=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),i.interColumnSortOrder=n.qInterColumnSortOrder.concat();var r=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");r&&h.isOrderedSubset(r,i.interColumnSortOrder)&&(i.interColumnSortOrder=r.concat())},y=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},v=function(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&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},b=function(e){e.forEach((function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))};function x(e,t,n){var i,r,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((r=(r=(i=JSON.stringify(a)).match(/:\{/g))?r.length:0)>2&&!s)return;a=JSON.parse(i)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=a}var w=n(909),k=n.n(w);function M(e,t){var n=k()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function _(e,t){return k()(!0,{},t,e)}function S(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var q=Math.pow(2,53)-1;function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}const E=function(e,t,n){var i="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",i),e.visualization=n.visualization},C=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},T=function(e,t,n,i){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=i},N=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},R=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},O=function(e){var t,n=e.exportFormat,i=e.maxDimensions,r=e.minDimensions,o=e.newHyperCubeDef,s=e.defaultDimension,a=n.data[0];for(t=0;t<a.dimensions.length;++t){var l=M(a.dimensions[t],s);o.qDimensions.length<i?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<a.excludedDimensions.length;++t){var c=M(a.excludedDimensions[t],s);o.qDimensions.length<r?o.qDimensions.push(c):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},I=function(e){var t,n=e.exportFormat,i=e.maxMeasures,r=e.minMeasures,o=e.newHyperCubeDef,s=e.defaultMeasure,a=n.data[0];for(t=0;t<a.measures.length;++t){var l=_(a.measures[t],s);o.qMeasures.length<i?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<a.excludedMeasures.length;++t){var c=_(a.excludedMeasures[t],s);o.qMeasures.length<r?o.qMeasures.push(c):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},L=function(e){var t=e.exportFormat,n=e.dataDefinition,i=void 0===n?{}:n,r=t.data[0],o=i.dimensions||{max:0},s=i.measures||{max:0},a=S(s.max,r.dimensions.length,q),l=S(s.min,r.dimensions.length,0);return{maxDimensions:S(o.max,a,q),minDimensions:S(o.min,l,0),maxMeasures:a,minMeasures:l}},P=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,i=t.data[0],r=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=i.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==r)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=i.interColumnSortOrder.concat());o!==r;)o<r?(h.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,h.indexRemoved(n.qInterColumnSortOrder,o))},j=function(e){var t=e.exportFormat,n=e.initialProperties,i=e.hypercubePath,r={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(r.qLayoutExclude.quarantine=k()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&i?o.setValue(r,"".concat(i,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?r[e]=t.properties[e]:r.qLayoutExclude.disabled[e]=t.properties[e]})),null===(r=k()(!0,{},n,r)).components&&(r.components=[]),r},z=function(e){var t=e.exportFormat,n=e.maxDimensions,i=e.minDimensions,r=e.maxMeasures,o=e.minMeasures,s=t.data[0];return s.dimensions.length>n&&n>0||s.measures.length>r&&r>0||s.excludedDimensions.length>0&&s.dimensions.length+s.excludedDimensions.length>i||s.excludedMeasures.length>0&&s.measures.length+s.excludedMeasures.length>o||!r&&s.measures.length>0||!n&&s.dimensions.length>0},F=function(e){var t=e.exportFormat,n=e.maxDimensions,i=e.minDimensions,r=e.maxMeasures,o=e.minMeasures,s=e.newHyperCubeDef,a=t.data[0];s.qLayoutExclude||(s.qLayoutExclude={}),s.qLayoutExclude.qHyperCubeDef||(s.qLayoutExclude.qHyperCubeDef={}),(a.dimensions.length>n&&n>0||a.excludedDimensions&&a.excludedDimensions.length&&a.dimensions.length+a.excludedDimensions.length>i)&&(s.qLayoutExclude.qHyperCubeDef.qDimensions||(s.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(a.measures.length>r&&r>0||a.excludedMeasures&&a.excludedMeasures.length&&a.measures.length+a.excludedMeasures.length>o)&&(s.qLayoutExclude.qHyperCubeDef.qMeasures||(s.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&a.measures.length&&(s.qLayoutExclude.qHyperCubeDef.qMeasures||(s.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&a.dimensions.length&&(s.qLayoutExclude.qHyperCubeDef.qDimensions||(s.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},H=function(e){var t,n=e.newProperties,i=e.dataDefinition,r=e.hypercubePath;if(i.dimensions&&"function"==typeof i.dimensions.added){var s=o.getValue(n,r||"").qHyperCubeDef,a=function(e){if(Array.isArray(e))return D(e)}(t=s.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return D(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)?D(e,t):void 0}}(t)||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.")}();s.qDimensions=[],a.forEach((function(e){s.qDimensions.push(e),i.dimensions.added(e,n)}))}},V=function(e){var t,n=e.newProperties,i=e.dataDefinition,r=e.hypercubePath;if(i.measures&&"function"==typeof i.measures.added){var s=o.getValue(n,r||"").qHyperCubeDef,a=function(e){if(Array.isArray(e))return A(e)}(t=s.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return A(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)?A(e,t):void 0}}(t)||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.")}();s.qMeasures=[],a.forEach((function(e){s.qMeasures.push(e),i.measures.added(e,n)}))}},B=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f().isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))};function $(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){o.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}const W={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,i=e.viewDataMode,r=function(){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}(),s=t.qProperty,a=o.getValue(s,n||""),l=a.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),p({exportFormat:r,qHyperCubeDef:l}),g({exportFormat:r,qHyperCubeDef:l}),m({exportFormat:r,qHyperCubeDef:l}),delete l.qLayoutExclude,y({exportFormat:r,properties:s}),n&&(r.properties.qHyperCubeDef=l,delete a.qHyperCubeDef),v({exportFormat:r,properties:s}),i||b(r.properties.qHyperCubeDef.qMeasures),Array.isArray(r.properties.filters)&&(x(r.properties,"filters","storedFilters",!0),delete r.properties.filters),r.properties.qHyperCubeDef.qContextSetExpression&&(x(r.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),r.properties.qHyperCubeDef.qContextSetExpression=""),r.properties.qHyperCubeDef.qDynamicScript&&r.properties.qHyperCubeDef.qDynamicScript.length&&(x(r.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),r.properties.qHyperCubeDef.qDynamicScript=[]),r},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,i=void 0===n?{}:n,r=e.dataDefinition,s=void 0===r?{}:r,a=e.defaultPropertyValues,l=void 0===a?{}:a,c=e.hypercubePath,u=e.extension,h=e.supportedFilters,d=void 0===h||h,f=e.isHCModifierSupported,p=void 0===f||f,g={qChildren:[]},m=j({exportFormat:t,initialProperties:i,hypercubePath:c}),y=o.getValue(i,c||"").qHyperCubeDef,v=o.getValue(m,c||"").qHyperCubeDef,b=L({exportFormat:t,dataDefinition:s}),x=b.maxDimensions,w=b.minDimensions,k=b.maxMeasures,M=b.minMeasures,_=l.defaultDimension,S=void 0===_?N():_,q=l.defaultMeasure,D=void 0===q?R():q;v.qDimensions.length=0,v.qMeasures.length=0,z({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:M})&&F({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:M,newHyperCubeDef:v}),O({exportFormat:t,maxDimensions:x,minDimensions:w,newHyperCubeDef:v,defaultDimension:S}),I({exportFormat:t,maxMeasures:k,minMeasures:M,newHyperCubeDef:v,defaultMeasure:D}),H({newProperties:m,dataDefinition:s,hypercubePath:c}),V({newProperties:m,dataDefinition:s,hypercubePath:c}),P({exportFormat:t,newHyperCubeDef:v}),C("qMaxStackedCells",y,v),C("qNoOfLeftDims",y,v),T("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),T("qMode",y,v,"S"),T("qReductionMode",y,v,"N"),T("qSortbyYValue",y,v),T("qIndentMode",y,v),T("qShowTotalsAbove",y,v),E(m,t,i),g.qProperty=m;var A=o.getValue(u||{},"support.modifiers");return B({measures:v.qMeasures,modifierTypes:A}),d&&$(g.qProperty,"storedFilters"),"S"===v.qMode&&p&&$(g.qProperty,"dynamicScript"),g}};var U={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function Y(e,t,n,i){t=t||[];var r=u(e,i,n),o=u(t,i,n);if(-1!==r&&-1===o){var s=e.splice(r,1);t.push(s[0])}return t}function X(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!U[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},moveByIdFromGroup:function(e,t,n,i,r){n=n||"qAttributeExpressions",r=r||"id";for(var o=0;o<e.length;o++){var s=e[o][n],a=t.length;if(Y(s,t,i,r),X(t,a))return t}return t},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"}},G={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return G.getNumDimensions(e)>0&&G.getNumMeasures(e)<=1},multiColor:function(e){return G.getNumMeasures(e)>1},measure:function(e){return G.getNumDimensions(e)>0},expression:function(e){return G.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return G.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return G.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return G.getNumDimensions(e)>1},multiColor:function(e){return G.getNumMeasures(e)>1},measure:function(e){return G.getNumDimensions(e)<=1},expression:function(e){return G.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return G.getNumDimensions(e)>=1},multiColor:function(e){return G.getNumMeasures(e)>1},measure:function(e){return G.getNumDimensions(e)>=1},expression:function(e){return G.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return G.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var i=h.findIndexByPropertyValue(e[t],"id",n);i>=0&&e[t].splice(i,1)}else e[t]=[]}function te(e,t){var n=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})),t.forEach((function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}))}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function ie(e){var t=e.properties,n=e.isDimension,i=e.dimensions,r=e.excludedDimensions,s=e.measures,a=e.label;te(i,r);var l=i[i.length-1];if(l){var c=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),u=o.getValue(t,"color.formatting.qNumFormat"),d=o.getValue(t,"color.formatting.isCustomFormatted");if(c){var f=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,i=e.item,r=e.isDimension,o=e.qNumFormat,s=e.isCustomFormatted;t.label=n||i.label,r?t.qDef=i.key:(t.qExpression=i.key,o&&(t.qNumFormat=o,t.isCustomFormatted=s)),t.matchMeasure=i.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:d});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,i=e.item,r=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=h.findIndexByPropertyValue(n,"qLibraryId",i.key),r&&(t.qNumFormat=r,t.isCustomFormatted=o)),void 0!==i.expression?t.qExpression=i.expression:t.qLibraryId=i.key,t.colorMapRef=i.key}({attributeExpression:f,measures:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:d})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function re(e,t,n,i){var r,o,s,a={};switch(e){case"dimension":n.qLibraryId?(a.type="dimension",a.name=n.qLibraryId,a.id=n.qLibraryId):(a.type="field",t?(a.name=n.label||n.qDef,a.id=n.qDef):(a.name=n.qDef.qFieldDefs[0],a.label=(s=n.qDef).qLabelExpression?s.qLabelExpression:s.qFieldLabels&&s.qFieldLabels[0]?s.qFieldLabels[0]:s.qFieldDefs[0]));break;case"measure":r=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(n,t),r?(a.type="measure",a.name=r,a.id=r,o=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,i),o&&(a.expression=o)):(a.type="expression",t?(a.name=n.label||n.qExpression,a.id=n.qExpression):(a.name=n.qDef.qDef,a.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return a}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function se(e,t,n,i){var r=t.type,o=e.color,s=o.mode,a=G.getItemLabel(t);switch(ne(e,a||""),r){case"field":s="byDimension",o.byDimDef={label:t.label||G.wrapFieldName(t.name),key:G.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":s="byMeasure",o.byMeasureDef={label:a,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":s="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":s="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=s}function ae(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),s=o.getValue(e,"color.byDimDef");if(s&&ne(e,s.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(s))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"color.byDimDef");i.activeDimensionIndex=Math.min(i.activeDimensionIndex,n.length-1);var r=re("dimension",!1,n[i.activeDimensionIndex]);r.activeDimensionIndex=i.activeDimensionIndex,se(e,r)}(e,t);else if(function(e){return!e||!e.key}(s)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=n[function(e,t,n){var i=o.getValue(t,"visualization"),r=n.split("."),s=Number(r[1]),a=o.getValue(t,"layers.".concat(s,".type"));return 2===e.length&&"map"===i&&"point"===a}(n,e,t)?0:n.length-1],r=K.IDMAP.COLOR_BY_ALTERNATIVE,s=h.findItemByPropertyValue(i.qAttributeDimensions,"id",r);return se(e,re("dimension",!!s,s||i)),!!s}(e,t))return;ie({properties:e,isDimension:!0,dimensions:n,excludedDimensions:r,measures:i,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var i=e.qLayoutExclude;i&&(i.changed||(i.changed={}),i.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},ce=function(e,t){var n={primary:!0};if(e){var i=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=i.dimension(e),n.byMeasure=i.measure(e),n.byMultiple=i.multiColor(e),n.byExpression=i.expression(e)}return n},ue=function(e){var t=e.canColorBy,n=e.autoColor,i=e.colorMode,r=e.dimensions;return!(t[i]&&!n&&("byDimension"!==i&&"byMeasure"!==i||!r.length))},he=function(e,t){var n,i=o.getValue(e,"color.mode"),r=o.getValue(e,"color.auto"),s=o.getValue(e,"".concat(t,"qDimensions"),[]),a=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?te(s,l):!(n={auto:r,colorMode:i,dimensions:s}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?ae(e,t):function(e){var t=e.auto,n=e.colorMode,i=e.dimensions,r=e.measures,s=e.properties,a=o.getValue(s,"visualization");return!(t||"byMeasure"!==n||!i.length||"map"!==a&&!r.length)}({auto:r,colorMode:i,dimensions:s,measures:a,properties:e})?function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),s=o.getValue(e,"color.byMeasureDef");if(s&&ne(e,s.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(s))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"color.byMeasureDef");if(i.activeMeasureIndex=Math.min(i.activeMeasureIndex,n.length-1),i.activeMeasureIndex>-1){var r=re("measure",!1,n[i.activeMeasureIndex],!0);r.activeMeasureIndex=i.activeMeasureIndex,se(e,r)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(s,i)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),r=n[n.length-1],s=K.IDMAP.COLOR_BY_ALTERNATIVE,a=h.findItemByPropertyValue(r.qAttributeExpressions,"id",s);return se(e,re("measure",!!a,a||i[0])),!!a}(e,t))return;ie({properties:e,isDimension:!1,dimensions:n,excludedDimensions:r,measures:i,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=o.getValue(e,"color.mode"),i=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),s=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&r.length<2&&o.setValue(e,"color.mode","primary"),te(i,s)}(e,t)},de=function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},fe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,i=o.getValue(n,"qHyperCubeDef.qMeasures",[]),r=o.getValue(n,"color.mode","");return!t&&"byExpression"===r&&i.length>0},pe=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},ge=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},me=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n},ye={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,i=e.viewDataMode,r=W.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:i}),o=r.data[0],s=o.dimensions.concat(o.excludedDimensions),a=o.measures.concat(o.excludedMeasures),l=K.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(s,[],"qAttributeDimensions",c),K.moveByIdFromGroup(s,[],"qAttributeExpressions",c),K.moveByIdFromGroup(a,[],"qAttributeExpressions",u),r},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,i=e.dataDefinition,r=e.defaultPropertyValues,s=e.hypercubePath,a=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=W.importProperties({exportFormat:t,initialProperties:n,dataDefinition:i,defaultPropertyValues:r,hypercubePath:s,extension:a,supportedFilters:l,isHCModifierSupported:c}),h=u.qProperty,d=o.getValue(h,"visualization"),f=o.getValue(h,"qHyperCubeDef.qDimensions",[]),p=o.getValue(h,"color.mode",""),g=o.getValue(h,"color.auto",""),m=ce(h,d),y=ue({canColorBy:m,autoColor:g,colorMode:p,dimensions:f});return m[p]?fe({shouldUpdateColorBy:y,properties:h})&&pe(h):ge(h),y&&he(h,"qHyperCubeDef."),me(h)&&le(h,"color.persistent",!0),de(f),u}};var ve=["bar","marker","line"];const be=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?$(n,"unsupportedAutoMinMax")||k()(n.measureAxis,t.measureAxis):$(n,"supportedAutoMinMax")||k()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,i=e.initialProperties,r=e.properties,o=e.measureType,s=r.qHyperCubeDef,a=r.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:i})){var l=function(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,r=n.axis;t[r]||(t[r]={axis:r,type:{line:0,marker:0,bar:0,total:0}}),ve.includes(i)&&t[r].type[i]++,t[r].type.total++}})),t}(s);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&k()(a,n.properties.measureAxes[t[0].axis])):k()(a,n.properties.measureAxes[0])}},we=function(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}}},ke={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,i=e.viewDataMode,r=e.supportedAutoMinMax,o=void 0===r||r,s=ye.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:i}),a=s.properties;return o?(x(a,"measureAxis.min","supportedAutoMinMax"),x(a,"measureAxis.max","supportedAutoMinMax")):(x(a,"measureAxis.min","unsupportedAutoMinMax"),x(a,"measureAxis.max","unsupportedAutoMinMax")),s},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,i=e.dataDefinition,r=e.defaultPropertyValues,o=e.hypercubePath,s=e.measureType,a=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=ye.importProperties({exportFormat:t,initialProperties:n,dataDefinition:i,defaultPropertyValues:r,hypercubePath:o,extension:a,supportedFilters:l,isHCModifierSupported:c}),h=u.qProperty;return be({initialProperties:n,properties:h}),xe({exportFormat:t,initialProperties:n,properties:h,measureType:s}),we(h.qHyperCubeDef),h.qHyperCubeDef.qColumnOrder=[],h.qHyperCubeDef.columnOrder=[],u}};function Me(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function _e(e){var t=e.properties,n=e.arrayPath,i=e.quarantineName,r=e.arrayName,s=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,i=e.arrayName,r=e.item,s=e.itemPath,a=o.getValue(r,s);if(void 0!==a){var l=o.getValue(r,"qDef.cId");l||(l=o.generateId(),o.setValue(r,"qDef.cId",l));var c=Me(n,i,l);o.setValue(t,c,a),o.setValue(r,s,void 0)}}({properties:t,quarantineName:i,arrayName:r,item:e,itemPath:s})}))}function Se(e){var t=e.properties,n=e.arrayPath,i=e.quarantineName,r=e.arrayName,s=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,i=e.arrayName,r=e.item,s=e.itemPath,a=o.getValue(r,"qDef.cId");if(a){var l=Me(n,i,a),c=o.getValue(t,l);void 0!==c&&(o.setValue(r,s,c),o.setValue(t,l,void 0))}}({properties:t,quarantineName:i,arrayName:r,item:e,itemPath:s})}))}var qe="qHyperCubeDef.qMeasures",De="conditionalColoring",Ae="measures",Ee="qDef.conditionalColoring";const Ce={quarantine:function(e){_e({properties:e,arrayPath:qe,quarantineName:De,arrayName:Ae,itemPath:Ee})},unquarantine:function(e){Se({properties:e,arrayPath:qe,itemPath:Ee,arrayName:Ae,quarantineName:De})}};var Te="qHyperCubeDef.qMeasures",Ne="measures",Re="qHyperCubeDef.qDimensions",Oe="dimensions",Ie="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Le="alternativeMeasures",Pe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",je="alternativeDimensions",ze="qCalcCondition",Fe="conditionalShowHide";const He={quarantine:function(e){_e({properties:e,arrayPath:Te,quarantineName:Fe,arrayName:Ne,itemPath:ze}),_e({properties:e,arrayPath:Re,quarantineName:Fe,arrayName:Oe,itemPath:ze})},unquarantine:function(e){Se({properties:e,arrayPath:Te,quarantineName:Fe,arrayName:Ne,itemPath:ze}),Se({properties:e,arrayPath:Re,quarantineName:Fe,arrayName:Oe,itemPath:ze})},quarantineAlternative:function(e){_e({properties:e,arrayPath:Ie,quarantineName:Fe,arrayName:Le,itemPath:ze}),_e({properties:e,arrayPath:Pe,quarantineName:Fe,arrayName:je,itemPath:ze})},unquarantineAlternative:function(e){Se({properties:e,arrayPath:Ie,quarantineName:Fe,arrayName:Le,itemPath:ze}),Se({properties:e,arrayPath:Pe,quarantineName:Fe,arrayName:je,itemPath:ze})}},Ve={hypercube:W,colorChart:ye,axisChart:ke,quarantineProperty:x,unquarantineProperty:$,quarantineArrayProp:_e,unquarantineArrayProp:Se,conditionalColoring:Ce,conditionalShow:He}})(),i.default})()}(qm)),qm.exports),Am=t(Dm);function Em({dataDefinition:e,defaultPropertyValues:t,exportFormat:n,initialProperties:i}){const r=Am.hypercube.importProperties({exportFormat:n,initialProperties:i,dataDefinition:e,defaultPropertyValues:t}),o=r.qProperty;return"all"===o.dimensionAxis.show?o.dimensionAxis.show="labels":"title"===o.dimensionAxis.show&&(o.dimensionAxis.show="none"),"all"===o.measureAxis.show?o.measureAxis.show="labels":"title"===o.measureAxis.show&&(o.measureAxis.show="none"),o.qHyperCubeDef.qMeasures.length>0&&(o.qDef.numFormatFromTemplate=o.qHyperCubeDef.qMeasures[0].qDef.numFormatFromTemplate,o.qDef.qNumFormat=o.qHyperCubeDef.qMeasures[0].qDef.qNumFormat,o.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.numFormatFromTemplate=o.qDef.numFormatFromTemplate,e.qDef.qNumFormat=Sm(!0,{},o.qDef.qNumFormat)}))),o.qHyperCubeDef.qSuppressZero=!1,r}function Cm({propertyTree:e,viewDataMode:t}){return Am.hypercube.exportProperties({propertyTree:e,viewDataMode:t})}var Tm=e=>{const t=xm(e);return{properties:bm,data:{targets:[t]},importProperties:({exportFormat:e,initialProperties:n})=>Em({dataDefinition:t,exportFormat:e,initialProperties:n}),exportProperties:Cm}};function Nm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function Rm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||Im(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 Om(e){return function(e){if(Array.isArray(e))return Nm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Im(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 Im(e,t){if(e){if("string"==typeof e)return Nm(e,t);var n={}.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)?Nm(e,t):void 0}}var Lm=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],Pm=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var jm=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function zm(e){var t=e.theme,n=e.translator,i=e.defaultValue,r=e.flags,o=[],s=t.getStyle("","","fontFamilies");return Array.isArray(s)&&s.length?o.push.apply(o,Om(new Set([i].concat(Om(s.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):o.push(i),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(Om(o.map((function(e){return jm(e)}))),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],Om(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?Pm:Lm}(r).map((function(e){return jm(e)}))))}function Fm(e){var t=e.theme,n=e.translator,i=e.id,r=e.path,o=e.flags,s=function(){return t.getStyle(i,r,"fontFamily")};return{getDefaultValue:function(){return s()},getOptions:function(){return zm({theme:t,translator:n,defaultValue:s(),flags:o})}}}var Hm,Vm,Bm=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],$m=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function Wm(e){var t=e.theme,n=e.translator,i=e.id,r=e.path,o=function(){return t.getStyle(i,r,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,i=[],r=e.theme.getStyle("","","fontSizes");return Array.isArray(r)&&r.length?i.push.apply(i,Om(new Set([n].concat(Om(r))))):i.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(Om(i.map((function(e){return $m(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],Om(Bm.map((function(e){return $m(e)}))))}({theme:t,translator:n,defaultValue:o()})}}}function Um(e){var t=e.theme,n=e.translator,i=e.id,r=e.path;return{fontFamily:Fm({theme:t,translator:n,id:i,path:r,flags:e.flags}),fontSize:Wm({theme:t,translator:n,id:i,path:r})}}function Ym(e){var t=e.theme,n=e.translator,i=e.config,r=void 0===i?{}:i,o=e.flags,s=function(e){var t=e.config,n=void 0===t?{}:t,i=n.id,r=n.paths;return{id:void 0===i?"object":"".concat("object",".").concat(i),paths:Array.isArray(r)?r:[]}}({config:r}),a=s.id,l=s.paths,c={};l.forEach((function(e){for(var i=e.split("."),r=c,s=0;s<i.length;s++){var l=i[s];s===i.length-1?r[l]=Um({theme:t,translator:n,id:a,path:e,flags:o}):void 0===r[l]&&(r[l]={}),r=r[l]}}));var u=function(e){for(var t=e.split("."),n=c,i=0;i<t.length;i++){var r=t[i];if(void 0===n[r])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[r]}return n};return c.getDefaultValue=function(e){return u(e).getDefaultValue()},c.getOptions=function(e){return u(e).getOptions()},c}var Xm,Km=function(){if(Vm)return Hm;Vm=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var i,r=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!r&&!o)return!1;for(i in n);return void 0===i||e.call(n,i)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},a=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(i)return i(t,n).value}return t[n]};return Hm=function e(){var t,n,i,l,c,u,h=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof h&&(p=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)i=a(h,n),h!==(l=a(t,n))&&(p&&l&&(o(l)||(c=r(l)))?(c?(c=!1,u=i&&r(i)?i:[]):u=i&&o(i)?i:{},s(h,{name:n,newValue:e(p,u,l)})):void 0!==l&&s(h,{name:n,newValue:l}));return h},Hm}();function Gm(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Jm(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Zm(){}(Xm=Km)&&Xm.__esModule&&Object.prototype.hasOwnProperty.call(Xm,"default")&&Xm.default;var Qm=1/.7,ey="\\s*([+-]?\\d+)\\s*",ty="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ny="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iy=/^#([0-9a-f]{3,8})$/,ry=new RegExp(`^rgb\\(${ey},${ey},${ey}\\)$`),oy=new RegExp(`^rgb\\(${ny},${ny},${ny}\\)$`),sy=new RegExp(`^rgba\\(${ey},${ey},${ey},${ty}\\)$`),ay=new RegExp(`^rgba\\(${ny},${ny},${ny},${ty}\\)$`),ly=new RegExp(`^hsl\\(${ty},${ny},${ny}\\)$`),cy=new RegExp(`^hsla\\(${ty},${ny},${ny},${ty}\\)$`),uy={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 hy(){return this.rgb().formatHex()}function dy(){return this.rgb().formatRgb()}function fy(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=iy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?py(t):3===n?new vy(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?gy(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?gy(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=ry.exec(e))?new vy(t[1],t[2],t[3],1):(t=oy.exec(e))?new vy(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=sy.exec(e))?gy(t[1],t[2],t[3],t[4]):(t=ay.exec(e))?gy(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ly.exec(e))?_y(t[1],t[2]/100,t[3]/100,1):(t=cy.exec(e))?_y(t[1],t[2]/100,t[3]/100,t[4]):uy.hasOwnProperty(e)?py(uy[e]):"transparent"===e?new vy(NaN,NaN,NaN,0):null}function py(e){return new vy(e>>16&255,e>>8&255,255&e,1)}function gy(e,t,n,i){return i<=0&&(e=t=n=NaN),new vy(e,t,n,i)}function my(e){return e instanceof Zm||(e=fy(e)),e?new vy((e=e.rgb()).r,e.g,e.b,e.opacity):new vy}function yy(e,t,n,i){return 1===arguments.length?my(e):new vy(e,t,n,null==i?1:i)}function vy(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function by(){return`#${My(this.r)}${My(this.g)}${My(this.b)}`}function xy(){const e=wy(this.opacity);return`${1===e?"rgb(":"rgba("}${ky(this.r)}, ${ky(this.g)}, ${ky(this.b)}${1===e?")":`, ${e})`}`}function wy(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ky(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function My(e){return((e=ky(e))<16?"0":"")+e.toString(16)}function _y(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new qy(e,t,n,i)}function Sy(e){if(e instanceof qy)return new qy(e.h,e.s,e.l,e.opacity);if(e instanceof Zm||(e=fy(e)),!e)return new qy;if(e instanceof qy)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=t===o?(n-i)/a+6*(n<i):n===o?(i-t)/a+2:(t-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new qy(s,a,l,e.opacity)}function qy(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function Dy(e){return(e=(e||0)%360)<0?e+360:e}function Ay(e){return Math.max(0,Math.min(1,e||0))}function Ey(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Gm(Zm,fy,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hy,formatHex:hy,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Sy(this).formatHsl()},formatRgb:dy,toString:dy}),Gm(vy,yy,Jm(Zm,{brighter(e){return e=null==e?Qm:Math.pow(Qm,e),new vy(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new vy(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vy(ky(this.r),ky(this.g),ky(this.b),wy(this.opacity))},displayable(){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:by,formatHex:by,formatHex8:function(){return`#${My(this.r)}${My(this.g)}${My(this.b)}${My(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:xy,toString:xy})),Gm(qy,(function(e,t,n,i){return 1===arguments.length?Sy(e):new qy(e,t,n,null==i?1:i)}),Jm(Zm,{brighter(e){return e=null==e?Qm:Math.pow(Qm,e),new qy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new qy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new vy(Ey(e>=240?e-240:e+120,r,i),Ey(e,r,i),Ey(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new qy(Dy(this.h),Ay(this.s),Ay(this.l),wy(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=wy(this.opacity);return`${1===e?"hsl(":"hsla("}${Dy(this.h)}, ${100*Ay(this.s)}%, ${100*Ay(this.l)}%${1===e?")":`, ${e})`}`}}));const Cy=Math.PI/180,Ty=180/Math.PI,Ny=4/29,Ry=6/29,Oy=3*Ry*Ry;function Iy(e){if(e instanceof Ly)return new Ly(e.l,e.a,e.b,e.opacity);if(e instanceof Hy)return Vy(e);e instanceof vy||(e=my(e));var t,n,i=Fy(e.r),r=Fy(e.g),o=Fy(e.b),s=Py((.2225045*i+.7168786*r+.0606169*o)/1);return i===r&&r===o?t=n=s:(t=Py((.4360747*i+.3850649*r+.1430804*o)/.96422),n=Py((.0139322*i+.0971045*r+.7141733*o)/.82521)),new Ly(116*s-16,500*(t-s),200*(s-n),e.opacity)}function Ly(e,t,n,i){this.l=+e,this.a=+t,this.b=+n,this.opacity=+i}function Py(e){return e>.008856451679035631?Math.pow(e,1/3):e/Oy+Ny}function jy(e){return e>Ry?e*e*e:Oy*(e-Ny)}function zy(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Fy(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Hy(e,t,n,i){this.h=+e,this.c=+t,this.l=+n,this.opacity=+i}function Vy(e){if(isNaN(e.h))return new Ly(e.l,0,0,e.opacity);var t=e.h*Cy;return new Ly(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Gm(Ly,(function(e,t,n,i){return 1===arguments.length?Iy(e):new Ly(e,t,n,null==i?1:i)}),Jm(Zm,{brighter(e){return new Ly(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Ly(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){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 vy(zy(3.1338561*(t=.96422*jy(t))-1.6168667*(e=1*jy(e))-.4906146*(n=.82521*jy(n))),zy(-.9787684*t+1.9161415*e+.033454*n),zy(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Gm(Hy,(function(e,t,n,i){return 1===arguments.length?function(e){if(e instanceof Hy)return new Hy(e.h,e.c,e.l,e.opacity);if(e instanceof Ly||(e=Iy(e)),0===e.a&&0===e.b)return new Hy(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ty;return new Hy(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Hy(e,t,n,null==i?1:i)}),Jm(Zm,{brighter(e){return new Hy(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Hy(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Vy(this).rgb()}}));var By=e=>()=>e;function $y(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):By(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1==(e=+e)?$y: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(i){return Math.pow(e+i*t,n)}}(t,n,e):By(isNaN(t)?n:t)}}(t);function i(e,t){var i=n((e=yy(e)).r,(t=yy(t)).r),r=n(e.g,t.g),o=n(e.b,t.b),s=$y(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=r(t),e.b=o(t),e.opacity=s(t),e+""}}return i.gamma=e,i}(1);var Wy="center",Uy="bottom";function Yy(e,t,n){if(void 0===e||void 0===t)return n;for(var i=t.split("."),r=e,o=0;o<i.length;++o){var s=i[o];if(void 0===r[s])return n;r=r[s]}return r}[{key:"NoDataExist",alignment:Wy,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Wy,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Wy,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Wy},{key:"DataRangeIncludingZero",alignment:Uy},{key:"LimitedData",alignment:Uy},{key:"NegativeOrZeroValues",alignment:Uy}].reduce((function(e,t){return e[t.key]=t,e}),{});var Xy,Ky=["__proto__","constructor"];function Gy(e,t,n){if(void 0!==e&&void 0!==t){var i=t.split("."),r=i[i.length-1];if(!Ky.some((function(e){return i.includes(e)}))){for(var o=e,s=0;s<i.length-1;++s){var a=i[s];void 0===o[a]&&(o[a]=Number.isNaN(+i[s+1])?{}:[]),o=o[a]}void 0!==n?o[r]=n:delete o[r]}}}function Jy(e){var t=0,n=e.children,i=n&&n.length;if(i)for(;--i>=0;)t+=n[i].value;else t=1;e.value=t}function Zy(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=ev)):void 0===t&&(t=Qy);for(var n,i,r,o,s,a=new iv(e),l=[a];n=l.pop();)if((r=t(n.data))&&(s=(r=Array.from(r)).length))for(n.children=r,o=s-1;o>=0;--o)l.push(i=r[o]=new iv(r[o])),i.parent=n,i.depth=n.depth+1;return a.eachBefore(nv)}function Qy(e){return e.children}function ev(e){return Array.isArray(e)?e[1]:null}function tv(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function nv(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function iv(e){this.data=e,this.depth=this.height=0,this.parent=null}iv.prototype=Zy.prototype={constructor:iv,count:function(){return this.eachAfter(Jy)},each:function(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this},eachAfter:function(e,t){for(var n,i,r,o=this,s=[o],a=[],l=-1;o=s.pop();)if(a.push(o),n=o.children)for(i=0,r=n.length;i<r;++i)s.push(n[i]);for(;o=a.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,i,r=this,o=[r],s=-1;r=o.pop();)if(e.call(t,r,++s,this),n=r.children)for(i=n.length-1;i>=0;--i)o.push(n[i]);return this},find:function(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].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(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},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 Zy(this).eachBefore(tv)},[Symbol.iterator]:function*(){var e,t,n,i,r=this,o=[r];do{for(e=o.reverse(),o=[];r=e.pop();)if(yield r,t=r.children)for(n=0,i=t.length;n<i;++n)o.push(t[n])}while(o.length)}},Xy=function(e){
|
|
25
|
+
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
26
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,i,r,o,s,a,l,c,u,h,d=e.length,f=e.search(/[0-9\-\+#]/),p=f>0?e.substring(0,f):"",g=e.split("").reverse().join(""),m=g.search(/[0-9\-\+#]/),y=d-m,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=m>0?e.substring(b,d):"";if(n=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,r=(i=e.match(/[^\d\-\+#]/g))&&i[i.length-1]||".",o=i&&i[1]&&i[0]||",",e=e.split(r),t=+(t=t.toFixed(e[1]&&e[1].length))+"",a=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=a)&&(t=(+t).toFixed(a+1)),u=e[0].split(o),e[0]=u.join(""),(s=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-s;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(g="",y=(h=t[0]).length%l,d=h.length,b=0;b<d;b++)g+=h.charAt(b),!((b-y+1)%l)&&b<d-l&&(g+=o);t[0]=g}return t[1]=e[1]&&t[1]?r+t[1]:"","0"!==(i=t.join(""))&&""!==i||(n=!1),p+(n?"-":"")+i+x}},Xy({exports:{}});var rv="'Source Sans Pro', 'Arial', 'sans-serif'",ov="#333333",sv="#595959",av="#737373",lv="#cccccc",cv="#e6e6e6";function uv(e){var t={};return[].concat(Om(e),Om([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",sv],["object","axis.label.name","fontFamily",rv],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",lv],["object","axis.line.minor","color",cv],["object","axis.title","color"],["object","axis.title","fontFamily",rv],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",cv],["object","grid.line.major","color",lv],["object","grid.line.minor","color",cv],["object","label.value","color",sv],["object","label.value","fontFamily",rv],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",sv],[!1,"label.value","lightColor",cv],["object","outOfRange","color","#999"],["object","legend.title","color",ov],["object","legend.title","fontFamily",rv],["object","legend.title","fontSize","15px"],["object","legend.label","color",sv],["object","legend.label","fontFamily",rv],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",ov],["object","referenceLine.label.name","fontFamily",rv],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",cv],["object","referenceLine.outOfBounds","fontFamily",rv],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",av,function(e){return"transparent"===e?av:e}]])).reduce((function(e,n){var i="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[i]||(t[i]=!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)}))}var hv=function(e){return e};function dv(e){var t=e.theme,n=e.id,i=e.transform,r=e.extend,o=e.matrix,s={},a=i.reduce((function(e,t){var n=Rm(t,2),i=n[0],r=n[1];return e[i]=r,e}),{});return o.forEach((function(e){var i=Rm(e,5),r=i[0],o=i[1],l=i[2],c=i[3],u=i[4],h=void 0===u?function(e){return e}:u,d=function(e){var t=e.theme,n=e.base,i=e.path,r=e.attribute,o=e.defaultValue,s=void 0===o?void 0:o;if(!t||!1===n)return s;var a=t.getStyle(n,i,r);return void 0===a?s:a}({theme:t,base:"object"===r&&n?"".concat("object",".").concat(n):r,path:o,attribute:l,defaultValue:c}),f=(a["".concat(o,".").concat(l)]||hv)(h(d));Gy(s,[o,l].filter(Boolean).join("."),f)})),r.forEach((function(e){var t=Rm(e,2),n=t[0],i=t[1];Gy(s,n,i)})),s}const fv=(e,t)=>(t.components||[]).find((t=>t.key===e)),pv=(e,t,n)=>{var i,r,o,s;const a=null===(i=fv("axis",n))||void 0===i?void 0:i.axis;return{labels:{fontFamily:(null==a||null===(r=a.label)||void 0===r||null===(r=r.name)||void 0===r?void 0:r.fontFamily)||t.getStyle(e,"axis.label.name","fontFamily"),fontSize:(null==a||null===(o=a.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontSize)||t.getStyle(e,"axis.label.name","fontSize"),fill:(null==a||null===(s=a.label)||void 0===s||null===(s=s.name)||void 0===s||null===(s=s.fontColor)||void 0===s?void 0:s.color)||t.getStyle(e,"axis.label.name","color")}}},gv="object.waterfallChart";function mv(e,t,n,i,r){const o=e.color||e.qDef.color;if(!o||o.auto||!o[n]){return{index:r,color:t.getStyle(gv,`shape.${n}`,"fill")||i}}return o[n].paletteColor}const yv={valueTypes:{NORMAL:"NORMAL",INVERSE:"INVERSE",SUBTOTAL:"SUBTOTAL"},chartID:gv,getColorForPositiveValue:function(e,t){return t.getColorPickerColor(mv(e,t,"positiveValue",null,6))},getColorForNegativeValue:function(e,t){return t.getColorPickerColor(mv(e,t,"negativeValue","#cc6677",-1))},getColorForSubtotal:function(e,t){return t.getColorPickerColor(mv(e,t,"subtotal","#c3c3c3",-1))}};Object.freeze(yv.valueTypes),Object.freeze(yv);const vv=(e,t)=>{const n={axisLabelSection:{translation:"properties.axis.label",component:"panel-section",items:t.getOptions("axis","axis.label.name")},valueLabelSection:{translation:"properties.value.label",component:"panel-section",items:t.getOptions("value","label.value")}};return null!=e&&e.isEnabled("CLIENT_IM_3051")&&(n.legendLabelSection={translation:"properties.legend.label",component:"panel-section",items:t.getOptions("legend","legend.label")}),Object.keys(n).length>0?n:void 0},bv=(e,t,n)=>({component:"styling-panel",chartTitle:"Object.WaterfallChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e,items:vv(n,t)});function xv(e){return!e.color.auto}function wv(e){const{flags:t,translator:n}=e,i=e.flags.isEnabled("SENSECLIENT_IM_2020_STYLINGPANEL_WATERFALLCHART"),r=e.flags.isEnabled("SENSECLIENT_IM_2020_WATERFALLCHART_BG"),o={uses:"data",addTranslation:"Properties.AddData",items:{measures:{disabledRef:"",items:{numberFormatting:{show:!1},valueType:{type:"string",component:"dropdown",ref:"qDef.valueType",translation:"properties.waterfall.measureOperation",options:[{value:yv.valueTypes.NORMAL,translation:"properties.waterfall.measureOperation.add"},{value:yv.valueTypes.INVERSE,translation:"properties.waterfall.measureOperation.subtract"},{value:yv.valueTypes.SUBTOTAL,translation:"properties.waterfall.measureOperation.subtotal"}],defaultValue:yv.valueTypes.NORMAL},subTotal:{ref:"qDef.subtotal.enable",type:"boolean",defaultValue:!1,translation:"properties.waterfall.measureOperation.subtotal",show:e=>e.qDef.valueType!==yv.valueTypes.SUBTOTAL},subTotalLabel:{translation:"properties.waterfall.subtotalLabel",component:"string",expression:"optional",ref:"qDef.subtotal.label",defaultValue:()=>n.get("properties.waterfall.measureOperation.subtotal"),show:e=>e.qDef.valueType!==yv.valueTypes.SUBTOTAL&&e.qDef.subtotal&&e.qDef.subtotal.enable}}}}},s=e.theme,a=((e,t,n,i,r)=>i({theme:e,translator:t,flags:r,config:{id:n,paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}}))(s,n,yv.chartID,Ym,t),l=((e,t,n)=>{const i={getOptions:(i,r)=>{const o=(e,t)=>({ref:`${r}.fontColor`,component:"color-picker",width:!1,defaultValue:()=>{const n=e.getStyle(t,`${r}.color`,"color");return{color:n,index:e.getDataColorPickerPalettes()[0].colors.indexOf(n)}}});return{labelSection:{component:"items",ref:"components",key:i,items:{fontFamily:{ref:`${r}.fontFamily`,component:"dropdown",options:()=>e.getOptions(`${r}.fontFamily`),defaultValue:()=>e.getDefaultValue(`${r}.fontFamily`)},...((t,n)=>({fontWrapper:{component:"inline-wrapper",items:{fontSize:{ref:`${r}.fontSize`,component:"dropdown",width:!0,options:()=>e.getOptions(`${r}.fontSize`),defaultValue:()=>e.getDefaultValue(`${r}.fontSize`)},fontColor:{...o(t,n)}}}}))(t,n)}}}}};return i})(a,s,yv.chartID),c={type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:i&&bv(r,l,t),gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridlines.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridlines.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridlines&&!e.gridlines.auto}}},showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],snapshot:{tid:"property-dataPoints"}}}},u={ref:"color.auto",type:"boolean",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},h={ref:"color.positiveValue.paletteColor",translation:"properties.waterfall.color.positiveValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:6,color:null},show:xv},d={ref:"color.negativeValue.paletteColor",translation:"properties.waterfall.color.negativeValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#cc6677"},show:xv},f={ref:"color.subtotal.paletteColor",translation:"properties.waterfall.color.subtotalColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#c3c3c3"},show:xv},p={classification:{section:"color",tags:["simple"],exclusive:!0},type:"items",items:{simpleItems:{items:{autoColor:{...u,label:e=>{var t;return n.get(null!==(t=e.color)&&void 0!==t&&t.auto?"Common.Auto":"Common.Custom")}},positiveValueColor:h,negativeValueColor:d,subtotalColor:f}}}},g={translation:"properties.colorsAndLegend",type:"items",grouped:!0,items:{colors:{type:"items",items:{autoColor:{...u,translation:"properties.colors"},positiveValueColor:h,negativeValueColor:d,subtotalColor:f}},simpleColors:p,legend:{type:"items",items:{show:{ref:"legend.show",type:"boolean",translation:"properties.legend.show",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},dock:{type:"string",component:"dropdown",ref:"legend.dock",translation:"properties.legend.position",options:[{value:"auto",translation:"Common.Auto"},{value:"right",translation:"properties.dock.right"},{value:"bottom",translation:"Common.Bottom"},{value:"left",translation:"properties.dock.left"},{value:"top",translation:"Common.Top"}],defaultValue:"auto",show:e=>Yy(e,"legend.show",!0)}}}}},m={uses:"axis.picasso.measureAxis",label:n.get("properties.yAxis"),items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:n.get("properties.yAxis"),classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]}}}}},y={uses:"axis.picasso.dimensionAxis",items:{othersGroup:{items:{show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]},label:{options:t.isEnabled("SENSECLIENT_LAYERED_LABELS")?[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]:void 0}}}}},v={uses:"settings",items:{simpleLabels:{items:{labels:{items:{header:{show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}}}}}},presentation:c,colors:g,measureAxis:m,dimensionAxis:y}},b={translation:"properties.numberFormatting",type:"items",globalChange(e){e.qHyperCubeDef.qMeasures.forEach((t=>{t.qDef.numFormatFromTemplate=e.qDef.numFormatFromTemplate,t.qDef.qNumFormat=Sm(!0,{},e.qDef.qNumFormat)}))},items:{numberFormatting:{uses:"measures.items.numberFormatting",items:{numberFormattingType:void 0}}}};return{type:"items",component:"accordion",items:{data:o,numberFormatting:b,addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},settings:v}}}function kv(e){return{definition:wv(e),support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},importProperties(t,n,i){i.mapProperties();const r={defaultDimension:i.getDefaultDimensionProperties(),defaultMeasure:i.getDefaultMeasureProperties()};return Em({dataDefinition:xm(e),defaultPropertyValues:r,exportFormat:t,initialProperties:n})},exportProperties:(e,t,n)=>Cm({propertyTree:e,viewDataMode:n})}}const Mv=/xyz/.test((()=>{}))?/\b_super\b/:/.*/,_v=function(){};_v.extend=function e(t,n){const i=this.prototype;"string"!=typeof t&&(n=t,t="Class");const r=Object.create(this.prototype);for(const e in n)r[e]="function"==typeof n[e]&&"function"==typeof i[e]&&Mv.test(n[e])?function(e,t){return function(){const n=this._super;this._super=i[e];const r=t.apply(this,arguments);return this._super=n,r}}(e,n[e]):n[e];if(!/^[_a-z][_a-z\d]*$/i.test(t))throw new Error("Invalid subclass name. Alphanumericals only.");const o=new Function(`return (function ${t}(){ typeof this.init === 'function' && this.init.apply(this, [].slice.call(arguments)) });`)();return o.prototype=r,o.prototype.constructor=o,o.extend=e,o};const Sv={getChar(e){let t,n=e;return n>9?(t=65+n-10,t>90&&(t+=6)):n=`${n}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(n+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function qv(){return Sv.id()}const Dv="scrollbar";function Av(e,t,n){return"y"===e?Ev(t,n):function(e){return"far"===e?"top":"bottom"}(t)}function Ev(e,t){const n=e||"near";return t&&"near"===n||!t&&"far"===n?"right":"left"}var Cv={getAxisDock:Av,getOppositeAxisDock:function(e,t,n){return Av(e,"far"===t?"near":"far",n)},getYAxisDock:Ev};const Tv=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Nv=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Rv=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Ov(e){return Tv.test(e)}function Iv(e){return Nv.test(e)||Rv.test(e)}var Lv={lrm:String.fromCharCode(8206),detectTextDirection:function(e){const t=e?e.length:0;let n,i;for(n=0;n<t;n++){if(i=e[n],Ov(i))return"ltr";if(Iv(i))return"rtl"}return"ltr"}};var Pv={lineSettings:function(e,t){var n;const i={value:0,line:{stroke:void 0!==t.paletteColor?t.theme.getColorPickerColor(t.paletteColor):"transparent",strokeDasharray:null==t||null===(n=t.style)||void 0===n?void 0:n.lineType}};return Sm(!0,i,e||{})},lineLabelSettings:function(e,t){const n=t&&t.chartID;let i=t.theme.getStyle(n,"referenceLine.label.name","color");const r=t.theme.getStyle(n,"referenceLine.label.name","fontSize"),o=t.theme.getStyle(n,"referenceLine.label.name","fontFamily");return t.paletteColor?i=t.theme.getColorPickerColor(t.paletteColor):i||(i="transparent"),Sm(!0,{value:0,line:{stroke:"transparent"},label:{align:"center",vAlign:"middle",text:"",fill:i,fontFamily:o,fontSize:r,maxWidthPx:135}},e||{})},isVisible:e=>e&&!1!==e.show&&0!==e.show&&"0"!==e.show&&void 0!==e.refLineExpr,getRefLineTitle:function({refLine:e,label:t,valueString:n}){return!1!==e.showValue?!1!==e.showLabel?`${t} ${Lv.lrm}(${n})${Lv.lrm}`:`${Lv.lrm}(${n})${Lv.lrm}`:!1!==e.showLabel?t:""}};const jv={SHOW_AXIS_LABELS_OPTIONS:["all","labels"],SHOW_TITLE_OPTIONS:["all","title"],HORIZONTAL:"horizontal",VERTICAL:"vertical",LAYOUTSETTINGS:{lasso:{displayOrder:1e4},rangeDim:{displayOrder:1e4},rangeMeasure:{displayOrder:1e4},rangeMinor:{displayOrder:1e4},scrollBar:{minimumLayoutMode:"SPARK",prioOrder:-1,displayOrder:100},refLines:{layout:{minimumLayoutMode:"SPARK",prioOrder:60,displayOrder:1110}},measureAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},dimensionAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},measureAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},dimensionAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},gridLines:{minimumLayoutMode:"XSMALL",displayOrder:-100},refLinesLabels:{minimumLayoutMode:"SMALL",prioOrder:60,displayOrder:0}}};jv.DEFAULT_CHART_ORIENTATION=jv.HORIZONTAL;function zv(e,t){const n=t||{},i=n.measureAxisProperties||{},r=n.dimensionAxisProperties||{},o=n.orientation||jv.DEFAULT_CHART_ORIENTATION,s=o===jv.HORIZONTAL,a=s?"x":"y",l=s?"y":"x",c=jv.SHOW_AXIS_LABELS_OPTIONS,u=jv.SHOW_TITLE_OPTIONS,h=c.includes(i.show),d=!!n.measureTitleText&&u.includes(i.show),f=n.includeDimensionAxis&&c.includes(r.show),p=n.includeDimensionAxis&&!!n.dimensionTitleText&&u.includes(r.show),g=n.gridlines&&!(!n.gridlines.auto&&0===n.gridlines.spacing),m=n.refLines&&n.refLines.some((e=>e.show)),y=[];if(h&&function(e,t,n,i){let r={scale:"measure",settings:t.axisLabelStyle||{},forceBounds:i&&!i.autoMinMax&&i.showBounds};r=Sm(r,jv.LAYOUTSETTINGS.measureAxis);const o=Hv(t,n);e.addComponent(`${n}-axis`,r,o)}(e,n,a,i),d&&function(e,t,n){let i={text:t.measureTitleText,style:t.axisTitleStyle||{}};i=Sm(i,jv.LAYOUTSETTINGS.measureAxisTitle);const r=function(e,t){return Hv(e,t)}(t,n);e.addComponent(`${n}-axis-title`,i,r)}(e,n,a),function(e,t,n,i){let r=t.measureScaleSettings;const o={isRtl:t.isRtl,source:t.measureSource,orientation:n,measureAxisProperties:i};i&&i.spacing>0&&(r=Sm(!0,r||{},{component:{ticks:{distance:100*i.spacing}}}));e.addScale("measure-scale",r,o)}(e,n,o,i),f&&function(e,t,n){let i={scale:"dimension",settings:t.axisLabelStyle||{}};i=Sm(i,jv.LAYOUTSETTINGS.dimensionAxis);const r=Vv(t,n);Sm(!0,i,t.dimensionAxisSettings||{}),e.addComponent(`${n}-axis`,i,r)}(e,n,l),p&&function(e,t,n){let i={text:t.dimensionTitleText,style:t.axisTitleStyle||{}};i=Sm(i,jv.LAYOUTSETTINGS.dimensionAxisTitle);const r=function(e,t){return Vv(e,t)}(t,n);e.addComponent(`${n}-axis-title`,i,r)}(e,n,l),n.includeDimensionAxis&&function(e,t,n){const i={isRtl:t.isRtl,source:t.dimensionSource,orientation:n===jv.HORIZONTAL?jv.VERTICAL:jv.HORIZONTAL};e.addScale("dimension-scale",t.dimensionScaleSettings,i)}(e,n,o),g&&function(e,t,n){let i={ticks:{show:!0},minorTicks:{show:!t.auto&&!t.auto&&3===t.spacing}};i=Sm(i,jv.LAYOUTSETTINGS.gridLines),i[n]={scale:"measure"},e.addComponent("grid-line",i)}(e,n.gridlines,a),n.hasNavigation&&function(e,t,n,i){const r=e.getSettings();r.scroll={dimension:{viewSize:n.scrollSettings&&n.scrollSettings.viewSize||0,max:n.scrollSettings&&n.scrollSettings.max||0}};const o={isRtl:n.isRtl,chartID:n.chartID,isHorizontal:!i},s=Sm({},jv.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",s,o),Fv(t,function(e){function t(t,n){if(!n||!e())return!1;const i={x:n.center.x-n.deltaX,y:n.center.y-n.deltaY};return this.chart.componentsFromPoint(i).some((e=>e.settings.key===Dv))}const n={type:"Tap",options:{enable:t},events:{tap(e){this.chart.component(Dv).emit("tap",e)}}},i={type:"Pan",options:{enable:t},events:{panstart(e){this.chart.component(Dv).emit("panStart",e)},pan(e){this.chart.component(Dv).emit("panMove",e)},panend(e){this.chart.component(Dv).emit("panEnd",e)},pancancel(e){this.chart.component(Dv).emit("panCancel",e)}}};return[n,i]}(n.isNavigationEnabledFn))}(e,y,n,s),m&&function(e,t,n,i){const r=Cv.getAxisDock(n,i.dock,t.isRtl);let o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=Sm(o,jv.LAYOUTSETTINGS.refLines);let s={key:`ref-line-labels-${qv()}`,require:["renderer","chart"],dock:Cv.getOppositeAxisDock(n,i.dock,t.isRtl),preferredSize(){if("x"===n)return 26;const t=this.renderer.measureText,i=this.chart.formatter({data:e.settings.scales.measure.data}),r=s.lines.y.map((e=>{const n=!1!==e.label.showValue?`(${i(e.value)})`:"",r=`${e.label.text} ${n}`,o=e.label.text&&n?` ${n}`:n;return{wanted:t({text:r,fontSize:e.fontSize,fontFamily:e.fontFamily}).width,required:t({text:o,fontSize:e.fontSize,fontFamily:e.fontFamily}).width}})),o=r[0];for(let e=1;e<r.length;e++)r[e].wanted>o.wanted&&(o.wanted=r[e].wanted),r[e].required>o.required&&(o.required=r[e].required);const a=12;return o.required+a>100?o.required+a:Math.min(o.wanted+a,100)},lines:{x:[],y:[]}};s=Sm(s,jv.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach((i=>{if(!i.show)return;const a=i.refLineExpr&&i.refLineExpr.value,l=Sm(!0,{},t,{paletteColor:i.paletteColor,style:i.style,chartID:e.options.chartID}),c=Pv.lineSettings({scale:"measure",dir:n,value:a},l);o.lines[n].push(c);const u=Pv.lineLabelSettings({scale:"measure",value:a,label:{text:!1!==i.showLabel?i.label:"",showValue:!1!==i.showValue}},l);"x"===n?u.label.vAlign="near"===r?1:0:u.label.align="near"===r?0:1,s.lines[n].push(u)})),e.addComponent("ref-line",o,{}),e.addComponent("ref-line",s,{})}(e,n,a,i),n.enableLasso&&n.selectionsEnabled){!function(e,t){const n={brushKey:t.brushKey,brushComponents:t.brushComponents,brushData:t.brushData};e.addComponent("lasso",jv.LAYOUTSETTINGS.lasso,n)}(e,n.lasso||{})}if(n.enableDimRange&&n.includeDimensionAxis&&n.selectionsEnabled){!function(e,t,n,i,r){let o={key:"rangeDim"};o=Sm(o,jv.LAYOUTSETTINGS.rangeDim);const s={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,isHorizontal:!n,dock:i,isRtl:r};e.addComponent("range",o,s)}(e,n.dimRange||{},s,Vv(n,l).dock,n.isRtl)}if(n.enableMeasureRange&&n.selectionsEnabled){!function(e,t,n,i,r){let o={key:"rangeMeasure"};o=Sm(o,jv.LAYOUTSETTINGS.rangeMeasure);const s={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:n,dock:i,isRtl:r};e.addComponent("range",o,s)}(e,n.measureRange||{},s,Hv(n,a).dock,n.isRtl)}if(n.enableAreaRange&&n.selectionsEnabled){!function(e,t,n,i,r){let o={key:"rangeMinor"};o=Sm(o,jv.LAYOUTSETTINGS.rangeMinor);const s={brushKey:t.brushKey,brushAxis:t.brushAxis,brushData:t.brushData,brushArea:t.brushArea,brushComponents:t.brushComponents,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:"measure"===t.brushScale?n:!n,dock:i,isRtl:r,chartInstance:t.chartInstance};e.addComponent("range-area",o,s)}(e,n.areaRange||{},s,Vv(n,l).dock,n.isRtl)}n.brushActions&&Fv(y,n.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function Fv(e,t){t.forEach((t=>{e.push(t)}))}function Hv(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Vv(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Bv(e,t){const n=t||{},i=!n.orientation||"horizontal"===n.orientation,r=!!n.isRtl,o={name:n.name||"scale",component:{invert:i&&r,minorTicks:{count:1},range:n.range||void 0,domain:n.domain||void 0,trackBy:n.trackBy||"id"}};return Sm(!0,{},o,e||{})}function $v(e){var t;if(null!=e&&null!==(t=e.isEnabled)&&void 0!==t&&t.call(e,"IM_5791_SVG_LABEL_RENDERING"))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function Wv(e,t){const n=t&&t.chartID,i=t&&t.dock,r=t&&t.direction,o=t&&t.isRtl,s=t.theme.getStyle(n,"axis.line.major","color"),a=t.theme.getStyle(n,"axis.title","fontSize"),l=t.theme.getStyle(n,"axis.title","color"),c=t.theme.getStyle(n,"axis.label.name","color"),u=t.theme.getStyle(n,"axis.label.name","fontSize"),h=t.theme.getStyle(n,"axis.title","fontFamily"),d=t.theme.getStyle(n,"axis.label.name","fontFamily"),f={key:"axis",type:"axis",renderer:$v(t.flags),dock:Cv.getAxisDock(r,i,o),brush:{trigger:[],consume:[]},settings:{title:{fontSize:a,fontFamily:h,fill:l},line:{show:!0,strokeWidth:1,stroke:s},labels:{fill:c,fontSize:u,fontFamily:d,tiltAngle:o?-40:40,maxEdgeBleed:75,maxSize:150,mode:"auto"},ticks:{stroke:s},minorTicks:{stroke:s}}},p=Sm(!0,{},f,e||{});return p.brush.consume.forEach((e=>{e.style.active.strokeWidth=0})),p}function Uv(e,t){const n=t&&t.chartID,i=t&&t.dock,r=t&&t.direction,o=t&&t.isRtl,s=t.theme.getStyle(n,"axis.title","fontSize"),a=t.theme.getStyle(n,"axis.title","color"),l=t.theme.getStyle(n,"axis.title","fontFamily"),c={key:"text",type:"text",dock:Cv.getAxisDock(r,i,o)||"bottom",displayOrder:0,style:{text:{fontSize:s,fontFamily:l,fill:a}}};return Sm(!0,{},c,e||{})}Bv.measureScale=function(e,t){let n=(t||{}).source||[];"string"==typeof n&&(n=[n]);const i={name:"measure",component:{expand:.1,data:{fields:n.map((e=>({field:e})))}}},r=t&&t.measureAxisProperties;r&&!r.autoMinMax&&(["min","minMax"].includes(r.minMax)&&(i.component.min=r.min),["max","minMax"].includes(r.minMax)&&(i.component.max=r.max));const o=Bv(Sm(!0,i,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},Bv.dimensionScale=function(e,t){const n={name:"dimension",component:{trackBy:"id",type:"band",data:{extract:{field:t&&t.source||"",props:{label:e=>e.qText||""}}},label:e=>e.datum.label.value}};return Bv(Sm(!0,n,e||{}),t)},Wv.xAxis=function(e,t){return Wv(Sm(!0,{key:"x-axis",scale:"x"},e||{}),t)},Wv.yAxis=function(e,t){const n=t&&t.dock,i=t&&t.isRtl,r={key:"y-axis",scale:"y",dock:Cv.getYAxisDock(n,i)};return Wv(Sm(!0,r,e||{}),t)},Uv.xAxisTitle=function(e,t){return Uv(Sm(!0,{key:"x-axis-title"},e||{}),t)},Uv.yAxisTitle=function(e,t){const n=t&&t.dock,i=t&&t.isRtl,r={key:"y-axis-title",dock:Cv.getYAxisDock(n,i)||"left"};return Uv(Sm(!0,r,e||{}),t)};var Yv={getBublesAlign:function(e,t,n){let i=e&&"far"!==t||!e&&"far"===t;return!e&&n&&(i=!i),i?"start":"end"},getDock:function(e,t){const n=[];let i;return e&&n.push(`@${e}`),t&&n.push(`@${t}`),n.length&&(i=n.join(",")),i}};const Xv={SPARK:{width:0,height:0},XSMALL:{width:150,height:75},SMALL:{width:300,height:150},MEDIUM:{width:400,height:220},FULL:{width:550,height:450}};function Kv(){return Xv}function Gv(e){const t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}Kv.getLayoutModeKeys=function(){const e=[];let t;for(t in Xv)e.push(t);return e};const Jv={left:"left",right:"right",up:"top",down:"bottom"};function Zv(e,t,n){switch(e){case"scale":return Bv(t,n);case"measure-scale":return Bv.measureScale(t,n);case"dimension-scale":return Bv.dimensionScale(t,n);case"axis":return Wv(t,n);case"box-marker":return function(e){return Sm(!0,{},{key:"box-marker",type:"box-marker",settings:{minor:{scale:"x"},orientation:"horizontal"},brush:{trigger:[],consume:[]}},e||{})}(t);case"point-marker":return function(e){return Sm(!0,{},{key:"point-marker",type:"point-marker",settings:{},brush:{trigger:[],consume:[]}},e||{})}(t);case"scrollbar":return function(e,t){const n=t&&t.isRtl,i=t&&t.chartID,r=t&&t.isHorizontal,o={key:"scrollbar",type:"scrollbar",scroll:"dimension",dock:r?"bottom":n?"left":"right",settings:{backgroundColor:t.theme.getStyle(i,"","backgroundColor"),invert:n&&r}};return Sm(!0,{},o,e||{})}(t,n);case"text":return Uv(t,n);case"lasso":return function(e,t){const n=t&&t.brushKey,i=t&&t.brushComponents?t.brushComponents:[],r=t&&t.brushData?t.brushData:["elemNo"],o={type:"brush-lasso",key:"lasso",displayOrder:99,settings:{brush:{components:[]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"rgba(102,102,102,1)",strokeWidth:2,opacity:1,strokeDasharray:null},startPoint:{r:10,fill:"rgba(0, 152, 69, 1)",strokeWidth:0,opacity:1}}};return i.forEach((e=>{o.settings.brush.components.push({contexts:n?[n]:void 0,key:e,data:r})})),Sm(!0,{},o,e||{})}(t,n);case"range":return function(e,t){const n=t&&t.brushKey,i=t&&t.brushAxis,r=t&&t.brushArea,o=t&&t.brushScale,s=t&&t.isHorizontal,a=t&&t.dock,l=t&&t.isRtl,c={type:"brush-range",key:"range",displayOrder:99,dock:Yv.getDock(i,r),settings:{brush:n,fill:"rgba(0, 0, 0, 0)",scale:o,multiple:!t||!1!==t.multiple||t.multiple,direction:s?"horizontal":"vertical",target:{component:i,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Yv.getBublesAlign(s,a,l)}}};return Sm(!0,{},c,e||{})}(t,n);case"range-area":return function(e,t){const n=t&&t.brushKey,i=t&&t.brushAxis,r=t&&t.brushComponents?t.brushComponents:[],o=t&&t.brushData?t.brushData:["elemNo"],s=t&&t.brushArea,a=t&&t.isHorizontal,l=t&&t.dock,c=t&&t.isRtl,u=t&&t.chartInstance;let h=!0;const d={type:"brush-area-dir",key:"area",displayOrder:99,dock:Yv.getDock(i,s),settings:{brush:{components:[]},direction:a?"horizontal":"vertical",target:{component:i,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Yv.getBublesAlign(a,l,c),label:e=>h?(h=!1,u.dataset(e.binStart.source.key).field(e.binStart.source.field).formatter()(e.binStart.value)):(h=!0,u.dataset(e.binEnd.source.key).field(e.binEnd.source.field).formatter()(e.binEnd.value))},multiple:!t||!1!==t.multiple||t.multiple}};return r.forEach((e=>{d.settings.brush.components.push({contexts:n?[n]:void 0,key:e,data:o,action:"add"})})),Sm(!0,{},d,e||{})}(t,n);case"categorical-legend":return function(e,t){const n=t&&t.chartID,i=t&&t.isRtl;let r=t&&t.dock||"auto";const o=t&&t.show;"auto"===r&&(r=t.chartHeight/t.chartWidth<1?i?"left":"right":"bottom");const s=t.theme.getStyle(n,"legend.title","color"),a=t.theme.getStyle(n,"legend.title","fontSize"),l=t.theme.getStyle(n,"legend.label","color"),c=t.theme.getStyle(n,"legend.label","fontSize"),u=t.theme.getStyle(n,"legend.title","fontFamily"),h=t.theme.getStyle(n,"legend.label","fontFamily"),d={key:"legend",type:"legend-cat",renderer:$v(t.flags),dock:r,show:o,scale:{type:"color"},settings:{title:{anchor:"middle"},layout:{direction:i?"rtl":"ltr",size:"top"===r||"bottom"===r?2:1,vertical:"top"===r||"bottom"===r?16:8},navigation:{button:{class:{"lui-fade-button":!0},content:(e,t)=>e("span",{style:{pointerEvents:"none"},class:["lui-button__icon","lui-icon",`lui-icon--triangle-${Jv[t.direction]}`].join(" ")})}}},style:{item:{label:{fontSize:c,fontFamily:h,fill:l,lineHeight:1,wordBreak:"break-word"},margin:{top:5,left:10,right:10,bottom:10},shape:{type:t.type?t.type:"square",size:3*parseInt(c,10)/4}},title:{show:t.showTitle,fontSize:a,fontFamily:u,fill:s}}};return Sm(!0,{},d,e)}(t,n);case"sequential-legend":return function(e,t){const n=t&&t.chartID,i=t&&t.isRtl;let r=t.dock||"auto";"auto"===r&&(r=t.chartHeight<t.chartWidth?i?"left":"right":"bottom");const o=t.theme.getStyle(n,"legend.title","color"),s=t.theme.getStyle(n,"legend.title","fontSize"),a=t.theme.getStyle(n,"legend.title","fontFamily"),l=t.theme.getStyle(n,"legend.label","color"),c=t.theme.getStyle(n,"legend.label","fontSize"),u=t.theme.getStyle(n,"legend.label","fontFamily");function h(e){switch(e){case"left":return 0;case"right":return 1;default:return.5}}const d={key:"seqlegend",type:"legend-seq",dock:r,displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,settings:{align:h(i?"right":"left"),major:{invert:"left"===r||"right"===r||i},title:{show:t.showTitle,fontSize:s,fontFamily:a,fill:o},tick:{fill:l,fontSize:c,fontFamily:u}}};return Sm(!0,{},d,e)}(t,n);case"x-axis":return Wv.xAxis(t,n);case"y-axis":return Wv.yAxis(t,n);case"x-axis-title":return Uv.xAxisTitle(t,n);case"y-axis-title":return Uv.yAxisTitle(t,n);case"grid-line":return function(e,t){const n=t&&t.chartID,i=t.theme.getStyle(n,"grid.line.major","color");return Sm(!0,{},{displayOrder:-1,key:"grid-line",type:"grid-line",x:null,y:null,ticks:{stroke:i},minorTicks:{stroke:i}},e||{})}(t,n);case"interaction":return function(e,t){const n=t&&t.gestures||[];return Sm(!0,{},{type:"hammer",key:"hammered",gestures:n},e||{})}(t,n);case"ref-line":return function(e,t){const n=t&&t.chartID,i=t.theme.getStyle(n,"referenceLine.outOfBounds","color"),r=t.theme.getStyle(n,"referenceLine.outOfBounds","backgroundColor");return Sm(!0,{},{key:"ref-line",type:"ref-line",dock:"center",prioOrder:-1,lines:{x:[],y:[]},style:{oob:{width:7,fill:r,text:{fill:i},padding:{x:7,y:5}}}},e||{})}(t,n);case"event-area":return function(e){return Sm(!0,{},{type:"event-area",key:"event-area"},e||{})}(t);case"labels":return function(e,t){const n=t&&t.chartID,i=t.theme.getStyle(n,"label.value","color"),r=t.theme.getStyle(n,"label.value","fontSize"),o=t.theme.getStyle(n,"label.value","fontFamily"),s={key:"labels",type:"labels",renderer:$v(t.flags),displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:o,fontSize:parseFloat(r),align:.5,labels:[{placements:[{position:"outside",fill:i,justify:0},{position:"inside",fill:e&&e.settings.sources[0].strategy.settings.labels[0].placements[1].fill,justify:1}],label:Gv}]}}}]}};return Sm(!0,{},s,e||{})}(t,n);default:return}}function Qv(e){this.options=e||{},this.settings={dockLayout:{layoutModes:Kv()},components:[],scales:{}}}Qv.prototype.addComponent=function(e,t,n){const i=Zv(e,t,Sm(!0,{},this.options,n||{}));return this.settings.components.push(i),i},Qv.prototype.addInteraction=function(e,t){const n=Zv("interaction",e,Sm(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(n),n},Qv.prototype.addScale=function(e,t,n){const i=Zv(e,t,Sm(!0,{},this.options,n||{}));this.settings.scales[i.name]=i.component},Qv.prototype.getSettings=function(){return this.settings},Qv.prototype.getComponent=function(e){return this.settings.components.filter((t=>t.key===e))[0]},Qv.prototype.addPreset=function(e,t){!function(e,t,n){if("dimension-measure-chart"!==e)throw Error("There is no chart preset with that type");zv(t,n)}(e,this,t)},Qv.validateComponentKeys=function(e){const t={};return e.map((e=>{const n=e.key;return n?t[n]?`Duplicate key for component ${e.type}`:(t[n]=!0,null):`Missing key for component ${e.type}`})).filter((e=>!!e))},Qv.create=function(e){return new Qv(e)},Qv.createComponent=Zv;const eb={CENTER:0,BOTTOM:1};var tb={DISCLAIMERS:[{label:"NoDataExist",alignment:eb.CENTER,default:!0},{label:"RequireNumericDimension",alignment:eb.CENTER,default:!1},{label:"OnlyNanData",alignment:eb.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:eb.CENTER,default:!1},{label:"LimitedData",alignment:eb.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:eb.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:eb.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:eb.BOTTOM,default:!1}],ALIGNMENT:eb};const nb={getNoDataExistAttribute:e=>e.qSize.qcy*e.qSize.qcx===0,getLimitedDataAttribute(e,t){let n,i=!1;var r;return e?void 0!==t.explicitLimitedData?i=!0===t.explicitLimitedData:e.qDataPages&&e.qDataPages[0]?i=!t.paging&&e.qSize.qcy>e.qDataPages[0].qMatrix.length:(r=e.qStackedDataPages)&&r[0]&&r[0].qData[0]&&r[0].qData[0].qSubNodes&&(n=t.maxNbrOfDimensions?t.maxNbrOfDimensions:2,i=e.qDimensionInfo.length>=n?e.qStackedDataPages[0].qData[0].qSubNodes.some((e=>e.qDown>0)):e.qStackedDataPages[0].qData[0].qSubNodes.length<e.qStackedDataPages[0].qArea.qHeight):i=!0===t.explicitLimitedData,i},getNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.some((e=>e.qMin<=0)),getOnlyNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.every((e=>e.qMax<=0&&e.qMax>=e.qMin))||0===e.qSize.qcy,getOnlyNanDataAttribute:(e,t)=>void 0!==t.explicitOnlyNanData?t.explicitOnlyNanData:e.qMeasureInfo.every((e=>e.qMax<e.qMin||"NaN"===e.qMax)),getDataRangeIncludingZeroAttribute:(e,t)=>!t.supportRangeOverZero&&function(e,t){const n=t.length;let i,r,o,s,a;for(e&&(r=!(e.autoMinMax||"min"!==e.minMax&&"minMax"!==e.minMax||null===e.min||Number.isNaN(+e.min)),o=!(e.autoMinMax||"max"!==e.minMax&&"minMax"!==e.minMax||null===e.max||Number.isNaN(+e.max))),s=Number.MAX_VALUE,a=-Number.MAX_VALUE,i=0;i<n;i++)if(s=Math.min(s,t[i].qMin),a=Math.max(a,t[i].qMax),s<=0&&a>=0)return!0;return s=r?e.min:s,a=o?e.max:a,s<=0&&a>=0}(e.measureAxis,e.qHyperCube.qMeasureInfo),applyAttributes(e,t){const n=e||{},i={};return n.supportNegative=void 0===n.supportNegative||n.supportNegative,n.supportRangeOverZero=void 0===n.supportRangeOverZero||n.supportRangeOverZero,tb.DISCLAIMERS.forEach((e=>{i[e.label]=!1})),t&&t.qHyperCube?(i.NoDataExist=this.getNoDataExistAttribute(t.qHyperCube),i.NoDataExist?i:(i.RequireNumericDimension=n.explicitRequireNumericDimension,i.RequireNumericDimension||(i.LimitedData=this.getLimitedDataAttribute(t.qHyperCube,n),i.NegativeOrZeroValues=this.getNegativeOrZeroValuesAttribute(t.qHyperCube,n),i.OnlyNegativeOrZeroValues=this.getOnlyNegativeOrZeroValuesAttribute(t.qHyperCube,n),i.OnlyNanData=this.getOnlyNanDataAttribute(t.qHyperCube,n),i.DataRangeIncludingZero=this.getDataRangeIncludingZeroAttribute(t,n)),i)):i}};function ib(e,t,n){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=n}function rb(e,t){return e&&t&&t[e]}function ob(e){this.environment=e,this.clear()}ib.prototype.isValidAndSupported=function(e,t){return rb(e.label,this.dataAttributes)&&(e.default||rb(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},ib.prototype.isAnyValidDisclaimer=function(e){let t=!1;const n=this;return this.disclaimersConfig.forEach((i=>{n.isValidAndSupported(i,e)&&(t=!0)})),t},ib.prototype.getMessage=function(e,t){let n="";const i=this;return t&&this.disclaimersConfig.forEach((r=>{i.isValidAndSupported(r,e)&&(n+=`${t.get(`Object.Disclaimer.${r.label}`)} `)})),n},ob.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},ob._applyDefaultSupport=function(e,t){let n=e;return n||(n={}),t.forEach((e=>{void 0===n[e.label]&&(n[e.label]=e.default)})),n},ob.prototype.getComponentSettings=function(){var e;const{translator:t}=this.environment,n=Sm(!0,{},this.vizAttributes.supportedDisclaimers),i=new ib(tb.DISCLAIMERS,this.dataAttributes,n);let r,o;if(i.isAnyValidDisclaimer(tb.ALIGNMENT.CENTER))r=i.getMessage(tb.ALIGNMENT.CENTER,t),o="center";else{if(!i.isAnyValidDisclaimer(tb.ALIGNMENT.BOTTOM))return;r=i.getMessage(tb.ALIGNMENT.BOTTOM,t),o="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:o},settings:{label:r,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.direction)}}},ob.prototype.set=function(e){if(this.clear(),!e)throw new Error(ob.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=nb.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},ob.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};const sb=_v.extend({init(e,t,n,i,r){this.$element=t,this.environment=n,this.backendApi=i,this._selectionsApi=r,this._on=!1,this._disclaimer=new ob(n),this._dataPaths=["qHyperCube"];const o=this;this.picassoElement=t[0],this.picassoElement.className+=" picasso-chart",this.chartInstance=e.chart({element:this.picassoElement,settings:{components:[Qv.createComponent("event-area",{mounted(e){o.dataAreaElem=e}})]}})},updateEnvironment(e){this.environment=e},isRtl(){var e;return"rtl"===(null===(e=this.environment.options)||void 0===e?void 0:e.direction)},setDataPaths(e){this._dataPaths=e},getData:(e,t,n)=>function(e,t,n){let i,r={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};if(n){const e=n.width||t.qSize.qcx,i=Math.floor(1e4/e);r={qTop:n.top||0,qLeft:n.left||0,qWidth:e,qHeight:n.height?Math.min(n.height,i):i}}else r={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};i="K"===t.qMode?"qStackedDataPages":"qDataPages";return e.getData([r],null,t).then((e=>{t[i]=e}))}(e,t,n),hasValidData:()=>!0,paint(){if(this.hasValidData()){var e;this._disclaimer.set(this.getDisclaimerAttributes(this.layout));const t=this._disclaimer.getComponentSettings(),n="center"===(null==t||null===(e=t.layout)||void 0===e?void 0:e.dock),i=this.createChartSettings(this.layout);n?i.components=[t]:t&&i.components.push(t),Qv.validateComponentKeys(i.components).forEach((e=>{console.error(e)})),this.updateChart(this.layout,i),this._painted=!0}return Promise.resolve()},resize(){if(this.layout)return this.paint()},createChartSettings(){throw new Error('Subclass must implement "createChartSettings" function')},addSnapshotChartSettings(e,t){const{freeResize:n}=this.environment.options;!n&&t.snapshotData&&(e.dockLayout.logicalSize={width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h,preserveAspectRatio:!0})},updateData(e){return this._destroyed?Promise.reject():(this.layout=Sm(!0,{},e),this.layout.permissions=e.permissions,Promise.resolve())},updateChart(e,t,n){var i,r;const o=null!==(i=null===(r=this.environment.appLayout)||void 0===r?void 0:r.qLocaleInfo)&&void 0!==i?i:{},s=this._dataPaths.map((t=>({type:"q",key:t,config:{localeInfo:o},data:Yy(e,t.replace(/\//g,"."))})));this.colorService&&s.push(...this.colorService.getData()),this.chartInstance.update({data:s,settings:t,partialData:n});this.picassoElement.setAttribute("data-state",2)},destroy(){this._destroyed=!0,this.off(),this.chartInstance.destroy()},getViewState:()=>({}),isLassoDisabled:()=>!0,setSnapshotData(e){e.snapshotData||(e.snapshotData={}),e.snapshotData.content={chartData:{},size:{w:this.$element.width(),h:this.$element.height()}}},getDisclaimerAttributes:e=>({data:e})}),ab={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},lb=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,cb=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,ub=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,hb=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,db=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,fb=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,pb=Math.floor,gb=Math.round,mb=_v.extend({init(){let e,t,n,i,r,o,s,a,l,c,u,h,d=0,f=0,p=0,g=1;if(this._invalid=!1,arguments[0]instanceof mb)d=arguments[0]._r,f=arguments[0]._g,p=arguments[0]._b,g=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(h=arguments[0],u=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(h))d=parseInt(u[1],10),f=parseInt(u[2],10),p=parseInt(u[3],10);else if(u=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(h))d=parseInt(u[1],10),f=parseInt(u[2],10),p=parseInt(u[3],10),g=parseFloat(u[4]);else if(u=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(h))d=parseInt(u[1],16),f=parseInt(u[2],16),p=parseInt(u[3],16),g=1;else if(u=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(h))d=parseInt(u[1]+u[1],16),f=parseInt(u[2]+u[2],16),p=parseInt(u[3]+u[3],16),g=1;else if(u=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(h)){switch(e=parseFloat(u[1]),t=parseFloat(u[3]),i=parseFloat(u[5]),e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i,o=i<=.5?2*i*t:(2-2*i)*t,s=e/60,a=o*(1-Math.abs(s%2-1)),l=[],s=Math.floor(s),s){case 0:l=[o,a,0];break;case 1:l=[a,o,0];break;case 2:l=[0,o,a];break;case 3:l=[0,a,o];break;case 4:l=[a,0,o];break;case 5:l=[o,0,a];break;default:l=[0,0,0]}c=i-.5*o,d=l[0]+c,f=l[1]+c,p=l[2]+c,d=gb(255*d),f=gb(255*f),p=gb(255*p),g=1}else if(u=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(h)){switch(e=parseFloat(u[1]),t=parseFloat(u[3]),i=parseFloat(u[5]),g=parseFloat(u[7]),e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i,o=i<=.5?2*i*t:(2-2*i)*t,s=e/60,a=o*(1-Math.abs(s%2-1)),l=[],s=Math.floor(s),s){case 0:l=[o,a,0];break;case 1:l=[a,o,0];break;case 2:l=[0,o,a];break;case 3:l=[0,a,o];break;case 4:l=[a,0,o];break;case 5:l=[o,0,a];break;default:l=[0,0,0]}c=i-.5*o,d=l[0]+c,f=l[1]+c,p=l[2]+c,d=gb(255*d),f=gb(255*f),p=gb(255*p)}else if(u=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(h)){switch(e=parseFloat(u[1]),t=parseFloat(u[3]),r=parseFloat(u[5]),e%=360,t/=100,r/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,r=r<0?0:r>1?1:r,o=r*t,s=e/60,a=o*(1-Math.abs(s%2-1)),l=[],s=Math.floor(s),s){case 0:l=[o,a,0];break;case 1:l=[a,o,0];break;case 2:l=[0,o,a];break;case 3:l=[0,a,o];break;case 4:l=[a,0,o];break;case 5:l=[o,0,a];break;default:l=[0,0,0]}c=r-o,d=l[0]+c,f=l[1]+c,p=l[2]+c,d=gb(255*d),f=gb(255*f),p=gb(255*p),g=1}else ab[h.toLowerCase()]?(n=h.toLowerCase(),d=ab[n].r,f=ab[n].g,p=ab[n].b,g="number"==typeof ab[n].a?ab[n].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(g=(4278190080&arguments[0])>>>24,g/=255,d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,p=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,p=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(d=arguments[0],f=arguments[1],p=arguments[2],g=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+d+f+p+g)&&(this._invalid=!0),this._r=pb(d),this._g=pb(f),this._b=pb(p),this._a=g,this._spaces={}},isInvalid(){return this._invalid},setAlpha(e){this._a=e,this._spaces={}},getAlpha(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=mb.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=mb.toRGBA(this)),this._spaces.rgba},toString(){return this._spaces.rgb||(this._spaces.rgb=mb.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=mb.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=mb.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=mb.toHSLA(this,e)),this._spaces.hsla},toHSV(){const e=this.toHSVComponents();return`hsv(${e.h},${e.s},${e.v})`},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=mb.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=mb.toNumber(this)),this._spaces.num},isDark(){return this.isInvalid()||this.getLuminance()<125},getLuminance(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance(e){const t=this.toHSLA(),n=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),i=parseFloat(n[1]),r=parseFloat(n[3]);let o=parseFloat(n[5]);const s=parseFloat(n[7]);return o+=e,o=Math.max(0,Math.min(o,100)),`hsla(${i},${r},${o},${s})`},isEqual(e){return e instanceof mb||(e=new mb(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend(e,t){return`rgba(${[pb(this._r+(e._r-this._r)*t),pb(this._g+(e._g-this._g)*t),pb(this._b+(e._b-this._b)*t),pb(this._a+(e._a-this._a)*t)].join(",")})`},createShiftedColor(e){(void 0===e||Number.isNaN(+e))&&(e=1);const t=this.getLuminance(),n=this._g<126?1:1+this._g/512,i=this.shiftLuminance(20*(t*n<220?.8+1/(t+1)*4:-(.8+t/255*1))*e);return new mb(i)}});mb.toRGB=function(e){if(e instanceof mb)return`rgb(${[e._r,e._g,e._b].join(",")})`;"string"==typeof e&&(e=mb.toNumber(e));return`rgb(${(16711680&e)>>16},${(65280&e)>>8},${255&e})`},mb.toRGBA=function(e,t){if(e instanceof mb)return`rgba(${[e._r,e._g,e._b,void 0!==t?t:e._a].join(",")})`;"string"==typeof e&&(e=mb.toNumber(e));return`rgba(${(16711680&e)>>16},${(65280&e)>>8},${255&e},${void 0!==t?t:e._a})`},mb.toHex=function(e){let t,n,i;return e instanceof mb?(t=e._r.toString(16),n=e._g.toString(16),i=e._b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===i.length&&(i=`0${i}`),`#${[t,n,i].join("")}`):("string"==typeof e&&(e=mb.toNumber(e)),t=((16711680&e)>>16).toString(16),n=((65280&e)>>8).toString(16),i=(255&e).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===i.length&&(i=`0${i}`),`#${t}${n}${i}`)},mb.toHSL=function(e,t){let n,i,r,o=0;"string"==typeof e&&(e=new mb(e));const s=e._r/255,a=e._g/255,l=e._b/255,c=Math.max(s,a,l),u=Math.min(s,a,l);if(i=t?.21*s+.72*a+.07*l:(c+u)/2,c===u)n=0,o=0;else{switch(r=c-u,n=i>.5?r/(2-c-u):r/(c+u),c){case s:o=(a-l)/r+(a<l?6:0);break;case a:o=(l-s)/r+2;break;case l:o=(s-a)/r+4}o/=6}return`hsl(${360*o},${100*n},${100*i})`},mb.toHSLA=function(e,t){let n,i,r,o=0;"string"==typeof e&&(e=new mb(e));const s=e._r/255,a=e._g/255,l=e._b/255,c=e._a,u=Math.max(s,a,l),h=Math.min(s,a,l);if(i=t?.21*s+.72*a+.07*l:(u+h)/2,u===h)n=0,o=0;else{switch(r=u-h,n=i>.5?r/(2-u-h):r/(u+h),u){case s:o=(a-l)/r+(a<l?6:0);break;case a:o=(l-s)/r+2;break;case l:o=(s-a)/r+4}o/=6}return`hsla(${360*o},${100*n},${100*i},${c})`},mb.toHSVComponents=function(e){let t,n,i=0;"string"==typeof e&&(e=new mb(e));const r=e._r/255,o=e._g/255,s=e._b/255,a=Math.max(r,o,s),l=Math.min(r,o,s),c=a;if(a===l)t=0,i=0;else{switch(n=a-l,t=0===n?0:n/c,a){case r:i=(o-s)/n+(o<s?6:0);break;case o:i=(s-r)/n+2;break;case s:i=(r-o)/n+4}i/=6}return{h:360*i%360,s:100*t,v:100*c}},mb.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof mb)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;let e,t,n=0,i=0,r=0;return 1===arguments.length&&"string"==typeof arguments[0]&&(t=arguments[0],(e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t))?(n=parseInt(e[1],10),i=parseInt(e[2],10),r=parseInt(e[3],10)):(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))?(n=parseInt(e[1],16),i=parseInt(e[2],16),r=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(n=parseInt(e[1]+e[1],16),i=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16))),(n<<16)+(i<<8)+r},mb.blend=function(e,t,n){const i=(16711680&(e=mb.toNumber(e)))>>16,r=(65280&e)>>8,o=255&e;return(i+(((16711680&(t=mb.toNumber(t)))>>16)-i)*n<<16)+(r+(((65280&t)>>8)-r)*n<<8)+(o+((255&t)-o)*n)},mb.getBlend=function(e,t,n){const i=e._r+(t._r-e._r)*n,r=e._g+(t._g-e._g)*n,o=e._b+(t._b-e._b)*n,s=e._a+(t._a-e._a)*n;return new mb(i,r,o,s)},mb.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(lb.test(e)||cb.test(e)||ub.test(e)||hb.test(e)||db.test(e)||fb.test(e)||ab[e.toLowerCase()])},mb.getBestContrast=function(e,t,n){const i=e.getLuminance();return Math.abs(i-t.getLuminance())>Math.abs(i-n.getLuminance())?t:n},mb.getContrast=function(e,t){if(!e||!t)return;const n=e.getLuminance()/100,i=t.getLuminance()/100;return n>i?(n+.05)/(i+.05):(i+.05)/(n+.05)},mb.isDark=function(){const e={getLuminance:mb.prototype.getLuminance,isInvalid:mb.prototype.isInvalid};return mb.prototype.init.apply(e,[].slice.call(arguments)),mb.prototype.isDark.call(e)},mb.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};const yb=".scrollHandler";function vb(e,t,n,i,r){if(!e||!t||!n)throw Error("Scroll-handler: Missing input");this._chartInstance=e,this._$chartElement=t,this._getSlicedDataFn=n,this._on=!1,this._itemSize=30,this.options={direction:"vertical"},this._onScrollCallback=i,this._legendKey=r}function bb(){const e=("horizontal"===this.options.direction?this._$chartElement.width():this._$chartElement.height())||0,t=Math.floor(e/this.getItemSize());this._scrollViewSizeInItem=Math.max(t,1)}function xb(e){const t=function(e){let t=0,n=0,i=0;return e.wheelDelta&&(t=e.wheelDelta/60),e.detail&&(t=-e.detail/3),i=t,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(i=0,n=-1*t),void 0!==e.wheelDeltaY&&(i=e.wheelDeltaY/60),void 0!==e.wheelDeltaX&&(n=-1*e.wheelDeltaX/60),{delta:t,deltaX:n,deltaY:i,x:e.pageX,y:e.pageY}}(e.originalEvent);if(function(e,t,n,i){if(i&&n.componentsFromPoint(t).some((e=>e.settings.key===i)))return n.component(i).emit(t.delta>0?"prev":"next"),e.preventDefault(),!0;return!1}(e,t,this._chartInstance,this._legendKey)||this._disabled||!this.getScrollApi())return;if(e.preventDefault(),!t.delta)return;const n=t.delta<0?3:-3;this._scrollApi.move(n)}function wb(){if(this._disabled||this._sizeChanged)return void(this._sizeChanged=!1);const e=this;this.getViewData().then((t=>{e._on&&!e._disabled&&e._onScrollCallback&&e._onScrollCallback(t,void 0,!0)})).catch((e=>{}))}vb.prototype.getScrollApi=function(){this._scrollApi||(this._scrollApi=this._chartInstance.scroll("dimension"));return this._scrollApi},vb.prototype.setDisabled=function(e){this._disabled=e},vb.prototype.getDisabled=function(){return this._disabled},vb.prototype.setItemSize=function(e){this._itemSize!==e&&(this._itemSize=e,bb.call(this))},vb.prototype.getItemSize=function(){return this._itemSize},vb.prototype.getScrollViewSizeInItem=function(){this._scrollViewSizeInItem||bb.call(this);return this._scrollViewSizeInItem},vb.prototype.on=function(){if(this._on)return;this.getScrollApi()&&(this._scrollApi.removeAllListeners(),this._scrollApi.on("update",wb.bind(this)));this._$chartElement.on(`mousewheel${yb} DOMMouseScroll${yb}`,xb.bind(this)),this._$chartElement.on(`touchstart${yb}`,(e=>{e.preventDefault()})),this._on=!0},vb.prototype.isOn=function(){return this._on},vb.prototype.off=function(){if(!this._on)return;this.getScrollApi()&&this._scrollApi.removeAllListeners();this._$chartElement.off(yb),this._on=!1},vb.prototype.updateViewState=function(e){bb.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem,max:e})},vb.prototype.onResize=function(){this._sizeChanged=!0,bb.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem})},vb.prototype.isDataSizeChanged=function(e,t){return Math.min(this.getScrollViewSizeInItem(),t)!==e},vb.prototype.resetScroll=function(){this.getScrollApi()&&this._scrollApi.moveTo(0)},vb.prototype.getViewData=function(){let e=0,t=0;if(this.getScrollApi()){const n=this._scrollApi.getState();e=Math.round(n.start),t=n.viewSize}return this._getSlicedDataFn(e,t)},vb.prototype.setOptions=function(e){this.options.direction!==e.direction&&(this._scrollViewSizeInItem=void 0);this.options=e},vb.prototype.getScrollState=function(){return this.getScrollApi().getState().start},vb.prototype.setScrollState=function(e){this.getScrollApi().moveTo(e)};var kb={isOnComponentForRange:function(e,t,n){return!!e&&!!n.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>-1!==t.indexOf(e.settings.key)))[0]},isOnComponentForLasso:function(e,t,n){return e&&n.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>e.settings.key===t.keys.componentKey))[0]},isOnComponentForNavBtn:function(e,t,n){return n.chart.componentsFromPoint(e.center).some((e=>e.settings.key===t))}};var Mb={callLassoGesture:function(e,t,n){return{type:"Pan",options:{direction:gm.DIRECTION_ALL,threshold:1,enable(i,r){if(e.lassoing)return t.isSelectionEnabled();const o=kb.isOnComponentForLasso(r,n,this);return t.isSelectionEnabled()&&r&&((s=n.handlers).selectionHandler.lassoState()&&!s.selectionHandler.allFieldsLocked()||e.lassoing)&&o;var s},event:"lasso"},recognizeWith:n.handlers.scrollHandler?"drag":null,events:{lassostart(i){kb.isOnComponentForLasso(i,n,this)&&(t.switchTo("lasso",this.chart,i),e.lassoing=!0,n.handlers.selectionHandler.pauseEngineCalls(n.keys.lassoBrushKey),i.clientX=i.pointers[0].clientX,i.clientY=i.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoStart",i))},lassomove(n){e.lassoing&&(n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",n))},lassoend(i){e.lassoing&&(i.clientX=i.pointers[0].clientX,i.clientY=i.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoEnd",i),n.handlers.selectionHandler.resumeEngineCalls(n.keys.lassoBrushKey,!0),e.lassoing=!1)},lassocancel(i){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",i),n.handlers.selectionHandler.resumeEngineCalls(n.keys.lassoBrushKey,!1)}}}}};var _b={callMeasureRangeGesture:function(e,t,n,i){const r=n.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?gm.DIRECTION_HORIZONTAL:gm.DIRECTION_VERTICAL,event:"measurerange",enable(r,o){if(!n.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();const s="measurerange"===n.active.gesture?[i,n.keys.componentKey]:[i],a=kb.isOnComponentForRange(o,s,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!a,e.measureSelecting&&!!n.keys.measureRangeBrushKey}},requireFailure:`lasso ${r}`,recognizeWith:n.handlers.scrollHandler?"drag":null,events:{measurerangestart(r){const o="measurerange"===n.active.gesture?[i,n.keys.componentKey]:[i];kb.isOnComponentForRange(r,o,this)&&(e.measureSelecting=!0,t.switchTo("measurerange",this.chart,r),t.doEmit(this.chart,"rangeMeasure","rangeStart",r),n.handlers.selectionHandler.pauseEngineCalls(n.keys.measureRangeBrushKey))},measurerangemove(n){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",n)},measurerangeend(i){e.measureSelecting&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",i),e.measureSelecting=!1)},measurerangecancel(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function Sb(e,t){let n;return n="x-axis"===e?"horizontal"===t?gm.DIRECTION_VERTICAL:gm.DIRECTION_HORIZONTAL:"horizontal"===t?gm.DIRECTION_HORIZONTAL:gm.DIRECTION_VERTICAL,n}var qb={callAreaRangeGesture:function(e,t,n,i){const r=n.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:Sb(i,n.isHorizontal),event:"arearange",enable(r,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();const s="arearange"===n.active.gesture?[i,n.keys.componentKey]:[i],a=kb.isOnComponentForRange(o,s,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!a,e.minoring}},requireFailure:`lasso ${r}`,recognizeWith:n.handlers.scrollHandler?"drag":null,events:{arearangestart(r){const o="arearange"===n.active.gesture?[i,n.keys.componentKey]:[i];kb.isOnComponentForRange(r,o,this)&&(e.minoring=!0,t.switchTo("arearange",this.chart,r),t.doEmit(this.chart,"rangeMinor","areaStart",r),n.handlers.selectionHandler.pauseEngineCalls(n.keys.areaBrushKey))},arearangemove(i){e.minoring&&(this.chart.brush(n.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",i))},arearangeend(i){e.minoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",i),e.minoring=!1)},arearangecancel(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!1),e.minoring=!1}}}}};var Db={callDimensionRangeGesture:function(e,t,n,i){const r=n.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?gm.DIRECTION_VERTICAL:gm.DIRECTION_HORIZONTAL,event:"majorrange",enable(r,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();const s="majorrange"===n.active.gesture?[i,n.keys.componentKey]:[i],a=kb.isOnComponentForRange(o,s,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!a,e.majoring&&!!n.keys.dimRangeBrushKey}},requireFailure:`lasso ${r}`,recognizeWith:n.handlers.scrollHandler?"drag":null,events:{majorrangestart(r){const o="majorrange"===n.active.gesture?[i,n.keys.componentKey]:[i];kb.isOnComponentForRange(r,o,this)&&(e.majoring=!0,t.switchTo("majorrange",this.chart,r),t.doEmit(this.chart,"rangeDim","rangeStart",r),n.handlers.selectionHandler.pauseEngineCalls(n.keys.dimRangeBrushKey))},majorrangemove(n){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",n)},majorrangeend(i){e.majoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",i),e.majoring=!1)},majorrangecancel(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var Ab={callDragGesture:function(e,t,n,i,r){let o={};return{type:"Pan",options:{direction:n.isHorizontal?gm.DIRECTION_VERTICAL:gm.DIRECTION_HORIZONTAL,event:"drag",enable(i,r){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!r&&!!this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((e=>e.settings.key===n.keys.componentKey))[0],e.dragging)}},requireFailure:i?`lasso ${t.getBrushConfig()}`:"",events:{dragstart(e){o={x:e.deltaX,y:e.deltaY};let t=-(n.isHorizontal?e.deltaY:e.deltaX)/n.handlers.scrollHandler.getItemSize();!n.isHorizontal&&r&&(t=-t),n.handlers.scrollHandler.getScrollApi().move(t)},dragmove(t){if(!e.dragging)return;let i=-(n.isHorizontal?t.deltaY-o.y:t.deltaX-o.x)/n.handlers.scrollHandler.getItemSize();!n.isHorizontal&&r&&(i=-i),n.handlers.scrollHandler.getScrollApi().move(i),o={x:t.deltaX,y:t.deltaY}},dragend(){e.dragging&&(e.dragging=!1)},dragcancel(){e.dragging=!1}}}}};var Eb={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable(n,i){return!(!i||!e())&&kb.isOnComponentForNavBtn(i,t,this)}},events:{navBtnTap(e){this.chart.componentsFromPoint(e.center).forEach((t=>{const n=e.target,i=n?n.getAttribute("data-action"):"";if(i)return t.emit(i)}))}}}}};var Cb={create:function(e,t,n,i,r){const o={};t=t||"vertical";const s=i.lassoBrushKey||"select",a=i.dimRangeBrushKey||null,l=i.measureRangeBrushKey||null,c=i.areaBrushKey||null,u=i.legendBrushKey||null,h=!!e.selectionHandler&&e.selectionHandler.isOn(),d={dragging:!1,lassoing:!1,majoring:!1,minoring:!1,measureSelecting:!1},f={gesture:"",type:""},p="horizontal"===t,g=p?"y-axis":"x-axis",m=p?"x-axis":"y-axis";function y(e,t,n){if(f.gesture===e)return;let i=s;const r=t||f.chart;switch(f.gesture){case"majorrange":v(r,"rangeDim","rangeClear",n),i=a;break;case"measurerange":v(r,"rangeMeasure","rangeClear",n),i=l;break;case"arearange":v(r,"rangeMinor","areaClear",n),i=c}f.gesture=e;const o="range"===e?"range":"item";f.type&&f.type!==o&&r.brush(i).clear(),f.chart=t,f.type=o}function v(e,t,n,i){if(e){const r=e.component(t);r&&r.emit(n,i)}}let b=[];const x={isSelectionEnabled:()=>e.selectionHandler&&e.selectionHandler.isOn(),isNavigationEnabled:()=>e.scrollHandler&&e.scrollHandler.isOn(),doEmit:v,switchTo:y,getBrushConfig:function(){return a?l?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},w={handlers:e,keys:i,isHorizontal:p,active:f,rangeSelStatus:r};function k(){y("none"),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}return h&&(b=[{type:"Tap",options:{event:"rangeClearTap"},events:{rangeClearTap(e){y("none",this.chart,e),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}}}],b.unshift(Eb.callNavBtnGesture(x.isNavigationEnabled,u)),b.push(Mb.callLassoGesture(d,x,w)),a?l?(b.push(Db.callDimensionRangeGesture(d,x,w,g)),e.selectionHandler.addComponent(a,{id:"rangeDim",clear:"rangeClear"}),b.push(_b.callMeasureRangeGesture(d,x,w,m)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(b.push(Db.callDimensionRangeGesture(d,x,w,g)),e.selectionHandler.addComponent(a,{id:"rangeDim",clear:"rangeClear"}),b.push(qb.callAreaRangeGesture(d,x,w,m)),e.selectionHandler.addComponent(c,{id:"rangeMinor",clear:"areaClear"})):(b.push(_b.callMeasureRangeGesture(d,x,w,m)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),b.push(qb.callAreaRangeGesture(d,x,w,g)),e.selectionHandler.addComponent(c,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(b.push(Ab.callDragGesture(d,x,w,h,n)),e.scrollHandler.getScrollApi().on("update",k)),o.gestures=b,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",k)},o}};function Tb(e,t,n,i,r){let o=!1;i=i||"tooltip",n=n||["self"];const s=e.brush(i),a={};function l(){if(o){e.component(r).emit("hide")}o=!1}return a.isOpen=function(){return o},a.closeTooltip=l,a.update=function(){const a=s.brushes(),c=e.getAffectedShapes(i,"and",n,t);a.length>=1?(o=!0,function(t){o=!0;const n={nodes:t};e.component(r).emit("show",{},n)}(c)):l()},a.toggleInterceptor=function(e){if(n.length>1){const t={},n=[];return e.forEach((e=>{t[e.key]||(t[e.key]={}),t[e.key][e.value]||(t[e.key][e.value]=!0,n.push(e))})),n}return e},a}var Nb={create:(...e)=>Tb(...e)},Rb={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);const n=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(n)}};const Ob=e=>({h:t,data:n,style:i})=>{const r=function(e,t){const n=e.chartInstance.dataset(e.dataPath),i=[],r=t.length-5,o=Math.min(5,t.length);for(let r=0;r<o;r++){const o=t[r],s={rows:[]};if(e.labelData){const t=[],r=e.labelData;let a=!1;for(let e=0;e<r.length;e++){const n=o.data[r[e]].value;if(-2===n.qElemNo||-2===n.qElemNumber){a=!0;break}t.push(o.data[r[e]].value.qText)}if(a)return;s.header=e.headerResolver(t),s.rows=e.measureRows.map((t=>{const i=o.data;return e.rowResolver(n.field(i[t].source.field),i[t],i)})).filter((e=>!!e));const l=Ib(e,o);l&&s.rows.unshift(l),i.push(s)}}r>0&&(i.numberInExcess=r);return i.rowCount=i[0]?i.length*i[0].rows.length:0,i}(e,n),o={h:t,style:i,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(o,r)};function Ib(e,t){var n,i,r;const o=t.data.color,s=null===(n=e.colorService)||void 0===n||null===(i=n.getSettings)||void 0===i?void 0:i.call(n);if(!s||"color"===s.type||!o||!s.fieldType)return;const a=[];e.data.forEach((e=>{const n=t.data[e];n&&a.push(n.value)}));const l=function(e){let t=-1;for(let n=0;n<e.length;n++)-3===e[n]&&(t=n);return t}(a),{translator:c}=e,u=s.label;return{color:null===(r=t.attrs)||void 0===r?void 0:r.fill,label:u,value:-1!==l?c.get("properties.dimensionLimits.others"):o.label}}const Lb="dist-flow-tooltip",Pb=`#${Lb}`;function jb(){if(!document.querySelector(Pb)){const e=document.createElement("div");e.id=Lb,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 zb({key:e="tooltip",rtl:t,fontFamily:n,filter:i,content:r}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){jb()},beforeUpdate(){jb()},destroyed(){!function(){const e=document.querySelector(Pb);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(Pb),content:r,filter:i,extract:e=>e.node,direction:t?"rtl":"ltr",placement:"bounds"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:n,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const{detectTextDirection:Fb}=Lv;const Hb={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:e=>e.join(", "),rowResolver:(e,t)=>({value:Rb.formatMeasureValue(e,t),label:e.title()}),direction:"ltr",renderer:function(e,t){const{h:n,style:i,translator:r,rtl:o}=e,s=[],a=o?"right":"left";if(t.forEach((e=>{if(e.header){const t={...i.cell,textAlign:a,fontWeight:"bold",direction:Fb(e.header)};s.push(n("tr",null,n("td",{style:t,colSpan:2},e.header)))}e.rows.forEach((e=>{let t=e.value;if(e.color){const i={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},r=n("div",{style:i});t=o?[e.value,r]:[r,e.value]}const r=o?[":",e.label]:[e.label,":"],l={...i.cell,textAlign:a,direction:Fb(e.label)},c={...i.cell,textAlign:o?"left":"right",direction:Fb(e.value)};s.push(n("tr",null,n("td",{style:l},r),n("td",{style:c},t)))}))})),t.numberInExcess){const e=r.get("Object.ChartTooltip.NMore",t.numberInExcess),o={...i.cell,textAlign:a,direction:Fb(e)};s.push(n("tr",null,n("td",{style:o,colSpan:2},e)))}return s}};function Vb(e,t,n){if(!e)throw Error("Tooltips-handler: Missing input");let i={},r=!1;const o={};function s(e){e.listeners.update=function(t,n){e.action.update(t,n,e)},e.listeners.end=function(){e.action.closeTooltip()},e.brush.on(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.on("end",e.listeners.end),e.brush.intercept("set-values",e.action.toggleInterceptor)}function a(){Object.keys(i).forEach((e=>{l(i[e])}))}function l(e){e.brush.removeListener(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.removeListener("end",e.listeners.end),e.brush.removeInterceptor("set-values",e.action.toggleInterceptor)}function c(){Object.keys(i).forEach((e=>{i[e].action.closeTooltip()}))}function u(){c();for(const e in i)i[e].brush.clear()}return o.setUp=function(t){const o=Sm(!0,{},Hb,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");i[o.contexts[0]]&&r&&l(i[o.contexts[0]]);const a=function(e,t){return{brush:t.brush(e.contexts[0]),action:Nb.create(t,e.componentKey,e.data,e.contexts[0],e.tooltipKey),listeners:{},chartInstance:t,dataPath:e.dataPath,renderer:e.renderer,data:e.data,headerResolver:e.headerResolver,rowResolver:e.rowResolver,colorService:e.colorService,attrDimPath:e.attrDimPath,measureRows:e.measureRows,labelData:e.labelData,filterShapes:e.filterShapes,direction:e.environment.options.direction,theme:e.environment.theme,translator:e.environment.translator,treatAsDesktop:"touch"!==e.environment.deviceType}}(o,e);i[o.contexts[0]]=a,r&&s(a);const c=zb({key:o.tooltipKey,rtl:"rtl"===a.direction,fontFamily:a.theme.getStyle(n,"tooltip","fontFamily"),filter:(u=a.filterShapes,e=>u?u(e):function(e){const t=[];return e.forEach((e=>{-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)})),t}(e)),content:Ob(a,o.dataPath)});var u;return o.chartBuilder.getSettings().components.push(c),{trigger:{on:a.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map((e=>({context:e}))),component:c}},o.tearDown=function(){r&&a(),i=[]},o.closeTooltip=c,o.isOn=()=>r,o.on=function(){r||(r=!0,Object.keys(i).forEach((e=>{s(i[e])})),t&&t.on("mouseleave",u))},o.off=function(){r&&(r=!1,a(),t&&t.off("mouseleave",u),c())},o}var Bb={create:(e,t,n)=>Vb(e,t,n)};const $b=166/26,Wb=12/11;function Ub(e){return(12*Math.min(e,3)+Math.max(e-3,0)*$b)/11}function Yb(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),i=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,i=i?i.length:0;const r=t+n+i;return{latin:e.length-r,cjk:r}}function Xb(e,t){const n={latin:0,cjk:0};void 0===t?e.forEach((e=>{const t=Yb(e.qText);n.latin+=t.latin,n.cjk+=t.cjk})):e.forEach((e=>{const i=Yb(e[t].qText);n.latin+=i.latin,n.cjk+=i.cjk}));const i=Math.max(1,n.latin+n.cjk);return n.latinRatio=n.latin/i,n.cjkRatio=n.cjk/i,n}function Kb(e,t,n){return e*(e<=24?t:n)}var Gb={endsWith:function(e,t){return-1!==e.indexOf(t,e.length-t.length)},startsWith:function(e,t){return 0===e.indexOf(t)},contains:function(e,t){if(!e)throw new Error("Haystack is undefined.");if(!t)throw new Error("Needle is undefined.");return-1!==e.indexOf(t)},stringWidthOverMWidth:Ub,getCharacterRatios:Yb,getTotalCharacterRatios:Xb,getAdjustedMaxGlyphCount:function(e,t,n){const i=Xb(t,n),r=i.latinRatio*e,o=i.cjkRatio*e;return Math.ceil(Ub(r)+o*Wb)},estimateLatinLabelWidth:Kb,estimateLabelWidth:function(e,t,n,i,r){return e*n+Kb(t,i,r)}};var Jb={generateHyperCube:function(e,t){const n=e.qHyperCube.qMeasureInfo,i=e.qHyperCube.qDataPages[0].qMatrix,r=n.length;if(!r)return;const o=yv.getColorForPositiveValue(e,t),s=yv.getColorForNegativeValue(e,t),a=yv.getColorForSubtotal(e,t),l=e=>`${e}`,c=[];let u,h,d=0,f=0,p=-Number.MAX_VALUE,g=Number.MAX_VALUE,m=-Number.MAX_VALUE,y=Number.MAX_VALUE,v=0;for(let e=0;e<r;e++)h=Number.isNaN(+i[0][e].qNum)?0:i[0][e].qNum,n[e].valueType!==yv.valueTypes.SUBTOTAL?(d=f,f+=h*(n[e].valueType===yv.valueTypes.INVERSE?-1:1),u=d<f?o:s,c.push([{qText:n[e].qFallbackTitle,qElemNumber:v++},{qText:u},{qNum:d},{qNum:f},{qNum:f-d,qText:i[0][e].qText}]),n[e].subtotal&&n[e].subtotal.enable&&c.push([{qText:n[e].subtotal.label||"",qElemNumber:v++},{qText:a},{qNum:0},{qNum:f},{qNum:f,qText:l(f)}])):(d=0,f=h,c.push([{qText:n[e].qFallbackTitle,qElemNumber:v++},{qText:a},{qNum:d},{qNum:f},{qNum:f-d,qText:i[0][e].qText}])),p=Math.max(p,d),g=Math.min(g,d),m=Math.max(m,f),y=Math.min(y,f);const b=function(e){return e.qHyperCube.qMeasureInfo[0].qNumFormat}(e),x=e.qHyperCube.qMeasureInfo[0].qIsAutoFormat,w=e.qDef.isCustomFormatted,k={qHyperCube:{qMode:"S",qDataPages:[{qArea:{qTop:0,qLeft:0,qWidth:5,qHeight:c.length},qMatrix:c}],qDimensionInfo:[{qStateCounts:{}},{qStateCounts:{}}],qMeasureInfo:[{qMin:g,qMax:p,qNumFormat:b,qIsAutoFormat:x,isCustomFormatted:w},{qMin:y,qMax:m,qNumFormat:b,qIsAutoFormat:x,isCustomFormatted:w},{qMin:y,qMax:m,qNumFormat:b,qIsAutoFormat:x,isCustomFormatted:w}]}};e.generatedMatrix=c,e.generated=k},generateSlicedHyperCube:function(e,t,n){e.generated.qHyperCube.qDataPages=[{qArea:{qTop:t,qLeft:0,qWidth:5,qHeight:n},qMatrix:e.generatedMatrix.slice(t,t+n)}]},getGeneratedDimensionPath:function(e){return`qDimensionInfo/${e}`},getGeneratedMeasurePath:function(e){return`qMeasureInfo/${e}`}};function Zb(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Qb(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ex(e){let t,n,i;function r(e,i,r=0,o=e.length){if(r<o){if(0!==t(i,i))return o;do{const t=r+o>>>1;n(e[t],i)<0?r=t+1:o=t}while(r<o)}return r}return 2!==e.length?(t=Zb,n=(t,n)=>Zb(e(t),n),i=(t,n)=>e(t)-n):(t=e===Zb||e===Qb?e:tx,n=e,i=e),{left:r,center:function(e,t,n=0,o=e.length){const s=r(e,t,n,o-1);return s>n&&i(e[s-1],t)>-i(e[s],t)?s-1:s},right:function(e,i,r=0,o=e.length){if(r<o){if(0!==t(i,i))return o;do{const t=r+o>>>1;n(e[t],i)<=0?r=t+1:o=t}while(r<o)}return r}}}function tx(){return 0}const nx=ex(Zb).right;ex((function(e){return null===e?NaN:+e})).center;const ix=Math.sqrt(50),rx=Math.sqrt(10),ox=Math.sqrt(2);function sx(e,t,n){const i=(t-e)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=ix?10:o>=rx?5:o>=ox?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=n&&n<2?sx(e,t,2*n):[a,l,c]}function ax(e,t,n){return sx(e=+e,t=+t,n=+n)[2]}function lx(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function cx(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ux(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function hx(){}var dx=.7,fx=1/dx,px="\\s*([+-]?\\d+)\\s*",gx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yx=/^#([0-9a-f]{3,8})$/,vx=new RegExp(`^rgb\\(${px},${px},${px}\\)$`),bx=new RegExp(`^rgb\\(${mx},${mx},${mx}\\)$`),xx=new RegExp(`^rgba\\(${px},${px},${px},${gx}\\)$`),wx=new RegExp(`^rgba\\(${mx},${mx},${mx},${gx}\\)$`),kx=new RegExp(`^hsl\\(${gx},${mx},${mx}\\)$`),Mx=new RegExp(`^hsla\\(${gx},${mx},${mx},${gx}\\)$`),_x={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 Sx(){return this.rgb().formatHex()}function qx(){return this.rgb().formatRgb()}function Dx(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=yx.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ax(t):3===n?new Tx(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ex(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ex(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=vx.exec(e))?new Tx(t[1],t[2],t[3],1):(t=bx.exec(e))?new Tx(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=xx.exec(e))?Ex(t[1],t[2],t[3],t[4]):(t=wx.exec(e))?Ex(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=kx.exec(e))?Px(t[1],t[2]/100,t[3]/100,1):(t=Mx.exec(e))?Px(t[1],t[2]/100,t[3]/100,t[4]):_x.hasOwnProperty(e)?Ax(_x[e]):"transparent"===e?new Tx(NaN,NaN,NaN,0):null}function Ax(e){return new Tx(e>>16&255,e>>8&255,255&e,1)}function Ex(e,t,n,i){return i<=0&&(e=t=n=NaN),new Tx(e,t,n,i)}function Cx(e,t,n,i){return 1===arguments.length?function(e){return e instanceof hx||(e=Dx(e)),e?new Tx((e=e.rgb()).r,e.g,e.b,e.opacity):new Tx}(e):new Tx(e,t,n,null==i?1:i)}function Tx(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function Nx(){return`#${Lx(this.r)}${Lx(this.g)}${Lx(this.b)}`}function Rx(){const e=Ox(this.opacity);return`${1===e?"rgb(":"rgba("}${Ix(this.r)}, ${Ix(this.g)}, ${Ix(this.b)}${1===e?")":`, ${e})`}`}function Ox(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ix(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lx(e){return((e=Ix(e))<16?"0":"")+e.toString(16)}function Px(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new zx(e,t,n,i)}function jx(e){if(e instanceof zx)return new zx(e.h,e.s,e.l,e.opacity);if(e instanceof hx||(e=Dx(e)),!e)return new zx;if(e instanceof zx)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=t===o?(n-i)/a+6*(n<i):n===o?(i-t)/a+2:(t-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new zx(s,a,l,e.opacity)}function zx(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function Fx(e){return(e=(e||0)%360)<0?e+360:e}function Hx(e){return Math.max(0,Math.min(1,e||0))}function Vx(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}cx(hx,Dx,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Sx,formatHex:Sx,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return jx(this).formatHsl()},formatRgb:qx,toString:qx}),cx(Tx,Cx,ux(hx,{brighter(e){return e=null==e?fx:Math.pow(fx,e),new Tx(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?dx:Math.pow(dx,e),new Tx(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Tx(Ix(this.r),Ix(this.g),Ix(this.b),Ox(this.opacity))},displayable(){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:Nx,formatHex:Nx,formatHex8:function(){return`#${Lx(this.r)}${Lx(this.g)}${Lx(this.b)}${Lx(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Rx,toString:Rx})),cx(zx,(function(e,t,n,i){return 1===arguments.length?jx(e):new zx(e,t,n,null==i?1:i)}),ux(hx,{brighter(e){return e=null==e?fx:Math.pow(fx,e),new zx(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?dx:Math.pow(dx,e),new zx(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new Tx(Vx(e>=240?e-240:e+120,r,i),Vx(e,r,i),Vx(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new zx(Fx(this.h),Hx(this.s),Hx(this.l),Ox(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ox(this.opacity);return`${1===e?"hsl(":"hsla("}${Fx(this.h)}, ${100*Hx(this.s)}%, ${100*Hx(this.l)}%${1===e?")":`, ${e})`}`}}));var Bx=e=>()=>e;function $x(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(i){return Math.pow(e+i*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)}var Ux=function e(t){var n=$x(t);function i(e,t){var i=n((e=Cx(e)).r,(t=Cx(t)).r),r=n(e.g,t.g),o=n(e.b,t.b),s=Wx(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=r(t),e.b=o(t),e.opacity=s(t),e+""}}return i.gamma=e,i}(1);function Yx(e,t){t||(t=[]);var n,i=e?Math.min(t.length,e.length):0,r=t.slice();return function(o){for(n=0;n<i;++n)r[n]=e[n]*(1-o)+t[n]*o;return r}}function Xx(e,t){var n,i=t?t.length:0,r=e?Math.min(i,e.length):0,o=new Array(r),s=new Array(i);for(n=0;n<r;++n)o[n]=tw(e[n],t[n]);for(;n<i;++n)s[n]=t[n];return function(e){for(n=0;n<r;++n)s[n]=o[n](e);return s}}function Kx(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function Gx(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Jx(e,t){var n,i={},r={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=tw(e[n],t[n]):r[n]=t[n];return function(e){for(n in i)r[n]=i[n](e);return r}}var Zx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qx=new RegExp(Zx.source,"g");function ew(e,t){var n,i,r,o=Zx.lastIndex=Qx.lastIndex=0,s=-1,a=[],l=[];for(e+="",t+="";(n=Zx.exec(e))&&(i=Qx.exec(t));)(r=i.index)>o&&(r=t.slice(o,r),a[s]?a[s]+=r:a[++s]=r),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Gx(n,i)})),o=Qx.lastIndex;return o<t.length&&(r=t.slice(o),a[s]?a[s]+=r:a[++s]=r),a.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,i=0;i<t;++i)a[(n=l[i]).i]=n.x(e);return a.join("")})}function tw(e,t){var n,i=typeof t;return null==t||"boolean"===i?Bx(t):("number"===i?Gx:"string"===i?(n=Dx(t))?(t=n,Ux):ew:t instanceof Dx?Ux:t instanceof Date?Kx:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?Yx:Array.isArray(t)?Xx:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Jx:Gx)(e,t)}function nw(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function iw(e){return+e}var rw=[0,1];function ow(e){return e}function sw(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function aw(e,t,n){var i=e[0],r=e[1],o=t[0],s=t[1];return r<i?(i=sw(r,i),o=n(s,o)):(i=sw(i,r),o=n(o,s)),function(e){return o(i(e))}}function lw(e,t,n){var i=Math.min(e.length,t.length)-1,r=new Array(i),o=new Array(i),s=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)r[s]=sw(e[s],e[s+1]),o[s]=n(t[s],t[s+1]);return function(t){var n=nx(e,t,1,i)-1;return o[n](r[n](t))}}function cw(){var e,t,n,i,r,o,s=rw,a=rw,l=tw,c=ow;function u(){var e=Math.min(s.length,a.length);return c!==ow&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(s[0],s[e-1])),i=e>2?lw:aw,r=o=null,h}function h(t){return null==t||isNaN(t=+t)?n:(r||(r=i(s.map(e),a,l)))(e(c(t)))}return h.invert=function(n){return c(t((o||(o=i(a,s.map(e),Gx)))(n)))},h.domain=function(e){return arguments.length?(s=Array.from(e,iw),u()):s.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),u()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=nw,u()},h.clamp=function(e){return arguments.length?(c=!!e||ow,u()):c!==ow},h.interpolate=function(e){return arguments.length?(l=e,u()):l},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,i){return e=n,t=i,u()}}function uw(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function hw(e){return(e=uw(Math.abs(e)))?e[1]:NaN}var dw,fw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pw(e){if(!(t=fw.exec(e)))throw new Error("invalid format: "+e);var t;return new gw({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 gw(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 mw(e,t){var n=uw(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}pw.prototype=gw.prototype,gw.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 yw={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>mw(100*e,t),r:mw,s:function(e,t){var n=uw(e,t);if(!n)return e+"";var i=n[0],r=n[1],o=r-(dw=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+uw(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function vw(e){return e}var bw,xw,ww,kw=Array.prototype.map,Mw=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _w(e){var t,n,i=void 0===e.grouping||void 0===e.thousands?vw:(t=kw.call(e.grouping,Number),n=e.thousands+"",function(e,i){for(var r=e.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}),r=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?vw:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(kw.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=pw(e)).fill,n=e.align,h=e.sign,d=e.symbol,f=e.zero,p=e.width,g=e.comma,m=e.precision,y=e.trim,v=e.type;"n"===v?(g=!0,v="g"):yw[v]||(void 0===m&&(m=12),y=!0,v="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var b="$"===d?r:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===d?o:/[%p]/.test(v)?l:"",w=yw[v],k=/[defgprs%]/.test(v);function M(e){var r,o,l,d=b,M=x;if("c"===v)M=w(e)+M,e="";else{var _=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),m),y&&(e=function(e){e:for(var t,n=e.length,i=1,r=-1;i<n;++i)switch(e[i]){case".":r=t=i;break;case"0":0===r&&(r=i),t=i;break;default:if(!+e[i])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}(e)),_&&0===+e&&"+"!==h&&(_=!1),d=(_?"("===h?h:c:"-"===h||"("===h?"":h)+d,M=("s"===v?Mw[8+dw/3]:"")+M+(_&&"("===h?")":""),k)for(r=-1,o=e.length;++r<o;)if(48>(l=e.charCodeAt(r))||l>57){M=(46===l?s+e.slice(r+1):e.slice(r))+M,e=e.slice(0,r);break}}g&&!f&&(e=i(e,1/0));var S=d.length+e.length+M.length,q=S<p?new Array(p-S+1).join(t):"";switch(g&&f&&(e=i(q+e,q.length?p-M.length:1/0),q=""),n){case"<":e=d+e+M+q;break;case"=":e=d+q+e+M;break;case"^":e=q.slice(0,S=q.length>>1)+d+e+M+q.slice(S);break;default:e=q+d+e+M}return a(e)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),M.toString=function(){return e+""},M}return{format:h,formatPrefix:function(e,t){var n=h(((e=pw(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(hw(t)/3))),r=Math.pow(10,-i),o=Mw[8+i/3];return function(e){return n(r*e)+o}}}}function Sw(e,t,n,i){var r,o=function(e,t,n){n=+n;const i=(t=+t)<(e=+e),r=i?ax(t,e,n):ax(e,t,n);return(i?-1:1)*(r<0?1/-r:r)}(e,t,n);switch((i=pw(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(r=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(hw(t)/3)))-hw(Math.abs(e)))}(o,s))||(i.precision=r),ww(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,hw(t)-hw(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(e){return Math.max(0,-hw(Math.abs(e)))}(o))||(i.precision=r-2*("%"===i.type))}return xw(i)}function qw(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const i=t<e,[r,o,s]=i?sx(t,e,n):sx(e,t,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let e=0;e<a;++e)l[e]=(o-e)/-s;else for(let e=0;e<a;++e)l[e]=(o-e)*s;else if(s<0)for(let e=0;e<a;++e)l[e]=(r+e)/-s;else for(let e=0;e<a;++e)l[e]=(r+e)*s;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var i=t();return Sw(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var i,r,o=t(),s=0,a=o.length-1,l=o[s],c=o[a],u=10;for(c<l&&(r=l,l=c,c=r,r=s,s=a,a=r);u-- >0;){if((r=ax(l,c,n))===i)return o[s]=l,o[a]=c,t(o);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r}i=r}return e},e}function Dw(){var e=cw()(ow,ow);return e.copy=function(){return t=e,Dw().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},lx.apply(e,arguments),qw(e)}!function(e){bw=_w(e),xw=bw.format,ww=bw.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const Aw={getMinorTicks({majorTicks:e,minorTickCount:t}){const n=[];for(let i=0;i<e.length-1;i++){const r=e[i],o=(e[i+1]-r)/(t+1);for(let e=1;e<=t;e++)n.push(r+o*e)}return n},adjustTicks({ticks:e,majorTicks:t,minorTicks:n,autoMinMax:i,minMax:r,min:o,max:s}){const a=n[0]-t[0],l=t[0]-o;l>a&&e.unshift({value:t[0]-a,isMinor:!0});const c=s-t[t.length-1];return c>a&&e.push({value:t[t.length-1]+a,isMinor:!0}),i||(("min"===r||"minMax"===r)&&l>0&&e.unshift({value:o,isMinor:!1}),("max"===r||"minMax"===r)&&c>0&&e.push({value:s,isMinor:!1})),e},getTicks({layout:e,height:t}){const{autoMinMax:n,minMax:i,spacing:r}=e.measureAxis;let o=Math.min(...e.generated.qHyperCube.qMeasureInfo.map((e=>e.qMin))),s=Math.max(...e.generated.qHyperCube.qMeasureInfo.map((e=>e.qMax)));if(!n)switch(i){case"min":o=e.measureAxis.min;break;case"max":s=e.measureAxis.max;break;case"minMax":({min:o,max:s}=e.measureAxis)}const a=100*r,l=Math.max(1,Math.round(t/a)),c=Dw().domain([o,s]).ticks(l),u=Aw.getMinorTicks({majorTicks:c,minorTickCount:1}),h=[...c.map((e=>({value:e,isMinor:!1}))),...u.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value));return Aw.adjustTicks({ticks:h,majorTicks:c,minorTicks:u,autoMinMax:n,minMax:i,min:o,max:s})}},Ew=yv.chartID;function Cw(e){this._scrollHandler.setDisabled(!!e)}function Tw(e){let t=-Number.MAX_VALUE;return e.qHyperCube.qMeasureInfo.forEach((e=>{t=Math.max(t,e.qFallbackTitle.length),e.valueType!==yv.valueTypes.SUBTOTAL&&e.subtotal&&e.subtotal.enable&&(t=Math.max(t,e.subtotal.label?e.subtotal.label.length:0))})),Math.min(20,Math.max(0,t))}function Nw(e){return{settings:{labels:{mode:e.dimensionAxis.label,maxGlyphCount:Math.ceil(Gb.stringWidthOverMWidth(Tw(e))),maxLengthPx:this.picassoElement.getBoundingClientRect().height/4}}}}function Rw(e){const t=e.data.measure,n=e.dataset(t.source.key).field(t.source.field);return Rb.formatMeasureValue(n,t)}function Ow(e,t){const n=e.getStyles(),i=((e,t,n)=>{var i,r,o,s;const a=null===(i=fv("value",n))||void 0===i?void 0:i.label,l=(null==a||null===(r=a.value)||void 0===r?void 0:r.fontFamily)||t.label.value.fontFamily;let c=(null==a||null===(o=a.value)||void 0===o?void 0:o.fontSize)||t.label.value.fontSize;return c=parseFloat(c),{fontFamily:l,fontSize:c,fill:null==a||null===(s=a.value)||void 0===s||null===(s=s.fontColor)||void 0===s?void 0:s.color}})(0,n,t),r=(null==i?void 0:i.fill)||n.label.value.color,o=n.label.value.darkColor,s=n.label.value.lightColor;return{settings:{sources:[{strategy:{settings:{...i,direction:e=>e.data&&e.data.end.value>e.data.start.value?"up":"down",labels:[{placements:[{fill:r},{fill:null!=i&&i.fill?r:e=>mb.isDark(e.node.attrs.fill)?s:o},{position:"opposite",fill:r,justify:0}],label:Rw}]}}}]}}}function Iw(e,t){return{viewSize:t,max:e.generatedMatrix.length}}function Lw(e,t,n){const{theme:i,translator:r}=e,o=yv.getColorForPositiveValue(t,i),s=yv.getColorForNegativeValue(t,i),a=yv.getColorForSubtotal(t,i),l=r.get("waterfall.legend.positiveValue.label"),c=r.get("waterfall.legend.negativeValue.label"),u=r.get("waterfall.legend.subtotal.label"),h=((e,t,n,i)=>{var r,o,s,a;const l=i.isEnabled("CLIENT_IM_3051")?null===(r=fv("legend",n))||void 0===r?void 0:r.legend:{};return{fontFamily:(null==l||null===(o=l.label)||void 0===o?void 0:o.fontFamily)||t.getStyle(e,"legend.label","fontFamily"),fontSize:(null==l||null===(s=l.label)||void 0===s?void 0:s.fontSize)||t.getStyle(e,"legend.label","fontSize"),color:(null==l||null===(a=l.label)||void 0===a||null===(a=a.fontColor)||void 0===a?void 0:a.color)||t.getStyle(e,"legend.label","color")}})(Ew,i,t,n);return{displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,scale:{type:"categorical-color",data:[l,c,u],range:[o,s,a]},style:{item:{label:{fontSize:h.fontSize,fontFamily:h.fontFamily,fill:h.color}},title:{show:!1}}}}const Pw=sb.extend("WaterfallChart",{namespace:".waterfallchart",chartID:Ew,init:function({picasso:e,environment:t,$element:n,flags:i}){this._super(e,n,t,null,null),this._tooltipHandler=Bb.create(this.chartInstance,n,Ew),this._scrollHandler=new vb(this.chartInstance,n,this.getSlicedData.bind(this),this.updateChart.bind(this)),this._scrollHandler.setOptions({direction:"horizontal"}),this.setDataPaths(["generated/qHyperCube"]),this.flags=i},updateConstraints:function(e){const t=!e.active,n=!e.passive;this._scrollHandler[t?"on":"off"](),this._tooltipHandler[n?"on":"off"]()},off:function(){this._scrollHandler.off(),this._tooltipHandler.off()},createChartSettings:function(e){const t=this.isRtl(),{theme:n}=this.environment,i=!!e.snapshotData,r=Qv.create({chartID:Ew,theme:n,isRtl:t,flags:this.flags}),o=this.picassoElement.clientWidth,s=this.picassoElement.clientHeight,a={};a.box=this._tooltipHandler.setUp({chartBuilder:r,environment:this.environment,data:[""],contexts:["boxTip"],componentKey:"box-marker",headerResolver(){},rowResolver(e,t,n){const i=n.boxColor.value;return{value:Rb.formatMeasureValue(e,t),label:n.tooltip.value.qText,color:i}},labelData:["tooltip"],measureRows:["measure"]});const l={scrollHandler:this._scrollHandler,selectionHandler:null};this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=Cb.create(l,"vertical",t,{componentKey:"box-marker"}),r.addPreset("dimension-measure-chart",{isRtl:t,orientation:"vertical",theme:n,gridlines:e.gridlines,includeDimensionAxis:!0,dimensionAxisProperties:e.dimensionAxis,dimensionAxisSettings:Nw.call(this,e),dimensionSource:Jb.getGeneratedDimensionPath(0),dimensionScaleSettings:{component:{maxPxStep:()=>s/4}},includeMeasureAxis:!0,measureAxisProperties:e.measureAxis,measureSource:[Jb.getGeneratedMeasurePath(0),Jb.getGeneratedMeasurePath(1)],measureScaleSettings:{component:{expand:0,include:[0],ticks:{values:()=>Aw.getTicks({layout:e,height:s})}}},hasNavigation:!i,isNavigationEnabledFn:()=>this._scrollHandler.isOn(),scrollSettings:Iw(e,this._scrollHandler.getScrollViewSizeInItem()),refLines:e.refLine&&e.refLine.refLines,brushActions:this._dependentActions.gestures,axisLabelStyle:pv(Ew,n,e)}),r.addComponent("box-marker",function(e,t){const n=e?[e.box.trigger]:[],i=e?e.box.consume:[];return{data:{extract:{key:"qHyperCube",field:Jb.getGeneratedDimensionPath(0),props:{start:{field:Jb.getGeneratedMeasurePath(0)},end:{field:Jb.getGeneratedMeasurePath(1)},measure:{field:Jb.getGeneratedMeasurePath(2),reduce:"first",value:e=>e},boxColor:{field:Jb.getGeneratedDimensionPath(1),value:e=>e.qText},isCustomFormatted:!!t.qDef.isCustomFormatted,tooltip:{value:e=>e}}}},settings:{major:{scale:"dimension"},minor:{scale:"measure"},orientation:"",box:{width:.7,maxWidthPx:4e3,fill:e=>e.datum.boxColor.value,strokeWidth:0}},brush:{trigger:n,consume:i}}}(a,e)),r.addComponent("point-marker",function(e,t){const n=t.getStyle(Ew,"shape.bridge","stroke");return{data:{extract:{key:"qHyperCube",field:Jb.getGeneratedDimensionPath(0),props:{x:{},y:{field:Jb.getGeneratedMeasurePath(1)}}}},settings:{x:{scale:"dimension",ref:"x",fn:t=>e?t.scale(t.datum.value):t.scale(t.datum.value)+t.scale.bandwidth()},y:{scale:"measure"},sizeLimits:{maxPx:2e4,maxRelExtent:1e4,minRelDiscrete:0,maxRelDiscrete:1},shape:"line",stroke:n,size:1-.7,strokeDasharray:"4 4",fill:"none",strokeWidth:(e,t)=>t===e.data.items.length-1?0:2}}}(t,n)),e.legend&&!e.legend.show||r.addComponent("categorical-legend",Lw(this.environment,e,this.flags),{dock:e.legend?e.legend.dock:"auto",isRtl:t,chartWidth:o,chartHeight:s});const c=function(e){var t=e.theme,n=e.config,i=void 0===n?{}:n,r=i.id,o=i.resolve,s=void 0===o?[]:o,a=i.transform,l=void 0===a?[]:a,c=i.extend,u=void 0===c?[]:c,h={theme:t,matrix:uv(s),styles:void 0};return h.styles=dv({theme:t,id:r,transform:l,extend:u,matrix:h.matrix}),{getStyles:function(){return h.styles},getTheme:function(){return h.theme},setTheme:function(e){h.theme=e,h.styles=dv({theme:e,id:r,transform:l,extend:u,matrix:h.matrix})}}}({theme:n,config:{id:"waterfallChart"}});e.dataPoint.showLabels&&r.addComponent("labels",Ow(c,e));const u=r.getSettings();return this.addSnapshotChartSettings(u,e),u},updateData:function(e){const{theme:t,options:n}=this.environment,i=this;return this._super(e).then((()=>{if(i._destroyed)return Promise.reject();let r,o;if(!!e.snapshotData){const e=i.layout.generated.qHyperCube.qDataPages[0].qArea;r=e.qTop,o=e.qHeight,Jb.generateHyperCube(i.layout,t)}else{Jb.generateHyperCube(i.layout,t),Cw.call(i,!0);const{viewState:e}=n;e?(i._scrollHandler.updateViewState(i.layout.generatedMatrix.length),i._scrollHandler.setScrollState(e.scroll),r=e.scroll):(i._scrollHandler.resetScroll(),r=0),o=i._scrollHandler.getScrollViewSizeInItem()}Jb.generateSlicedHyperCube(i.layout,r,o)}))},resize:function(){this._scrollHandler.onResize(),this._super()},paint:function(){const e=!!this.layout.snapshotData;e||this.environment.options.viewState||Cw.call(this,!1),this._tooltipHandler.closeTooltip();const t=this.layout.generated.qHyperCube.qDataPages[0].qMatrix.length,n=this.layout.generatedMatrix.length;if(!e&&this._scrollHandler.isDataSizeChanged(t,n)){const e=this._super,t=this;return this._scrollHandler.getViewData().finally((()=>e.call(t)))}return this._super()},getSlicedData:function(e,t){return Jb.generateSlicedHyperCube(this.layout,e,t),Promise.resolve(this.layout)},setSnapshotData:function(e){this._super(e),e.generated=this.layout.generated,e.generatedMatrix=this.layout.generatedMatrix},getViewState:function(){return{scroll:this._scrollHandler.getScrollState()}}});return function(t){return function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(a).forEach((t=>{e.add(a[t])}))}}(t.translator),{qae:Tm(t),ext:kv(t),component(){const n=e.useElement(),i=function(){const t=e.useApp(),n=e.useAppLayout(),i=e.useDeviceType(),r=e.useOptions(),o=e.useTheme(),s=e.useTranslator();return e.useMemo((()=>({app:t,appLayout:n,deviceType:i,options:r,theme:o,translator:s})),[t,n,r.direction,r.freeResize,s.language(),o.name(),i])}(),r=i.options.renderer,o=e.useMemo((()=>vm(r)),[r]),a=e.useStaleLayout(),l=e.useConstraints(),[c,u]=e.useState();var h;e.useEffect((()=>{const e=s(n),r=new Pw({picasso:o,environment:i,$element:e,flags:t.flags});return u(r),()=>{r.destroy()}}),[]),function(...t){const[,n]=e.usePromise(...t);if(n)throw n}((async()=>{c&&(c.updateEnvironment(i),c.updateConstraints(l),await c.updateData(a),await c.paint())}),[a,c,i]),function(t){const n=e.useRect(),i=e.useOptions(),r=e.useConstraints(),[,o]=e.usePromise((async()=>{t&&(t.updateConstraints(r),t.options=i,await t.resize())}),[n.width,n.height]);if(o)throw o}(c),h=c,e.onTakeSnapshot((e=>{if(h)return h.setSnapshotData(e)})),e.useImperativeHandle((()=>({getViewState(){if(h)return h.getViewState()}})),[h])}}}}));
|
|
27
|
+
//# sourceMappingURL=sn-waterfall.js.map
|